(function (At, Fl) {
    typeof exports == "object" && typeof module < "u" ? Fl(exports) : typeof define == "function" && define.amd ? define(["exports"], Fl) : (At = typeof globalThis < "u" ? globalThis : At || self, Fl(At.GrapesJs = {}))
})(this, function (At) {
    "use strict";

    function Fl(e, t) {
        for (var n = 0; n < t.length; n++) {
            const r = t[n];
            if (typeof r != "string" && !Array.isArray(r)) {
                for (const o in r) if (o !== "default" && !(o in e)) {
                    const i = Object.getOwnPropertyDescriptor(r, o);
                    i && Object.defineProperty(e, o, i.get ? i : {enumerable: !0, get: () => r[o]})
                }
            }
        }
        return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}))
    }

    function zl(e) {
        return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e
    }

    var fy = {exports: {}}, Bl = {}, py = {exports: {}}, ot = {};
    /**
     * @license React
     * react.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 gy;

    function d3() {
        if (gy) return ot;
        gy = 1;
        var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"),
            r = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), i = Symbol.for("react.provider"),
            l = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"),
            p = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), m = Symbol.iterator;

        function v(M) {
            return M === null || typeof M != "object" ? null : (M = m && M[m] || M["@@iterator"], typeof M == "function" ? M : null)
        }

        var b = {
            isMounted: function () {
                return !1
            }, enqueueForceUpdate: function () {
            }, enqueueReplaceState: function () {
            }, enqueueSetState: function () {
            }
        }, x = Object.assign, w = {};

        function j(M, W, ce) {
            this.props = M, this.context = W, this.refs = w, this.updater = ce || b
        }

        j.prototype.isReactComponent = {}, j.prototype.setState = function (M, W) {
            if (typeof M != "object" && typeof M != "function" && M != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
            this.updater.enqueueSetState(this, M, W, "setState")
        }, j.prototype.forceUpdate = function (M) {
            this.updater.enqueueForceUpdate(this, M, "forceUpdate")
        };

        function C() {
        }

        C.prototype = j.prototype;

        function _(M, W, ce) {
            this.props = M, this.context = W, this.refs = w, this.updater = ce || b
        }

        var E = _.prototype = new C;
        E.constructor = _, x(E, j.prototype), E.isPureReactComponent = !0;
        var k = Array.isArray, T = Object.prototype.hasOwnProperty, O = {current: null},
            A = {key: !0, ref: !0, __self: !0, __source: !0};

        function $(M, W, ce) {
            var ne, ue = {}, me = null, ae = null;
            if (W != null) for (ne in W.ref !== void 0 && (ae = W.ref), W.key !== void 0 && (me = "" + W.key), W) T.call(W, ne) && !A.hasOwnProperty(ne) && (ue[ne] = W[ne]);
            var ie = arguments.length - 2;
            if (ie === 1) ue.children = ce; else if (1 < ie) {
                for (var de = Array(ie), je = 0; je < ie; je++) de[je] = arguments[je + 2];
                ue.children = de
            }
            if (M && M.defaultProps) for (ne in ie = M.defaultProps, ie) ue[ne] === void 0 && (ue[ne] = ie[ne]);
            return {$$typeof: e, type: M, key: me, ref: ae, props: ue, _owner: O.current}
        }

        function F(M, W) {
            return {$$typeof: e, type: M.type, key: W, ref: M.ref, props: M.props, _owner: M._owner}
        }

        function N(M) {
            return typeof M == "object" && M !== null && M.$$typeof === e
        }

        function z(M) {
            var W = {"=": "=0", ":": "=2"};
            return "$" + M.replace(/[=:]/g, function (ce) {
                return W[ce]
            })
        }

        var V = /\/+/g;

        function X(M, W) {
            return typeof M == "object" && M !== null && M.key != null ? z("" + M.key) : W.toString(36)
        }

        function Z(M, W, ce, ne, ue) {
            var me = typeof M;
            (me === "undefined" || me === "boolean") && (M = null);
            var ae = !1;
            if (M === null) ae = !0; else switch (me) {
                case"string":
                case"number":
                    ae = !0;
                    break;
                case"object":
                    switch (M.$$typeof) {
                        case e:
                        case t:
                            ae = !0
                    }
            }
            if (ae) return ae = M, ue = ue(ae), M = ne === "" ? "." + X(ae, 0) : ne, k(ue) ? (ce = "", M != null && (ce = M.replace(V, "$&/") + "/"), Z(ue, W, ce, "", function (je) {
                return je
            })) : ue != null && (N(ue) && (ue = F(ue, ce + (!ue.key || ae && ae.key === ue.key ? "" : ("" + ue.key).replace(V, "$&/") + "/") + M)), W.push(ue)), 1;
            if (ae = 0, ne = ne === "" ? "." : ne + ":", k(M)) for (var ie = 0; ie < M.length; ie++) {
                me = M[ie];
                var de = ne + X(me, ie);
                ae += Z(me, W, ce, de, ue)
            } else if (de = v(M), typeof de == "function") for (M = de.call(M), ie = 0; !(me = M.next()).done;) me = me.value, de = ne + X(me, ie++), ae += Z(me, W, ce, de, ue); else if (me === "object") throw W = String(M), Error("Objects are not valid as a React child (found: " + (W === "[object Object]" ? "object with keys {" + Object.keys(M).join(", ") + "}" : W) + "). If you meant to render a collection of children, use an array instead.");
            return ae
        }

        function R(M, W, ce) {
            if (M == null) return M;
            var ne = [], ue = 0;
            return Z(M, ne, "", "", function (me) {
                return W.call(ce, me, ue++)
            }), ne
        }

        function B(M) {
            if (M._status === -1) {
                var W = M._result;
                W = W(), W.then(function (ce) {
                    (M._status === 0 || M._status === -1) && (M._status = 1, M._result = ce)
                }, function (ce) {
                    (M._status === 0 || M._status === -1) && (M._status = 2, M._result = ce)
                }), M._status === -1 && (M._status = 0, M._result = W)
            }
            if (M._status === 1) return M._result.default;
            throw M._result
        }

        var Q = {current: null}, H = {transition: null},
            I = {ReactCurrentDispatcher: Q, ReactCurrentBatchConfig: H, ReactCurrentOwner: O};

        function D() {
            throw Error("act(...) is not supported in production builds of React.")
        }

        return ot.Children = {
            map: R, forEach: function (M, W, ce) {
                R(M, function () {
                    W.apply(this, arguments)
                }, ce)
            }, count: function (M) {
                var W = 0;
                return R(M, function () {
                    W++
                }), W
            }, toArray: function (M) {
                return R(M, function (W) {
                    return W
                }) || []
            }, only: function (M) {
                if (!N(M)) throw Error("React.Children.only expected to receive a single React element child.");
                return M
            }
        }, ot.Component = j, ot.Fragment = n, ot.Profiler = o, ot.PureComponent = _, ot.StrictMode = r, ot.Suspense = d, ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = I, ot.act = D, ot.cloneElement = function (M, W, ce) {
            if (M == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + M + ".");
            var ne = x({}, M.props), ue = M.key, me = M.ref, ae = M._owner;
            if (W != null) {
                if (W.ref !== void 0 && (me = W.ref, ae = O.current), W.key !== void 0 && (ue = "" + W.key), M.type && M.type.defaultProps) var ie = M.type.defaultProps;
                for (de in W) T.call(W, de) && !A.hasOwnProperty(de) && (ne[de] = W[de] === void 0 && ie !== void 0 ? ie[de] : W[de])
            }
            var de = arguments.length - 2;
            if (de === 1) ne.children = ce; else if (1 < de) {
                ie = Array(de);
                for (var je = 0; je < de; je++) ie[je] = arguments[je + 2];
                ne.children = ie
            }
            return {$$typeof: e, type: M.type, key: ue, ref: me, props: ne, _owner: ae}
        }, ot.createContext = function (M) {
            return M = {
                $$typeof: l,
                _currentValue: M,
                _currentValue2: M,
                _threadCount: 0,
                Provider: null,
                Consumer: null,
                _defaultValue: null,
                _globalName: null
            }, M.Provider = {$$typeof: i, _context: M}, M.Consumer = M
        }, ot.createElement = $, ot.createFactory = function (M) {
            var W = $.bind(null, M);
            return W.type = M, W
        }, ot.createRef = function () {
            return {current: null}
        }, ot.forwardRef = function (M) {
            return {$$typeof: c, render: M}
        }, ot.isValidElement = N, ot.lazy = function (M) {
            return {$$typeof: g, _payload: {_status: -1, _result: M}, _init: B}
        }, ot.memo = function (M, W) {
            return {$$typeof: p, type: M, compare: W === void 0 ? null : W}
        }, ot.startTransition = function (M) {
            var W = H.transition;
            H.transition = {};
            try {
                M()
            } finally {
                H.transition = W
            }
        }, ot.unstable_act = D, ot.useCallback = function (M, W) {
            return Q.current.useCallback(M, W)
        }, ot.useContext = function (M) {
            return Q.current.useContext(M)
        }, ot.useDebugValue = function () {
        }, ot.useDeferredValue = function (M) {
            return Q.current.useDeferredValue(M)
        }, ot.useEffect = function (M, W) {
            return Q.current.useEffect(M, W)
        }, ot.useId = function () {
            return Q.current.useId()
        }, ot.useImperativeHandle = function (M, W, ce) {
            return Q.current.useImperativeHandle(M, W, ce)
        }, ot.useInsertionEffect = function (M, W) {
            return Q.current.useInsertionEffect(M, W)
        }, ot.useLayoutEffect = function (M, W) {
            return Q.current.useLayoutEffect(M, W)
        }, ot.useMemo = function (M, W) {
            return Q.current.useMemo(M, W)
        }, ot.useReducer = function (M, W, ce) {
            return Q.current.useReducer(M, W, ce)
        }, ot.useRef = function (M) {
            return Q.current.useRef(M)
        }, ot.useState = function (M) {
            return Q.current.useState(M)
        }, ot.useSyncExternalStore = function (M, W, ce) {
            return Q.current.useSyncExternalStore(M, W, ce)
        }, ot.useTransition = function () {
            return Q.current.useTransition()
        }, ot.version = "18.3.1", ot
    }

    py.exports = d3();
    var y = py.exports;
    const ee = zl(y), Ul = Fl({__proto__: null, default: ee}, [y]);
    /**
     * @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 hy;

    function f3() {
        if (hy) return Bl;
        hy = 1;
        var e = y, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"),
            r = Object.prototype.hasOwnProperty,
            o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,
            i = {key: !0, ref: !0, __self: !0, __source: !0};

        function l(c, d, p) {
            var g, m = {}, v = null, b = null;
            p !== void 0 && (v = "" + p), d.key !== void 0 && (v = "" + d.key), d.ref !== void 0 && (b = d.ref);
            for (g in d) r.call(d, g) && !i.hasOwnProperty(g) && (m[g] = d[g]);
            if (c && c.defaultProps) for (g in d = c.defaultProps, d) m[g] === void 0 && (m[g] = d[g]);
            return {$$typeof: t, type: c, key: v, ref: b, props: m, _owner: o.current}
        }

        return Bl.Fragment = n, Bl.jsx = l, Bl.jsxs = l, Bl
    }

    fy.exports = f3();
    var u = fy.exports, my = {exports: {}}, Zn = {}, Pg = {exports: {}}, _g = {};
    /**
     * @license React
     * scheduler.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 vy;

    function p3() {
        return vy || (vy = 1, function (e) {
            function t(H, I) {
                var D = H.length;
                H.push(I);
                e:for (; 0 < D;) {
                    var M = D - 1 >>> 1, W = H[M];
                    if (0 < o(W, I)) H[M] = I, H[D] = W, D = M; else break e
                }
            }

            function n(H) {
                return H.length === 0 ? null : H[0]
            }

            function r(H) {
                if (H.length === 0) return null;
                var I = H[0], D = H.pop();
                if (D !== I) {
                    H[0] = D;
                    e:for (var M = 0, W = H.length, ce = W >>> 1; M < ce;) {
                        var ne = 2 * (M + 1) - 1, ue = H[ne], me = ne + 1, ae = H[me];
                        if (0 > o(ue, D)) me < W && 0 > o(ae, ue) ? (H[M] = ae, H[me] = D, M = me) : (H[M] = ue, H[ne] = D, M = ne); else if (me < W && 0 > o(ae, D)) H[M] = ae, H[me] = D, M = me; else break e
                    }
                }
                return I
            }

            function o(H, I) {
                var D = H.sortIndex - I.sortIndex;
                return D !== 0 ? D : H.id - I.id
            }

            if (typeof performance == "object" && typeof performance.now == "function") {
                var i = performance;
                e.unstable_now = function () {
                    return i.now()
                }
            } else {
                var l = Date, c = l.now();
                e.unstable_now = function () {
                    return l.now() - c
                }
            }
            var d = [], p = [], g = 1, m = null, v = 3, b = !1, x = !1, w = !1,
                j = typeof setTimeout == "function" ? setTimeout : null,
                C = typeof clearTimeout == "function" ? clearTimeout : null,
                _ = typeof setImmediate < "u" ? setImmediate : null;
            typeof navigator < "u" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 && navigator.scheduling.isInputPending.bind(navigator.scheduling);

            function E(H) {
                for (var I = n(p); I !== null;) {
                    if (I.callback === null) r(p); else if (I.startTime <= H) r(p), I.sortIndex = I.expirationTime, t(d, I); else break;
                    I = n(p)
                }
            }

            function k(H) {
                if (w = !1, E(H), !x) if (n(d) !== null) x = !0, B(T); else {
                    var I = n(p);
                    I !== null && Q(k, I.startTime - H)
                }
            }

            function T(H, I) {
                x = !1, w && (w = !1, C($), $ = -1), b = !0;
                var D = v;
                try {
                    for (E(I), m = n(d); m !== null && (!(m.expirationTime > I) || H && !z());) {
                        var M = m.callback;
                        if (typeof M == "function") {
                            m.callback = null, v = m.priorityLevel;
                            var W = M(m.expirationTime <= I);
                            I = e.unstable_now(), typeof W == "function" ? m.callback = W : m === n(d) && r(d), E(I)
                        } else r(d);
                        m = n(d)
                    }
                    if (m !== null) var ce = !0; else {
                        var ne = n(p);
                        ne !== null && Q(k, ne.startTime - I), ce = !1
                    }
                    return ce
                } finally {
                    m = null, v = D, b = !1
                }
            }

            var O = !1, A = null, $ = -1, F = 5, N = -1;

            function z() {
                return !(e.unstable_now() - N < F)
            }

            function V() {
                if (A !== null) {
                    var H = e.unstable_now();
                    N = H;
                    var I = !0;
                    try {
                        I = A(!0, H)
                    } finally {
                        I ? X() : (O = !1, A = null)
                    }
                } else O = !1
            }

            var X;
            if (typeof _ == "function") X = function () {
                _(V)
            }; else if (typeof MessageChannel < "u") {
                var Z = new MessageChannel, R = Z.port2;
                Z.port1.onmessage = V, X = function () {
                    R.postMessage(null)
                }
            } else X = function () {
                j(V, 0)
            };

            function B(H) {
                A = H, O || (O = !0, X())
            }

            function Q(H, I) {
                $ = j(function () {
                    H(e.unstable_now())
                }, I)
            }

            e.unstable_IdlePriority = 5, e.unstable_ImmediatePriority = 1, e.unstable_LowPriority = 4, e.unstable_NormalPriority = 3, e.unstable_Profiling = null, e.unstable_UserBlockingPriority = 2, e.unstable_cancelCallback = function (H) {
                H.callback = null
            }, e.unstable_continueExecution = function () {
                x || b || (x = !0, B(T))
            }, e.unstable_forceFrameRate = function (H) {
                0 > H || 125 < H ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : F = 0 < H ? Math.floor(1e3 / H) : 5
            }, e.unstable_getCurrentPriorityLevel = function () {
                return v
            }, e.unstable_getFirstCallbackNode = function () {
                return n(d)
            }, e.unstable_next = function (H) {
                switch (v) {
                    case 1:
                    case 2:
                    case 3:
                        var I = 3;
                        break;
                    default:
                        I = v
                }
                var D = v;
                v = I;
                try {
                    return H()
                } finally {
                    v = D
                }
            }, e.unstable_pauseExecution = function () {
            }, e.unstable_requestPaint = function () {
            }, e.unstable_runWithPriority = function (H, I) {
                switch (H) {
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                        break;
                    default:
                        H = 3
                }
                var D = v;
                v = H;
                try {
                    return I()
                } finally {
                    v = D
                }
            }, e.unstable_scheduleCallback = function (H, I, D) {
                var M = e.unstable_now();
                switch (typeof D == "object" && D !== null ? (D = D.delay, D = typeof D == "number" && 0 < D ? M + D : M) : D = M, H) {
                    case 1:
                        var W = -1;
                        break;
                    case 2:
                        W = 250;
                        break;
                    case 5:
                        W = 1073741823;
                        break;
                    case 4:
                        W = 1e4;
                        break;
                    default:
                        W = 5e3
                }
                return W = D + W, H = {
                    id: g++,
                    callback: I,
                    priorityLevel: H,
                    startTime: D,
                    expirationTime: W,
                    sortIndex: -1
                }, D > M ? (H.sortIndex = D, t(p, H), n(d) === null && H === n(p) && (w ? (C($), $ = -1) : w = !0, Q(k, D - M))) : (H.sortIndex = W, t(d, H), x || b || (x = !0, B(T))), H
            }, e.unstable_shouldYield = z, e.unstable_wrapCallback = function (H) {
                var I = v;
                return function () {
                    var D = v;
                    v = I;
                    try {
                        return H.apply(this, arguments)
                    } finally {
                        v = D
                    }
                }
            }
        }(_g)), _g
    }

    var yy;

    function g3() {
        return yy || (yy = 1, Pg.exports = p3()), Pg.exports
    }

    /**
     * @license React
     * react-dom.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 by;

    function h3() {
        if (by) return Zn;
        by = 1;
        var e = y, t = g3();

        function n(s) {
            for (var a = "https://reactjs.org/docs/error-decoder.html?invariant=" + s, f = 1; f < arguments.length; f++) a += "&args[]=" + encodeURIComponent(arguments[f]);
            return "Minified React error #" + s + "; visit " + a + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
        }

        var r = new Set, o = {};

        function i(s, a) {
            l(s, a), l(s + "Capture", a)
        }

        function l(s, a) {
            for (o[s] = a, s = 0; s < a.length; s++) r.add(a[s])
        }

        var c = !(typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u"),
            d = Object.prototype.hasOwnProperty,
            p = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,
            g = {}, m = {};

        function v(s) {
            return d.call(m, s) ? !0 : d.call(g, s) ? !1 : p.test(s) ? m[s] = !0 : (g[s] = !0, !1)
        }

        function b(s, a, f, h) {
            if (f !== null && f.type === 0) return !1;
            switch (typeof a) {
                case"function":
                case"symbol":
                    return !0;
                case"boolean":
                    return h ? !1 : f !== null ? !f.acceptsBooleans : (s = s.toLowerCase().slice(0, 5), s !== "data-" && s !== "aria-");
                default:
                    return !1
            }
        }

        function x(s, a, f, h) {
            if (a === null || typeof a > "u" || b(s, a, f, h)) return !0;
            if (h) return !1;
            if (f !== null) switch (f.type) {
                case 3:
                    return !a;
                case 4:
                    return a === !1;
                case 5:
                    return isNaN(a);
                case 6:
                    return isNaN(a) || 1 > a
            }
            return !1
        }

        function w(s, a, f, h, S, P, L) {
            this.acceptsBooleans = a === 2 || a === 3 || a === 4, this.attributeName = h, this.attributeNamespace = S, this.mustUseProperty = f, this.propertyName = s, this.type = a, this.sanitizeURL = P, this.removeEmptyString = L
        }

        var j = {};
        "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function (s) {
            j[s] = new w(s, 0, !1, s, null, !1, !1)
        }), [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function (s) {
            var a = s[0];
            j[a] = new w(a, 1, !1, s[1], null, !1, !1)
        }), ["contentEditable", "draggable", "spellCheck", "value"].forEach(function (s) {
            j[s] = new w(s, 2, !1, s.toLowerCase(), null, !1, !1)
        }), ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function (s) {
            j[s] = new w(s, 2, !1, s, null, !1, !1)
        }), "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function (s) {
            j[s] = new w(s, 3, !1, s.toLowerCase(), null, !1, !1)
        }), ["checked", "multiple", "muted", "selected"].forEach(function (s) {
            j[s] = new w(s, 3, !0, s, null, !1, !1)
        }), ["capture", "download"].forEach(function (s) {
            j[s] = new w(s, 4, !1, s, null, !1, !1)
        }), ["cols", "rows", "size", "span"].forEach(function (s) {
            j[s] = new w(s, 6, !1, s, null, !1, !1)
        }), ["rowSpan", "start"].forEach(function (s) {
            j[s] = new w(s, 5, !1, s.toLowerCase(), null, !1, !1)
        });
        var C = /[\-:]([a-z])/g;

        function _(s) {
            return s[1].toUpperCase()
        }

        "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function (s) {
            var a = s.replace(C, _);
            j[a] = new w(a, 1, !1, s, null, !1, !1)
        }), "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function (s) {
            var a = s.replace(C, _);
            j[a] = new w(a, 1, !1, s, "http://www.w3.org/1999/xlink", !1, !1)
        }), ["xml:base", "xml:lang", "xml:space"].forEach(function (s) {
            var a = s.replace(C, _);
            j[a] = new w(a, 1, !1, s, "http://www.w3.org/XML/1998/namespace", !1, !1)
        }), ["tabIndex", "crossOrigin"].forEach(function (s) {
            j[s] = new w(s, 1, !1, s.toLowerCase(), null, !1, !1)
        }), j.xlinkHref = new w("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1), ["src", "href", "action", "formAction"].forEach(function (s) {
            j[s] = new w(s, 1, !1, s.toLowerCase(), null, !0, !0)
        });

        function E(s, a, f, h) {
            var S = j.hasOwnProperty(a) ? j[a] : null;
            (S !== null ? S.type !== 0 : h || !(2 < a.length) || a[0] !== "o" && a[0] !== "O" || a[1] !== "n" && a[1] !== "N") && (x(a, f, S, h) && (f = null), h || S === null ? v(a) && (f === null ? s.removeAttribute(a) : s.setAttribute(a, "" + f)) : S.mustUseProperty ? s[S.propertyName] = f === null ? S.type === 3 ? !1 : "" : f : (a = S.attributeName, h = S.attributeNamespace, f === null ? s.removeAttribute(a) : (S = S.type, f = S === 3 || S === 4 && f === !0 ? "" : "" + f, h ? s.setAttributeNS(h, a, f) : s.setAttribute(a, f))))
        }

        var k = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, T = Symbol.for("react.element"),
            O = Symbol.for("react.portal"), A = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"),
            F = Symbol.for("react.profiler"), N = Symbol.for("react.provider"), z = Symbol.for("react.context"),
            V = Symbol.for("react.forward_ref"), X = Symbol.for("react.suspense"),
            Z = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), B = Symbol.for("react.lazy"),
            Q = Symbol.for("react.offscreen"), H = Symbol.iterator;

        function I(s) {
            return s === null || typeof s != "object" ? null : (s = H && s[H] || s["@@iterator"], typeof s == "function" ? s : null)
        }

        var D = Object.assign, M;

        function W(s) {
            if (M === void 0) try {
                throw Error()
            } catch (f) {
                var a = f.stack.trim().match(/\n( *(at )?)/);
                M = a && a[1] || ""
            }
            return `
` + M + s
        }

        var ce = !1;

        function ne(s, a) {
            if (!s || ce) return "";
            ce = !0;
            var f = Error.prepareStackTrace;
            Error.prepareStackTrace = void 0;
            try {
                if (a) if (a = function () {
                    throw Error()
                }, Object.defineProperty(a.prototype, "props", {
                    set: function () {
                        throw Error()
                    }
                }), typeof Reflect == "object" && Reflect.construct) {
                    try {
                        Reflect.construct(a, [])
                    } catch (le) {
                        var h = le
                    }
                    Reflect.construct(s, [], a)
                } else {
                    try {
                        a.call()
                    } catch (le) {
                        h = le
                    }
                    s.call(a.prototype)
                } else {
                    try {
                        throw Error()
                    } catch (le) {
                        h = le
                    }
                    s()
                }
            } catch (le) {
                if (le && h && typeof le.stack == "string") {
                    for (var S = le.stack.split(`
`), P = h.stack.split(`
`), L = S.length - 1, G = P.length - 1; 1 <= L && 0 <= G && S[L] !== P[G];) G--;
                    for (; 1 <= L && 0 <= G; L--, G--) if (S[L] !== P[G]) {
                        if (L !== 1 || G !== 1) do if (L--, G--, 0 > G || S[L] !== P[G]) {
                            var Y = `
` + S[L].replace(" at new ", " at ");
                            return s.displayName && Y.includes("<anonymous>") && (Y = Y.replace("<anonymous>", s.displayName)), Y
                        } while (1 <= L && 0 <= G);
                        break
                    }
                }
            } finally {
                ce = !1, Error.prepareStackTrace = f
            }
            return (s = s ? s.displayName || s.name : "") ? W(s) : ""
        }

        function ue(s) {
            switch (s.tag) {
                case 5:
                    return W(s.type);
                case 16:
                    return W("Lazy");
                case 13:
                    return W("Suspense");
                case 19:
                    return W("SuspenseList");
                case 0:
                case 2:
                case 15:
                    return s = ne(s.type, !1), s;
                case 11:
                    return s = ne(s.type.render, !1), s;
                case 1:
                    return s = ne(s.type, !0), s;
                default:
                    return ""
            }
        }

        function me(s) {
            if (s == null) return null;
            if (typeof s == "function") return s.displayName || s.name || null;
            if (typeof s == "string") return s;
            switch (s) {
                case A:
                    return "Fragment";
                case O:
                    return "Portal";
                case F:
                    return "Profiler";
                case $:
                    return "StrictMode";
                case X:
                    return "Suspense";
                case Z:
                    return "SuspenseList"
            }
            if (typeof s == "object") switch (s.$$typeof) {
                case z:
                    return (s.displayName || "Context") + ".Consumer";
                case N:
                    return (s._context.displayName || "Context") + ".Provider";
                case V:
                    var a = s.render;
                    return s = s.displayName, s || (s = a.displayName || a.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
                case R:
                    return a = s.displayName || null, a !== null ? a : me(s.type) || "Memo";
                case B:
                    a = s._payload, s = s._init;
                    try {
                        return me(s(a))
                    } catch {
                    }
            }
            return null
        }

        function ae(s) {
            var a = s.type;
            switch (s.tag) {
                case 24:
                    return "Cache";
                case 9:
                    return (a.displayName || "Context") + ".Consumer";
                case 10:
                    return (a._context.displayName || "Context") + ".Provider";
                case 18:
                    return "DehydratedFragment";
                case 11:
                    return s = a.render, s = s.displayName || s.name || "", a.displayName || (s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef");
                case 7:
                    return "Fragment";
                case 5:
                    return a;
                case 4:
                    return "Portal";
                case 3:
                    return "Root";
                case 6:
                    return "Text";
                case 16:
                    return me(a);
                case 8:
                    return a === $ ? "StrictMode" : "Mode";
                case 22:
                    return "Offscreen";
                case 12:
                    return "Profiler";
                case 21:
                    return "Scope";
                case 13:
                    return "Suspense";
                case 19:
                    return "SuspenseList";
                case 25:
                    return "TracingMarker";
                case 1:
                case 0:
                case 17:
                case 2:
                case 14:
                case 15:
                    if (typeof a == "function") return a.displayName || a.name || null;
                    if (typeof a == "string") return a
            }
            return null
        }

        function ie(s) {
            switch (typeof s) {
                case"boolean":
                case"number":
                case"string":
                case"undefined":
                    return s;
                case"object":
                    return s;
                default:
                    return ""
            }
        }

        function de(s) {
            var a = s.type;
            return (s = s.nodeName) && s.toLowerCase() === "input" && (a === "checkbox" || a === "radio")
        }

        function je(s) {
            var a = de(s) ? "checked" : "value", f = Object.getOwnPropertyDescriptor(s.constructor.prototype, a),
                h = "" + s[a];
            if (!s.hasOwnProperty(a) && typeof f < "u" && typeof f.get == "function" && typeof f.set == "function") {
                var S = f.get, P = f.set;
                return Object.defineProperty(s, a, {
                    configurable: !0, get: function () {
                        return S.call(this)
                    }, set: function (L) {
                        h = "" + L, P.call(this, L)
                    }
                }), Object.defineProperty(s, a, {enumerable: f.enumerable}), {
                    getValue: function () {
                        return h
                    }, setValue: function (L) {
                        h = "" + L
                    }, stopTracking: function () {
                        s._valueTracker = null, delete s[a]
                    }
                }
            }
        }

        function he(s) {
            s._valueTracker || (s._valueTracker = je(s))
        }

        function Ie(s) {
            if (!s) return !1;
            var a = s._valueTracker;
            if (!a) return !0;
            var f = a.getValue(), h = "";
            return s && (h = de(s) ? s.checked ? "true" : "false" : s.value), s = h, s !== f ? (a.setValue(s), !0) : !1
        }

        function He(s) {
            if (s = s || (typeof document < "u" ? document : void 0), typeof s > "u") return null;
            try {
                return s.activeElement || s.body
            } catch {
                return s.body
            }
        }

        function yt(s, a) {
            var f = a.checked;
            return D({}, a, {
                defaultChecked: void 0,
                defaultValue: void 0,
                value: void 0,
                checked: f ?? s._wrapperState.initialChecked
            })
        }

        function kt(s, a) {
            var f = a.defaultValue == null ? "" : a.defaultValue, h = a.checked != null ? a.checked : a.defaultChecked;
            f = ie(a.value != null ? a.value : f), s._wrapperState = {
                initialChecked: h,
                initialValue: f,
                controlled: a.type === "checkbox" || a.type === "radio" ? a.checked != null : a.value != null
            }
        }

        function Bt(s, a) {
            a = a.checked, a != null && E(s, "checked", a, !1)
        }

        function Ct(s, a) {
            Bt(s, a);
            var f = ie(a.value), h = a.type;
            if (f != null) h === "number" ? (f === 0 && s.value === "" || s.value != f) && (s.value = "" + f) : s.value !== "" + f && (s.value = "" + f); else if (h === "submit" || h === "reset") {
                s.removeAttribute("value");
                return
            }
            a.hasOwnProperty("value") ? Sn(s, a.type, f) : a.hasOwnProperty("defaultValue") && Sn(s, a.type, ie(a.defaultValue)), a.checked == null && a.defaultChecked != null && (s.defaultChecked = !!a.defaultChecked)
        }

        function pt(s, a, f) {
            if (a.hasOwnProperty("value") || a.hasOwnProperty("defaultValue")) {
                var h = a.type;
                if (!(h !== "submit" && h !== "reset" || a.value !== void 0 && a.value !== null)) return;
                a = "" + s._wrapperState.initialValue, f || a === s.value || (s.value = a), s.defaultValue = a
            }
            f = s.name, f !== "" && (s.name = ""), s.defaultChecked = !!s._wrapperState.initialChecked, f !== "" && (s.name = f)
        }

        function Sn(s, a, f) {
            (a !== "number" || He(s.ownerDocument) !== s) && (f == null ? s.defaultValue = "" + s._wrapperState.initialValue : s.defaultValue !== "" + f && (s.defaultValue = "" + f))
        }

        var wt = Array.isArray;

        function Dt(s, a, f, h) {
            if (s = s.options, a) {
                a = {};
                for (var S = 0; S < f.length; S++) a["$" + f[S]] = !0;
                for (f = 0; f < s.length; f++) S = a.hasOwnProperty("$" + s[f].value), s[f].selected !== S && (s[f].selected = S), S && h && (s[f].defaultSelected = !0)
            } else {
                for (f = "" + ie(f), a = null, S = 0; S < s.length; S++) {
                    if (s[S].value === f) {
                        s[S].selected = !0, h && (s[S].defaultSelected = !0);
                        return
                    }
                    a !== null || s[S].disabled || (a = s[S])
                }
                a !== null && (a.selected = !0)
            }
        }

        function rn(s, a) {
            if (a.dangerouslySetInnerHTML != null) throw Error(n(91));
            return D({}, a, {value: void 0, defaultValue: void 0, children: "" + s._wrapperState.initialValue})
        }

        function Ut(s, a) {
            var f = a.value;
            if (f == null) {
                if (f = a.children, a = a.defaultValue, f != null) {
                    if (a != null) throw Error(n(92));
                    if (wt(f)) {
                        if (1 < f.length) throw Error(n(93));
                        f = f[0]
                    }
                    a = f
                }
                a == null && (a = ""), f = a
            }
            s._wrapperState = {initialValue: ie(f)}
        }

        function Tt(s, a) {
            var f = ie(a.value), h = ie(a.defaultValue);
            f != null && (f = "" + f, f !== s.value && (s.value = f), a.defaultValue == null && s.defaultValue !== f && (s.defaultValue = f)), h != null && (s.defaultValue = "" + h)
        }

        function st(s) {
            var a = s.textContent;
            a === s._wrapperState.initialValue && a !== "" && a !== null && (s.value = a)
        }

        function Lt(s) {
            switch (s) {
                case"svg":
                    return "http://www.w3.org/2000/svg";
                case"math":
                    return "http://www.w3.org/1998/Math/MathML";
                default:
                    return "http://www.w3.org/1999/xhtml"
            }
        }

        function qt(s, a) {
            return s == null || s === "http://www.w3.org/1999/xhtml" ? Lt(a) : s === "http://www.w3.org/2000/svg" && a === "foreignObject" ? "http://www.w3.org/1999/xhtml" : s
        }

        var jn, Kn = function (s) {
            return typeof MSApp < "u" && MSApp.execUnsafeLocalFunction ? function (a, f, h, S) {
                MSApp.execUnsafeLocalFunction(function () {
                    return s(a, f, h, S)
                })
            } : s
        }(function (s, a) {
            if (s.namespaceURI !== "http://www.w3.org/2000/svg" || "innerHTML" in s) s.innerHTML = a; else {
                for (jn = jn || document.createElement("div"), jn.innerHTML = "<svg>" + a.valueOf().toString() + "</svg>", a = jn.firstChild; s.firstChild;) s.removeChild(s.firstChild);
                for (; a.firstChild;) s.appendChild(a.firstChild)
            }
        });

        function lr(s, a) {
            if (a) {
                var f = s.firstChild;
                if (f && f === s.lastChild && f.nodeType === 3) {
                    f.nodeValue = a;
                    return
                }
            }
            s.textContent = a
        }

        var cr = {
            animationIterationCount: !0,
            aspectRatio: !0,
            borderImageOutset: !0,
            borderImageSlice: !0,
            borderImageWidth: !0,
            boxFlex: !0,
            boxFlexGroup: !0,
            boxOrdinalGroup: !0,
            columnCount: !0,
            columns: !0,
            flex: !0,
            flexGrow: !0,
            flexPositive: !0,
            flexShrink: !0,
            flexNegative: !0,
            flexOrder: !0,
            gridArea: !0,
            gridRow: !0,
            gridRowEnd: !0,
            gridRowSpan: !0,
            gridRowStart: !0,
            gridColumn: !0,
            gridColumnEnd: !0,
            gridColumnSpan: !0,
            gridColumnStart: !0,
            fontWeight: !0,
            lineClamp: !0,
            lineHeight: !0,
            opacity: !0,
            order: !0,
            orphans: !0,
            tabSize: !0,
            widows: !0,
            zIndex: !0,
            zoom: !0,
            fillOpacity: !0,
            floodOpacity: !0,
            stopOpacity: !0,
            strokeDasharray: !0,
            strokeDashoffset: !0,
            strokeMiterlimit: !0,
            strokeOpacity: !0,
            strokeWidth: !0
        }, xo = ["Webkit", "ms", "Moz", "O"];
        Object.keys(cr).forEach(function (s) {
            xo.forEach(function (a) {
                a = a + s.charAt(0).toUpperCase() + s.substring(1), cr[a] = cr[s]
            })
        });

        function Ls(s, a, f) {
            return a == null || typeof a == "boolean" || a === "" ? "" : f || typeof a != "number" || a === 0 || cr.hasOwnProperty(s) && cr[s] ? ("" + a).trim() : a + "px"
        }

        function aa(s, a) {
            s = s.style;
            for (var f in a) if (a.hasOwnProperty(f)) {
                var h = f.indexOf("--") === 0, S = Ls(f, a[f], h);
                f === "float" && (f = "cssFloat"), h ? s.setProperty(f, S) : s[f] = S
            }
        }

        var an = D({menuitem: !0}, {
            area: !0,
            base: !0,
            br: !0,
            col: !0,
            embed: !0,
            hr: !0,
            img: !0,
            input: !0,
            keygen: !0,
            link: !0,
            meta: !0,
            param: !0,
            source: !0,
            track: !0,
            wbr: !0
        });

        function Ht(s, a) {
            if (a) {
                if (an[s] && (a.children != null || a.dangerouslySetInnerHTML != null)) throw Error(n(137, s));
                if (a.dangerouslySetInnerHTML != null) {
                    if (a.children != null) throw Error(n(60));
                    if (typeof a.dangerouslySetInnerHTML != "object" || !("__html" in a.dangerouslySetInnerHTML)) throw Error(n(61))
                }
                if (a.style != null && typeof a.style != "object") throw Error(n(62))
            }
        }

        function Mt(s, a) {
            if (s.indexOf("-") === -1) return typeof a.is == "string";
            switch (s) {
                case"annotation-xml":
                case"color-profile":
                case"font-face":
                case"font-face-src":
                case"font-face-uri":
                case"font-face-format":
                case"font-face-name":
                case"missing-glyph":
                    return !1;
                default:
                    return !0
            }
        }

        var it = null;

        function Qt(s) {
            return s = s.target || s.srcElement || window, s.correspondingUseElement && (s = s.correspondingUseElement), s.nodeType === 3 ? s.parentNode : s
        }

        var wo = null, ln = null, Or = null;

        function So(s) {
            if (s = Vu(s)) {
                if (typeof wo != "function") throw Error(n(280));
                var a = s.stateNode;
                a && (a = Fp(a), wo(s.stateNode, s.type, a))
            }
        }

        function Qr(s) {
            ln ? Or ? Or.push(s) : Or = [s] : ln = s
        }

        function jo() {
            if (ln) {
                var s = ln, a = Or;
                if (Or = ln = null, So(s), a) for (s = 0; s < a.length; s++) So(a[s])
            }
        }

        function Co(s, a) {
            return s(a)
        }

        function ge() {
        }

        var ke = !1;

        function Me(s, a, f) {
            if (ke) return s(a, f);
            ke = !0;
            try {
                return Co(s, a, f)
            } finally {
                ke = !1, (ln !== null || Or !== null) && (ge(), jo())
            }
        }

        function We(s, a) {
            var f = s.stateNode;
            if (f === null) return null;
            var h = Fp(f);
            if (h === null) return null;
            f = h[a];
            e:switch (a) {
                case"onClick":
                case"onClickCapture":
                case"onDoubleClick":
                case"onDoubleClickCapture":
                case"onMouseDown":
                case"onMouseDownCapture":
                case"onMouseMove":
                case"onMouseMoveCapture":
                case"onMouseUp":
                case"onMouseUpCapture":
                case"onMouseEnter":
                    (h = !h.disabled) || (s = s.type, h = !(s === "button" || s === "input" || s === "select" || s === "textarea")), s = !h;
                    break e;
                default:
                    s = !1
            }
            if (s) return null;
            if (f && typeof f != "function") throw Error(n(231, a, typeof f));
            return f
        }

        var In = !1;
        if (c) try {
            var en = {};
            Object.defineProperty(en, "passive", {
                get: function () {
                    In = !0
                }
            }), window.addEventListener("test", en, en), window.removeEventListener("test", en, en)
        } catch {
            In = !1
        }

        function ur(s, a, f, h, S, P, L, G, Y) {
            var le = Array.prototype.slice.call(arguments, 3);
            try {
                a.apply(f, le)
            } catch (Se) {
                this.onError(Se)
            }
        }

        var qn = !1, vn = null, xp = !1, Lv = null, TB = {
            onError: function (s) {
                qn = !0, vn = s
            }
        };

        function OB(s, a, f, h, S, P, L, G, Y) {
            qn = !1, vn = null, ur.apply(TB, arguments)
        }

        function LB(s, a, f, h, S, P, L, G, Y) {
            if (OB.apply(this, arguments), qn) {
                if (qn) {
                    var le = vn;
                    qn = !1, vn = null
                } else throw Error(n(198));
                xp || (xp = !0, Lv = le)
            }
        }

        function la(s) {
            var a = s, f = s;
            if (s.alternate) for (; a.return;) a = a.return; else {
                s = a;
                do a = s, a.flags & 4098 && (f = a.return), s = a.return; while (s)
            }
            return a.tag === 3 ? f : null
        }

        function RE(s) {
            if (s.tag === 13) {
                var a = s.memoizedState;
                if (a === null && (s = s.alternate, s !== null && (a = s.memoizedState)), a !== null) return a.dehydrated
            }
            return null
        }

        function NE(s) {
            if (la(s) !== s) throw Error(n(188))
        }

        function MB(s) {
            var a = s.alternate;
            if (!a) {
                if (a = la(s), a === null) throw Error(n(188));
                return a !== s ? null : s
            }
            for (var f = s, h = a; ;) {
                var S = f.return;
                if (S === null) break;
                var P = S.alternate;
                if (P === null) {
                    if (h = S.return, h !== null) {
                        f = h;
                        continue
                    }
                    break
                }
                if (S.child === P.child) {
                    for (P = S.child; P;) {
                        if (P === f) return NE(S), s;
                        if (P === h) return NE(S), a;
                        P = P.sibling
                    }
                    throw Error(n(188))
                }
                if (f.return !== h.return) f = S, h = P; else {
                    for (var L = !1, G = S.child; G;) {
                        if (G === f) {
                            L = !0, f = S, h = P;
                            break
                        }
                        if (G === h) {
                            L = !0, h = S, f = P;
                            break
                        }
                        G = G.sibling
                    }
                    if (!L) {
                        for (G = P.child; G;) {
                            if (G === f) {
                                L = !0, f = P, h = S;
                                break
                            }
                            if (G === h) {
                                L = !0, h = P, f = S;
                                break
                            }
                            G = G.sibling
                        }
                        if (!L) throw Error(n(189))
                    }
                }
                if (f.alternate !== h) throw Error(n(190))
            }
            if (f.tag !== 3) throw Error(n(188));
            return f.stateNode.current === f ? s : a
        }

        function $E(s) {
            return s = MB(s), s !== null ? DE(s) : null
        }

        function DE(s) {
            if (s.tag === 5 || s.tag === 6) return s;
            for (s = s.child; s !== null;) {
                var a = DE(s);
                if (a !== null) return a;
                s = s.sibling
            }
            return null
        }

        var IE = t.unstable_scheduleCallback, VE = t.unstable_cancelCallback, AB = t.unstable_shouldYield,
            RB = t.unstable_requestPaint, cn = t.unstable_now, NB = t.unstable_getCurrentPriorityLevel,
            Mv = t.unstable_ImmediatePriority, HE = t.unstable_UserBlockingPriority, wp = t.unstable_NormalPriority,
            $B = t.unstable_LowPriority, FE = t.unstable_IdlePriority, Sp = null, rs = null;

        function DB(s) {
            if (rs && typeof rs.onCommitFiberRoot == "function") try {
                rs.onCommitFiberRoot(Sp, s, void 0, (s.current.flags & 128) === 128)
            } catch {
            }
        }

        var Eo = Math.clz32 ? Math.clz32 : HB, IB = Math.log, VB = Math.LN2;

        function HB(s) {
            return s >>>= 0, s === 0 ? 32 : 31 - (IB(s) / VB | 0) | 0
        }

        var jp = 64, Cp = 4194304;

        function wu(s) {
            switch (s & -s) {
                case 1:
                    return 1;
                case 2:
                    return 2;
                case 4:
                    return 4;
                case 8:
                    return 8;
                case 16:
                    return 16;
                case 32:
                    return 32;
                case 64:
                case 128:
                case 256:
                case 512:
                case 1024:
                case 2048:
                case 4096:
                case 8192:
                case 16384:
                case 32768:
                case 65536:
                case 131072:
                case 262144:
                case 524288:
                case 1048576:
                case 2097152:
                    return s & 4194240;
                case 4194304:
                case 8388608:
                case 16777216:
                case 33554432:
                case 67108864:
                    return s & 130023424;
                case 134217728:
                    return 134217728;
                case 268435456:
                    return 268435456;
                case 536870912:
                    return 536870912;
                case 1073741824:
                    return 1073741824;
                default:
                    return s
            }
        }

        function Ep(s, a) {
            var f = s.pendingLanes;
            if (f === 0) return 0;
            var h = 0, S = s.suspendedLanes, P = s.pingedLanes, L = f & 268435455;
            if (L !== 0) {
                var G = L & ~S;
                G !== 0 ? h = wu(G) : (P &= L, P !== 0 && (h = wu(P)))
            } else L = f & ~S, L !== 0 ? h = wu(L) : P !== 0 && (h = wu(P));
            if (h === 0) return 0;
            if (a !== 0 && a !== h && !(a & S) && (S = h & -h, P = a & -a, S >= P || S === 16 && (P & 4194240) !== 0)) return a;
            if (h & 4 && (h |= f & 16), a = s.entangledLanes, a !== 0) for (s = s.entanglements, a &= h; 0 < a;) f = 31 - Eo(a), S = 1 << f, h |= s[f], a &= ~S;
            return h
        }

        function FB(s, a) {
            switch (s) {
                case 1:
                case 2:
                case 4:
                    return a + 250;
                case 8:
                case 16:
                case 32:
                case 64:
                case 128:
                case 256:
                case 512:
                case 1024:
                case 2048:
                case 4096:
                case 8192:
                case 16384:
                case 32768:
                case 65536:
                case 131072:
                case 262144:
                case 524288:
                case 1048576:
                case 2097152:
                    return a + 5e3;
                case 4194304:
                case 8388608:
                case 16777216:
                case 33554432:
                case 67108864:
                    return -1;
                case 134217728:
                case 268435456:
                case 536870912:
                case 1073741824:
                    return -1;
                default:
                    return -1
            }
        }

        function zB(s, a) {
            for (var f = s.suspendedLanes, h = s.pingedLanes, S = s.expirationTimes, P = s.pendingLanes; 0 < P;) {
                var L = 31 - Eo(P), G = 1 << L, Y = S[L];
                Y === -1 ? (!(G & f) || G & h) && (S[L] = FB(G, a)) : Y <= a && (s.expiredLanes |= G), P &= ~G
            }
        }

        function Av(s) {
            return s = s.pendingLanes & -1073741825, s !== 0 ? s : s & 1073741824 ? 1073741824 : 0
        }

        function zE() {
            var s = jp;
            return jp <<= 1, !(jp & 4194240) && (jp = 64), s
        }

        function Rv(s) {
            for (var a = [], f = 0; 31 > f; f++) a.push(s);
            return a
        }

        function Su(s, a, f) {
            s.pendingLanes |= a, a !== 536870912 && (s.suspendedLanes = 0, s.pingedLanes = 0), s = s.eventTimes, a = 31 - Eo(a), s[a] = f
        }

        function BB(s, a) {
            var f = s.pendingLanes & ~a;
            s.pendingLanes = a, s.suspendedLanes = 0, s.pingedLanes = 0, s.expiredLanes &= a, s.mutableReadLanes &= a, s.entangledLanes &= a, a = s.entanglements;
            var h = s.eventTimes;
            for (s = s.expirationTimes; 0 < f;) {
                var S = 31 - Eo(f), P = 1 << S;
                a[S] = 0, h[S] = -1, s[S] = -1, f &= ~P
            }
        }

        function Nv(s, a) {
            var f = s.entangledLanes |= a;
            for (s = s.entanglements; f;) {
                var h = 31 - Eo(f), S = 1 << h;
                S & a | s[h] & a && (s[h] |= a), f &= ~S
            }
        }

        var Ot = 0;

        function BE(s) {
            return s &= -s, 1 < s ? 4 < s ? s & 268435455 ? 16 : 536870912 : 4 : 1
        }

        var UE, $v, WE, GE, KE, Dv = !1, Pp = [], gi = null, hi = null, mi = null, ju = new Map, Cu = new Map, vi = [],
            UB = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");

        function qE(s, a) {
            switch (s) {
                case"focusin":
                case"focusout":
                    gi = null;
                    break;
                case"dragenter":
                case"dragleave":
                    hi = null;
                    break;
                case"mouseover":
                case"mouseout":
                    mi = null;
                    break;
                case"pointerover":
                case"pointerout":
                    ju.delete(a.pointerId);
                    break;
                case"gotpointercapture":
                case"lostpointercapture":
                    Cu.delete(a.pointerId)
            }
        }

        function Eu(s, a, f, h, S, P) {
            return s === null || s.nativeEvent !== P ? (s = {
                blockedOn: a,
                domEventName: f,
                eventSystemFlags: h,
                nativeEvent: P,
                targetContainers: [S]
            }, a !== null && (a = Vu(a), a !== null && $v(a)), s) : (s.eventSystemFlags |= h, a = s.targetContainers, S !== null && a.indexOf(S) === -1 && a.push(S), s)
        }

        function WB(s, a, f, h, S) {
            switch (a) {
                case"focusin":
                    return gi = Eu(gi, s, a, f, h, S), !0;
                case"dragenter":
                    return hi = Eu(hi, s, a, f, h, S), !0;
                case"mouseover":
                    return mi = Eu(mi, s, a, f, h, S), !0;
                case"pointerover":
                    var P = S.pointerId;
                    return ju.set(P, Eu(ju.get(P) || null, s, a, f, h, S)), !0;
                case"gotpointercapture":
                    return P = S.pointerId, Cu.set(P, Eu(Cu.get(P) || null, s, a, f, h, S)), !0
            }
            return !1
        }

        function YE(s) {
            var a = ca(s.target);
            if (a !== null) {
                var f = la(a);
                if (f !== null) {
                    if (a = f.tag, a === 13) {
                        if (a = RE(f), a !== null) {
                            s.blockedOn = a, KE(s.priority, function () {
                                WE(f)
                            });
                            return
                        }
                    } else if (a === 3 && f.stateNode.current.memoizedState.isDehydrated) {
                        s.blockedOn = f.tag === 3 ? f.stateNode.containerInfo : null;
                        return
                    }
                }
            }
            s.blockedOn = null
        }

        function _p(s) {
            if (s.blockedOn !== null) return !1;
            for (var a = s.targetContainers; 0 < a.length;) {
                var f = Vv(s.domEventName, s.eventSystemFlags, a[0], s.nativeEvent);
                if (f === null) {
                    f = s.nativeEvent;
                    var h = new f.constructor(f.type, f);
                    it = h, f.target.dispatchEvent(h), it = null
                } else return a = Vu(f), a !== null && $v(a), s.blockedOn = f, !1;
                a.shift()
            }
            return !0
        }

        function XE(s, a, f) {
            _p(s) && f.delete(a)
        }

        function GB() {
            Dv = !1, gi !== null && _p(gi) && (gi = null), hi !== null && _p(hi) && (hi = null), mi !== null && _p(mi) && (mi = null), ju.forEach(XE), Cu.forEach(XE)
        }

        function Pu(s, a) {
            s.blockedOn === a && (s.blockedOn = null, Dv || (Dv = !0, t.unstable_scheduleCallback(t.unstable_NormalPriority, GB)))
        }

        function _u(s) {
            function a(S) {
                return Pu(S, s)
            }

            if (0 < Pp.length) {
                Pu(Pp[0], s);
                for (var f = 1; f < Pp.length; f++) {
                    var h = Pp[f];
                    h.blockedOn === s && (h.blockedOn = null)
                }
            }
            for (gi !== null && Pu(gi, s), hi !== null && Pu(hi, s), mi !== null && Pu(mi, s), ju.forEach(a), Cu.forEach(a), f = 0; f < vi.length; f++) h = vi[f], h.blockedOn === s && (h.blockedOn = null);
            for (; 0 < vi.length && (f = vi[0], f.blockedOn === null);) YE(f), f.blockedOn === null && vi.shift()
        }

        var bl = k.ReactCurrentBatchConfig, kp = !0;

        function KB(s, a, f, h) {
            var S = Ot, P = bl.transition;
            bl.transition = null;
            try {
                Ot = 1, Iv(s, a, f, h)
            } finally {
                Ot = S, bl.transition = P
            }
        }

        function qB(s, a, f, h) {
            var S = Ot, P = bl.transition;
            bl.transition = null;
            try {
                Ot = 4, Iv(s, a, f, h)
            } finally {
                Ot = S, bl.transition = P
            }
        }

        function Iv(s, a, f, h) {
            if (kp) {
                var S = Vv(s, a, f, h);
                if (S === null) n0(s, a, h, Tp, f), qE(s, h); else if (WB(S, s, a, f, h)) h.stopPropagation(); else if (qE(s, h), a & 4 && -1 < UB.indexOf(s)) {
                    for (; S !== null;) {
                        var P = Vu(S);
                        if (P !== null && UE(P), P = Vv(s, a, f, h), P === null && n0(s, a, h, Tp, f), P === S) break;
                        S = P
                    }
                    S !== null && h.stopPropagation()
                } else n0(s, a, h, null, f)
            }
        }

        var Tp = null;

        function Vv(s, a, f, h) {
            if (Tp = null, s = Qt(h), s = ca(s), s !== null) if (a = la(s), a === null) s = null; else if (f = a.tag, f === 13) {
                if (s = RE(a), s !== null) return s;
                s = null
            } else if (f === 3) {
                if (a.stateNode.current.memoizedState.isDehydrated) return a.tag === 3 ? a.stateNode.containerInfo : null;
                s = null
            } else a !== s && (s = null);
            return Tp = s, null
        }

        function ZE(s) {
            switch (s) {
                case"cancel":
                case"click":
                case"close":
                case"contextmenu":
                case"copy":
                case"cut":
                case"auxclick":
                case"dblclick":
                case"dragend":
                case"dragstart":
                case"drop":
                case"focusin":
                case"focusout":
                case"input":
                case"invalid":
                case"keydown":
                case"keypress":
                case"keyup":
                case"mousedown":
                case"mouseup":
                case"paste":
                case"pause":
                case"play":
                case"pointercancel":
                case"pointerdown":
                case"pointerup":
                case"ratechange":
                case"reset":
                case"resize":
                case"seeked":
                case"submit":
                case"touchcancel":
                case"touchend":
                case"touchstart":
                case"volumechange":
                case"change":
                case"selectionchange":
                case"textInput":
                case"compositionstart":
                case"compositionend":
                case"compositionupdate":
                case"beforeblur":
                case"afterblur":
                case"beforeinput":
                case"blur":
                case"fullscreenchange":
                case"focus":
                case"hashchange":
                case"popstate":
                case"select":
                case"selectstart":
                    return 1;
                case"drag":
                case"dragenter":
                case"dragexit":
                case"dragleave":
                case"dragover":
                case"mousemove":
                case"mouseout":
                case"mouseover":
                case"pointermove":
                case"pointerout":
                case"pointerover":
                case"scroll":
                case"toggle":
                case"touchmove":
                case"wheel":
                case"mouseenter":
                case"mouseleave":
                case"pointerenter":
                case"pointerleave":
                    return 4;
                case"message":
                    switch (NB()) {
                        case Mv:
                            return 1;
                        case HE:
                            return 4;
                        case wp:
                        case $B:
                            return 16;
                        case FE:
                            return 536870912;
                        default:
                            return 16
                    }
                default:
                    return 16
            }
        }

        var yi = null, Hv = null, Op = null;

        function JE() {
            if (Op) return Op;
            var s, a = Hv, f = a.length, h, S = "value" in yi ? yi.value : yi.textContent, P = S.length;
            for (s = 0; s < f && a[s] === S[s]; s++) ;
            var L = f - s;
            for (h = 1; h <= L && a[f - h] === S[P - h]; h++) ;
            return Op = S.slice(s, 1 < h ? 1 - h : void 0)
        }

        function Lp(s) {
            var a = s.keyCode;
            return "charCode" in s ? (s = s.charCode, s === 0 && a === 13 && (s = 13)) : s = a, s === 10 && (s = 13), 32 <= s || s === 13 ? s : 0
        }

        function Mp() {
            return !0
        }

        function QE() {
            return !1
        }

        function Lr(s) {
            function a(f, h, S, P, L) {
                this._reactName = f, this._targetInst = S, this.type = h, this.nativeEvent = P, this.target = L, this.currentTarget = null;
                for (var G in s) s.hasOwnProperty(G) && (f = s[G], this[G] = f ? f(P) : P[G]);
                return this.isDefaultPrevented = (P.defaultPrevented != null ? P.defaultPrevented : P.returnValue === !1) ? Mp : QE, this.isPropagationStopped = QE, this
            }

            return D(a.prototype, {
                preventDefault: function () {
                    this.defaultPrevented = !0;
                    var f = this.nativeEvent;
                    f && (f.preventDefault ? f.preventDefault() : typeof f.returnValue != "unknown" && (f.returnValue = !1), this.isDefaultPrevented = Mp)
                }, stopPropagation: function () {
                    var f = this.nativeEvent;
                    f && (f.stopPropagation ? f.stopPropagation() : typeof f.cancelBubble != "unknown" && (f.cancelBubble = !0), this.isPropagationStopped = Mp)
                }, persist: function () {
                }, isPersistent: Mp
            }), a
        }

        var xl = {
                eventPhase: 0, bubbles: 0, cancelable: 0, timeStamp: function (s) {
                    return s.timeStamp || Date.now()
                }, defaultPrevented: 0, isTrusted: 0
            }, Fv = Lr(xl), ku = D({}, xl, {view: 0, detail: 0}), YB = Lr(ku), zv, Bv, Tu, Ap = D({}, ku, {
                screenX: 0,
                screenY: 0,
                clientX: 0,
                clientY: 0,
                pageX: 0,
                pageY: 0,
                ctrlKey: 0,
                shiftKey: 0,
                altKey: 0,
                metaKey: 0,
                getModifierState: Wv,
                button: 0,
                buttons: 0,
                relatedTarget: function (s) {
                    return s.relatedTarget === void 0 ? s.fromElement === s.srcElement ? s.toElement : s.fromElement : s.relatedTarget
                },
                movementX: function (s) {
                    return "movementX" in s ? s.movementX : (s !== Tu && (Tu && s.type === "mousemove" ? (zv = s.screenX - Tu.screenX, Bv = s.screenY - Tu.screenY) : Bv = zv = 0, Tu = s), zv)
                },
                movementY: function (s) {
                    return "movementY" in s ? s.movementY : Bv
                }
            }), e5 = Lr(Ap), XB = D({}, Ap, {dataTransfer: 0}), ZB = Lr(XB), JB = D({}, ku, {relatedTarget: 0}),
            Uv = Lr(JB), QB = D({}, xl, {animationName: 0, elapsedTime: 0, pseudoElement: 0}), eU = Lr(QB),
            tU = D({}, xl, {
                clipboardData: function (s) {
                    return "clipboardData" in s ? s.clipboardData : window.clipboardData
                }
            }), nU = Lr(tU), rU = D({}, xl, {data: 0}), t5 = Lr(rU), oU = {
                Esc: "Escape",
                Spacebar: " ",
                Left: "ArrowLeft",
                Up: "ArrowUp",
                Right: "ArrowRight",
                Down: "ArrowDown",
                Del: "Delete",
                Win: "OS",
                Menu: "ContextMenu",
                Apps: "ContextMenu",
                Scroll: "ScrollLock",
                MozPrintableKey: "Unidentified"
            }, sU = {
                8: "Backspace",
                9: "Tab",
                12: "Clear",
                13: "Enter",
                16: "Shift",
                17: "Control",
                18: "Alt",
                19: "Pause",
                20: "CapsLock",
                27: "Escape",
                32: " ",
                33: "PageUp",
                34: "PageDown",
                35: "End",
                36: "Home",
                37: "ArrowLeft",
                38: "ArrowUp",
                39: "ArrowRight",
                40: "ArrowDown",
                45: "Insert",
                46: "Delete",
                112: "F1",
                113: "F2",
                114: "F3",
                115: "F4",
                116: "F5",
                117: "F6",
                118: "F7",
                119: "F8",
                120: "F9",
                121: "F10",
                122: "F11",
                123: "F12",
                144: "NumLock",
                145: "ScrollLock",
                224: "Meta"
            }, iU = {Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey"};

        function aU(s) {
            var a = this.nativeEvent;
            return a.getModifierState ? a.getModifierState(s) : (s = iU[s]) ? !!a[s] : !1
        }

        function Wv() {
            return aU
        }

        var lU = D({}, ku, {
                key: function (s) {
                    if (s.key) {
                        var a = oU[s.key] || s.key;
                        if (a !== "Unidentified") return a
                    }
                    return s.type === "keypress" ? (s = Lp(s), s === 13 ? "Enter" : String.fromCharCode(s)) : s.type === "keydown" || s.type === "keyup" ? sU[s.keyCode] || "Unidentified" : ""
                },
                code: 0,
                location: 0,
                ctrlKey: 0,
                shiftKey: 0,
                altKey: 0,
                metaKey: 0,
                repeat: 0,
                locale: 0,
                getModifierState: Wv,
                charCode: function (s) {
                    return s.type === "keypress" ? Lp(s) : 0
                },
                keyCode: function (s) {
                    return s.type === "keydown" || s.type === "keyup" ? s.keyCode : 0
                },
                which: function (s) {
                    return s.type === "keypress" ? Lp(s) : s.type === "keydown" || s.type === "keyup" ? s.keyCode : 0
                }
            }), cU = Lr(lU), uU = D({}, Ap, {
                pointerId: 0,
                width: 0,
                height: 0,
                pressure: 0,
                tangentialPressure: 0,
                tiltX: 0,
                tiltY: 0,
                twist: 0,
                pointerType: 0,
                isPrimary: 0
            }), n5 = Lr(uU), dU = D({}, ku, {
                touches: 0,
                targetTouches: 0,
                changedTouches: 0,
                altKey: 0,
                metaKey: 0,
                ctrlKey: 0,
                shiftKey: 0,
                getModifierState: Wv
            }), fU = Lr(dU), pU = D({}, xl, {propertyName: 0, elapsedTime: 0, pseudoElement: 0}), gU = Lr(pU),
            hU = D({}, Ap, {
                deltaX: function (s) {
                    return "deltaX" in s ? s.deltaX : "wheelDeltaX" in s ? -s.wheelDeltaX : 0
                }, deltaY: function (s) {
                    return "deltaY" in s ? s.deltaY : "wheelDeltaY" in s ? -s.wheelDeltaY : "wheelDelta" in s ? -s.wheelDelta : 0
                }, deltaZ: 0, deltaMode: 0
            }), mU = Lr(hU), vU = [9, 13, 27, 32], Gv = c && "CompositionEvent" in window, Ou = null;
        c && "documentMode" in document && (Ou = document.documentMode);
        var yU = c && "TextEvent" in window && !Ou, r5 = c && (!Gv || Ou && 8 < Ou && 11 >= Ou),
            o5 = String.fromCharCode(32), s5 = !1;

        function i5(s, a) {
            switch (s) {
                case"keyup":
                    return vU.indexOf(a.keyCode) !== -1;
                case"keydown":
                    return a.keyCode !== 229;
                case"keypress":
                case"mousedown":
                case"focusout":
                    return !0;
                default:
                    return !1
            }
        }

        function a5(s) {
            return s = s.detail, typeof s == "object" && "data" in s ? s.data : null
        }

        var wl = !1;

        function bU(s, a) {
            switch (s) {
                case"compositionend":
                    return a5(a);
                case"keypress":
                    return a.which !== 32 ? null : (s5 = !0, o5);
                case"textInput":
                    return s = a.data, s === o5 && s5 ? null : s;
                default:
                    return null
            }
        }

        function xU(s, a) {
            if (wl) return s === "compositionend" || !Gv && i5(s, a) ? (s = JE(), Op = Hv = yi = null, wl = !1, s) : null;
            switch (s) {
                case"paste":
                    return null;
                case"keypress":
                    if (!(a.ctrlKey || a.altKey || a.metaKey) || a.ctrlKey && a.altKey) {
                        if (a.char && 1 < a.char.length) return a.char;
                        if (a.which) return String.fromCharCode(a.which)
                    }
                    return null;
                case"compositionend":
                    return r5 && a.locale !== "ko" ? null : a.data;
                default:
                    return null
            }
        }

        var wU = {
            color: !0,
            date: !0,
            datetime: !0,
            "datetime-local": !0,
            email: !0,
            month: !0,
            number: !0,
            password: !0,
            range: !0,
            search: !0,
            tel: !0,
            text: !0,
            time: !0,
            url: !0,
            week: !0
        };

        function l5(s) {
            var a = s && s.nodeName && s.nodeName.toLowerCase();
            return a === "input" ? !!wU[s.type] : a === "textarea"
        }

        function c5(s, a, f, h) {
            Qr(h), a = Ip(a, "onChange"), 0 < a.length && (f = new Fv("onChange", "change", null, f, h), s.push({
                event: f,
                listeners: a
            }))
        }

        var Lu = null, Mu = null;

        function SU(s) {
            _5(s, 0)
        }

        function Rp(s) {
            var a = Pl(s);
            if (Ie(a)) return s
        }

        function jU(s, a) {
            if (s === "change") return a
        }

        var u5 = !1;
        if (c) {
            var Kv;
            if (c) {
                var qv = "oninput" in document;
                if (!qv) {
                    var d5 = document.createElement("div");
                    d5.setAttribute("oninput", "return;"), qv = typeof d5.oninput == "function"
                }
                Kv = qv
            } else Kv = !1;
            u5 = Kv && (!document.documentMode || 9 < document.documentMode)
        }

        function f5() {
            Lu && (Lu.detachEvent("onpropertychange", p5), Mu = Lu = null)
        }

        function p5(s) {
            if (s.propertyName === "value" && Rp(Mu)) {
                var a = [];
                c5(a, Mu, s, Qt(s)), Me(SU, a)
            }
        }

        function CU(s, a, f) {
            s === "focusin" ? (f5(), Lu = a, Mu = f, Lu.attachEvent("onpropertychange", p5)) : s === "focusout" && f5()
        }

        function EU(s) {
            if (s === "selectionchange" || s === "keyup" || s === "keydown") return Rp(Mu)
        }

        function PU(s, a) {
            if (s === "click") return Rp(a)
        }

        function _U(s, a) {
            if (s === "input" || s === "change") return Rp(a)
        }

        function kU(s, a) {
            return s === a && (s !== 0 || 1 / s === 1 / a) || s !== s && a !== a
        }

        var Po = typeof Object.is == "function" ? Object.is : kU;

        function Au(s, a) {
            if (Po(s, a)) return !0;
            if (typeof s != "object" || s === null || typeof a != "object" || a === null) return !1;
            var f = Object.keys(s), h = Object.keys(a);
            if (f.length !== h.length) return !1;
            for (h = 0; h < f.length; h++) {
                var S = f[h];
                if (!d.call(a, S) || !Po(s[S], a[S])) return !1
            }
            return !0
        }

        function g5(s) {
            for (; s && s.firstChild;) s = s.firstChild;
            return s
        }

        function h5(s, a) {
            var f = g5(s);
            s = 0;
            for (var h; f;) {
                if (f.nodeType === 3) {
                    if (h = s + f.textContent.length, s <= a && h >= a) return {node: f, offset: a - s};
                    s = h
                }
                e:{
                    for (; f;) {
                        if (f.nextSibling) {
                            f = f.nextSibling;
                            break e
                        }
                        f = f.parentNode
                    }
                    f = void 0
                }
                f = g5(f)
            }
        }

        function m5(s, a) {
            return s && a ? s === a ? !0 : s && s.nodeType === 3 ? !1 : a && a.nodeType === 3 ? m5(s, a.parentNode) : "contains" in s ? s.contains(a) : s.compareDocumentPosition ? !!(s.compareDocumentPosition(a) & 16) : !1 : !1
        }

        function v5() {
            for (var s = window, a = He(); a instanceof s.HTMLIFrameElement;) {
                try {
                    var f = typeof a.contentWindow.location.href == "string"
                } catch {
                    f = !1
                }
                if (f) s = a.contentWindow; else break;
                a = He(s.document)
            }
            return a
        }

        function Yv(s) {
            var a = s && s.nodeName && s.nodeName.toLowerCase();
            return a && (a === "input" && (s.type === "text" || s.type === "search" || s.type === "tel" || s.type === "url" || s.type === "password") || a === "textarea" || s.contentEditable === "true")
        }

        function TU(s) {
            var a = v5(), f = s.focusedElem, h = s.selectionRange;
            if (a !== f && f && f.ownerDocument && m5(f.ownerDocument.documentElement, f)) {
                if (h !== null && Yv(f)) {
                    if (a = h.start, s = h.end, s === void 0 && (s = a), "selectionStart" in f) f.selectionStart = a, f.selectionEnd = Math.min(s, f.value.length); else if (s = (a = f.ownerDocument || document) && a.defaultView || window, s.getSelection) {
                        s = s.getSelection();
                        var S = f.textContent.length, P = Math.min(h.start, S);
                        h = h.end === void 0 ? P : Math.min(h.end, S), !s.extend && P > h && (S = h, h = P, P = S), S = h5(f, P);
                        var L = h5(f, h);
                        S && L && (s.rangeCount !== 1 || s.anchorNode !== S.node || s.anchorOffset !== S.offset || s.focusNode !== L.node || s.focusOffset !== L.offset) && (a = a.createRange(), a.setStart(S.node, S.offset), s.removeAllRanges(), P > h ? (s.addRange(a), s.extend(L.node, L.offset)) : (a.setEnd(L.node, L.offset), s.addRange(a)))
                    }
                }
                for (a = [], s = f; s = s.parentNode;) s.nodeType === 1 && a.push({
                    element: s,
                    left: s.scrollLeft,
                    top: s.scrollTop
                });
                for (typeof f.focus == "function" && f.focus(), f = 0; f < a.length; f++) s = a[f], s.element.scrollLeft = s.left, s.element.scrollTop = s.top
            }
        }

        var OU = c && "documentMode" in document && 11 >= document.documentMode, Sl = null, Xv = null, Ru = null,
            Zv = !1;

        function y5(s, a, f) {
            var h = f.window === f ? f.document : f.nodeType === 9 ? f : f.ownerDocument;
            Zv || Sl == null || Sl !== He(h) || (h = Sl, "selectionStart" in h && Yv(h) ? h = {
                start: h.selectionStart,
                end: h.selectionEnd
            } : (h = (h.ownerDocument && h.ownerDocument.defaultView || window).getSelection(), h = {
                anchorNode: h.anchorNode,
                anchorOffset: h.anchorOffset,
                focusNode: h.focusNode,
                focusOffset: h.focusOffset
            }), Ru && Au(Ru, h) || (Ru = h, h = Ip(Xv, "onSelect"), 0 < h.length && (a = new Fv("onSelect", "select", null, a, f), s.push({
                event: a,
                listeners: h
            }), a.target = Sl)))
        }

        function Np(s, a) {
            var f = {};
            return f[s.toLowerCase()] = a.toLowerCase(), f["Webkit" + s] = "webkit" + a, f["Moz" + s] = "moz" + a, f
        }

        var jl = {
            animationend: Np("Animation", "AnimationEnd"),
            animationiteration: Np("Animation", "AnimationIteration"),
            animationstart: Np("Animation", "AnimationStart"),
            transitionend: Np("Transition", "TransitionEnd")
        }, Jv = {}, b5 = {};
        c && (b5 = document.createElement("div").style, "AnimationEvent" in window || (delete jl.animationend.animation, delete jl.animationiteration.animation, delete jl.animationstart.animation), "TransitionEvent" in window || delete jl.transitionend.transition);

        function $p(s) {
            if (Jv[s]) return Jv[s];
            if (!jl[s]) return s;
            var a = jl[s], f;
            for (f in a) if (a.hasOwnProperty(f) && f in b5) return Jv[s] = a[f];
            return s
        }

        var x5 = $p("animationend"), w5 = $p("animationiteration"), S5 = $p("animationstart"), j5 = $p("transitionend"),
            C5 = new Map,
            E5 = "abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");

        function bi(s, a) {
            C5.set(s, a), i(a, [s])
        }

        for (var Qv = 0; Qv < E5.length; Qv++) {
            var e0 = E5[Qv], LU = e0.toLowerCase(), MU = e0[0].toUpperCase() + e0.slice(1);
            bi(LU, "on" + MU)
        }
        bi(x5, "onAnimationEnd"), bi(w5, "onAnimationIteration"), bi(S5, "onAnimationStart"), bi("dblclick", "onDoubleClick"), bi("focusin", "onFocus"), bi("focusout", "onBlur"), bi(j5, "onTransitionEnd"), l("onMouseEnter", ["mouseout", "mouseover"]), l("onMouseLeave", ["mouseout", "mouseover"]), l("onPointerEnter", ["pointerout", "pointerover"]), l("onPointerLeave", ["pointerout", "pointerover"]), i("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" ")), i("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")), i("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]), i("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" ")), i("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" ")), i("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" "));
        var Nu = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),
            AU = new Set("cancel close invalid load scroll toggle".split(" ").concat(Nu));

        function P5(s, a, f) {
            var h = s.type || "unknown-event";
            s.currentTarget = f, LB(h, a, void 0, s), s.currentTarget = null
        }

        function _5(s, a) {
            a = (a & 4) !== 0;
            for (var f = 0; f < s.length; f++) {
                var h = s[f], S = h.event;
                h = h.listeners;
                e:{
                    var P = void 0;
                    if (a) for (var L = h.length - 1; 0 <= L; L--) {
                        var G = h[L], Y = G.instance, le = G.currentTarget;
                        if (G = G.listener, Y !== P && S.isPropagationStopped()) break e;
                        P5(S, G, le), P = Y
                    } else for (L = 0; L < h.length; L++) {
                        if (G = h[L], Y = G.instance, le = G.currentTarget, G = G.listener, Y !== P && S.isPropagationStopped()) break e;
                        P5(S, G, le), P = Y
                    }
                }
            }
            if (xp) throw s = Lv, xp = !1, Lv = null, s
        }

        function Wt(s, a) {
            var f = a[l0];
            f === void 0 && (f = a[l0] = new Set);
            var h = s + "__bubble";
            f.has(h) || (k5(a, s, 2, !1), f.add(h))
        }

        function t0(s, a, f) {
            var h = 0;
            a && (h |= 4), k5(f, s, h, a)
        }

        var Dp = "_reactListening" + Math.random().toString(36).slice(2);

        function $u(s) {
            if (!s[Dp]) {
                s[Dp] = !0, r.forEach(function (f) {
                    f !== "selectionchange" && (AU.has(f) || t0(f, !1, s), t0(f, !0, s))
                });
                var a = s.nodeType === 9 ? s : s.ownerDocument;
                a === null || a[Dp] || (a[Dp] = !0, t0("selectionchange", !1, a))
            }
        }

        function k5(s, a, f, h) {
            switch (ZE(a)) {
                case 1:
                    var S = KB;
                    break;
                case 4:
                    S = qB;
                    break;
                default:
                    S = Iv
            }
            f = S.bind(null, a, f, s), S = void 0, !In || a !== "touchstart" && a !== "touchmove" && a !== "wheel" || (S = !0), h ? S !== void 0 ? s.addEventListener(a, f, {
                capture: !0,
                passive: S
            }) : s.addEventListener(a, f, !0) : S !== void 0 ? s.addEventListener(a, f, {passive: S}) : s.addEventListener(a, f, !1)
        }

        function n0(s, a, f, h, S) {
            var P = h;
            if (!(a & 1) && !(a & 2) && h !== null) e:for (; ;) {
                if (h === null) return;
                var L = h.tag;
                if (L === 3 || L === 4) {
                    var G = h.stateNode.containerInfo;
                    if (G === S || G.nodeType === 8 && G.parentNode === S) break;
                    if (L === 4) for (L = h.return; L !== null;) {
                        var Y = L.tag;
                        if ((Y === 3 || Y === 4) && (Y = L.stateNode.containerInfo, Y === S || Y.nodeType === 8 && Y.parentNode === S)) return;
                        L = L.return
                    }
                    for (; G !== null;) {
                        if (L = ca(G), L === null) return;
                        if (Y = L.tag, Y === 5 || Y === 6) {
                            h = P = L;
                            continue e
                        }
                        G = G.parentNode
                    }
                }
                h = h.return
            }
            Me(function () {
                var le = P, Se = Qt(f), Ce = [];
                e:{
                    var we = C5.get(s);
                    if (we !== void 0) {
                        var Oe = Fv, Re = s;
                        switch (s) {
                            case"keypress":
                                if (Lp(f) === 0) break e;
                            case"keydown":
                            case"keyup":
                                Oe = cU;
                                break;
                            case"focusin":
                                Re = "focus", Oe = Uv;
                                break;
                            case"focusout":
                                Re = "blur", Oe = Uv;
                                break;
                            case"beforeblur":
                            case"afterblur":
                                Oe = Uv;
                                break;
                            case"click":
                                if (f.button === 2) break e;
                            case"auxclick":
                            case"dblclick":
                            case"mousedown":
                            case"mousemove":
                            case"mouseup":
                            case"mouseout":
                            case"mouseover":
                            case"contextmenu":
                                Oe = e5;
                                break;
                            case"drag":
                            case"dragend":
                            case"dragenter":
                            case"dragexit":
                            case"dragleave":
                            case"dragover":
                            case"dragstart":
                            case"drop":
                                Oe = ZB;
                                break;
                            case"touchcancel":
                            case"touchend":
                            case"touchmove":
                            case"touchstart":
                                Oe = fU;
                                break;
                            case x5:
                            case w5:
                            case S5:
                                Oe = eU;
                                break;
                            case j5:
                                Oe = gU;
                                break;
                            case"scroll":
                                Oe = YB;
                                break;
                            case"wheel":
                                Oe = mU;
                                break;
                            case"copy":
                            case"cut":
                            case"paste":
                                Oe = nU;
                                break;
                            case"gotpointercapture":
                            case"lostpointercapture":
                            case"pointercancel":
                            case"pointerdown":
                            case"pointermove":
                            case"pointerout":
                            case"pointerover":
                            case"pointerup":
                                Oe = n5
                        }
                        var Ne = (a & 4) !== 0, un = !Ne && s === "scroll",
                            re = Ne ? we !== null ? we + "Capture" : null : we;
                        Ne = [];
                        for (var J = le, oe; J !== null;) {
                            oe = J;
                            var Pe = oe.stateNode;
                            if (oe.tag === 5 && Pe !== null && (oe = Pe, re !== null && (Pe = We(J, re), Pe != null && Ne.push(Du(J, Pe, oe)))), un) break;
                            J = J.return
                        }
                        0 < Ne.length && (we = new Oe(we, Re, null, f, Se), Ce.push({event: we, listeners: Ne}))
                    }
                }
                if (!(a & 7)) {
                    e:{
                        if (we = s === "mouseover" || s === "pointerover", Oe = s === "mouseout" || s === "pointerout", we && f !== it && (Re = f.relatedTarget || f.fromElement) && (ca(Re) || Re[Ms])) break e;
                        if ((Oe || we) && (we = Se.window === Se ? Se : (we = Se.ownerDocument) ? we.defaultView || we.parentWindow : window, Oe ? (Re = f.relatedTarget || f.toElement, Oe = le, Re = Re ? ca(Re) : null, Re !== null && (un = la(Re), Re !== un || Re.tag !== 5 && Re.tag !== 6) && (Re = null)) : (Oe = null, Re = le), Oe !== Re)) {
                            if (Ne = e5, Pe = "onMouseLeave", re = "onMouseEnter", J = "mouse", (s === "pointerout" || s === "pointerover") && (Ne = n5, Pe = "onPointerLeave", re = "onPointerEnter", J = "pointer"), un = Oe == null ? we : Pl(Oe), oe = Re == null ? we : Pl(Re), we = new Ne(Pe, J + "leave", Oe, f, Se), we.target = un, we.relatedTarget = oe, Pe = null, ca(Se) === le && (Ne = new Ne(re, J + "enter", Re, f, Se), Ne.target = oe, Ne.relatedTarget = un, Pe = Ne), un = Pe, Oe && Re) t:{
                                for (Ne = Oe, re = Re, J = 0, oe = Ne; oe; oe = Cl(oe)) J++;
                                for (oe = 0, Pe = re; Pe; Pe = Cl(Pe)) oe++;
                                for (; 0 < J - oe;) Ne = Cl(Ne), J--;
                                for (; 0 < oe - J;) re = Cl(re), oe--;
                                for (; J--;) {
                                    if (Ne === re || re !== null && Ne === re.alternate) break t;
                                    Ne = Cl(Ne), re = Cl(re)
                                }
                                Ne = null
                            } else Ne = null;
                            Oe !== null && T5(Ce, we, Oe, Ne, !1), Re !== null && un !== null && T5(Ce, un, Re, Ne, !0)
                        }
                    }
                    e:{
                        if (we = le ? Pl(le) : window, Oe = we.nodeName && we.nodeName.toLowerCase(), Oe === "select" || Oe === "input" && we.type === "file") var Ve = jU; else if (l5(we)) if (u5) Ve = _U; else {
                            Ve = EU;
                            var Fe = CU
                        } else (Oe = we.nodeName) && Oe.toLowerCase() === "input" && (we.type === "checkbox" || we.type === "radio") && (Ve = PU);
                        if (Ve && (Ve = Ve(s, le))) {
                            c5(Ce, Ve, f, Se);
                            break e
                        }
                        Fe && Fe(s, we, le), s === "focusout" && (Fe = we._wrapperState) && Fe.controlled && we.type === "number" && Sn(we, "number", we.value)
                    }
                    switch (Fe = le ? Pl(le) : window, s) {
                        case"focusin":
                            (l5(Fe) || Fe.contentEditable === "true") && (Sl = Fe, Xv = le, Ru = null);
                            break;
                        case"focusout":
                            Ru = Xv = Sl = null;
                            break;
                        case"mousedown":
                            Zv = !0;
                            break;
                        case"contextmenu":
                        case"mouseup":
                        case"dragend":
                            Zv = !1, y5(Ce, f, Se);
                            break;
                        case"selectionchange":
                            if (OU) break;
                        case"keydown":
                        case"keyup":
                            y5(Ce, f, Se)
                    }
                    var ze;
                    if (Gv) e:{
                        switch (s) {
                            case"compositionstart":
                                var Ge = "onCompositionStart";
                                break e;
                            case"compositionend":
                                Ge = "onCompositionEnd";
                                break e;
                            case"compositionupdate":
                                Ge = "onCompositionUpdate";
                                break e
                        }
                        Ge = void 0
                    } else wl ? i5(s, f) && (Ge = "onCompositionEnd") : s === "keydown" && f.keyCode === 229 && (Ge = "onCompositionStart");
                    Ge && (r5 && f.locale !== "ko" && (wl || Ge !== "onCompositionStart" ? Ge === "onCompositionEnd" && wl && (ze = JE()) : (yi = Se, Hv = "value" in yi ? yi.value : yi.textContent, wl = !0)), Fe = Ip(le, Ge), 0 < Fe.length && (Ge = new t5(Ge, s, null, f, Se), Ce.push({
                        event: Ge,
                        listeners: Fe
                    }), ze ? Ge.data = ze : (ze = a5(f), ze !== null && (Ge.data = ze)))), (ze = yU ? bU(s, f) : xU(s, f)) && (le = Ip(le, "onBeforeInput"), 0 < le.length && (Se = new t5("onBeforeInput", "beforeinput", null, f, Se), Ce.push({
                        event: Se,
                        listeners: le
                    }), Se.data = ze))
                }
                _5(Ce, a)
            })
        }

        function Du(s, a, f) {
            return {instance: s, listener: a, currentTarget: f}
        }

        function Ip(s, a) {
            for (var f = a + "Capture", h = []; s !== null;) {
                var S = s, P = S.stateNode;
                S.tag === 5 && P !== null && (S = P, P = We(s, f), P != null && h.unshift(Du(s, P, S)), P = We(s, a), P != null && h.push(Du(s, P, S))), s = s.return
            }
            return h
        }

        function Cl(s) {
            if (s === null) return null;
            do s = s.return; while (s && s.tag !== 5);
            return s || null
        }

        function T5(s, a, f, h, S) {
            for (var P = a._reactName, L = []; f !== null && f !== h;) {
                var G = f, Y = G.alternate, le = G.stateNode;
                if (Y !== null && Y === h) break;
                G.tag === 5 && le !== null && (G = le, S ? (Y = We(f, P), Y != null && L.unshift(Du(f, Y, G))) : S || (Y = We(f, P), Y != null && L.push(Du(f, Y, G)))), f = f.return
            }
            L.length !== 0 && s.push({event: a, listeners: L})
        }

        var RU = /\r\n?/g, NU = /\u0000|\uFFFD/g;

        function O5(s) {
            return (typeof s == "string" ? s : "" + s).replace(RU, `
`).replace(NU, "")
        }

        function Vp(s, a, f) {
            if (a = O5(a), O5(s) !== a && f) throw Error(n(425))
        }

        function Hp() {
        }

        var r0 = null, o0 = null;

        function s0(s, a) {
            return s === "textarea" || s === "noscript" || typeof a.children == "string" || typeof a.children == "number" || typeof a.dangerouslySetInnerHTML == "object" && a.dangerouslySetInnerHTML !== null && a.dangerouslySetInnerHTML.__html != null
        }

        var i0 = typeof setTimeout == "function" ? setTimeout : void 0,
            $U = typeof clearTimeout == "function" ? clearTimeout : void 0,
            L5 = typeof Promise == "function" ? Promise : void 0,
            DU = typeof queueMicrotask == "function" ? queueMicrotask : typeof L5 < "u" ? function (s) {
                return L5.resolve(null).then(s).catch(IU)
            } : i0;

        function IU(s) {
            setTimeout(function () {
                throw s
            })
        }

        function a0(s, a) {
            var f = a, h = 0;
            do {
                var S = f.nextSibling;
                if (s.removeChild(f), S && S.nodeType === 8) if (f = S.data, f === "/$") {
                    if (h === 0) {
                        s.removeChild(S), _u(a);
                        return
                    }
                    h--
                } else f !== "$" && f !== "$?" && f !== "$!" || h++;
                f = S
            } while (f);
            _u(a)
        }

        function xi(s) {
            for (; s != null; s = s.nextSibling) {
                var a = s.nodeType;
                if (a === 1 || a === 3) break;
                if (a === 8) {
                    if (a = s.data, a === "$" || a === "$!" || a === "$?") break;
                    if (a === "/$") return null
                }
            }
            return s
        }

        function M5(s) {
            s = s.previousSibling;
            for (var a = 0; s;) {
                if (s.nodeType === 8) {
                    var f = s.data;
                    if (f === "$" || f === "$!" || f === "$?") {
                        if (a === 0) return s;
                        a--
                    } else f === "/$" && a++
                }
                s = s.previousSibling
            }
            return null
        }

        var El = Math.random().toString(36).slice(2), os = "__reactFiber$" + El, Iu = "__reactProps$" + El,
            Ms = "__reactContainer$" + El, l0 = "__reactEvents$" + El, VU = "__reactListeners$" + El,
            HU = "__reactHandles$" + El;

        function ca(s) {
            var a = s[os];
            if (a) return a;
            for (var f = s.parentNode; f;) {
                if (a = f[Ms] || f[os]) {
                    if (f = a.alternate, a.child !== null || f !== null && f.child !== null) for (s = M5(s); s !== null;) {
                        if (f = s[os]) return f;
                        s = M5(s)
                    }
                    return a
                }
                s = f, f = s.parentNode
            }
            return null
        }

        function Vu(s) {
            return s = s[os] || s[Ms], !s || s.tag !== 5 && s.tag !== 6 && s.tag !== 13 && s.tag !== 3 ? null : s
        }

        function Pl(s) {
            if (s.tag === 5 || s.tag === 6) return s.stateNode;
            throw Error(n(33))
        }

        function Fp(s) {
            return s[Iu] || null
        }

        var c0 = [], _l = -1;

        function wi(s) {
            return {current: s}
        }

        function Gt(s) {
            0 > _l || (s.current = c0[_l], c0[_l] = null, _l--)
        }

        function Ft(s, a) {
            _l++, c0[_l] = s.current, s.current = a
        }

        var Si = {}, Vn = wi(Si), dr = wi(!1), ua = Si;

        function kl(s, a) {
            var f = s.type.contextTypes;
            if (!f) return Si;
            var h = s.stateNode;
            if (h && h.__reactInternalMemoizedUnmaskedChildContext === a) return h.__reactInternalMemoizedMaskedChildContext;
            var S = {}, P;
            for (P in f) S[P] = a[P];
            return h && (s = s.stateNode, s.__reactInternalMemoizedUnmaskedChildContext = a, s.__reactInternalMemoizedMaskedChildContext = S), S
        }

        function fr(s) {
            return s = s.childContextTypes, s != null
        }

        function zp() {
            Gt(dr), Gt(Vn)
        }

        function A5(s, a, f) {
            if (Vn.current !== Si) throw Error(n(168));
            Ft(Vn, a), Ft(dr, f)
        }

        function R5(s, a, f) {
            var h = s.stateNode;
            if (a = a.childContextTypes, typeof h.getChildContext != "function") return f;
            h = h.getChildContext();
            for (var S in h) if (!(S in a)) throw Error(n(108, ae(s) || "Unknown", S));
            return D({}, f, h)
        }

        function Bp(s) {
            return s = (s = s.stateNode) && s.__reactInternalMemoizedMergedChildContext || Si, ua = Vn.current, Ft(Vn, s), Ft(dr, dr.current), !0
        }

        function N5(s, a, f) {
            var h = s.stateNode;
            if (!h) throw Error(n(169));
            f ? (s = R5(s, a, ua), h.__reactInternalMemoizedMergedChildContext = s, Gt(dr), Gt(Vn), Ft(Vn, s)) : Gt(dr), Ft(dr, f)
        }

        var As = null, Up = !1, u0 = !1;

        function $5(s) {
            As === null ? As = [s] : As.push(s)
        }

        function FU(s) {
            Up = !0, $5(s)
        }

        function ji() {
            if (!u0 && As !== null) {
                u0 = !0;
                var s = 0, a = Ot;
                try {
                    var f = As;
                    for (Ot = 1; s < f.length; s++) {
                        var h = f[s];
                        do h = h(!0); while (h !== null)
                    }
                    As = null, Up = !1
                } catch (S) {
                    throw As !== null && (As = As.slice(s + 1)), IE(Mv, ji), S
                } finally {
                    Ot = a, u0 = !1
                }
            }
            return null
        }

        var Tl = [], Ol = 0, Wp = null, Gp = 0, eo = [], to = 0, da = null, Rs = 1, Ns = "";

        function fa(s, a) {
            Tl[Ol++] = Gp, Tl[Ol++] = Wp, Wp = s, Gp = a
        }

        function D5(s, a, f) {
            eo[to++] = Rs, eo[to++] = Ns, eo[to++] = da, da = s;
            var h = Rs;
            s = Ns;
            var S = 32 - Eo(h) - 1;
            h &= ~(1 << S), f += 1;
            var P = 32 - Eo(a) + S;
            if (30 < P) {
                var L = S - S % 5;
                P = (h & (1 << L) - 1).toString(32), h >>= L, S -= L, Rs = 1 << 32 - Eo(a) + S | f << S | h, Ns = P + s
            } else Rs = 1 << P | f << S | h, Ns = s
        }

        function d0(s) {
            s.return !== null && (fa(s, 1), D5(s, 1, 0))
        }

        function f0(s) {
            for (; s === Wp;) Wp = Tl[--Ol], Tl[Ol] = null, Gp = Tl[--Ol], Tl[Ol] = null;
            for (; s === da;) da = eo[--to], eo[to] = null, Ns = eo[--to], eo[to] = null, Rs = eo[--to], eo[to] = null
        }

        var Mr = null, Ar = null, Yt = !1, _o = null;

        function I5(s, a) {
            var f = so(5, null, null, 0);
            f.elementType = "DELETED", f.stateNode = a, f.return = s, a = s.deletions, a === null ? (s.deletions = [f], s.flags |= 16) : a.push(f)
        }

        function V5(s, a) {
            switch (s.tag) {
                case 5:
                    var f = s.type;
                    return a = a.nodeType !== 1 || f.toLowerCase() !== a.nodeName.toLowerCase() ? null : a, a !== null ? (s.stateNode = a, Mr = s, Ar = xi(a.firstChild), !0) : !1;
                case 6:
                    return a = s.pendingProps === "" || a.nodeType !== 3 ? null : a, a !== null ? (s.stateNode = a, Mr = s, Ar = null, !0) : !1;
                case 13:
                    return a = a.nodeType !== 8 ? null : a, a !== null ? (f = da !== null ? {
                        id: Rs,
                        overflow: Ns
                    } : null, s.memoizedState = {
                        dehydrated: a,
                        treeContext: f,
                        retryLane: 1073741824
                    }, f = so(18, null, null, 0), f.stateNode = a, f.return = s, s.child = f, Mr = s, Ar = null, !0) : !1;
                default:
                    return !1
            }
        }

        function p0(s) {
            return (s.mode & 1) !== 0 && (s.flags & 128) === 0
        }

        function g0(s) {
            if (Yt) {
                var a = Ar;
                if (a) {
                    var f = a;
                    if (!V5(s, a)) {
                        if (p0(s)) throw Error(n(418));
                        a = xi(f.nextSibling);
                        var h = Mr;
                        a && V5(s, a) ? I5(h, f) : (s.flags = s.flags & -4097 | 2, Yt = !1, Mr = s)
                    }
                } else {
                    if (p0(s)) throw Error(n(418));
                    s.flags = s.flags & -4097 | 2, Yt = !1, Mr = s
                }
            }
        }

        function H5(s) {
            for (s = s.return; s !== null && s.tag !== 5 && s.tag !== 3 && s.tag !== 13;) s = s.return;
            Mr = s
        }

        function Kp(s) {
            if (s !== Mr) return !1;
            if (!Yt) return H5(s), Yt = !0, !1;
            var a;
            if ((a = s.tag !== 3) && !(a = s.tag !== 5) && (a = s.type, a = a !== "head" && a !== "body" && !s0(s.type, s.memoizedProps)), a && (a = Ar)) {
                if (p0(s)) throw F5(), Error(n(418));
                for (; a;) I5(s, a), a = xi(a.nextSibling)
            }
            if (H5(s), s.tag === 13) {
                if (s = s.memoizedState, s = s !== null ? s.dehydrated : null, !s) throw Error(n(317));
                e:{
                    for (s = s.nextSibling, a = 0; s;) {
                        if (s.nodeType === 8) {
                            var f = s.data;
                            if (f === "/$") {
                                if (a === 0) {
                                    Ar = xi(s.nextSibling);
                                    break e
                                }
                                a--
                            } else f !== "$" && f !== "$!" && f !== "$?" || a++
                        }
                        s = s.nextSibling
                    }
                    Ar = null
                }
            } else Ar = Mr ? xi(s.stateNode.nextSibling) : null;
            return !0
        }

        function F5() {
            for (var s = Ar; s;) s = xi(s.nextSibling)
        }

        function Ll() {
            Ar = Mr = null, Yt = !1
        }

        function h0(s) {
            _o === null ? _o = [s] : _o.push(s)
        }

        var zU = k.ReactCurrentBatchConfig;

        function Hu(s, a, f) {
            if (s = f.ref, s !== null && typeof s != "function" && typeof s != "object") {
                if (f._owner) {
                    if (f = f._owner, f) {
                        if (f.tag !== 1) throw Error(n(309));
                        var h = f.stateNode
                    }
                    if (!h) throw Error(n(147, s));
                    var S = h, P = "" + s;
                    return a !== null && a.ref !== null && typeof a.ref == "function" && a.ref._stringRef === P ? a.ref : (a = function (L) {
                        var G = S.refs;
                        L === null ? delete G[P] : G[P] = L
                    }, a._stringRef = P, a)
                }
                if (typeof s != "string") throw Error(n(284));
                if (!f._owner) throw Error(n(290, s))
            }
            return s
        }

        function qp(s, a) {
            throw s = Object.prototype.toString.call(a), Error(n(31, s === "[object Object]" ? "object with keys {" + Object.keys(a).join(", ") + "}" : s))
        }

        function z5(s) {
            var a = s._init;
            return a(s._payload)
        }

        function B5(s) {
            function a(re, J) {
                if (s) {
                    var oe = re.deletions;
                    oe === null ? (re.deletions = [J], re.flags |= 16) : oe.push(J)
                }
            }

            function f(re, J) {
                if (!s) return null;
                for (; J !== null;) a(re, J), J = J.sibling;
                return null
            }

            function h(re, J) {
                for (re = new Map; J !== null;) J.key !== null ? re.set(J.key, J) : re.set(J.index, J), J = J.sibling;
                return re
            }

            function S(re, J) {
                return re = Li(re, J), re.index = 0, re.sibling = null, re
            }

            function P(re, J, oe) {
                return re.index = oe, s ? (oe = re.alternate, oe !== null ? (oe = oe.index, oe < J ? (re.flags |= 2, J) : oe) : (re.flags |= 2, J)) : (re.flags |= 1048576, J)
            }

            function L(re) {
                return s && re.alternate === null && (re.flags |= 2), re
            }

            function G(re, J, oe, Pe) {
                return J === null || J.tag !== 6 ? (J = iy(oe, re.mode, Pe), J.return = re, J) : (J = S(J, oe), J.return = re, J)
            }

            function Y(re, J, oe, Pe) {
                var Ve = oe.type;
                return Ve === A ? Se(re, J, oe.props.children, Pe, oe.key) : J !== null && (J.elementType === Ve || typeof Ve == "object" && Ve !== null && Ve.$$typeof === B && z5(Ve) === J.type) ? (Pe = S(J, oe.props), Pe.ref = Hu(re, J, oe), Pe.return = re, Pe) : (Pe = yg(oe.type, oe.key, oe.props, null, re.mode, Pe), Pe.ref = Hu(re, J, oe), Pe.return = re, Pe)
            }

            function le(re, J, oe, Pe) {
                return J === null || J.tag !== 4 || J.stateNode.containerInfo !== oe.containerInfo || J.stateNode.implementation !== oe.implementation ? (J = ay(oe, re.mode, Pe), J.return = re, J) : (J = S(J, oe.children || []), J.return = re, J)
            }

            function Se(re, J, oe, Pe, Ve) {
                return J === null || J.tag !== 7 ? (J = xa(oe, re.mode, Pe, Ve), J.return = re, J) : (J = S(J, oe), J.return = re, J)
            }

            function Ce(re, J, oe) {
                if (typeof J == "string" && J !== "" || typeof J == "number") return J = iy("" + J, re.mode, oe), J.return = re, J;
                if (typeof J == "object" && J !== null) {
                    switch (J.$$typeof) {
                        case T:
                            return oe = yg(J.type, J.key, J.props, null, re.mode, oe), oe.ref = Hu(re, null, J), oe.return = re, oe;
                        case O:
                            return J = ay(J, re.mode, oe), J.return = re, J;
                        case B:
                            var Pe = J._init;
                            return Ce(re, Pe(J._payload), oe)
                    }
                    if (wt(J) || I(J)) return J = xa(J, re.mode, oe, null), J.return = re, J;
                    qp(re, J)
                }
                return null
            }

            function we(re, J, oe, Pe) {
                var Ve = J !== null ? J.key : null;
                if (typeof oe == "string" && oe !== "" || typeof oe == "number") return Ve !== null ? null : G(re, J, "" + oe, Pe);
                if (typeof oe == "object" && oe !== null) {
                    switch (oe.$$typeof) {
                        case T:
                            return oe.key === Ve ? Y(re, J, oe, Pe) : null;
                        case O:
                            return oe.key === Ve ? le(re, J, oe, Pe) : null;
                        case B:
                            return Ve = oe._init, we(re, J, Ve(oe._payload), Pe)
                    }
                    if (wt(oe) || I(oe)) return Ve !== null ? null : Se(re, J, oe, Pe, null);
                    qp(re, oe)
                }
                return null
            }

            function Oe(re, J, oe, Pe, Ve) {
                if (typeof Pe == "string" && Pe !== "" || typeof Pe == "number") return re = re.get(oe) || null, G(J, re, "" + Pe, Ve);
                if (typeof Pe == "object" && Pe !== null) {
                    switch (Pe.$$typeof) {
                        case T:
                            return re = re.get(Pe.key === null ? oe : Pe.key) || null, Y(J, re, Pe, Ve);
                        case O:
                            return re = re.get(Pe.key === null ? oe : Pe.key) || null, le(J, re, Pe, Ve);
                        case B:
                            var Fe = Pe._init;
                            return Oe(re, J, oe, Fe(Pe._payload), Ve)
                    }
                    if (wt(Pe) || I(Pe)) return re = re.get(oe) || null, Se(J, re, Pe, Ve, null);
                    qp(J, Pe)
                }
                return null
            }

            function Re(re, J, oe, Pe) {
                for (var Ve = null, Fe = null, ze = J, Ge = J = 0, Pn = null; ze !== null && Ge < oe.length; Ge++) {
                    ze.index > Ge ? (Pn = ze, ze = null) : Pn = ze.sibling;
                    var bt = we(re, ze, oe[Ge], Pe);
                    if (bt === null) {
                        ze === null && (ze = Pn);
                        break
                    }
                    s && ze && bt.alternate === null && a(re, ze), J = P(bt, J, Ge), Fe === null ? Ve = bt : Fe.sibling = bt, Fe = bt, ze = Pn
                }
                if (Ge === oe.length) return f(re, ze), Yt && fa(re, Ge), Ve;
                if (ze === null) {
                    for (; Ge < oe.length; Ge++) ze = Ce(re, oe[Ge], Pe), ze !== null && (J = P(ze, J, Ge), Fe === null ? Ve = ze : Fe.sibling = ze, Fe = ze);
                    return Yt && fa(re, Ge), Ve
                }
                for (ze = h(re, ze); Ge < oe.length; Ge++) Pn = Oe(ze, re, Ge, oe[Ge], Pe), Pn !== null && (s && Pn.alternate !== null && ze.delete(Pn.key === null ? Ge : Pn.key), J = P(Pn, J, Ge), Fe === null ? Ve = Pn : Fe.sibling = Pn, Fe = Pn);
                return s && ze.forEach(function (Mi) {
                    return a(re, Mi)
                }), Yt && fa(re, Ge), Ve
            }

            function Ne(re, J, oe, Pe) {
                var Ve = I(oe);
                if (typeof Ve != "function") throw Error(n(150));
                if (oe = Ve.call(oe), oe == null) throw Error(n(151));
                for (var Fe = Ve = null, ze = J, Ge = J = 0, Pn = null, bt = oe.next(); ze !== null && !bt.done; Ge++, bt = oe.next()) {
                    ze.index > Ge ? (Pn = ze, ze = null) : Pn = ze.sibling;
                    var Mi = we(re, ze, bt.value, Pe);
                    if (Mi === null) {
                        ze === null && (ze = Pn);
                        break
                    }
                    s && ze && Mi.alternate === null && a(re, ze), J = P(Mi, J, Ge), Fe === null ? Ve = Mi : Fe.sibling = Mi, Fe = Mi, ze = Pn
                }
                if (bt.done) return f(re, ze), Yt && fa(re, Ge), Ve;
                if (ze === null) {
                    for (; !bt.done; Ge++, bt = oe.next()) bt = Ce(re, bt.value, Pe), bt !== null && (J = P(bt, J, Ge), Fe === null ? Ve = bt : Fe.sibling = bt, Fe = bt);
                    return Yt && fa(re, Ge), Ve
                }
                for (ze = h(re, ze); !bt.done; Ge++, bt = oe.next()) bt = Oe(ze, re, Ge, bt.value, Pe), bt !== null && (s && bt.alternate !== null && ze.delete(bt.key === null ? Ge : bt.key), J = P(bt, J, Ge), Fe === null ? Ve = bt : Fe.sibling = bt, Fe = bt);
                return s && ze.forEach(function (wW) {
                    return a(re, wW)
                }), Yt && fa(re, Ge), Ve
            }

            function un(re, J, oe, Pe) {
                if (typeof oe == "object" && oe !== null && oe.type === A && oe.key === null && (oe = oe.props.children), typeof oe == "object" && oe !== null) {
                    switch (oe.$$typeof) {
                        case T:
                            e:{
                                for (var Ve = oe.key, Fe = J; Fe !== null;) {
                                    if (Fe.key === Ve) {
                                        if (Ve = oe.type, Ve === A) {
                                            if (Fe.tag === 7) {
                                                f(re, Fe.sibling), J = S(Fe, oe.props.children), J.return = re, re = J;
                                                break e
                                            }
                                        } else if (Fe.elementType === Ve || typeof Ve == "object" && Ve !== null && Ve.$$typeof === B && z5(Ve) === Fe.type) {
                                            f(re, Fe.sibling), J = S(Fe, oe.props), J.ref = Hu(re, Fe, oe), J.return = re, re = J;
                                            break e
                                        }
                                        f(re, Fe);
                                        break
                                    } else a(re, Fe);
                                    Fe = Fe.sibling
                                }
                                oe.type === A ? (J = xa(oe.props.children, re.mode, Pe, oe.key), J.return = re, re = J) : (Pe = yg(oe.type, oe.key, oe.props, null, re.mode, Pe), Pe.ref = Hu(re, J, oe), Pe.return = re, re = Pe)
                            }
                            return L(re);
                        case O:
                            e:{
                                for (Fe = oe.key; J !== null;) {
                                    if (J.key === Fe) if (J.tag === 4 && J.stateNode.containerInfo === oe.containerInfo && J.stateNode.implementation === oe.implementation) {
                                        f(re, J.sibling), J = S(J, oe.children || []), J.return = re, re = J;
                                        break e
                                    } else {
                                        f(re, J);
                                        break
                                    } else a(re, J);
                                    J = J.sibling
                                }
                                J = ay(oe, re.mode, Pe), J.return = re, re = J
                            }
                            return L(re);
                        case B:
                            return Fe = oe._init, un(re, J, Fe(oe._payload), Pe)
                    }
                    if (wt(oe)) return Re(re, J, oe, Pe);
                    if (I(oe)) return Ne(re, J, oe, Pe);
                    qp(re, oe)
                }
                return typeof oe == "string" && oe !== "" || typeof oe == "number" ? (oe = "" + oe, J !== null && J.tag === 6 ? (f(re, J.sibling), J = S(J, oe), J.return = re, re = J) : (f(re, J), J = iy(oe, re.mode, Pe), J.return = re, re = J), L(re)) : f(re, J)
            }

            return un
        }

        var Ml = B5(!0), U5 = B5(!1), Yp = wi(null), Xp = null, Al = null, m0 = null;

        function v0() {
            m0 = Al = Xp = null
        }

        function y0(s) {
            var a = Yp.current;
            Gt(Yp), s._currentValue = a
        }

        function b0(s, a, f) {
            for (; s !== null;) {
                var h = s.alternate;
                if ((s.childLanes & a) !== a ? (s.childLanes |= a, h !== null && (h.childLanes |= a)) : h !== null && (h.childLanes & a) !== a && (h.childLanes |= a), s === f) break;
                s = s.return
            }
        }

        function Rl(s, a) {
            Xp = s, m0 = Al = null, s = s.dependencies, s !== null && s.firstContext !== null && (s.lanes & a && (pr = !0), s.firstContext = null)
        }

        function no(s) {
            var a = s._currentValue;
            if (m0 !== s) if (s = {context: s, memoizedValue: a, next: null}, Al === null) {
                if (Xp === null) throw Error(n(308));
                Al = s, Xp.dependencies = {lanes: 0, firstContext: s}
            } else Al = Al.next = s;
            return a
        }

        var pa = null;

        function x0(s) {
            pa === null ? pa = [s] : pa.push(s)
        }

        function W5(s, a, f, h) {
            var S = a.interleaved;
            return S === null ? (f.next = f, x0(a)) : (f.next = S.next, S.next = f), a.interleaved = f, $s(s, h)
        }

        function $s(s, a) {
            s.lanes |= a;
            var f = s.alternate;
            for (f !== null && (f.lanes |= a), f = s, s = s.return; s !== null;) s.childLanes |= a, f = s.alternate, f !== null && (f.childLanes |= a), f = s, s = s.return;
            return f.tag === 3 ? f.stateNode : null
        }

        var Ci = !1;

        function w0(s) {
            s.updateQueue = {
                baseState: s.memoizedState,
                firstBaseUpdate: null,
                lastBaseUpdate: null,
                shared: {pending: null, interleaved: null, lanes: 0},
                effects: null
            }
        }

        function G5(s, a) {
            s = s.updateQueue, a.updateQueue === s && (a.updateQueue = {
                baseState: s.baseState,
                firstBaseUpdate: s.firstBaseUpdate,
                lastBaseUpdate: s.lastBaseUpdate,
                shared: s.shared,
                effects: s.effects
            })
        }

        function Ds(s, a) {
            return {eventTime: s, lane: a, tag: 0, payload: null, callback: null, next: null}
        }

        function Ei(s, a, f) {
            var h = s.updateQueue;
            if (h === null) return null;
            if (h = h.shared, ht & 2) {
                var S = h.pending;
                return S === null ? a.next = a : (a.next = S.next, S.next = a), h.pending = a, $s(s, f)
            }
            return S = h.interleaved, S === null ? (a.next = a, x0(h)) : (a.next = S.next, S.next = a), h.interleaved = a, $s(s, f)
        }

        function Zp(s, a, f) {
            if (a = a.updateQueue, a !== null && (a = a.shared, (f & 4194240) !== 0)) {
                var h = a.lanes;
                h &= s.pendingLanes, f |= h, a.lanes = f, Nv(s, f)
            }
        }

        function K5(s, a) {
            var f = s.updateQueue, h = s.alternate;
            if (h !== null && (h = h.updateQueue, f === h)) {
                var S = null, P = null;
                if (f = f.firstBaseUpdate, f !== null) {
                    do {
                        var L = {
                            eventTime: f.eventTime,
                            lane: f.lane,
                            tag: f.tag,
                            payload: f.payload,
                            callback: f.callback,
                            next: null
                        };
                        P === null ? S = P = L : P = P.next = L, f = f.next
                    } while (f !== null);
                    P === null ? S = P = a : P = P.next = a
                } else S = P = a;
                f = {
                    baseState: h.baseState,
                    firstBaseUpdate: S,
                    lastBaseUpdate: P,
                    shared: h.shared,
                    effects: h.effects
                }, s.updateQueue = f;
                return
            }
            s = f.lastBaseUpdate, s === null ? f.firstBaseUpdate = a : s.next = a, f.lastBaseUpdate = a
        }

        function Jp(s, a, f, h) {
            var S = s.updateQueue;
            Ci = !1;
            var P = S.firstBaseUpdate, L = S.lastBaseUpdate, G = S.shared.pending;
            if (G !== null) {
                S.shared.pending = null;
                var Y = G, le = Y.next;
                Y.next = null, L === null ? P = le : L.next = le, L = Y;
                var Se = s.alternate;
                Se !== null && (Se = Se.updateQueue, G = Se.lastBaseUpdate, G !== L && (G === null ? Se.firstBaseUpdate = le : G.next = le, Se.lastBaseUpdate = Y))
            }
            if (P !== null) {
                var Ce = S.baseState;
                L = 0, Se = le = Y = null, G = P;
                do {
                    var we = G.lane, Oe = G.eventTime;
                    if ((h & we) === we) {
                        Se !== null && (Se = Se.next = {
                            eventTime: Oe,
                            lane: 0,
                            tag: G.tag,
                            payload: G.payload,
                            callback: G.callback,
                            next: null
                        });
                        e:{
                            var Re = s, Ne = G;
                            switch (we = a, Oe = f, Ne.tag) {
                                case 1:
                                    if (Re = Ne.payload, typeof Re == "function") {
                                        Ce = Re.call(Oe, Ce, we);
                                        break e
                                    }
                                    Ce = Re;
                                    break e;
                                case 3:
                                    Re.flags = Re.flags & -65537 | 128;
                                case 0:
                                    if (Re = Ne.payload, we = typeof Re == "function" ? Re.call(Oe, Ce, we) : Re, we == null) break e;
                                    Ce = D({}, Ce, we);
                                    break e;
                                case 2:
                                    Ci = !0
                            }
                        }
                        G.callback !== null && G.lane !== 0 && (s.flags |= 64, we = S.effects, we === null ? S.effects = [G] : we.push(G))
                    } else Oe = {
                        eventTime: Oe,
                        lane: we,
                        tag: G.tag,
                        payload: G.payload,
                        callback: G.callback,
                        next: null
                    }, Se === null ? (le = Se = Oe, Y = Ce) : Se = Se.next = Oe, L |= we;
                    if (G = G.next, G === null) {
                        if (G = S.shared.pending, G === null) break;
                        we = G, G = we.next, we.next = null, S.lastBaseUpdate = we, S.shared.pending = null
                    }
                } while (1);
                if (Se === null && (Y = Ce), S.baseState = Y, S.firstBaseUpdate = le, S.lastBaseUpdate = Se, a = S.shared.interleaved, a !== null) {
                    S = a;
                    do L |= S.lane, S = S.next; while (S !== a)
                } else P === null && (S.shared.lanes = 0);
                ma |= L, s.lanes = L, s.memoizedState = Ce
            }
        }

        function q5(s, a, f) {
            if (s = a.effects, a.effects = null, s !== null) for (a = 0; a < s.length; a++) {
                var h = s[a], S = h.callback;
                if (S !== null) {
                    if (h.callback = null, h = f, typeof S != "function") throw Error(n(191, S));
                    S.call(h)
                }
            }
        }

        var Fu = {}, ss = wi(Fu), zu = wi(Fu), Bu = wi(Fu);

        function ga(s) {
            if (s === Fu) throw Error(n(174));
            return s
        }

        function S0(s, a) {
            switch (Ft(Bu, a), Ft(zu, s), Ft(ss, Fu), s = a.nodeType, s) {
                case 9:
                case 11:
                    a = (a = a.documentElement) ? a.namespaceURI : qt(null, "");
                    break;
                default:
                    s = s === 8 ? a.parentNode : a, a = s.namespaceURI || null, s = s.tagName, a = qt(a, s)
            }
            Gt(ss), Ft(ss, a)
        }

        function Nl() {
            Gt(ss), Gt(zu), Gt(Bu)
        }

        function Y5(s) {
            ga(Bu.current);
            var a = ga(ss.current), f = qt(a, s.type);
            a !== f && (Ft(zu, s), Ft(ss, f))
        }

        function j0(s) {
            zu.current === s && (Gt(ss), Gt(zu))
        }

        var tn = wi(0);

        function Qp(s) {
            for (var a = s; a !== null;) {
                if (a.tag === 13) {
                    var f = a.memoizedState;
                    if (f !== null && (f = f.dehydrated, f === null || f.data === "$?" || f.data === "$!")) return a
                } else if (a.tag === 19 && a.memoizedProps.revealOrder !== void 0) {
                    if (a.flags & 128) return a
                } else if (a.child !== null) {
                    a.child.return = a, a = a.child;
                    continue
                }
                if (a === s) break;
                for (; a.sibling === null;) {
                    if (a.return === null || a.return === s) return null;
                    a = a.return
                }
                a.sibling.return = a.return, a = a.sibling
            }
            return null
        }

        var C0 = [];

        function E0() {
            for (var s = 0; s < C0.length; s++) C0[s]._workInProgressVersionPrimary = null;
            C0.length = 0
        }

        var eg = k.ReactCurrentDispatcher, P0 = k.ReactCurrentBatchConfig, ha = 0, nn = null, yn = null, Cn = null,
            tg = !1, Uu = !1, Wu = 0, BU = 0;

        function Hn() {
            throw Error(n(321))
        }

        function _0(s, a) {
            if (a === null) return !1;
            for (var f = 0; f < a.length && f < s.length; f++) if (!Po(s[f], a[f])) return !1;
            return !0
        }

        function k0(s, a, f, h, S, P) {
            if (ha = P, nn = a, a.memoizedState = null, a.updateQueue = null, a.lanes = 0, eg.current = s === null || s.memoizedState === null ? KU : qU, s = f(h, S), Uu) {
                P = 0;
                do {
                    if (Uu = !1, Wu = 0, 25 <= P) throw Error(n(301));
                    P += 1, Cn = yn = null, a.updateQueue = null, eg.current = YU, s = f(h, S)
                } while (Uu)
            }
            if (eg.current = og, a = yn !== null && yn.next !== null, ha = 0, Cn = yn = nn = null, tg = !1, a) throw Error(n(300));
            return s
        }

        function T0() {
            var s = Wu !== 0;
            return Wu = 0, s
        }

        function is() {
            var s = {memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null};
            return Cn === null ? nn.memoizedState = Cn = s : Cn = Cn.next = s, Cn
        }

        function ro() {
            if (yn === null) {
                var s = nn.alternate;
                s = s !== null ? s.memoizedState : null
            } else s = yn.next;
            var a = Cn === null ? nn.memoizedState : Cn.next;
            if (a !== null) Cn = a, yn = s; else {
                if (s === null) throw Error(n(310));
                yn = s, s = {
                    memoizedState: yn.memoizedState,
                    baseState: yn.baseState,
                    baseQueue: yn.baseQueue,
                    queue: yn.queue,
                    next: null
                }, Cn === null ? nn.memoizedState = Cn = s : Cn = Cn.next = s
            }
            return Cn
        }

        function Gu(s, a) {
            return typeof a == "function" ? a(s) : a
        }

        function O0(s) {
            var a = ro(), f = a.queue;
            if (f === null) throw Error(n(311));
            f.lastRenderedReducer = s;
            var h = yn, S = h.baseQueue, P = f.pending;
            if (P !== null) {
                if (S !== null) {
                    var L = S.next;
                    S.next = P.next, P.next = L
                }
                h.baseQueue = S = P, f.pending = null
            }
            if (S !== null) {
                P = S.next, h = h.baseState;
                var G = L = null, Y = null, le = P;
                do {
                    var Se = le.lane;
                    if ((ha & Se) === Se) Y !== null && (Y = Y.next = {
                        lane: 0,
                        action: le.action,
                        hasEagerState: le.hasEagerState,
                        eagerState: le.eagerState,
                        next: null
                    }), h = le.hasEagerState ? le.eagerState : s(h, le.action); else {
                        var Ce = {
                            lane: Se,
                            action: le.action,
                            hasEagerState: le.hasEagerState,
                            eagerState: le.eagerState,
                            next: null
                        };
                        Y === null ? (G = Y = Ce, L = h) : Y = Y.next = Ce, nn.lanes |= Se, ma |= Se
                    }
                    le = le.next
                } while (le !== null && le !== P);
                Y === null ? L = h : Y.next = G, Po(h, a.memoizedState) || (pr = !0), a.memoizedState = h, a.baseState = L, a.baseQueue = Y, f.lastRenderedState = h
            }
            if (s = f.interleaved, s !== null) {
                S = s;
                do P = S.lane, nn.lanes |= P, ma |= P, S = S.next; while (S !== s)
            } else S === null && (f.lanes = 0);
            return [a.memoizedState, f.dispatch]
        }

        function L0(s) {
            var a = ro(), f = a.queue;
            if (f === null) throw Error(n(311));
            f.lastRenderedReducer = s;
            var h = f.dispatch, S = f.pending, P = a.memoizedState;
            if (S !== null) {
                f.pending = null;
                var L = S = S.next;
                do P = s(P, L.action), L = L.next; while (L !== S);
                Po(P, a.memoizedState) || (pr = !0), a.memoizedState = P, a.baseQueue === null && (a.baseState = P), f.lastRenderedState = P
            }
            return [P, h]
        }

        function X5() {
        }

        function Z5(s, a) {
            var f = nn, h = ro(), S = a(), P = !Po(h.memoizedState, S);
            if (P && (h.memoizedState = S, pr = !0), h = h.queue, M0(eP.bind(null, f, h, s), [s]), h.getSnapshot !== a || P || Cn !== null && Cn.memoizedState.tag & 1) {
                if (f.flags |= 2048, Ku(9, Q5.bind(null, f, h, S, a), void 0, null), En === null) throw Error(n(349));
                ha & 30 || J5(f, a, S)
            }
            return S
        }

        function J5(s, a, f) {
            s.flags |= 16384, s = {getSnapshot: a, value: f}, a = nn.updateQueue, a === null ? (a = {
                lastEffect: null,
                stores: null
            }, nn.updateQueue = a, a.stores = [s]) : (f = a.stores, f === null ? a.stores = [s] : f.push(s))
        }

        function Q5(s, a, f, h) {
            a.value = f, a.getSnapshot = h, tP(a) && nP(s)
        }

        function eP(s, a, f) {
            return f(function () {
                tP(a) && nP(s)
            })
        }

        function tP(s) {
            var a = s.getSnapshot;
            s = s.value;
            try {
                var f = a();
                return !Po(s, f)
            } catch {
                return !0
            }
        }

        function nP(s) {
            var a = $s(s, 1);
            a !== null && Lo(a, s, 1, -1)
        }

        function rP(s) {
            var a = is();
            return typeof s == "function" && (s = s()), a.memoizedState = a.baseState = s, s = {
                pending: null,
                interleaved: null,
                lanes: 0,
                dispatch: null,
                lastRenderedReducer: Gu,
                lastRenderedState: s
            }, a.queue = s, s = s.dispatch = GU.bind(null, nn, s), [a.memoizedState, s]
        }

        function Ku(s, a, f, h) {
            return s = {
                tag: s,
                create: a,
                destroy: f,
                deps: h,
                next: null
            }, a = nn.updateQueue, a === null ? (a = {
                lastEffect: null,
                stores: null
            }, nn.updateQueue = a, a.lastEffect = s.next = s) : (f = a.lastEffect, f === null ? a.lastEffect = s.next = s : (h = f.next, f.next = s, s.next = h, a.lastEffect = s)), s
        }

        function oP() {
            return ro().memoizedState
        }

        function ng(s, a, f, h) {
            var S = is();
            nn.flags |= s, S.memoizedState = Ku(1 | a, f, void 0, h === void 0 ? null : h)
        }

        function rg(s, a, f, h) {
            var S = ro();
            h = h === void 0 ? null : h;
            var P = void 0;
            if (yn !== null) {
                var L = yn.memoizedState;
                if (P = L.destroy, h !== null && _0(h, L.deps)) {
                    S.memoizedState = Ku(a, f, P, h);
                    return
                }
            }
            nn.flags |= s, S.memoizedState = Ku(1 | a, f, P, h)
        }

        function sP(s, a) {
            return ng(8390656, 8, s, a)
        }

        function M0(s, a) {
            return rg(2048, 8, s, a)
        }

        function iP(s, a) {
            return rg(4, 2, s, a)
        }

        function aP(s, a) {
            return rg(4, 4, s, a)
        }

        function lP(s, a) {
            if (typeof a == "function") return s = s(), a(s), function () {
                a(null)
            };
            if (a != null) return s = s(), a.current = s, function () {
                a.current = null
            }
        }

        function cP(s, a, f) {
            return f = f != null ? f.concat([s]) : null, rg(4, 4, lP.bind(null, a, s), f)
        }

        function A0() {
        }

        function uP(s, a) {
            var f = ro();
            a = a === void 0 ? null : a;
            var h = f.memoizedState;
            return h !== null && a !== null && _0(a, h[1]) ? h[0] : (f.memoizedState = [s, a], s)
        }

        function dP(s, a) {
            var f = ro();
            a = a === void 0 ? null : a;
            var h = f.memoizedState;
            return h !== null && a !== null && _0(a, h[1]) ? h[0] : (s = s(), f.memoizedState = [s, a], s)
        }

        function fP(s, a, f) {
            return ha & 21 ? (Po(f, a) || (f = zE(), nn.lanes |= f, ma |= f, s.baseState = !0), a) : (s.baseState && (s.baseState = !1, pr = !0), s.memoizedState = f)
        }

        function UU(s, a) {
            var f = Ot;
            Ot = f !== 0 && 4 > f ? f : 4, s(!0);
            var h = P0.transition;
            P0.transition = {};
            try {
                s(!1), a()
            } finally {
                Ot = f, P0.transition = h
            }
        }

        function pP() {
            return ro().memoizedState
        }

        function WU(s, a, f) {
            var h = Ti(s);
            if (f = {
                lane: h,
                action: f,
                hasEagerState: !1,
                eagerState: null,
                next: null
            }, gP(s)) hP(a, f); else if (f = W5(s, a, f, h), f !== null) {
                var S = Xn();
                Lo(f, s, h, S), mP(f, a, h)
            }
        }

        function GU(s, a, f) {
            var h = Ti(s), S = {lane: h, action: f, hasEagerState: !1, eagerState: null, next: null};
            if (gP(s)) hP(a, S); else {
                var P = s.alternate;
                if (s.lanes === 0 && (P === null || P.lanes === 0) && (P = a.lastRenderedReducer, P !== null)) try {
                    var L = a.lastRenderedState, G = P(L, f);
                    if (S.hasEagerState = !0, S.eagerState = G, Po(G, L)) {
                        var Y = a.interleaved;
                        Y === null ? (S.next = S, x0(a)) : (S.next = Y.next, Y.next = S), a.interleaved = S;
                        return
                    }
                } catch {
                } finally {
                }
                f = W5(s, a, S, h), f !== null && (S = Xn(), Lo(f, s, h, S), mP(f, a, h))
            }
        }

        function gP(s) {
            var a = s.alternate;
            return s === nn || a !== null && a === nn
        }

        function hP(s, a) {
            Uu = tg = !0;
            var f = s.pending;
            f === null ? a.next = a : (a.next = f.next, f.next = a), s.pending = a
        }

        function mP(s, a, f) {
            if (f & 4194240) {
                var h = a.lanes;
                h &= s.pendingLanes, f |= h, a.lanes = f, Nv(s, f)
            }
        }

        var og = {
            readContext: no,
            useCallback: Hn,
            useContext: Hn,
            useEffect: Hn,
            useImperativeHandle: Hn,
            useInsertionEffect: Hn,
            useLayoutEffect: Hn,
            useMemo: Hn,
            useReducer: Hn,
            useRef: Hn,
            useState: Hn,
            useDebugValue: Hn,
            useDeferredValue: Hn,
            useTransition: Hn,
            useMutableSource: Hn,
            useSyncExternalStore: Hn,
            useId: Hn,
            unstable_isNewReconciler: !1
        }, KU = {
            readContext: no, useCallback: function (s, a) {
                return is().memoizedState = [s, a === void 0 ? null : a], s
            }, useContext: no, useEffect: sP, useImperativeHandle: function (s, a, f) {
                return f = f != null ? f.concat([s]) : null, ng(4194308, 4, lP.bind(null, a, s), f)
            }, useLayoutEffect: function (s, a) {
                return ng(4194308, 4, s, a)
            }, useInsertionEffect: function (s, a) {
                return ng(4, 2, s, a)
            }, useMemo: function (s, a) {
                var f = is();
                return a = a === void 0 ? null : a, s = s(), f.memoizedState = [s, a], s
            }, useReducer: function (s, a, f) {
                var h = is();
                return a = f !== void 0 ? f(a) : a, h.memoizedState = h.baseState = a, s = {
                    pending: null,
                    interleaved: null,
                    lanes: 0,
                    dispatch: null,
                    lastRenderedReducer: s,
                    lastRenderedState: a
                }, h.queue = s, s = s.dispatch = WU.bind(null, nn, s), [h.memoizedState, s]
            }, useRef: function (s) {
                var a = is();
                return s = {current: s}, a.memoizedState = s
            }, useState: rP, useDebugValue: A0, useDeferredValue: function (s) {
                return is().memoizedState = s
            }, useTransition: function () {
                var s = rP(!1), a = s[0];
                return s = UU.bind(null, s[1]), is().memoizedState = s, [a, s]
            }, useMutableSource: function () {
            }, useSyncExternalStore: function (s, a, f) {
                var h = nn, S = is();
                if (Yt) {
                    if (f === void 0) throw Error(n(407));
                    f = f()
                } else {
                    if (f = a(), En === null) throw Error(n(349));
                    ha & 30 || J5(h, a, f)
                }
                S.memoizedState = f;
                var P = {value: f, getSnapshot: a};
                return S.queue = P, sP(eP.bind(null, h, P, s), [s]), h.flags |= 2048, Ku(9, Q5.bind(null, h, P, f, a), void 0, null), f
            }, useId: function () {
                var s = is(), a = En.identifierPrefix;
                if (Yt) {
                    var f = Ns, h = Rs;
                    f = (h & ~(1 << 32 - Eo(h) - 1)).toString(32) + f, a = ":" + a + "R" + f, f = Wu++, 0 < f && (a += "H" + f.toString(32)), a += ":"
                } else f = BU++, a = ":" + a + "r" + f.toString(32) + ":";
                return s.memoizedState = a
            }, unstable_isNewReconciler: !1
        }, qU = {
            readContext: no,
            useCallback: uP,
            useContext: no,
            useEffect: M0,
            useImperativeHandle: cP,
            useInsertionEffect: iP,
            useLayoutEffect: aP,
            useMemo: dP,
            useReducer: O0,
            useRef: oP,
            useState: function () {
                return O0(Gu)
            },
            useDebugValue: A0,
            useDeferredValue: function (s) {
                var a = ro();
                return fP(a, yn.memoizedState, s)
            },
            useTransition: function () {
                var s = O0(Gu)[0], a = ro().memoizedState;
                return [s, a]
            },
            useMutableSource: X5,
            useSyncExternalStore: Z5,
            useId: pP,
            unstable_isNewReconciler: !1
        }, YU = {
            readContext: no,
            useCallback: uP,
            useContext: no,
            useEffect: M0,
            useImperativeHandle: cP,
            useInsertionEffect: iP,
            useLayoutEffect: aP,
            useMemo: dP,
            useReducer: L0,
            useRef: oP,
            useState: function () {
                return L0(Gu)
            },
            useDebugValue: A0,
            useDeferredValue: function (s) {
                var a = ro();
                return yn === null ? a.memoizedState = s : fP(a, yn.memoizedState, s)
            },
            useTransition: function () {
                var s = L0(Gu)[0], a = ro().memoizedState;
                return [s, a]
            },
            useMutableSource: X5,
            useSyncExternalStore: Z5,
            useId: pP,
            unstable_isNewReconciler: !1
        };

        function ko(s, a) {
            if (s && s.defaultProps) {
                a = D({}, a), s = s.defaultProps;
                for (var f in s) a[f] === void 0 && (a[f] = s[f]);
                return a
            }
            return a
        }

        function R0(s, a, f, h) {
            a = s.memoizedState, f = f(h, a), f = f == null ? a : D({}, a, f), s.memoizedState = f, s.lanes === 0 && (s.updateQueue.baseState = f)
        }

        var sg = {
            isMounted: function (s) {
                return (s = s._reactInternals) ? la(s) === s : !1
            }, enqueueSetState: function (s, a, f) {
                s = s._reactInternals;
                var h = Xn(), S = Ti(s), P = Ds(h, S);
                P.payload = a, f != null && (P.callback = f), a = Ei(s, P, S), a !== null && (Lo(a, s, S, h), Zp(a, s, S))
            }, enqueueReplaceState: function (s, a, f) {
                s = s._reactInternals;
                var h = Xn(), S = Ti(s), P = Ds(h, S);
                P.tag = 1, P.payload = a, f != null && (P.callback = f), a = Ei(s, P, S), a !== null && (Lo(a, s, S, h), Zp(a, s, S))
            }, enqueueForceUpdate: function (s, a) {
                s = s._reactInternals;
                var f = Xn(), h = Ti(s), S = Ds(f, h);
                S.tag = 2, a != null && (S.callback = a), a = Ei(s, S, h), a !== null && (Lo(a, s, h, f), Zp(a, s, h))
            }
        };

        function vP(s, a, f, h, S, P, L) {
            return s = s.stateNode, typeof s.shouldComponentUpdate == "function" ? s.shouldComponentUpdate(h, P, L) : a.prototype && a.prototype.isPureReactComponent ? !Au(f, h) || !Au(S, P) : !0
        }

        function yP(s, a, f) {
            var h = !1, S = Si, P = a.contextType;
            return typeof P == "object" && P !== null ? P = no(P) : (S = fr(a) ? ua : Vn.current, h = a.contextTypes, P = (h = h != null) ? kl(s, S) : Si), a = new a(f, P), s.memoizedState = a.state !== null && a.state !== void 0 ? a.state : null, a.updater = sg, s.stateNode = a, a._reactInternals = s, h && (s = s.stateNode, s.__reactInternalMemoizedUnmaskedChildContext = S, s.__reactInternalMemoizedMaskedChildContext = P), a
        }

        function bP(s, a, f, h) {
            s = a.state, typeof a.componentWillReceiveProps == "function" && a.componentWillReceiveProps(f, h), typeof a.UNSAFE_componentWillReceiveProps == "function" && a.UNSAFE_componentWillReceiveProps(f, h), a.state !== s && sg.enqueueReplaceState(a, a.state, null)
        }

        function N0(s, a, f, h) {
            var S = s.stateNode;
            S.props = f, S.state = s.memoizedState, S.refs = {}, w0(s);
            var P = a.contextType;
            typeof P == "object" && P !== null ? S.context = no(P) : (P = fr(a) ? ua : Vn.current, S.context = kl(s, P)), S.state = s.memoizedState, P = a.getDerivedStateFromProps, typeof P == "function" && (R0(s, a, P, f), S.state = s.memoizedState), typeof a.getDerivedStateFromProps == "function" || typeof S.getSnapshotBeforeUpdate == "function" || typeof S.UNSAFE_componentWillMount != "function" && typeof S.componentWillMount != "function" || (a = S.state, typeof S.componentWillMount == "function" && S.componentWillMount(), typeof S.UNSAFE_componentWillMount == "function" && S.UNSAFE_componentWillMount(), a !== S.state && sg.enqueueReplaceState(S, S.state, null), Jp(s, f, S, h), S.state = s.memoizedState), typeof S.componentDidMount == "function" && (s.flags |= 4194308)
        }

        function $l(s, a) {
            try {
                var f = "", h = a;
                do f += ue(h), h = h.return; while (h);
                var S = f
            } catch (P) {
                S = `
Error generating stack: ` + P.message + `
` + P.stack
            }
            return {value: s, source: a, stack: S, digest: null}
        }

        function $0(s, a, f) {
            return {value: s, source: null, stack: f ?? null, digest: a ?? null}
        }

        function D0(s, a) {
            try {
                console.error(a.value)
            } catch (f) {
                setTimeout(function () {
                    throw f
                })
            }
        }

        var XU = typeof WeakMap == "function" ? WeakMap : Map;

        function xP(s, a, f) {
            f = Ds(-1, f), f.tag = 3, f.payload = {element: null};
            var h = a.value;
            return f.callback = function () {
                fg || (fg = !0, J0 = h), D0(s, a)
            }, f
        }

        function wP(s, a, f) {
            f = Ds(-1, f), f.tag = 3;
            var h = s.type.getDerivedStateFromError;
            if (typeof h == "function") {
                var S = a.value;
                f.payload = function () {
                    return h(S)
                }, f.callback = function () {
                    D0(s, a)
                }
            }
            var P = s.stateNode;
            return P !== null && typeof P.componentDidCatch == "function" && (f.callback = function () {
                D0(s, a), typeof h != "function" && (_i === null ? _i = new Set([this]) : _i.add(this));
                var L = a.stack;
                this.componentDidCatch(a.value, {componentStack: L !== null ? L : ""})
            }), f
        }

        function SP(s, a, f) {
            var h = s.pingCache;
            if (h === null) {
                h = s.pingCache = new XU;
                var S = new Set;
                h.set(a, S)
            } else S = h.get(a), S === void 0 && (S = new Set, h.set(a, S));
            S.has(f) || (S.add(f), s = uW.bind(null, s, a, f), a.then(s, s))
        }

        function jP(s) {
            do {
                var a;
                if ((a = s.tag === 13) && (a = s.memoizedState, a = a !== null ? a.dehydrated !== null : !0), a) return s;
                s = s.return
            } while (s !== null);
            return null
        }

        function CP(s, a, f, h, S) {
            return s.mode & 1 ? (s.flags |= 65536, s.lanes = S, s) : (s === a ? s.flags |= 65536 : (s.flags |= 128, f.flags |= 131072, f.flags &= -52805, f.tag === 1 && (f.alternate === null ? f.tag = 17 : (a = Ds(-1, 1), a.tag = 2, Ei(f, a, 1))), f.lanes |= 1), s)
        }

        var ZU = k.ReactCurrentOwner, pr = !1;

        function Yn(s, a, f, h) {
            a.child = s === null ? U5(a, null, f, h) : Ml(a, s.child, f, h)
        }

        function EP(s, a, f, h, S) {
            f = f.render;
            var P = a.ref;
            return Rl(a, S), h = k0(s, a, f, h, P, S), f = T0(), s !== null && !pr ? (a.updateQueue = s.updateQueue, a.flags &= -2053, s.lanes &= ~S, Is(s, a, S)) : (Yt && f && d0(a), a.flags |= 1, Yn(s, a, h, S), a.child)
        }

        function PP(s, a, f, h, S) {
            if (s === null) {
                var P = f.type;
                return typeof P == "function" && !sy(P) && P.defaultProps === void 0 && f.compare === null && f.defaultProps === void 0 ? (a.tag = 15, a.type = P, _P(s, a, P, h, S)) : (s = yg(f.type, null, h, a, a.mode, S), s.ref = a.ref, s.return = a, a.child = s)
            }
            if (P = s.child, !(s.lanes & S)) {
                var L = P.memoizedProps;
                if (f = f.compare, f = f !== null ? f : Au, f(L, h) && s.ref === a.ref) return Is(s, a, S)
            }
            return a.flags |= 1, s = Li(P, h), s.ref = a.ref, s.return = a, a.child = s
        }

        function _P(s, a, f, h, S) {
            if (s !== null) {
                var P = s.memoizedProps;
                if (Au(P, h) && s.ref === a.ref) if (pr = !1, a.pendingProps = h = P, (s.lanes & S) !== 0) s.flags & 131072 && (pr = !0); else return a.lanes = s.lanes, Is(s, a, S)
            }
            return I0(s, a, f, h, S)
        }

        function kP(s, a, f) {
            var h = a.pendingProps, S = h.children, P = s !== null ? s.memoizedState : null;
            if (h.mode === "hidden") if (!(a.mode & 1)) a.memoizedState = {
                baseLanes: 0,
                cachePool: null,
                transitions: null
            }, Ft(Il, Rr), Rr |= f; else {
                if (!(f & 1073741824)) return s = P !== null ? P.baseLanes | f : f, a.lanes = a.childLanes = 1073741824, a.memoizedState = {
                    baseLanes: s,
                    cachePool: null,
                    transitions: null
                }, a.updateQueue = null, Ft(Il, Rr), Rr |= s, null;
                a.memoizedState = {
                    baseLanes: 0,
                    cachePool: null,
                    transitions: null
                }, h = P !== null ? P.baseLanes : f, Ft(Il, Rr), Rr |= h
            } else P !== null ? (h = P.baseLanes | f, a.memoizedState = null) : h = f, Ft(Il, Rr), Rr |= h;
            return Yn(s, a, S, f), a.child
        }

        function TP(s, a) {
            var f = a.ref;
            (s === null && f !== null || s !== null && s.ref !== f) && (a.flags |= 512, a.flags |= 2097152)
        }

        function I0(s, a, f, h, S) {
            var P = fr(f) ? ua : Vn.current;
            return P = kl(a, P), Rl(a, S), f = k0(s, a, f, h, P, S), h = T0(), s !== null && !pr ? (a.updateQueue = s.updateQueue, a.flags &= -2053, s.lanes &= ~S, Is(s, a, S)) : (Yt && h && d0(a), a.flags |= 1, Yn(s, a, f, S), a.child)
        }

        function OP(s, a, f, h, S) {
            if (fr(f)) {
                var P = !0;
                Bp(a)
            } else P = !1;
            if (Rl(a, S), a.stateNode === null) ag(s, a), yP(a, f, h), N0(a, f, h, S), h = !0; else if (s === null) {
                var L = a.stateNode, G = a.memoizedProps;
                L.props = G;
                var Y = L.context, le = f.contextType;
                typeof le == "object" && le !== null ? le = no(le) : (le = fr(f) ? ua : Vn.current, le = kl(a, le));
                var Se = f.getDerivedStateFromProps,
                    Ce = typeof Se == "function" || typeof L.getSnapshotBeforeUpdate == "function";
                Ce || typeof L.UNSAFE_componentWillReceiveProps != "function" && typeof L.componentWillReceiveProps != "function" || (G !== h || Y !== le) && bP(a, L, h, le), Ci = !1;
                var we = a.memoizedState;
                L.state = we, Jp(a, h, L, S), Y = a.memoizedState, G !== h || we !== Y || dr.current || Ci ? (typeof Se == "function" && (R0(a, f, Se, h), Y = a.memoizedState), (G = Ci || vP(a, f, G, h, we, Y, le)) ? (Ce || typeof L.UNSAFE_componentWillMount != "function" && typeof L.componentWillMount != "function" || (typeof L.componentWillMount == "function" && L.componentWillMount(), typeof L.UNSAFE_componentWillMount == "function" && L.UNSAFE_componentWillMount()), typeof L.componentDidMount == "function" && (a.flags |= 4194308)) : (typeof L.componentDidMount == "function" && (a.flags |= 4194308), a.memoizedProps = h, a.memoizedState = Y), L.props = h, L.state = Y, L.context = le, h = G) : (typeof L.componentDidMount == "function" && (a.flags |= 4194308), h = !1)
            } else {
                L = a.stateNode, G5(s, a), G = a.memoizedProps, le = a.type === a.elementType ? G : ko(a.type, G), L.props = le, Ce = a.pendingProps, we = L.context, Y = f.contextType, typeof Y == "object" && Y !== null ? Y = no(Y) : (Y = fr(f) ? ua : Vn.current, Y = kl(a, Y));
                var Oe = f.getDerivedStateFromProps;
                (Se = typeof Oe == "function" || typeof L.getSnapshotBeforeUpdate == "function") || typeof L.UNSAFE_componentWillReceiveProps != "function" && typeof L.componentWillReceiveProps != "function" || (G !== Ce || we !== Y) && bP(a, L, h, Y), Ci = !1, we = a.memoizedState, L.state = we, Jp(a, h, L, S);
                var Re = a.memoizedState;
                G !== Ce || we !== Re || dr.current || Ci ? (typeof Oe == "function" && (R0(a, f, Oe, h), Re = a.memoizedState), (le = Ci || vP(a, f, le, h, we, Re, Y) || !1) ? (Se || typeof L.UNSAFE_componentWillUpdate != "function" && typeof L.componentWillUpdate != "function" || (typeof L.componentWillUpdate == "function" && L.componentWillUpdate(h, Re, Y), typeof L.UNSAFE_componentWillUpdate == "function" && L.UNSAFE_componentWillUpdate(h, Re, Y)), typeof L.componentDidUpdate == "function" && (a.flags |= 4), typeof L.getSnapshotBeforeUpdate == "function" && (a.flags |= 1024)) : (typeof L.componentDidUpdate != "function" || G === s.memoizedProps && we === s.memoizedState || (a.flags |= 4), typeof L.getSnapshotBeforeUpdate != "function" || G === s.memoizedProps && we === s.memoizedState || (a.flags |= 1024), a.memoizedProps = h, a.memoizedState = Re), L.props = h, L.state = Re, L.context = Y, h = le) : (typeof L.componentDidUpdate != "function" || G === s.memoizedProps && we === s.memoizedState || (a.flags |= 4), typeof L.getSnapshotBeforeUpdate != "function" || G === s.memoizedProps && we === s.memoizedState || (a.flags |= 1024), h = !1)
            }
            return V0(s, a, f, h, P, S)
        }

        function V0(s, a, f, h, S, P) {
            TP(s, a);
            var L = (a.flags & 128) !== 0;
            if (!h && !L) return S && N5(a, f, !1), Is(s, a, P);
            h = a.stateNode, ZU.current = a;
            var G = L && typeof f.getDerivedStateFromError != "function" ? null : h.render();
            return a.flags |= 1, s !== null && L ? (a.child = Ml(a, s.child, null, P), a.child = Ml(a, null, G, P)) : Yn(s, a, G, P), a.memoizedState = h.state, S && N5(a, f, !0), a.child
        }

        function LP(s) {
            var a = s.stateNode;
            a.pendingContext ? A5(s, a.pendingContext, a.pendingContext !== a.context) : a.context && A5(s, a.context, !1), S0(s, a.containerInfo)
        }

        function MP(s, a, f, h, S) {
            return Ll(), h0(S), a.flags |= 256, Yn(s, a, f, h), a.child
        }

        var H0 = {dehydrated: null, treeContext: null, retryLane: 0};

        function F0(s) {
            return {baseLanes: s, cachePool: null, transitions: null}
        }

        function AP(s, a, f) {
            var h = a.pendingProps, S = tn.current, P = !1, L = (a.flags & 128) !== 0, G;
            if ((G = L) || (G = s !== null && s.memoizedState === null ? !1 : (S & 2) !== 0), G ? (P = !0, a.flags &= -129) : (s === null || s.memoizedState !== null) && (S |= 1), Ft(tn, S & 1), s === null) return g0(a), s = a.memoizedState, s !== null && (s = s.dehydrated, s !== null) ? (a.mode & 1 ? s.data === "$!" ? a.lanes = 8 : a.lanes = 1073741824 : a.lanes = 1, null) : (L = h.children, s = h.fallback, P ? (h = a.mode, P = a.child, L = {
                mode: "hidden",
                children: L
            }, !(h & 1) && P !== null ? (P.childLanes = 0, P.pendingProps = L) : P = bg(L, h, 0, null), s = xa(s, h, f, null), P.return = a, s.return = a, P.sibling = s, a.child = P, a.child.memoizedState = F0(f), a.memoizedState = H0, s) : z0(a, L));
            if (S = s.memoizedState, S !== null && (G = S.dehydrated, G !== null)) return JU(s, a, L, h, G, S, f);
            if (P) {
                P = h.fallback, L = a.mode, S = s.child, G = S.sibling;
                var Y = {mode: "hidden", children: h.children};
                return !(L & 1) && a.child !== S ? (h = a.child, h.childLanes = 0, h.pendingProps = Y, a.deletions = null) : (h = Li(S, Y), h.subtreeFlags = S.subtreeFlags & 14680064), G !== null ? P = Li(G, P) : (P = xa(P, L, f, null), P.flags |= 2), P.return = a, h.return = a, h.sibling = P, a.child = h, h = P, P = a.child, L = s.child.memoizedState, L = L === null ? F0(f) : {
                    baseLanes: L.baseLanes | f,
                    cachePool: null,
                    transitions: L.transitions
                }, P.memoizedState = L, P.childLanes = s.childLanes & ~f, a.memoizedState = H0, h
            }
            return P = s.child, s = P.sibling, h = Li(P, {
                mode: "visible",
                children: h.children
            }), !(a.mode & 1) && (h.lanes = f), h.return = a, h.sibling = null, s !== null && (f = a.deletions, f === null ? (a.deletions = [s], a.flags |= 16) : f.push(s)), a.child = h, a.memoizedState = null, h
        }

        function z0(s, a) {
            return a = bg({mode: "visible", children: a}, s.mode, 0, null), a.return = s, s.child = a
        }

        function ig(s, a, f, h) {
            return h !== null && h0(h), Ml(a, s.child, null, f), s = z0(a, a.pendingProps.children), s.flags |= 2, a.memoizedState = null, s
        }

        function JU(s, a, f, h, S, P, L) {
            if (f) return a.flags & 256 ? (a.flags &= -257, h = $0(Error(n(422))), ig(s, a, L, h)) : a.memoizedState !== null ? (a.child = s.child, a.flags |= 128, null) : (P = h.fallback, S = a.mode, h = bg({
                mode: "visible",
                children: h.children
            }, S, 0, null), P = xa(P, S, L, null), P.flags |= 2, h.return = a, P.return = a, h.sibling = P, a.child = h, a.mode & 1 && Ml(a, s.child, null, L), a.child.memoizedState = F0(L), a.memoizedState = H0, P);
            if (!(a.mode & 1)) return ig(s, a, L, null);
            if (S.data === "$!") {
                if (h = S.nextSibling && S.nextSibling.dataset, h) var G = h.dgst;
                return h = G, P = Error(n(419)), h = $0(P, h, void 0), ig(s, a, L, h)
            }
            if (G = (L & s.childLanes) !== 0, pr || G) {
                if (h = En, h !== null) {
                    switch (L & -L) {
                        case 4:
                            S = 2;
                            break;
                        case 16:
                            S = 8;
                            break;
                        case 64:
                        case 128:
                        case 256:
                        case 512:
                        case 1024:
                        case 2048:
                        case 4096:
                        case 8192:
                        case 16384:
                        case 32768:
                        case 65536:
                        case 131072:
                        case 262144:
                        case 524288:
                        case 1048576:
                        case 2097152:
                        case 4194304:
                        case 8388608:
                        case 16777216:
                        case 33554432:
                        case 67108864:
                            S = 32;
                            break;
                        case 536870912:
                            S = 268435456;
                            break;
                        default:
                            S = 0
                    }
                    S = S & (h.suspendedLanes | L) ? 0 : S, S !== 0 && S !== P.retryLane && (P.retryLane = S, $s(s, S), Lo(h, s, S, -1))
                }
                return oy(), h = $0(Error(n(421))), ig(s, a, L, h)
            }
            return S.data === "$?" ? (a.flags |= 128, a.child = s.child, a = dW.bind(null, s), S._reactRetry = a, null) : (s = P.treeContext, Ar = xi(S.nextSibling), Mr = a, Yt = !0, _o = null, s !== null && (eo[to++] = Rs, eo[to++] = Ns, eo[to++] = da, Rs = s.id, Ns = s.overflow, da = a), a = z0(a, h.children), a.flags |= 4096, a)
        }

        function RP(s, a, f) {
            s.lanes |= a;
            var h = s.alternate;
            h !== null && (h.lanes |= a), b0(s.return, a, f)
        }

        function B0(s, a, f, h, S) {
            var P = s.memoizedState;
            P === null ? s.memoizedState = {
                isBackwards: a,
                rendering: null,
                renderingStartTime: 0,
                last: h,
                tail: f,
                tailMode: S
            } : (P.isBackwards = a, P.rendering = null, P.renderingStartTime = 0, P.last = h, P.tail = f, P.tailMode = S)
        }

        function NP(s, a, f) {
            var h = a.pendingProps, S = h.revealOrder, P = h.tail;
            if (Yn(s, a, h.children, f), h = tn.current, h & 2) h = h & 1 | 2, a.flags |= 128; else {
                if (s !== null && s.flags & 128) e:for (s = a.child; s !== null;) {
                    if (s.tag === 13) s.memoizedState !== null && RP(s, f, a); else if (s.tag === 19) RP(s, f, a); else if (s.child !== null) {
                        s.child.return = s, s = s.child;
                        continue
                    }
                    if (s === a) break e;
                    for (; s.sibling === null;) {
                        if (s.return === null || s.return === a) break e;
                        s = s.return
                    }
                    s.sibling.return = s.return, s = s.sibling
                }
                h &= 1
            }
            if (Ft(tn, h), !(a.mode & 1)) a.memoizedState = null; else switch (S) {
                case"forwards":
                    for (f = a.child, S = null; f !== null;) s = f.alternate, s !== null && Qp(s) === null && (S = f), f = f.sibling;
                    f = S, f === null ? (S = a.child, a.child = null) : (S = f.sibling, f.sibling = null), B0(a, !1, S, f, P);
                    break;
                case"backwards":
                    for (f = null, S = a.child, a.child = null; S !== null;) {
                        if (s = S.alternate, s !== null && Qp(s) === null) {
                            a.child = S;
                            break
                        }
                        s = S.sibling, S.sibling = f, f = S, S = s
                    }
                    B0(a, !0, f, null, P);
                    break;
                case"together":
                    B0(a, !1, null, null, void 0);
                    break;
                default:
                    a.memoizedState = null
            }
            return a.child
        }

        function ag(s, a) {
            !(a.mode & 1) && s !== null && (s.alternate = null, a.alternate = null, a.flags |= 2)
        }

        function Is(s, a, f) {
            if (s !== null && (a.dependencies = s.dependencies), ma |= a.lanes, !(f & a.childLanes)) return null;
            if (s !== null && a.child !== s.child) throw Error(n(153));
            if (a.child !== null) {
                for (s = a.child, f = Li(s, s.pendingProps), a.child = f, f.return = a; s.sibling !== null;) s = s.sibling, f = f.sibling = Li(s, s.pendingProps), f.return = a;
                f.sibling = null
            }
            return a.child
        }

        function QU(s, a, f) {
            switch (a.tag) {
                case 3:
                    LP(a), Ll();
                    break;
                case 5:
                    Y5(a);
                    break;
                case 1:
                    fr(a.type) && Bp(a);
                    break;
                case 4:
                    S0(a, a.stateNode.containerInfo);
                    break;
                case 10:
                    var h = a.type._context, S = a.memoizedProps.value;
                    Ft(Yp, h._currentValue), h._currentValue = S;
                    break;
                case 13:
                    if (h = a.memoizedState, h !== null) return h.dehydrated !== null ? (Ft(tn, tn.current & 1), a.flags |= 128, null) : f & a.child.childLanes ? AP(s, a, f) : (Ft(tn, tn.current & 1), s = Is(s, a, f), s !== null ? s.sibling : null);
                    Ft(tn, tn.current & 1);
                    break;
                case 19:
                    if (h = (f & a.childLanes) !== 0, s.flags & 128) {
                        if (h) return NP(s, a, f);
                        a.flags |= 128
                    }
                    if (S = a.memoizedState, S !== null && (S.rendering = null, S.tail = null, S.lastEffect = null), Ft(tn, tn.current), h) break;
                    return null;
                case 22:
                case 23:
                    return a.lanes = 0, kP(s, a, f)
            }
            return Is(s, a, f)
        }

        var $P, U0, DP, IP;
        $P = function (s, a) {
            for (var f = a.child; f !== null;) {
                if (f.tag === 5 || f.tag === 6) s.appendChild(f.stateNode); else if (f.tag !== 4 && f.child !== null) {
                    f.child.return = f, f = f.child;
                    continue
                }
                if (f === a) break;
                for (; f.sibling === null;) {
                    if (f.return === null || f.return === a) return;
                    f = f.return
                }
                f.sibling.return = f.return, f = f.sibling
            }
        }, U0 = function () {
        }, DP = function (s, a, f, h) {
            var S = s.memoizedProps;
            if (S !== h) {
                s = a.stateNode, ga(ss.current);
                var P = null;
                switch (f) {
                    case"input":
                        S = yt(s, S), h = yt(s, h), P = [];
                        break;
                    case"select":
                        S = D({}, S, {value: void 0}), h = D({}, h, {value: void 0}), P = [];
                        break;
                    case"textarea":
                        S = rn(s, S), h = rn(s, h), P = [];
                        break;
                    default:
                        typeof S.onClick != "function" && typeof h.onClick == "function" && (s.onclick = Hp)
                }
                Ht(f, h);
                var L;
                f = null;
                for (le in S) if (!h.hasOwnProperty(le) && S.hasOwnProperty(le) && S[le] != null) if (le === "style") {
                    var G = S[le];
                    for (L in G) G.hasOwnProperty(L) && (f || (f = {}), f[L] = "")
                } else le !== "dangerouslySetInnerHTML" && le !== "children" && le !== "suppressContentEditableWarning" && le !== "suppressHydrationWarning" && le !== "autoFocus" && (o.hasOwnProperty(le) ? P || (P = []) : (P = P || []).push(le, null));
                for (le in h) {
                    var Y = h[le];
                    if (G = S != null ? S[le] : void 0, h.hasOwnProperty(le) && Y !== G && (Y != null || G != null)) if (le === "style") if (G) {
                        for (L in G) !G.hasOwnProperty(L) || Y && Y.hasOwnProperty(L) || (f || (f = {}), f[L] = "");
                        for (L in Y) Y.hasOwnProperty(L) && G[L] !== Y[L] && (f || (f = {}), f[L] = Y[L])
                    } else f || (P || (P = []), P.push(le, f)), f = Y; else le === "dangerouslySetInnerHTML" ? (Y = Y ? Y.__html : void 0, G = G ? G.__html : void 0, Y != null && G !== Y && (P = P || []).push(le, Y)) : le === "children" ? typeof Y != "string" && typeof Y != "number" || (P = P || []).push(le, "" + Y) : le !== "suppressContentEditableWarning" && le !== "suppressHydrationWarning" && (o.hasOwnProperty(le) ? (Y != null && le === "onScroll" && Wt("scroll", s), P || G === Y || (P = [])) : (P = P || []).push(le, Y))
                }
                f && (P = P || []).push("style", f);
                var le = P;
                (a.updateQueue = le) && (a.flags |= 4)
            }
        }, IP = function (s, a, f, h) {
            f !== h && (a.flags |= 4)
        };

        function qu(s, a) {
            if (!Yt) switch (s.tailMode) {
                case"hidden":
                    a = s.tail;
                    for (var f = null; a !== null;) a.alternate !== null && (f = a), a = a.sibling;
                    f === null ? s.tail = null : f.sibling = null;
                    break;
                case"collapsed":
                    f = s.tail;
                    for (var h = null; f !== null;) f.alternate !== null && (h = f), f = f.sibling;
                    h === null ? a || s.tail === null ? s.tail = null : s.tail.sibling = null : h.sibling = null
            }
        }

        function Fn(s) {
            var a = s.alternate !== null && s.alternate.child === s.child, f = 0, h = 0;
            if (a) for (var S = s.child; S !== null;) f |= S.lanes | S.childLanes, h |= S.subtreeFlags & 14680064, h |= S.flags & 14680064, S.return = s, S = S.sibling; else for (S = s.child; S !== null;) f |= S.lanes | S.childLanes, h |= S.subtreeFlags, h |= S.flags, S.return = s, S = S.sibling;
            return s.subtreeFlags |= h, s.childLanes = f, a
        }

        function eW(s, a, f) {
            var h = a.pendingProps;
            switch (f0(a), a.tag) {
                case 2:
                case 16:
                case 15:
                case 0:
                case 11:
                case 7:
                case 8:
                case 12:
                case 9:
                case 14:
                    return Fn(a), null;
                case 1:
                    return fr(a.type) && zp(), Fn(a), null;
                case 3:
                    return h = a.stateNode, Nl(), Gt(dr), Gt(Vn), E0(), h.pendingContext && (h.context = h.pendingContext, h.pendingContext = null), (s === null || s.child === null) && (Kp(a) ? a.flags |= 4 : s === null || s.memoizedState.isDehydrated && !(a.flags & 256) || (a.flags |= 1024, _o !== null && (ty(_o), _o = null))), U0(s, a), Fn(a), null;
                case 5:
                    j0(a);
                    var S = ga(Bu.current);
                    if (f = a.type, s !== null && a.stateNode != null) DP(s, a, f, h, S), s.ref !== a.ref && (a.flags |= 512, a.flags |= 2097152); else {
                        if (!h) {
                            if (a.stateNode === null) throw Error(n(166));
                            return Fn(a), null
                        }
                        if (s = ga(ss.current), Kp(a)) {
                            h = a.stateNode, f = a.type;
                            var P = a.memoizedProps;
                            switch (h[os] = a, h[Iu] = P, s = (a.mode & 1) !== 0, f) {
                                case"dialog":
                                    Wt("cancel", h), Wt("close", h);
                                    break;
                                case"iframe":
                                case"object":
                                case"embed":
                                    Wt("load", h);
                                    break;
                                case"video":
                                case"audio":
                                    for (S = 0; S < Nu.length; S++) Wt(Nu[S], h);
                                    break;
                                case"source":
                                    Wt("error", h);
                                    break;
                                case"img":
                                case"image":
                                case"link":
                                    Wt("error", h), Wt("load", h);
                                    break;
                                case"details":
                                    Wt("toggle", h);
                                    break;
                                case"input":
                                    kt(h, P), Wt("invalid", h);
                                    break;
                                case"select":
                                    h._wrapperState = {wasMultiple: !!P.multiple}, Wt("invalid", h);
                                    break;
                                case"textarea":
                                    Ut(h, P), Wt("invalid", h)
                            }
                            Ht(f, P), S = null;
                            for (var L in P) if (P.hasOwnProperty(L)) {
                                var G = P[L];
                                L === "children" ? typeof G == "string" ? h.textContent !== G && (P.suppressHydrationWarning !== !0 && Vp(h.textContent, G, s), S = ["children", G]) : typeof G == "number" && h.textContent !== "" + G && (P.suppressHydrationWarning !== !0 && Vp(h.textContent, G, s), S = ["children", "" + G]) : o.hasOwnProperty(L) && G != null && L === "onScroll" && Wt("scroll", h)
                            }
                            switch (f) {
                                case"input":
                                    he(h), pt(h, P, !0);
                                    break;
                                case"textarea":
                                    he(h), st(h);
                                    break;
                                case"select":
                                case"option":
                                    break;
                                default:
                                    typeof P.onClick == "function" && (h.onclick = Hp)
                            }
                            h = S, a.updateQueue = h, h !== null && (a.flags |= 4)
                        } else {
                            L = S.nodeType === 9 ? S : S.ownerDocument, s === "http://www.w3.org/1999/xhtml" && (s = Lt(f)), s === "http://www.w3.org/1999/xhtml" ? f === "script" ? (s = L.createElement("div"), s.innerHTML = "<script><\/script>", s = s.removeChild(s.firstChild)) : typeof h.is == "string" ? s = L.createElement(f, {is: h.is}) : (s = L.createElement(f), f === "select" && (L = s, h.multiple ? L.multiple = !0 : h.size && (L.size = h.size))) : s = L.createElementNS(s, f), s[os] = a, s[Iu] = h, $P(s, a, !1, !1), a.stateNode = s;
                            e:{
                                switch (L = Mt(f, h), f) {
                                    case"dialog":
                                        Wt("cancel", s), Wt("close", s), S = h;
                                        break;
                                    case"iframe":
                                    case"object":
                                    case"embed":
                                        Wt("load", s), S = h;
                                        break;
                                    case"video":
                                    case"audio":
                                        for (S = 0; S < Nu.length; S++) Wt(Nu[S], s);
                                        S = h;
                                        break;
                                    case"source":
                                        Wt("error", s), S = h;
                                        break;
                                    case"img":
                                    case"image":
                                    case"link":
                                        Wt("error", s), Wt("load", s), S = h;
                                        break;
                                    case"details":
                                        Wt("toggle", s), S = h;
                                        break;
                                    case"input":
                                        kt(s, h), S = yt(s, h), Wt("invalid", s);
                                        break;
                                    case"option":
                                        S = h;
                                        break;
                                    case"select":
                                        s._wrapperState = {wasMultiple: !!h.multiple}, S = D({}, h, {value: void 0}), Wt("invalid", s);
                                        break;
                                    case"textarea":
                                        Ut(s, h), S = rn(s, h), Wt("invalid", s);
                                        break;
                                    default:
                                        S = h
                                }
                                Ht(f, S), G = S;
                                for (P in G) if (G.hasOwnProperty(P)) {
                                    var Y = G[P];
                                    P === "style" ? aa(s, Y) : P === "dangerouslySetInnerHTML" ? (Y = Y ? Y.__html : void 0, Y != null && Kn(s, Y)) : P === "children" ? typeof Y == "string" ? (f !== "textarea" || Y !== "") && lr(s, Y) : typeof Y == "number" && lr(s, "" + Y) : P !== "suppressContentEditableWarning" && P !== "suppressHydrationWarning" && P !== "autoFocus" && (o.hasOwnProperty(P) ? Y != null && P === "onScroll" && Wt("scroll", s) : Y != null && E(s, P, Y, L))
                                }
                                switch (f) {
                                    case"input":
                                        he(s), pt(s, h, !1);
                                        break;
                                    case"textarea":
                                        he(s), st(s);
                                        break;
                                    case"option":
                                        h.value != null && s.setAttribute("value", "" + ie(h.value));
                                        break;
                                    case"select":
                                        s.multiple = !!h.multiple, P = h.value, P != null ? Dt(s, !!h.multiple, P, !1) : h.defaultValue != null && Dt(s, !!h.multiple, h.defaultValue, !0);
                                        break;
                                    default:
                                        typeof S.onClick == "function" && (s.onclick = Hp)
                                }
                                switch (f) {
                                    case"button":
                                    case"input":
                                    case"select":
                                    case"textarea":
                                        h = !!h.autoFocus;
                                        break e;
                                    case"img":
                                        h = !0;
                                        break e;
                                    default:
                                        h = !1
                                }
                            }
                            h && (a.flags |= 4)
                        }
                        a.ref !== null && (a.flags |= 512, a.flags |= 2097152)
                    }
                    return Fn(a), null;
                case 6:
                    if (s && a.stateNode != null) IP(s, a, s.memoizedProps, h); else {
                        if (typeof h != "string" && a.stateNode === null) throw Error(n(166));
                        if (f = ga(Bu.current), ga(ss.current), Kp(a)) {
                            if (h = a.stateNode, f = a.memoizedProps, h[os] = a, (P = h.nodeValue !== f) && (s = Mr, s !== null)) switch (s.tag) {
                                case 3:
                                    Vp(h.nodeValue, f, (s.mode & 1) !== 0);
                                    break;
                                case 5:
                                    s.memoizedProps.suppressHydrationWarning !== !0 && Vp(h.nodeValue, f, (s.mode & 1) !== 0)
                            }
                            P && (a.flags |= 4)
                        } else h = (f.nodeType === 9 ? f : f.ownerDocument).createTextNode(h), h[os] = a, a.stateNode = h
                    }
                    return Fn(a), null;
                case 13:
                    if (Gt(tn), h = a.memoizedState, s === null || s.memoizedState !== null && s.memoizedState.dehydrated !== null) {
                        if (Yt && Ar !== null && a.mode & 1 && !(a.flags & 128)) F5(), Ll(), a.flags |= 98560, P = !1; else if (P = Kp(a), h !== null && h.dehydrated !== null) {
                            if (s === null) {
                                if (!P) throw Error(n(318));
                                if (P = a.memoizedState, P = P !== null ? P.dehydrated : null, !P) throw Error(n(317));
                                P[os] = a
                            } else Ll(), !(a.flags & 128) && (a.memoizedState = null), a.flags |= 4;
                            Fn(a), P = !1
                        } else _o !== null && (ty(_o), _o = null), P = !0;
                        if (!P) return a.flags & 65536 ? a : null
                    }
                    return a.flags & 128 ? (a.lanes = f, a) : (h = h !== null, h !== (s !== null && s.memoizedState !== null) && h && (a.child.flags |= 8192, a.mode & 1 && (s === null || tn.current & 1 ? bn === 0 && (bn = 3) : oy())), a.updateQueue !== null && (a.flags |= 4), Fn(a), null);
                case 4:
                    return Nl(), U0(s, a), s === null && $u(a.stateNode.containerInfo), Fn(a), null;
                case 10:
                    return y0(a.type._context), Fn(a), null;
                case 17:
                    return fr(a.type) && zp(), Fn(a), null;
                case 19:
                    if (Gt(tn), P = a.memoizedState, P === null) return Fn(a), null;
                    if (h = (a.flags & 128) !== 0, L = P.rendering, L === null) if (h) qu(P, !1); else {
                        if (bn !== 0 || s !== null && s.flags & 128) for (s = a.child; s !== null;) {
                            if (L = Qp(s), L !== null) {
                                for (a.flags |= 128, qu(P, !1), h = L.updateQueue, h !== null && (a.updateQueue = h, a.flags |= 4), a.subtreeFlags = 0, h = f, f = a.child; f !== null;) P = f, s = h, P.flags &= 14680066, L = P.alternate, L === null ? (P.childLanes = 0, P.lanes = s, P.child = null, P.subtreeFlags = 0, P.memoizedProps = null, P.memoizedState = null, P.updateQueue = null, P.dependencies = null, P.stateNode = null) : (P.childLanes = L.childLanes, P.lanes = L.lanes, P.child = L.child, P.subtreeFlags = 0, P.deletions = null, P.memoizedProps = L.memoizedProps, P.memoizedState = L.memoizedState, P.updateQueue = L.updateQueue, P.type = L.type, s = L.dependencies, P.dependencies = s === null ? null : {
                                    lanes: s.lanes,
                                    firstContext: s.firstContext
                                }), f = f.sibling;
                                return Ft(tn, tn.current & 1 | 2), a.child
                            }
                            s = s.sibling
                        }
                        P.tail !== null && cn() > Vl && (a.flags |= 128, h = !0, qu(P, !1), a.lanes = 4194304)
                    } else {
                        if (!h) if (s = Qp(L), s !== null) {
                            if (a.flags |= 128, h = !0, f = s.updateQueue, f !== null && (a.updateQueue = f, a.flags |= 4), qu(P, !0), P.tail === null && P.tailMode === "hidden" && !L.alternate && !Yt) return Fn(a), null
                        } else 2 * cn() - P.renderingStartTime > Vl && f !== 1073741824 && (a.flags |= 128, h = !0, qu(P, !1), a.lanes = 4194304);
                        P.isBackwards ? (L.sibling = a.child, a.child = L) : (f = P.last, f !== null ? f.sibling = L : a.child = L, P.last = L)
                    }
                    return P.tail !== null ? (a = P.tail, P.rendering = a, P.tail = a.sibling, P.renderingStartTime = cn(), a.sibling = null, f = tn.current, Ft(tn, h ? f & 1 | 2 : f & 1), a) : (Fn(a), null);
                case 22:
                case 23:
                    return ry(), h = a.memoizedState !== null, s !== null && s.memoizedState !== null !== h && (a.flags |= 8192), h && a.mode & 1 ? Rr & 1073741824 && (Fn(a), a.subtreeFlags & 6 && (a.flags |= 8192)) : Fn(a), null;
                case 24:
                    return null;
                case 25:
                    return null
            }
            throw Error(n(156, a.tag))
        }

        function tW(s, a) {
            switch (f0(a), a.tag) {
                case 1:
                    return fr(a.type) && zp(), s = a.flags, s & 65536 ? (a.flags = s & -65537 | 128, a) : null;
                case 3:
                    return Nl(), Gt(dr), Gt(Vn), E0(), s = a.flags, s & 65536 && !(s & 128) ? (a.flags = s & -65537 | 128, a) : null;
                case 5:
                    return j0(a), null;
                case 13:
                    if (Gt(tn), s = a.memoizedState, s !== null && s.dehydrated !== null) {
                        if (a.alternate === null) throw Error(n(340));
                        Ll()
                    }
                    return s = a.flags, s & 65536 ? (a.flags = s & -65537 | 128, a) : null;
                case 19:
                    return Gt(tn), null;
                case 4:
                    return Nl(), null;
                case 10:
                    return y0(a.type._context), null;
                case 22:
                case 23:
                    return ry(), null;
                case 24:
                    return null;
                default:
                    return null
            }
        }

        var lg = !1, zn = !1, nW = typeof WeakSet == "function" ? WeakSet : Set, Le = null;

        function Dl(s, a) {
            var f = s.ref;
            if (f !== null) if (typeof f == "function") try {
                f(null)
            } catch (h) {
                on(s, a, h)
            } else f.current = null
        }

        function W0(s, a, f) {
            try {
                f()
            } catch (h) {
                on(s, a, h)
            }
        }

        var VP = !1;

        function rW(s, a) {
            if (r0 = kp, s = v5(), Yv(s)) {
                if ("selectionStart" in s) var f = {start: s.selectionStart, end: s.selectionEnd}; else e:{
                    f = (f = s.ownerDocument) && f.defaultView || window;
                    var h = f.getSelection && f.getSelection();
                    if (h && h.rangeCount !== 0) {
                        f = h.anchorNode;
                        var S = h.anchorOffset, P = h.focusNode;
                        h = h.focusOffset;
                        try {
                            f.nodeType, P.nodeType
                        } catch {
                            f = null;
                            break e
                        }
                        var L = 0, G = -1, Y = -1, le = 0, Se = 0, Ce = s, we = null;
                        t:for (; ;) {
                            for (var Oe; Ce !== f || S !== 0 && Ce.nodeType !== 3 || (G = L + S), Ce !== P || h !== 0 && Ce.nodeType !== 3 || (Y = L + h), Ce.nodeType === 3 && (L += Ce.nodeValue.length), (Oe = Ce.firstChild) !== null;) we = Ce, Ce = Oe;
                            for (; ;) {
                                if (Ce === s) break t;
                                if (we === f && ++le === S && (G = L), we === P && ++Se === h && (Y = L), (Oe = Ce.nextSibling) !== null) break;
                                Ce = we, we = Ce.parentNode
                            }
                            Ce = Oe
                        }
                        f = G === -1 || Y === -1 ? null : {start: G, end: Y}
                    } else f = null
                }
                f = f || {start: 0, end: 0}
            } else f = null;
            for (o0 = {
                focusedElem: s,
                selectionRange: f
            }, kp = !1, Le = a; Le !== null;) if (a = Le, s = a.child, (a.subtreeFlags & 1028) !== 0 && s !== null) s.return = a, Le = s; else for (; Le !== null;) {
                a = Le;
                try {
                    var Re = a.alternate;
                    if (a.flags & 1024) switch (a.tag) {
                        case 0:
                        case 11:
                        case 15:
                            break;
                        case 1:
                            if (Re !== null) {
                                var Ne = Re.memoizedProps, un = Re.memoizedState, re = a.stateNode,
                                    J = re.getSnapshotBeforeUpdate(a.elementType === a.type ? Ne : ko(a.type, Ne), un);
                                re.__reactInternalSnapshotBeforeUpdate = J
                            }
                            break;
                        case 3:
                            var oe = a.stateNode.containerInfo;
                            oe.nodeType === 1 ? oe.textContent = "" : oe.nodeType === 9 && oe.documentElement && oe.removeChild(oe.documentElement);
                            break;
                        case 5:
                        case 6:
                        case 4:
                        case 17:
                            break;
                        default:
                            throw Error(n(163))
                    }
                } catch (Pe) {
                    on(a, a.return, Pe)
                }
                if (s = a.sibling, s !== null) {
                    s.return = a.return, Le = s;
                    break
                }
                Le = a.return
            }
            return Re = VP, VP = !1, Re
        }

        function Yu(s, a, f) {
            var h = a.updateQueue;
            if (h = h !== null ? h.lastEffect : null, h !== null) {
                var S = h = h.next;
                do {
                    if ((S.tag & s) === s) {
                        var P = S.destroy;
                        S.destroy = void 0, P !== void 0 && W0(a, f, P)
                    }
                    S = S.next
                } while (S !== h)
            }
        }

        function cg(s, a) {
            if (a = a.updateQueue, a = a !== null ? a.lastEffect : null, a !== null) {
                var f = a = a.next;
                do {
                    if ((f.tag & s) === s) {
                        var h = f.create;
                        f.destroy = h()
                    }
                    f = f.next
                } while (f !== a)
            }
        }

        function G0(s) {
            var a = s.ref;
            if (a !== null) {
                var f = s.stateNode;
                switch (s.tag) {
                    case 5:
                        s = f;
                        break;
                    default:
                        s = f
                }
                typeof a == "function" ? a(s) : a.current = s
            }
        }

        function HP(s) {
            var a = s.alternate;
            a !== null && (s.alternate = null, HP(a)), s.child = null, s.deletions = null, s.sibling = null, s.tag === 5 && (a = s.stateNode, a !== null && (delete a[os], delete a[Iu], delete a[l0], delete a[VU], delete a[HU])), s.stateNode = null, s.return = null, s.dependencies = null, s.memoizedProps = null, s.memoizedState = null, s.pendingProps = null, s.stateNode = null, s.updateQueue = null
        }

        function FP(s) {
            return s.tag === 5 || s.tag === 3 || s.tag === 4
        }

        function zP(s) {
            e:for (; ;) {
                for (; s.sibling === null;) {
                    if (s.return === null || FP(s.return)) return null;
                    s = s.return
                }
                for (s.sibling.return = s.return, s = s.sibling; s.tag !== 5 && s.tag !== 6 && s.tag !== 18;) {
                    if (s.flags & 2 || s.child === null || s.tag === 4) continue e;
                    s.child.return = s, s = s.child
                }
                if (!(s.flags & 2)) return s.stateNode
            }
        }

        function K0(s, a, f) {
            var h = s.tag;
            if (h === 5 || h === 6) s = s.stateNode, a ? f.nodeType === 8 ? f.parentNode.insertBefore(s, a) : f.insertBefore(s, a) : (f.nodeType === 8 ? (a = f.parentNode, a.insertBefore(s, f)) : (a = f, a.appendChild(s)), f = f._reactRootContainer, f != null || a.onclick !== null || (a.onclick = Hp)); else if (h !== 4 && (s = s.child, s !== null)) for (K0(s, a, f), s = s.sibling; s !== null;) K0(s, a, f), s = s.sibling
        }

        function q0(s, a, f) {
            var h = s.tag;
            if (h === 5 || h === 6) s = s.stateNode, a ? f.insertBefore(s, a) : f.appendChild(s); else if (h !== 4 && (s = s.child, s !== null)) for (q0(s, a, f), s = s.sibling; s !== null;) q0(s, a, f), s = s.sibling
        }

        var Mn = null, To = !1;

        function Pi(s, a, f) {
            for (f = f.child; f !== null;) BP(s, a, f), f = f.sibling
        }

        function BP(s, a, f) {
            if (rs && typeof rs.onCommitFiberUnmount == "function") try {
                rs.onCommitFiberUnmount(Sp, f)
            } catch {
            }
            switch (f.tag) {
                case 5:
                    zn || Dl(f, a);
                case 6:
                    var h = Mn, S = To;
                    Mn = null, Pi(s, a, f), Mn = h, To = S, Mn !== null && (To ? (s = Mn, f = f.stateNode, s.nodeType === 8 ? s.parentNode.removeChild(f) : s.removeChild(f)) : Mn.removeChild(f.stateNode));
                    break;
                case 18:
                    Mn !== null && (To ? (s = Mn, f = f.stateNode, s.nodeType === 8 ? a0(s.parentNode, f) : s.nodeType === 1 && a0(s, f), _u(s)) : a0(Mn, f.stateNode));
                    break;
                case 4:
                    h = Mn, S = To, Mn = f.stateNode.containerInfo, To = !0, Pi(s, a, f), Mn = h, To = S;
                    break;
                case 0:
                case 11:
                case 14:
                case 15:
                    if (!zn && (h = f.updateQueue, h !== null && (h = h.lastEffect, h !== null))) {
                        S = h = h.next;
                        do {
                            var P = S, L = P.destroy;
                            P = P.tag, L !== void 0 && (P & 2 || P & 4) && W0(f, a, L), S = S.next
                        } while (S !== h)
                    }
                    Pi(s, a, f);
                    break;
                case 1:
                    if (!zn && (Dl(f, a), h = f.stateNode, typeof h.componentWillUnmount == "function")) try {
                        h.props = f.memoizedProps, h.state = f.memoizedState, h.componentWillUnmount()
                    } catch (G) {
                        on(f, a, G)
                    }
                    Pi(s, a, f);
                    break;
                case 21:
                    Pi(s, a, f);
                    break;
                case 22:
                    f.mode & 1 ? (zn = (h = zn) || f.memoizedState !== null, Pi(s, a, f), zn = h) : Pi(s, a, f);
                    break;
                default:
                    Pi(s, a, f)
            }
        }

        function UP(s) {
            var a = s.updateQueue;
            if (a !== null) {
                s.updateQueue = null;
                var f = s.stateNode;
                f === null && (f = s.stateNode = new nW), a.forEach(function (h) {
                    var S = fW.bind(null, s, h);
                    f.has(h) || (f.add(h), h.then(S, S))
                })
            }
        }

        function Oo(s, a) {
            var f = a.deletions;
            if (f !== null) for (var h = 0; h < f.length; h++) {
                var S = f[h];
                try {
                    var P = s, L = a, G = L;
                    e:for (; G !== null;) {
                        switch (G.tag) {
                            case 5:
                                Mn = G.stateNode, To = !1;
                                break e;
                            case 3:
                                Mn = G.stateNode.containerInfo, To = !0;
                                break e;
                            case 4:
                                Mn = G.stateNode.containerInfo, To = !0;
                                break e
                        }
                        G = G.return
                    }
                    if (Mn === null) throw Error(n(160));
                    BP(P, L, S), Mn = null, To = !1;
                    var Y = S.alternate;
                    Y !== null && (Y.return = null), S.return = null
                } catch (le) {
                    on(S, a, le)
                }
            }
            if (a.subtreeFlags & 12854) for (a = a.child; a !== null;) WP(a, s), a = a.sibling
        }

        function WP(s, a) {
            var f = s.alternate, h = s.flags;
            switch (s.tag) {
                case 0:
                case 11:
                case 14:
                case 15:
                    if (Oo(a, s), as(s), h & 4) {
                        try {
                            Yu(3, s, s.return), cg(3, s)
                        } catch (Ne) {
                            on(s, s.return, Ne)
                        }
                        try {
                            Yu(5, s, s.return)
                        } catch (Ne) {
                            on(s, s.return, Ne)
                        }
                    }
                    break;
                case 1:
                    Oo(a, s), as(s), h & 512 && f !== null && Dl(f, f.return);
                    break;
                case 5:
                    if (Oo(a, s), as(s), h & 512 && f !== null && Dl(f, f.return), s.flags & 32) {
                        var S = s.stateNode;
                        try {
                            lr(S, "")
                        } catch (Ne) {
                            on(s, s.return, Ne)
                        }
                    }
                    if (h & 4 && (S = s.stateNode, S != null)) {
                        var P = s.memoizedProps, L = f !== null ? f.memoizedProps : P, G = s.type, Y = s.updateQueue;
                        if (s.updateQueue = null, Y !== null) try {
                            G === "input" && P.type === "radio" && P.name != null && Bt(S, P), Mt(G, L);
                            var le = Mt(G, P);
                            for (L = 0; L < Y.length; L += 2) {
                                var Se = Y[L], Ce = Y[L + 1];
                                Se === "style" ? aa(S, Ce) : Se === "dangerouslySetInnerHTML" ? Kn(S, Ce) : Se === "children" ? lr(S, Ce) : E(S, Se, Ce, le)
                            }
                            switch (G) {
                                case"input":
                                    Ct(S, P);
                                    break;
                                case"textarea":
                                    Tt(S, P);
                                    break;
                                case"select":
                                    var we = S._wrapperState.wasMultiple;
                                    S._wrapperState.wasMultiple = !!P.multiple;
                                    var Oe = P.value;
                                    Oe != null ? Dt(S, !!P.multiple, Oe, !1) : we !== !!P.multiple && (P.defaultValue != null ? Dt(S, !!P.multiple, P.defaultValue, !0) : Dt(S, !!P.multiple, P.multiple ? [] : "", !1))
                            }
                            S[Iu] = P
                        } catch (Ne) {
                            on(s, s.return, Ne)
                        }
                    }
                    break;
                case 6:
                    if (Oo(a, s), as(s), h & 4) {
                        if (s.stateNode === null) throw Error(n(162));
                        S = s.stateNode, P = s.memoizedProps;
                        try {
                            S.nodeValue = P
                        } catch (Ne) {
                            on(s, s.return, Ne)
                        }
                    }
                    break;
                case 3:
                    if (Oo(a, s), as(s), h & 4 && f !== null && f.memoizedState.isDehydrated) try {
                        _u(a.containerInfo)
                    } catch (Ne) {
                        on(s, s.return, Ne)
                    }
                    break;
                case 4:
                    Oo(a, s), as(s);
                    break;
                case 13:
                    Oo(a, s), as(s), S = s.child, S.flags & 8192 && (P = S.memoizedState !== null, S.stateNode.isHidden = P, !P || S.alternate !== null && S.alternate.memoizedState !== null || (Z0 = cn())), h & 4 && UP(s);
                    break;
                case 22:
                    if (Se = f !== null && f.memoizedState !== null, s.mode & 1 ? (zn = (le = zn) || Se, Oo(a, s), zn = le) : Oo(a, s), as(s), h & 8192) {
                        if (le = s.memoizedState !== null, (s.stateNode.isHidden = le) && !Se && s.mode & 1) for (Le = s, Se = s.child; Se !== null;) {
                            for (Ce = Le = Se; Le !== null;) {
                                switch (we = Le, Oe = we.child, we.tag) {
                                    case 0:
                                    case 11:
                                    case 14:
                                    case 15:
                                        Yu(4, we, we.return);
                                        break;
                                    case 1:
                                        Dl(we, we.return);
                                        var Re = we.stateNode;
                                        if (typeof Re.componentWillUnmount == "function") {
                                            h = we, f = we.return;
                                            try {
                                                a = h, Re.props = a.memoizedProps, Re.state = a.memoizedState, Re.componentWillUnmount()
                                            } catch (Ne) {
                                                on(h, f, Ne)
                                            }
                                        }
                                        break;
                                    case 5:
                                        Dl(we, we.return);
                                        break;
                                    case 22:
                                        if (we.memoizedState !== null) {
                                            qP(Ce);
                                            continue
                                        }
                                }
                                Oe !== null ? (Oe.return = we, Le = Oe) : qP(Ce)
                            }
                            Se = Se.sibling
                        }
                        e:for (Se = null, Ce = s; ;) {
                            if (Ce.tag === 5) {
                                if (Se === null) {
                                    Se = Ce;
                                    try {
                                        S = Ce.stateNode, le ? (P = S.style, typeof P.setProperty == "function" ? P.setProperty("display", "none", "important") : P.display = "none") : (G = Ce.stateNode, Y = Ce.memoizedProps.style, L = Y != null && Y.hasOwnProperty("display") ? Y.display : null, G.style.display = Ls("display", L))
                                    } catch (Ne) {
                                        on(s, s.return, Ne)
                                    }
                                }
                            } else if (Ce.tag === 6) {
                                if (Se === null) try {
                                    Ce.stateNode.nodeValue = le ? "" : Ce.memoizedProps
                                } catch (Ne) {
                                    on(s, s.return, Ne)
                                }
                            } else if ((Ce.tag !== 22 && Ce.tag !== 23 || Ce.memoizedState === null || Ce === s) && Ce.child !== null) {
                                Ce.child.return = Ce, Ce = Ce.child;
                                continue
                            }
                            if (Ce === s) break e;
                            for (; Ce.sibling === null;) {
                                if (Ce.return === null || Ce.return === s) break e;
                                Se === Ce && (Se = null), Ce = Ce.return
                            }
                            Se === Ce && (Se = null), Ce.sibling.return = Ce.return, Ce = Ce.sibling
                        }
                    }
                    break;
                case 19:
                    Oo(a, s), as(s), h & 4 && UP(s);
                    break;
                case 21:
                    break;
                default:
                    Oo(a, s), as(s)
            }
        }

        function as(s) {
            var a = s.flags;
            if (a & 2) {
                try {
                    e:{
                        for (var f = s.return; f !== null;) {
                            if (FP(f)) {
                                var h = f;
                                break e
                            }
                            f = f.return
                        }
                        throw Error(n(160))
                    }
                    switch (h.tag) {
                        case 5:
                            var S = h.stateNode;
                            h.flags & 32 && (lr(S, ""), h.flags &= -33);
                            var P = zP(s);
                            q0(s, P, S);
                            break;
                        case 3:
                        case 4:
                            var L = h.stateNode.containerInfo, G = zP(s);
                            K0(s, G, L);
                            break;
                        default:
                            throw Error(n(161))
                    }
                } catch (Y) {
                    on(s, s.return, Y)
                }
                s.flags &= -3
            }
            a & 4096 && (s.flags &= -4097)
        }

        function oW(s, a, f) {
            Le = s, GP(s)
        }

        function GP(s, a, f) {
            for (var h = (s.mode & 1) !== 0; Le !== null;) {
                var S = Le, P = S.child;
                if (S.tag === 22 && h) {
                    var L = S.memoizedState !== null || lg;
                    if (!L) {
                        var G = S.alternate, Y = G !== null && G.memoizedState !== null || zn;
                        G = lg;
                        var le = zn;
                        if (lg = L, (zn = Y) && !le) for (Le = S; Le !== null;) L = Le, Y = L.child, L.tag === 22 && L.memoizedState !== null ? YP(S) : Y !== null ? (Y.return = L, Le = Y) : YP(S);
                        for (; P !== null;) Le = P, GP(P), P = P.sibling;
                        Le = S, lg = G, zn = le
                    }
                    KP(s)
                } else S.subtreeFlags & 8772 && P !== null ? (P.return = S, Le = P) : KP(s)
            }
        }

        function KP(s) {
            for (; Le !== null;) {
                var a = Le;
                if (a.flags & 8772) {
                    var f = a.alternate;
                    try {
                        if (a.flags & 8772) switch (a.tag) {
                            case 0:
                            case 11:
                            case 15:
                                zn || cg(5, a);
                                break;
                            case 1:
                                var h = a.stateNode;
                                if (a.flags & 4 && !zn) if (f === null) h.componentDidMount(); else {
                                    var S = a.elementType === a.type ? f.memoizedProps : ko(a.type, f.memoizedProps);
                                    h.componentDidUpdate(S, f.memoizedState, h.__reactInternalSnapshotBeforeUpdate)
                                }
                                var P = a.updateQueue;
                                P !== null && q5(a, P, h);
                                break;
                            case 3:
                                var L = a.updateQueue;
                                if (L !== null) {
                                    if (f = null, a.child !== null) switch (a.child.tag) {
                                        case 5:
                                            f = a.child.stateNode;
                                            break;
                                        case 1:
                                            f = a.child.stateNode
                                    }
                                    q5(a, L, f)
                                }
                                break;
                            case 5:
                                var G = a.stateNode;
                                if (f === null && a.flags & 4) {
                                    f = G;
                                    var Y = a.memoizedProps;
                                    switch (a.type) {
                                        case"button":
                                        case"input":
                                        case"select":
                                        case"textarea":
                                            Y.autoFocus && f.focus();
                                            break;
                                        case"img":
                                            Y.src && (f.src = Y.src)
                                    }
                                }
                                break;
                            case 6:
                                break;
                            case 4:
                                break;
                            case 12:
                                break;
                            case 13:
                                if (a.memoizedState === null) {
                                    var le = a.alternate;
                                    if (le !== null) {
                                        var Se = le.memoizedState;
                                        if (Se !== null) {
                                            var Ce = Se.dehydrated;
                                            Ce !== null && _u(Ce)
                                        }
                                    }
                                }
                                break;
                            case 19:
                            case 17:
                            case 21:
                            case 22:
                            case 23:
                            case 25:
                                break;
                            default:
                                throw Error(n(163))
                        }
                        zn || a.flags & 512 && G0(a)
                    } catch (we) {
                        on(a, a.return, we)
                    }
                }
                if (a === s) {
                    Le = null;
                    break
                }
                if (f = a.sibling, f !== null) {
                    f.return = a.return, Le = f;
                    break
                }
                Le = a.return
            }
        }

        function qP(s) {
            for (; Le !== null;) {
                var a = Le;
                if (a === s) {
                    Le = null;
                    break
                }
                var f = a.sibling;
                if (f !== null) {
                    f.return = a.return, Le = f;
                    break
                }
                Le = a.return
            }
        }

        function YP(s) {
            for (; Le !== null;) {
                var a = Le;
                try {
                    switch (a.tag) {
                        case 0:
                        case 11:
                        case 15:
                            var f = a.return;
                            try {
                                cg(4, a)
                            } catch (Y) {
                                on(a, f, Y)
                            }
                            break;
                        case 1:
                            var h = a.stateNode;
                            if (typeof h.componentDidMount == "function") {
                                var S = a.return;
                                try {
                                    h.componentDidMount()
                                } catch (Y) {
                                    on(a, S, Y)
                                }
                            }
                            var P = a.return;
                            try {
                                G0(a)
                            } catch (Y) {
                                on(a, P, Y)
                            }
                            break;
                        case 5:
                            var L = a.return;
                            try {
                                G0(a)
                            } catch (Y) {
                                on(a, L, Y)
                            }
                    }
                } catch (Y) {
                    on(a, a.return, Y)
                }
                if (a === s) {
                    Le = null;
                    break
                }
                var G = a.sibling;
                if (G !== null) {
                    G.return = a.return, Le = G;
                    break
                }
                Le = a.return
            }
        }

        var sW = Math.ceil, ug = k.ReactCurrentDispatcher, Y0 = k.ReactCurrentOwner, oo = k.ReactCurrentBatchConfig,
            ht = 0, En = null, pn = null, An = 0, Rr = 0, Il = wi(0), bn = 0, Xu = null, ma = 0, dg = 0, X0 = 0,
            Zu = null, gr = null, Z0 = 0, Vl = 1 / 0, Vs = null, fg = !1, J0 = null, _i = null, pg = !1, ki = null,
            gg = 0, Ju = 0, Q0 = null, hg = -1, mg = 0;

        function Xn() {
            return ht & 6 ? cn() : hg !== -1 ? hg : hg = cn()
        }

        function Ti(s) {
            return s.mode & 1 ? ht & 2 && An !== 0 ? An & -An : zU.transition !== null ? (mg === 0 && (mg = zE()), mg) : (s = Ot, s !== 0 || (s = window.event, s = s === void 0 ? 16 : ZE(s.type)), s) : 1
        }

        function Lo(s, a, f, h) {
            if (50 < Ju) throw Ju = 0, Q0 = null, Error(n(185));
            Su(s, f, h), (!(ht & 2) || s !== En) && (s === En && (!(ht & 2) && (dg |= f), bn === 4 && Oi(s, An)), hr(s, h), f === 1 && ht === 0 && !(a.mode & 1) && (Vl = cn() + 500, Up && ji()))
        }

        function hr(s, a) {
            var f = s.callbackNode;
            zB(s, a);
            var h = Ep(s, s === En ? An : 0);
            if (h === 0) f !== null && VE(f), s.callbackNode = null, s.callbackPriority = 0; else if (a = h & -h, s.callbackPriority !== a) {
                if (f != null && VE(f), a === 1) s.tag === 0 ? FU(ZP.bind(null, s)) : $5(ZP.bind(null, s)), DU(function () {
                    !(ht & 6) && ji()
                }), f = null; else {
                    switch (BE(h)) {
                        case 1:
                            f = Mv;
                            break;
                        case 4:
                            f = HE;
                            break;
                        case 16:
                            f = wp;
                            break;
                        case 536870912:
                            f = FE;
                            break;
                        default:
                            f = wp
                    }
                    f = s3(f, XP.bind(null, s))
                }
                s.callbackPriority = a, s.callbackNode = f
            }
        }

        function XP(s, a) {
            if (hg = -1, mg = 0, ht & 6) throw Error(n(327));
            var f = s.callbackNode;
            if (Hl() && s.callbackNode !== f) return null;
            var h = Ep(s, s === En ? An : 0);
            if (h === 0) return null;
            if (h & 30 || h & s.expiredLanes || a) a = vg(s, h); else {
                a = h;
                var S = ht;
                ht |= 2;
                var P = QP();
                (En !== s || An !== a) && (Vs = null, Vl = cn() + 500, ya(s, a));
                do try {
                    lW();
                    break
                } catch (G) {
                    JP(s, G)
                } while (1);
                v0(), ug.current = P, ht = S, pn !== null ? a = 0 : (En = null, An = 0, a = bn)
            }
            if (a !== 0) {
                if (a === 2 && (S = Av(s), S !== 0 && (h = S, a = ey(s, S))), a === 1) throw f = Xu, ya(s, 0), Oi(s, h), hr(s, cn()), f;
                if (a === 6) Oi(s, h); else {
                    if (S = s.current.alternate, !(h & 30) && !iW(S) && (a = vg(s, h), a === 2 && (P = Av(s), P !== 0 && (h = P, a = ey(s, P))), a === 1)) throw f = Xu, ya(s, 0), Oi(s, h), hr(s, cn()), f;
                    switch (s.finishedWork = S, s.finishedLanes = h, a) {
                        case 0:
                        case 1:
                            throw Error(n(345));
                        case 2:
                            ba(s, gr, Vs);
                            break;
                        case 3:
                            if (Oi(s, h), (h & 130023424) === h && (a = Z0 + 500 - cn(), 10 < a)) {
                                if (Ep(s, 0) !== 0) break;
                                if (S = s.suspendedLanes, (S & h) !== h) {
                                    Xn(), s.pingedLanes |= s.suspendedLanes & S;
                                    break
                                }
                                s.timeoutHandle = i0(ba.bind(null, s, gr, Vs), a);
                                break
                            }
                            ba(s, gr, Vs);
                            break;
                        case 4:
                            if (Oi(s, h), (h & 4194240) === h) break;
                            for (a = s.eventTimes, S = -1; 0 < h;) {
                                var L = 31 - Eo(h);
                                P = 1 << L, L = a[L], L > S && (S = L), h &= ~P
                            }
                            if (h = S, h = cn() - h, h = (120 > h ? 120 : 480 > h ? 480 : 1080 > h ? 1080 : 1920 > h ? 1920 : 3e3 > h ? 3e3 : 4320 > h ? 4320 : 1960 * sW(h / 1960)) - h, 10 < h) {
                                s.timeoutHandle = i0(ba.bind(null, s, gr, Vs), h);
                                break
                            }
                            ba(s, gr, Vs);
                            break;
                        case 5:
                            ba(s, gr, Vs);
                            break;
                        default:
                            throw Error(n(329))
                    }
                }
            }
            return hr(s, cn()), s.callbackNode === f ? XP.bind(null, s) : null
        }

        function ey(s, a) {
            var f = Zu;
            return s.current.memoizedState.isDehydrated && (ya(s, a).flags |= 256), s = vg(s, a), s !== 2 && (a = gr, gr = f, a !== null && ty(a)), s
        }

        function ty(s) {
            gr === null ? gr = s : gr.push.apply(gr, s)
        }

        function iW(s) {
            for (var a = s; ;) {
                if (a.flags & 16384) {
                    var f = a.updateQueue;
                    if (f !== null && (f = f.stores, f !== null)) for (var h = 0; h < f.length; h++) {
                        var S = f[h], P = S.getSnapshot;
                        S = S.value;
                        try {
                            if (!Po(P(), S)) return !1
                        } catch {
                            return !1
                        }
                    }
                }
                if (f = a.child, a.subtreeFlags & 16384 && f !== null) f.return = a, a = f; else {
                    if (a === s) break;
                    for (; a.sibling === null;) {
                        if (a.return === null || a.return === s) return !0;
                        a = a.return
                    }
                    a.sibling.return = a.return, a = a.sibling
                }
            }
            return !0
        }

        function Oi(s, a) {
            for (a &= ~X0, a &= ~dg, s.suspendedLanes |= a, s.pingedLanes &= ~a, s = s.expirationTimes; 0 < a;) {
                var f = 31 - Eo(a), h = 1 << f;
                s[f] = -1, a &= ~h
            }
        }

        function ZP(s) {
            if (ht & 6) throw Error(n(327));
            Hl();
            var a = Ep(s, 0);
            if (!(a & 1)) return hr(s, cn()), null;
            var f = vg(s, a);
            if (s.tag !== 0 && f === 2) {
                var h = Av(s);
                h !== 0 && (a = h, f = ey(s, h))
            }
            if (f === 1) throw f = Xu, ya(s, 0), Oi(s, a), hr(s, cn()), f;
            if (f === 6) throw Error(n(345));
            return s.finishedWork = s.current.alternate, s.finishedLanes = a, ba(s, gr, Vs), hr(s, cn()), null
        }

        function ny(s, a) {
            var f = ht;
            ht |= 1;
            try {
                return s(a)
            } finally {
                ht = f, ht === 0 && (Vl = cn() + 500, Up && ji())
            }
        }

        function va(s) {
            ki !== null && ki.tag === 0 && !(ht & 6) && Hl();
            var a = ht;
            ht |= 1;
            var f = oo.transition, h = Ot;
            try {
                if (oo.transition = null, Ot = 1, s) return s()
            } finally {
                Ot = h, oo.transition = f, ht = a, !(ht & 6) && ji()
            }
        }

        function ry() {
            Rr = Il.current, Gt(Il)
        }

        function ya(s, a) {
            s.finishedWork = null, s.finishedLanes = 0;
            var f = s.timeoutHandle;
            if (f !== -1 && (s.timeoutHandle = -1, $U(f)), pn !== null) for (f = pn.return; f !== null;) {
                var h = f;
                switch (f0(h), h.tag) {
                    case 1:
                        h = h.type.childContextTypes, h != null && zp();
                        break;
                    case 3:
                        Nl(), Gt(dr), Gt(Vn), E0();
                        break;
                    case 5:
                        j0(h);
                        break;
                    case 4:
                        Nl();
                        break;
                    case 13:
                        Gt(tn);
                        break;
                    case 19:
                        Gt(tn);
                        break;
                    case 10:
                        y0(h.type._context);
                        break;
                    case 22:
                    case 23:
                        ry()
                }
                f = f.return
            }
            if (En = s, pn = s = Li(s.current, null), An = Rr = a, bn = 0, Xu = null, X0 = dg = ma = 0, gr = Zu = null, pa !== null) {
                for (a = 0; a < pa.length; a++) if (f = pa[a], h = f.interleaved, h !== null) {
                    f.interleaved = null;
                    var S = h.next, P = f.pending;
                    if (P !== null) {
                        var L = P.next;
                        P.next = S, h.next = L
                    }
                    f.pending = h
                }
                pa = null
            }
            return s
        }

        function JP(s, a) {
            do {
                var f = pn;
                try {
                    if (v0(), eg.current = og, tg) {
                        for (var h = nn.memoizedState; h !== null;) {
                            var S = h.queue;
                            S !== null && (S.pending = null), h = h.next
                        }
                        tg = !1
                    }
                    if (ha = 0, Cn = yn = nn = null, Uu = !1, Wu = 0, Y0.current = null, f === null || f.return === null) {
                        bn = 1, Xu = a, pn = null;
                        break
                    }
                    e:{
                        var P = s, L = f.return, G = f, Y = a;
                        if (a = An, G.flags |= 32768, Y !== null && typeof Y == "object" && typeof Y.then == "function") {
                            var le = Y, Se = G, Ce = Se.tag;
                            if (!(Se.mode & 1) && (Ce === 0 || Ce === 11 || Ce === 15)) {
                                var we = Se.alternate;
                                we ? (Se.updateQueue = we.updateQueue, Se.memoizedState = we.memoizedState, Se.lanes = we.lanes) : (Se.updateQueue = null, Se.memoizedState = null)
                            }
                            var Oe = jP(L);
                            if (Oe !== null) {
                                Oe.flags &= -257, CP(Oe, L, G, P, a), Oe.mode & 1 && SP(P, le, a), a = Oe, Y = le;
                                var Re = a.updateQueue;
                                if (Re === null) {
                                    var Ne = new Set;
                                    Ne.add(Y), a.updateQueue = Ne
                                } else Re.add(Y);
                                break e
                            } else {
                                if (!(a & 1)) {
                                    SP(P, le, a), oy();
                                    break e
                                }
                                Y = Error(n(426))
                            }
                        } else if (Yt && G.mode & 1) {
                            var un = jP(L);
                            if (un !== null) {
                                !(un.flags & 65536) && (un.flags |= 256), CP(un, L, G, P, a), h0($l(Y, G));
                                break e
                            }
                        }
                        P = Y = $l(Y, G), bn !== 4 && (bn = 2), Zu === null ? Zu = [P] : Zu.push(P), P = L;
                        do {
                            switch (P.tag) {
                                case 3:
                                    P.flags |= 65536, a &= -a, P.lanes |= a;
                                    var re = xP(P, Y, a);
                                    K5(P, re);
                                    break e;
                                case 1:
                                    G = Y;
                                    var J = P.type, oe = P.stateNode;
                                    if (!(P.flags & 128) && (typeof J.getDerivedStateFromError == "function" || oe !== null && typeof oe.componentDidCatch == "function" && (_i === null || !_i.has(oe)))) {
                                        P.flags |= 65536, a &= -a, P.lanes |= a;
                                        var Pe = wP(P, G, a);
                                        K5(P, Pe);
                                        break e
                                    }
                            }
                            P = P.return
                        } while (P !== null)
                    }
                    t3(f)
                } catch (Ve) {
                    a = Ve, pn === f && f !== null && (pn = f = f.return);
                    continue
                }
                break
            } while (1)
        }

        function QP() {
            var s = ug.current;
            return ug.current = og, s === null ? og : s
        }

        function oy() {
            (bn === 0 || bn === 3 || bn === 2) && (bn = 4), En === null || !(ma & 268435455) && !(dg & 268435455) || Oi(En, An)
        }

        function vg(s, a) {
            var f = ht;
            ht |= 2;
            var h = QP();
            (En !== s || An !== a) && (Vs = null, ya(s, a));
            do try {
                aW();
                break
            } catch (S) {
                JP(s, S)
            } while (1);
            if (v0(), ht = f, ug.current = h, pn !== null) throw Error(n(261));
            return En = null, An = 0, bn
        }

        function aW() {
            for (; pn !== null;) e3(pn)
        }

        function lW() {
            for (; pn !== null && !AB();) e3(pn)
        }

        function e3(s) {
            var a = o3(s.alternate, s, Rr);
            s.memoizedProps = s.pendingProps, a === null ? t3(s) : pn = a, Y0.current = null
        }

        function t3(s) {
            var a = s;
            do {
                var f = a.alternate;
                if (s = a.return, a.flags & 32768) {
                    if (f = tW(f, a), f !== null) {
                        f.flags &= 32767, pn = f;
                        return
                    }
                    if (s !== null) s.flags |= 32768, s.subtreeFlags = 0, s.deletions = null; else {
                        bn = 6, pn = null;
                        return
                    }
                } else if (f = eW(f, a, Rr), f !== null) {
                    pn = f;
                    return
                }
                if (a = a.sibling, a !== null) {
                    pn = a;
                    return
                }
                pn = a = s
            } while (a !== null);
            bn === 0 && (bn = 5)
        }

        function ba(s, a, f) {
            var h = Ot, S = oo.transition;
            try {
                oo.transition = null, Ot = 1, cW(s, a, f, h)
            } finally {
                oo.transition = S, Ot = h
            }
            return null
        }

        function cW(s, a, f, h) {
            do Hl(); while (ki !== null);
            if (ht & 6) throw Error(n(327));
            f = s.finishedWork;
            var S = s.finishedLanes;
            if (f === null) return null;
            if (s.finishedWork = null, s.finishedLanes = 0, f === s.current) throw Error(n(177));
            s.callbackNode = null, s.callbackPriority = 0;
            var P = f.lanes | f.childLanes;
            if (BB(s, P), s === En && (pn = En = null, An = 0), !(f.subtreeFlags & 2064) && !(f.flags & 2064) || pg || (pg = !0, s3(wp, function () {
                return Hl(), null
            })), P = (f.flags & 15990) !== 0, f.subtreeFlags & 15990 || P) {
                P = oo.transition, oo.transition = null;
                var L = Ot;
                Ot = 1;
                var G = ht;
                ht |= 4, Y0.current = null, rW(s, f), WP(f, s), TU(o0), kp = !!r0, o0 = r0 = null, s.current = f, oW(f), RB(), ht = G, Ot = L, oo.transition = P
            } else s.current = f;
            if (pg && (pg = !1, ki = s, gg = S), P = s.pendingLanes, P === 0 && (_i = null), DB(f.stateNode), hr(s, cn()), a !== null) for (h = s.onRecoverableError, f = 0; f < a.length; f++) S = a[f], h(S.value, {
                componentStack: S.stack,
                digest: S.digest
            });
            if (fg) throw fg = !1, s = J0, J0 = null, s;
            return gg & 1 && s.tag !== 0 && Hl(), P = s.pendingLanes, P & 1 ? s === Q0 ? Ju++ : (Ju = 0, Q0 = s) : Ju = 0, ji(), null
        }

        function Hl() {
            if (ki !== null) {
                var s = BE(gg), a = oo.transition, f = Ot;
                try {
                    if (oo.transition = null, Ot = 16 > s ? 16 : s, ki === null) var h = !1; else {
                        if (s = ki, ki = null, gg = 0, ht & 6) throw Error(n(331));
                        var S = ht;
                        for (ht |= 4, Le = s.current; Le !== null;) {
                            var P = Le, L = P.child;
                            if (Le.flags & 16) {
                                var G = P.deletions;
                                if (G !== null) {
                                    for (var Y = 0; Y < G.length; Y++) {
                                        var le = G[Y];
                                        for (Le = le; Le !== null;) {
                                            var Se = Le;
                                            switch (Se.tag) {
                                                case 0:
                                                case 11:
                                                case 15:
                                                    Yu(8, Se, P)
                                            }
                                            var Ce = Se.child;
                                            if (Ce !== null) Ce.return = Se, Le = Ce; else for (; Le !== null;) {
                                                Se = Le;
                                                var we = Se.sibling, Oe = Se.return;
                                                if (HP(Se), Se === le) {
                                                    Le = null;
                                                    break
                                                }
                                                if (we !== null) {
                                                    we.return = Oe, Le = we;
                                                    break
                                                }
                                                Le = Oe
                                            }
                                        }
                                    }
                                    var Re = P.alternate;
                                    if (Re !== null) {
                                        var Ne = Re.child;
                                        if (Ne !== null) {
                                            Re.child = null;
                                            do {
                                                var un = Ne.sibling;
                                                Ne.sibling = null, Ne = un
                                            } while (Ne !== null)
                                        }
                                    }
                                    Le = P
                                }
                            }
                            if (P.subtreeFlags & 2064 && L !== null) L.return = P, Le = L; else e:for (; Le !== null;) {
                                if (P = Le, P.flags & 2048) switch (P.tag) {
                                    case 0:
                                    case 11:
                                    case 15:
                                        Yu(9, P, P.return)
                                }
                                var re = P.sibling;
                                if (re !== null) {
                                    re.return = P.return, Le = re;
                                    break e
                                }
                                Le = P.return
                            }
                        }
                        var J = s.current;
                        for (Le = J; Le !== null;) {
                            L = Le;
                            var oe = L.child;
                            if (L.subtreeFlags & 2064 && oe !== null) oe.return = L, Le = oe; else e:for (L = J; Le !== null;) {
                                if (G = Le, G.flags & 2048) try {
                                    switch (G.tag) {
                                        case 0:
                                        case 11:
                                        case 15:
                                            cg(9, G)
                                    }
                                } catch (Ve) {
                                    on(G, G.return, Ve)
                                }
                                if (G === L) {
                                    Le = null;
                                    break e
                                }
                                var Pe = G.sibling;
                                if (Pe !== null) {
                                    Pe.return = G.return, Le = Pe;
                                    break e
                                }
                                Le = G.return
                            }
                        }
                        if (ht = S, ji(), rs && typeof rs.onPostCommitFiberRoot == "function") try {
                            rs.onPostCommitFiberRoot(Sp, s)
                        } catch {
                        }
                        h = !0
                    }
                    return h
                } finally {
                    Ot = f, oo.transition = a
                }
            }
            return !1
        }

        function n3(s, a, f) {
            a = $l(f, a), a = xP(s, a, 1), s = Ei(s, a, 1), a = Xn(), s !== null && (Su(s, 1, a), hr(s, a))
        }

        function on(s, a, f) {
            if (s.tag === 3) n3(s, s, f); else for (; a !== null;) {
                if (a.tag === 3) {
                    n3(a, s, f);
                    break
                } else if (a.tag === 1) {
                    var h = a.stateNode;
                    if (typeof a.type.getDerivedStateFromError == "function" || typeof h.componentDidCatch == "function" && (_i === null || !_i.has(h))) {
                        s = $l(f, s), s = wP(a, s, 1), a = Ei(a, s, 1), s = Xn(), a !== null && (Su(a, 1, s), hr(a, s));
                        break
                    }
                }
                a = a.return
            }
        }

        function uW(s, a, f) {
            var h = s.pingCache;
            h !== null && h.delete(a), a = Xn(), s.pingedLanes |= s.suspendedLanes & f, En === s && (An & f) === f && (bn === 4 || bn === 3 && (An & 130023424) === An && 500 > cn() - Z0 ? ya(s, 0) : X0 |= f), hr(s, a)
        }

        function r3(s, a) {
            a === 0 && (s.mode & 1 ? (a = Cp, Cp <<= 1, !(Cp & 130023424) && (Cp = 4194304)) : a = 1);
            var f = Xn();
            s = $s(s, a), s !== null && (Su(s, a, f), hr(s, f))
        }

        function dW(s) {
            var a = s.memoizedState, f = 0;
            a !== null && (f = a.retryLane), r3(s, f)
        }

        function fW(s, a) {
            var f = 0;
            switch (s.tag) {
                case 13:
                    var h = s.stateNode, S = s.memoizedState;
                    S !== null && (f = S.retryLane);
                    break;
                case 19:
                    h = s.stateNode;
                    break;
                default:
                    throw Error(n(314))
            }
            h !== null && h.delete(a), r3(s, f)
        }

        var o3;
        o3 = function (s, a, f) {
            if (s !== null) if (s.memoizedProps !== a.pendingProps || dr.current) pr = !0; else {
                if (!(s.lanes & f) && !(a.flags & 128)) return pr = !1, QU(s, a, f);
                pr = !!(s.flags & 131072)
            } else pr = !1, Yt && a.flags & 1048576 && D5(a, Gp, a.index);
            switch (a.lanes = 0, a.tag) {
                case 2:
                    var h = a.type;
                    ag(s, a), s = a.pendingProps;
                    var S = kl(a, Vn.current);
                    Rl(a, f), S = k0(null, a, h, s, S, f);
                    var P = T0();
                    return a.flags |= 1, typeof S == "object" && S !== null && typeof S.render == "function" && S.$$typeof === void 0 ? (a.tag = 1, a.memoizedState = null, a.updateQueue = null, fr(h) ? (P = !0, Bp(a)) : P = !1, a.memoizedState = S.state !== null && S.state !== void 0 ? S.state : null, w0(a), S.updater = sg, a.stateNode = S, S._reactInternals = a, N0(a, h, s, f), a = V0(null, a, h, !0, P, f)) : (a.tag = 0, Yt && P && d0(a), Yn(null, a, S, f), a = a.child), a;
                case 16:
                    h = a.elementType;
                    e:{
                        switch (ag(s, a), s = a.pendingProps, S = h._init, h = S(h._payload), a.type = h, S = a.tag = gW(h), s = ko(h, s), S) {
                            case 0:
                                a = I0(null, a, h, s, f);
                                break e;
                            case 1:
                                a = OP(null, a, h, s, f);
                                break e;
                            case 11:
                                a = EP(null, a, h, s, f);
                                break e;
                            case 14:
                                a = PP(null, a, h, ko(h.type, s), f);
                                break e
                        }
                        throw Error(n(306, h, ""))
                    }
                    return a;
                case 0:
                    return h = a.type, S = a.pendingProps, S = a.elementType === h ? S : ko(h, S), I0(s, a, h, S, f);
                case 1:
                    return h = a.type, S = a.pendingProps, S = a.elementType === h ? S : ko(h, S), OP(s, a, h, S, f);
                case 3:
                    e:{
                        if (LP(a), s === null) throw Error(n(387));
                        h = a.pendingProps, P = a.memoizedState, S = P.element, G5(s, a), Jp(a, h, null, f);
                        var L = a.memoizedState;
                        if (h = L.element, P.isDehydrated) if (P = {
                            element: h,
                            isDehydrated: !1,
                            cache: L.cache,
                            pendingSuspenseBoundaries: L.pendingSuspenseBoundaries,
                            transitions: L.transitions
                        }, a.updateQueue.baseState = P, a.memoizedState = P, a.flags & 256) {
                            S = $l(Error(n(423)), a), a = MP(s, a, h, f, S);
                            break e
                        } else if (h !== S) {
                            S = $l(Error(n(424)), a), a = MP(s, a, h, f, S);
                            break e
                        } else for (Ar = xi(a.stateNode.containerInfo.firstChild), Mr = a, Yt = !0, _o = null, f = U5(a, null, h, f), a.child = f; f;) f.flags = f.flags & -3 | 4096, f = f.sibling; else {
                            if (Ll(), h === S) {
                                a = Is(s, a, f);
                                break e
                            }
                            Yn(s, a, h, f)
                        }
                        a = a.child
                    }
                    return a;
                case 5:
                    return Y5(a), s === null && g0(a), h = a.type, S = a.pendingProps, P = s !== null ? s.memoizedProps : null, L = S.children, s0(h, S) ? L = null : P !== null && s0(h, P) && (a.flags |= 32), TP(s, a), Yn(s, a, L, f), a.child;
                case 6:
                    return s === null && g0(a), null;
                case 13:
                    return AP(s, a, f);
                case 4:
                    return S0(a, a.stateNode.containerInfo), h = a.pendingProps, s === null ? a.child = Ml(a, null, h, f) : Yn(s, a, h, f), a.child;
                case 11:
                    return h = a.type, S = a.pendingProps, S = a.elementType === h ? S : ko(h, S), EP(s, a, h, S, f);
                case 7:
                    return Yn(s, a, a.pendingProps, f), a.child;
                case 8:
                    return Yn(s, a, a.pendingProps.children, f), a.child;
                case 12:
                    return Yn(s, a, a.pendingProps.children, f), a.child;
                case 10:
                    e:{
                        if (h = a.type._context, S = a.pendingProps, P = a.memoizedProps, L = S.value, Ft(Yp, h._currentValue), h._currentValue = L, P !== null) if (Po(P.value, L)) {
                            if (P.children === S.children && !dr.current) {
                                a = Is(s, a, f);
                                break e
                            }
                        } else for (P = a.child, P !== null && (P.return = a); P !== null;) {
                            var G = P.dependencies;
                            if (G !== null) {
                                L = P.child;
                                for (var Y = G.firstContext; Y !== null;) {
                                    if (Y.context === h) {
                                        if (P.tag === 1) {
                                            Y = Ds(-1, f & -f), Y.tag = 2;
                                            var le = P.updateQueue;
                                            if (le !== null) {
                                                le = le.shared;
                                                var Se = le.pending;
                                                Se === null ? Y.next = Y : (Y.next = Se.next, Se.next = Y), le.pending = Y
                                            }
                                        }
                                        P.lanes |= f, Y = P.alternate, Y !== null && (Y.lanes |= f), b0(P.return, f, a), G.lanes |= f;
                                        break
                                    }
                                    Y = Y.next
                                }
                            } else if (P.tag === 10) L = P.type === a.type ? null : P.child; else if (P.tag === 18) {
                                if (L = P.return, L === null) throw Error(n(341));
                                L.lanes |= f, G = L.alternate, G !== null && (G.lanes |= f), b0(L, f, a), L = P.sibling
                            } else L = P.child;
                            if (L !== null) L.return = P; else for (L = P; L !== null;) {
                                if (L === a) {
                                    L = null;
                                    break
                                }
                                if (P = L.sibling, P !== null) {
                                    P.return = L.return, L = P;
                                    break
                                }
                                L = L.return
                            }
                            P = L
                        }
                        Yn(s, a, S.children, f), a = a.child
                    }
                    return a;
                case 9:
                    return S = a.type, h = a.pendingProps.children, Rl(a, f), S = no(S), h = h(S), a.flags |= 1, Yn(s, a, h, f), a.child;
                case 14:
                    return h = a.type, S = ko(h, a.pendingProps), S = ko(h.type, S), PP(s, a, h, S, f);
                case 15:
                    return _P(s, a, a.type, a.pendingProps, f);
                case 17:
                    return h = a.type, S = a.pendingProps, S = a.elementType === h ? S : ko(h, S), ag(s, a), a.tag = 1, fr(h) ? (s = !0, Bp(a)) : s = !1, Rl(a, f), yP(a, h, S), N0(a, h, S, f), V0(null, a, h, !0, s, f);
                case 19:
                    return NP(s, a, f);
                case 22:
                    return kP(s, a, f)
            }
            throw Error(n(156, a.tag))
        };

        function s3(s, a) {
            return IE(s, a)
        }

        function pW(s, a, f, h) {
            this.tag = s, this.key = f, this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null, this.index = 0, this.ref = null, this.pendingProps = a, this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null, this.mode = h, this.subtreeFlags = this.flags = 0, this.deletions = null, this.childLanes = this.lanes = 0, this.alternate = null
        }

        function so(s, a, f, h) {
            return new pW(s, a, f, h)
        }

        function sy(s) {
            return s = s.prototype, !(!s || !s.isReactComponent)
        }

        function gW(s) {
            if (typeof s == "function") return sy(s) ? 1 : 0;
            if (s != null) {
                if (s = s.$$typeof, s === V) return 11;
                if (s === R) return 14
            }
            return 2
        }

        function Li(s, a) {
            var f = s.alternate;
            return f === null ? (f = so(s.tag, a, s.key, s.mode), f.elementType = s.elementType, f.type = s.type, f.stateNode = s.stateNode, f.alternate = s, s.alternate = f) : (f.pendingProps = a, f.type = s.type, f.flags = 0, f.subtreeFlags = 0, f.deletions = null), f.flags = s.flags & 14680064, f.childLanes = s.childLanes, f.lanes = s.lanes, f.child = s.child, f.memoizedProps = s.memoizedProps, f.memoizedState = s.memoizedState, f.updateQueue = s.updateQueue, a = s.dependencies, f.dependencies = a === null ? null : {
                lanes: a.lanes,
                firstContext: a.firstContext
            }, f.sibling = s.sibling, f.index = s.index, f.ref = s.ref, f
        }

        function yg(s, a, f, h, S, P) {
            var L = 2;
            if (h = s, typeof s == "function") sy(s) && (L = 1); else if (typeof s == "string") L = 5; else e:switch (s) {
                case A:
                    return xa(f.children, S, P, a);
                case $:
                    L = 8, S |= 8;
                    break;
                case F:
                    return s = so(12, f, a, S | 2), s.elementType = F, s.lanes = P, s;
                case X:
                    return s = so(13, f, a, S), s.elementType = X, s.lanes = P, s;
                case Z:
                    return s = so(19, f, a, S), s.elementType = Z, s.lanes = P, s;
                case Q:
                    return bg(f, S, P, a);
                default:
                    if (typeof s == "object" && s !== null) switch (s.$$typeof) {
                        case N:
                            L = 10;
                            break e;
                        case z:
                            L = 9;
                            break e;
                        case V:
                            L = 11;
                            break e;
                        case R:
                            L = 14;
                            break e;
                        case B:
                            L = 16, h = null;
                            break e
                    }
                    throw Error(n(130, s == null ? s : typeof s, ""))
            }
            return a = so(L, f, a, S), a.elementType = s, a.type = h, a.lanes = P, a
        }

        function xa(s, a, f, h) {
            return s = so(7, s, h, a), s.lanes = f, s
        }

        function bg(s, a, f, h) {
            return s = so(22, s, h, a), s.elementType = Q, s.lanes = f, s.stateNode = {isHidden: !1}, s
        }

        function iy(s, a, f) {
            return s = so(6, s, null, a), s.lanes = f, s
        }

        function ay(s, a, f) {
            return a = so(4, s.children !== null ? s.children : [], s.key, a), a.lanes = f, a.stateNode = {
                containerInfo: s.containerInfo,
                pendingChildren: null,
                implementation: s.implementation
            }, a
        }

        function hW(s, a, f, h, S) {
            this.tag = a, this.containerInfo = s, this.finishedWork = this.pingCache = this.current = this.pendingChildren = null, this.timeoutHandle = -1, this.callbackNode = this.pendingContext = this.context = null, this.callbackPriority = 0, this.eventTimes = Rv(0), this.expirationTimes = Rv(-1), this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0, this.entanglements = Rv(0), this.identifierPrefix = h, this.onRecoverableError = S, this.mutableSourceEagerHydrationData = null
        }

        function ly(s, a, f, h, S, P, L, G, Y) {
            return s = new hW(s, a, f, G, Y), a === 1 ? (a = 1, P === !0 && (a |= 8)) : a = 0, P = so(3, null, null, a), s.current = P, P.stateNode = s, P.memoizedState = {
                element: h,
                isDehydrated: f,
                cache: null,
                transitions: null,
                pendingSuspenseBoundaries: null
            }, w0(P), s
        }

        function mW(s, a, f) {
            var h = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
            return {$$typeof: O, key: h == null ? null : "" + h, children: s, containerInfo: a, implementation: f}
        }

        function i3(s) {
            if (!s) return Si;
            s = s._reactInternals;
            e:{
                if (la(s) !== s || s.tag !== 1) throw Error(n(170));
                var a = s;
                do {
                    switch (a.tag) {
                        case 3:
                            a = a.stateNode.context;
                            break e;
                        case 1:
                            if (fr(a.type)) {
                                a = a.stateNode.__reactInternalMemoizedMergedChildContext;
                                break e
                            }
                    }
                    a = a.return
                } while (a !== null);
                throw Error(n(171))
            }
            if (s.tag === 1) {
                var f = s.type;
                if (fr(f)) return R5(s, f, a)
            }
            return a
        }

        function a3(s, a, f, h, S, P, L, G, Y) {
            return s = ly(f, h, !0, s, S, P, L, G, Y), s.context = i3(null), f = s.current, h = Xn(), S = Ti(f), P = Ds(h, S), P.callback = a ?? null, Ei(f, P, S), s.current.lanes = S, Su(s, S, h), hr(s, h), s
        }

        function xg(s, a, f, h) {
            var S = a.current, P = Xn(), L = Ti(S);
            return f = i3(f), a.context === null ? a.context = f : a.pendingContext = f, a = Ds(P, L), a.payload = {element: s}, h = h === void 0 ? null : h, h !== null && (a.callback = h), s = Ei(S, a, L), s !== null && (Lo(s, S, L, P), Zp(s, S, L)), L
        }

        function wg(s) {
            if (s = s.current, !s.child) return null;
            switch (s.child.tag) {
                case 5:
                    return s.child.stateNode;
                default:
                    return s.child.stateNode
            }
        }

        function l3(s, a) {
            if (s = s.memoizedState, s !== null && s.dehydrated !== null) {
                var f = s.retryLane;
                s.retryLane = f !== 0 && f < a ? f : a
            }
        }

        function cy(s, a) {
            l3(s, a), (s = s.alternate) && l3(s, a)
        }

        function vW() {
            return null
        }

        var c3 = typeof reportError == "function" ? reportError : function (s) {
            console.error(s)
        };

        function uy(s) {
            this._internalRoot = s
        }

        Sg.prototype.render = uy.prototype.render = function (s) {
            var a = this._internalRoot;
            if (a === null) throw Error(n(409));
            xg(s, a, null, null)
        }, Sg.prototype.unmount = uy.prototype.unmount = function () {
            var s = this._internalRoot;
            if (s !== null) {
                this._internalRoot = null;
                var a = s.containerInfo;
                va(function () {
                    xg(null, s, null, null)
                }), a[Ms] = null
            }
        };

        function Sg(s) {
            this._internalRoot = s
        }

        Sg.prototype.unstable_scheduleHydration = function (s) {
            if (s) {
                var a = GE();
                s = {blockedOn: null, target: s, priority: a};
                for (var f = 0; f < vi.length && a !== 0 && a < vi[f].priority; f++) ;
                vi.splice(f, 0, s), f === 0 && YE(s)
            }
        };

        function dy(s) {
            return !(!s || s.nodeType !== 1 && s.nodeType !== 9 && s.nodeType !== 11)
        }

        function jg(s) {
            return !(!s || s.nodeType !== 1 && s.nodeType !== 9 && s.nodeType !== 11 && (s.nodeType !== 8 || s.nodeValue !== " react-mount-point-unstable "))
        }

        function u3() {
        }

        function yW(s, a, f, h, S) {
            if (S) {
                if (typeof h == "function") {
                    var P = h;
                    h = function () {
                        var le = wg(L);
                        P.call(le)
                    }
                }
                var L = a3(a, h, s, 0, null, !1, !1, "", u3);
                return s._reactRootContainer = L, s[Ms] = L.current, $u(s.nodeType === 8 ? s.parentNode : s), va(), L
            }
            for (; S = s.lastChild;) s.removeChild(S);
            if (typeof h == "function") {
                var G = h;
                h = function () {
                    var le = wg(Y);
                    G.call(le)
                }
            }
            var Y = ly(s, 0, !1, null, null, !1, !1, "", u3);
            return s._reactRootContainer = Y, s[Ms] = Y.current, $u(s.nodeType === 8 ? s.parentNode : s), va(function () {
                xg(a, Y, f, h)
            }), Y
        }

        function Cg(s, a, f, h, S) {
            var P = f._reactRootContainer;
            if (P) {
                var L = P;
                if (typeof S == "function") {
                    var G = S;
                    S = function () {
                        var Y = wg(L);
                        G.call(Y)
                    }
                }
                xg(a, L, s, S)
            } else L = yW(f, a, s, S, h);
            return wg(L)
        }

        UE = function (s) {
            switch (s.tag) {
                case 3:
                    var a = s.stateNode;
                    if (a.current.memoizedState.isDehydrated) {
                        var f = wu(a.pendingLanes);
                        f !== 0 && (Nv(a, f | 1), hr(a, cn()), !(ht & 6) && (Vl = cn() + 500, ji()))
                    }
                    break;
                case 13:
                    va(function () {
                        var h = $s(s, 1);
                        if (h !== null) {
                            var S = Xn();
                            Lo(h, s, 1, S)
                        }
                    }), cy(s, 1)
            }
        }, $v = function (s) {
            if (s.tag === 13) {
                var a = $s(s, 134217728);
                if (a !== null) {
                    var f = Xn();
                    Lo(a, s, 134217728, f)
                }
                cy(s, 134217728)
            }
        }, WE = function (s) {
            if (s.tag === 13) {
                var a = Ti(s), f = $s(s, a);
                if (f !== null) {
                    var h = Xn();
                    Lo(f, s, a, h)
                }
                cy(s, a)
            }
        }, GE = function () {
            return Ot
        }, KE = function (s, a) {
            var f = Ot;
            try {
                return Ot = s, a()
            } finally {
                Ot = f
            }
        }, wo = function (s, a, f) {
            switch (a) {
                case"input":
                    if (Ct(s, f), a = f.name, f.type === "radio" && a != null) {
                        for (f = s; f.parentNode;) f = f.parentNode;
                        for (f = f.querySelectorAll("input[name=" + JSON.stringify("" + a) + '][type="radio"]'), a = 0; a < f.length; a++) {
                            var h = f[a];
                            if (h !== s && h.form === s.form) {
                                var S = Fp(h);
                                if (!S) throw Error(n(90));
                                Ie(h), Ct(h, S)
                            }
                        }
                    }
                    break;
                case"textarea":
                    Tt(s, f);
                    break;
                case"select":
                    a = f.value, a != null && Dt(s, !!f.multiple, a, !1)
            }
        }, Co = ny, ge = va;
        var bW = {usingClientEntryPoint: !1, Events: [Vu, Pl, Fp, Qr, jo, ny]},
            Qu = {findFiberByHostInstance: ca, bundleType: 0, version: "18.3.1", rendererPackageName: "react-dom"},
            xW = {
                bundleType: Qu.bundleType,
                version: Qu.version,
                rendererPackageName: Qu.rendererPackageName,
                rendererConfig: Qu.rendererConfig,
                overrideHookState: null,
                overrideHookStateDeletePath: null,
                overrideHookStateRenamePath: null,
                overrideProps: null,
                overridePropsDeletePath: null,
                overridePropsRenamePath: null,
                setErrorHandler: null,
                setSuspenseHandler: null,
                scheduleUpdate: null,
                currentDispatcherRef: k.ReactCurrentDispatcher,
                findHostInstanceByFiber: function (s) {
                    return s = $E(s), s === null ? null : s.stateNode
                },
                findFiberByHostInstance: Qu.findFiberByHostInstance || vW,
                findHostInstancesForRefresh: null,
                scheduleRefresh: null,
                scheduleRoot: null,
                setRefreshHandler: null,
                getCurrentFiber: null,
                reconcilerVersion: "18.3.1-next-f1338f8080-20240426"
            };
        if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u") {
            var Eg = __REACT_DEVTOOLS_GLOBAL_HOOK__;
            if (!Eg.isDisabled && Eg.supportsFiber) try {
                Sp = Eg.inject(xW), rs = Eg
            } catch {
            }
        }
        return Zn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = bW, Zn.createPortal = function (s, a) {
            var f = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
            if (!dy(a)) throw Error(n(200));
            return mW(s, a, null, f)
        }, Zn.createRoot = function (s, a) {
            if (!dy(s)) throw Error(n(299));
            var f = !1, h = "", S = c3;
            return a != null && (a.unstable_strictMode === !0 && (f = !0), a.identifierPrefix !== void 0 && (h = a.identifierPrefix), a.onRecoverableError !== void 0 && (S = a.onRecoverableError)), a = ly(s, 1, !1, null, null, f, !1, h, S), s[Ms] = a.current, $u(s.nodeType === 8 ? s.parentNode : s), new uy(a)
        }, Zn.findDOMNode = function (s) {
            if (s == null) return null;
            if (s.nodeType === 1) return s;
            var a = s._reactInternals;
            if (a === void 0) throw typeof s.render == "function" ? Error(n(188)) : (s = Object.keys(s).join(","), Error(n(268, s)));
            return s = $E(a), s = s === null ? null : s.stateNode, s
        }, Zn.flushSync = function (s) {
            return va(s)
        }, Zn.hydrate = function (s, a, f) {
            if (!jg(a)) throw Error(n(200));
            return Cg(null, s, a, !0, f)
        }, Zn.hydrateRoot = function (s, a, f) {
            if (!dy(s)) throw Error(n(405));
            var h = f != null && f.hydratedSources || null, S = !1, P = "", L = c3;
            if (f != null && (f.unstable_strictMode === !0 && (S = !0), f.identifierPrefix !== void 0 && (P = f.identifierPrefix), f.onRecoverableError !== void 0 && (L = f.onRecoverableError)), a = a3(a, null, s, 1, f ?? null, S, !1, P, L), s[Ms] = a.current, $u(s), h) for (s = 0; s < h.length; s++) f = h[s], S = f._getVersion, S = S(f._source), a.mutableSourceEagerHydrationData == null ? a.mutableSourceEagerHydrationData = [f, S] : a.mutableSourceEagerHydrationData.push(f, S);
            return new Sg(a)
        }, Zn.render = function (s, a, f) {
            if (!jg(a)) throw Error(n(200));
            return Cg(null, s, a, !1, f)
        }, Zn.unmountComponentAtNode = function (s) {
            if (!jg(s)) throw Error(n(40));
            return s._reactRootContainer ? (va(function () {
                Cg(null, null, s, !1, function () {
                    s._reactRootContainer = null, s[Ms] = null
                })
            }), !0) : !1
        }, Zn.unstable_batchedUpdates = ny, Zn.unstable_renderSubtreeIntoContainer = function (s, a, f, h) {
            if (!jg(f)) throw Error(n(200));
            if (s == null || s._reactInternals === void 0) throw Error(n(38));
            return Cg(s, a, f, !1, h)
        }, Zn.version = "18.3.1-next-f1338f8080-20240426", Zn
    }

    function xy() {
        if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) try {
            __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(xy)
        } catch (e) {
            console.error(e)
        }
    }

    xy(), my.exports = h3();
    var mr = my.exports;
    const kg = zl(mr);

    class m3 extends Error {
        constructor(t, n) {
            super(t), this.error = t, this.errorData = n
        }
    }

    const Wl = async (e, {onError: t, onLoading: n, onResult: r, params: o, rawText: i, ...l}) => {
        try {
            n == null || n(!0);
            const c = o ? new URLSearchParams(o).toString() : "", d = c ? `?${c}` : "", p = await fetch(`${e}${d}`, l);
            if (!p.ok) {
                const m = await p.json();
                throw new m3(m.error || "Request failed!", m.errorData)
            }
            const g = i ? await p.text() : await p.json();
            return r == null || r(g), g
        } catch (c) {
            const d = c instanceof Error ? c : new Error(c);
            return t == null || t(d), d
        } finally {
            n == null || n(!1)
        }
    };

    class Mo {
        static async get(t, n) {
            return Wl(t, {...n, method: "GET"})
        }

        static async post(t, n) {
            return Wl(t, {...n, method: "POST"})
        }

        static async put(t, n) {
            return Wl(t, {...n, method: "PUT"})
        }

        static async patch(t, n) {
            return Wl(t, {...n, method: "PATCH"})
        }

        static async delete(t, n) {
            return Wl(t, {...n, method: "DELETE"})
        }
    }

    function ct(e) {
        for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r];
        throw new Error(typeof e == "number" ? "[MobX] minified error nr: " + e + (n.length ? " " + n.map(String).join(",") : "") + ". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts" : "[MobX] " + e)
    }

    var v3 = {};

    function ed() {
        return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : v3
    }

    var wy = Object.assign, td = Object.getOwnPropertyDescriptor, Ao = Object.defineProperty, Gl = Object.prototype,
        Tg = [];
    Object.freeze(Tg);
    var Og = {};
    Object.freeze(Og);
    var y3 = typeof Proxy < "u", b3 = Object.toString();

    function Sy() {
        y3 || ct("Proxy not available")
    }

    function jy(e) {
        var t = !1;
        return function () {
            if (!t) return t = !0, e.apply(this, arguments)
        }
    }

    var wa = function () {
    };

    function io(e) {
        return typeof e == "function"
    }

    function Ai(e) {
        var t = typeof e;
        switch (t) {
            case"string":
            case"symbol":
            case"number":
                return !0
        }
        return !1
    }

    function nd(e) {
        return e !== null && typeof e == "object"
    }

    function ls(e) {
        if (!nd(e)) return !1;
        var t = Object.getPrototypeOf(e);
        if (t == null) return !0;
        var n = Object.hasOwnProperty.call(t, "constructor") && t.constructor;
        return typeof n == "function" && n.toString() === b3
    }

    function Cy(e) {
        var t = e == null ? void 0 : e.constructor;
        return t ? t.name === "GeneratorFunction" || t.displayName === "GeneratorFunction" : !1
    }

    function Kl(e, t, n) {
        Ao(e, t, {enumerable: !1, writable: !0, configurable: !0, value: n})
    }

    function Ey(e, t, n) {
        Ao(e, t, {enumerable: !1, writable: !1, configurable: !0, value: n})
    }

    function Hs(e, t) {
        var n = "isMobX" + e;
        return t.prototype[n] = !0, function (r) {
            return nd(r) && r[n] === !0
        }
    }

    function Sa(e) {
        return e != null && Object.prototype.toString.call(e) === "[object Map]"
    }

    function x3(e) {
        var t = Object.getPrototypeOf(e), n = Object.getPrototypeOf(t), r = Object.getPrototypeOf(n);
        return r === null
    }

    function cs(e) {
        return e != null && Object.prototype.toString.call(e) === "[object Set]"
    }

    var Py = typeof Object.getOwnPropertySymbols < "u";

    function w3(e) {
        var t = Object.keys(e);
        if (!Py) return t;
        var n = Object.getOwnPropertySymbols(e);
        return n.length ? [].concat(t, n.filter(function (r) {
            return Gl.propertyIsEnumerable.call(e, r)
        })) : t
    }

    var ja = typeof Reflect < "u" && Reflect.ownKeys ? Reflect.ownKeys : Py ? function (e) {
        return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))
    } : Object.getOwnPropertyNames;

    function _y(e) {
        return e === null ? null : typeof e == "object" ? "" + e : e
    }

    function us(e, t) {
        return Gl.hasOwnProperty.call(e, t)
    }

    var S3 = Object.getOwnPropertyDescriptors || function (t) {
        var n = {};
        return ja(t).forEach(function (r) {
            n[r] = td(t, r)
        }), n
    };

    function vr(e, t) {
        return !!(e & t)
    }

    function yr(e, t, n) {
        return n ? e |= t : e &= ~t, e
    }

    function ky(e, t) {
        (t == null || t > e.length) && (t = e.length);
        for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
        return r
    }

    function Ty(e, t) {
        for (var n = 0; n < t.length; n++) {
            var r = t[n];
            r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, C3(r.key), r)
        }
    }

    function Ca(e, t, n) {
        return t && Ty(e.prototype, t), n && Ty(e, n), Object.defineProperty(e, "prototype", {writable: !1}), e
    }

    function Ea(e, t) {
        var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
        if (n) return (n = n.call(e)).next.bind(n);
        if (Array.isArray(e) || (n = E3(e)) || t && e && typeof e.length == "number") {
            n && (e = n);
            var r = 0;
            return function () {
                return r >= e.length ? {done: !0} : {done: !1, value: e[r++]}
            }
        }
        throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)
    }

    function Ri() {
        return Ri = Object.assign ? Object.assign.bind() : function (e) {
            for (var t = 1; t < arguments.length; t++) {
                var n = arguments[t];
                for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r])
            }
            return e
        }, Ri.apply(null, arguments)
    }

    function Oy(e, t) {
        e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Lg(e, t)
    }

    function Lg(e, t) {
        return Lg = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (n, r) {
            return n.__proto__ = r, n
        }, Lg(e, t)
    }

    function j3(e, t) {
        if (typeof e != "object" || !e) return e;
        var n = e[Symbol.toPrimitive];
        if (n !== void 0) {
            var r = n.call(e, t || "default");
            if (typeof r != "object") return r;
            throw new TypeError("@@toPrimitive must return a primitive value.")
        }
        return (t === "string" ? String : Number)(e)
    }

    function C3(e) {
        var t = j3(e, "string");
        return typeof t == "symbol" ? t : t + ""
    }

    function E3(e, t) {
        if (e) {
            if (typeof e == "string") return ky(e, t);
            var n = {}.toString.call(e).slice(8, -1);
            return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? ky(e, t) : void 0
        }
    }

    var Ro = Symbol("mobx-stored-annotations");

    function No(e) {
        function t(n, r) {
            if (Yl(r)) return e.decorate_20223_(n, r);
            ql(n, r, e)
        }

        return Object.assign(t, e)
    }

    function ql(e, t, n) {
        us(e, Ro) || Kl(e, Ro, Ri({}, e[Ro])), R3(n) || (e[Ro][t] = n)
    }

    function P3(e) {
        return us(e, Ro) || Kl(e, Ro, Ri({}, e[Ro])), e[Ro]
    }

    function Yl(e) {
        return typeof e == "object" && typeof e.kind == "string"
    }

    var Be = Symbol("mobx administration"), Fs = function () {
        function e(n) {
            n === void 0 && (n = "Atom"), this.name_ = void 0, this.flags_ = 0, this.observers_ = new Set, this.lastAccessedBy_ = 0, this.lowestObserverState_ = mt.NOT_TRACKING_, this.onBOL = void 0, this.onBUOL = void 0, this.name_ = n
        }

        var t = e.prototype;
        return t.onBO = function () {
            this.onBOL && this.onBOL.forEach(function (r) {
                return r()
            })
        }, t.onBUO = function () {
            this.onBUOL && this.onBUOL.forEach(function (r) {
                return r()
            })
        }, t.reportObserved = function () {
            return Yy(this)
        }, t.reportChanged = function () {
            Nr(), Xy(this), $r()
        }, t.toString = function () {
            return this.name_
        }, Ca(e, [{
            key: "isBeingObserved", get: function () {
                return vr(this.flags_, e.isBeingObservedMask_)
            }, set: function (r) {
                this.flags_ = yr(this.flags_, e.isBeingObservedMask_, r)
            }
        }, {
            key: "isPendingUnobservation", get: function () {
                return vr(this.flags_, e.isPendingUnobservationMask_)
            }, set: function (r) {
                this.flags_ = yr(this.flags_, e.isPendingUnobservationMask_, r)
            }
        }, {
            key: "diffValue", get: function () {
                return vr(this.flags_, e.diffValueMask_) ? 1 : 0
            }, set: function (r) {
                this.flags_ = yr(this.flags_, e.diffValueMask_, r === 1)
            }
        }])
    }();
    Fs.isBeingObservedMask_ = 1, Fs.isPendingUnobservationMask_ = 2, Fs.diffValueMask_ = 4;
    var Mg = Hs("Atom", Fs);

    function Ly(e, t, n) {
        t === void 0 && (t = wa), n === void 0 && (n = wa);
        var r = new Fs(e);
        return t !== wa && H_(r, t), n !== wa && rb(r, n), r
    }

    function _3(e, t) {
        return e === t
    }

    function k3(e, t) {
        return Yg(e, t)
    }

    function T3(e, t) {
        return Yg(e, t, 1)
    }

    function O3(e, t) {
        return Object.is ? Object.is(e, t) : e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t
    }

    var Pa = {identity: _3, structural: k3, default: O3, shallow: T3};

    function Ni(e, t, n) {
        return Bg(e) ? e : Array.isArray(e) ? _n.array(e, {name: n}) : ls(e) ? _n.object(e, void 0, {name: n}) : Sa(e) ? _n.map(e, {name: n}) : cs(e) ? _n.set(e, {name: n}) : typeof e == "function" && !tc(e) && !nc(e) ? Cy(e) ? Vi(e) : ec(n, e) : e
    }

    function L3(e, t, n) {
        if (e == null || Ta(e) || sc(e) || Ws(e) || fo(e)) return e;
        if (Array.isArray(e)) return _n.array(e, {name: n, deep: !1});
        if (ls(e)) return _n.object(e, void 0, {name: n, deep: !1});
        if (Sa(e)) return _n.map(e, {name: n, deep: !1});
        if (cs(e)) return _n.set(e, {name: n, deep: !1})
    }

    function rd(e) {
        return e
    }

    function M3(e, t) {
        return Yg(e, t) ? t : e
    }

    var A3 = "override";

    function R3(e) {
        return e.annotationType_ === A3
    }

    function Xl(e, t) {
        return {annotationType_: e, options_: t, make_: N3, extend_: $3, decorate_20223_: D3}
    }

    function N3(e, t, n, r) {
        var o;
        if ((o = this.options_) != null && o.bound) return this.extend_(e, t, n, !1) === null ? 0 : 1;
        if (r === e.target_) return this.extend_(e, t, n, !1) === null ? 0 : 2;
        if (tc(n.value)) return 1;
        var i = My(e, this, t, n, !1);
        return Ao(r, t, i), 2
    }

    function $3(e, t, n, r) {
        var o = My(e, this, t, n);
        return e.defineProperty_(t, o, r)
    }

    function D3(e, t) {
        var n = t.kind, r = t.name, o = t.addInitializer, i = this, l = function (p) {
            var g, m, v, b;
            return $i((g = (m = i.options_) == null ? void 0 : m.name) != null ? g : r.toString(), p, (v = (b = i.options_) == null ? void 0 : b.autoAction) != null ? v : !1)
        };
        if (n == "field") return function (d) {
            var p, g = d;
            return tc(g) || (g = l(g)), (p = i.options_) != null && p.bound && (g = g.bind(this), g.isMobxAction = !0), g
        };
        if (n == "method") {
            var c;
            return tc(e) || (e = l(e)), (c = this.options_) != null && c.bound && o(function () {
                var d = this, p = d[r].bind(d);
                p.isMobxAction = !0, d[r] = p
            }), e
        }
        ct("Cannot apply '" + i.annotationType_ + "' to '" + String(r) + "' (kind: " + n + "):" + (`
'` + i.annotationType_ + "' can only be used on properties with a function value."))
    }

    function I3(e, t, n, r) {
        t.annotationType_, r.value
    }

    function My(e, t, n, r, o) {
        var i, l, c, d, p, g, m;
        o === void 0 && (o = Te.safeDescriptors), I3(e, t, n, r);
        var v = r.value;
        if ((i = t.options_) != null && i.bound) {
            var b;
            v = v.bind((b = e.proxy_) != null ? b : e.target_)
        }
        return {
            value: $i((l = (c = t.options_) == null ? void 0 : c.name) != null ? l : n.toString(), v, (d = (p = t.options_) == null ? void 0 : p.autoAction) != null ? d : !1, (g = t.options_) != null && g.bound ? (m = e.proxy_) != null ? m : e.target_ : void 0),
            configurable: o ? e.isPlainObject_ : !0,
            enumerable: !1,
            writable: !o
        }
    }

    function Ay(e, t) {
        return {annotationType_: e, options_: t, make_: V3, extend_: H3, decorate_20223_: F3}
    }

    function V3(e, t, n, r) {
        var o;
        if (r === e.target_) return this.extend_(e, t, n, !1) === null ? 0 : 2;
        if ((o = this.options_) != null && o.bound && (!us(e.target_, t) || !nc(e.target_[t])) && this.extend_(e, t, n, !1) === null) return 0;
        if (nc(n.value)) return 1;
        var i = Ry(e, this, t, n, !1, !1);
        return Ao(r, t, i), 2
    }

    function H3(e, t, n, r) {
        var o, i = Ry(e, this, t, n, (o = this.options_) == null ? void 0 : o.bound);
        return e.defineProperty_(t, i, r)
    }

    function F3(e, t) {
        var n, r = t.name, o = t.addInitializer;
        return nc(e) || (e = Vi(e)), (n = this.options_) != null && n.bound && o(function () {
            var i = this, l = i[r].bind(i);
            l.isMobXFlow = !0, i[r] = l
        }), e
    }

    function z3(e, t, n, r) {
        t.annotationType_, r.value
    }

    function Ry(e, t, n, r, o, i) {
        i === void 0 && (i = Te.safeDescriptors), z3(e, t, n, r);
        var l = r.value;
        if (nc(l) || (l = Vi(l)), o) {
            var c;
            l = l.bind((c = e.proxy_) != null ? c : e.target_), l.isMobXFlow = !0
        }
        return {value: l, configurable: i ? e.isPlainObject_ : !0, enumerable: !1, writable: !i}
    }

    function Ag(e, t) {
        return {annotationType_: e, options_: t, make_: B3, extend_: U3, decorate_20223_: W3}
    }

    function B3(e, t, n) {
        return this.extend_(e, t, n, !1) === null ? 0 : 1
    }

    function U3(e, t, n, r) {
        return G3(e, this, t, n), e.defineComputedProperty_(t, Ri({}, this.options_, {get: n.get, set: n.set}), r)
    }

    function W3(e, t) {
        var n = this, r = t.name, o = t.addInitializer;
        return o(function () {
            var i = Hi(this)[Be], l = Ri({}, n.options_, {get: e, context: this});
            l.name || (l.name = "ObservableObject." + r.toString()), i.values_.set(r, new ao(l))
        }), function () {
            return this[Be].getObservablePropValue_(r)
        }
    }

    function G3(e, t, n, r) {
        t.annotationType_, r.get
    }

    function od(e, t) {
        return {annotationType_: e, options_: t, make_: K3, extend_: q3, decorate_20223_: Y3}
    }

    function K3(e, t, n) {
        return this.extend_(e, t, n, !1) === null ? 0 : 1
    }

    function q3(e, t, n, r) {
        var o, i;
        return X3(e, this), e.defineObservableProperty_(t, n.value, (o = (i = this.options_) == null ? void 0 : i.enhancer) != null ? o : Ni, r)
    }

    function Y3(e, t) {
        var n = this, r = t.kind, o = t.name, i = new WeakSet;

        function l(c, d) {
            var p, g, m = Hi(c)[Be],
                v = new zs(d, (p = (g = n.options_) == null ? void 0 : g.enhancer) != null ? p : Ni, "ObservableObject." + o.toString(), !1);
            m.values_.set(o, v), i.add(c)
        }

        if (r == "accessor") return {
            get: function () {
                return i.has(this) || l(this, e.get.call(this)), this[Be].getObservablePropValue_(o)
            }, set: function (d) {
                return i.has(this) || l(this, d), this[Be].setObservablePropValue_(o, d)
            }, init: function (d) {
                return i.has(this) || l(this, d), d
            }
        }
    }

    function X3(e, t, n, r) {
        t.annotationType_
    }

    var Z3 = "true", J3 = Ny();

    function Ny(e) {
        return {annotationType_: Z3, options_: e, make_: Q3, extend_: e_, decorate_20223_: t_}
    }

    function Q3(e, t, n, r) {
        var o, i;
        if (n.get) return ad.make_(e, t, n, r);
        if (n.set) {
            var l = $i(t.toString(), n.set);
            return r === e.target_ ? e.defineProperty_(t, {
                configurable: Te.safeDescriptors ? e.isPlainObject_ : !0,
                set: l
            }) === null ? 0 : 2 : (Ao(r, t, {configurable: !0, set: l}), 2)
        }
        if (r !== e.target_ && typeof n.value == "function") {
            var c;
            if (Cy(n.value)) {
                var d, p = (d = this.options_) != null && d.autoBind ? Vi.bound : Vi;
                return p.make_(e, t, n, r)
            }
            var g = (c = this.options_) != null && c.autoBind ? ec.bound : ec;
            return g.make_(e, t, n, r)
        }
        var m = ((o = this.options_) == null ? void 0 : o.deep) === !1 ? _n.ref : _n;
        if (typeof n.value == "function" && (i = this.options_) != null && i.autoBind) {
            var v;
            n.value = n.value.bind((v = e.proxy_) != null ? v : e.target_)
        }
        return m.make_(e, t, n, r)
    }

    function e_(e, t, n, r) {
        var o, i;
        if (n.get) return ad.extend_(e, t, n, r);
        if (n.set) return e.defineProperty_(t, {
            configurable: Te.safeDescriptors ? e.isPlainObject_ : !0,
            set: $i(t.toString(), n.set)
        }, r);
        if (typeof n.value == "function" && (o = this.options_) != null && o.autoBind) {
            var l;
            n.value = n.value.bind((l = e.proxy_) != null ? l : e.target_)
        }
        var c = ((i = this.options_) == null ? void 0 : i.deep) === !1 ? _n.ref : _n;
        return c.extend_(e, t, n, r)
    }

    function t_(e, t) {
        ct("'" + this.annotationType_ + "' cannot be used as a decorator")
    }

    var n_ = "observable", r_ = "observable.ref", o_ = "observable.shallow", s_ = "observable.struct",
        $y = {deep: !0, name: void 0, defaultDecorator: void 0, proxy: !0};
    Object.freeze($y);

    function sd(e) {
        return e || $y
    }

    var Rg = od(n_), i_ = od(r_, {enhancer: rd}), a_ = od(o_, {enhancer: L3}), l_ = od(s_, {enhancer: M3}), Dy = No(Rg);

    function id(e) {
        return e.deep === !0 ? Ni : e.deep === !1 ? rd : u_(e.defaultDecorator)
    }

    function c_(e) {
        var t;
        return e ? (t = e.defaultDecorator) != null ? t : Ny(e) : void 0
    }

    function u_(e) {
        var t, n;
        return e && (t = (n = e.options_) == null ? void 0 : n.enhancer) != null ? t : Ni
    }

    function Iy(e, t, n) {
        if (Yl(t)) return Rg.decorate_20223_(e, t);
        if (Ai(t)) {
            ql(e, t, Rg);
            return
        }
        return Bg(e) ? e : ls(e) ? _n.object(e, t, n) : Array.isArray(e) ? _n.array(e, t) : Sa(e) ? _n.map(e, t) : cs(e) ? _n.set(e, t) : typeof e == "object" && e !== null ? e : _n.box(e, t)
    }

    wy(Iy, Dy);
    var d_ = {
            box: function (t, n) {
                var r = sd(n);
                return new zs(t, id(r), r.name, !0, r.equals)
            }, array: function (t, n) {
                var r = sd(n);
                return (Te.useProxies === !1 || r.proxy === !1 ? dk : tk)(t, id(r), r.name)
            }, map: function (t, n) {
                var r = sd(n);
                return new db(t, id(r), r.name)
            }, set: function (t, n) {
                var r = sd(n);
                return new pb(t, id(r), r.name)
            }, object: function (t, n, r) {
                return Gs(function () {
                    return sb(Te.useProxies === !1 || (r == null ? void 0 : r.proxy) === !1 ? Hi({}, r) : Z_({}, r), t, n)
                })
            }, ref: No(i_), shallow: No(a_), deep: Dy, struct: No(l_)
        }, _n = wy(Iy, d_), Vy = "computed", f_ = "computed.struct", Ng = Ag(Vy), p_ = Ag(f_, {equals: Pa.structural}),
        ad = function (t, n) {
            if (Yl(n)) return Ng.decorate_20223_(t, n);
            if (Ai(n)) return ql(t, n, Ng);
            if (ls(t)) return No(Ag(Vy, t));
            var r = ls(n) ? n : {};
            return r.get = t, r.name || (r.name = t.name || ""), new ao(r)
        };
    Object.assign(ad, Ng), ad.struct = No(p_);
    var Hy, Fy, ld = 0, g_ = 1, h_ = (Hy = (Fy = td(function () {
        }, "name")) == null ? void 0 : Fy.configurable) != null ? Hy : !1,
        zy = {value: "action", configurable: !0, writable: !1, enumerable: !1};

    function $i(e, t, n, r) {
        n === void 0 && (n = !1);

        function o() {
            return m_(e, n, t, r || this, arguments)
        }

        return o.isMobxAction = !0, o.toString = function () {
            return t.toString()
        }, h_ && (zy.value = e, Ao(o, "name", zy)), o
    }

    function m_(e, t, n, r, o) {
        var i = v_(e, t);
        try {
            return n.apply(r, o)
        } catch (l) {
            throw i.error_ = l, l
        } finally {
            y_(i)
        }
    }

    function v_(e, t, n, r) {
        var o = !1, i = 0, l = Te.trackingDerivation, c = !t || !l;
        Nr();
        var d = Te.allowStateChanges;
        c && (Di(), d = cd(!0));
        var p = Ig(!0), g = {
            runAsAction_: c,
            prevDerivation_: l,
            prevAllowStateChanges_: d,
            prevAllowStateReads_: p,
            notifySpy_: o,
            startTime_: i,
            actionId_: g_++,
            parentActionId_: ld
        };
        return ld = g.actionId_, g
    }

    function y_(e) {
        ld !== e.actionId_ && ct(30), ld = e.parentActionId_, e.error_ !== void 0 && (Te.suppressReactionErrors = !0), ud(e.prevAllowStateChanges_), Jl(e.prevAllowStateReads_), $r(), e.runAsAction_ && ds(e.prevDerivation_), Te.suppressReactionErrors = !1
    }

    function b_(e, t) {
        var n = cd(e);
        try {
            return t()
        } finally {
            ud(n)
        }
    }

    function cd(e) {
        var t = Te.allowStateChanges;
        return Te.allowStateChanges = e, t
    }

    function ud(e) {
        Te.allowStateChanges = e
    }

    var zs = function (e) {
        function t(r, o, i, l, c) {
            var d;
            return i === void 0 && (i = "ObservableValue"), c === void 0 && (c = Pa.default), d = e.call(this, i) || this, d.enhancer = void 0, d.name_ = void 0, d.equals = void 0, d.hasUnreportedChange_ = !1, d.interceptors_ = void 0, d.changeListeners_ = void 0, d.value_ = void 0, d.dehancer = void 0, d.enhancer = o, d.name_ = i, d.equals = c, d.value_ = o(r, void 0, i), d
        }

        Oy(t, e);
        var n = t.prototype;
        return n.dehanceValue = function (o) {
            return this.dehancer !== void 0 ? this.dehancer(o) : o
        }, n.set = function (o) {
            this.value_, o = this.prepareNewValue_(o), o !== Te.UNCHANGED && this.setNewValue_(o)
        }, n.prepareNewValue_ = function (o) {
            if (Dr(this)) {
                var i = Ir(this, {object: this, type: Do, newValue: o});
                if (!i) return Te.UNCHANGED;
                o = i.newValue
            }
            return o = this.enhancer(o, this.value_, this.name_), this.equals(this.value_, o) ? Te.UNCHANGED : o
        }, n.setNewValue_ = function (o) {
            var i = this.value_;
            this.value_ = o, this.reportChanged(), lo(this) && co(this, {
                type: Do,
                object: this,
                newValue: o,
                oldValue: i
            })
        }, n.get = function () {
            return this.reportObserved(), this.dehanceValue(this.value_)
        }, n.intercept_ = function (o) {
            return rc(this, o)
        }, n.observe_ = function (o, i) {
            return i && o({
                observableKind: "value",
                debugObjectName: this.name_,
                object: this,
                type: Do,
                newValue: this.value_,
                oldValue: void 0
            }), oc(this, o)
        }, n.raw = function () {
            return this.value_
        }, n.toJSON = function () {
            return this.get()
        }, n.toString = function () {
            return this.name_ + "[" + this.value_ + "]"
        }, n.valueOf = function () {
            return _y(this.get())
        }, n[Symbol.toPrimitive] = function () {
            return this.valueOf()
        }, t
    }(Fs), x_ = Hs("ObservableValue", zs), ao = function () {
        function e(n) {
            this.dependenciesState_ = mt.NOT_TRACKING_, this.observing_ = [], this.newObserving_ = null, this.observers_ = new Set, this.runId_ = 0, this.lastAccessedBy_ = 0, this.lowestObserverState_ = mt.UP_TO_DATE_, this.unboundDepsCount_ = 0, this.value_ = new fd(null), this.name_ = void 0, this.triggeredBy_ = void 0, this.flags_ = 0, this.derivation = void 0, this.setter_ = void 0, this.isTracing_ = dd.NONE, this.scope_ = void 0, this.equals_ = void 0, this.requiresReaction_ = void 0, this.keepAlive_ = void 0, this.onBOL = void 0, this.onBUOL = void 0, n.get || ct(31), this.derivation = n.get, this.name_ = n.name || "ComputedValue", n.set && (this.setter_ = $i("ComputedValue-setter", n.set)), this.equals_ = n.equals || (n.compareStructural || n.struct ? Pa.structural : Pa.default), this.scope_ = n.context, this.requiresReaction_ = n.requiresReaction, this.keepAlive_ = !!n.keepAlive
        }

        var t = e.prototype;
        return t.onBecomeStale_ = function () {
            E_(this)
        }, t.onBO = function () {
            this.onBOL && this.onBOL.forEach(function (r) {
                return r()
            })
        }, t.onBUO = function () {
            this.onBUOL && this.onBUOL.forEach(function (r) {
                return r()
            })
        }, t.get = function () {
            if (this.isComputing && ct(32, this.name_, this.derivation), Te.inBatch === 0 && this.observers_.size === 0 && !this.keepAlive_) $g(this) && (this.warnAboutUntrackedRead_(), Nr(), this.value_ = this.computeValue_(!1), $r()); else if (Yy(this), $g(this)) {
                var r = Te.trackingContext;
                this.keepAlive_ && !r && (Te.trackingContext = this), this.trackAndCompute() && C_(this), Te.trackingContext = r
            }
            var o = this.value_;
            if (pd(o)) throw o.cause;
            return o
        }, t.set = function (r) {
            if (this.setter_) {
                this.isRunningSetter && ct(33, this.name_), this.isRunningSetter = !0;
                try {
                    this.setter_.call(this.scope_, r)
                } finally {
                    this.isRunningSetter = !1
                }
            } else ct(34, this.name_)
        }, t.trackAndCompute = function () {
            var r = this.value_, o = this.dependenciesState_ === mt.NOT_TRACKING_, i = this.computeValue_(!0),
                l = o || pd(r) || pd(i) || !this.equals_(r, i);
            return l && (this.value_ = i), l
        }, t.computeValue_ = function (r) {
            this.isComputing = !0;
            var o = cd(!1), i;
            if (r) i = By(this, this.derivation, this.scope_); else if (Te.disableErrorBoundaries === !0) i = this.derivation.call(this.scope_); else try {
                i = this.derivation.call(this.scope_)
            } catch (l) {
                i = new fd(l)
            }
            return ud(o), this.isComputing = !1, i
        }, t.suspend_ = function () {
            this.keepAlive_ || (Dg(this), this.value_ = void 0)
        }, t.observe_ = function (r, o) {
            var i = this, l = !0, c = void 0;
            return N_(function () {
                var d = i.get();
                if (!l || o) {
                    var p = Di();
                    r({
                        observableKind: "computed",
                        debugObjectName: i.name_,
                        type: Do,
                        object: i,
                        newValue: d,
                        oldValue: c
                    }), ds(p)
                }
                l = !1, c = d
            })
        }, t.warnAboutUntrackedRead_ = function () {
        }, t.toString = function () {
            return this.name_ + "[" + this.derivation.toString() + "]"
        }, t.valueOf = function () {
            return _y(this.get())
        }, t[Symbol.toPrimitive] = function () {
            return this.valueOf()
        }, Ca(e, [{
            key: "isComputing", get: function () {
                return vr(this.flags_, e.isComputingMask_)
            }, set: function (r) {
                this.flags_ = yr(this.flags_, e.isComputingMask_, r)
            }
        }, {
            key: "isRunningSetter", get: function () {
                return vr(this.flags_, e.isRunningSetterMask_)
            }, set: function (r) {
                this.flags_ = yr(this.flags_, e.isRunningSetterMask_, r)
            }
        }, {
            key: "isBeingObserved", get: function () {
                return vr(this.flags_, e.isBeingObservedMask_)
            }, set: function (r) {
                this.flags_ = yr(this.flags_, e.isBeingObservedMask_, r)
            }
        }, {
            key: "isPendingUnobservation", get: function () {
                return vr(this.flags_, e.isPendingUnobservationMask_)
            }, set: function (r) {
                this.flags_ = yr(this.flags_, e.isPendingUnobservationMask_, r)
            }
        }, {
            key: "diffValue", get: function () {
                return vr(this.flags_, e.diffValueMask_) ? 1 : 0
            }, set: function (r) {
                this.flags_ = yr(this.flags_, e.diffValueMask_, r === 1)
            }
        }])
    }();
    ao.isComputingMask_ = 1, ao.isRunningSetterMask_ = 2, ao.isBeingObservedMask_ = 4, ao.isPendingUnobservationMask_ = 8, ao.diffValueMask_ = 16;
    var Zl = Hs("ComputedValue", ao), mt;
    (function (e) {
        e[e.NOT_TRACKING_ = -1] = "NOT_TRACKING_", e[e.UP_TO_DATE_ = 0] = "UP_TO_DATE_", e[e.POSSIBLY_STALE_ = 1] = "POSSIBLY_STALE_", e[e.STALE_ = 2] = "STALE_"
    })(mt || (mt = {}));
    var dd;
    (function (e) {
        e[e.NONE = 0] = "NONE", e[e.LOG = 1] = "LOG", e[e.BREAK = 2] = "BREAK"
    })(dd || (dd = {}));
    var fd = function (t) {
        this.cause = void 0, this.cause = t
    };

    function pd(e) {
        return e instanceof fd
    }

    function $g(e) {
        switch (e.dependenciesState_) {
            case mt.UP_TO_DATE_:
                return !1;
            case mt.NOT_TRACKING_:
            case mt.STALE_:
                return !0;
            case mt.POSSIBLY_STALE_: {
                for (var t = Ig(!0), n = Di(), r = e.observing_, o = r.length, i = 0; i < o; i++) {
                    var l = r[i];
                    if (Zl(l)) {
                        if (Te.disableErrorBoundaries) l.get(); else try {
                            l.get()
                        } catch {
                            return ds(n), Jl(t), !0
                        }
                        if (e.dependenciesState_ === mt.STALE_) return ds(n), Jl(t), !0
                    }
                }
                return Wy(e), ds(n), Jl(t), !1
            }
        }
    }

    function SW(e) {
    }

    function By(e, t, n) {
        var r = Ig(!0);
        Wy(e), e.newObserving_ = new Array(e.runId_ === 0 ? 100 : e.observing_.length), e.unboundDepsCount_ = 0, e.runId_ = ++Te.runId;
        var o = Te.trackingDerivation;
        Te.trackingDerivation = e, Te.inBatch++;
        var i;
        if (Te.disableErrorBoundaries === !0) i = t.call(n); else try {
            i = t.call(n)
        } catch (l) {
            i = new fd(l)
        }
        return Te.inBatch--, Te.trackingDerivation = o, w_(e), Jl(r), i
    }

    function w_(e) {
        for (var t = e.observing_, n = e.observing_ = e.newObserving_, r = mt.UP_TO_DATE_, o = 0, i = e.unboundDepsCount_, l = 0; l < i; l++) {
            var c = n[l];
            c.diffValue === 0 && (c.diffValue = 1, o !== l && (n[o] = c), o++), c.dependenciesState_ > r && (r = c.dependenciesState_)
        }
        for (n.length = o, e.newObserving_ = null, i = t.length; i--;) {
            var d = t[i];
            d.diffValue === 0 && Ky(d, e), d.diffValue = 0
        }
        for (; o--;) {
            var p = n[o];
            p.diffValue === 1 && (p.diffValue = 0, j_(p, e))
        }
        r !== mt.UP_TO_DATE_ && (e.dependenciesState_ = r, e.onBecomeStale_())
    }

    function Dg(e) {
        var t = e.observing_;
        e.observing_ = [];
        for (var n = t.length; n--;) Ky(t[n], e);
        e.dependenciesState_ = mt.NOT_TRACKING_
    }

    function Uy(e) {
        var t = Di();
        try {
            return e()
        } finally {
            ds(t)
        }
    }

    function Di() {
        var e = Te.trackingDerivation;
        return Te.trackingDerivation = null, e
    }

    function ds(e) {
        Te.trackingDerivation = e
    }

    function Ig(e) {
        var t = Te.allowStateReads;
        return Te.allowStateReads = e, t
    }

    function Jl(e) {
        Te.allowStateReads = e
    }

    function Wy(e) {
        if (e.dependenciesState_ !== mt.UP_TO_DATE_) {
            e.dependenciesState_ = mt.UP_TO_DATE_;
            for (var t = e.observing_, n = t.length; n--;) t[n].lowestObserverState_ = mt.UP_TO_DATE_
        }
    }

    var gd = function () {
        this.version = 6, this.UNCHANGED = {}, this.trackingDerivation = null, this.trackingContext = null, this.runId = 0, this.mobxGuid = 0, this.inBatch = 0, this.pendingUnobservations = [], this.pendingReactions = [], this.isRunningReactions = !1, this.allowStateChanges = !1, this.allowStateReads = !0, this.enforceActions = !0, this.spyListeners = [], this.globalReactionErrorHandlers = [], this.computedRequiresReaction = !1, this.reactionRequiresObservable = !1, this.observableRequiresReaction = !1, this.disableErrorBoundaries = !1, this.suppressReactionErrors = !1, this.useProxies = !0, this.verifyProxies = !1, this.safeDescriptors = !0
    }, hd = !0, Gy = !1, Te = function () {
        var e = ed();
        return e.__mobxInstanceCount > 0 && !e.__mobxGlobals && (hd = !1), e.__mobxGlobals && e.__mobxGlobals.version !== new gd().version && (hd = !1), hd ? e.__mobxGlobals ? (e.__mobxInstanceCount += 1, e.__mobxGlobals.UNCHANGED || (e.__mobxGlobals.UNCHANGED = {}), e.__mobxGlobals) : (e.__mobxInstanceCount = 1, e.__mobxGlobals = new gd) : (setTimeout(function () {
            Gy || ct(35)
        }, 1), new gd)
    }();

    function S_() {
        if ((Te.pendingReactions.length || Te.inBatch || Te.isRunningReactions) && ct(36), Gy = !0, hd) {
            var e = ed();
            --e.__mobxInstanceCount === 0 && (e.__mobxGlobals = void 0), Te = new gd
        }
    }

    function j_(e, t) {
        e.observers_.add(t), e.lowestObserverState_ > t.dependenciesState_ && (e.lowestObserverState_ = t.dependenciesState_)
    }

    function Ky(e, t) {
        e.observers_.delete(t), e.observers_.size === 0 && qy(e)
    }

    function qy(e) {
        e.isPendingUnobservation === !1 && (e.isPendingUnobservation = !0, Te.pendingUnobservations.push(e))
    }

    function Nr() {
        Te.inBatch++
    }

    function $r() {
        if (--Te.inBatch === 0) {
            Zy();
            for (var e = Te.pendingUnobservations, t = 0; t < e.length; t++) {
                var n = e[t];
                n.isPendingUnobservation = !1, n.observers_.size === 0 && (n.isBeingObserved && (n.isBeingObserved = !1, n.onBUO()), n instanceof ao && n.suspend_())
            }
            Te.pendingUnobservations = []
        }
    }

    function Yy(e) {
        var t = Te.trackingDerivation;
        return t !== null ? (t.runId_ !== e.lastAccessedBy_ && (e.lastAccessedBy_ = t.runId_, t.newObserving_[t.unboundDepsCount_++] = e, !e.isBeingObserved && Te.trackingContext && (e.isBeingObserved = !0, e.onBO())), e.isBeingObserved) : (e.observers_.size === 0 && Te.inBatch > 0 && qy(e), !1)
    }

    function Xy(e) {
        e.lowestObserverState_ !== mt.STALE_ && (e.lowestObserverState_ = mt.STALE_, e.observers_.forEach(function (t) {
            t.dependenciesState_ === mt.UP_TO_DATE_ && t.onBecomeStale_(), t.dependenciesState_ = mt.STALE_
        }))
    }

    function C_(e) {
        e.lowestObserverState_ !== mt.STALE_ && (e.lowestObserverState_ = mt.STALE_, e.observers_.forEach(function (t) {
            t.dependenciesState_ === mt.POSSIBLY_STALE_ ? t.dependenciesState_ = mt.STALE_ : t.dependenciesState_ === mt.UP_TO_DATE_ && (e.lowestObserverState_ = mt.UP_TO_DATE_)
        }))
    }

    function E_(e) {
        e.lowestObserverState_ === mt.UP_TO_DATE_ && (e.lowestObserverState_ = mt.POSSIBLY_STALE_, e.observers_.forEach(function (t) {
            t.dependenciesState_ === mt.UP_TO_DATE_ && (t.dependenciesState_ = mt.POSSIBLY_STALE_, t.onBecomeStale_())
        }))
    }

    var $o = function () {
        function e(n, r, o, i) {
            n === void 0 && (n = "Reaction"), this.name_ = void 0, this.onInvalidate_ = void 0, this.errorHandler_ = void 0, this.requiresObservable_ = void 0, this.observing_ = [], this.newObserving_ = [], this.dependenciesState_ = mt.NOT_TRACKING_, this.runId_ = 0, this.unboundDepsCount_ = 0, this.flags_ = 0, this.isTracing_ = dd.NONE, this.name_ = n, this.onInvalidate_ = r, this.errorHandler_ = o, this.requiresObservable_ = i
        }

        var t = e.prototype;
        return t.onBecomeStale_ = function () {
            this.schedule_()
        }, t.schedule_ = function () {
            this.isScheduled || (this.isScheduled = !0, Te.pendingReactions.push(this), Zy())
        }, t.runReaction_ = function () {
            if (!this.isDisposed) {
                Nr(), this.isScheduled = !1;
                var r = Te.trackingContext;
                if (Te.trackingContext = this, $g(this)) {
                    this.isTrackPending = !0;
                    try {
                        this.onInvalidate_()
                    } catch (o) {
                        this.reportExceptionInDerivation_(o)
                    }
                }
                Te.trackingContext = r, $r()
            }
        }, t.track = function (r) {
            if (!this.isDisposed) {
                Nr(), this.isRunning = !0;
                var o = Te.trackingContext;
                Te.trackingContext = this;
                var i = By(this, r, void 0);
                Te.trackingContext = o, this.isRunning = !1, this.isTrackPending = !1, this.isDisposed && Dg(this), pd(i) && this.reportExceptionInDerivation_(i.cause), $r()
            }
        }, t.reportExceptionInDerivation_ = function (r) {
            var o = this;
            if (this.errorHandler_) {
                this.errorHandler_(r, this);
                return
            }
            if (Te.disableErrorBoundaries) throw r;
            var i = "[mobx] uncaught error in '" + this + "'";
            Te.suppressReactionErrors || console.error(i, r), Te.globalReactionErrorHandlers.forEach(function (l) {
                return l(r, o)
            })
        }, t.dispose = function () {
            this.isDisposed || (this.isDisposed = !0, this.isRunning || (Nr(), Dg(this), $r()))
        }, t.getDisposer_ = function (r) {
            var o = this, i = function l() {
                o.dispose(), r == null || r.removeEventListener == null || r.removeEventListener("abort", l)
            };
            return r == null || r.addEventListener == null || r.addEventListener("abort", i), i[Be] = this, i
        }, t.toString = function () {
            return "Reaction[" + this.name_ + "]"
        }, t.trace = function (r) {
        }, Ca(e, [{
            key: "isDisposed", get: function () {
                return vr(this.flags_, e.isDisposedMask_)
            }, set: function (r) {
                this.flags_ = yr(this.flags_, e.isDisposedMask_, r)
            }
        }, {
            key: "isScheduled", get: function () {
                return vr(this.flags_, e.isScheduledMask_)
            }, set: function (r) {
                this.flags_ = yr(this.flags_, e.isScheduledMask_, r)
            }
        }, {
            key: "isTrackPending", get: function () {
                return vr(this.flags_, e.isTrackPendingMask_)
            }, set: function (r) {
                this.flags_ = yr(this.flags_, e.isTrackPendingMask_, r)
            }
        }, {
            key: "isRunning", get: function () {
                return vr(this.flags_, e.isRunningMask_)
            }, set: function (r) {
                this.flags_ = yr(this.flags_, e.isRunningMask_, r)
            }
        }, {
            key: "diffValue", get: function () {
                return vr(this.flags_, e.diffValueMask_) ? 1 : 0
            }, set: function (r) {
                this.flags_ = yr(this.flags_, e.diffValueMask_, r === 1)
            }
        }])
    }();
    $o.isDisposedMask_ = 1, $o.isScheduledMask_ = 2, $o.isTrackPendingMask_ = 4, $o.isRunningMask_ = 8, $o.diffValueMask_ = 16;
    var P_ = 100, Vg = function (t) {
        return t()
    };

    function Zy() {
        Te.inBatch > 0 || Te.isRunningReactions || Vg(__)
    }

    function __() {
        Te.isRunningReactions = !0;
        for (var e = Te.pendingReactions, t = 0; e.length > 0;) {
            ++t === P_ && (console.error("[mobx] cycle in reaction: " + e[0]), e.splice(0));
            for (var n = e.splice(0), r = 0, o = n.length; r < o; r++) n[r].runReaction_()
        }
        Te.isRunningReactions = !1
    }

    var md = Hs("Reaction", $o);

    function k_(e) {
        var t = Vg;
        Vg = function (r) {
            return e(function () {
                return t(r)
            })
        }
    }

    function Ql() {
        return !1
    }

    function jW(e) {
    }

    function CW(e) {
    }

    function EW(e) {
    }

    function T_(e) {
        return console.warn("[mobx.spy] Is a no-op in production builds"), function () {
        }
    }

    var Jy = "action", O_ = "action.bound", Qy = "autoAction", L_ = "autoAction.bound", M_ = "<unnamed action>",
        Hg = Xl(Jy), A_ = Xl(O_, {bound: !0}), Fg = Xl(Qy, {autoAction: !0}), R_ = Xl(L_, {autoAction: !0, bound: !0});

    function eb(e) {
        var t = function (r, o) {
            if (io(r)) return $i(r.name || M_, r, e);
            if (io(o)) return $i(r, o, e);
            if (Yl(o)) return (e ? Fg : Hg).decorate_20223_(r, o);
            if (Ai(o)) return ql(r, o, e ? Fg : Hg);
            if (Ai(r)) return No(Xl(e ? Qy : Jy, {name: r, autoAction: e}))
        };
        return t
    }

    var Ii = eb(!1);
    Object.assign(Ii, Hg);
    var ec = eb(!0);
    Object.assign(ec, Fg), Ii.bound = No(A_), ec.bound = No(R_);

    function tc(e) {
        return io(e) && e.isMobxAction === !0
    }

    function N_(e, t) {
        var n, r, o, i;
        t === void 0 && (t = Og);
        var l = (n = (r = t) == null ? void 0 : r.name) != null ? n : "Autorun", c = !t.scheduler && !t.delay, d;
        if (c) d = new $o(l, function () {
            this.track(m)
        }, t.onError, t.requiresObservable); else {
            var p = tb(t), g = !1;
            d = new $o(l, function () {
                g || (g = !0, p(function () {
                    g = !1, d.isDisposed || d.track(m)
                }))
            }, t.onError, t.requiresObservable)
        }

        function m() {
            e(d)
        }

        return (o = t) != null && (o = o.signal) != null && o.aborted || d.schedule_(), d.getDisposer_((i = t) == null ? void 0 : i.signal)
    }

    var $_ = function (t) {
        return t()
    };

    function tb(e) {
        return e.scheduler ? e.scheduler : e.delay ? function (t) {
            return setTimeout(t, e.delay)
        } : $_
    }

    function nb(e, t, n) {
        var r, o, i;
        n === void 0 && (n = Og);
        var l = (r = n.name) != null ? r : "Reaction", c = Ii(l, n.onError ? D_(n.onError, t) : t),
            d = !n.scheduler && !n.delay, p = tb(n), g = !0, m = !1, v,
            b = n.compareStructural ? Pa.structural : n.equals || Pa.default, x = new $o(l, function () {
                g || d ? w() : m || (m = !0, p(w))
            }, n.onError, n.requiresObservable);

        function w() {
            if (m = !1, !x.isDisposed) {
                var j = !1, C = v;
                x.track(function () {
                    var _ = b_(!1, function () {
                        return e(x)
                    });
                    j = g || !b(v, _), v = _
                }), (g && n.fireImmediately || !g && j) && c(v, C, x), g = !1
            }
        }

        return (o = n) != null && (o = o.signal) != null && o.aborted || x.schedule_(), x.getDisposer_((i = n) == null ? void 0 : i.signal)
    }

    function D_(e, t) {
        return function () {
            try {
                return t.apply(this, arguments)
            } catch (n) {
                e.call(this, n)
            }
        }
    }

    var I_ = "onBO", V_ = "onBUO";

    function H_(e, t, n) {
        return ob(I_, e, t, n)
    }

    function rb(e, t, n) {
        return ob(V_, e, t, n)
    }

    function ob(e, t, n, r) {
        var o = typeof r == "function" ? Oa(t, n) : Oa(t), i = io(r) ? r : n, l = e + "L";
        return o[l] ? o[l].add(i) : o[l] = new Set([i]), function () {
            var c = o[l];
            c && (c.delete(i), c.size === 0 && delete o[l])
        }
    }

    var F_ = "never", vd = "always", z_ = "observed";

    function B_(e) {
        e.isolateGlobalState === !0 && S_();
        var t = e.useProxies, n = e.enforceActions;
        if (t !== void 0 && (Te.useProxies = t === vd ? !0 : t === F_ ? !1 : typeof Proxy < "u"), t === "ifavailable" && (Te.verifyProxies = !0), n !== void 0) {
            var r = n === vd ? vd : n === z_;
            Te.enforceActions = r, Te.allowStateChanges = !(r === !0 || r === vd)
        }
        ["computedRequiresReaction", "reactionRequiresObservable", "observableRequiresReaction", "disableErrorBoundaries", "safeDescriptors"].forEach(function (o) {
            o in e && (Te[o] = !!e[o])
        }), Te.allowStateReads = !Te.observableRequiresReaction, e.reactionScheduler && k_(e.reactionScheduler)
    }

    function sb(e, t, n, r) {
        var o = S3(t);
        return Gs(function () {
            var i = Hi(e, r)[Be];
            ja(o).forEach(function (l) {
                i.extend_(l, o[l], n && l in n ? n[l] : !0)
            })
        }), e
    }

    function U_(e, t) {
        return ib(Oa(e, t))
    }

    function ib(e) {
        var t = {name: e.name_};
        return e.observing_ && e.observing_.length > 0 && (t.dependencies = W_(e.observing_).map(ib)), t
    }

    function W_(e) {
        return Array.from(new Set(e))
    }

    var G_ = 0;

    function ab() {
        this.message = "FLOW_CANCELLED"
    }

    ab.prototype = Object.create(Error.prototype);
    var zg = Ay("flow"), K_ = Ay("flow.bound", {bound: !0}), Vi = Object.assign(function (t, n) {
        if (Yl(n)) return zg.decorate_20223_(t, n);
        if (Ai(n)) return ql(t, n, zg);
        var r = t, o = r.name || "<unnamed flow>", i = function () {
            var c = this, d = arguments, p = ++G_, g = Ii(o + " - runid: " + p + " - init", r).apply(c, d), m,
                v = void 0, b = new Promise(function (x, w) {
                    var j = 0;
                    m = w;

                    function C(k) {
                        v = void 0;
                        var T;
                        try {
                            T = Ii(o + " - runid: " + p + " - yield " + j++, g.next).call(g, k)
                        } catch (O) {
                            return w(O)
                        }
                        E(T)
                    }

                    function _(k) {
                        v = void 0;
                        var T;
                        try {
                            T = Ii(o + " - runid: " + p + " - yield " + j++, g.throw).call(g, k)
                        } catch (O) {
                            return w(O)
                        }
                        E(T)
                    }

                    function E(k) {
                        if (io(k == null ? void 0 : k.then)) {
                            k.then(E, w);
                            return
                        }
                        return k.done ? x(k.value) : (v = Promise.resolve(k.value), v.then(C, _))
                    }

                    C(void 0)
                });
            return b.cancel = Ii(o + " - runid: " + p + " - cancel", function () {
                try {
                    v && lb(v);
                    var x = g.return(void 0), w = Promise.resolve(x.value);
                    w.then(wa, wa), lb(w), m(new ab)
                } catch (j) {
                    m(j)
                }
            }), b
        };
        return i.isMobXFlow = !0, i
    }, zg);
    Vi.bound = No(K_);

    function lb(e) {
        io(e.cancel) && e.cancel()
    }

    function nc(e) {
        return (e == null ? void 0 : e.isMobXFlow) === !0
    }

    function q_(e, t) {
        return e ? t !== void 0 ? Ta(e) ? e[Be].values_.has(t) : !1 : Ta(e) || !!e[Be] || Mg(e) || md(e) || Zl(e) : !1
    }

    function Bg(e) {
        return q_(e)
    }

    function Y_(e) {
        if (Ta(e)) return e[Be].ownKeys_();
        ct(38)
    }

    function yd(e, t, n) {
        return e.set(t, n), n
    }

    function _a(e, t) {
        if (e == null || typeof e != "object" || e instanceof Date || !Bg(e)) return e;
        if (x_(e) || Zl(e)) return _a(e.get(), t);
        if (t.has(e)) return t.get(e);
        if (sc(e)) {
            var n = yd(t, e, new Array(e.length));
            return e.forEach(function (l, c) {
                n[c] = _a(l, t)
            }), n
        }
        if (fo(e)) {
            var r = yd(t, e, new Set);
            return e.forEach(function (l) {
                r.add(_a(l, t))
            }), r
        }
        if (Ws(e)) {
            var o = yd(t, e, new Map);
            return e.forEach(function (l, c) {
                o.set(c, _a(l, t))
            }), o
        } else {
            var i = yd(t, e, {});
            return Y_(e).forEach(function (l) {
                Gl.propertyIsEnumerable.call(e, l) && (i[l] = _a(e[l], t))
            }), i
        }
    }

    function Bs(e, t) {
        return _a(e, new Map)
    }

    function fs(e, t) {
        t === void 0 && (t = void 0), Nr();
        try {
            return e.apply(t)
        } finally {
            $r()
        }
    }

    function ka(e) {
        return e[Be]
    }

    var X_ = {
        has: function (t, n) {
            return ka(t).has_(n)
        }, get: function (t, n) {
            return ka(t).get_(n)
        }, set: function (t, n, r) {
            var o;
            return Ai(n) ? (o = ka(t).set_(n, r, !0)) != null ? o : !0 : !1
        }, deleteProperty: function (t, n) {
            var r;
            return Ai(n) ? (r = ka(t).delete_(n, !0)) != null ? r : !0 : !1
        }, defineProperty: function (t, n, r) {
            var o;
            return (o = ka(t).defineProperty_(n, r)) != null ? o : !0
        }, ownKeys: function (t) {
            return ka(t).ownKeys_()
        }, preventExtensions: function (t) {
            ct(13)
        }
    };

    function Z_(e, t) {
        var n, r;
        return Sy(), e = Hi(e, t), (r = (n = e[Be]).proxy_) != null ? r : n.proxy_ = new Proxy(e, X_)
    }

    function Dr(e) {
        return e.interceptors_ !== void 0 && e.interceptors_.length > 0
    }

    function rc(e, t) {
        var n = e.interceptors_ || (e.interceptors_ = []);
        return n.push(t), jy(function () {
            var r = n.indexOf(t);
            r !== -1 && n.splice(r, 1)
        })
    }

    function Ir(e, t) {
        var n = Di();
        try {
            for (var r = [].concat(e.interceptors_ || []), o = 0, i = r.length; o < i && (t = r[o](t), t && !t.type && ct(14), !!t); o++) ;
            return t
        } finally {
            ds(n)
        }
    }

    function lo(e) {
        return e.changeListeners_ !== void 0 && e.changeListeners_.length > 0
    }

    function oc(e, t) {
        var n = e.changeListeners_ || (e.changeListeners_ = []);
        return n.push(t), jy(function () {
            var r = n.indexOf(t);
            r !== -1 && n.splice(r, 1)
        })
    }

    function co(e, t) {
        var n = Di(), r = e.changeListeners_;
        if (r) {
            r = r.slice();
            for (var o = 0, i = r.length; o < i; o++) r[o](t);
            ds(n)
        }
    }

    function J_(e, t, n) {
        return Gs(function () {
            var r, o = Hi(e, n)[Be];
            (r = t) != null || (t = P3(e)), ja(t).forEach(function (i) {
                return o.make_(i, t[i])
            })
        }), e
    }

    var Ug = Symbol("mobx-keys");

    function Bn(e, t, n) {
        return ls(e) ? sb(e, e, t, n) : (Gs(function () {
            var r = Hi(e, n)[Be];
            if (!e[Ug]) {
                var o = Object.getPrototypeOf(e), i = new Set([].concat(ja(e), ja(o)));
                i.delete("constructor"), i.delete(Be), Kl(o, Ug, i)
            }
            e[Ug].forEach(function (l) {
                return r.make_(l, t && l in t ? t[l] : !0)
            })
        }), e)
    }

    var cb = "splice", Do = "update", Q_ = 1e4, ek = {
        get: function (t, n) {
            var r = t[Be];
            return n === Be ? r : n === "length" ? r.getArrayLength_() : typeof n == "string" && !isNaN(n) ? r.get_(parseInt(n)) : us(bd, n) ? bd[n] : t[n]
        }, set: function (t, n, r) {
            var o = t[Be];
            return n === "length" && o.setArrayLength_(r), typeof n == "symbol" || isNaN(n) ? t[n] = r : o.set_(parseInt(n), r), !0
        }, preventExtensions: function () {
            ct(15)
        }
    }, Wg = function () {
        function e(n, r, o, i) {
            n === void 0 && (n = "ObservableArray"), this.owned_ = void 0, this.legacyMode_ = void 0, this.atom_ = void 0, this.values_ = [], this.interceptors_ = void 0, this.changeListeners_ = void 0, this.enhancer_ = void 0, this.dehancer = void 0, this.proxy_ = void 0, this.lastKnownLength_ = 0, this.owned_ = o, this.legacyMode_ = i, this.atom_ = new Fs(n), this.enhancer_ = function (l, c) {
                return r(l, c, "ObservableArray[..]")
            }
        }

        var t = e.prototype;
        return t.dehanceValue_ = function (r) {
            return this.dehancer !== void 0 ? this.dehancer(r) : r
        }, t.dehanceValues_ = function (r) {
            return this.dehancer !== void 0 && r.length > 0 ? r.map(this.dehancer) : r
        }, t.intercept_ = function (r) {
            return rc(this, r)
        }, t.observe_ = function (r, o) {
            return o === void 0 && (o = !1), o && r({
                observableKind: "array",
                object: this.proxy_,
                debugObjectName: this.atom_.name_,
                type: "splice",
                index: 0,
                added: this.values_.slice(),
                addedCount: this.values_.length,
                removed: [],
                removedCount: 0
            }), oc(this, r)
        }, t.getArrayLength_ = function () {
            return this.atom_.reportObserved(), this.values_.length
        }, t.setArrayLength_ = function (r) {
            (typeof r != "number" || isNaN(r) || r < 0) && ct("Out of range: " + r);
            var o = this.values_.length;
            if (r !== o) if (r > o) {
                for (var i = new Array(r - o), l = 0; l < r - o; l++) i[l] = void 0;
                this.spliceWithArray_(o, 0, i)
            } else this.spliceWithArray_(r, o - r)
        }, t.updateArrayLength_ = function (r, o) {
            r !== this.lastKnownLength_ && ct(16), this.lastKnownLength_ += o, this.legacyMode_ && o > 0 && Sb(r + o + 1)
        }, t.spliceWithArray_ = function (r, o, i) {
            var l = this;
            this.atom_;
            var c = this.values_.length;
            if (r === void 0 ? r = 0 : r > c ? r = c : r < 0 && (r = Math.max(0, c + r)), arguments.length === 1 ? o = c - r : o == null ? o = 0 : o = Math.max(0, Math.min(o, c - r)), i === void 0 && (i = Tg), Dr(this)) {
                var d = Ir(this, {object: this.proxy_, type: cb, index: r, removedCount: o, added: i});
                if (!d) return Tg;
                o = d.removedCount, i = d.added
            }
            if (i = i.length === 0 ? i : i.map(function (m) {
                return l.enhancer_(m, void 0)
            }), this.legacyMode_) {
                var p = i.length - o;
                this.updateArrayLength_(c, p)
            }
            var g = this.spliceItemsIntoValues_(r, o, i);
            return (o !== 0 || i.length !== 0) && this.notifyArraySplice_(r, i, g), this.dehanceValues_(g)
        }, t.spliceItemsIntoValues_ = function (r, o, i) {
            if (i.length < Q_) {
                var l;
                return (l = this.values_).splice.apply(l, [r, o].concat(i))
            } else {
                var c = this.values_.slice(r, r + o), d = this.values_.slice(r + o);
                this.values_.length += i.length - o;
                for (var p = 0; p < i.length; p++) this.values_[r + p] = i[p];
                for (var g = 0; g < d.length; g++) this.values_[r + i.length + g] = d[g];
                return c
            }
        }, t.notifyArrayChildUpdate_ = function (r, o, i) {
            var l = !this.owned_ && Ql(), c = lo(this), d = c || l ? {
                observableKind: "array",
                object: this.proxy_,
                type: Do,
                debugObjectName: this.atom_.name_,
                index: r,
                newValue: o,
                oldValue: i
            } : null;
            this.atom_.reportChanged(), c && co(this, d)
        }, t.notifyArraySplice_ = function (r, o, i) {
            var l = !this.owned_ && Ql(), c = lo(this), d = c || l ? {
                observableKind: "array",
                object: this.proxy_,
                debugObjectName: this.atom_.name_,
                type: cb,
                index: r,
                removed: i,
                added: o,
                removedCount: i.length,
                addedCount: o.length
            } : null;
            this.atom_.reportChanged(), c && co(this, d)
        }, t.get_ = function (r) {
            if (this.legacyMode_ && r >= this.values_.length) {
                console.warn("[mobx] Out of bounds read: " + r);
                return
            }
            return this.atom_.reportObserved(), this.dehanceValue_(this.values_[r])
        }, t.set_ = function (r, o) {
            var i = this.values_;
            if (this.legacyMode_ && r > i.length && ct(17, r, i.length), r < i.length) {
                this.atom_;
                var l = i[r];
                if (Dr(this)) {
                    var c = Ir(this, {type: Do, object: this.proxy_, index: r, newValue: o});
                    if (!c) return;
                    o = c.newValue
                }
                o = this.enhancer_(o, l);
                var d = o !== l;
                d && (i[r] = o, this.notifyArrayChildUpdate_(r, o, l))
            } else {
                for (var p = new Array(r + 1 - i.length), g = 0; g < p.length - 1; g++) p[g] = void 0;
                p[p.length - 1] = o, this.spliceWithArray_(i.length, 0, p)
            }
        }, e
    }();

    function tk(e, t, n, r) {
        return n === void 0 && (n = "ObservableArray"), r === void 0 && (r = !1), Sy(), Gs(function () {
            var o = new Wg(n, t, r, !1);
            Ey(o.values_, Be, o);
            var i = new Proxy(o.values_, ek);
            return o.proxy_ = i, e && e.length && o.spliceWithArray_(0, 0, e), i
        })
    }

    var bd = {
        clear: function () {
            return this.splice(0)
        }, replace: function (t) {
            var n = this[Be];
            return n.spliceWithArray_(0, n.values_.length, t)
        }, toJSON: function () {
            return this.slice()
        }, splice: function (t, n) {
            for (var r = arguments.length, o = new Array(r > 2 ? r - 2 : 0), i = 2; i < r; i++) o[i - 2] = arguments[i];
            var l = this[Be];
            switch (arguments.length) {
                case 0:
                    return [];
                case 1:
                    return l.spliceWithArray_(t);
                case 2:
                    return l.spliceWithArray_(t, n)
            }
            return l.spliceWithArray_(t, n, o)
        }, spliceWithArray: function (t, n, r) {
            return this[Be].spliceWithArray_(t, n, r)
        }, push: function () {
            for (var t = this[Be], n = arguments.length, r = new Array(n), o = 0; o < n; o++) r[o] = arguments[o];
            return t.spliceWithArray_(t.values_.length, 0, r), t.values_.length
        }, pop: function () {
            return this.splice(Math.max(this[Be].values_.length - 1, 0), 1)[0]
        }, shift: function () {
            return this.splice(0, 1)[0]
        }, unshift: function () {
            for (var t = this[Be], n = arguments.length, r = new Array(n), o = 0; o < n; o++) r[o] = arguments[o];
            return t.spliceWithArray_(0, 0, r), t.values_.length
        }, reverse: function () {
            return Te.trackingDerivation && ct(37, "reverse"), this.replace(this.slice().reverse()), this
        }, sort: function () {
            Te.trackingDerivation && ct(37, "sort");
            var t = this.slice();
            return t.sort.apply(t, arguments), this.replace(t), this
        }, remove: function (t) {
            var n = this[Be], r = n.dehanceValues_(n.values_).indexOf(t);
            return r > -1 ? (this.splice(r, 1), !0) : !1
        }
    };
    It("at", br), It("concat", br), It("flat", br), It("includes", br), It("indexOf", br), It("join", br), It("lastIndexOf", br), It("slice", br), It("toString", br), It("toLocaleString", br), It("toSorted", br), It("toSpliced", br), It("with", br), It("every", uo), It("filter", uo), It("find", uo), It("findIndex", uo), It("findLast", uo), It("findLastIndex", uo), It("flatMap", uo), It("forEach", uo), It("map", uo), It("some", uo), It("toReversed", uo), It("reduce", ub), It("reduceRight", ub);

    function It(e, t) {
        typeof Array.prototype[e] == "function" && (bd[e] = t(e))
    }

    function br(e) {
        return function () {
            var t = this[Be];
            t.atom_.reportObserved();
            var n = t.dehanceValues_(t.values_);
            return n[e].apply(n, arguments)
        }
    }

    function uo(e) {
        return function (t, n) {
            var r = this, o = this[Be];
            o.atom_.reportObserved();
            var i = o.dehanceValues_(o.values_);
            return i[e](function (l, c) {
                return t.call(n, l, c, r)
            })
        }
    }

    function ub(e) {
        return function () {
            var t = this, n = this[Be];
            n.atom_.reportObserved();
            var r = n.dehanceValues_(n.values_), o = arguments[0];
            return arguments[0] = function (i, l, c) {
                return o(i, l, c, t)
            }, r[e].apply(r, arguments)
        }
    }

    var nk = Hs("ObservableArrayAdministration", Wg);

    function sc(e) {
        return nd(e) && nk(e[Be])
    }

    var rk = {}, Us = "add", xd = "delete", db = function () {
        function e(n, r, o) {
            var i = this;
            r === void 0 && (r = Ni), o === void 0 && (o = "ObservableMap"), this.enhancer_ = void 0, this.name_ = void 0, this[Be] = rk, this.data_ = void 0, this.hasMap_ = void 0, this.keysAtom_ = void 0, this.interceptors_ = void 0, this.changeListeners_ = void 0, this.dehancer = void 0, this.enhancer_ = r, this.name_ = o, io(Map) || ct(18), Gs(function () {
                i.keysAtom_ = Ly("ObservableMap.keys()"), i.data_ = new Map, i.hasMap_ = new Map, n && i.merge(n)
            })
        }

        var t = e.prototype;
        return t.has_ = function (r) {
            return this.data_.has(r)
        }, t.has = function (r) {
            var o = this;
            if (!Te.trackingDerivation) return this.has_(r);
            var i = this.hasMap_.get(r);
            if (!i) {
                var l = i = new zs(this.has_(r), rd, "ObservableMap.key?", !1);
                this.hasMap_.set(r, l), rb(l, function () {
                    return o.hasMap_.delete(r)
                })
            }
            return i.get()
        }, t.set = function (r, o) {
            var i = this.has_(r);
            if (Dr(this)) {
                var l = Ir(this, {type: i ? Do : Us, object: this, newValue: o, name: r});
                if (!l) return this;
                o = l.newValue
            }
            return i ? this.updateValue_(r, o) : this.addValue_(r, o), this
        }, t.delete = function (r) {
            var o = this;
            if (this.keysAtom_, Dr(this)) {
                var i = Ir(this, {type: xd, object: this, name: r});
                if (!i) return !1
            }
            if (this.has_(r)) {
                var l = Ql(), c = lo(this), d = c || l ? {
                    observableKind: "map",
                    debugObjectName: this.name_,
                    type: xd,
                    object: this,
                    oldValue: this.data_.get(r).value_,
                    name: r
                } : null;
                return fs(function () {
                    var p;
                    o.keysAtom_.reportChanged(), (p = o.hasMap_.get(r)) == null || p.setNewValue_(!1);
                    var g = o.data_.get(r);
                    g.setNewValue_(void 0), o.data_.delete(r)
                }), c && co(this, d), !0
            }
            return !1
        }, t.updateValue_ = function (r, o) {
            var i = this.data_.get(r);
            if (o = i.prepareNewValue_(o), o !== Te.UNCHANGED) {
                var l = Ql(), c = lo(this), d = c || l ? {
                    observableKind: "map",
                    debugObjectName: this.name_,
                    type: Do,
                    object: this,
                    oldValue: i.value_,
                    name: r,
                    newValue: o
                } : null;
                i.setNewValue_(o), c && co(this, d)
            }
        }, t.addValue_ = function (r, o) {
            var i = this;
            this.keysAtom_, fs(function () {
                var p, g = new zs(o, i.enhancer_, "ObservableMap.key", !1);
                i.data_.set(r, g), o = g.value_, (p = i.hasMap_.get(r)) == null || p.setNewValue_(!0), i.keysAtom_.reportChanged()
            });
            var l = Ql(), c = lo(this), d = c || l ? {
                observableKind: "map",
                debugObjectName: this.name_,
                type: Us,
                object: this,
                name: r,
                newValue: o
            } : null;
            c && co(this, d)
        }, t.get = function (r) {
            return this.has(r) ? this.dehanceValue_(this.data_.get(r).get()) : this.dehanceValue_(void 0)
        }, t.dehanceValue_ = function (r) {
            return this.dehancer !== void 0 ? this.dehancer(r) : r
        }, t.keys = function () {
            return this.keysAtom_.reportObserved(), this.data_.keys()
        }, t.values = function () {
            var r = this, o = this.keys();
            return fb({
                next: function () {
                    var l = o.next(), c = l.done, d = l.value;
                    return {done: c, value: c ? void 0 : r.get(d)}
                }
            })
        }, t.entries = function () {
            var r = this, o = this.keys();
            return fb({
                next: function () {
                    var l = o.next(), c = l.done, d = l.value;
                    return {done: c, value: c ? void 0 : [d, r.get(d)]}
                }
            })
        }, t[Symbol.iterator] = function () {
            return this.entries()
        }, t.forEach = function (r, o) {
            for (var i = Ea(this), l; !(l = i()).done;) {
                var c = l.value, d = c[0], p = c[1];
                r.call(o, p, d, this)
            }
        }, t.merge = function (r) {
            var o = this;
            return Ws(r) && (r = new Map(r)), fs(function () {
                ls(r) ? w3(r).forEach(function (i) {
                    return o.set(i, r[i])
                }) : Array.isArray(r) ? r.forEach(function (i) {
                    var l = i[0], c = i[1];
                    return o.set(l, c)
                }) : Sa(r) ? (x3(r) || ct(19, r), r.forEach(function (i, l) {
                    return o.set(l, i)
                })) : r != null && ct(20, r)
            }), this
        }, t.clear = function () {
            var r = this;
            fs(function () {
                Uy(function () {
                    for (var o = Ea(r.keys()), i; !(i = o()).done;) {
                        var l = i.value;
                        r.delete(l)
                    }
                })
            })
        }, t.replace = function (r) {
            var o = this;
            return fs(function () {
                for (var i = ok(r), l = new Map, c = !1, d = Ea(o.data_.keys()), p; !(p = d()).done;) {
                    var g = p.value;
                    if (!i.has(g)) {
                        var m = o.delete(g);
                        if (m) c = !0; else {
                            var v = o.data_.get(g);
                            l.set(g, v)
                        }
                    }
                }
                for (var b = Ea(i.entries()), x; !(x = b()).done;) {
                    var w = x.value, j = w[0], C = w[1], _ = o.data_.has(j);
                    if (o.set(j, C), o.data_.has(j)) {
                        var E = o.data_.get(j);
                        l.set(j, E), _ || (c = !0)
                    }
                }
                if (!c) if (o.data_.size !== l.size) o.keysAtom_.reportChanged(); else for (var k = o.data_.keys(), T = l.keys(), O = k.next(), A = T.next(); !O.done;) {
                    if (O.value !== A.value) {
                        o.keysAtom_.reportChanged();
                        break
                    }
                    O = k.next(), A = T.next()
                }
                o.data_ = l
            }), this
        }, t.toString = function () {
            return "[object ObservableMap]"
        }, t.toJSON = function () {
            return Array.from(this)
        }, t.observe_ = function (r, o) {
            return oc(this, r)
        }, t.intercept_ = function (r) {
            return rc(this, r)
        }, Ca(e, [{
            key: "size", get: function () {
                return this.keysAtom_.reportObserved(), this.data_.size
            }
        }, {
            key: Symbol.toStringTag, get: function () {
                return "Map"
            }
        }])
    }(), Ws = Hs("ObservableMap", db);

    function fb(e) {
        return e[Symbol.toStringTag] = "MapIterator", Zg(e)
    }

    function ok(e) {
        if (Sa(e) || Ws(e)) return e;
        if (Array.isArray(e)) return new Map(e);
        if (ls(e)) {
            var t = new Map;
            for (var n in e) t.set(n, e[n]);
            return t
        } else return ct(21, e)
    }

    var sk = {}, pb = function () {
        function e(n, r, o) {
            var i = this;
            r === void 0 && (r = Ni), o === void 0 && (o = "ObservableSet"), this.name_ = void 0, this[Be] = sk, this.data_ = new Set, this.atom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.dehancer = void 0, this.enhancer_ = void 0, this.name_ = o, io(Set) || ct(22), this.enhancer_ = function (l, c) {
                return r(l, c, o)
            }, Gs(function () {
                i.atom_ = Ly(i.name_), n && i.replace(n)
            })
        }

        var t = e.prototype;
        return t.dehanceValue_ = function (r) {
            return this.dehancer !== void 0 ? this.dehancer(r) : r
        }, t.clear = function () {
            var r = this;
            fs(function () {
                Uy(function () {
                    for (var o = Ea(r.data_.values()), i; !(i = o()).done;) {
                        var l = i.value;
                        r.delete(l)
                    }
                })
            })
        }, t.forEach = function (r, o) {
            for (var i = Ea(this), l; !(l = i()).done;) {
                var c = l.value;
                r.call(o, c, c, this)
            }
        }, t.add = function (r) {
            var o = this;
            if (this.atom_, Dr(this)) {
                var i = Ir(this, {type: Us, object: this, newValue: r});
                if (!i) return this
            }
            if (!this.has(r)) {
                fs(function () {
                    o.data_.add(o.enhancer_(r, void 0)), o.atom_.reportChanged()
                });
                var l = !1, c = lo(this), d = c || l ? {
                    observableKind: "set",
                    debugObjectName: this.name_,
                    type: Us,
                    object: this,
                    newValue: r
                } : null;
                c && co(this, d)
            }
            return this
        }, t.delete = function (r) {
            var o = this;
            if (Dr(this)) {
                var i = Ir(this, {type: xd, object: this, oldValue: r});
                if (!i) return !1
            }
            if (this.has(r)) {
                var l = !1, c = lo(this), d = c || l ? {
                    observableKind: "set",
                    debugObjectName: this.name_,
                    type: xd,
                    object: this,
                    oldValue: r
                } : null;
                return fs(function () {
                    o.atom_.reportChanged(), o.data_.delete(r)
                }), c && co(this, d), !0
            }
            return !1
        }, t.has = function (r) {
            return this.atom_.reportObserved(), this.data_.has(this.dehanceValue_(r))
        }, t.entries = function () {
            var r = 0, o = Array.from(this.keys()), i = Array.from(this.values());
            return gb({
                next: function () {
                    var c = r;
                    return r += 1, c < i.length ? {value: [o[c], i[c]], done: !1} : {value: void 0, done: !0}
                }
            })
        }, t.keys = function () {
            return this.values()
        }, t.values = function () {
            this.atom_.reportObserved();
            var r = this, o = 0, i = Array.from(this.data_.values());
            return gb({
                next: function () {
                    return o < i.length ? {value: r.dehanceValue_(i[o++]), done: !1} : {value: void 0, done: !0}
                }
            })
        }, t.intersection = function (r) {
            if (cs(r) && !fo(r)) return r.intersection(this);
            var o = new Set(this);
            return o.intersection(r)
        }, t.union = function (r) {
            if (cs(r) && !fo(r)) return r.union(this);
            var o = new Set(this);
            return o.union(r)
        }, t.difference = function (r) {
            return new Set(this).difference(r)
        }, t.symmetricDifference = function (r) {
            if (cs(r) && !fo(r)) return r.symmetricDifference(this);
            var o = new Set(this);
            return o.symmetricDifference(r)
        }, t.isSubsetOf = function (r) {
            return new Set(this).isSubsetOf(r)
        }, t.isSupersetOf = function (r) {
            return new Set(this).isSupersetOf(r)
        }, t.isDisjointFrom = function (r) {
            if (cs(r) && !fo(r)) return r.isDisjointFrom(this);
            var o = new Set(this);
            return o.isDisjointFrom(r)
        }, t.replace = function (r) {
            var o = this;
            return fo(r) && (r = new Set(r)), fs(function () {
                Array.isArray(r) ? (o.clear(), r.forEach(function (i) {
                    return o.add(i)
                })) : cs(r) ? (o.clear(), r.forEach(function (i) {
                    return o.add(i)
                })) : r != null && ct("Cannot initialize set from " + r)
            }), this
        }, t.observe_ = function (r, o) {
            return oc(this, r)
        }, t.intercept_ = function (r) {
            return rc(this, r)
        }, t.toJSON = function () {
            return Array.from(this)
        }, t.toString = function () {
            return "[object ObservableSet]"
        }, t[Symbol.iterator] = function () {
            return this.values()
        }, Ca(e, [{
            key: "size", get: function () {
                return this.atom_.reportObserved(), this.data_.size
            }
        }, {
            key: Symbol.toStringTag, get: function () {
                return "Set"
            }
        }])
    }(), fo = Hs("ObservableSet", pb);

    function gb(e) {
        return e[Symbol.toStringTag] = "SetIterator", Zg(e)
    }

    var hb = Object.create(null), mb = "remove", vb = function () {
        function e(n, r, o, i) {
            r === void 0 && (r = new Map), i === void 0 && (i = J3), this.target_ = void 0, this.values_ = void 0, this.name_ = void 0, this.defaultAnnotation_ = void 0, this.keysAtom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.proxy_ = void 0, this.isPlainObject_ = void 0, this.appliedAnnotations_ = void 0, this.pendingKeys_ = void 0, this.target_ = n, this.values_ = r, this.name_ = o, this.defaultAnnotation_ = i, this.keysAtom_ = new Fs("ObservableObject.keys"), this.isPlainObject_ = ls(this.target_)
        }

        var t = e.prototype;
        return t.getObservablePropValue_ = function (r) {
            return this.values_.get(r).get()
        }, t.setObservablePropValue_ = function (r, o) {
            var i = this.values_.get(r);
            if (i instanceof ao) return i.set(o), !0;
            if (Dr(this)) {
                var l = Ir(this, {type: Do, object: this.proxy_ || this.target_, name: r, newValue: o});
                if (!l) return null;
                o = l.newValue
            }
            if (o = i.prepareNewValue_(o), o !== Te.UNCHANGED) {
                var c = lo(this), d = !1, p = c || d ? {
                    type: Do,
                    observableKind: "object",
                    debugObjectName: this.name_,
                    object: this.proxy_ || this.target_,
                    oldValue: i.value_,
                    name: r,
                    newValue: o
                } : null;
                i.setNewValue_(o), c && co(this, p)
            }
            return !0
        }, t.get_ = function (r) {
            return Te.trackingDerivation && !us(this.target_, r) && this.has_(r), this.target_[r]
        }, t.set_ = function (r, o, i) {
            return i === void 0 && (i = !1), us(this.target_, r) ? this.values_.has(r) ? this.setObservablePropValue_(r, o) : i ? Reflect.set(this.target_, r, o) : (this.target_[r] = o, !0) : this.extend_(r, {
                value: o,
                enumerable: !0,
                writable: !0,
                configurable: !0
            }, this.defaultAnnotation_, i)
        }, t.has_ = function (r) {
            if (!Te.trackingDerivation) return r in this.target_;
            this.pendingKeys_ || (this.pendingKeys_ = new Map);
            var o = this.pendingKeys_.get(r);
            return o || (o = new zs(r in this.target_, rd, "ObservableObject.key?", !1), this.pendingKeys_.set(r, o)), o.get()
        }, t.make_ = function (r, o) {
            if (o === !0 && (o = this.defaultAnnotation_), o !== !1) {
                if (!(r in this.target_)) {
                    var i;
                    if ((i = this.target_[Ro]) != null && i[r]) return;
                    ct(1, o.annotationType_, this.name_ + "." + r.toString())
                }
                for (var l = this.target_; l && l !== Gl;) {
                    var c = td(l, r);
                    if (c) {
                        var d = o.make_(this, r, c, l);
                        if (d === 0) return;
                        if (d === 1) break
                    }
                    l = Object.getPrototypeOf(l)
                }
                bb(this, o, r)
            }
        }, t.extend_ = function (r, o, i, l) {
            if (l === void 0 && (l = !1), i === !0 && (i = this.defaultAnnotation_), i === !1) return this.defineProperty_(r, o, l);
            var c = i.extend_(this, r, o, l);
            return c && bb(this, i, r), c
        }, t.defineProperty_ = function (r, o, i) {
            i === void 0 && (i = !1), this.keysAtom_;
            try {
                Nr();
                var l = this.delete_(r);
                if (!l) return l;
                if (Dr(this)) {
                    var c = Ir(this, {object: this.proxy_ || this.target_, name: r, type: Us, newValue: o.value});
                    if (!c) return null;
                    var d = c.newValue;
                    o.value !== d && (o = Ri({}, o, {value: d}))
                }
                if (i) {
                    if (!Reflect.defineProperty(this.target_, r, o)) return !1
                } else Ao(this.target_, r, o);
                this.notifyPropertyAddition_(r, o.value)
            } finally {
                $r()
            }
            return !0
        }, t.defineObservableProperty_ = function (r, o, i, l) {
            l === void 0 && (l = !1), this.keysAtom_;
            try {
                Nr();
                var c = this.delete_(r);
                if (!c) return c;
                if (Dr(this)) {
                    var d = Ir(this, {object: this.proxy_ || this.target_, name: r, type: Us, newValue: o});
                    if (!d) return null;
                    o = d.newValue
                }
                var p = yb(r), g = {
                    configurable: Te.safeDescriptors ? this.isPlainObject_ : !0,
                    enumerable: !0,
                    get: p.get,
                    set: p.set
                };
                if (l) {
                    if (!Reflect.defineProperty(this.target_, r, g)) return !1
                } else Ao(this.target_, r, g);
                var m = new zs(o, i, "ObservableObject.key", !1);
                this.values_.set(r, m), this.notifyPropertyAddition_(r, m.value_)
            } finally {
                $r()
            }
            return !0
        }, t.defineComputedProperty_ = function (r, o, i) {
            i === void 0 && (i = !1), this.keysAtom_;
            try {
                Nr();
                var l = this.delete_(r);
                if (!l) return l;
                if (Dr(this)) {
                    var c = Ir(this, {object: this.proxy_ || this.target_, name: r, type: Us, newValue: void 0});
                    if (!c) return null
                }
                o.name || (o.name = "ObservableObject.key"), o.context = this.proxy_ || this.target_;
                var d = yb(r), p = {
                    configurable: Te.safeDescriptors ? this.isPlainObject_ : !0,
                    enumerable: !1,
                    get: d.get,
                    set: d.set
                };
                if (i) {
                    if (!Reflect.defineProperty(this.target_, r, p)) return !1
                } else Ao(this.target_, r, p);
                this.values_.set(r, new ao(o)), this.notifyPropertyAddition_(r, void 0)
            } finally {
                $r()
            }
            return !0
        }, t.delete_ = function (r, o) {
            if (o === void 0 && (o = !1), this.keysAtom_, !us(this.target_, r)) return !0;
            if (Dr(this)) {
                var i = Ir(this, {object: this.proxy_ || this.target_, name: r, type: mb});
                if (!i) return null
            }
            try {
                var l;
                Nr();
                var c = lo(this), d = !1, p = this.values_.get(r), g = void 0;
                if (!p && (c || d)) {
                    var m;
                    g = (m = td(this.target_, r)) == null ? void 0 : m.value
                }
                if (o) {
                    if (!Reflect.deleteProperty(this.target_, r)) return !1
                } else delete this.target_[r];
                if (p && (this.values_.delete(r), p instanceof zs && (g = p.value_), Xy(p)), this.keysAtom_.reportChanged(), (l = this.pendingKeys_) == null || (l = l.get(r)) == null || l.set(r in this.target_), c || d) {
                    var v = {
                        type: mb,
                        observableKind: "object",
                        object: this.proxy_ || this.target_,
                        debugObjectName: this.name_,
                        oldValue: g,
                        name: r
                    };
                    c && co(this, v)
                }
            } finally {
                $r()
            }
            return !0
        }, t.observe_ = function (r, o) {
            return oc(this, r)
        }, t.intercept_ = function (r) {
            return rc(this, r)
        }, t.notifyPropertyAddition_ = function (r, o) {
            var i, l = lo(this), c = !1;
            if (l || c) {
                var d = l || c ? {
                    type: Us,
                    observableKind: "object",
                    debugObjectName: this.name_,
                    object: this.proxy_ || this.target_,
                    name: r,
                    newValue: o
                } : null;
                l && co(this, d)
            }
            (i = this.pendingKeys_) == null || (i = i.get(r)) == null || i.set(!0), this.keysAtom_.reportChanged()
        }, t.ownKeys_ = function () {
            return this.keysAtom_.reportObserved(), ja(this.target_)
        }, t.keys_ = function () {
            return this.keysAtom_.reportObserved(), Object.keys(this.target_)
        }, e
    }();

    function Hi(e, t) {
        var n;
        if (us(e, Be)) return e;
        var r = (n = t == null ? void 0 : t.name) != null ? n : "ObservableObject",
            o = new vb(e, new Map, String(r), c_(t));
        return Kl(e, Be, o), e
    }

    var ik = Hs("ObservableObjectAdministration", vb);

    function yb(e) {
        return hb[e] || (hb[e] = {
            get: function () {
                return this[Be].getObservablePropValue_(e)
            }, set: function (n) {
                return this[Be].setObservablePropValue_(e, n)
            }
        })
    }

    function Ta(e) {
        return nd(e) ? ik(e[Be]) : !1
    }

    function bb(e, t, n) {
        var r;
        (r = e.target_[Ro]) == null || delete r[n]
    }

    var ak = wb(0), lk = function () {
        var e = !1, t = {};
        return Object.defineProperty(t, "0", {
            set: function () {
                e = !0
            }
        }), Object.create(t)[0] = 1, e === !1
    }(), Gg = 0, xb = function () {
    };

    function ck(e, t) {
        Object.setPrototypeOf ? Object.setPrototypeOf(e.prototype, t) : e.prototype.__proto__ !== void 0 ? e.prototype.__proto__ = t : e.prototype = t
    }

    ck(xb, Array.prototype);
    var Kg = function (e) {
        function t(r, o, i, l) {
            var c;
            return i === void 0 && (i = "ObservableArray"), l === void 0 && (l = !1), c = e.call(this) || this, Gs(function () {
                var d = new Wg(i, o, l, !0);
                d.proxy_ = c, Ey(c, Be, d), r && r.length && c.spliceWithArray(0, 0, r), lk && Object.defineProperty(c, "0", ak)
            }), c
        }

        Oy(t, e);
        var n = t.prototype;
        return n.concat = function () {
            this[Be].atom_.reportObserved();
            for (var o = arguments.length, i = new Array(o), l = 0; l < o; l++) i[l] = arguments[l];
            return Array.prototype.concat.apply(this.slice(), i.map(function (c) {
                return sc(c) ? c.slice() : c
            }))
        }, n[Symbol.iterator] = function () {
            var r = this, o = 0;
            return Zg({
                next: function () {
                    return o < r.length ? {value: r[o++], done: !1} : {done: !0, value: void 0}
                }
            })
        }, Ca(t, [{
            key: "length", get: function () {
                return this[Be].getArrayLength_()
            }, set: function (o) {
                this[Be].setArrayLength_(o)
            }
        }, {
            key: Symbol.toStringTag, get: function () {
                return "Array"
            }
        }])
    }(xb);
    Object.entries(bd).forEach(function (e) {
        var t = e[0], n = e[1];
        t !== "concat" && Kl(Kg.prototype, t, n)
    });

    function wb(e) {
        return {
            enumerable: !1, configurable: !0, get: function () {
                return this[Be].get_(e)
            }, set: function (n) {
                this[Be].set_(e, n)
            }
        }
    }

    function uk(e) {
        Ao(Kg.prototype, "" + e, wb(e))
    }

    function Sb(e) {
        if (e > Gg) {
            for (var t = Gg; t < e + 100; t++) uk(t);
            Gg = e
        }
    }

    Sb(1e3);

    function dk(e, t, n) {
        return new Kg(e, t, n)
    }

    function Oa(e, t) {
        if (typeof e == "object" && e !== null) {
            if (sc(e)) return t !== void 0 && ct(23), e[Be].atom_;
            if (fo(e)) return e.atom_;
            if (Ws(e)) {
                if (t === void 0) return e.keysAtom_;
                var n = e.data_.get(t) || e.hasMap_.get(t);
                return n || ct(25, t, qg(e)), n
            }
            if (Ta(e)) {
                if (!t) return ct(26);
                var r = e[Be].values_.get(t);
                return r || ct(27, t, qg(e)), r
            }
            if (Mg(e) || Zl(e) || md(e)) return e
        } else if (io(e) && md(e[Be])) return e[Be];
        ct(28)
    }

    function jb(e, t) {
        if (e || ct(29), t !== void 0) return jb(Oa(e, t));
        if (Mg(e) || Zl(e) || md(e) || Ws(e) || fo(e)) return e;
        if (e[Be]) return e[Be];
        ct(24, e)
    }

    function qg(e, t) {
        var n;
        if (t !== void 0) n = Oa(e, t); else {
            if (tc(e)) return e.name;
            Ta(e) || Ws(e) || fo(e) ? n = jb(e) : n = Oa(e)
        }
        return n.name_
    }

    function Gs(e) {
        var t = Di(), n = cd(!0);
        Nr();
        try {
            return e()
        } finally {
            $r(), ud(n), ds(t)
        }
    }

    var Cb = Gl.toString;

    function Yg(e, t, n) {
        return n === void 0 && (n = -1), Xg(e, t, n)
    }

    function Xg(e, t, n, r, o) {
        if (e === t) return e !== 0 || 1 / e === 1 / t;
        if (e == null || t == null) return !1;
        if (e !== e) return t !== t;
        var i = typeof e;
        if (i !== "function" && i !== "object" && typeof t != "object") return !1;
        var l = Cb.call(e);
        if (l !== Cb.call(t)) return !1;
        switch (l) {
            case"[object RegExp]":
            case"[object String]":
                return "" + e == "" + t;
            case"[object Number]":
                return +e != +e ? +t != +t : +e == 0 ? 1 / +e === 1 / t : +e == +t;
            case"[object Date]":
            case"[object Boolean]":
                return +e == +t;
            case"[object Symbol]":
                return typeof Symbol < "u" && Symbol.valueOf.call(e) === Symbol.valueOf.call(t);
            case"[object Map]":
            case"[object Set]":
                n >= 0 && n++;
                break
        }
        e = Eb(e), t = Eb(t);
        var c = l === "[object Array]";
        if (!c) {
            if (typeof e != "object" || typeof t != "object") return !1;
            var d = e.constructor, p = t.constructor;
            if (d !== p && !(io(d) && d instanceof d && io(p) && p instanceof p) && "constructor" in e && "constructor" in t) return !1
        }
        if (n === 0) return !1;
        n < 0 && (n = -1), r = r || [], o = o || [];
        for (var g = r.length; g--;) if (r[g] === e) return o[g] === t;
        if (r.push(e), o.push(t), c) {
            if (g = e.length, g !== t.length) return !1;
            for (; g--;) if (!Xg(e[g], t[g], n - 1, r, o)) return !1
        } else {
            var m = Object.keys(e), v;
            if (g = m.length, Object.keys(t).length !== g) return !1;
            for (; g--;) if (v = m[g], !(us(t, v) && Xg(e[v], t[v], n - 1, r, o))) return !1
        }
        return r.pop(), o.pop(), !0
    }

    function Eb(e) {
        return sc(e) ? e.slice() : Sa(e) || Ws(e) || cs(e) || fo(e) ? Array.from(e.entries()) : e
    }

    var Pb, fk = ((Pb = ed().Iterator) == null ? void 0 : Pb.prototype) || {};

    function Zg(e) {
        return e[Symbol.iterator] = pk, Object.assign(Object.create(fk), e)
    }

    function pk() {
        return this
    }

    ["Symbol", "Map", "Set"].forEach(function (e) {
        var t = ed();
        typeof t[e] > "u" && ct("MobX requires global '" + e + "' to be available or polyfilled")
    }), typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ == "object" && __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({
        spy: T_,
        extras: {getDebugName: qg},
        $mobx: Be
    });
    const _b = ".", kb = ".", Tb = "gs-studio-root",
        Ob = [_b, kb, "localhost", "127.0.0.1", ".local-credentialless.webcontainer.io", ".local.webcontainer.io", "-sandpack.codesandbox.io"],
        gk = "license:check:start", Lb = "license:check:end", Io = () => typeof window < "u",
        La = e => e && e.stopPropagation(),
        hk = e => e.getAttributeNames().reduce((t, n) => ({...t, [n]: e.getAttribute(n) || ""}), {}), mk = (e, t) => {
            const n = r => r.key === e && t();
            return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n)
        }, vk = (e = "") => {
            const t = document.createElement("textarea");
            t.value = e, t.setAttribute("readonly", ""), t.style.position = "absolute", t.style.left = "-9999px", document.body.appendChild(t), t.select(), document.execCommand("copy"), document.body.removeChild(t)
        }, yk = e => mk("Escape", e), bk = (e, t = {}) => {
            const n = zt(e) ? {id: e, src: e} : e;
            return new Promise((r, o) => {
                var d, p;
                const i = document.querySelector(`script[src="${n.src}"]`), {id: l} = n;
                if (i) return (d = t.onScript) == null || d.call(t, i), r(l);
                const c = document.createElement("script");
                c.src = n.src, c.onload = () => r(l), c.onerror = () => o(l), document.head.appendChild(c), (p = t.onScript) == null || p.call(t, c)
            })
        }, xk = e => {
            const t = e.map(n => bk(n));
            return Promise.allSettled(t)
        };

    function wk(e) {
        const t = e.ownerDocument.createElement("script");
        return t.text = e.innerHTML, Array.from(e.attributes).forEach(n => t.setAttribute(n.nodeName, n.nodeValue)), t
    }

    function Mb(e) {
        const t = r => {
            var o;
            if (r.length) {
                const i = r.shift(), l = wk(i);
                l.onerror = l.onload = t.bind(null, r), (o = i.parentNode) == null || o.replaceChild(l, i)
            }
        }, n = Array.from(e.querySelectorAll("script"));
        t(n)
    }

    const Ab = e => new DOMParser().parseFromString(e, "text/html"),
        Sk = (e = "") => Ab(`<body>${e}</body>`).body.innerHTML,
        jk = (e = "") => Ab(`<head>${e}</head>`).head.innerHTML, Ck = (e = "", t) => {
            const r = new DOMParser().parseFromString(e, "text/html");
            if (t) {
                const i = r.querySelectorAll("svg")[0].style || {}, l = Ok(t) ? `${t}px` : t;
                i.width = l, i.height = l, i.fill = "currentColor"
            }
            return new XMLSerializer().serializeToString(r)
        }, Ek = ({isDev: e, isStage: t}) => `${e ? "" : `https://${t ? kb : _b}`}/api`, Rb = (e = {}) => {
            const {width: t = 300, height: n, text: r = "IMAGE", bg: o = "777", fg: i = "white"} = e, l = n ? `x${n}` : "";
            return `https://placehold.co/${t}${l}/${o}/${i}.png?text=${r}`
        }, Pk = Rb(), Jg = () => {
            const e = Io() && window.location.hostname;
            return !!e && (Ob.includes(e) || Ob.some(t => e.endsWith(t)))
        }, Vo = e => e && e.charAt(0).toUpperCase() + e.substring(1),
        _k = e => e.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (t, n) => (n ? "-" : "") + t.toLowerCase()), kk = () => {
        }, Tk = 240, kn = e => typeof e < "u", zt = e => typeof e == "string", Ok = e => typeof e == "number";

    function St(e) {
        return typeof e == "function"
    }

    function ps(e) {
        return e && !Array.isArray(e) && typeof e == "object"
    }

    const Lk = e => !e || Object.keys(e).length === 0, ic = (e, t) => {
            const n = {...e}, r = {...t};
            for (const o in r) {
                const i = n[o], l = r[o];
                ps(i) && ps(l) ? n[o] = ic(i, l) : n[o] = l
            }
            return n
        }, Ma = (e, t) => {
            const n = (e || "").toLocaleLowerCase(), r = (t || "").toLocaleLowerCase();
            return n.includes(r)
        }, Mk = (e = "") => {
            const t = e[0] === "?" ? e.substring(1) : e, n = new URLSearchParams(t);
            return Object.fromEntries(n)
        }, Ak = (e = 16) => {
            let t = "";
            const n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", r = n.length;
            for (let o = 0; o < e; o++) t += n.charAt(Math.floor(Math.random() * r));
            return t
        }, Rk = e => !!e.Components.getType("mjml"),
        Qg = e => (e || "").toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-._]+/g, "").replace(/--+/g, "-").trim();
    var wd, Nk = new Uint8Array(16);

    function $k() {
        if (!wd && (wd = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), !wd)) throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
        return wd(Nk)
    }

    const Dk = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;

    function Ik(e) {
        return typeof e == "string" && Dk.test(e)
    }

    for (var Tn = [], eh = 0; eh < 256; ++eh) Tn.push((eh + 256).toString(16).substr(1));

    function Vk(e) {
        var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0,
            n = (Tn[e[t + 0]] + Tn[e[t + 1]] + Tn[e[t + 2]] + Tn[e[t + 3]] + "-" + Tn[e[t + 4]] + Tn[e[t + 5]] + "-" + Tn[e[t + 6]] + Tn[e[t + 7]] + "-" + Tn[e[t + 8]] + Tn[e[t + 9]] + "-" + Tn[e[t + 10]] + Tn[e[t + 11]] + Tn[e[t + 12]] + Tn[e[t + 13]] + Tn[e[t + 14]] + Tn[e[t + 15]]).toLowerCase();
        if (!Ik(n)) throw TypeError("Stringified UUID is invalid");
        return n
    }

    function Nb(e, t, n) {
        e = e || {};
        var r = e.random || (e.rng || $k)();
        if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
            n = n || 0;
            for (var o = 0; o < 16; ++o) t[n + o] = r[o];
            return t
        }
        return Vk(r)
    }

    var _e = (e => (e.toastAdd = "studio:toastAdd", e.toastRemove = "studio:toastRemove", e.dialogOpen = "studio:dialogOpen", e.dialogClose = "studio:dialogClose", e.sidebarLeftSet = "studio:sidebarLeft:set", e.sidebarLeftGet = "studio:sidebarLeft:get", e.sidebarLeftToggle = "studio:sidebarLeft:toggle", e.sidebarRightSet = "studio:sidebarRight:set", e.sidebarRightGet = "studio:sidebarRight:get", e.sidebarRightToggle = "studio:sidebarRight:toggle", e.sidebarTopSet = "studio:sidebarTop:set", e.sidebarTopGet = "studio:sidebarTop:get", e.sidebarTopToggle = "studio:sidebarTop:toggle", e.sidebarBottomSet = "studio:sidebarBottom:set", e.sidebarBottomGet = "studio:sidebarBottom:get", e.sidebarBottomToggle = "studio:sidebarBottom:toggle", e.symbolAdd = "studio:symbolAdd", e.symbolDetach = "studio:symbolDetach", e.symbolOverride = "studio:symbolOverride", e.symbolPropagateStyles = "studio:propagateStyles", e.getPagesConfig = "studio:getPagesConfig", e.setPagesConfig = "studio:setPagesConfig", e.getPageSettings = "studio:getPageSettings", e.setPageSettings = "studio:setPageSettings", e.projectFiles = "studio:projectFiles", e.canvasReload = "studio:canvasReload", e.getBlocksPanel = "studio:getBlocksPanel", e.setBlocksPanel = "studio:setBlocksPanel", e.getStateContextMenu = "studio:getStateContextMenu", e.setStateContextMenu = "studio:setStateContextMenu", e.contextMenuComponent = "studio:contextMenuComponent", e.layoutAdd = "studio:layoutAdd", e.layoutRemove = "studio:layoutRemove", e.layoutToggle = "studio:layoutToggle", e.layoutUpdate = "studio:layoutUpdate", e.layoutGet = "studio:layoutGet", e.layoutConfigGet = "studio:layoutConfigGet", e.layoutConfigSet = "studio:layoutConfigSet", e.getStateTheme = "studio:getStateTheme", e.setStateTheme = "studio:setStateTheme", e.assetProviderGet = "studio:assetProviderGet", e.assetProviderAdd = "studio:assetProviderAdd", e.assetProviderRemove = "studio:assetProviderRemove", e.fontGet = "studio:fontGet", e.fontAdd = "studio:fontAdd", e.fontRemove = "studio:fontRemove", e.fontManagerOpen = "studio:fontManagerOpen", e.menuFontLoad = "studio:menuFontLoad", e.toggleStateDataSource = "studio:toggleStateDataSource", e.getStateDataSource = "studio:getStateDataSource", e.dataSourceSetGlobalData = "studio:dataSourceSetGlobalData", e.dataSourceSetImporter = "studio:dataSourceSetImporter", e.dataSourceSetExporter = "studio:dataSourceSetExporter", e.setDragAbsolute = "studio:setDragAbsolute", e))(_e || {}),
        Jn = (e => (e.layoutToggleId = "studio:layoutToggle:", e.toggleBlocksPanel = "studio:toggleBlocksPanel", e.pageSettingsUpdate = "studio:pageSettingsUpdate", e.toggleDataSourcesPreview = "studio:toggleDataSourcesPreview", e))(Jn || {});
    const $b = new Set, xr = new WeakMap, Aa = new WeakMap, Fi = new WeakMap, th = new WeakMap, Hk = new WeakMap,
        Ra = new WeakMap, Sd = new WeakMap;
    let Ks;
    const zi = "__aa_tgt", nh = "__aa_del", Fk = e => {
        const t = Gk(e);
        t && t.forEach(n => Kk(n))
    }, zk = e => {
        e.forEach(t => {
            t.target === Ks && Uk(), xr.has(t.target) && Bi(t.target)
        })
    };

    function Bk(e) {
        const t = th.get(e);
        t == null || t.disconnect();
        let n = xr.get(e), r = 0;
        const o = 5;
        n || (n = $a(e), xr.set(e, n));
        const {offsetWidth: i, offsetHeight: l} = Ks,
            d = [n.top - o, i - (n.left + o + n.width), l - (n.top + o + n.height), n.left - o].map(g => `${-1 * Math.floor(g)}px`).join(" "),
            p = new IntersectionObserver(() => {
                ++r > 1 && Bi(e)
            }, {root: Ks, threshold: 1, rootMargin: d});
        p.observe(e), th.set(e, p)
    }

    function Bi(e) {
        clearTimeout(Sd.get(e));
        const t = jd(e), n = typeof t == "function" ? 500 : t.duration;
        Sd.set(e, setTimeout(() => {
            const r = Fi.get(e);
            (!r || r.finished) && (xr.set(e, $a(e)), Bk(e))
        }, n))
    }

    function Uk() {
        clearTimeout(Sd.get(Ks)), Sd.set(Ks, setTimeout(() => {
            $b.forEach(e => Vb(e, t => Db(() => Bi(t))))
        }, 100))
    }

    function Wk(e) {
        setTimeout(() => {
            Hk.set(e, setInterval(() => Db(Bi.bind(null, e)), 2e3))
        }, Math.round(2e3 * Math.random()))
    }

    function Db(e) {
        typeof requestIdleCallback == "function" ? requestIdleCallback(() => e()) : requestAnimationFrame(() => e())
    }

    let rh, Na;
    typeof window < "u" && (Ks = document.documentElement, rh = new MutationObserver(Fk), Na = new ResizeObserver(zk), Na.observe(Ks));

    function Gk(e) {
        return e.reduce((t, n) => {
            if (t === !1) return !1;
            if (n.target instanceof Element) {
                if (oh(n.target), !t.has(n.target)) {
                    t.add(n.target);
                    for (let r = 0; r < n.target.children.length; r++) {
                        const o = n.target.children.item(r);
                        if (o) {
                            if (nh in o) return !1;
                            oh(n.target, o), t.add(o)
                        }
                    }
                }
                if (n.removedNodes.length) for (let r = 0; r < n.removedNodes.length; r++) {
                    const o = n.removedNodes[r];
                    if (nh in o) return !1;
                    o instanceof Element && (t.add(o), oh(n.target, o), Aa.set(o, [n.previousSibling, n.nextSibling]))
                }
            }
            return t
        }, new Set)
    }

    function oh(e, t) {
        !t && !(zi in e) ? Object.defineProperty(e, zi, {value: e}) : t && !(zi in t) && Object.defineProperty(t, zi, {value: e})
    }

    function Kk(e) {
        var t;
        const n = Ks.contains(e), r = xr.has(e);
        n && Aa.has(e) && Aa.delete(e), Fi.has(e) && ((t = Fi.get(e)) === null || t === void 0 || t.cancel()), r && n ? qk(e) : r && !n ? Xk(e) : Yk(e)
    }

    function Ho(e) {
        return Number(e.replace(/[^0-9.\-]/g, ""))
    }

    function $a(e) {
        const t = e.getBoundingClientRect();
        return {top: t.top + window.scrollY, left: t.left + window.scrollX, width: t.width, height: t.height}
    }

    function Ib(e, t, n) {
        let r = t.width, o = t.height, i = n.width, l = n.height;
        const c = getComputedStyle(e);
        if (c.getPropertyValue("box-sizing") === "content-box") {
            const p = Ho(c.paddingTop) + Ho(c.paddingBottom) + Ho(c.borderTopWidth) + Ho(c.borderBottomWidth),
                g = Ho(c.paddingLeft) + Ho(c.paddingRight) + Ho(c.borderRightWidth) + Ho(c.borderLeftWidth);
            r -= g, i -= g, o -= p, l -= p
        }
        return [r, i, o, l].map(Math.round)
    }

    function jd(e) {
        return zi in e && Ra.has(e[zi]) ? Ra.get(e[zi]) : {duration: 250, easing: "ease-in-out"}
    }

    function Vb(e, ...t) {
        t.forEach(n => n(e, Ra.has(e)));
        for (let n = 0; n < e.children.length; n++) {
            const r = e.children.item(n);
            r && t.forEach(o => o(r, Ra.has(r)))
        }
    }

    function qk(e) {
        const t = xr.get(e), n = $a(e);
        let r;
        if (!t) return;
        const o = jd(e);
        if (typeof o != "function") {
            const i = t.left - n.left, l = t.top - n.top, [c, d, p, g] = Ib(e, t, n),
                m = {transform: `translate(${i}px, ${l}px)`}, v = {transform: "translate(0, 0)"};
            c !== d && (m.width = `${c}px`, v.width = `${d}px`), p !== g && (m.height = `${p}px`, v.height = `${g}px`), r = e.animate([m, v], o)
        } else r = new Animation(o(e, "remain", t, n)), r.play();
        Fi.set(e, r), xr.set(e, n), r.addEventListener("finish", Bi.bind(null, e))
    }

    function Yk(e) {
        const t = $a(e);
        xr.set(e, t);
        const n = jd(e);
        let r;
        typeof n != "function" ? r = e.animate([{transform: "scale(.98)", opacity: 0}, {
            transform: "scale(0.98)",
            opacity: 0,
            offset: .5
        }, {transform: "scale(1)", opacity: 1}], {
            duration: n.duration * 1.5,
            easing: "ease-in"
        }) : (r = new Animation(n(e, "add", t)), r.play()), Fi.set(e, r), r.addEventListener("finish", Bi.bind(null, e))
    }

    function Xk(e) {
        if (!Aa.has(e) || !xr.has(e)) return;
        const [t, n] = Aa.get(e);
        Object.defineProperty(e, nh, {value: !0}), n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : t && t.parentNode && t.parentNode.appendChild(e);
        const [r, o, i, l] = Zk(e), c = jd(e), d = xr.get(e);
        let p;
        Object.assign(e.style, {
            position: "absolute",
            top: `${r}px`,
            left: `${o}px`,
            width: `${i}px`,
            height: `${l}px`,
            margin: 0,
            pointerEvents: "none",
            transformOrigin: "center",
            zIndex: 100
        }), typeof c != "function" ? p = e.animate([{transform: "scale(1)", opacity: 1}, {
            transform: "scale(.98)",
            opacity: 0
        }], {
            duration: c.duration,
            easing: "ease-out"
        }) : (p = new Animation(c(e, "remove", d)), p.play()), Fi.set(e, p), p.addEventListener("finish", () => {
            var g;
            e.remove(), xr.delete(e), Aa.delete(e), Fi.delete(e), (g = th.get(e)) === null || g === void 0 || g.disconnect()
        })
    }

    function Zk(e) {
        const t = xr.get(e), [n, , r] = Ib(e, t, $a(e));
        let o = e.parentElement;
        for (; o && (getComputedStyle(o).position === "static" || o instanceof HTMLBodyElement);) o = o.parentElement;
        o || (o = document.body);
        const i = getComputedStyle(o), l = xr.get(o) || $a(o), c = Math.round(t.top - l.top) - Ho(i.borderTopWidth),
            d = Math.round(t.left - l.left) - Ho(i.borderLeftWidth);
        return [c, d, n, r]
    }

    function Jk(e, t = {}) {
        rh && Na && (getComputedStyle(e).position === "static" && Object.assign(e.style, {position: "relative"}), Vb(e, Bi, Wk, n => Na == null ? void 0 : Na.observe(n)), typeof t == "function" ? Ra.set(e, t) : Ra.set(e, {
            duration: 250,
            easing: "ease-in-out", ...t
        }), rh.observe(e, {childList: !0}), $b.add(e))
    }

    function Qk(e) {
        const t = y.useRef(null);
        return y.useEffect(() => {
            t.current instanceof HTMLElement && Jk(t.current, e)
        }, [t]), t
    }

    if (!y.useState) throw new Error("mobx-react-lite requires React with Hooks support");
    if (!J_) throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");

    function eT(e) {
        e()
    }

    function tT(e) {
        e || (e = eT), B_({reactionScheduler: e})
    }

    function nT(e) {
        return U_(e)
    }

    var rT = 1e4, oT = 1e4, sT = function () {
        function e(t) {
            var n = this;
            Object.defineProperty(this, "finalize", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: t
            }), Object.defineProperty(this, "registrations", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: new Map
            }), Object.defineProperty(this, "sweepTimeout", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "sweep", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: function (r) {
                    r === void 0 && (r = rT), clearTimeout(n.sweepTimeout), n.sweepTimeout = void 0;
                    var o = Date.now();
                    n.registrations.forEach(function (i, l) {
                        o - i.registeredAt >= r && (n.finalize(i.value), n.registrations.delete(l))
                    }), n.registrations.size > 0 && n.scheduleSweep()
                }
            }), Object.defineProperty(this, "finalizeAllImmediately", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: function () {
                    n.sweep(0)
                }
            })
        }

        return Object.defineProperty(e.prototype, "register", {
            enumerable: !1,
            configurable: !0,
            writable: !0,
            value: function (t, n, r) {
                this.registrations.set(r, {value: n, registeredAt: Date.now()}), this.scheduleSweep()
            }
        }), Object.defineProperty(e.prototype, "unregister", {
            enumerable: !1,
            configurable: !0,
            writable: !0,
            value: function (t) {
                this.registrations.delete(t)
            }
        }), Object.defineProperty(e.prototype, "scheduleSweep", {
            enumerable: !1,
            configurable: !0,
            writable: !0,
            value: function () {
                this.sweepTimeout === void 0 && (this.sweepTimeout = setTimeout(this.sweep, oT))
            }
        }), e
    }(), iT = typeof FinalizationRegistry < "u" ? FinalizationRegistry : sT, sh = new iT(function (e) {
        var t;
        (t = e.reaction) === null || t === void 0 || t.dispose(), e.reaction = null
    }), Hb = {exports: {}}, ih = {};
    /**
     * @license React
     * use-sync-external-store-shim.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 Fb;

    function aT() {
        if (Fb) return ih;
        Fb = 1;
        var e = y;

        function t(m, v) {
            return m === v && (m !== 0 || 1 / m === 1 / v) || m !== m && v !== v
        }

        var n = typeof Object.is == "function" ? Object.is : t, r = e.useState, o = e.useEffect, i = e.useLayoutEffect,
            l = e.useDebugValue;

        function c(m, v) {
            var b = v(), x = r({inst: {value: b, getSnapshot: v}}), w = x[0].inst, j = x[1];
            return i(function () {
                w.value = b, w.getSnapshot = v, d(w) && j({inst: w})
            }, [m, b, v]), o(function () {
                return d(w) && j({inst: w}), m(function () {
                    d(w) && j({inst: w})
                })
            }, [m]), l(b), b
        }

        function d(m) {
            var v = m.getSnapshot;
            m = m.value;
            try {
                var b = v();
                return !n(m, b)
            } catch {
                return !0
            }
        }

        function p(m, v) {
            return v()
        }

        var g = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? p : c;
        return ih.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : g, ih
    }

    Hb.exports = aT();
    var lT = Hb.exports;

    function zb(e) {
        e.reaction = new $o("observer".concat(e.name), function () {
            var t;
            e.stateVersion = Symbol(), (t = e.onStoreChange) === null || t === void 0 || t.call(e)
        })
    }

    function cT(e, t) {
        t === void 0 && (t = "observed");
        var n = ee.useRef(null);
        if (!n.current) {
            var r = {
                reaction: null, onStoreChange: null, stateVersion: Symbol(), name: t, subscribe: function (c) {
                    return sh.unregister(r), r.onStoreChange = c, r.reaction || (zb(r), r.stateVersion = Symbol()), function () {
                        var d;
                        r.onStoreChange = null, (d = r.reaction) === null || d === void 0 || d.dispose(), r.reaction = null
                    }
                }, getSnapshot: function () {
                    return r.stateVersion
                }
            };
            n.current = r
        }
        var o = n.current;
        o.reaction || (zb(o), sh.register(n, o, o)), ee.useDebugValue(o.reaction, nT), lT.useSyncExternalStore(o.subscribe, o.getSnapshot, o.getSnapshot);
        var i, l;
        if (o.reaction.track(function () {
            try {
                i = e()
            } catch (c) {
                l = c
            }
        }), l) throw l;
        return i
    }

    var ah, lh, Bb = typeof Symbol == "function" && Symbol.for,
        uT = (lh = (ah = Object.getOwnPropertyDescriptor(function () {
        }, "name")) === null || ah === void 0 ? void 0 : ah.configurable) !== null && lh !== void 0 ? lh : !1,
        Ub = Bb ? Symbol.for("react.forward_ref") : typeof y.forwardRef == "function" && y.forwardRef(function (e) {
            return null
        }).$$typeof, Wb = Bb ? Symbol.for("react.memo") : typeof y.memo == "function" && y.memo(function (e) {
            return null
        }).$$typeof;

    function xe(e, t) {
        var n;
        if (Wb && e.$$typeof === Wb) throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");
        var r = (n = t == null ? void 0 : t.forwardRef) !== null && n !== void 0 ? n : !1, o = e,
            i = e.displayName || e.name;
        if (Ub && e.$$typeof === Ub && (r = !0, o = e.render, typeof o != "function")) throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");
        var l = function (c, d) {
            return cT(function () {
                return o(c, d)
            }, i)
        };
        return l.displayName = e.displayName, uT && Object.defineProperty(l, "name", {
            value: e.name,
            writable: !0,
            configurable: !0
        }), e.contextTypes && (l.contextTypes = e.contextTypes), r && (l = y.forwardRef(l)), l = y.memo(l), fT(e, l), l
    }

    var dT = {$$typeof: !0, render: !0, compare: !0, type: !0, displayName: !0};

    function fT(e, t) {
        Object.keys(e).forEach(function (n) {
            dT[n] || Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(e, n))
        })
    }

    var ch;
    tT(mr.unstable_batchedUpdates), ch = sh.finalizeAllImmediately;
    const pe = se;

    function se(...e) {
        return (Array.isArray(e[0]) ? e[0] : [...e]).filter(Boolean).flatMap(o => typeof o == "string" ? o.split(" ").map(i => {
            if (i = i.replace(/gjs-/g, "gs-utl-"), !i.includes("gs-utl-") && !i.startsWith("gs-")) {
                const l = i.split(":"), c = l.pop(), d = l.join(":"), p = c == null ? void 0 : c.startsWith("!"),
                    m = `gs-utl-${p ? c == null ? void 0 : c.slice(1) : c}`, v = p ? `!${m}` : m;
                return d ? `${d}:${v}` : v
            }
            return i
        }) : o).join(" ")
    }

    var pT = "M12 2C11.5 2 11 2.19 10.59 2.59L2.59 10.59C1.8 11.37 1.8 12.63 2.59 13.41L10.59 21.41C11.37 22.2 12.63 22.2 13.41 21.41L21.41 13.41C22.2 12.63 22.2 11.37 21.41 10.59L13.41 2.59C13 2.19 12.5 2 12 2M11 7H13V13H11V7M11 15H13V17H11V15Z",
        gT = "M11 2H13V7H21V10H13V14H18V17H13V22H11V17H6V14H11V10H3V7H11V2Z",
        hT = "M4 22H2V2H4V22M22 7H6V10H22V7M16 14H6V17H16V14Z", mT = "M20 2H22V22H20V2M2 10H18V7H2V10M8 17H18V14H8V17Z",
        vT = "M9.5,8.5L11,10L8,13L11,16L9.5,17.5L5,13L9.5,8.5M14.5,17.5L13,16L16,13L13,10L14.5,8.5L19,13L14.5,17.5M21,2H3A2,2 0 0,0 1,4V20A2,2 0 0,0 3,22H21A2,2 0 0,0 23,20V4A2,2 0 0,0 21,2M21,20H3V6H21V20Z",
        yT = "M11,4H13V16L18.5,10.5L19.92,11.92L12,19.84L4.08,11.92L5.5,10.5L11,16V4Z",
        bT = "M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z",
        xT = "M20 13.5C20 17.09 17.09 20 13.5 20H6V18H13.5C16 18 18 16 18 13.5S16 9 13.5 9H7.83L10.91 12.09L9.5 13.5L4 8L9.5 2.5L10.92 3.91L7.83 7H13.5C17.09 7 20 9.91 20 13.5Z",
        wT = "M10.5 18H18V20H10.5C6.91 20 4 17.09 4 13.5S6.91 7 10.5 7H16.17L13.08 3.91L14.5 2.5L20 8L14.5 13.5L13.09 12.09L16.17 9H10.5C8 9 6 11 6 13.5S8 18 10.5 18Z",
        ST = "M13,20H11V8L5.5,13.5L4.08,12.08L12,4.16L19.92,12.08L18.5,13.5L13,8V20Z",
        jT = "M3,21V3H21V21H3M5,5V19H19V5H5Z",
        CT = "M3 16C3 18.8 5.2 21 8 21H10V19H8C6.3 19 5 17.7 5 16V14H3V16M21 8C21 5.2 18.8 3 16 3H14V5H16C17.7 5 19 6.3 19 8V10H21V8M16 21C18.8 21 21 18.8 21 16V14H19V16C19 17.7 17.7 19 16 19H14V21H16M8 3C5.2 3 3 5.2 3 8V10H5V8C5 6.3 6.3 5 8 5H10V3H8Z",
        ET = "M15,21H17V19H15M19,21H21V19H19M7,21H9V19H7M11,21H13V19H11M19,17H21V15H19M19,13H21V11H19M3,3V21H5V5H21V3M19,9H21V7H19",
        PT = "M22,17H18V10H22M23,8H17A1,1 0 0,0 16,9V19A1,1 0 0,0 17,20H23A1,1 0 0,0 24,19V9A1,1 0 0,0 23,8M4,6H22V4H4A2,2 0 0,0 2,6V17H0V20H14V17H4V6Z",
        _T = "M12,3C17.5,3 22,6.58 22,11C22,15.42 17.5,19 12,19C10.76,19 9.57,18.82 8.47,18.5C5.55,21 2,21 2,21C4.33,18.67 4.7,17.1 4.75,16.5C3.05,15.07 2,13.13 2,11C2,6.58 6.5,3 12,3Z",
        kT = "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",
        TT = "M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z",
        OT = "M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z",
        LT = "M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",
        MT = "M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z",
        AT = "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z",
        RT = "M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",
        NT = "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",
        $T = "M11 20H6.5Q4.22 20 2.61 18.43 1 16.85 1 14.58 1 12.63 2.17 11.1 3.35 9.57 5.25 9.15 5.88 6.85 7.75 5.43 9.63 4 12 4 14.93 4 16.96 6.04 19 8.07 19 11 20.73 11.2 21.86 12.5 23 13.78 23 15.5 23 17.38 21.69 18.69 20.38 20 18.5 20H13V12.85L14.6 14.4L16 13L12 9L8 13L9.4 14.4L11 12.85Z",
        DT = "M8,3A2,2 0 0,0 6,5V9A2,2 0 0,1 4,11H3V13H4A2,2 0 0,1 6,15V19A2,2 0 0,0 8,21H10V19H8V14A2,2 0 0,0 6,12A2,2 0 0,0 8,10V5H10V3M16,3A2,2 0 0,1 18,5V9A2,2 0 0,0 20,11H21V13H20A2,2 0 0,0 18,15V19A2,2 0 0,1 16,21H14V19H16V14A2,2 0 0,1 18,12A2,2 0 0,1 16,10V5H14V3H16Z",
        IT = "M15,4V6H18V18H15V20H20V4M4,4V20H9V18H6V6H9V4H4Z",
        VT = "M3,5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5M12.5,11H11.5A1.5,1.5 0 0,1 10,9.5A1.5,1.5 0 0,1 11.5,8H12.5A1.5,1.5 0 0,1 14,9.5H16A3.5,3.5 0 0,0 12.5,6H11.5A3.5,3.5 0 0,0 8,9.5A3.5,3.5 0 0,0 11.5,13H12.5A1.5,1.5 0 0,1 14,14.5A1.5,1.5 0 0,1 12.5,16H11.5A1.5,1.5 0 0,1 10,14.5H8A3.5,3.5 0 0,0 11.5,18H12.5A3.5,3.5 0 0,0 16,14.5A3.5,3.5 0 0,0 12.5,11Z",
        HT = "M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z",
        FT = "M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z",
        zT = "M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z",
        BT = "M19,1L17.74,3.75L15,5L17.74,6.26L19,9L20.25,6.26L23,5L20.25,3.75M9,4L6.5,9.5L1,12L6.5,14.5L9,20L11.5,14.5L17,12L11.5,9.5M19,15L17.74,17.74L15,19L17.74,20.25L19,23L20.25,20.25L23,19L20.25,17.74",
        UT = "M23 19C22.9 19.2 22.8 19.4 22.7 19.5L18.3 15.1C20.5 15.6 22.2 17.1 23 19M12 5C15.9 5 18 6.5 18 7C18 7.5 15.9 8.9 12.2 9L14.1 10.9C15.6 10.7 17 10.3 18 9.7V12.5C17.7 12.7 17.4 12.9 17 13.1C18 13.1 19 13.3 20 13.7V7C20 4.8 16.4 3 12 3C10.1 3 8.4 3.3 7.1 3.9L8.7 5.5C9.5 5.2 10.7 5 12 5M22.1 21.5L20.8 22.8L20.2 22.2C19.2 22.7 18.1 23.1 17 23.1C14.3 23.1 11.9 21.4 11 19.1C11.6 17.7 12.6 16.6 13.9 15.9L12.4 14.4C11.7 14.8 11.1 15.4 10.5 16C8.8 15.9 7.2 15.5 5.9 14.8V17C5.9 17.3 7 18.2 8.9 18.6L8.8 19L9.1 19.7C9.3 20.1 9.4 20.4 9.6 20.8C6.4 20.3 4 18.8 4 17V7C4 6.7 4.1 6.4 4.2 6.1L1.1 3L2.4 1.7L22.1 21.5M12.1 14L8.7 10.6C7.6 10.4 6.7 10 5.9 9.6V12.4C7.2 13.4 9.5 13.9 11.9 13.9C12 14 12.1 14 12.1 14M18.8 20.7L17.7 19.6C17.6 19.9 17.3 20 17 20C16.4 20 16 19.6 16 19C16 18.7 16.1 18.4 16.4 18.2L15.3 17.1C14.8 17.6 14.5 18.2 14.5 18.9C14.5 20.3 15.6 21.4 17 21.4C17.7 21.5 18.4 21.2 18.8 20.7Z",
        WT = "M9.1 19.7L8.8 19L9 18.6C7.1 18.1 6 17.3 6 17V14.8C7.3 15.4 8.8 15.8 10.6 16C11.3 15.2 12.2 14.5 13.1 14H12C9.6 14 7.3 13.4 6 12.5V9.6C7.5 10.4 9.6 11 12 11S16.5 10.5 18 9.6V12.4C17.7 12.6 17.4 12.8 17 13C18 13 19 13.2 20 13.6V7C20 4.8 16.4 3 12 3S4 4.8 4 7V17C4 18.8 6.4 20.3 9.7 20.8C9.5 20.5 9.3 20.1 9.1 19.7M12 5C15.9 5 18 6.5 18 7S15.9 9 12 9 6 7.5 6 7 8.1 5 12 5M17 18C17.6 18 18 18.4 18 19S17.6 20 17 20 16 19.6 16 19 16.4 18 17 18M17 15C14.3 15 11.9 16.7 11 19C11.9 21.3 14.3 23 17 23S22.1 21.3 23 19C22.1 16.7 19.7 15 17 15M17 21.5C15.6 21.5 14.5 20.4 14.5 19S15.6 16.5 17 16.5 19.5 17.6 19.5 19 18.4 21.5 17 21.5Z",
        GT = "M12 3C7.58 3 4 4.79 4 7V17C4 19.21 7.59 21 12 21S20 19.21 20 17V7C20 4.79 16.42 3 12 3M18 17C18 17.5 15.87 19 12 19S6 17.5 6 17V14.77C7.61 15.55 9.72 16 12 16S16.39 15.55 18 14.77V17M18 12.45C16.7 13.4 14.42 14 12 14C9.58 14 7.3 13.4 6 12.45V9.64C7.47 10.47 9.61 11 12 11C14.39 11 16.53 10.47 18 9.64V12.45M12 9C8.13 9 6 7.5 6 7S8.13 5 12 5C15.87 5 18 6.5 18 7S15.87 9 12 9Z",
        KT = "M20 13.09V7C20 4.79 16.42 3 12 3S4 4.79 4 7V17C4 19.21 7.59 21 12 21C12.46 21 12.9 21 13.33 20.94C13.12 20.33 13 19.68 13 19L13 18.95C12.68 19 12.35 19 12 19C8.13 19 6 17.5 6 17V14.77C7.61 15.55 9.72 16 12 16C12.65 16 13.27 15.96 13.88 15.89C14.93 14.16 16.83 13 19 13C19.34 13 19.67 13.04 20 13.09M18 12.45C16.7 13.4 14.42 14 12 14S7.3 13.4 6 12.45V9.64C7.47 10.47 9.61 11 12 11S16.53 10.47 18 9.64V12.45M12 9C8.13 9 6 7.5 6 7S8.13 5 12 5 18 6.5 18 7 15.87 9 12 9M20.41 19L22.54 21.12L21.12 22.54L19 20.41L16.88 22.54L15.47 21.12L17.59 19L15.47 16.88L16.88 15.47L19 17.59L21.12 15.47L22.54 16.88L20.41 19",
        qT = "M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",
        YT = "M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",
        XT = "M20,8L12,13L4,8V6L12,11L20,6M20,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6C22,4.89 21.1,4 20,4Z",
        ZT = "M22 6C22 4.9 21.1 4 20 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6M20 6L12 11L4 6H20M20 18H4V8L12 13L20 8V18Z",
        JT = "M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z",
        QT = "M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z",
        eO = "M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z",
        tO = "M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z",
        nO = "M6.92,19L5,17.08L13.06,9L15,10.94M20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L13.84,6.41L11.91,4.5L10.5,5.91L11.92,7.33L3,16.25V21H7.75L16.67,12.08L18.09,13.5L19.5,12.09L17.58,10.17L20.7,7.05C21.1,6.65 21.1,6 20.71,5.63Z",
        rO = "M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z",
        oO = "M7,11H1V13H7V11M9.17,7.76L7.05,5.64L5.64,7.05L7.76,9.17L9.17,7.76M13,1H11V7H13V1M18.36,7.05L16.95,5.64L14.83,7.76L16.24,9.17L18.36,7.05M17,11V13H23V11H17M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M14.83,16.24L16.95,18.36L18.36,16.95L16.24,14.83L14.83,16.24M5.64,16.95L7.05,18.36L9.17,16.24L7.76,14.83L5.64,16.95M11,23H13V17H11V23Z",
        sO = "M5,3A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5.5L18.5,3H17V9A1,1 0 0,1 16,10H8A1,1 0 0,1 7,9V3H5M12,4V9H15V4H12M7,12H17A1,1 0 0,1 18,13V19H6V13A1,1 0 0,1 7,12Z",
        iO = "M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z",
        aO = "M5,5H10V7H7V10H5V5M14,5H19V10H17V7H14V5M17,14H19V19H14V17H17V14M10,17V19H5V14H7V17H10Z",
        lO = "M11,9H13V11H11V9M9,11H11V13H9V11M13,11H15V13H13V11M15,9H17V11H15V9M7,9H9V11H7V9M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M9,18H7V16H9V18M13,18H11V16H13V18M17,18H15V16H17V18M19,11H17V13H19V15H17V13H15V15H13V13H11V15H9V13H7V15H5V13H7V11H5V5H19V11Z",
        cO = "M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z",
        uO = "M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z",
        dO = "M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",
        fO = "M13.5,4A1.5,1.5 0 0,0 12,5.5A1.5,1.5 0 0,0 13.5,7A1.5,1.5 0 0,0 15,5.5A1.5,1.5 0 0,0 13.5,4M13.14,8.77C11.95,8.87 8.7,11.46 8.7,11.46C8.5,11.61 8.56,11.6 8.72,11.88C8.88,12.15 8.86,12.17 9.05,12.04C9.25,11.91 9.58,11.7 10.13,11.36C12.25,10 10.47,13.14 9.56,18.43C9.2,21.05 11.56,19.7 12.17,19.3C12.77,18.91 14.38,17.8 14.54,17.69C14.76,17.54 14.6,17.42 14.43,17.17C14.31,17 14.19,17.12 14.19,17.12C13.54,17.55 12.35,18.45 12.19,17.88C12,17.31 13.22,13.4 13.89,10.71C14,10.07 14.3,8.67 13.14,8.77Z",
        pO = "M12,16L19.36,10.27L21,9L12,2L3,9L4.63,10.27M12,18.54L4.62,12.81L3,14.07L12,21.07L21,14.07L19.37,12.8L12,18.54Z",
        gO = "M11 15H6L13 1V9H18L11 23V15Z",
        hO = "M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z",
        mO = "M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z",
        vO = "M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z",
        yO = "M18 1C15.24 1 13 3.24 13 6V8H4C2.9 8 2 8.89 2 10V20C2 21.11 2.9 22 4 22H16C17.11 22 18 21.11 18 20V10C18 8.9 17.11 8 16 8H15V6C15 4.34 16.34 3 18 3C19.66 3 21 4.34 21 6V8H23V6C23 3.24 20.76 1 18 1M10 13C11.1 13 12 13.89 12 15C12 16.11 11.11 17 10 17C8.9 17 8 16.11 8 15C8 13.9 8.9 13 10 13Z",
        bO = "M7,10L12,15L17,10H7Z",
        xO = "M20 5L20 19L4 19L4 5H20M20 3H4C2.89 3 2 3.89 2 5V19C2 20.11 2.89 21 4 21H20C21.11 21 22 20.11 22 19V5C22 3.89 21.11 3 20 3M18 15H6V17H18V15M10 7H6V13H10V7M12 9H18V7H12V9M18 11H12V13H18V11Z",
        wO = "M12,2C13.85,2 15.55,2.78 16.9,4.1L18.6,1.93L20.18,3.16L18.2,5.68C19.33,7.41 20,9.6 20,12C20,17.5 16.42,22 12,22C10.15,22 8.45,21.22 7.1,19.9L5.4,22.07L3.82,20.84L5.8,18.32C4.67,16.59 4,14.4 4,12C4,6.5 7.58,2 12,2M12,4C8.69,4 6,7.58 6,12C6,13.73 6.41,15.33 7.11,16.64L15.67,5.67C14.66,4.62 13.38,4 12,4M12,20C15.31,20 18,16.42 18,12C18,10.27 17.59,8.67 16.89,7.36L8.33,18.33C9.34,19.38 10.62,20 12,20Z",
        SO = "M4,17V9H2V7H6V17H4M22,15C22,16.11 21.1,17 20,17H16V15H20V13H18V11H20V9H16V7H20A2,2 0 0,1 22,9V10.5A1.5,1.5 0 0,1 20.5,12A1.5,1.5 0 0,1 22,13.5V15M14,15V17H8V13C8,11.89 8.9,11 10,11H12V9H8V7H12A2,2 0 0,1 14,9V11C14,12.11 13.1,13 12,13H10V15H14Z",
        jO = "M2.53,19.65L3.87,20.21V11.18L1.44,17.04C1.03,18.06 1.5,19.23 2.53,19.65M22.03,15.95L17.07,4C16.76,3.23 16.03,2.77 15.26,2.75C15,2.75 14.73,2.79 14.47,2.9L7.1,5.95C6.35,6.26 5.89,7 5.87,7.75C5.86,8 5.91,8.29 6,8.55L11,20.5C11.29,21.28 12.03,21.74 12.81,21.75C13.07,21.75 13.33,21.7 13.58,21.6L20.94,18.55C21.96,18.13 22.45,16.96 22.03,15.95M7.88,8.75A1,1 0 0,1 6.88,7.75A1,1 0 0,1 7.88,6.75C8.43,6.75 8.88,7.2 8.88,7.75C8.88,8.3 8.43,8.75 7.88,8.75M5.88,19.75A2,2 0 0,0 7.88,21.75H9.33L5.88,13.41V19.75Z",
        CO = "M12,2.5L8,7H16L12,2.5M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10M8,17L12,21.5L16,17H8Z",
        EO = "M6.62,10.79C8.06,13.62 10.38,15.94 13.21,17.38L15.41,15.18C15.69,14.9 16.08,14.82 16.43,14.93C17.55,15.3 18.75,15.5 20,15.5A1,1 0 0,1 21,16.5V20A1,1 0 0,1 20,21A17,17 0 0,1 3,4A1,1 0 0,1 4,3H7.5A1,1 0 0,1 8.5,4C8.5,5.25 8.7,6.45 9.07,7.57C9.18,7.92 9.1,8.31 8.82,8.59L6.62,10.79Z",
        PO = "M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",
        _O = "M17,13H13V17H11V13H7V11H11V7H13V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z",
        kO = "M16,7V3H14V7H10V3H8V7H8C7,7 6,8 6,9V14.5L9.5,18V21H14.5V18L18,14.5V9C18,8 17,7 16,7Z",
        TO = "M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z",
        OO = "M12 2C11.5 2 11 2.19 10.59 2.59L2.59 10.59C1.8 11.37 1.8 12.63 2.59 13.41L10.59 21.41C11.37 22.2 12.63 22.2 13.41 21.41L21.41 13.41C22.2 12.63 22.2 11.37 21.41 10.59L13.41 2.59C13 2.19 12.5 2 12 2M12 4L20 12L12 20L4 12Z",
        LO = "M13.13 22.19L11.5 18.36C13.07 17.78 14.54 17 15.9 16.09L13.13 22.19M5.64 12.5L1.81 10.87L7.91 8.1C7 9.46 6.22 10.93 5.64 12.5M21.61 2.39C21.61 2.39 16.66 .269 11 5.93C8.81 8.12 7.5 10.53 6.65 12.64C6.37 13.39 6.56 14.21 7.11 14.77L9.24 16.89C9.79 17.45 10.61 17.63 11.36 17.35C13.5 16.53 15.88 15.19 18.07 13C23.73 7.34 21.61 2.39 21.61 2.39M14.54 9.46C13.76 8.68 13.76 7.41 14.54 6.63S16.59 5.85 17.37 6.63C18.14 7.41 18.15 8.68 17.37 9.46C16.59 10.24 15.32 10.24 14.54 9.46M8.88 16.53L7.47 15.12L8.88 16.53M6.24 22L9.88 18.36C9.54 18.27 9.21 18.12 8.91 17.91L4.83 22H6.24M2 22H3.41L8.18 17.24L6.76 15.83L2 20.59V22M2 19.17L6.09 15.09C5.88 14.79 5.73 14.47 5.64 14.12L2 17.76V19.17Z",
        MO = "M18,18H6V6H18V18Z",
        AO = "M5.5,7A1.5,1.5 0 0,1 4,5.5A1.5,1.5 0 0,1 5.5,4A1.5,1.5 0 0,1 7,5.5A1.5,1.5 0 0,1 5.5,7M21.41,11.58L12.41,2.58C12.05,2.22 11.55,2 11,2H4C2.89,2 2,2.89 2,4V11C2,11.55 2.22,12.05 2.59,12.41L11.58,21.41C11.95,21.77 12.45,22 13,22C13.55,22 14.05,21.77 14.41,21.41L21.41,14.41C21.78,14.05 22,13.55 22,13C22,12.44 21.77,11.94 21.41,11.58Z",
        RO = "M11,2V4.07C7.38,4.53 4.53,7.38 4.07,11H2V13H4.07C4.53,16.62 7.38,19.47 11,19.93V22H13V19.93C16.62,19.47 19.47,16.62 19.93,13H22V11H19.93C19.47,7.38 16.62,4.53 13,4.07V2M11,6.08V8H13V6.09C15.5,6.5 17.5,8.5 17.92,11H16V13H17.91C17.5,15.5 15.5,17.5 13,17.92V16H11V17.91C8.5,17.5 6.5,15.5 6.08,13H8V11H6.09C6.5,8.5 8.5,6.5 11,6.08M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11Z",
        NO = "M22.08,11.04H20.08V4H13.05V2H11.04V4H4V11.04H2V13.05H4V20.08H11.04V22.08H13.05V20.08H20.08V13.05H22.08V11.04M18.07,18.07H13.05V16.06H11.04V18.07H6V13.05H8.03V11.04H6V6H11.04V8.03H13.05V6H18.07V11.04H16.06V13.05H18.07V18.07M13.05,12.05A1,1 0 0,1 12.05,13.05C11.5,13.05 11.04,12.6 11.04,12.05C11.04,11.5 11.5,11.04 12.05,11.04C12.6,11.04 13.05,11.5 13.05,12.05Z",
        $O = "M16,15H9V13H16M19,11H9V9H19M19,7H9V5H19M21,1H7C5.89,1 5,1.89 5,3V17C5,18.11 5.9,19 7,19H21C22.11,19 23,18.11 23,17V3C23,1.89 22.1,1 21,1M3,5V21H19V23H3A2,2 0 0,1 1,21V5H3Z",
        DO = "M17 6H7c-3.31 0-6 2.69-6 6s2.69 6 6 6h10c3.31 0 6-2.69 6-6s-2.69-6-6-6zm0 10H7c-2.21 0-4-1.79-4-4s1.79-4 4-4h10c2.21 0 4 1.79 4 4s-1.79 4-4 4zM7 9c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z",
        IO = "M17 6H7C3.69 6 1 8.69 1 12S3.69 18 7 18H17C20.31 18 23 15.31 23 12S20.31 6 17 6M17 16H7C4.79 16 3 14.21 3 12S4.79 8 7 8H17C19.21 8 21 9.79 21 12S19.21 16 17 16M17 9C15.34 9 14 10.34 14 12S15.34 15 17 15 20 13.66 20 12 18.66 9 17 9Z",
        VO = "M 2.0522829,15.915999 H 3.4754104 L 13.237565,6.2056562 11.814437,4.7900814 2.0522829,14.500425 Z M 0.054911,17.902771 V 13.680883 L 13.237565,0.59302624 q 0.299607,-0.27318123 0.66163,-0.42218868 0.362024,-0.14900796 0.761499,-0.14900796 0.399473,0 0.773979,0.14900796 0.374507,0.14900745 0.649147,0.44702366 L 17.457013,2.008602 q 0.299606,0.2731809 0.436924,0.6457004 0.137321,0.3725195 0.137321,0.7450395 0,0.3973534 -0.137321,0.7574568 Q 17.756619,4.5169 17.457013,4.8149159 L 4.2993261,17.902771 Z M 16.033886,3.3993419 14.635725,2.008602 Z m -3.520369,2.1109441 -0.69908,-0.7202046 1.423128,1.4155748 z",
        HO = "M16.59,5.41L15.17,4L12,7.17L8.83,4L7.41,5.41L12,10M7.41,18.59L8.83,20L12,16.83L15.17,20L16.58,18.59L12,14L7.41,18.59Z",
        FO = "M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z",
        zO = "M13,3V9H21V3M13,21H21V11H13M3,21H11V15H3M3,13H11V3H3V13Z",
        BO = "M21 18H2V20H21V18M19 10V14H4V10H19M20 8H3C2.45 8 2 8.45 2 9V15C2 15.55 2.45 16 3 16H20C20.55 16 21 15.55 21 15V9C21 8.45 20.55 8 20 8M21 4H2V6H21V4Z",
        UO = "M13 3V11H21V3H13M3 21H11V13H3V21M3 3V11H11V3H3M13 16H16V13H18V16H21V18H18V21H16V18H13V16Z",
        WO = "M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",
        GO = "M12.89,3L14.85,3.4L11.11,21L9.15,20.6L12.89,3M19.59,12L16,8.41V5.58L22.42,12L16,18.41V15.58L19.59,12M1.58,12L8,5.58V8.41L4.41,12L8,15.58V18.41L1.58,12Z";
    const K = ee.forwardRef(function ({
                                          as: t,
                                          children: n,
                                          className: r,
                                          col: o,
                                          revert: i,
                                          full: l,
                                          nowrap: c,
                                          space: d,
                                          gap: p,
                                          justify: g,
                                          items: m,
                                          ...v
                                      }, b) {
        const x = t || "div";
        return u.jsx(x, {
            ref: b,
            className: se([r, "gs-utl-flex", o && !i && "gs-utl-flex-col", o && i && "gs-utl-flex-col-reverse", !o && i && "gs-utl-flex-row-reverse", l && !o && "gs-utl-w-full", l && o && "gs-utl-h-full", c ? "gs-utl-flex-nowrap" : "gs-utl-flex-wrap", d === "x2s" && (o ? "gs-utl-space-y-0.5" : "gs-utl-space-x-0.5"), d === "xs" && (o ? "gs-utl-space-y-1" : "gs-utl-space-x-1"), d === "s" && (o ? "gs-utl-space-y-2" : "gs-utl-space-x-2"), d === "m" && (o ? "gs-utl-space-y-4" : "gs-utl-space-x-4"), d === "l" && (o ? "gs-utl-space-y-6" : "gs-utl-space-x-6"), d === "xl" && (o ? "gs-utl-space-y-8" : "gs-utl-space-x-8"), p === "x2s" && "gs-utl-gap-0.5", p === "xs" && "gs-utl-gap-1", p === "s" && "gs-utl-gap-2", p === "m" && "gs-utl-gap-4", p === "l" && "gs-utl-gap-6", p === "xl" && "gs-utl-gap-8", m === "start" && "gs-utl-items-start", m === "end" && "gs-utl-items-end", m === "center" && "gs-utl-items-center", g === "start" && "gs-utl-justify-start", g === "end" && "gs-utl-justify-end", g === "center" && "gs-utl-justify-center", g === "between" && "gs-utl-justify-between"]), ...v,
            children: n
        })
    }), q = ee.forwardRef(function ({children: t, className: n, grow: r, ...o}, i) {
        return u.jsx("div", {ref: i, className: se([n, r && "flex-1"]), ...o, children: t})
    });
    var uh = {exports: {}}, dh, Gb;

    function KO() {
        if (Gb) return dh;
        Gb = 1;
        var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
        return dh = e, dh
    }

    var fh, Kb;

    function qO() {
        if (Kb) return fh;
        Kb = 1;
        var e = KO();

        function t() {
        }

        function n() {
        }

        return n.resetWarningCache = t, fh = function () {
            function r(l, c, d, p, g, m) {
                if (m !== e) {
                    var v = new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
                    throw v.name = "Invariant Violation", v
                }
            }

            r.isRequired = r;

            function o() {
                return r
            }

            var i = {
                array: r,
                bigint: r,
                bool: r,
                func: r,
                number: r,
                object: r,
                string: r,
                symbol: r,
                any: r,
                arrayOf: o,
                element: r,
                elementType: r,
                instanceOf: o,
                node: r,
                objectOf: o,
                oneOf: o,
                oneOfType: o,
                shape: o,
                exact: o,
                checkPropTypes: n,
                resetWarningCache: t
            };
            return i.PropTypes = i, i
        }, fh
    }

    var qb;

    function YO() {
        return qb || (qb = 1, uh.exports = qO()()), uh.exports
    }

    var XO = function (e) {
        var t = {};

        function n(r) {
            if (t[r]) return t[r].exports;
            var o = t[r] = {i: r, l: !1, exports: {}};
            return e[r].call(o.exports, o, o.exports, n), o.l = !0, o.exports
        }

        return n.m = e, n.c = t, n.d = function (r, o, i) {
            n.o(r, o) || Object.defineProperty(r, o, {enumerable: !0, get: i})
        }, n.r = function (r) {
            typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(r, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(r, "__esModule", {value: !0})
        }, n.t = function (r, o) {
            if (1 & o && (r = n(r)), 8 & o || 4 & o && typeof r == "object" && r && r.__esModule) return r;
            var i = Object.create(null);
            if (n.r(i), Object.defineProperty(i, "default", {
                enumerable: !0,
                value: r
            }), 2 & o && typeof r != "string") for (var l in r) n.d(i, l, (function (c) {
                return r[c]
            }).bind(null, l));
            return i
        }, n.n = function (r) {
            var o = r && r.__esModule ? function () {
                return r.default
            } : function () {
                return r
            };
            return n.d(o, "a", o), o
        }, n.o = function (r, o) {
            return Object.prototype.hasOwnProperty.call(r, o)
        }, n.p = "", n(n.s = 2)
    }([function (e, t) {
        e.exports = YO()
    }, function (e, t) {
        e.exports = y
    }, function (e, t, n) {
        n.r(t);
        var r = n(1), o = n(0), i = function () {
            return (i = Object.assign || function (x) {
                for (var w, j = 1, C = arguments.length; j < C; j++) for (var _ in w = arguments[j]) Object.prototype.hasOwnProperty.call(w, _) && (x[_] = w[_]);
                return x
            }).apply(this, arguments)
        }, l = function (x, w) {
            var j = {};
            for (var C in x) Object.prototype.hasOwnProperty.call(x, C) && w.indexOf(C) < 0 && (j[C] = x[C]);
            if (x != null && typeof Object.getOwnPropertySymbols == "function") {
                var _ = 0;
                for (C = Object.getOwnPropertySymbols(x); _ < C.length; _++) w.indexOf(C[_]) < 0 && Object.prototype.propertyIsEnumerable.call(x, C[_]) && (j[C[_]] = x[C[_]])
            }
            return j
        }, c = 0, d = r.forwardRef(function (x, w) {
            var j = x.title, C = j === void 0 ? null : j, _ = x.description, E = _ === void 0 ? null : _, k = x.size,
                T = k === void 0 ? null : k, O = x.color, A = O === void 0 ? "currentColor" : O, $ = x.horizontal,
                F = $ === void 0 ? null : $, N = x.vertical, z = N === void 0 ? null : N, V = x.rotate,
                X = V === void 0 ? null : V, Z = x.spin, R = Z === void 0 ? null : Z, B = x.style,
                Q = B === void 0 ? {} : B, H = x.children,
                I = l(x, ["title", "description", "size", "color", "horizontal", "vertical", "rotate", "spin", "style", "children"]);
            c++;
            var D, M = R !== null && R, W = r.Children.map(H, function (me) {
                var ae = me;
                M !== !0 && (M = (R === null ? ae.props.spin : R) === !0);
                var ie = ae.props.size;
                typeof T == "number" && typeof ae.props.size == "number" && (ie = ae.props.size / T);
                var de = {
                    size: ie,
                    color: A === null ? ae.props.color : A,
                    horizontal: F === null ? ae.props.horizontal : F,
                    vertical: z === null ? ae.props.vertical : z,
                    rotate: X === null ? ae.props.rotate : X,
                    spin: R === null ? ae.props.spin : R,
                    inStack: !0
                };
                return r.cloneElement(ae, de)
            });
            T !== null && (Q.width = typeof T == "string" ? T : 1.5 * T + "rem");
            var ce, ne = "stack_labelledby_" + c, ue = "stack_describedby_" + c;
            if (C) D = E ? ne + " " + ue : ne; else if (ce = "presentation", E) throw new Error("title attribute required when description is set");
            return r.createElement("svg", i({
                ref: w,
                viewBox: "0 0 24 24",
                width: "24px",
                height: "24px",
                style: Q,
                role: ce,
                "aria-labelledby": D
            }, I), C && r.createElement("title", {id: ne}, C), E && r.createElement("desc", {id: ue}, E), M && r.createElement("style", null, "@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }", "@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }"), W)
        });
        d.displayName = "Stack", d.propTypes = {
            size: o.oneOfType([o.number, o.string]),
            color: o.string,
            horizontal: o.bool,
            vertical: o.bool,
            rotate: o.number,
            spin: o.oneOfType([o.bool, o.number]),
            children: o.oneOfType([o.arrayOf(o.node), o.node]).isRequired,
            className: o.string,
            style: o.object
        }, d.defaultProps = {size: null, color: null, horizontal: null, vertical: null, rotate: null, spin: null};
        var p = d;
        n.d(t, "Icon", function () {
            return b
        }), n.d(t, "Stack", function () {
            return p
        });
        var g = function () {
            return (g = Object.assign || function (x) {
                for (var w, j = 1, C = arguments.length; j < C; j++) for (var _ in w = arguments[j]) Object.prototype.hasOwnProperty.call(w, _) && (x[_] = w[_]);
                return x
            }).apply(this, arguments)
        }, m = function (x, w) {
            var j = {};
            for (var C in x) Object.prototype.hasOwnProperty.call(x, C) && w.indexOf(C) < 0 && (j[C] = x[C]);
            if (x != null && typeof Object.getOwnPropertySymbols == "function") {
                var _ = 0;
                for (C = Object.getOwnPropertySymbols(x); _ < C.length; _++) w.indexOf(C[_]) < 0 && Object.prototype.propertyIsEnumerable.call(x, C[_]) && (j[C[_]] = x[C[_]])
            }
            return j
        }, v = 0, b = r.forwardRef(function (x, w) {
            var j = x.path, C = x.id, _ = C === void 0 ? ++v : C, E = x.title, k = E === void 0 ? null : E,
                T = x.description, O = T === void 0 ? null : T, A = x.size, $ = A === void 0 ? null : A, F = x.color,
                N = F === void 0 ? "currentColor" : F, z = x.horizontal, V = z !== void 0 && z, X = x.vertical,
                Z = X !== void 0 && X, R = x.rotate, B = R === void 0 ? 0 : R, Q = x.spin, H = Q !== void 0 && Q,
                I = x.style, D = I === void 0 ? {} : I, M = x.inStack, W = M !== void 0 && M,
                ce = m(x, ["path", "id", "title", "description", "size", "color", "horizontal", "vertical", "rotate", "spin", "style", "inStack"]),
                ne = {}, ue = [];
            $ !== null && (W ? ue.push("scale(" + $ + ")") : (D.width = typeof $ == "string" ? $ : 1.5 * $ + "rem", D.height = D.width)), V && ue.push("scaleX(-1)"), Z && ue.push("scaleY(-1)"), B !== 0 && ue.push("rotate(" + B + "deg)"), N !== null && (ne.fill = N);
            var me = r.createElement("path", g({d: j, style: ne}, W ? ce : {})), ae = me;
            ue.length > 0 && (D.transform = ue.join(" "), D.transformOrigin = "center", W && (ae = r.createElement("g", {style: D}, me, r.createElement("rect", {
                width: "24",
                height: "24",
                fill: "transparent"
            }))));
            var ie, de = ae, je = H === !0 || typeof H != "number" ? 2 : H, he = !W && (V || Z);
            if (je < 0 && (he = !he), H && (de = r.createElement("g", {
                style: {
                    animation: "spin" + (he ? "-inverse" : "") + " linear " + Math.abs(je) + "s infinite",
                    transformOrigin: "center"
                }
            }, ae, !(V || Z || B !== 0) && r.createElement("rect", {
                width: "24",
                height: "24",
                fill: "transparent"
            }))), W) return de;
            var Ie, He = "icon_labelledby_" + _, yt = "icon_describedby_" + _;
            if (k) ie = O ? He + " " + yt : He; else if (Ie = "presentation", O) throw new Error("title attribute required when description is set");
            return r.createElement("svg", g({
                ref: w,
                viewBox: "0 0 24 24",
                width: "24px",
                height: "24px",
                style: D,
                role: Ie,
                "aria-labelledby": ie
            }, ce), k && r.createElement("title", {id: He}, k), O && r.createElement("desc", {id: yt}, O), !W && H && (he ? r.createElement("style", null, "@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }") : r.createElement("style", null, "@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }")), de)
        });
        b.displayName = "Icon", b.propTypes = {
            path: o.string.isRequired,
            size: o.oneOfType([o.number, o.string]),
            color: o.string,
            horizontal: o.bool,
            vertical: o.bool,
            rotate: o.number,
            spin: o.oneOfType([o.bool, o.number]),
            style: o.object,
            inStack: o.bool,
            className: o.string
        }, b.defaultProps = {
            size: null,
            color: "currentColor",
            horizontal: !1,
            vertical: !1,
            rotate: 0,
            spin: !1
        }, t.default = b
    }]);
    const ZO = zl(XO);
    var Yb = {exports: {}};
    /**
     Copyright (c) 2018 Jed Watson.
     Licensed under the MIT License (MIT), see
     http://jedwatson.github.io/classnames
     */
    (function (e) {
        (function () {
            var t = {}.hasOwnProperty;

            function n() {
                for (var i = "", l = 0; l < arguments.length; l++) {
                    var c = arguments[l];
                    c && (i = o(i, r(c)))
                }
                return i
            }

            function r(i) {
                if (typeof i == "string" || typeof i == "number") return i;
                if (typeof i != "object") return "";
                if (Array.isArray(i)) return n.apply(null, i);
                if (i.toString !== Object.prototype.toString && !i.toString.toString().includes("[native code]")) return i.toString();
                var l = "";
                for (var c in i) t.call(i, c) && i[c] && (l = o(l, c));
                return l
            }

            function o(i, l) {
                return l ? i ? i + " " + l : i + l : i
            }

            e.exports ? (n.default = n, e.exports = n) : window.classNames = n
        })()
    })(Yb);
    var JO = Yb.exports;
    const U = zl(JO), Xb = new Map, ph = ee.forwardRef(function ({svg: t, iconSize: n, ...r}, o) {
        let i = Xb.get(t);
        return i || (i = Ck(t, n), Xb.set(t, i)), u.jsx("div", {...r, ref: o, dangerouslySetInnerHTML: {__html: i}})
    });
    var fe = (e => (e.alertRhombus = "alertRhombus", e.alignHorizontalCenter = "alignHorizontalCenter", e.alignHorizontalLeft = "alignHorizontalLeft", e.alignHorizontalRight = "alignHorizontalRight", e.applicationBracketsOutline = "applicationBracketsOutline", e.arrowDown = "arrowDown", e.arrowRight = "arrowRight", e.arrowULeftTop = "arrowULeftTop", e.arrowURightTop = "arrowURightTop", e.borderAllVariant = "borderAllVariant", e.borderRadius = "borderRadius", e.borderStyle = "borderStyle", e.cellphoneLink = "cellphoneLink", e.check = "check", e.checkBold = "checkBold", e.checkboxBlank = "checkboxBlank", e.chevronUp = "chevronUp", e.chevronDown = "chevronDown", e.chevronLeft = "chevronLeft", e.chevronRight = "chevronRight", e.close = "close", e.codeBraces = "codeBraces", e.cog = "cog", e.contentCopy = "contentCopy", e.contentSave = "contentSave", e.delete = "delete", e.dotsVertical = "dotsVertical", e.email = "email", e.emailOutline = "emailOutline", e.eye = "eye", e.eyedropperVariant = "eyedropperVariant", e.eyeOff = "eyeOff", e.eyeOffOutline = "eyeOffOutline", e.eyeOutline = "eyeOutline", e.fire = "fire", e.flare = "flare", e.floppy = "floppy", e.folder = "folder", e.fullscreen = "fullscreen", e.gradientVertical = "gradientVertical", e.helpCircle = "helpCircle", e.image = "image", e.information = "information", e.informationVariant = "informationVariant", e.layers = "layers", e.link = "link", e.lock = "lock", e.lockOpenVariant = "lockOpenVariant", e.menuDown = "menuDown", e.newspaperVariantOutline = "newspaperVariantOutline", e.paletteSwatch = "paletteSwatch", e.panVertical = "panVertical", e.phone = "phone", e.plus = "plus", e.plusBox = "plusBox", e.powerPlug = "powerPlug", e.refresh = "refresh", e.rhombusOutline = "rhombusOutline", e.tag = "tag", e.target = "target", e.targetVariant = "targetVariant", e.textBoxMultiple = "textBoxMultiple", e.trayArrowDown = "trayArrowDown", e.unfoldLessHorizontal = "unfoldLessHorizontal", e.unfoldMoreHorizontal = "unfoldMoreHorizontal", e.viewDayOutline = "viewDayOutline", e.viewGridPlus = "viewGridPlus", e.web = "web", e.xml = "xml", e.databaseOutline = "databaseOutline", e.databaseOutlineOn = "databaseOutlineOn", e.databaseOutlineOff = "databaseOutlineOff", e.databaseOutlineRemove = "databaseOutlineRemove", e.toggleSwitchOutline = "toggleSwitchOutline", e.toggleSwitchOffOutline = "toggleSwitchOffOutline", e.codeBrackets = "codeBrackets", e.null = "null", e.codeString = "string", e.number = "number", e.cloudUpload = "cloudUpload", e.chat = "chat", e.creation = "creation", e.viewDashboard = "viewDashboard", e.rocketLaunch = "rocketLaunch", e.lightningBolt = "lightningBolt", e.stop = "stop", e.arrowUp = "arrowUp", e))(fe || {});
    const Cd = {
        alertRhombus: pT,
        alignHorizontalCenter: gT,
        alignHorizontalLeft: hT,
        alignHorizontalRight: mT,
        applicationBracketsOutline: vT,
        arrowDown: yT,
        arrowRight: bT,
        arrowULeftTop: xT,
        arrowURightTop: wT,
        borderAllVariant: jT,
        borderRadius: CT,
        borderStyle: ET,
        cellphoneLink: PT,
        check: kT,
        checkBold: TT,
        checkboxBlank: OT,
        chevronUp: RT,
        chevronDown: LT,
        chevronLeft: MT,
        chevronRight: AT,
        close: NT,
        codeBraces: DT,
        cog: HT,
        contentCopy: FT,
        contentSave: zT,
        delete: qT,
        dotsVertical: YT,
        email: XT,
        emailOutline: ZT,
        eye: JT,
        eyedropperVariant: nO,
        eyeOff: QT,
        eyeOffOutline: eO,
        eyeOutline: tO,
        fire: rO,
        flare: oO,
        floppy: sO,
        folder: iO,
        fullscreen: aO,
        gradientVertical: lO,
        helpCircle: cO,
        image: uO,
        information: dO,
        informationVariant: fO,
        layers: pO,
        link: hO,
        lock: vO,
        lockOpenVariant: yO,
        menuDown: bO,
        newspaperVariantOutline: xO,
        paletteSwatch: jO,
        panVertical: CO,
        phone: EO,
        plus: PO,
        plusBox: _O,
        powerPlug: kO,
        refresh: TO,
        rhombusOutline: OO,
        tag: AO,
        target: RO,
        targetVariant: NO,
        textBoxMultiple: $O,
        trayArrowDown: VO,
        unfoldLessHorizontal: HO,
        unfoldMoreHorizontal: FO,
        viewDayOutline: BO,
        viewGridPlus: UO,
        web: WO,
        xml: GO,
        databaseOutline: GT,
        databaseOutlineOn: WT,
        databaseOutlineOff: UT,
        databaseOutlineRemove: KT,
        codeBrackets: IT,
        toggleSwitchOutline: IO,
        toggleSwitchOffOutline: DO,
        null: wO,
        string: VT,
        number: SO,
        cloudUpload: $T,
        chat: _T,
        creation: BT,
        viewDashboard: zO,
        rocketLaunch: LO,
        lightningBolt: gO,
        stop: MO,
        arrowUp: ST
    }, QO = "gs-cmp-icon", be = xe(function ({className: t, icon: n, size: r, rotate: o, horizontal: i, vertical: l}) {
        var m;
        const c = (m = rI()) == null ? void 0 : m.sdkCustomIcons,
            d = (c == null ? void 0 : c[n]) || (Cd == null ? void 0 : Cd[n]) || n,
            p = [i && "scaleX(-1)", l && "scaleY(-1)", o && `rotate(${o}deg)`].filter(v => !!v).join(" ");
        if (!d) return null;
        const g = U(QO, t);
        return d.startsWith("<svg") || d.startsWith("<?xml") ? u.jsx(ph, {
            className: g,
            style: {transform: p || void 0},
            svg: d,
            iconSize: r
        }) : u.jsx(ZO, {className: g, path: d, size: r, rotate: o, horizontal: i, vertical: l})
    }), Zb = 150;
    var ut = (e => (e.txt = "gs-theme-cl-txt", e.bg = "gs-theme-cl-bg", e.br = "gs-theme-cl-br", e.bgA = "gs-theme-cl-bgA", e.bgA2 = "gs-theme-cl-bgA2", e.hBgAct = "gs-theme-cl-hBgAct", e.hBgA2 = "gs-theme-cl-hBgA2", e.tA = "gs-theme-cl-tA", e.tAo = "gs-theme-cl-tAo", e.hTAo = "gs-theme-cl-hTAo", e.grouphTAo = "gs-theme-cl-grouphTAo", e.bA = "gs-theme-cl-bA", e.bg0 = "gs-theme-cl-bg0", e.bgH = "gs-theme-cl-bgH", e.hBgH = "gs-theme-cl-hBgH", e.bgH2 = "gs-theme-cl-bgH2", e.hBgH2 = "gs-theme-cl-hBgH2", e.sel = "gs-theme-cl-sel", e.selBr = "gs-theme-cl-selBr", e.cmp = "gs-theme-cl-cmp", e.cmpBgSoft = "gs-theme-cl-cmpBgSoft", e.cmpBgSoftX = "gs-theme-cl-cmpBgSoftX", e.cmpBr = "gs-theme-cl-cmpBr", e.cmpSymbol = "gs-theme-cl-cmpSymbol", e.cmpBgSymbolSoft = "gs-theme-cl-cmpBgSymbolSoft", e.cmpBgSymbolSoftX = "gs-theme-cl-cmpBgSymbolSoftX", e.cmpSymbolBr = "gs-theme-cl-cmpSymbolBr", e.cmpTxtActive = "gs-theme-cl-cmpTxtActive", e.focus = "gs-theme-ring-focus", e.inputText = "gs-theme-elStyles-inputText", e))(ut || {});
    const te = {
            bgTr: "gs-utl-bg-transparent",
            txt: "gs-theme-cl-txt gs-utl-text-gray-900 dark:gs-utl-text-gray-400",
            txtLowEmphasis: "gs-utl-text-neutral-500 dark:gs-utl-text-neutral-500",
            txtHighEmphasis: "gs-utl-text-black dark:gs-utl-text-gray-200",
            txtHighEmphasisH: "hover:gs-utl-text-black hover:dark:gs-utl-text-gray-200",
            tA: "gs-theme-cl-tA gs-utl-text-violet-400",
            tAo: "gs-theme-cl-tAo gs-utl-text-violet-800 dark:gs-utl-text-violet-400",
            hTAo: "gs-theme-cl-hTAo hover:gs-utl-text-violet-800 hover:dark:gs-utl-text-violet-400",
            grouphTAo: "gs-theme-cl-grouphTAo group-hover:gs-utl-text-violet-800 group-hover:dark:gs-utl-text-violet-400",
            bA: "gs-theme-cl-bA gs-utl-border-violet-400",
            bgA: "gs-theme-cl-bgA gs-utl-bg-violet-400 gs-utl-text-white dark:gs-utl-bg-violet-500",
            bgA2: "gs-theme-cl-bgA2 gs-utl-bg-violet-500 gs-utl-text-white",
            bgO: "gs-theme-cl-bg0 gs-utl-bg-violet-50 gs-utl-text-violet-900 dark:gs-utl-bg-zinc-800 dark:gs-utl-text-violet-400",
            bg: "gs-theme-cl-bg gs-utl-bg-white dark:gs-utl-bg-zinc-900",
            bgBlur: "gs-utl-bg-white/50 dark:gs-utl-bg-zinc-900/50 gs-utl-backdrop-blur-sm",
            bgH: "gs-theme-cl-bgH gs-utl-bg-gray-100 dark:gs-utl-bg-zinc-700",
            bgH75: "gs-utl-bg-gray-100/75 dark:gs-utl-bg-zinc-700/75",
            hBgH: "gs-theme-cl-hBgH hover:gs-utl-bg-gray-50 hover:dark:gs-utl-bg-zinc-800",
            bgH2: "gs-theme-cl-bgH2 gs-utl-bg-gray-25 dark:gs-utl-bg-zinc-800",
            hBgH2: "gs-theme-cl-hBgH2 hover:gs-utl-bg-gray-25 hover:dark:gs-utl-bg-zinc-800",
            hBgAct: "gs-theme-cl-hBgAct hover:gs-utl-bg-violet-800 hover:dark:gs-utl-bg-violet-400",
            hBgA2: "gs-theme-cl-hBgA2 hover:gs-utl-bg-violet-500 hover:dark:gs-utl-bg-violet-600",
            hBgDark: "hover:gs-utl-bg-black/10",
            sel: "gs-theme-cl-sel gs-utl-bg-pink-200 gs-utl-text-pink-900",
            selBr: "gs-theme-cl-selBr gs-utl-border-pink-900",
            cmp: "gs-theme-cl-cmp gs-utl-bg-blue-450 gs-utl-text-white",
            cmpSymbol: "gs-theme-cl-cmpSymbol gs-utl-bg-[#7b61ff] gs-utl-text-white",
            cmpBgSoft: "gs-theme-cl-cmpBgSoft gs-utl-bg-blue-100 dark:gs-utl-bg-sky-800",
            cmpBgSymbolSoft: "gs-theme-cl-cmpBgSymbolSoft gs-utl-bg-violet-200 dark:gs-utl-bg-violet-800",
            cmpBgSoftX: "gs-theme-cl-cmpBgSoftX gs-utl-bg-blue-50 dark:gs-utl-bg-gray-800",
            cmpBgSymbolSoftX: "gs-theme-cl-cmpBgSymbolSoftX gs-utl-bg-[#edebff] dark:gs-utl-bg-[#2d1b4b]",
            cmpTxtActive: "gs-theme-cl-cmpTxtActive dark:gs-utl-text-gray-300",
            cmpBr: "gs-theme-cl-cmpBr gs-utl-border-blue-450",
            cmpSymbolBr: "gs-theme-cl-cmpSymbolBr gs-utl-border-[#7b61ff]",
            cmpTargetBg: "gs-utl-bg-amber-500 gs-utl-text-white",
            cmpTargetBgOpac: "gs-utl-bg-amber-500/5",
            cmpTargetBr: "gs-utl-border-amber-500",
            tW: "gs-utl-text-amber-500",
            bgW: "gs-utl-bg-amber-500",
            bgRed: "gs-utl-bg-red-500",
            hBgRed: "hover:gs-utl-bg-red-600",
            hBgW: "hover:gs-utl-bg-amber-600",
            br: "gs-theme-cl-br gs-utl-border-gray-300 dark:gs-utl-border-zinc-700",
            brRed: "gs-utl-border-red-500",
            brLight: "gs-utl-border-white/25"
        }, gh = {
            enter: "gs-utl-transition gs-utl-duration-100 gs-utl-ease-out",
            enterFrom: "gs-utl-scale-95 gs-utl-opacity-0",
            enterTo: "gs-utl-opacity-100",
            leave: "gs-utl-transition gs-utl-ease-in gs-utl-duration-100",
            leaveFrom: "gs-utl-scale-100 gs-utl-opacity-100",
            leaveTo: "gs-utl-scale-95 gs-utl-opacity-0"
        }, Jb = {
            enter: "gs-utl-transition gs-utl-duration-100 gs-utl-ease-out",
            enterFrom: "gs-utl-opacity-0",
            enterTo: "gs-utl-opacity-100"
        }, ac = {
            ...Jb, ...{
                leave: "gs-utl-transition gs-utl-ease-in gs-utl-duration-100",
                leaveFrom: "gs-utl-opacity-100",
                leaveTo: "gs-utl-opacity-0"
            }
        }, et = {
            xy: "gs-utl-px-4 gs-utl-py-2",
            xyS: "gs-utl-px-2 gs-utl-py-1",
            xyS2: "gs-utl-px-2 gs-utl-py-0.5",
            x: "gs-utl-px-4",
            xS: "gs-utl-px-2",
            y: "gs-utl-py-2",
            s: "gs-utl-p-2"
        }, hh = {bg: te.bg, bgH: te.bgH}, Qb = {
            bg: "gs-utl-bg-zinc-700",
            txt: "gs-utl-text-white",
            block: "gs-utl-text-xs gs-utl-mt-1 gs-utl-bg-white/10 gs-utl-rounded gs-utl-px-2 gs-utl-py-1"
        }, ye = {
            rnd: "gs-utl-rounded",
            pill: "gs-utl-rounded-full",
            b: "gs-utl-border",
            bT: "gs-utl-border-transparent",
            bS: "gs-utl-border-2",
            bt: "gs-utl-border-t",
            bb: "gs-utl-border-b",
            br: "gs-utl-border-r",
            bl: "gs-utl-border-l",
            bA: "gs-theme-cl-bA gs-utl-border-violet-400 dark:gs-utl-border-violet-500"
        },
        lc = {
            focus: "gs-theme-ring-focus focus:gs-utl-outline-none focus-visible:gs-utl-ring-2 gs-utl-ring-violet-300 gs-utl-ring-opacity-80",
            deepFocus: "focus:gs-utl-outline-none [&:has(:focus-visible)]:gs-utl-ring-2 gs-utl-ring-violet-300 gs-utl-ring-opacity-80"
        },
        Ee = {
            s3x: "13px", s2x: "14px", sx: "16px", s: "18px", m: "20px", l: "22px"
        },
        nt = {
            click: "gs-utl-cursor-pointer gs-utl-transition-opacity gs-utl-opacity-75 hover:gs-utl-opacity-100",
            hover: "gs-utl-transition-opacity gs-utl-opacity-50 hover:gs-utl-opacity-100",
            hoverGroup: "group-hover:gs-utl-opacity-100 gs-utl-opacity-0 gs-utl-transition-opacity",
            dot: "gs-utl-w-[6px] gs-utl-h-[6px] gs-utl-rounded-full",
            scrollX: "gs-utl-overflow-x-auto gs-utl-overflow-y-hidden",
            scrollY: "gs-utl-overflow-y-auto gs-utl-overflow-x-hidden",
            txtEllips: "gs-utl-text-ellipsis gs-utl-overflow-hidden gs-utl-whitespace-nowrap",
            coverAbs: "gs-utl-absolute gs-utl-top-0 gs-utl-left-0 gs-utl-w-full gs-utl-h-full",
            hiddenVisually: "gs-utl-w-[1px] gs-utl-h-[1px] gs-utl-opacity-[0.001]",
            disabled: "gs-utl-opacity-50 gs-utl-pointer-events-none",
            disabledM: "gs-utl-opacity-50 gs-utl-cursor-not-allowed",
            noFocusOut: "focus:gs-utl-outline-none",
            spin: "gs-utl-animate-spin-fast"
        },
        Da = {
            link: se(te.tAo),
            inputText: "gs-theme-elStyles-inputText focus:gs-utl-outline-none gs-utl-placeholder:text-neutral-400 placeholder:dark:gs-utl-text-neutral-500"
        }, mh = {
            itemList: ({
                           index: e = 0,
                           open: t = !1,
                           length: n = 0
                       } = {}) => se(te.bgH2, et.xyS, te.br, e && ye.bt, (t || e === n - 1) && ye.bb)
        }, ex = e => ({bg: e ? "#18181b" : "#f9f9f9", text: e ? "#9ca3af" : "#111827", link: e ? "#a78bfa" : "#5b21b6"}),
        Ia = e => {
            let t = {
                isSymbol: !1,
                bg: te.cmp,
                bgSoft: `${te.cmpBgSoft} ${te.cmpTxtActive}`,
                bgSoftX: te.cmpBgSoftX,
                border: te.cmpBr,
                txt: ""
            };
            if (!(e != null && e.em)) return t;
            const {isSymbol: n} = e.em.Components.getSymbolInfo(e);
            return n && (t = {
                isSymbol: n,
                bg: te.cmpSymbol,
                bgSoft: `${te.cmpBgSymbolSoft} ${te.cmpTxtActive}`,
                bgSoftX: te.cmpBgSymbolSoftX,
                border: te.cmpSymbolBr,
                txt: ""
            }), t
        }, tx = ({
                     variant: e,
                     size: t = "m",
                     className: n,
                     disabledClassName: r,
                     active: o,
                     border: i = !0,
                     rounded: l = !0,
                     disabled: c = !1,
                     withBg: d,
                     block: p,
                     full: g
                 }) => {
            const m = e === "pr", v = e === "out", b = e === "out-clear", x = e === "warn", w = e === "danger",
                j = i && (v || b || !e);
            return ["gs-utl-transition-colors gs-utl-cursor-pointer", p && "gs-utl-block", t === "x2s" && "gs-utl-text-xs", t === "s" && "gs-utl-p-1 gs-utl-text-sm", t === "m" && "gs-utl-p-1 gs-utl-px-2", t === "m2" && "gs-utl-p-1 gs-utl-px-3", t === "lg" && "gs-utl-p-2 gs-utl-px-4 gs-utl-text-lg", n, l && ye.rnd, j && `${ye.b} ${te.br}`, d && te.bg, j && se(ye.b, v && te.bA, v && te.tAo, !c && te.hBgH), x && se(te.bgW, te.hBgW, !c && te.hBgW, "gs-utl-text-white"), w && se(te.bgRed, !c && te.hBgRed, "gs-utl-text-white"), m && se(te.bgA2, !c && te.hBgAct), o && te.bgA, c && (r ?? "disabled:gs-utl-opacity-80 gs-utl-cursor-not-allowed"), g && "gs-utl-w-full", lc.focus]
        };

    function at({children: e, ...t}) {
        const {
                variant: n,
                size: r,
                active: o,
                border: i,
                rounded: l,
                block: c,
                full: d,
                className: p,
                icon: g,
                loading: m,
                withBg: v,
                type: b = "button",
                disabledClassName: x,
                ...w
            } = t,
            j = m ? {icon: mO, size: "17px", className: se("animate-spin-fast")} : zt(g) ? {icon: g, size: "18px"} : g;
        return u.jsx("button", {
            className: se(tx(t)),
            disabled: t.disabled,
            type: b, ...w,
            children: j ? u.jsxs(K, {
                className: se("gap-2"),
                items: "center",
                justify: "center",
                nowrap: !0,
                children: [u.jsx(q, {children: u.jsx(be, {...j})}), e && u.jsx(q, {children: e})]
            }) : e
        })
    }

    function Va(e, t, n) {
        let r = n.initialDeps ?? [], o;
        return () => {
            var i, l, c, d;
            let p;
            n.key && ((i = n.debug) != null && i.call(n)) && (p = Date.now());
            const g = e();
            if (!(g.length !== r.length || g.some((b, x) => r[x] !== b))) return o;
            r = g;
            let v;
            if (n.key && ((l = n.debug) != null && l.call(n)) && (v = Date.now()), o = t(...g), n.key && ((c = n.debug) != null && c.call(n))) {
                const b = Math.round((Date.now() - p) * 100) / 100, x = Math.round((Date.now() - v) * 100) / 100,
                    w = x / 16, j = (C, _) => {
                        for (C = String(C); C.length < _;) C = " " + C;
                        return C
                    };
                console.info(`%c⏱ ${j(x, 5)} /${j(b, 5)} ms`, `
            font-size: .6rem;
            font-weight: bold;
            color: hsl(${Math.max(0, Math.min(120 - 120 * w, 120))}deg 100% 31%);`, n == null ? void 0 : n.key)
            }
            return (d = n == null ? void 0 : n.onChange) == null || d.call(n, o), o
        }
    }

    function vh(e, t) {
        if (e === void 0) throw new Error(`Unexpected undefined${t ? `: ${t}` : ""}`);
        return e
    }

    const e4 = (e, t) => Math.abs(e - t) < 1, t4 = (e, t, n) => {
        let r;
        return function (...o) {
            e.clearTimeout(r), r = e.setTimeout(() => t.apply(this, o), n)
        }
    }, n4 = e => e, r4 = e => {
        const t = Math.max(e.startIndex - e.overscan, 0), n = Math.min(e.endIndex + e.overscan, e.count - 1), r = [];
        for (let o = t; o <= n; o++) r.push(o);
        return r
    }, o4 = (e, t) => {
        const n = e.scrollElement;
        if (!n) return;
        const r = e.targetWindow;
        if (!r) return;
        const o = l => {
            const {width: c, height: d} = l;
            t({width: Math.round(c), height: Math.round(d)})
        };
        if (o(n.getBoundingClientRect()), !r.ResizeObserver) return () => {
        };
        const i = new r.ResizeObserver(l => {
            const c = l[0];
            if (c != null && c.borderBoxSize) {
                const d = c.borderBoxSize[0];
                if (d) {
                    o({width: d.inlineSize, height: d.blockSize});
                    return
                }
            }
            o(n.getBoundingClientRect())
        });
        return i.observe(n, {box: "border-box"}), () => {
            i.unobserve(n)
        }
    }, nx = {passive: !0}, s4 = typeof window > "u" ? !0 : "onscrollend" in window, i4 = (e, t) => {
        const n = e.scrollElement;
        if (!n) return;
        const r = e.targetWindow;
        if (!r) return;
        let o = 0;
        const i = s4 ? () => {
        } : t4(r, () => {
            t(o, !1)
        }, e.options.isScrollingResetDelay), l = p => () => {
            const {horizontal: g, isRtl: m} = e.options;
            o = g ? n.scrollLeft * (m && -1 || 1) : n.scrollTop, i(), t(o, p)
        }, c = l(!0), d = l(!1);
        return d(), n.addEventListener("scroll", c, nx), n.addEventListener("scrollend", d, nx), () => {
            n.removeEventListener("scroll", c), n.removeEventListener("scrollend", d)
        }
    }, a4 = (e, t, n) => {
        if (t != null && t.borderBoxSize) {
            const r = t.borderBoxSize[0];
            if (r) return Math.round(r[n.options.horizontal ? "inlineSize" : "blockSize"])
        }
        return Math.round(e.getBoundingClientRect()[n.options.horizontal ? "width" : "height"])
    }, l4 = (e, {adjustments: t = 0, behavior: n}, r) => {
        var o, i;
        const l = e + t;
        (i = (o = r.scrollElement) == null ? void 0 : o.scrollTo) == null || i.call(o, {
            [r.options.horizontal ? "left" : "top"]: l,
            behavior: n
        })
    };

    class c4 {
        constructor(t) {
            this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = new Map, this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = new Map, this.observer = (() => {
                let n = null;
                const r = () => n || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : n = new this.targetWindow.ResizeObserver(o => {
                    o.forEach(i => {
                        this._measureElement(i.target, i)
                    })
                }));
                return {
                    disconnect: () => {
                        var o;
                        (o = r()) == null || o.disconnect(), n = null
                    }, observe: o => {
                        var i;
                        return (i = r()) == null ? void 0 : i.observe(o, {box: "border-box"})
                    }, unobserve: o => {
                        var i;
                        return (i = r()) == null ? void 0 : i.unobserve(o)
                    }
                }
            })(), this.range = null, this.setOptions = n => {
                Object.entries(n).forEach(([r, o]) => {
                    typeof o > "u" && delete n[r]
                }), this.options = {
                    debug: !1,
                    initialOffset: 0,
                    overscan: 1,
                    paddingStart: 0,
                    paddingEnd: 0,
                    scrollPaddingStart: 0,
                    scrollPaddingEnd: 0,
                    horizontal: !1,
                    getItemKey: n4,
                    rangeExtractor: r4,
                    onChange: () => {
                    },
                    measureElement: a4,
                    initialRect: {width: 0, height: 0},
                    scrollMargin: 0,
                    gap: 0,
                    indexAttribute: "data-index",
                    initialMeasurementsCache: [],
                    lanes: 1,
                    isScrollingResetDelay: 150,
                    enabled: !0,
                    isRtl: !1, ...n
                }
            }, this.notify = n => {
                var r, o;
                (o = (r = this.options).onChange) == null || o.call(r, this, n)
            }, this.maybeNotify = Va(() => (this.calculateRange(), [this.isScrolling, this.range ? this.range.startIndex : null, this.range ? this.range.endIndex : null]), n => {
                this.notify(n)
            }, {
                key: !1,
                debug: () => this.options.debug,
                initialDeps: [this.isScrolling, this.range ? this.range.startIndex : null, this.range ? this.range.endIndex : null]
            }), this.cleanup = () => {
                this.unsubs.filter(Boolean).forEach(n => n()), this.unsubs = [], this.observer.disconnect(), this.scrollElement = null, this.targetWindow = null
            }, this._didMount = () => () => {
                this.cleanup()
            }, this._willUpdate = () => {
                var n;
                const r = this.options.enabled ? this.options.getScrollElement() : null;
                if (this.scrollElement !== r) {
                    if (this.cleanup(), !r) {
                        this.maybeNotify();
                        return
                    }
                    this.scrollElement = r, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((n = this.scrollElement) == null ? void 0 : n.window) ?? null, this.elementsCache.forEach(o => {
                        this.observer.observe(o)
                    }), this._scrollToOffset(this.getScrollOffset(), {
                        adjustments: void 0,
                        behavior: void 0
                    }), this.unsubs.push(this.options.observeElementRect(this, o => {
                        this.scrollRect = o, this.maybeNotify()
                    })), this.unsubs.push(this.options.observeElementOffset(this, (o, i) => {
                        this.scrollAdjustments = 0, this.scrollDirection = i ? this.getScrollOffset() < o ? "forward" : "backward" : null, this.scrollOffset = o, this.isScrolling = i, this.maybeNotify()
                    }))
                }
            }, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (n, r) => {
                const o = new Map, i = new Map;
                for (let l = r - 1; l >= 0; l--) {
                    const c = n[l];
                    if (o.has(c.lane)) continue;
                    const d = i.get(c.lane);
                    if (d == null || c.end > d.end ? i.set(c.lane, c) : c.end < d.end && o.set(c.lane, !0), o.size === this.options.lanes) break
                }
                return i.size === this.options.lanes ? Array.from(i.values()).sort((l, c) => l.end === c.end ? l.index - c.index : l.end - c.end)[0] : void 0
            }, this.getMeasurementOptions = Va(() => [this.options.count, this.options.paddingStart, this.options.scrollMargin, this.options.getItemKey, this.options.enabled], (n, r, o, i, l) => (this.pendingMeasuredCacheIndexes = [], {
                count: n,
                paddingStart: r,
                scrollMargin: o,
                getItemKey: i,
                enabled: l
            }), {key: !1}), this.getMeasurements = Va(() => [this.getMeasurementOptions(), this.itemSizeCache], ({
                                                                                                                     count: n,
                                                                                                                     paddingStart: r,
                                                                                                                     scrollMargin: o,
                                                                                                                     getItemKey: i,
                                                                                                                     enabled: l
                                                                                                                 }, c) => {
                if (!l) return this.measurementsCache = [], this.itemSizeCache.clear(), [];
                this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach(g => {
                    this.itemSizeCache.set(g.key, g.size)
                }));
                const d = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
                this.pendingMeasuredCacheIndexes = [];
                const p = this.measurementsCache.slice(0, d);
                for (let g = d; g < n; g++) {
                    const m = i(g), v = this.options.lanes === 1 ? p[g - 1] : this.getFurthestMeasurement(p, g),
                        b = v ? v.end + this.options.gap : r + o, x = c.get(m),
                        w = typeof x == "number" ? x : this.options.estimateSize(g), j = b + w,
                        C = v ? v.lane : g % this.options.lanes;
                    p[g] = {index: g, start: b, size: w, end: j, key: m, lane: C}
                }
                return this.measurementsCache = p, p
            }, {
                key: !1,
                debug: () => this.options.debug
            }), this.calculateRange = Va(() => [this.getMeasurements(), this.getSize(), this.getScrollOffset()], (n, r, o) => this.range = n.length > 0 && r > 0 ? u4({
                measurements: n,
                outerSize: r,
                scrollOffset: o
            }) : null, {
                key: !1,
                debug: () => this.options.debug
            }), this.getIndexes = Va(() => [this.options.rangeExtractor, this.calculateRange(), this.options.overscan, this.options.count], (n, r, o, i) => r === null ? [] : n({
                startIndex: r.startIndex,
                endIndex: r.endIndex,
                overscan: o,
                count: i
            }), {key: !1, debug: () => this.options.debug}), this.indexFromElement = n => {
                const r = this.options.indexAttribute, o = n.getAttribute(r);
                return o ? parseInt(o, 10) : (console.warn(`Missing attribute name '${r}={index}' on measured element.`), -1)
            }, this._measureElement = (n, r) => {
                const o = this.indexFromElement(n), i = this.measurementsCache[o];
                if (!i) return;
                const l = i.key, c = this.elementsCache.get(l);
                c !== n && (c && this.observer.unobserve(c), this.observer.observe(n), this.elementsCache.set(l, n)), n.isConnected && this.resizeItem(o, this.options.measureElement(n, r, this))
            }, this.resizeItem = (n, r) => {
                const o = this.measurementsCache[n];
                if (!o) return;
                const i = this.itemSizeCache.get(o.key) ?? o.size, l = r - i;
                l !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(o, l, this) : o.start < this.getScrollOffset() + this.scrollAdjustments) && this._scrollToOffset(this.getScrollOffset(), {
                    adjustments: this.scrollAdjustments += l,
                    behavior: void 0
                }), this.pendingMeasuredCacheIndexes.push(o.index), this.itemSizeCache = new Map(this.itemSizeCache.set(o.key, r)), this.notify(!1))
            }, this.measureElement = n => {
                if (!n) {
                    this.elementsCache.forEach((r, o) => {
                        r.isConnected || (this.observer.unobserve(r), this.elementsCache.delete(o))
                    });
                    return
                }
                this._measureElement(n, void 0)
            }, this.getVirtualItems = Va(() => [this.getIndexes(), this.getMeasurements()], (n, r) => {
                const o = [];
                for (let i = 0, l = n.length; i < l; i++) {
                    const c = n[i], d = r[c];
                    o.push(d)
                }
                return o
            }, {key: !1, debug: () => this.options.debug}), this.getVirtualItemForOffset = n => {
                const r = this.getMeasurements();
                if (r.length !== 0) return vh(r[rx(0, r.length - 1, o => vh(r[o]).start, n)])
            }, this.getOffsetForAlignment = (n, r) => {
                const o = this.getSize(), i = this.getScrollOffset();
                r === "auto" && (n <= i ? r = "start" : n >= i + o ? r = "end" : r = "start"), r === "start" ? n = n : r === "end" ? n = n - o : r === "center" && (n = n - o / 2);
                const l = this.options.horizontal ? "scrollWidth" : "scrollHeight",
                    d = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[l] : this.scrollElement[l] : 0) - o;
                return Math.max(Math.min(d, n), 0)
            }, this.getOffsetForIndex = (n, r = "auto") => {
                n = Math.max(0, Math.min(n, this.options.count - 1));
                const o = this.measurementsCache[n];
                if (!o) return;
                const i = this.getSize(), l = this.getScrollOffset();
                if (r === "auto") if (o.end >= l + i - this.options.scrollPaddingEnd) r = "end"; else if (o.start <= l + this.options.scrollPaddingStart) r = "start"; else return [l, r];
                const c = r === "end" ? o.end + this.options.scrollPaddingEnd : o.start - this.options.scrollPaddingStart;
                return [this.getOffsetForAlignment(c, r), r]
            }, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
                this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null)
            }, this.scrollToOffset = (n, {align: r = "start", behavior: o} = {}) => {
                this.cancelScrollToIndex(), o === "smooth" && this.isDynamicMode() && console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."), this._scrollToOffset(this.getOffsetForAlignment(n, r), {
                    adjustments: void 0,
                    behavior: o
                })
            }, this.scrollToIndex = (n, {align: r = "auto", behavior: o} = {}) => {
                n = Math.max(0, Math.min(n, this.options.count - 1)), this.cancelScrollToIndex(), o === "smooth" && this.isDynamicMode() && console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");
                const i = this.getOffsetForIndex(n, r);
                if (!i) return;
                const [l, c] = i;
                this._scrollToOffset(l, {
                    adjustments: void 0,
                    behavior: o
                }), o !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
                    if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(this.options.getItemKey(n))) {
                        const [p] = vh(this.getOffsetForIndex(n, c));
                        e4(p, this.getScrollOffset()) || this.scrollToIndex(n, {align: c, behavior: o})
                    } else this.scrollToIndex(n, {align: c, behavior: o})
                }))
            }, this.scrollBy = (n, {behavior: r} = {}) => {
                this.cancelScrollToIndex(), r === "smooth" && this.isDynamicMode() && console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."), this._scrollToOffset(this.getScrollOffset() + n, {
                    adjustments: void 0,
                    behavior: r
                })
            }, this.getTotalSize = () => {
                var n;
                const r = this.getMeasurements();
                let o;
                return r.length === 0 ? o = this.options.paddingStart : o = this.options.lanes === 1 ? ((n = r[r.length - 1]) == null ? void 0 : n.end) ?? 0 : Math.max(...r.slice(-this.options.lanes).map(i => i.end)), Math.max(o - this.options.scrollMargin + this.options.paddingEnd, 0)
            }, this._scrollToOffset = (n, {adjustments: r, behavior: o}) => {
                this.options.scrollToFn(n, {behavior: o, adjustments: r}, this)
            }, this.measure = () => {
                this.itemSizeCache = new Map, this.notify(!1)
            }, this.setOptions(t)
        }
    }

    const rx = (e, t, n, r) => {
        for (; e <= t;) {
            const o = (e + t) / 2 | 0, i = n(o);
            if (i < r) e = o + 1; else if (i > r) t = o - 1; else return o
        }
        return e > 0 ? e - 1 : 0
    };

    function u4({measurements: e, outerSize: t, scrollOffset: n}) {
        const r = e.length - 1, i = rx(0, r, c => e[c].start, n);
        let l = i;
        for (; l < r && e[l].end < n + t;) l++;
        return {startIndex: i, endIndex: l}
    }

    const d4 = typeof document < "u" ? y.useLayoutEffect : y.useEffect;

    function f4(e) {
        const t = y.useReducer(() => ({}), {})[1], n = {
            ...e, onChange: (o, i) => {
                var l;
                i ? mr.flushSync(t) : t(), (l = e.onChange) == null || l.call(e, o, i)
            }
        }, [r] = y.useState(() => new c4(n));
        return r.setOptions(n), y.useEffect(() => r._didMount(), []), d4(() => r._willUpdate()), r
    }

    function p4(e) {
        return f4({observeElementRect: o4, observeElementOffset: i4, scrollToFn: l4, ...e})
    }

    var g4 = Object.defineProperty,
        h4 = (e, t, n) => t in e ? g4(e, t, {enumerable: !0, configurable: !0, writable: !0, value: n}) : e[t] = n,
        yh = (e, t, n) => (h4(e, typeof t != "symbol" ? t + "" : t, n), n);
    let m4 = class {
        constructor() {
            yh(this, "current", this.detect()), yh(this, "handoffState", "pending"), yh(this, "currentId", 0)
        }

        set(t) {
            this.current !== t && (this.handoffState = "pending", this.currentId = 0, this.current = t)
        }

        reset() {
            this.set(this.detect())
        }

        nextId() {
            return ++this.currentId
        }

        get isServer() {
            return this.current === "server"
        }

        get isClient() {
            return this.current === "client"
        }

        detect() {
            return typeof window > "u" || typeof document > "u" ? "server" : "client"
        }

        handoff() {
            this.handoffState === "pending" && (this.handoffState = "complete")
        }

        get isHandoffComplete() {
            return this.handoffState === "complete"
        }
    }, gs = new m4, lt = (e, t) => {
        gs.isServer ? y.useEffect(e, t) : y.useLayoutEffect(e, t)
    };

    function gn(e) {
        let t = y.useRef(e);
        return lt(() => {
            t.current = e
        }, [e]), t
    }

    function cc(e, t) {
        let [n, r] = y.useState(e), o = gn(e);
        return lt(() => r(o.current), [o, r, ...t]), n
    }

    let ve = function (e) {
        let t = gn(e);
        return ee.useCallback((...n) => t.current(...n), [t])
    };

    function Ed(e, t, n) {
        let [r, o] = y.useState(n), i = e !== void 0, l = y.useRef(i), c = y.useRef(!1), d = y.useRef(!1);
        return i && !l.current && !c.current ? (c.current = !0, l.current = i, console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")) : !i && l.current && !d.current && (d.current = !0, l.current = i, console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")), [i ? e : r, ve(p => (i || o(p), t == null ? void 0 : t(p)))]
    }

    function uc(e) {
        typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch(t => setTimeout(() => {
            throw t
        }))
    }

    function Vr() {
        let e = [], t = {
            addEventListener(n, r, o, i) {
                return n.addEventListener(r, o, i), t.add(() => n.removeEventListener(r, o, i))
            }, requestAnimationFrame(...n) {
                let r = requestAnimationFrame(...n);
                return t.add(() => cancelAnimationFrame(r))
            }, nextFrame(...n) {
                return t.requestAnimationFrame(() => t.requestAnimationFrame(...n))
            }, setTimeout(...n) {
                let r = setTimeout(...n);
                return t.add(() => clearTimeout(r))
            }, microTask(...n) {
                let r = {current: !0};
                return uc(() => {
                    r.current && n[0]()
                }), t.add(() => {
                    r.current = !1
                })
            }, style(n, r, o) {
                let i = n.style.getPropertyValue(r);
                return Object.assign(n.style, {[r]: o}), this.add(() => {
                    Object.assign(n.style, {[r]: i})
                })
            }, group(n) {
                let r = Vr();
                return n(r), this.add(() => r.dispose())
            }, add(n) {
                return e.push(n), () => {
                    let r = e.indexOf(n);
                    if (r >= 0) for (let o of e.splice(r, 1)) o()
                }
            }, dispose() {
                for (let n of e.splice(0)) n()
            }
        };
        return t
    }

    function Hr() {
        let [e] = y.useState(Vr);
        return y.useEffect(() => () => e.dispose(), [e]), e
    }

    function v4() {
        let e = typeof document > "u";
        return "useSyncExternalStore" in Ul ? (t => t.useSyncExternalStore)(Ul)(() => () => {
        }, () => !1, () => !e) : !1
    }

    function Ha() {
        let e = v4(), [t, n] = y.useState(gs.isHandoffComplete);
        return t && gs.isHandoffComplete === !1 && n(!1), y.useEffect(() => {
            t !== !0 && n(!0)
        }, [t]), y.useEffect(() => gs.handoff(), []), e ? !1 : t
    }

    var ox;
    let Et = (ox = ee.useId) != null ? ox : function () {
        let e = Ha(), [t, n] = ee.useState(e ? () => gs.nextId() : null);
        return lt(() => {
            t === null && n(gs.nextId())
        }, [t]), t != null ? "" + t : void 0
    };

    function qe(e, t, ...n) {
        if (e in t) {
            let o = t[e];
            return typeof o == "function" ? o(...n) : o
        }
        let r = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o => `"${o}"`).join(", ")}.`);
        throw Error.captureStackTrace && Error.captureStackTrace(r, qe), r
    }

    function qs(e) {
        return gs.isServer ? null : e instanceof Node ? e.ownerDocument : e != null && e.hasOwnProperty("current") && e.current instanceof Node ? e.current.ownerDocument : document
    }

    let bh = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map(e => `${e}:not([tabindex='-1'])`).join(",");
    var Pt = (e => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(Pt || {}),
        po = (e => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(po || {}),
        y4 = (e => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(y4 || {});

    function Pd(e = document.body) {
        return e == null ? [] : Array.from(e.querySelectorAll(bh)).sort((t, n) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (n.tabIndex || Number.MAX_SAFE_INTEGER)))
    }

    var _d = (e => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(_d || {});

    function xh(e, t = 0) {
        var n;
        return e === ((n = qs(e)) == null ? void 0 : n.body) ? !1 : qe(t, {
            0() {
                return e.matches(bh)
            }, 1() {
                let r = e;
                for (; r !== null;) {
                    if (r.matches(bh)) return !0;
                    r = r.parentElement
                }
                return !1
            }
        })
    }

    var b4 = (e => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(b4 || {});
    typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", e => {
        e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "")
    }, !0), document.addEventListener("click", e => {
        e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "")
    }, !0));

    function Ui(e) {
        e == null || e.focus({preventScroll: !0})
    }

    let x4 = ["textarea", "input"].join(",");

    function w4(e) {
        var t, n;
        return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, x4)) != null ? n : !1
    }

    function hs(e, t = n => n) {
        return e.slice().sort((n, r) => {
            let o = t(n), i = t(r);
            if (o === null || i === null) return 0;
            let l = o.compareDocumentPosition(i);
            return l & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : l & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0
        })
    }

    function hn(e, t, {sorted: n = !0, relativeTo: r = null, skipElements: o = []} = {}) {
        let i = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e.ownerDocument,
            l = Array.isArray(e) ? n ? hs(e) : e : Pd(e);
        o.length > 0 && l.length > 1 && (l = l.filter(b => !o.includes(b))), r = r ?? i.activeElement;
        let c = (() => {
            if (t & 5) return 1;
            if (t & 10) return -1;
            throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")
        })(), d = (() => {
            if (t & 1) return 0;
            if (t & 2) return Math.max(0, l.indexOf(r)) - 1;
            if (t & 4) return Math.max(0, l.indexOf(r)) + 1;
            if (t & 8) return l.length - 1;
            throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")
        })(), p = t & 32 ? {preventScroll: !0} : {}, g = 0, m = l.length, v;
        do {
            if (g >= m || g + m <= 0) return 0;
            let b = d + g;
            if (t & 16) b = (b + m) % m; else {
                if (b < 0) return 3;
                if (b >= m) return 1
            }
            v = l[b], v == null || v.focus(p), g += c
        } while (v !== i.activeElement);
        return t & 6 && w4(v) && v.select(), 2
    }

    function sx() {
        return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0
    }

    function S4() {
        return /Android/gi.test(window.navigator.userAgent)
    }

    function ix() {
        return sx() || S4()
    }

    function kd(e, t, n) {
        let r = gn(t);
        y.useEffect(() => {
            function o(i) {
                r.current(i)
            }

            return document.addEventListener(e, o, n), () => document.removeEventListener(e, o, n)
        }, [e, n])
    }

    function ax(e, t, n) {
        let r = gn(t);
        y.useEffect(() => {
            function o(i) {
                r.current(i)
            }

            return window.addEventListener(e, o, n), () => window.removeEventListener(e, o, n)
        }, [e, n])
    }

    function Td(e, t, n = !0) {
        let r = y.useRef(!1);
        y.useEffect(() => {
            requestAnimationFrame(() => {
                r.current = n
            })
        }, [n]);

        function o(l, c) {
            if (!r.current || l.defaultPrevented) return;
            let d = c(l);
            if (d === null || !d.getRootNode().contains(d) || !d.isConnected) return;
            let p = function g(m) {
                return typeof m == "function" ? g(m()) : Array.isArray(m) || m instanceof Set ? m : [m]
            }(e);
            for (let g of p) {
                if (g === null) continue;
                let m = g instanceof HTMLElement ? g : g.current;
                if (m != null && m.contains(d) || l.composed && l.composedPath().includes(m)) return
            }
            return !xh(d, _d.Loose) && d.tabIndex !== -1 && l.preventDefault(), t(l, d)
        }

        let i = y.useRef(null);
        kd("pointerdown", l => {
            var c, d;
            r.current && (i.current = ((d = (c = l.composedPath) == null ? void 0 : c.call(l)) == null ? void 0 : d[0]) || l.target)
        }, !0), kd("mousedown", l => {
            var c, d;
            r.current && (i.current = ((d = (c = l.composedPath) == null ? void 0 : c.call(l)) == null ? void 0 : d[0]) || l.target)
        }, !0), kd("click", l => {
            ix() || i.current && (o(l, () => i.current), i.current = null)
        }, !0), kd("touchend", l => o(l, () => l.target instanceof HTMLElement ? l.target : null), !0), ax("blur", l => o(l, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0)
    }

    function ms(...e) {
        return y.useMemo(() => qs(...e), [...e])
    }

    function lx(e) {
        var t;
        if (e.type) return e.type;
        let n = (t = e.as) != null ? t : "button";
        if (typeof n == "string" && n.toLowerCase() === "button") return "button"
    }

    function Fa(e, t) {
        let [n, r] = y.useState(() => lx(e));
        return lt(() => {
            r(lx(e))
        }, [e.type, e.as]), lt(() => {
            n || t.current && t.current instanceof HTMLButtonElement && !t.current.hasAttribute("type") && r("button")
        }, [n, t]), n
    }

    let cx = Symbol();

    function wh(e, t = !0) {
        return Object.assign(e, {[cx]: t})
    }

    function rt(...e) {
        let t = y.useRef(e);
        y.useEffect(() => {
            t.current = e
        }, [e]);
        let n = ve(r => {
            for (let o of t.current) o != null && (typeof o == "function" ? o(r) : o.current = r)
        });
        return e.every(r => r == null || (r == null ? void 0 : r[cx])) ? void 0 : n
    }

    function ux(e) {
        return [e.screenX, e.screenY]
    }

    function dx() {
        let e = y.useRef([-1, -1]);
        return {
            wasMoved(t) {
                let n = ux(t);
                return e.current[0] === n[0] && e.current[1] === n[1] ? !1 : (e.current = n, !0)
            }, update(t) {
                e.current = ux(t)
            }
        }
    }

    function fx({container: e, accept: t, walk: n, enabled: r = !0}) {
        let o = y.useRef(t), i = y.useRef(n);
        y.useEffect(() => {
            o.current = t, i.current = n
        }, [t, n]), lt(() => {
            if (!e || !r) return;
            let l = qs(e);
            if (!l) return;
            let c = o.current, d = i.current, p = Object.assign(m => c(m), {acceptNode: c}),
                g = l.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, p, !1);
            for (; g.nextNode();) d(g.currentNode)
        }, [e, r, o, i])
    }

    function dc(e, t) {
        let n = y.useRef([]), r = ve(e);
        y.useEffect(() => {
            let o = [...n.current];
            for (let [i, l] of t.entries()) if (n.current[i] !== l) {
                let c = r(t, o);
                return n.current = t, c
            }
        }, [r, ...t])
    }

    function Od(...e) {
        return Array.from(new Set(e.flatMap(t => typeof t == "string" ? t.split(" ") : []))).filter(Boolean).join(" ")
    }

    var Rn = (e => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Rn || {}),
        Ys = (e => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Ys || {});

    function Je({
                    ourProps: e,
                    theirProps: t,
                    slot: n,
                    defaultTag: r,
                    features: o,
                    visible: i = !0,
                    name: l,
                    mergeRefs: c
                }) {
        c = c ?? j4;
        let d = px(t, e);
        if (i) return Ld(d, n, r, l, c);
        let p = o ?? 0;
        if (p & 2) {
            let {static: g = !1, ...m} = d;
            if (g) return Ld(m, n, r, l, c)
        }
        if (p & 1) {
            let {unmount: g = !0, ...m} = d;
            return qe(g ? 0 : 1, {
                0() {
                    return null
                }, 1() {
                    return Ld({...m, hidden: !0, style: {display: "none"}}, n, r, l, c)
                }
            })
        }
        return Ld(d, n, r, l, c)
    }

    function Ld(e, t = {}, n, r, o) {
        let {as: i = n, children: l, refName: c = "ref", ...d} = jh(e, ["unmount", "static"]),
            p = e.ref !== void 0 ? {[c]: e.ref} : {}, g = typeof l == "function" ? l(t) : l;
        "className" in d && d.className && typeof d.className == "function" && (d.className = d.className(t));
        let m = {};
        if (t) {
            let v = !1, b = [];
            for (let [x, w] of Object.entries(t)) typeof w == "boolean" && (v = !0), w === !0 && b.push(x);
            v && (m["data-headlessui-state"] = b.join(" "))
        }
        if (i === y.Fragment && Object.keys(za(d)).length > 0) {
            if (!y.isValidElement(g) || Array.isArray(g) && g.length > 1) throw new Error(['Passing props on "Fragment"!', "", `The current component <${r} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(d).map(w => `  - ${w}`).join(`
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".', "Render a single element as the child so that we can forward the props onto that element."].map(w => `  - ${w}`).join(`
`)].join(`
`));
            let v = g.props,
                b = typeof (v == null ? void 0 : v.className) == "function" ? (...w) => Od(v == null ? void 0 : v.className(...w), d.className) : Od(v == null ? void 0 : v.className, d.className),
                x = b ? {className: b} : {};
            return y.cloneElement(g, Object.assign({}, px(g.props, za(jh(d, ["ref"]))), m, p, {ref: o(g.ref, p.ref)}, x))
        }
        return y.createElement(i, Object.assign({}, jh(d, ["ref"]), i !== y.Fragment && p, i !== y.Fragment && m), g)
    }

    function Sh() {
        let e = y.useRef([]), t = y.useCallback(n => {
            for (let r of e.current) r != null && (typeof r == "function" ? r(n) : r.current = n)
        }, []);
        return (...n) => {
            if (!n.every(r => r == null)) return e.current = n, t
        }
    }

    function j4(...e) {
        return e.every(t => t == null) ? void 0 : t => {
            for (let n of e) n != null && (typeof n == "function" ? n(t) : n.current = t)
        }
    }

    function px(...e) {
        if (e.length === 0) return {};
        if (e.length === 1) return e[0];
        let t = {}, n = {};
        for (let r of e) for (let o in r) o.startsWith("on") && typeof r[o] == "function" ? (n[o] != null || (n[o] = []), n[o].push(r[o])) : t[o] = r[o];
        if (t.disabled || t["aria-disabled"]) return Object.assign(t, Object.fromEntries(Object.keys(n).map(r => [r, void 0])));
        for (let r in n) Object.assign(t, {
            [r](o, ...i) {
                let l = n[r];
                for (let c of l) {
                    if ((o instanceof Event || (o == null ? void 0 : o.nativeEvent) instanceof Event) && o.defaultPrevented) return;
                    c(o, ...i)
                }
            }
        });
        return t
    }

    function Qe(e) {
        var t;
        return Object.assign(y.forwardRef(e), {displayName: (t = e.displayName) != null ? t : e.name})
    }

    function za(e) {
        let t = Object.assign({}, e);
        for (let n in t) t[n] === void 0 && delete t[n];
        return t
    }

    function jh(e, t = []) {
        let n = Object.assign({}, e);
        for (let r of t) r in n && delete n[r];
        return n
    }

    let C4 = "div";
    var wr = (e => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(wr || {});

    function E4(e, t) {
        var n;
        let {features: r = 1, ...o} = e, i = {
            ref: t,
            "aria-hidden": (r & 2) === 2 ? !0 : (n = o["aria-hidden"]) != null ? n : void 0,
            hidden: (r & 4) === 4 ? !0 : void 0,
            style: {
                position: "fixed",
                top: 1,
                left: 1,
                width: 1,
                height: 0,
                padding: 0,
                margin: -1,
                overflow: "hidden",
                clip: "rect(0, 0, 0, 0)",
                whiteSpace: "nowrap",
                borderWidth: "0", ...(r & 4) === 4 && (r & 2) !== 2 && {display: "none"}
            }
        };
        return Je({ourProps: i, theirProps: o, slot: {}, defaultTag: C4, name: "Hidden"})
    }

    let Sr = Qe(E4), Ch = y.createContext(null);
    Ch.displayName = "OpenClosedContext";
    var xt = (e => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(xt || {});

    function Xs() {
        return y.useContext(Ch)
    }

    function fc({value: e, children: t}) {
        return ee.createElement(Ch.Provider, {value: e}, t)
    }

    function P4(e) {
        function t() {
            document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", t))
        }

        typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", t), t())
    }

    let Fo = [];
    P4(() => {
        function e(t) {
            t.target instanceof HTMLElement && t.target !== document.body && Fo[0] !== t.target && (Fo.unshift(t.target), Fo = Fo.filter(n => n != null && n.isConnected), Fo.splice(10))
        }

        window.addEventListener("click", e, {capture: !0}), window.addEventListener("mousedown", e, {capture: !0}), window.addEventListener("focus", e, {capture: !0}), document.body.addEventListener("click", e, {capture: !0}), document.body.addEventListener("mousedown", e, {capture: !0}), document.body.addEventListener("focus", e, {capture: !0})
    });

    function vs(e) {
        let t = e.parentElement, n = null;
        for (; t && !(t instanceof HTMLFieldSetElement);) t instanceof HTMLLegendElement && (n = t), t = t.parentElement;
        let r = (t == null ? void 0 : t.getAttribute("disabled")) === "";
        return r && _4(n) ? !1 : r
    }

    function _4(e) {
        if (!e) return !1;
        let t = e.previousElementSibling;
        for (; t !== null;) {
            if (t instanceof HTMLLegendElement) return !1;
            t = t.previousElementSibling
        }
        return !0
    }

    function k4(e) {
        throw new Error("Unexpected object: " + e)
    }

    var vt = (e => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(vt || {});

    function Eh(e, t) {
        let n = t.resolveItems();
        if (n.length <= 0) return null;
        let r = t.resolveActiveIndex(), o = r ?? -1;
        switch (e.focus) {
            case 0: {
                for (let i = 0; i < n.length; ++i) if (!t.resolveDisabled(n[i], i, n)) return i;
                return r
            }
            case 1: {
                for (let i = o - 1; i >= 0; --i) if (!t.resolveDisabled(n[i], i, n)) return i;
                return r
            }
            case 2: {
                for (let i = o + 1; i < n.length; ++i) if (!t.resolveDisabled(n[i], i, n)) return i;
                return r
            }
            case 3: {
                for (let i = n.length - 1; i >= 0; --i) if (!t.resolveDisabled(n[i], i, n)) return i;
                return r
            }
            case 4: {
                for (let i = 0; i < n.length; ++i) if (t.resolveId(n[i], i, n) === e.id) return i;
                return r
            }
            case 5:
                return null;
            default:
                k4(e)
        }
    }

    function Md(e = {}, t = null, n = []) {
        for (let [r, o] of Object.entries(e)) hx(n, gx(t, r), o);
        return n
    }

    function gx(e, t) {
        return e ? e + "[" + t + "]" : t
    }

    function hx(e, t, n) {
        if (Array.isArray(n)) for (let [r, o] of n.entries()) hx(e, gx(t, r.toString()), o); else n instanceof Date ? e.push([t, n.toISOString()]) : typeof n == "boolean" ? e.push([t, n ? "1" : "0"]) : typeof n == "string" ? e.push([t, n]) : typeof n == "number" ? e.push([t, `${n}`]) : n == null ? e.push([t, ""]) : Md(n, t, e)
    }

    function mx(e) {
        var t, n;
        let r = (t = e == null ? void 0 : e.form) != null ? t : e.closest("form");
        if (r) {
            for (let o of r.elements) if (o !== e && (o.tagName === "INPUT" && o.type === "submit" || o.tagName === "BUTTON" && o.type === "submit" || o.nodeName === "INPUT" && o.type === "image")) {
                o.click();
                return
            }
            (n = r.requestSubmit) == null || n.call(r)
        }
    }

    var $e = (e => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))($e || {}),
        T4 = (e => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(T4 || {}),
        O4 = (e => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(O4 || {}),
        L4 = (e => (e[e.Pointer = 0] = "Pointer", e[e.Focus = 1] = "Focus", e[e.Other = 2] = "Other", e))(L4 || {}),
        M4 = (e => (e[e.OpenCombobox = 0] = "OpenCombobox", e[e.CloseCombobox = 1] = "CloseCombobox", e[e.GoToOption = 2] = "GoToOption", e[e.RegisterOption = 3] = "RegisterOption", e[e.UnregisterOption = 4] = "UnregisterOption", e[e.RegisterLabel = 5] = "RegisterLabel", e[e.SetActivationTrigger = 6] = "SetActivationTrigger", e[e.UpdateVirtualOptions = 7] = "UpdateVirtualOptions", e))(M4 || {});

    function Ph(e, t = n => n) {
        let n = e.activeOptionIndex !== null ? e.options[e.activeOptionIndex] : null, r = t(e.options.slice()),
            o = r.length > 0 && r[0].dataRef.current.order !== null ? r.sort((l, c) => l.dataRef.current.order - c.dataRef.current.order) : hs(r, l => l.dataRef.current.domRef.current),
            i = n ? o.indexOf(n) : null;
        return i === -1 && (i = null), {options: o, activeOptionIndex: i}
    }

    let A4 = {
        1(e) {
            var t;
            return (t = e.dataRef.current) != null && t.disabled || e.comboboxState === 1 ? e : {
                ...e,
                activeOptionIndex: null,
                comboboxState: 1
            }
        },
        0(e) {
            var t, n;
            if ((t = e.dataRef.current) != null && t.disabled || e.comboboxState === 0) return e;
            if ((n = e.dataRef.current) != null && n.value) {
                let r = e.dataRef.current.calculateIndex(e.dataRef.current.value);
                if (r !== -1) return {...e, activeOptionIndex: r, comboboxState: 0}
            }
            return {...e, comboboxState: 0}
        },
        2(e, t) {
            var n, r, o, i, l;
            if ((n = e.dataRef.current) != null && n.disabled || (r = e.dataRef.current) != null && r.optionsRef.current && !((o = e.dataRef.current) != null && o.optionsPropsRef.current.static) && e.comboboxState === 1) return e;
            if (e.virtual) {
                let g = t.focus === vt.Specific ? t.idx : Eh(t, {
                    resolveItems: () => e.virtual.options,
                    resolveActiveIndex: () => {
                        var v, b;
                        return (b = (v = e.activeOptionIndex) != null ? v : e.virtual.options.findIndex(x => !e.virtual.disabled(x))) != null ? b : null
                    },
                    resolveDisabled: e.virtual.disabled,
                    resolveId() {
                        throw new Error("Function not implemented.")
                    }
                }), m = (i = t.trigger) != null ? i : 2;
                return e.activeOptionIndex === g && e.activationTrigger === m ? e : {
                    ...e,
                    activeOptionIndex: g,
                    activationTrigger: m
                }
            }
            let c = Ph(e);
            if (c.activeOptionIndex === null) {
                let g = c.options.findIndex(m => !m.dataRef.current.disabled);
                g !== -1 && (c.activeOptionIndex = g)
            }
            let d = t.focus === vt.Specific ? t.idx : Eh(t, {
                resolveItems: () => c.options,
                resolveActiveIndex: () => c.activeOptionIndex,
                resolveId: g => g.id,
                resolveDisabled: g => g.dataRef.current.disabled
            }), p = (l = t.trigger) != null ? l : 2;
            return e.activeOptionIndex === d && e.activationTrigger === p ? e : {
                ...e, ...c,
                activeOptionIndex: d,
                activationTrigger: p
            }
        },
        3: (e, t) => {
            var n, r, o;
            if ((n = e.dataRef.current) != null && n.virtual) return {...e, options: [...e.options, t.payload]};
            let i = t.payload, l = Ph(e, d => (d.push(i), d));
            e.activeOptionIndex === null && (r = e.dataRef.current) != null && r.isSelected(t.payload.dataRef.current.value) && (l.activeOptionIndex = l.options.indexOf(i));
            let c = {...e, ...l, activationTrigger: 2};
            return (o = e.dataRef.current) != null && o.__demoMode && e.dataRef.current.value === void 0 && (c.activeOptionIndex = 0), c
        },
        4: (e, t) => {
            var n;
            if ((n = e.dataRef.current) != null && n.virtual) return {
                ...e,
                options: e.options.filter(o => o.id !== t.id)
            };
            let r = Ph(e, o => {
                let i = o.findIndex(l => l.id === t.id);
                return i !== -1 && o.splice(i, 1), o
            });
            return {...e, ...r, activationTrigger: 2}
        },
        5: (e, t) => e.labelId === t.id ? e : {...e, labelId: t.id},
        6: (e, t) => e.activationTrigger === t.trigger ? e : {...e, activationTrigger: t.trigger},
        7: (e, t) => {
            var n;
            if (((n = e.virtual) == null ? void 0 : n.options) === t.options) return e;
            let r = e.activeOptionIndex;
            if (e.activeOptionIndex !== null) {
                let o = t.options.indexOf(e.virtual.options[e.activeOptionIndex]);
                o !== -1 ? r = o : r = null
            }
            return {...e, activeOptionIndex: r, virtual: Object.assign({}, e.virtual, {options: t.options})}
        }
    }, _h = y.createContext(null);
    _h.displayName = "ComboboxActionsContext";

    function pc(e) {
        let t = y.useContext(_h);
        if (t === null) {
            let n = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
            throw Error.captureStackTrace && Error.captureStackTrace(n, pc), n
        }
        return t
    }

    let vx = y.createContext(null);

    function R4(e) {
        var t;
        let n = Wi("VirtualProvider"), [r, o] = y.useMemo(() => {
            let d = n.optionsRef.current;
            if (!d) return [0, 0];
            let p = window.getComputedStyle(d);
            return [parseFloat(p.paddingBlockStart || p.paddingTop), parseFloat(p.paddingBlockEnd || p.paddingBottom)]
        }, [n.optionsRef.current]), i = p4({
            scrollPaddingStart: r, scrollPaddingEnd: o, count: n.virtual.options.length, estimateSize() {
                return 40
            }, getScrollElement() {
                var d;
                return (d = n.optionsRef.current) != null ? d : null
            }, overscan: 12
        }), [l, c] = y.useState(0);
        return lt(() => {
            c(d => d + 1)
        }, [(t = n.virtual) == null ? void 0 : t.options]), ee.createElement(vx.Provider, {value: i}, ee.createElement("div", {
            style: {
                position: "relative",
                width: "100%",
                height: `${i.getTotalSize()}px`
            }, ref: d => {
                if (d) {
                    if (typeof process < "u" && {
                        NODE_ENV: "production",
                        NPM_PACKAGE_VERSION: "1.0.0",
                        STUDIO_NPM_PACKAGE_VERSION: "1.0.55"
                    }.JEST_WORKER_ID !== void 0 || n.activationTrigger === 0) return;
                    n.activeOptionIndex !== null && n.virtual.options.length > n.activeOptionIndex && i.scrollToIndex(n.activeOptionIndex)
                }
            }
        }, i.getVirtualItems().map(d => {
            var p;
            return ee.createElement(y.Fragment, {key: d.key}, ee.cloneElement((p = e.children) == null ? void 0 : p.call(e, {
                option: n.virtual.options[d.index],
                open: n.comboboxState === 0
            }), {
                key: `${l}-${d.key}`,
                "data-index": d.index,
                "aria-setsize": n.virtual.options.length,
                "aria-posinset": d.index + 1,
                style: {
                    position: "absolute",
                    top: 0,
                    left: 0,
                    transform: `translateY(${d.start}px)`,
                    overflowAnchor: "none"
                }
            }))
        })))
    }

    let kh = y.createContext(null);
    kh.displayName = "ComboboxDataContext";

    function Wi(e) {
        let t = y.useContext(kh);
        if (t === null) {
            let n = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
            throw Error.captureStackTrace && Error.captureStackTrace(n, Wi), n
        }
        return t
    }

    function N4(e, t) {
        return qe(t.type, A4, e, t)
    }

    let $4 = y.Fragment;

    function D4(e, t) {
        let {
                value: n,
                defaultValue: r,
                onChange: o,
                form: i,
                name: l,
                by: c = null,
                disabled: d = !1,
                __demoMode: p = !1,
                nullable: g = !1,
                multiple: m = !1,
                immediate: v = !1,
                virtual: b = null,
                ...x
            } = e, w = !1, j = null, [C = m ? [] : void 0, _] = Ed(n, o, r), [E, k] = y.useReducer(N4, {
                dataRef: y.createRef(),
                comboboxState: p ? 0 : 1,
                options: [],
                virtual: null,
                activeOptionIndex: null,
                activationTrigger: 2,
                labelId: null
            }), T = y.useRef(!1), O = y.useRef({static: !1, hold: !1}), A = y.useRef(null), $ = y.useRef(null),
            F = y.useRef(null), N = y.useRef(null), z = ve(typeof c == "string" ? (de, je) => {
                let he = c;
                return (de == null ? void 0 : de[he]) === (je == null ? void 0 : je[he])
            } : c ?? ((de, je) => de === je)), V = ve(de => E.options.findIndex(je => z(je.dataRef.current.value, de))),
            X = y.useCallback(de => qe(R.mode, {1: () => C.some(je => z(je, de)), 0: () => z(C, de)}), [C]),
            Z = ve(de => E.activeOptionIndex === V(de)), R = y.useMemo(() => ({
                ...E,
                immediate: w,
                optionsPropsRef: O,
                labelRef: A,
                inputRef: $,
                buttonRef: F,
                optionsRef: N,
                value: C,
                defaultValue: r,
                disabled: d,
                mode: m ? 1 : 0,
                virtual: E.virtual,
                get activeOptionIndex() {
                    if (T.current && E.activeOptionIndex === null && E.options.length > 0) {
                        let de = E.options.findIndex(je => !je.dataRef.current.disabled);
                        if (de !== -1) return de
                    }
                    return E.activeOptionIndex
                },
                calculateIndex: V,
                compare: z,
                isSelected: X,
                isActive: Z,
                nullable: g,
                __demoMode: p
            }), [C, r, d, m, g, p, E, j]);
        lt(() => {
        }, [j, void 0]), lt(() => {
            E.dataRef.current = R
        }, [R]), Td([R.buttonRef, R.inputRef, R.optionsRef], () => ue.closeCombobox(), R.comboboxState === 0);
        let B = y.useMemo(() => {
                var de, je, he;
                return {
                    open: R.comboboxState === 0,
                    disabled: d,
                    activeIndex: R.activeOptionIndex,
                    activeOption: R.activeOptionIndex === null ? null : R.virtual ? R.virtual.options[(de = R.activeOptionIndex) != null ? de : 0] : (he = (je = R.options[R.activeOptionIndex]) == null ? void 0 : je.dataRef.current.value) != null ? he : null,
                    value: C
                }
            }, [R, d, C]), Q = ve(() => {
                if (R.activeOptionIndex !== null) {
                    if (R.virtual) ce(R.virtual.options[R.activeOptionIndex]); else {
                        let {dataRef: de} = R.options[R.activeOptionIndex];
                        ce(de.current.value)
                    }
                    ue.goToOption(vt.Specific, R.activeOptionIndex)
                }
            }), H = ve(() => {
                k({type: 0}), T.current = !0
            }), I = ve(() => {
                k({type: 1}), T.current = !1
            }), D = ve((de, je, he) => (T.current = !1, de === vt.Specific ? k({
                type: 2,
                focus: vt.Specific,
                idx: je,
                trigger: he
            }) : k({type: 2, focus: de, trigger: he}))),
            M = ve((de, je) => (k({type: 3, payload: {id: de, dataRef: je}}), () => {
                R.isActive(je.current.value) && (T.current = !0), k({type: 4, id: de})
            })), W = ve(de => (k({type: 5, id: de}), () => k({type: 5, id: null}))), ce = ve(de => qe(R.mode, {
                0() {
                    return _ == null ? void 0 : _(de)
                }, 1() {
                    let je = R.value.slice(), he = je.findIndex(Ie => z(Ie, de));
                    return he === -1 ? je.push(de) : je.splice(he, 1), _ == null ? void 0 : _(je)
                }
            })), ne = ve(de => {
                k({type: 6, trigger: de})
            }), ue = y.useMemo(() => ({
                onChange: ce,
                registerOption: M,
                registerLabel: W,
                goToOption: D,
                closeCombobox: I,
                openCombobox: H,
                setActivationTrigger: ne,
                selectActiveOption: Q
            }), []), me = t === null ? {} : {ref: t}, ae = y.useRef(null), ie = Hr();
        return y.useEffect(() => {
            ae.current && r !== void 0 && ie.addEventListener(ae.current, "reset", () => {
                _ == null || _(r)
            })
        }, [ae, _]), ee.createElement(_h.Provider, {value: ue}, ee.createElement(kh.Provider, {value: R}, ee.createElement(fc, {
            value: qe(R.comboboxState, {
                0: xt.Open,
                1: xt.Closed
            })
        }, l != null && C != null && Md({[l]: C}).map(([de, je], he) => ee.createElement(Sr, {
            features: wr.Hidden,
            ref: he === 0 ? Ie => {
                var He;
                ae.current = (He = Ie == null ? void 0 : Ie.closest("form")) != null ? He : null
            } : void 0, ...za({
                key: de,
                as: "input",
                type: "hidden",
                hidden: !0,
                readOnly: !0,
                form: i,
                disabled: d,
                name: de,
                value: je
            })
        })), Je({ourProps: me, theirProps: x, slot: B, defaultTag: $4, name: "Combobox"}))))
    }

    let I4 = "input";

    function V4(e, t) {
        var n, r, o, i, l;
        let c = Et(), {
                id: d = `headlessui-combobox-input-${c}`,
                onChange: p,
                displayValue: g,
                type: m = "text",
                ...v
            } = e, b = Wi("Combobox.Input"), x = pc("Combobox.Input"), w = rt(b.inputRef, t), j = ms(b.inputRef),
            C = y.useRef(!1), _ = Hr(), E = ve(() => {
                x.onChange(null), b.optionsRef.current && (b.optionsRef.current.scrollTop = 0), x.goToOption(vt.Nothing)
            }), k = function () {
                var R;
                return typeof g == "function" && b.value !== void 0 ? (R = g(b.value)) != null ? R : "" : typeof b.value == "string" ? b.value : ""
            }();
        dc(([R, B], [Q, H]) => {
            if (C.current) return;
            let I = b.inputRef.current;
            I && ((H === 0 && B === 1 || R !== Q) && (I.value = R), requestAnimationFrame(() => {
                if (C.current || !I || (j == null ? void 0 : j.activeElement) !== I) return;
                let {selectionStart: D, selectionEnd: M} = I;
                Math.abs((M ?? 0) - (D ?? 0)) === 0 && D === 0 && I.setSelectionRange(I.value.length, I.value.length)
            }))
        }, [k, b.comboboxState, j]), dc(([R], [B]) => {
            if (R === 0 && B === 1) {
                if (C.current) return;
                let Q = b.inputRef.current;
                if (!Q) return;
                let H = Q.value, {selectionStart: I, selectionEnd: D, selectionDirection: M} = Q;
                Q.value = "", Q.value = H, M !== null ? Q.setSelectionRange(I, D, M) : Q.setSelectionRange(I, D)
            }
        }, [b.comboboxState]);
        let T = y.useRef(!1), O = ve(() => {
            T.current = !0
        }), A = ve(() => {
            _.nextFrame(() => {
                T.current = !1
            })
        }), $ = ve(R => {
            switch (C.current = !0, R.key) {
                case $e.Enter:
                    if (C.current = !1, b.comboboxState !== 0 || T.current) return;
                    if (R.preventDefault(), R.stopPropagation(), b.activeOptionIndex === null) {
                        x.closeCombobox();
                        return
                    }
                    x.selectActiveOption(), b.mode === 0 && x.closeCombobox();
                    break;
                case $e.ArrowDown:
                    return C.current = !1, R.preventDefault(), R.stopPropagation(), qe(b.comboboxState, {
                        0: () => x.goToOption(vt.Next),
                        1: () => x.openCombobox()
                    });
                case $e.ArrowUp:
                    return C.current = !1, R.preventDefault(), R.stopPropagation(), qe(b.comboboxState, {
                        0: () => x.goToOption(vt.Previous),
                        1: () => {
                            x.openCombobox(), _.nextFrame(() => {
                                b.value || x.goToOption(vt.Last)
                            })
                        }
                    });
                case $e.Home:
                    if (R.shiftKey) break;
                    return C.current = !1, R.preventDefault(), R.stopPropagation(), x.goToOption(vt.First);
                case $e.PageUp:
                    return C.current = !1, R.preventDefault(), R.stopPropagation(), x.goToOption(vt.First);
                case $e.End:
                    if (R.shiftKey) break;
                    return C.current = !1, R.preventDefault(), R.stopPropagation(), x.goToOption(vt.Last);
                case $e.PageDown:
                    return C.current = !1, R.preventDefault(), R.stopPropagation(), x.goToOption(vt.Last);
                case $e.Escape:
                    return C.current = !1, b.comboboxState !== 0 ? void 0 : (R.preventDefault(), b.optionsRef.current && !b.optionsPropsRef.current.static && R.stopPropagation(), b.nullable && b.mode === 0 && b.value === null && E(), x.closeCombobox());
                case $e.Tab:
                    if (C.current = !1, b.comboboxState !== 0) return;
                    b.mode === 0 && b.activationTrigger !== 1 && x.selectActiveOption(), x.closeCombobox();
                    break
            }
        }), F = ve(R => {
            p == null || p(R), b.nullable && b.mode === 0 && R.target.value === "" && E(), x.openCombobox()
        }), N = ve(R => {
            var B, Q, H;
            let I = (B = R.relatedTarget) != null ? B : Fo.find(D => D !== R.currentTarget);
            if (C.current = !1, !((Q = b.optionsRef.current) != null && Q.contains(I)) && !((H = b.buttonRef.current) != null && H.contains(I)) && b.comboboxState === 0) return R.preventDefault(), b.mode === 0 && (b.nullable && b.value === null ? E() : b.activationTrigger !== 1 && x.selectActiveOption()), x.closeCombobox()
        }), z = ve(R => {
            var B, Q, H;
            let I = (B = R.relatedTarget) != null ? B : Fo.find(D => D !== R.currentTarget);
            (Q = b.buttonRef.current) != null && Q.contains(I) || (H = b.optionsRef.current) != null && H.contains(I) || b.disabled || b.immediate && b.comboboxState !== 0 && (x.openCombobox(), _.nextFrame(() => {
                x.setActivationTrigger(1)
            }))
        }), V = cc(() => {
            if (b.labelId) return [b.labelId].join(" ")
        }, [b.labelId]), X = y.useMemo(() => ({open: b.comboboxState === 0, disabled: b.disabled}), [b]), Z = {
            ref: w,
            id: d,
            role: "combobox",
            type: m,
            "aria-controls": (n = b.optionsRef.current) == null ? void 0 : n.id,
            "aria-expanded": b.comboboxState === 0,
            "aria-activedescendant": b.activeOptionIndex === null ? void 0 : b.virtual ? (r = b.options.find(R => {
                var B;
                return !((B = b.virtual) != null && B.disabled(R.dataRef.current.value)) && b.compare(R.dataRef.current.value, b.virtual.options[b.activeOptionIndex])
            })) == null ? void 0 : r.id : (o = b.options[b.activeOptionIndex]) == null ? void 0 : o.id,
            "aria-labelledby": V,
            "aria-autocomplete": "list",
            defaultValue: (l = (i = e.defaultValue) != null ? i : b.defaultValue !== void 0 ? g == null ? void 0 : g(b.defaultValue) : null) != null ? l : b.defaultValue,
            disabled: b.disabled,
            onCompositionStart: O,
            onCompositionEnd: A,
            onKeyDown: $,
            onChange: F,
            onFocus: z,
            onBlur: N
        };
        return Je({ourProps: Z, theirProps: v, slot: X, defaultTag: I4, name: "Combobox.Input"})
    }

    let H4 = "button";

    function F4(e, t) {
        var n;
        let r = Wi("Combobox.Button"), o = pc("Combobox.Button"), i = rt(r.buttonRef, t),
            l = Et(), {id: c = `headlessui-combobox-button-${l}`, ...d} = e, p = Hr(), g = ve(w => {
                switch (w.key) {
                    case $e.ArrowDown:
                        return w.preventDefault(), w.stopPropagation(), r.comboboxState === 1 && o.openCombobox(), p.nextFrame(() => {
                            var j;
                            return (j = r.inputRef.current) == null ? void 0 : j.focus({preventScroll: !0})
                        });
                    case $e.ArrowUp:
                        return w.preventDefault(), w.stopPropagation(), r.comboboxState === 1 && (o.openCombobox(), p.nextFrame(() => {
                            r.value || o.goToOption(vt.Last)
                        })), p.nextFrame(() => {
                            var j;
                            return (j = r.inputRef.current) == null ? void 0 : j.focus({preventScroll: !0})
                        });
                    case $e.Escape:
                        return r.comboboxState !== 0 ? void 0 : (w.preventDefault(), r.optionsRef.current && !r.optionsPropsRef.current.static && w.stopPropagation(), o.closeCombobox(), p.nextFrame(() => {
                            var j;
                            return (j = r.inputRef.current) == null ? void 0 : j.focus({preventScroll: !0})
                        }));
                    default:
                        return
                }
            }), m = ve(w => {
                if (vs(w.currentTarget)) return w.preventDefault();
                r.comboboxState === 0 ? o.closeCombobox() : (w.preventDefault(), o.openCombobox()), p.nextFrame(() => {
                    var j;
                    return (j = r.inputRef.current) == null ? void 0 : j.focus({preventScroll: !0})
                })
            }), v = cc(() => {
                if (r.labelId) return [r.labelId, c].join(" ")
            }, [r.labelId, c]),
            b = y.useMemo(() => ({open: r.comboboxState === 0, disabled: r.disabled, value: r.value}), [r]), x = {
                ref: i,
                id: c,
                type: Fa(e, r.buttonRef),
                tabIndex: -1,
                "aria-haspopup": "listbox",
                "aria-controls": (n = r.optionsRef.current) == null ? void 0 : n.id,
                "aria-expanded": r.comboboxState === 0,
                "aria-labelledby": v,
                disabled: r.disabled,
                onClick: m,
                onKeyDown: g
            };
        return Je({ourProps: x, theirProps: d, slot: b, defaultTag: H4, name: "Combobox.Button"})
    }

    let z4 = "label";

    function B4(e, t) {
        let n = Et(), {id: r = `headlessui-combobox-label-${n}`, ...o} = e, i = Wi("Combobox.Label"),
            l = pc("Combobox.Label"), c = rt(i.labelRef, t);
        lt(() => l.registerLabel(r), [r]);
        let d = ve(() => {
            var g;
            return (g = i.inputRef.current) == null ? void 0 : g.focus({preventScroll: !0})
        }), p = y.useMemo(() => ({open: i.comboboxState === 0, disabled: i.disabled}), [i]);
        return Je({
            ourProps: {ref: c, id: r, onClick: d},
            theirProps: o,
            slot: p,
            defaultTag: z4,
            name: "Combobox.Label"
        })
    }

    let U4 = "ul", W4 = Rn.RenderStrategy | Rn.Static;

    function G4(e, t) {
        let n = Et(), {id: r = `headlessui-combobox-options-${n}`, hold: o = !1, ...i} = e, l = Wi("Combobox.Options"),
            c = rt(l.optionsRef, t), d = Xs(),
            p = (() => d !== null ? (d & xt.Open) === xt.Open : l.comboboxState === 0)();
        lt(() => {
            var b;
            l.optionsPropsRef.current.static = (b = e.static) != null ? b : !1
        }, [l.optionsPropsRef, e.static]), lt(() => {
            l.optionsPropsRef.current.hold = o
        }, [l.optionsPropsRef, o]), fx({
            container: l.optionsRef.current, enabled: l.comboboxState === 0, accept(b) {
                return b.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : b.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT
            }, walk(b) {
                b.setAttribute("role", "none")
            }
        });
        let g = cc(() => {
                var b, x;
                return (x = l.labelId) != null ? x : (b = l.buttonRef.current) == null ? void 0 : b.id
            }, [l.labelId, l.buttonRef.current]), m = y.useMemo(() => ({open: l.comboboxState === 0, option: void 0}), [l]),
            v = {
                "aria-labelledby": g,
                role: "listbox",
                "aria-multiselectable": l.mode === 1 ? !0 : void 0,
                id: r,
                ref: c
            };
        return l.virtual && l.comboboxState === 0 && Object.assign(i, {children: ee.createElement(R4, null, i.children)}), Je({
            ourProps: v,
            theirProps: i,
            slot: m,
            defaultTag: U4,
            features: W4,
            visible: p,
            name: "Combobox.Options"
        })
    }

    let K4 = "li";

    function q4(e, t) {
        var n;
        let r = Et(), {
                id: o = `headlessui-combobox-option-${r}`,
                disabled: i = !1,
                value: l,
                order: c = null,
                ...d
            } = e, p = Wi("Combobox.Option"), g = pc("Combobox.Option"),
            m = p.virtual ? p.activeOptionIndex === p.calculateIndex(l) : p.activeOptionIndex === null ? !1 : ((n = p.options[p.activeOptionIndex]) == null ? void 0 : n.id) === o,
            v = p.isSelected(l), b = y.useRef(null), x = gn({disabled: i, value: l, domRef: b, order: c}),
            w = y.useContext(vx), j = rt(t, b, w ? w.measureElement : null), C = ve(() => g.onChange(l));
        lt(() => g.registerOption(o, x), [x, o]);
        let _ = y.useRef(!(p.virtual || p.__demoMode));
        lt(() => {
            if (!p.virtual || !p.__demoMode) return;
            let N = Vr();
            return N.requestAnimationFrame(() => {
                _.current = !0
            }), N.dispose
        }, [p.virtual, p.__demoMode]), lt(() => {
            if (!_.current || p.comboboxState !== 0 || !m || p.activationTrigger === 0) return;
            let N = Vr();
            return N.requestAnimationFrame(() => {
                var z, V;
                (V = (z = b.current) == null ? void 0 : z.scrollIntoView) == null || V.call(z, {block: "nearest"})
            }), N.dispose
        }, [b, m, p.comboboxState, p.activationTrigger, p.activeOptionIndex]);
        let E = ve(N => {
            var z;
            if (i || (z = p.virtual) != null && z.disabled(l)) return N.preventDefault();
            C(), ix() || requestAnimationFrame(() => {
                var V;
                return (V = p.inputRef.current) == null ? void 0 : V.focus({preventScroll: !0})
            }), p.mode === 0 && requestAnimationFrame(() => g.closeCombobox())
        }), k = ve(() => {
            var N;
            if (i || (N = p.virtual) != null && N.disabled(l)) return g.goToOption(vt.Nothing);
            let z = p.calculateIndex(l);
            g.goToOption(vt.Specific, z)
        }), T = dx(), O = ve(N => T.update(N)), A = ve(N => {
            var z;
            if (!T.wasMoved(N) || i || (z = p.virtual) != null && z.disabled(l) || m) return;
            let V = p.calculateIndex(l);
            g.goToOption(vt.Specific, V, 0)
        }), $ = ve(N => {
            var z;
            T.wasMoved(N) && (i || (z = p.virtual) != null && z.disabled(l) || m && (p.optionsPropsRef.current.hold || g.goToOption(vt.Nothing)))
        }), F = y.useMemo(() => ({active: m, selected: v, disabled: i}), [m, v, i]);
        return Je({
            ourProps: {
                id: o,
                ref: j,
                role: "option",
                tabIndex: i === !0 ? void 0 : -1,
                "aria-disabled": i === !0 ? !0 : void 0,
                "aria-selected": v,
                disabled: void 0,
                onClick: E,
                onFocus: k,
                onPointerEnter: O,
                onMouseEnter: O,
                onPointerMove: A,
                onMouseMove: A,
                onPointerLeave: $,
                onMouseLeave: $
            }, theirProps: d, slot: F, defaultTag: K4, name: "Combobox.Option"
        })
    }

    let Y4 = Qe(D4), X4 = Qe(F4), Z4 = Qe(V4), J4 = Qe(B4), Q4 = Qe(G4), eL = Qe(q4),
        Ba = Object.assign(Y4, {Input: Z4, Button: X4, Label: J4, Options: Q4, Option: eL});

    function Th(e, t, n, r) {
        let o = gn(n);
        y.useEffect(() => {
            e = e ?? window;

            function i(l) {
                o.current(l)
            }

            return e.addEventListener(t, i, r), () => e.removeEventListener(t, i, r)
        }, [e, t, r])
    }

    function Ua() {
        let e = y.useRef(!1);
        return lt(() => (e.current = !0, () => {
            e.current = !1
        }), []), e
    }

    function yx(e) {
        let t = ve(e), n = y.useRef(!1);
        y.useEffect(() => (n.current = !1, () => {
            n.current = !0, uc(() => {
                n.current && t()
            })
        }), [t])
    }

    var jr = (e => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(jr || {});

    function Oh() {
        let e = y.useRef(0);
        return ax("keydown", t => {
            t.key === "Tab" && (e.current = t.shiftKey ? 1 : 0)
        }, !0), e
    }

    function bx(e) {
        if (!e) return new Set;
        if (typeof e == "function") return new Set(e());
        let t = new Set;
        for (let n of e.current) n.current instanceof HTMLElement && t.add(n.current);
        return t
    }

    let tL = "div";
    var xx = (e => (e[e.None = 1] = "None", e[e.InitialFocus = 2] = "InitialFocus", e[e.TabLock = 4] = "TabLock", e[e.FocusLock = 8] = "FocusLock", e[e.RestoreFocus = 16] = "RestoreFocus", e[e.All = 30] = "All", e))(xx || {});

    function nL(e, t) {
        let n = y.useRef(null), r = rt(n, t), {initialFocus: o, containers: i, features: l = 30, ...c} = e;
        Ha() || (l = 1);
        let d = ms(n);
        sL({ownerDocument: d}, !!(l & 16));
        let p = iL({ownerDocument: d, container: n, initialFocus: o}, !!(l & 2));
        aL({ownerDocument: d, container: n, containers: i, previousActiveElement: p}, !!(l & 8));
        let g = Oh(), m = ve(w => {
            let j = n.current;
            j && (C => C())(() => {
                qe(g.current, {
                    [jr.Forwards]: () => {
                        hn(j, Pt.First, {skipElements: [w.relatedTarget]})
                    }, [jr.Backwards]: () => {
                        hn(j, Pt.Last, {skipElements: [w.relatedTarget]})
                    }
                })
            })
        }), v = Hr(), b = y.useRef(!1), x = {
            ref: r, onKeyDown(w) {
                w.key == "Tab" && (b.current = !0, v.requestAnimationFrame(() => {
                    b.current = !1
                }))
            }, onBlur(w) {
                let j = bx(i);
                n.current instanceof HTMLElement && j.add(n.current);
                let C = w.relatedTarget;
                C instanceof HTMLElement && C.dataset.headlessuiFocusGuard !== "true" && (wx(j, C) || (b.current ? hn(n.current, qe(g.current, {
                    [jr.Forwards]: () => Pt.Next,
                    [jr.Backwards]: () => Pt.Previous
                }) | Pt.WrapAround, {relativeTo: w.target}) : w.target instanceof HTMLElement && Ui(w.target)))
            }
        };
        return ee.createElement(ee.Fragment, null, !!(l & 4) && ee.createElement(Sr, {
            as: "button",
            type: "button",
            "data-headlessui-focus-guard": !0,
            onFocus: m,
            features: wr.Focusable
        }), Je({
            ourProps: x,
            theirProps: c,
            defaultTag: tL,
            name: "FocusTrap"
        }), !!(l & 4) && ee.createElement(Sr, {
            as: "button",
            type: "button",
            "data-headlessui-focus-guard": !0,
            onFocus: m,
            features: wr.Focusable
        }))
    }

    let rL = Qe(nL), gc = Object.assign(rL, {features: xx});

    function oL(e = !0) {
        let t = y.useRef(Fo.slice());
        return dc(([n], [r]) => {
            r === !0 && n === !1 && uc(() => {
                t.current.splice(0)
            }), r === !1 && n === !0 && (t.current = Fo.slice())
        }, [e, Fo, t]), ve(() => {
            var n;
            return (n = t.current.find(r => r != null && r.isConnected)) != null ? n : null
        })
    }

    function sL({ownerDocument: e}, t) {
        let n = oL(t);
        dc(() => {
            t || (e == null ? void 0 : e.activeElement) === (e == null ? void 0 : e.body) && Ui(n())
        }, [t]), yx(() => {
            t && Ui(n())
        })
    }

    function iL({ownerDocument: e, container: t, initialFocus: n}, r) {
        let o = y.useRef(null), i = Ua();
        return dc(() => {
            if (!r) return;
            let l = t.current;
            l && uc(() => {
                if (!i.current) return;
                let c = e == null ? void 0 : e.activeElement;
                if (n != null && n.current) {
                    if ((n == null ? void 0 : n.current) === c) {
                        o.current = c;
                        return
                    }
                } else if (l.contains(c)) {
                    o.current = c;
                    return
                }
                n != null && n.current ? Ui(n.current) : hn(l, Pt.First) === po.Error && console.warn("There are no focusable elements inside the <FocusTrap />"), o.current = e == null ? void 0 : e.activeElement
            })
        }, [r]), o
    }

    function aL({ownerDocument: e, container: t, containers: n, previousActiveElement: r}, o) {
        let i = Ua();
        Th(e == null ? void 0 : e.defaultView, "focus", l => {
            if (!o || !i.current) return;
            let c = bx(n);
            t.current instanceof HTMLElement && c.add(t.current);
            let d = r.current;
            if (!d) return;
            let p = l.target;
            p && p instanceof HTMLElement ? wx(c, p) ? (r.current = p, Ui(p)) : (l.preventDefault(), l.stopPropagation(), Ui(d)) : Ui(r.current)
        }, !0)
    }

    function wx(e, t) {
        for (let n of e) if (n.contains(t)) return !0;
        return !1
    }

    let Sx = y.createContext(!1);

    function lL() {
        return y.useContext(Sx)
    }

    function Lh(e) {
        return ee.createElement(Sx.Provider, {value: e.force}, e.children)
    }

    function cL(e) {
        let t = lL(), n = y.useContext(jx), r = ms(e), [o, i] = y.useState(() => {
            if (!t && n !== null || gs.isServer) return null;
            let l = r == null ? void 0 : r.getElementById("headlessui-portal-root");
            if (l) return l;
            if (r === null) return null;
            let c = r.createElement("div");
            return c.setAttribute("id", "headlessui-portal-root"), r.body.appendChild(c)
        });
        return y.useEffect(() => {
            o !== null && (r != null && r.body.contains(o) || r == null || r.body.appendChild(o))
        }, [o, r]), y.useEffect(() => {
            t || n !== null && i(n.current)
        }, [n, i, t]), o
    }

    let uL = y.Fragment;

    function dL(e, t) {
        let n = e, r = y.useRef(null), o = rt(wh(g => {
            r.current = g
        }), t), i = ms(r), l = cL(r), [c] = y.useState(() => {
            var g;
            return gs.isServer ? null : (g = i == null ? void 0 : i.createElement("div")) != null ? g : null
        }), d = y.useContext(Mh), p = Ha();
        return lt(() => {
            !l || !c || l.contains(c) || (c.setAttribute("data-headlessui-portal", ""), l.appendChild(c))
        }, [l, c]), lt(() => {
            if (c && d) return d.register(c)
        }, [d, c]), yx(() => {
            var g;
            !l || !c || (c instanceof Node && l.contains(c) && l.removeChild(c), l.childNodes.length <= 0 && ((g = l.parentElement) == null || g.removeChild(l)))
        }), p ? !l || !c ? null : mr.createPortal(Je({
            ourProps: {ref: o},
            theirProps: n,
            defaultTag: uL,
            name: "Portal"
        }), c) : null
    }

    let fL = y.Fragment, jx = y.createContext(null);

    function pL(e, t) {
        let {target: n, ...r} = e, o = {ref: rt(t)};
        return ee.createElement(jx.Provider, {value: n}, Je({
            ourProps: o,
            theirProps: r,
            defaultTag: fL,
            name: "Popover.Group"
        }))
    }

    let Mh = y.createContext(null);

    function Cx() {
        let e = y.useContext(Mh), t = y.useRef([]), n = ve(i => (t.current.push(i), e && e.register(i), () => r(i))),
            r = ve(i => {
                let l = t.current.indexOf(i);
                l !== -1 && t.current.splice(l, 1), e && e.unregister(i)
            }), o = y.useMemo(() => ({register: n, unregister: r, portals: t}), [n, r, t]);
        return [t, y.useMemo(() => function ({children: i}) {
            return ee.createElement(Mh.Provider, {value: o}, i)
        }, [o])]
    }

    let gL = Qe(dL), hL = Qe(pL), Ah = Object.assign(gL, {Group: hL});

    function mL(e, t) {
        return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t
    }

    const vL = typeof Object.is == "function" ? Object.is : mL, {
        useState: yL,
        useEffect: bL,
        useLayoutEffect: xL,
        useDebugValue: wL
    } = Ul;

    function SL(e, t, n) {
        const r = t(), [{inst: o}, i] = yL({inst: {value: r, getSnapshot: t}});
        return xL(() => {
            o.value = r, o.getSnapshot = t, Rh(o) && i({inst: o})
        }, [e, r, t]), bL(() => (Rh(o) && i({inst: o}), e(() => {
            Rh(o) && i({inst: o})
        })), [e]), wL(r), r
    }

    function Rh(e) {
        const t = e.getSnapshot, n = e.value;
        try {
            const r = t();
            return !vL(n, r)
        } catch {
            return !0
        }
    }

    function jL(e, t, n) {
        return t()
    }

    const CL = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u",
        EL = !CL, PL = EL ? jL : SL, _L = "useSyncExternalStore" in Ul ? (e => e.useSyncExternalStore)(Ul) : PL;

    function kL(e) {
        return _L(e.subscribe, e.getSnapshot, e.getSnapshot)
    }

    function TL(e, t) {
        let n = e(), r = new Set;
        return {
            getSnapshot() {
                return n
            }, subscribe(o) {
                return r.add(o), () => r.delete(o)
            }, dispatch(o, ...i) {
                let l = t[o].call(n, ...i);
                l && (n = l, r.forEach(c => c()))
            }
        }
    }

    function OL() {
        let e;
        return {
            before({doc: t}) {
                var n;
                let r = t.documentElement;
                e = ((n = t.defaultView) != null ? n : window).innerWidth - r.clientWidth
            }, after({doc: t, d: n}) {
                let r = t.documentElement, o = r.clientWidth - r.offsetWidth, i = e - o;
                n.style(r, "paddingRight", `${i}px`)
            }
        }
    }

    function LL() {
        return sx() ? {
            before({doc: e, d: t, meta: n}) {
                function r(o) {
                    return n.containers.flatMap(i => i()).some(i => i.contains(o))
                }

                t.microTask(() => {
                    var o;
                    if (window.getComputedStyle(e.documentElement).scrollBehavior !== "auto") {
                        let c = Vr();
                        c.style(e.documentElement, "scrollBehavior", "auto"), t.add(() => t.microTask(() => c.dispose()))
                    }
                    let i = (o = window.scrollY) != null ? o : window.pageYOffset, l = null;
                    t.addEventListener(e, "click", c => {
                        if (c.target instanceof HTMLElement) try {
                            let d = c.target.closest("a");
                            if (!d) return;
                            let {hash: p} = new URL(d.href), g = e.querySelector(p);
                            g && !r(g) && (l = g)
                        } catch {
                        }
                    }, !0), t.addEventListener(e, "touchstart", c => {
                        if (c.target instanceof HTMLElement) if (r(c.target)) {
                            let d = c.target;
                            for (; d.parentElement && r(d.parentElement);) d = d.parentElement;
                            t.style(d, "overscrollBehavior", "contain")
                        } else t.style(c.target, "touchAction", "none")
                    }), t.addEventListener(e, "touchmove", c => {
                        if (c.target instanceof HTMLElement) if (r(c.target)) {
                            let d = c.target;
                            for (; d.parentElement && d.dataset.headlessuiPortal !== "" && !(d.scrollHeight > d.clientHeight || d.scrollWidth > d.clientWidth);) d = d.parentElement;
                            d.dataset.headlessuiPortal === "" && c.preventDefault()
                        } else c.preventDefault()
                    }, {passive: !1}), t.add(() => {
                        var c;
                        let d = (c = window.scrollY) != null ? c : window.pageYOffset;
                        i !== d && window.scrollTo(0, i), l && l.isConnected && (l.scrollIntoView({block: "nearest"}), l = null)
                    })
                })
            }
        } : {}
    }

    function ML() {
        return {
            before({doc: e, d: t}) {
                t.style(e.documentElement, "overflow", "hidden")
            }
        }
    }

    function AL(e) {
        let t = {};
        for (let n of e) Object.assign(t, n(t));
        return t
    }

    let Gi = TL(() => new Map, {
        PUSH(e, t) {
            var n;
            let r = (n = this.get(e)) != null ? n : {doc: e, count: 0, d: Vr(), meta: new Set};
            return r.count++, r.meta.add(t), this.set(e, r), this
        }, POP(e, t) {
            let n = this.get(e);
            return n && (n.count--, n.meta.delete(t)), this
        }, SCROLL_PREVENT({doc: e, d: t, meta: n}) {
            let r = {doc: e, d: t, meta: AL(n)}, o = [LL(), OL(), ML()];
            o.forEach(({before: i}) => i == null ? void 0 : i(r)), o.forEach(({after: i}) => i == null ? void 0 : i(r))
        }, SCROLL_ALLOW({d: e}) {
            e.dispose()
        }, TEARDOWN({doc: e}) {
            this.delete(e)
        }
    });
    Gi.subscribe(() => {
        let e = Gi.getSnapshot(), t = new Map;
        for (let [n] of e) t.set(n, n.documentElement.style.overflow);
        for (let n of e.values()) {
            let r = t.get(n.doc) === "hidden", o = n.count !== 0;
            (o && !r || !o && r) && Gi.dispatch(n.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", n), n.count === 0 && Gi.dispatch("TEARDOWN", n)
        }
    });

    function RL(e, t, n) {
        let r = kL(Gi), o = e ? r.get(e) : void 0, i = o ? o.count > 0 : !1;
        return lt(() => {
            if (!(!e || !t)) return Gi.dispatch("PUSH", e, n), () => Gi.dispatch("POP", e, n)
        }, [t, e]), i
    }

    let Nh = new Map, hc = new Map;

    function Ex(e, t = !0) {
        lt(() => {
            var n;
            if (!t) return;
            let r = typeof e == "function" ? e() : e.current;
            if (!r) return;

            function o() {
                var l;
                if (!r) return;
                let c = (l = hc.get(r)) != null ? l : 1;
                if (c === 1 ? hc.delete(r) : hc.set(r, c - 1), c !== 1) return;
                let d = Nh.get(r);
                d && (d["aria-hidden"] === null ? r.removeAttribute("aria-hidden") : r.setAttribute("aria-hidden", d["aria-hidden"]), r.inert = d.inert, Nh.delete(r))
            }

            let i = (n = hc.get(r)) != null ? n : 0;
            return hc.set(r, i + 1), i !== 0 || (Nh.set(r, {
                "aria-hidden": r.getAttribute("aria-hidden"),
                inert: r.inert
            }), r.setAttribute("aria-hidden", "true"), r.inert = !0), o
        }, [e, t])
    }

    function Px({defaultContainers: e = [], portals: t, mainTreeNodeRef: n} = {}) {
        var r;
        let o = y.useRef((r = n == null ? void 0 : n.current) != null ? r : null), i = ms(o), l = ve(() => {
            var c, d, p;
            let g = [];
            for (let m of e) m !== null && (m instanceof HTMLElement ? g.push(m) : "current" in m && m.current instanceof HTMLElement && g.push(m.current));
            if (t != null && t.current) for (let m of t.current) g.push(m);
            for (let m of (c = i == null ? void 0 : i.querySelectorAll("html > *, body > *")) != null ? c : []) m !== document.body && m !== document.head && m instanceof HTMLElement && m.id !== "headlessui-portal-root" && (m.contains(o.current) || m.contains((p = (d = o.current) == null ? void 0 : d.getRootNode()) == null ? void 0 : p.host) || g.some(v => m.contains(v)) || g.push(m));
            return g
        });
        return {
            resolveContainers: l,
            contains: ve(c => l().some(d => d.contains(c))),
            mainTreeNodeRef: o,
            MainTreeNode: y.useMemo(() => function () {
                return n != null ? null : ee.createElement(Sr, {features: wr.Hidden, ref: o})
            }, [o, n])
        }
    }

    function NL() {
        let e = y.useRef(null);
        return {
            mainTreeNodeRef: e, MainTreeNode: y.useMemo(() => function () {
                return ee.createElement(Sr, {features: wr.Hidden, ref: e})
            }, [e])
        }
    }

    let $h = y.createContext(() => {
    });
    $h.displayName = "StackContext";
    var Dh = (e => (e[e.Add = 0] = "Add", e[e.Remove = 1] = "Remove", e))(Dh || {});

    function $L() {
        return y.useContext($h)
    }

    function DL({children: e, onUpdate: t, type: n, element: r, enabled: o}) {
        let i = $L(), l = ve((...c) => {
            t == null || t(...c), i(...c)
        });
        return lt(() => {
            let c = o === void 0 || o === !0;
            return c && l(0, n, r), () => {
                c && l(1, n, r)
            }
        }, [l, n, r, o]), ee.createElement($h.Provider, {value: l}, e)
    }

    let _x = y.createContext(null);

    function kx() {
        let e = y.useContext(_x);
        if (e === null) {
            let t = new Error("You used a <Description /> component, but it is not inside a relevant parent.");
            throw Error.captureStackTrace && Error.captureStackTrace(t, kx), t
        }
        return e
    }

    function Ad() {
        let [e, t] = y.useState([]);
        return [e.length > 0 ? e.join(" ") : void 0, y.useMemo(() => function (n) {
            let r = ve(i => (t(l => [...l, i]), () => t(l => {
                let c = l.slice(), d = c.indexOf(i);
                return d !== -1 && c.splice(d, 1), c
            }))), o = y.useMemo(() => ({
                register: r,
                slot: n.slot,
                name: n.name,
                props: n.props
            }), [r, n.slot, n.name, n.props]);
            return ee.createElement(_x.Provider, {value: o}, n.children)
        }, [t])]
    }

    let IL = "p";

    function VL(e, t) {
        let n = Et(), {id: r = `headlessui-description-${n}`, ...o} = e, i = kx(), l = rt(t);
        lt(() => i.register(r), [r, i.register]);
        let c = {ref: l, ...i.props, id: r};
        return Je({ourProps: c, theirProps: o, slot: i.slot || {}, defaultTag: IL, name: i.name || "Description"})
    }

    let HL = Qe(VL), Ih = Object.assign(HL, {});
    var FL = (e => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(FL || {}),
        zL = (e => (e[e.SetTitleId = 0] = "SetTitleId", e))(zL || {});
    let BL = {
        0(e, t) {
            return e.titleId === t.id ? e : {...e, titleId: t.id}
        }
    }, Rd = y.createContext(null);
    Rd.displayName = "DialogContext";

    function mc(e) {
        let t = y.useContext(Rd);
        if (t === null) {
            let n = new Error(`<${e} /> is missing a parent <Dialog /> component.`);
            throw Error.captureStackTrace && Error.captureStackTrace(n, mc), n
        }
        return t
    }

    function UL(e, t, n = () => [document.body]) {
        RL(e, t, r => {
            var o;
            return {containers: [...(o = r.containers) != null ? o : [], n]}
        })
    }

    function WL(e, t) {
        return qe(t.type, BL, e, t)
    }

    let GL = "div", KL = Rn.RenderStrategy | Rn.Static;

    function qL(e, t) {
        let n = Et(), {
            id: r = `headlessui-dialog-${n}`,
            open: o,
            onClose: i,
            initialFocus: l,
            role: c = "dialog",
            __demoMode: d = !1,
            ...p
        } = e, [g, m] = y.useState(0), v = y.useRef(!1);
        c = function () {
            return c === "dialog" || c === "alertdialog" ? c : (v.current || (v.current = !0, console.warn(`Invalid role [${c}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog")
        }();
        let b = Xs();
        o === void 0 && b !== null && (o = (b & xt.Open) === xt.Open);
        let x = y.useRef(null), w = rt(x, t), j = ms(x), C = e.hasOwnProperty("open") || b !== null,
            _ = e.hasOwnProperty("onClose");
        if (!C && !_) throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");
        if (!C) throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");
        if (!_) throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");
        if (typeof o != "boolean") throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);
        if (typeof i != "function") throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${i}`);
        let E = o ? 0 : 1, [k, T] = y.useReducer(WL, {titleId: null, descriptionId: null, panelRef: y.createRef()}),
            O = ve(() => i(!1)), A = ve(he => T({type: 0, id: he})), $ = Ha() ? d ? !1 : E === 0 : !1, F = g > 1,
            N = y.useContext(Rd) !== null, [z, V] = Cx(), X = {
                get current() {
                    var he;
                    return (he = k.panelRef.current) != null ? he : x.current
                }
            }, {resolveContainers: Z, mainTreeNodeRef: R, MainTreeNode: B} = Px({portals: z, defaultContainers: [X]}),
            Q = F ? "parent" : "leaf", H = b !== null ? (b & xt.Closing) === xt.Closing : !1,
            I = (() => N || H ? !1 : $)(), D = y.useCallback(() => {
                var he, Ie;
                return (Ie = Array.from((he = j == null ? void 0 : j.querySelectorAll("body > *")) != null ? he : []).find(He => He.id === "headlessui-portal-root" ? !1 : He.contains(R.current) && He instanceof HTMLElement)) != null ? Ie : null
            }, [R]);
        Ex(D, I);
        let M = (() => F ? !0 : $)(), W = y.useCallback(() => {
            var he, Ie;
            return (Ie = Array.from((he = j == null ? void 0 : j.querySelectorAll("[data-headlessui-portal]")) != null ? he : []).find(He => He.contains(R.current) && He instanceof HTMLElement)) != null ? Ie : null
        }, [R]);
        Ex(W, M);
        let ce = (() => !(!$ || F))();
        Td(Z, he => {
            he.preventDefault(), O()
        }, ce);
        let ne = (() => !(F || E !== 0))();
        Th(j == null ? void 0 : j.defaultView, "keydown", he => {
            ne && (he.defaultPrevented || he.key === $e.Escape && (he.preventDefault(), he.stopPropagation(), O()))
        });
        let ue = (() => !(H || E !== 0 || N))();
        UL(j, ue, Z), y.useEffect(() => {
            if (E !== 0 || !x.current) return;
            let he = new ResizeObserver(Ie => {
                for (let He of Ie) {
                    let yt = He.target.getBoundingClientRect();
                    yt.x === 0 && yt.y === 0 && yt.width === 0 && yt.height === 0 && O()
                }
            });
            return he.observe(x.current), () => he.disconnect()
        }, [E, x, O]);
        let [me, ae] = Ad(), ie = y.useMemo(() => [{dialogState: E, close: O, setTitleId: A}, k], [E, k, O, A]),
            de = y.useMemo(() => ({open: E === 0}), [E]), je = {
                ref: w,
                id: r,
                role: c,
                "aria-modal": E === 0 ? !0 : void 0,
                "aria-labelledby": k.titleId,
                "aria-describedby": me
            };
        return ee.createElement(DL, {
            type: "Dialog", enabled: E === 0, element: x, onUpdate: ve((he, Ie) => {
                Ie === "Dialog" && qe(he, {[Dh.Add]: () => m(He => He + 1), [Dh.Remove]: () => m(He => He - 1)})
            })
        }, ee.createElement(Lh, {force: !0}, ee.createElement(Ah, null, ee.createElement(Rd.Provider, {value: ie}, ee.createElement(Ah.Group, {target: x}, ee.createElement(Lh, {force: !1}, ee.createElement(ae, {
            slot: de,
            name: "Dialog.Description"
        }, ee.createElement(gc, {
            initialFocus: l,
            containers: Z,
            features: $ ? qe(Q, {
                parent: gc.features.RestoreFocus,
                leaf: gc.features.All & ~gc.features.FocusLock
            }) : gc.features.None
        }, ee.createElement(V, null, Je({
            ourProps: je,
            theirProps: p,
            slot: de,
            defaultTag: GL,
            features: KL,
            visible: E === 0,
            name: "Dialog"
        }))))))))), ee.createElement(B, null))
    }

    let YL = "div";

    function XL(e, t) {
        let n = Et(), {id: r = `headlessui-dialog-overlay-${n}`, ...o} = e, [{
            dialogState: i,
            close: l
        }] = mc("Dialog.Overlay"), c = rt(t), d = ve(g => {
            if (g.target === g.currentTarget) {
                if (vs(g.currentTarget)) return g.preventDefault();
                g.preventDefault(), g.stopPropagation(), l()
            }
        }), p = y.useMemo(() => ({open: i === 0}), [i]);
        return Je({
            ourProps: {ref: c, id: r, "aria-hidden": !0, onClick: d},
            theirProps: o,
            slot: p,
            defaultTag: YL,
            name: "Dialog.Overlay"
        })
    }

    let ZL = "div";

    function JL(e, t) {
        let n = Et(), {
            id: r = `headlessui-dialog-backdrop-${n}`,
            ...o
        } = e, [{dialogState: i}, l] = mc("Dialog.Backdrop"), c = rt(t);
        y.useEffect(() => {
            if (l.panelRef.current === null) throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")
        }, [l.panelRef]);
        let d = y.useMemo(() => ({open: i === 0}), [i]);
        return ee.createElement(Lh, {force: !0}, ee.createElement(Ah, null, Je({
            ourProps: {
                ref: c,
                id: r,
                "aria-hidden": !0
            }, theirProps: o, slot: d, defaultTag: ZL, name: "Dialog.Backdrop"
        })))
    }

    let QL = "div";

    function eM(e, t) {
        let n = Et(), {id: r = `headlessui-dialog-panel-${n}`, ...o} = e, [{dialogState: i}, l] = mc("Dialog.Panel"),
            c = rt(t, l.panelRef), d = y.useMemo(() => ({open: i === 0}), [i]), p = ve(g => {
                g.stopPropagation()
            });
        return Je({ourProps: {ref: c, id: r, onClick: p}, theirProps: o, slot: d, defaultTag: QL, name: "Dialog.Panel"})
    }

    let tM = "h2";

    function nM(e, t) {
        let n = Et(), {id: r = `headlessui-dialog-title-${n}`, ...o} = e, [{
            dialogState: i,
            setTitleId: l
        }] = mc("Dialog.Title"), c = rt(t);
        y.useEffect(() => (l(r), () => l(null)), [r, l]);
        let d = y.useMemo(() => ({open: i === 0}), [i]);
        return Je({ourProps: {ref: c, id: r}, theirProps: o, slot: d, defaultTag: tM, name: "Dialog.Title"})
    }

    let rM = Qe(qL), oM = Qe(JL), sM = Qe(eM), iM = Qe(XL), aM = Qe(nM),
        vc = Object.assign(rM, {Backdrop: oM, Panel: sM, Overlay: iM, Title: aM, Description: Ih});
    var Tx;
    let lM = (Tx = ee.startTransition) != null ? Tx : function (e) {
        e()
    };
    var cM = (e => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(cM || {}),
        uM = (e => (e[e.ToggleDisclosure = 0] = "ToggleDisclosure", e[e.CloseDisclosure = 1] = "CloseDisclosure", e[e.SetButtonId = 2] = "SetButtonId", e[e.SetPanelId = 3] = "SetPanelId", e[e.LinkPanel = 4] = "LinkPanel", e[e.UnlinkPanel = 5] = "UnlinkPanel", e))(uM || {});
    let dM = {
        0: e => ({...e, disclosureState: qe(e.disclosureState, {0: 1, 1: 0})}),
        1: e => e.disclosureState === 1 ? e : {...e, disclosureState: 1},
        4(e) {
            return e.linkedPanel === !0 ? e : {...e, linkedPanel: !0}
        },
        5(e) {
            return e.linkedPanel === !1 ? e : {...e, linkedPanel: !1}
        },
        2(e, t) {
            return e.buttonId === t.buttonId ? e : {...e, buttonId: t.buttonId}
        },
        3(e, t) {
            return e.panelId === t.panelId ? e : {...e, panelId: t.panelId}
        }
    }, Vh = y.createContext(null);
    Vh.displayName = "DisclosureContext";

    function Hh(e) {
        let t = y.useContext(Vh);
        if (t === null) {
            let n = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
            throw Error.captureStackTrace && Error.captureStackTrace(n, Hh), n
        }
        return t
    }

    let Fh = y.createContext(null);
    Fh.displayName = "DisclosureAPIContext";

    function Ox(e) {
        let t = y.useContext(Fh);
        if (t === null) {
            let n = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
            throw Error.captureStackTrace && Error.captureStackTrace(n, Ox), n
        }
        return t
    }

    let zh = y.createContext(null);
    zh.displayName = "DisclosurePanelContext";

    function fM() {
        return y.useContext(zh)
    }

    function pM(e, t) {
        return qe(t.type, dM, e, t)
    }

    let gM = y.Fragment;

    function hM(e, t) {
        let {defaultOpen: n = !1, ...r} = e, o = y.useRef(null), i = rt(t, wh(j => {
                o.current = j
            }, e.as === void 0 || e.as === y.Fragment)), l = y.useRef(null), c = y.useRef(null), d = y.useReducer(pM, {
                disclosureState: n ? 0 : 1,
                linkedPanel: !1,
                buttonRef: c,
                panelRef: l,
                buttonId: null,
                panelId: null
            }), [{disclosureState: p, buttonId: g}, m] = d, v = ve(j => {
                m({type: 1});
                let C = qs(o);
                if (!C || !g) return;
                let _ = (() => j ? j instanceof HTMLElement ? j : j.current instanceof HTMLElement ? j.current : C.getElementById(g) : C.getElementById(g))();
                _ == null || _.focus()
            }), b = y.useMemo(() => ({close: v}), [v]), x = y.useMemo(() => ({open: p === 0, close: v}), [p, v]),
            w = {ref: i};
        return ee.createElement(Vh.Provider, {value: d}, ee.createElement(Fh.Provider, {value: b}, ee.createElement(fc, {
            value: qe(p, {
                0: xt.Open,
                1: xt.Closed
            })
        }, Je({ourProps: w, theirProps: r, slot: x, defaultTag: gM, name: "Disclosure"}))))
    }

    let mM = "button";

    function vM(e, t) {
        let n = Et(), {id: r = `headlessui-disclosure-button-${n}`, ...o} = e, [i, l] = Hh("Disclosure.Button"),
            c = fM(), d = c === null ? !1 : c === i.panelId, p = y.useRef(null), g = rt(p, t, d ? null : i.buttonRef),
            m = Sh();
        y.useEffect(() => {
            if (!d) return l({type: 2, buttonId: r}), () => {
                l({type: 2, buttonId: null})
            }
        }, [r, l, d]);
        let v = ve(_ => {
                var E;
                if (d) {
                    if (i.disclosureState === 1) return;
                    switch (_.key) {
                        case $e.Space:
                        case $e.Enter:
                            _.preventDefault(), _.stopPropagation(), l({type: 0}), (E = i.buttonRef.current) == null || E.focus();
                            break
                    }
                } else switch (_.key) {
                    case $e.Space:
                    case $e.Enter:
                        _.preventDefault(), _.stopPropagation(), l({type: 0});
                        break
                }
            }), b = ve(_ => {
                switch (_.key) {
                    case $e.Space:
                        _.preventDefault();
                        break
                }
            }), x = ve(_ => {
                var E;
                vs(_.currentTarget) || e.disabled || (d ? (l({type: 0}), (E = i.buttonRef.current) == null || E.focus()) : l({type: 0}))
            }), w = y.useMemo(() => ({open: i.disclosureState === 0}), [i]), j = Fa(e, p),
            C = d ? {ref: g, type: j, onKeyDown: v, onClick: x} : {
                ref: g,
                id: r,
                type: j,
                "aria-expanded": i.disclosureState === 0,
                "aria-controls": i.linkedPanel ? i.panelId : void 0,
                onKeyDown: v,
                onKeyUp: b,
                onClick: x
            };
        return Je({mergeRefs: m, ourProps: C, theirProps: o, slot: w, defaultTag: mM, name: "Disclosure.Button"})
    }

    let yM = "div", bM = Rn.RenderStrategy | Rn.Static;

    function xM(e, t) {
        let n = Et(), {
                id: r = `headlessui-disclosure-panel-${n}`,
                ...o
            } = e, [i, l] = Hh("Disclosure.Panel"), {close: c} = Ox("Disclosure.Panel"), d = Sh(),
            p = rt(t, i.panelRef, x => {
                lM(() => l({type: x ? 4 : 5}))
            });
        y.useEffect(() => (l({type: 3, panelId: r}), () => {
            l({type: 3, panelId: null})
        }), [r, l]);
        let g = Xs(), m = (() => g !== null ? (g & xt.Open) === xt.Open : i.disclosureState === 0)(),
            v = y.useMemo(() => ({open: i.disclosureState === 0, close: c}), [i, c]), b = {ref: p, id: r};
        return ee.createElement(zh.Provider, {value: i.panelId}, Je({
            mergeRefs: d,
            ourProps: b,
            theirProps: o,
            slot: v,
            defaultTag: yM,
            features: bM,
            visible: m,
            name: "Disclosure.Panel"
        }))
    }

    let wM = Qe(hM), SM = Qe(vM), jM = Qe(xM), Bh = Object.assign(wM, {Button: SM, Panel: jM}),
        Lx = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;

    function Mx(e) {
        var t, n;
        let r = (t = e.innerText) != null ? t : "", o = e.cloneNode(!0);
        if (!(o instanceof HTMLElement)) return r;
        let i = !1;
        for (let c of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]')) c.remove(), i = !0;
        let l = i ? (n = o.innerText) != null ? n : "" : r;
        return Lx.test(l) && (l = l.replace(Lx, "")), l
    }

    function CM(e) {
        let t = e.getAttribute("aria-label");
        if (typeof t == "string") return t.trim();
        let n = e.getAttribute("aria-labelledby");
        if (n) {
            let r = n.split(" ").map(o => {
                let i = document.getElementById(o);
                if (i) {
                    let l = i.getAttribute("aria-label");
                    return typeof l == "string" ? l.trim() : Mx(i).trim()
                }
                return null
            }).filter(Boolean);
            if (r.length > 0) return r.join(", ")
        }
        return Mx(e).trim()
    }

    function EM(e) {
        let t = y.useRef(""), n = y.useRef("");
        return ve(() => {
            let r = e.current;
            if (!r) return "";
            let o = r.innerText;
            if (t.current === o) return n.current;
            let i = CM(r).trim().toLowerCase();
            return t.current = o, n.current = i, i
        })
    }

    var PM = (e => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(PM || {}),
        _M = (e => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(_M || {}),
        kM = (e => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(kM || {}),
        TM = (e => (e[e.OpenListbox = 0] = "OpenListbox", e[e.CloseListbox = 1] = "CloseListbox", e[e.GoToOption = 2] = "GoToOption", e[e.Search = 3] = "Search", e[e.ClearSearch = 4] = "ClearSearch", e[e.RegisterOption = 5] = "RegisterOption", e[e.UnregisterOption = 6] = "UnregisterOption", e[e.RegisterLabel = 7] = "RegisterLabel", e))(TM || {});

    function Uh(e, t = n => n) {
        let n = e.activeOptionIndex !== null ? e.options[e.activeOptionIndex] : null,
            r = hs(t(e.options.slice()), i => i.dataRef.current.domRef.current), o = n ? r.indexOf(n) : null;
        return o === -1 && (o = null), {options: r, activeOptionIndex: o}
    }

    let OM = {
        1(e) {
            return e.dataRef.current.disabled || e.listboxState === 1 ? e : {
                ...e,
                activeOptionIndex: null,
                listboxState: 1
            }
        }, 0(e) {
            if (e.dataRef.current.disabled || e.listboxState === 0) return e;
            let t = e.activeOptionIndex, {isSelected: n} = e.dataRef.current,
                r = e.options.findIndex(o => n(o.dataRef.current.value));
            return r !== -1 && (t = r), {...e, listboxState: 0, activeOptionIndex: t}
        }, 2(e, t) {
            var n;
            if (e.dataRef.current.disabled || e.listboxState === 1) return e;
            let r = Uh(e), o = Eh(t, {
                resolveItems: () => r.options,
                resolveActiveIndex: () => r.activeOptionIndex,
                resolveId: i => i.id,
                resolveDisabled: i => i.dataRef.current.disabled
            });
            return {
                ...e, ...r,
                searchQuery: "",
                activeOptionIndex: o,
                activationTrigger: (n = t.trigger) != null ? n : 1
            }
        }, 3: (e, t) => {
            if (e.dataRef.current.disabled || e.listboxState === 1) return e;
            let n = e.searchQuery !== "" ? 0 : 1, r = e.searchQuery + t.value.toLowerCase(),
                o = (e.activeOptionIndex !== null ? e.options.slice(e.activeOptionIndex + n).concat(e.options.slice(0, e.activeOptionIndex + n)) : e.options).find(l => {
                    var c;
                    return !l.dataRef.current.disabled && ((c = l.dataRef.current.textValue) == null ? void 0 : c.startsWith(r))
                }), i = o ? e.options.indexOf(o) : -1;
            return i === -1 || i === e.activeOptionIndex ? {...e, searchQuery: r} : {
                ...e,
                searchQuery: r,
                activeOptionIndex: i,
                activationTrigger: 1
            }
        }, 4(e) {
            return e.dataRef.current.disabled || e.listboxState === 1 || e.searchQuery === "" ? e : {
                ...e,
                searchQuery: ""
            }
        }, 5: (e, t) => {
            let n = {id: t.id, dataRef: t.dataRef}, r = Uh(e, o => [...o, n]);
            return e.activeOptionIndex === null && e.dataRef.current.isSelected(t.dataRef.current.value) && (r.activeOptionIndex = r.options.indexOf(n)), {...e, ...r}
        }, 6: (e, t) => {
            let n = Uh(e, r => {
                let o = r.findIndex(i => i.id === t.id);
                return o !== -1 && r.splice(o, 1), r
            });
            return {...e, ...n, activationTrigger: 1}
        }, 7: (e, t) => ({...e, labelId: t.id})
    }, Wh = y.createContext(null);
    Wh.displayName = "ListboxActionsContext";

    function yc(e) {
        let t = y.useContext(Wh);
        if (t === null) {
            let n = new Error(`<${e} /> is missing a parent <Listbox /> component.`);
            throw Error.captureStackTrace && Error.captureStackTrace(n, yc), n
        }
        return t
    }

    let Gh = y.createContext(null);
    Gh.displayName = "ListboxDataContext";

    function bc(e) {
        let t = y.useContext(Gh);
        if (t === null) {
            let n = new Error(`<${e} /> is missing a parent <Listbox /> component.`);
            throw Error.captureStackTrace && Error.captureStackTrace(n, bc), n
        }
        return t
    }

    function LM(e, t) {
        return qe(t.type, OM, e, t)
    }

    let MM = y.Fragment;

    function AM(e, t) {
        let {
            value: n,
            defaultValue: r,
            form: o,
            name: i,
            onChange: l,
            by: c = (ne, ue) => ne === ue,
            disabled: d = !1,
            horizontal: p = !1,
            multiple: g = !1,
            ...m
        } = e;
        const v = p ? "horizontal" : "vertical";
        let b = rt(t), [x = g ? [] : void 0, w] = Ed(n, l, r), [j, C] = y.useReducer(LM, {
                dataRef: y.createRef(),
                listboxState: 1,
                options: [],
                searchQuery: "",
                labelId: null,
                activeOptionIndex: null,
                activationTrigger: 1
            }), _ = y.useRef({static: !1, hold: !1}), E = y.useRef(null), k = y.useRef(null), T = y.useRef(null),
            O = ve(typeof c == "string" ? (ne, ue) => {
                let me = c;
                return (ne == null ? void 0 : ne[me]) === (ue == null ? void 0 : ue[me])
            } : c), A = y.useCallback(ne => qe($.mode, {1: () => x.some(ue => O(ue, ne)), 0: () => O(x, ne)}), [x]),
            $ = y.useMemo(() => ({
                ...j,
                value: x,
                disabled: d,
                mode: g ? 1 : 0,
                orientation: v,
                compare: O,
                isSelected: A,
                optionsPropsRef: _,
                labelRef: E,
                buttonRef: k,
                optionsRef: T
            }), [x, d, g, j]);
        lt(() => {
            j.dataRef.current = $
        }, [$]), Td([$.buttonRef, $.optionsRef], (ne, ue) => {
            var me;
            C({type: 1}), xh(ue, _d.Loose) || (ne.preventDefault(), (me = $.buttonRef.current) == null || me.focus())
        }, $.listboxState === 0);
        let F = y.useMemo(() => ({open: $.listboxState === 0, disabled: d, value: x}), [$, d, x]), N = ve(ne => {
                let ue = $.options.find(me => me.id === ne);
                ue && Q(ue.dataRef.current.value)
            }), z = ve(() => {
                if ($.activeOptionIndex !== null) {
                    let {dataRef: ne, id: ue} = $.options[$.activeOptionIndex];
                    Q(ne.current.value), C({type: 2, focus: vt.Specific, id: ue})
                }
            }), V = ve(() => C({type: 0})), X = ve(() => C({type: 1})), Z = ve((ne, ue, me) => ne === vt.Specific ? C({
                type: 2,
                focus: vt.Specific,
                id: ue,
                trigger: me
            }) : C({type: 2, focus: ne, trigger: me})),
            R = ve((ne, ue) => (C({type: 5, id: ne, dataRef: ue}), () => C({type: 6, id: ne}))),
            B = ve(ne => (C({type: 7, id: ne}), () => C({type: 7, id: null}))), Q = ve(ne => qe($.mode, {
                0() {
                    return w == null ? void 0 : w(ne)
                }, 1() {
                    let ue = $.value.slice(), me = ue.findIndex(ae => O(ae, ne));
                    return me === -1 ? ue.push(ne) : ue.splice(me, 1), w == null ? void 0 : w(ue)
                }
            })), H = ve(ne => C({type: 3, value: ne})), I = ve(() => C({type: 4})), D = y.useMemo(() => ({
                onChange: Q,
                registerOption: R,
                registerLabel: B,
                goToOption: Z,
                closeListbox: X,
                openListbox: V,
                selectActiveOption: z,
                selectOption: N,
                search: H,
                clearSearch: I
            }), []), M = {ref: b}, W = y.useRef(null), ce = Hr();
        return y.useEffect(() => {
            W.current && r !== void 0 && ce.addEventListener(W.current, "reset", () => {
                w == null || w(r)
            })
        }, [W, w]), ee.createElement(Wh.Provider, {value: D}, ee.createElement(Gh.Provider, {value: $}, ee.createElement(fc, {
            value: qe($.listboxState, {
                0: xt.Open,
                1: xt.Closed
            })
        }, i != null && x != null && Md({[i]: x}).map(([ne, ue], me) => ee.createElement(Sr, {
            features: wr.Hidden,
            ref: me === 0 ? ae => {
                var ie;
                W.current = (ie = ae == null ? void 0 : ae.closest("form")) != null ? ie : null
            } : void 0, ...za({
                key: ne,
                as: "input",
                type: "hidden",
                hidden: !0,
                readOnly: !0,
                form: o,
                disabled: d,
                name: ne,
                value: ue
            })
        })), Je({ourProps: M, theirProps: m, slot: F, defaultTag: MM, name: "Listbox"}))))
    }

    let RM = "button";

    function NM(e, t) {
        var n;
        let r = Et(), {id: o = `headlessui-listbox-button-${r}`, ...i} = e, l = bc("Listbox.Button"),
            c = yc("Listbox.Button"), d = rt(l.buttonRef, t), p = Hr(), g = ve(j => {
                switch (j.key) {
                    case $e.Space:
                    case $e.Enter:
                    case $e.ArrowDown:
                        j.preventDefault(), c.openListbox(), p.nextFrame(() => {
                            l.value || c.goToOption(vt.First)
                        });
                        break;
                    case $e.ArrowUp:
                        j.preventDefault(), c.openListbox(), p.nextFrame(() => {
                            l.value || c.goToOption(vt.Last)
                        });
                        break
                }
            }), m = ve(j => {
                switch (j.key) {
                    case $e.Space:
                        j.preventDefault();
                        break
                }
            }), v = ve(j => {
                if (vs(j.currentTarget)) return j.preventDefault();
                l.listboxState === 0 ? (c.closeListbox(), p.nextFrame(() => {
                    var C;
                    return (C = l.buttonRef.current) == null ? void 0 : C.focus({preventScroll: !0})
                })) : (j.preventDefault(), c.openListbox())
            }), b = cc(() => {
                if (l.labelId) return [l.labelId, o].join(" ")
            }, [l.labelId, o]),
            x = y.useMemo(() => ({open: l.listboxState === 0, disabled: l.disabled, value: l.value}), [l]), w = {
                ref: d,
                id: o,
                type: Fa(e, l.buttonRef),
                "aria-haspopup": "listbox",
                "aria-controls": (n = l.optionsRef.current) == null ? void 0 : n.id,
                "aria-expanded": l.listboxState === 0,
                "aria-labelledby": b,
                disabled: l.disabled,
                onKeyDown: g,
                onKeyUp: m,
                onClick: v
            };
        return Je({ourProps: w, theirProps: i, slot: x, defaultTag: RM, name: "Listbox.Button"})
    }

    let $M = "label";

    function DM(e, t) {
        let n = Et(), {id: r = `headlessui-listbox-label-${n}`, ...o} = e, i = bc("Listbox.Label"),
            l = yc("Listbox.Label"), c = rt(i.labelRef, t);
        lt(() => l.registerLabel(r), [r]);
        let d = ve(() => {
            var g;
            return (g = i.buttonRef.current) == null ? void 0 : g.focus({preventScroll: !0})
        }), p = y.useMemo(() => ({open: i.listboxState === 0, disabled: i.disabled}), [i]);
        return Je({
            ourProps: {ref: c, id: r, onClick: d},
            theirProps: o,
            slot: p,
            defaultTag: $M,
            name: "Listbox.Label"
        })
    }

    let IM = "ul", VM = Rn.RenderStrategy | Rn.Static;

    function HM(e, t) {
        var n;
        let r = Et(), {id: o = `headlessui-listbox-options-${r}`, ...i} = e, l = bc("Listbox.Options"),
            c = yc("Listbox.Options"), d = rt(l.optionsRef, t), p = Hr(), g = Hr(), m = Xs(),
            v = (() => m !== null ? (m & xt.Open) === xt.Open : l.listboxState === 0)();
        y.useEffect(() => {
            var C;
            let _ = l.optionsRef.current;
            _ && l.listboxState === 0 && _ !== ((C = qs(_)) == null ? void 0 : C.activeElement) && _.focus({preventScroll: !0})
        }, [l.listboxState, l.optionsRef]);
        let b = ve(C => {
            switch (g.dispose(), C.key) {
                case $e.Space:
                    if (l.searchQuery !== "") return C.preventDefault(), C.stopPropagation(), c.search(C.key);
                case $e.Enter:
                    if (C.preventDefault(), C.stopPropagation(), l.activeOptionIndex !== null) {
                        let {dataRef: _} = l.options[l.activeOptionIndex];
                        c.onChange(_.current.value)
                    }
                    l.mode === 0 && (c.closeListbox(), Vr().nextFrame(() => {
                        var _;
                        return (_ = l.buttonRef.current) == null ? void 0 : _.focus({preventScroll: !0})
                    }));
                    break;
                case qe(l.orientation, {vertical: $e.ArrowDown, horizontal: $e.ArrowRight}):
                    return C.preventDefault(), C.stopPropagation(), c.goToOption(vt.Next);
                case qe(l.orientation, {vertical: $e.ArrowUp, horizontal: $e.ArrowLeft}):
                    return C.preventDefault(), C.stopPropagation(), c.goToOption(vt.Previous);
                case $e.Home:
                case $e.PageUp:
                    return C.preventDefault(), C.stopPropagation(), c.goToOption(vt.First);
                case $e.End:
                case $e.PageDown:
                    return C.preventDefault(), C.stopPropagation(), c.goToOption(vt.Last);
                case $e.Escape:
                    return C.preventDefault(), C.stopPropagation(), c.closeListbox(), p.nextFrame(() => {
                        var _;
                        return (_ = l.buttonRef.current) == null ? void 0 : _.focus({preventScroll: !0})
                    });
                case $e.Tab:
                    C.preventDefault(), C.stopPropagation();
                    break;
                default:
                    C.key.length === 1 && (c.search(C.key), g.setTimeout(() => c.clearSearch(), 350));
                    break
            }
        }), x = cc(() => {
            var C;
            return (C = l.buttonRef.current) == null ? void 0 : C.id
        }, [l.buttonRef.current]), w = y.useMemo(() => ({open: l.listboxState === 0}), [l]), j = {
            "aria-activedescendant": l.activeOptionIndex === null || (n = l.options[l.activeOptionIndex]) == null ? void 0 : n.id,
            "aria-multiselectable": l.mode === 1 ? !0 : void 0,
            "aria-labelledby": x,
            "aria-orientation": l.orientation,
            id: o,
            onKeyDown: b,
            role: "listbox",
            tabIndex: 0,
            ref: d
        };
        return Je({
            ourProps: j,
            theirProps: i,
            slot: w,
            defaultTag: IM,
            features: VM,
            visible: v,
            name: "Listbox.Options"
        })
    }

    let FM = "li";

    function zM(e, t) {
        let n = Et(), {id: r = `headlessui-listbox-option-${n}`, disabled: o = !1, value: i, ...l} = e,
            c = bc("Listbox.Option"), d = yc("Listbox.Option"),
            p = c.activeOptionIndex !== null ? c.options[c.activeOptionIndex].id === r : !1, g = c.isSelected(i),
            m = y.useRef(null), v = EM(m), b = gn({
                disabled: o, value: i, domRef: m, get textValue() {
                    return v()
                }
            }), x = rt(t, m);
        lt(() => {
            if (c.listboxState !== 0 || !p || c.activationTrigger === 0) return;
            let O = Vr();
            return O.requestAnimationFrame(() => {
                var A, $;
                ($ = (A = m.current) == null ? void 0 : A.scrollIntoView) == null || $.call(A, {block: "nearest"})
            }), O.dispose
        }, [m, p, c.listboxState, c.activationTrigger, c.activeOptionIndex]), lt(() => d.registerOption(r, b), [b, r]);
        let w = ve(O => {
            if (o) return O.preventDefault();
            d.onChange(i), c.mode === 0 && (d.closeListbox(), Vr().nextFrame(() => {
                var A;
                return (A = c.buttonRef.current) == null ? void 0 : A.focus({preventScroll: !0})
            }))
        }), j = ve(() => {
            if (o) return d.goToOption(vt.Nothing);
            d.goToOption(vt.Specific, r)
        }), C = dx(), _ = ve(O => C.update(O)), E = ve(O => {
            C.wasMoved(O) && (o || p || d.goToOption(vt.Specific, r, 0))
        }), k = ve(O => {
            C.wasMoved(O) && (o || p && d.goToOption(vt.Nothing))
        }), T = y.useMemo(() => ({active: p, selected: g, disabled: o}), [p, g, o]);
        return Je({
            ourProps: {
                id: r,
                ref: x,
                role: "option",
                tabIndex: o === !0 ? void 0 : -1,
                "aria-disabled": o === !0 ? !0 : void 0,
                "aria-selected": g,
                disabled: void 0,
                onClick: w,
                onFocus: j,
                onPointerEnter: _,
                onMouseEnter: _,
                onPointerMove: E,
                onMouseMove: E,
                onPointerLeave: k,
                onMouseLeave: k
            }, theirProps: l, slot: T, defaultTag: FM, name: "Listbox.Option"
        })
    }

    let BM = Qe(AM), UM = Qe(NM), WM = Qe(DM), GM = Qe(HM), KM = Qe(zM),
        xc = Object.assign(BM, {Button: UM, Label: WM, Options: GM, Option: KM});
    var qM = (e => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(qM || {}),
        YM = (e => (e[e.TogglePopover = 0] = "TogglePopover", e[e.ClosePopover = 1] = "ClosePopover", e[e.SetButton = 2] = "SetButton", e[e.SetButtonId = 3] = "SetButtonId", e[e.SetPanel = 4] = "SetPanel", e[e.SetPanelId = 5] = "SetPanelId", e))(YM || {});
    let XM = {
        0: e => {
            let t = {...e, popoverState: qe(e.popoverState, {0: 1, 1: 0})};
            return t.popoverState === 0 && (t.__demoMode = !1), t
        }, 1(e) {
            return e.popoverState === 1 ? e : {...e, popoverState: 1}
        }, 2(e, t) {
            return e.button === t.button ? e : {...e, button: t.button}
        }, 3(e, t) {
            return e.buttonId === t.buttonId ? e : {...e, buttonId: t.buttonId}
        }, 4(e, t) {
            return e.panel === t.panel ? e : {...e, panel: t.panel}
        }, 5(e, t) {
            return e.panelId === t.panelId ? e : {...e, panelId: t.panelId}
        }
    }, Kh = y.createContext(null);
    Kh.displayName = "PopoverContext";

    function Nd(e) {
        let t = y.useContext(Kh);
        if (t === null) {
            let n = new Error(`<${e} /> is missing a parent <Popover /> component.`);
            throw Error.captureStackTrace && Error.captureStackTrace(n, Nd), n
        }
        return t
    }

    let qh = y.createContext(null);
    qh.displayName = "PopoverAPIContext";

    function Yh(e) {
        let t = y.useContext(qh);
        if (t === null) {
            let n = new Error(`<${e} /> is missing a parent <Popover /> component.`);
            throw Error.captureStackTrace && Error.captureStackTrace(n, Yh), n
        }
        return t
    }

    let Xh = y.createContext(null);
    Xh.displayName = "PopoverGroupContext";

    function Ax() {
        return y.useContext(Xh)
    }

    let $d = y.createContext(null);
    $d.displayName = "PopoverPanelContext";

    function ZM() {
        return y.useContext($d)
    }

    function JM(e, t) {
        return qe(t.type, XM, e, t)
    }

    let QM = "div";

    function eA(e, t) {
        var n;
        let {__demoMode: r = !1, ...o} = e, i = y.useRef(null), l = rt(t, wh(B => {
                i.current = B
            })), c = y.useRef([]), d = y.useReducer(JM, {
                __demoMode: r,
                popoverState: r ? 0 : 1,
                buttons: c,
                button: null,
                buttonId: null,
                panel: null,
                panelId: null,
                beforePanelSentinel: y.createRef(),
                afterPanelSentinel: y.createRef()
            }), [{
                popoverState: p,
                button: g,
                buttonId: m,
                panel: v,
                panelId: b,
                beforePanelSentinel: x,
                afterPanelSentinel: w
            }, j] = d, C = ms((n = i.current) != null ? n : g), _ = y.useMemo(() => {
                if (!g || !v) return !1;
                for (let W of document.querySelectorAll("body > *")) if (Number(W == null ? void 0 : W.contains(g)) ^ Number(W == null ? void 0 : W.contains(v))) return !0;
                let B = Pd(), Q = B.indexOf(g), H = (Q + B.length - 1) % B.length, I = (Q + 1) % B.length, D = B[H],
                    M = B[I];
                return !v.contains(D) && !v.contains(M)
            }, [g, v]), E = gn(m), k = gn(b),
            T = y.useMemo(() => ({buttonId: E, panelId: k, close: () => j({type: 1})}), [E, k, j]), O = Ax(),
            A = O == null ? void 0 : O.registerPopover, $ = ve(() => {
                var B;
                return (B = O == null ? void 0 : O.isFocusWithinPopoverGroup()) != null ? B : (C == null ? void 0 : C.activeElement) && ((g == null ? void 0 : g.contains(C.activeElement)) || (v == null ? void 0 : v.contains(C.activeElement)))
            });
        y.useEffect(() => A == null ? void 0 : A(T), [A, T]);
        let [F, N] = Cx(),
            z = Px({mainTreeNodeRef: O == null ? void 0 : O.mainTreeNodeRef, portals: F, defaultContainers: [g, v]});
        Th(C == null ? void 0 : C.defaultView, "focus", B => {
            var Q, H, I, D;
            B.target !== window && B.target instanceof HTMLElement && p === 0 && ($() || g && v && (z.contains(B.target) || (H = (Q = x.current) == null ? void 0 : Q.contains) != null && H.call(Q, B.target) || (D = (I = w.current) == null ? void 0 : I.contains) != null && D.call(I, B.target) || j({type: 1})))
        }, !0), Td(z.resolveContainers, (B, Q) => {
            j({type: 1}), xh(Q, _d.Loose) || (B.preventDefault(), g == null || g.focus())
        }, p === 0);
        let V = ve(B => {
                j({type: 1});
                let Q = (() => B ? B instanceof HTMLElement ? B : "current" in B && B.current instanceof HTMLElement ? B.current : g : g)();
                Q == null || Q.focus()
            }), X = y.useMemo(() => ({close: V, isPortalled: _}), [V, _]),
            Z = y.useMemo(() => ({open: p === 0, close: V}), [p, V]), R = {ref: l};
        return ee.createElement($d.Provider, {value: null}, ee.createElement(Kh.Provider, {value: d}, ee.createElement(qh.Provider, {value: X}, ee.createElement(fc, {
            value: qe(p, {
                0: xt.Open,
                1: xt.Closed
            })
        }, ee.createElement(N, null, Je({
            ourProps: R,
            theirProps: o,
            slot: Z,
            defaultTag: QM,
            name: "Popover"
        }), ee.createElement(z.MainTreeNode, null))))))
    }

    let tA = "button";

    function nA(e, t) {
        let n = Et(), {
                id: r = `headlessui-popover-button-${n}`,
                ...o
            } = e, [i, l] = Nd("Popover.Button"), {isPortalled: c} = Yh("Popover.Button"), d = y.useRef(null),
            p = `headlessui-focus-sentinel-${Et()}`, g = Ax(), m = g == null ? void 0 : g.closeOthers,
            v = ZM() !== null;
        y.useEffect(() => {
            if (!v) return l({type: 3, buttonId: r}), () => {
                l({type: 3, buttonId: null})
            }
        }, [v, r, l]);
        let [b] = y.useState(() => Symbol()), x = rt(d, t, v ? null : z => {
                if (z) i.buttons.current.push(b); else {
                    let V = i.buttons.current.indexOf(b);
                    V !== -1 && i.buttons.current.splice(V, 1)
                }
                i.buttons.current.length > 1 && console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."), z && l({
                    type: 2,
                    button: z
                })
            }), w = rt(d, t), j = ms(d), C = ve(z => {
                var V, X, Z;
                if (v) {
                    if (i.popoverState === 1) return;
                    switch (z.key) {
                        case $e.Space:
                        case $e.Enter:
                            z.preventDefault(), (X = (V = z.target).click) == null || X.call(V), l({type: 1}), (Z = i.button) == null || Z.focus();
                            break
                    }
                } else switch (z.key) {
                    case $e.Space:
                    case $e.Enter:
                        z.preventDefault(), z.stopPropagation(), i.popoverState === 1 && (m == null || m(i.buttonId)), l({type: 0});
                        break;
                    case $e.Escape:
                        if (i.popoverState !== 0) return m == null ? void 0 : m(i.buttonId);
                        if (!d.current || j != null && j.activeElement && !d.current.contains(j.activeElement)) return;
                        z.preventDefault(), z.stopPropagation(), l({type: 1});
                        break
                }
            }), _ = ve(z => {
                v || z.key === $e.Space && z.preventDefault()
            }), E = ve(z => {
                var V, X;
                vs(z.currentTarget) || e.disabled || (v ? (l({type: 1}), (V = i.button) == null || V.focus()) : (z.preventDefault(), z.stopPropagation(), i.popoverState === 1 && (m == null || m(i.buttonId)), l({type: 0}), (X = i.button) == null || X.focus()))
            }), k = ve(z => {
                z.preventDefault(), z.stopPropagation()
            }), T = i.popoverState === 0, O = y.useMemo(() => ({open: T}), [T]), A = Fa(e, d),
            $ = v ? {ref: w, type: A, onKeyDown: C, onClick: E} : {
                ref: x,
                id: i.buttonId,
                type: A,
                "aria-expanded": i.popoverState === 0,
                "aria-controls": i.panel ? i.panelId : void 0,
                onKeyDown: C,
                onKeyUp: _,
                onClick: E,
                onMouseDown: k
            }, F = Oh(), N = ve(() => {
                let z = i.panel;
                if (!z) return;

                function V() {
                    qe(F.current, {
                        [jr.Forwards]: () => hn(z, Pt.First),
                        [jr.Backwards]: () => hn(z, Pt.Last)
                    }) === po.Error && hn(Pd().filter(X => X.dataset.headlessuiFocusGuard !== "true"), qe(F.current, {
                        [jr.Forwards]: Pt.Next,
                        [jr.Backwards]: Pt.Previous
                    }), {relativeTo: i.button})
                }

                V()
            });
        return ee.createElement(ee.Fragment, null, Je({
            ourProps: $,
            theirProps: o,
            slot: O,
            defaultTag: tA,
            name: "Popover.Button"
        }), T && !v && c && ee.createElement(Sr, {
            id: p,
            features: wr.Focusable,
            "data-headlessui-focus-guard": !0,
            as: "button",
            type: "button",
            onFocus: N
        }))
    }

    let rA = "div", oA = Rn.RenderStrategy | Rn.Static;

    function sA(e, t) {
        let n = Et(), {
                id: r = `headlessui-popover-overlay-${n}`,
                ...o
            } = e, [{popoverState: i}, l] = Nd("Popover.Overlay"), c = rt(t), d = Xs(),
            p = (() => d !== null ? (d & xt.Open) === xt.Open : i === 0)(), g = ve(v => {
                if (vs(v.currentTarget)) return v.preventDefault();
                l({type: 1})
            }), m = y.useMemo(() => ({open: i === 0}), [i]);
        return Je({
            ourProps: {ref: c, id: r, "aria-hidden": !0, onClick: g},
            theirProps: o,
            slot: m,
            defaultTag: rA,
            features: oA,
            visible: p,
            name: "Popover.Overlay"
        })
    }

    let iA = "div", aA = Rn.RenderStrategy | Rn.Static;

    function lA(e, t) {
        let n = Et(), {
                id: r = `headlessui-popover-panel-${n}`,
                focus: o = !1,
                ...i
            } = e, [l, c] = Nd("Popover.Panel"), {close: d, isPortalled: p} = Yh("Popover.Panel"),
            g = `headlessui-focus-sentinel-before-${Et()}`, m = `headlessui-focus-sentinel-after-${Et()}`,
            v = y.useRef(null), b = rt(v, t, $ => {
                c({type: 4, panel: $})
            }), x = ms(v), w = Sh();
        lt(() => (c({type: 5, panelId: r}), () => {
            c({type: 5, panelId: null})
        }), [r, c]);
        let j = Xs(), C = (() => j !== null ? (j & xt.Open) === xt.Open : l.popoverState === 0)(), _ = ve($ => {
            var F;
            switch ($.key) {
                case $e.Escape:
                    if (l.popoverState !== 0 || !v.current || x != null && x.activeElement && !v.current.contains(x.activeElement)) return;
                    $.preventDefault(), $.stopPropagation(), c({type: 1}), (F = l.button) == null || F.focus();
                    break
            }
        });
        y.useEffect(() => {
            var $;
            e.static || l.popoverState === 1 && (($ = e.unmount) == null || $) && c({type: 4, panel: null})
        }, [l.popoverState, e.unmount, e.static, c]), y.useEffect(() => {
            if (l.__demoMode || !o || l.popoverState !== 0 || !v.current) return;
            let $ = x == null ? void 0 : x.activeElement;
            v.current.contains($) || hn(v.current, Pt.First)
        }, [l.__demoMode, o, v, l.popoverState]);
        let E = y.useMemo(() => ({open: l.popoverState === 0, close: d}), [l, d]), k = {
            ref: b, id: r, onKeyDown: _, onBlur: o && l.popoverState === 0 ? $ => {
                var F, N, z, V, X;
                let Z = $.relatedTarget;
                Z && v.current && ((F = v.current) != null && F.contains(Z) || (c({type: 1}), ((z = (N = l.beforePanelSentinel.current) == null ? void 0 : N.contains) != null && z.call(N, Z) || (X = (V = l.afterPanelSentinel.current) == null ? void 0 : V.contains) != null && X.call(V, Z)) && Z.focus({preventScroll: !0})))
            } : void 0, tabIndex: -1
        }, T = Oh(), O = ve(() => {
            let $ = v.current;
            if (!$) return;

            function F() {
                qe(T.current, {
                    [jr.Forwards]: () => {
                        var N;
                        hn($, Pt.First) === po.Error && ((N = l.afterPanelSentinel.current) == null || N.focus())
                    }, [jr.Backwards]: () => {
                        var N;
                        (N = l.button) == null || N.focus({preventScroll: !0})
                    }
                })
            }

            F()
        }), A = ve(() => {
            let $ = v.current;
            if (!$) return;

            function F() {
                qe(T.current, {
                    [jr.Forwards]: () => {
                        var N;
                        if (!l.button) return;
                        let z = Pd(), V = z.indexOf(l.button), X = z.slice(0, V + 1), Z = [...z.slice(V + 1), ...X];
                        for (let R of Z.slice()) if (R.dataset.headlessuiFocusGuard === "true" || (N = l.panel) != null && N.contains(R)) {
                            let B = Z.indexOf(R);
                            B !== -1 && Z.splice(B, 1)
                        }
                        hn(Z, Pt.First, {sorted: !1})
                    }, [jr.Backwards]: () => {
                        var N;
                        hn($, Pt.Previous) === po.Error && ((N = l.button) == null || N.focus())
                    }
                })
            }

            F()
        });
        return ee.createElement($d.Provider, {value: r}, C && p && ee.createElement(Sr, {
            id: g,
            ref: l.beforePanelSentinel,
            features: wr.Focusable,
            "data-headlessui-focus-guard": !0,
            as: "button",
            type: "button",
            onFocus: O
        }), Je({
            mergeRefs: w,
            ourProps: k,
            theirProps: i,
            slot: E,
            defaultTag: iA,
            features: aA,
            visible: C,
            name: "Popover.Panel"
        }), C && p && ee.createElement(Sr, {
            id: m,
            ref: l.afterPanelSentinel,
            features: wr.Focusable,
            "data-headlessui-focus-guard": !0,
            as: "button",
            type: "button",
            onFocus: A
        }))
    }

    let cA = "div";

    function uA(e, t) {
        let n = y.useRef(null), r = rt(n, t), [o, i] = y.useState([]), l = NL(), c = ve(w => {
            i(j => {
                let C = j.indexOf(w);
                if (C !== -1) {
                    let _ = j.slice();
                    return _.splice(C, 1), _
                }
                return j
            })
        }), d = ve(w => (i(j => [...j, w]), () => c(w))), p = ve(() => {
            var w;
            let j = qs(n);
            if (!j) return !1;
            let C = j.activeElement;
            return (w = n.current) != null && w.contains(C) ? !0 : o.some(_ => {
                var E, k;
                return ((E = j.getElementById(_.buttonId.current)) == null ? void 0 : E.contains(C)) || ((k = j.getElementById(_.panelId.current)) == null ? void 0 : k.contains(C))
            })
        }), g = ve(w => {
            for (let j of o) j.buttonId.current !== w && j.close()
        }), m = y.useMemo(() => ({
            registerPopover: d,
            unregisterPopover: c,
            isFocusWithinPopoverGroup: p,
            closeOthers: g,
            mainTreeNodeRef: l.mainTreeNodeRef
        }), [d, c, p, g, l.mainTreeNodeRef]), v = y.useMemo(() => ({}), []), b = e, x = {ref: r};
        return ee.createElement(Xh.Provider, {value: m}, Je({
            ourProps: x,
            theirProps: b,
            slot: v,
            defaultTag: cA,
            name: "Popover.Group"
        }), ee.createElement(l.MainTreeNode, null))
    }

    let dA = Qe(eA), fA = Qe(nA), pA = Qe(sA), gA = Qe(lA), hA = Qe(uA),
        Zh = Object.assign(dA, {Button: fA, Overlay: pA, Panel: gA, Group: hA}), Rx = y.createContext(null);

    function Nx() {
        let e = y.useContext(Rx);
        if (e === null) {
            let t = new Error("You used a <Label /> component, but it is not inside a relevant parent.");
            throw Error.captureStackTrace && Error.captureStackTrace(t, Nx), t
        }
        return e
    }

    function Jh() {
        let [e, t] = y.useState([]);
        return [e.length > 0 ? e.join(" ") : void 0, y.useMemo(() => function (n) {
            let r = ve(i => (t(l => [...l, i]), () => t(l => {
                let c = l.slice(), d = c.indexOf(i);
                return d !== -1 && c.splice(d, 1), c
            }))), o = y.useMemo(() => ({
                register: r,
                slot: n.slot,
                name: n.name,
                props: n.props
            }), [r, n.slot, n.name, n.props]);
            return ee.createElement(Rx.Provider, {value: o}, n.children)
        }, [t])]
    }

    let mA = "label";

    function vA(e, t) {
        let n = Et(), {id: r = `headlessui-label-${n}`, passive: o = !1, ...i} = e, l = Nx(), c = rt(t);
        lt(() => l.register(r), [r, l.register]);
        let d = {ref: c, ...l.props, id: r};
        return o && ("onClick" in d && (delete d.htmlFor, delete d.onClick), "onClick" in i && delete i.onClick), Je({
            ourProps: d,
            theirProps: i,
            slot: l.slot || {},
            defaultTag: mA,
            name: l.name || "Label"
        })
    }

    let yA = Qe(vA), $x = Object.assign(yA, {});

    function Dx(e = 0) {
        let [t, n] = y.useState(e), r = Ua(), o = y.useCallback(d => {
            r.current && n(p => p | d)
        }, [t, r]), i = y.useCallback(d => !!(t & d), [t]), l = y.useCallback(d => {
            r.current && n(p => p & ~d)
        }, [n, r]), c = y.useCallback(d => {
            r.current && n(p => p ^ d)
        }, [n]);
        return {flags: t, addFlag: o, hasFlag: i, removeFlag: l, toggleFlag: c}
    }

    var bA = (e => (e[e.RegisterOption = 0] = "RegisterOption", e[e.UnregisterOption = 1] = "UnregisterOption", e))(bA || {});
    let xA = {
        0(e, t) {
            let n = [...e.options, {id: t.id, element: t.element, propsRef: t.propsRef}];
            return {...e, options: hs(n, r => r.element.current)}
        }, 1(e, t) {
            let n = e.options.slice(), r = e.options.findIndex(o => o.id === t.id);
            return r === -1 ? e : (n.splice(r, 1), {...e, options: n})
        }
    }, Qh = y.createContext(null);
    Qh.displayName = "RadioGroupDataContext";

    function Ix(e) {
        let t = y.useContext(Qh);
        if (t === null) {
            let n = new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);
            throw Error.captureStackTrace && Error.captureStackTrace(n, Ix), n
        }
        return t
    }

    let em = y.createContext(null);
    em.displayName = "RadioGroupActionsContext";

    function Vx(e) {
        let t = y.useContext(em);
        if (t === null) {
            let n = new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);
            throw Error.captureStackTrace && Error.captureStackTrace(n, Vx), n
        }
        return t
    }

    function wA(e, t) {
        return qe(t.type, xA, e, t)
    }

    let SA = "div";

    function jA(e, t) {
        let n = Et(), {
                id: r = `headlessui-radiogroup-${n}`,
                value: o,
                defaultValue: i,
                form: l,
                name: c,
                onChange: d,
                by: p = (I, D) => I === D,
                disabled: g = !1,
                ...m
            } = e, v = ve(typeof p == "string" ? (I, D) => {
                let M = p;
                return (I == null ? void 0 : I[M]) === (D == null ? void 0 : D[M])
            } : p), [b, x] = y.useReducer(wA, {options: []}), w = b.options, [j, C] = Jh(), [_, E] = Ad(),
            k = y.useRef(null), T = rt(k, t), [O, A] = Ed(o, d, i),
            $ = y.useMemo(() => w.find(I => !I.propsRef.current.disabled), [w]),
            F = y.useMemo(() => w.some(I => v(I.propsRef.current.value, O)), [w, O]), N = ve(I => {
                var D;
                if (g || v(I, O)) return !1;
                let M = (D = w.find(W => v(W.propsRef.current.value, I))) == null ? void 0 : D.propsRef.current;
                return M != null && M.disabled ? !1 : (A == null || A(I), !0)
            });
        fx({
            container: k.current, accept(I) {
                return I.getAttribute("role") === "radio" ? NodeFilter.FILTER_REJECT : I.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT
            }, walk(I) {
                I.setAttribute("role", "none")
            }
        });
        let z = ve(I => {
                let D = k.current;
                if (!D) return;
                let M = qs(D), W = w.filter(ce => ce.propsRef.current.disabled === !1).map(ce => ce.element.current);
                switch (I.key) {
                    case $e.Enter:
                        mx(I.currentTarget);
                        break;
                    case $e.ArrowLeft:
                    case $e.ArrowUp:
                        if (I.preventDefault(), I.stopPropagation(), hn(W, Pt.Previous | Pt.WrapAround) === po.Success) {
                            let ce = w.find(ne => ne.element.current === (M == null ? void 0 : M.activeElement));
                            ce && N(ce.propsRef.current.value)
                        }
                        break;
                    case $e.ArrowRight:
                    case $e.ArrowDown:
                        if (I.preventDefault(), I.stopPropagation(), hn(W, Pt.Next | Pt.WrapAround) === po.Success) {
                            let ce = w.find(ne => ne.element.current === (M == null ? void 0 : M.activeElement));
                            ce && N(ce.propsRef.current.value)
                        }
                        break;
                    case $e.Space: {
                        I.preventDefault(), I.stopPropagation();
                        let ce = w.find(ne => ne.element.current === (M == null ? void 0 : M.activeElement));
                        ce && N(ce.propsRef.current.value)
                    }
                        break
                }
            }), V = ve(I => (x({type: 0, ...I}), () => x({type: 1, id: I.id}))), X = y.useMemo(() => ({
                value: O,
                firstOption: $,
                containsCheckedOption: F,
                disabled: g,
                compare: v, ...b
            }), [O, $, F, g, v, b]), Z = y.useMemo(() => ({registerOption: V, change: N}), [V, N]),
            R = {ref: T, id: r, role: "radiogroup", "aria-labelledby": j, "aria-describedby": _, onKeyDown: z},
            B = y.useMemo(() => ({value: O}), [O]), Q = y.useRef(null), H = Hr();
        return y.useEffect(() => {
            Q.current && i !== void 0 && H.addEventListener(Q.current, "reset", () => {
                N(i)
            })
        }, [Q, N]), ee.createElement(E, {name: "RadioGroup.Description"}, ee.createElement(C, {name: "RadioGroup.Label"}, ee.createElement(em.Provider, {value: Z}, ee.createElement(Qh.Provider, {value: X}, c != null && O != null && Md({[c]: O}).map(([I, D], M) => ee.createElement(Sr, {
            features: wr.Hidden,
            ref: M === 0 ? W => {
                var ce;
                Q.current = (ce = W == null ? void 0 : W.closest("form")) != null ? ce : null
            } : void 0, ...za({
                key: I,
                as: "input",
                type: "radio",
                checked: D != null,
                hidden: !0,
                readOnly: !0,
                form: l,
                disabled: g,
                name: I,
                value: D
            })
        })), Je({ourProps: R, theirProps: m, slot: B, defaultTag: SA, name: "RadioGroup"})))))
    }

    var CA = (e => (e[e.Empty = 1] = "Empty", e[e.Active = 2] = "Active", e))(CA || {});
    let EA = "div";

    function PA(e, t) {
        var n;
        let r = Et(), {id: o = `headlessui-radiogroup-option-${r}`, value: i, disabled: l = !1, ...c} = e,
            d = y.useRef(null), p = rt(d, t), [g, m] = Jh(), [v, b] = Ad(), {
                addFlag: x,
                removeFlag: w,
                hasFlag: j
            } = Dx(1), C = gn({value: i, disabled: l}), _ = Ix("RadioGroup.Option"), E = Vx("RadioGroup.Option");
        lt(() => E.registerOption({id: o, element: d, propsRef: C}), [o, E, d, C]);
        let k = ve(V => {
                var X;
                if (vs(V.currentTarget)) return V.preventDefault();
                E.change(i) && (x(2), (X = d.current) == null || X.focus())
            }), T = ve(V => {
                if (vs(V.currentTarget)) return V.preventDefault();
                x(2)
            }), O = ve(() => w(2)), A = ((n = _.firstOption) == null ? void 0 : n.id) === o, $ = _.disabled || l,
            F = _.compare(_.value, i), N = {
                ref: p,
                id: o,
                role: "radio",
                "aria-checked": F ? "true" : "false",
                "aria-labelledby": g,
                "aria-describedby": v,
                "aria-disabled": $ ? !0 : void 0,
                tabIndex: (() => $ ? -1 : F || !_.containsCheckedOption && A ? 0 : -1)(),
                onClick: $ ? void 0 : k,
                onFocus: $ ? void 0 : T,
                onBlur: $ ? void 0 : O
            }, z = y.useMemo(() => ({checked: F, disabled: $, active: j(2)}), [F, $, j]);
        return ee.createElement(b, {name: "RadioGroup.Description"}, ee.createElement(m, {name: "RadioGroup.Label"}, Je({
            ourProps: N,
            theirProps: c,
            slot: z,
            defaultTag: EA,
            name: "RadioGroup.Option"
        })))
    }

    let _A = Qe(jA), kA = Qe(PA), Hx = Object.assign(_A, {Option: kA, Label: $x, Description: Ih}),
        tm = y.createContext(null);
    tm.displayName = "GroupContext";
    let TA = y.Fragment;

    function OA(e) {
        var t;
        let [n, r] = y.useState(null), [o, i] = Jh(), [l, c] = Ad(),
            d = y.useMemo(() => ({switch: n, setSwitch: r, labelledby: o, describedby: l}), [n, r, o, l]), p = {},
            g = e;
        return ee.createElement(c, {name: "Switch.Description"}, ee.createElement(i, {
            name: "Switch.Label",
            props: {
                htmlFor: (t = d.switch) == null ? void 0 : t.id, onClick(m) {
                    n && (m.currentTarget.tagName === "LABEL" && m.preventDefault(), n.click(), n.focus({preventScroll: !0}))
                }
            }
        }, ee.createElement(tm.Provider, {value: d}, Je({
            ourProps: p,
            theirProps: g,
            defaultTag: TA,
            name: "Switch.Group"
        }))))
    }

    let LA = "button";

    function MA(e, t) {
        var n;
        let r = Et(), {
                id: o = `headlessui-switch-${r}`,
                checked: i,
                defaultChecked: l = !1,
                onChange: c,
                disabled: d = !1,
                name: p,
                value: g,
                form: m,
                ...v
            } = e, b = y.useContext(tm), x = y.useRef(null),
            w = rt(x, t, b === null ? null : b.setSwitch), [j, C] = Ed(i, c, l),
            _ = ve(() => C == null ? void 0 : C(!j)), E = ve(F => {
                if (vs(F.currentTarget)) return F.preventDefault();
                F.preventDefault(), _()
            }), k = ve(F => {
                F.key === $e.Space ? (F.preventDefault(), _()) : F.key === $e.Enter && mx(F.currentTarget)
            }), T = ve(F => F.preventDefault()), O = y.useMemo(() => ({checked: j}), [j]), A = {
                id: o,
                ref: w,
                role: "switch",
                type: Fa(e, x),
                tabIndex: e.tabIndex === -1 ? 0 : (n = e.tabIndex) != null ? n : 0,
                "aria-checked": j,
                "aria-labelledby": b == null ? void 0 : b.labelledby,
                "aria-describedby": b == null ? void 0 : b.describedby,
                disabled: d,
                onClick: E,
                onKeyUp: k,
                onKeyPress: T
            }, $ = Hr();
        return y.useEffect(() => {
            var F;
            let N = (F = x.current) == null ? void 0 : F.closest("form");
            N && l !== void 0 && $.addEventListener(N, "reset", () => {
                C(l)
            })
        }, [x, C]), ee.createElement(ee.Fragment, null, p != null && j && ee.createElement(Sr, {
            features: wr.Hidden, ...za({
                as: "input",
                type: "checkbox",
                hidden: !0,
                readOnly: !0,
                disabled: d,
                form: m,
                checked: j,
                name: p,
                value: g
            })
        }), Je({ourProps: A, theirProps: v, slot: O, defaultTag: LA, name: "Switch"}))
    }

    let AA = Qe(MA), RA = OA, nm = Object.assign(AA, {Group: RA, Label: $x, Description: Ih});

    function NA({onFocus: e}) {
        let [t, n] = y.useState(!0), r = Ua();
        return t ? ee.createElement(Sr, {
            as: "button", type: "button", features: wr.Focusable, onFocus: o => {
                o.preventDefault();
                let i, l = 50;

                function c() {
                    if (l-- <= 0) {
                        i && cancelAnimationFrame(i);
                        return
                    }
                    if (e()) {
                        if (cancelAnimationFrame(i), !r.current) return;
                        n(!1);
                        return
                    }
                    i = requestAnimationFrame(c)
                }

                i = requestAnimationFrame(c)
            }
        }) : null
    }

    const Fx = y.createContext(null);

    function $A() {
        return {
            groups: new Map, get(e, t) {
                var n;
                let r = this.groups.get(e);
                r || (r = new Map, this.groups.set(e, r));
                let o = (n = r.get(t)) != null ? n : 0;
                r.set(t, o + 1);
                let i = Array.from(r.keys()).indexOf(t);

                function l() {
                    let c = r.get(t);
                    c > 1 ? r.set(t, c - 1) : r.delete(t)
                }

                return [i, l]
            }
        }
    }

    function DA({children: e}) {
        let t = y.useRef($A());
        return y.createElement(Fx.Provider, {value: t}, e)
    }

    function zx(e) {
        let t = y.useContext(Fx);
        if (!t) throw new Error("You must wrap your component in a <StableCollection>");
        let n = IA(), [r, o] = t.current.get(e, n);
        return y.useEffect(() => o, []), r
    }

    function IA() {
        var e, t, n;
        let r = (n = (t = (e = y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) == null ? void 0 : e.ReactCurrentOwner) == null ? void 0 : t.current) != null ? n : null;
        if (!r) return Symbol();
        let o = [], i = r;
        for (; i;) o.push(i.index), i = i.return;
        return "$." + o.join(".")
    }

    var VA = (e => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(VA || {}),
        HA = (e => (e[e.Less = -1] = "Less", e[e.Equal = 0] = "Equal", e[e.Greater = 1] = "Greater", e))(HA || {}),
        FA = (e => (e[e.SetSelectedIndex = 0] = "SetSelectedIndex", e[e.RegisterTab = 1] = "RegisterTab", e[e.UnregisterTab = 2] = "UnregisterTab", e[e.RegisterPanel = 3] = "RegisterPanel", e[e.UnregisterPanel = 4] = "UnregisterPanel", e))(FA || {});
    let zA = {
        0(e, t) {
            var n;
            let r = hs(e.tabs, g => g.current), o = hs(e.panels, g => g.current), i = r.filter(g => {
                var m;
                return !((m = g.current) != null && m.hasAttribute("disabled"))
            }), l = {...e, tabs: r, panels: o};
            if (t.index < 0 || t.index > r.length - 1) {
                let g = qe(Math.sign(t.index - e.selectedIndex), {
                    [-1]: () => 1,
                    0: () => qe(Math.sign(t.index), {[-1]: () => 0, 0: () => 0, 1: () => 1}),
                    1: () => 0
                });
                if (i.length === 0) return l;
                let m = qe(g, {0: () => r.indexOf(i[0]), 1: () => r.indexOf(i[i.length - 1])});
                return {...l, selectedIndex: m === -1 ? e.selectedIndex : m}
            }
            let c = r.slice(0, t.index), d = [...r.slice(t.index), ...c].find(g => i.includes(g));
            if (!d) return l;
            let p = (n = r.indexOf(d)) != null ? n : e.selectedIndex;
            return p === -1 && (p = e.selectedIndex), {...l, selectedIndex: p}
        }, 1(e, t) {
            if (e.tabs.includes(t.tab)) return e;
            let n = e.tabs[e.selectedIndex], r = hs([...e.tabs, t.tab], i => i.current), o = e.selectedIndex;
            return e.info.current.isControlled || (o = r.indexOf(n), o === -1 && (o = e.selectedIndex)), {
                ...e,
                tabs: r,
                selectedIndex: o
            }
        }, 2(e, t) {
            return {...e, tabs: e.tabs.filter(n => n !== t.tab)}
        }, 3(e, t) {
            return e.panels.includes(t.panel) ? e : {...e, panels: hs([...e.panels, t.panel], n => n.current)}
        }, 4(e, t) {
            return {...e, panels: e.panels.filter(n => n !== t.panel)}
        }
    }, rm = y.createContext(null);
    rm.displayName = "TabsDataContext";

    function Wa(e) {
        let t = y.useContext(rm);
        if (t === null) {
            let n = new Error(`<${e} /> is missing a parent <Tab.Group /> component.`);
            throw Error.captureStackTrace && Error.captureStackTrace(n, Wa), n
        }
        return t
    }

    let om = y.createContext(null);
    om.displayName = "TabsActionsContext";

    function sm(e) {
        let t = y.useContext(om);
        if (t === null) {
            let n = new Error(`<${e} /> is missing a parent <Tab.Group /> component.`);
            throw Error.captureStackTrace && Error.captureStackTrace(n, sm), n
        }
        return t
    }

    function BA(e, t) {
        return qe(t.type, zA, e, t)
    }

    let UA = y.Fragment;

    function WA(e, t) {
        let {defaultIndex: n = 0, vertical: r = !1, manual: o = !1, onChange: i, selectedIndex: l = null, ...c} = e;
        const d = r ? "vertical" : "horizontal", p = o ? "manual" : "auto";
        let g = l !== null, m = gn({isControlled: g}), v = rt(t), [b, x] = y.useReducer(BA, {
                info: m,
                selectedIndex: l ?? n,
                tabs: [],
                panels: []
            }), w = y.useMemo(() => ({selectedIndex: b.selectedIndex}), [b.selectedIndex]), j = gn(i || (() => {
            })), C = gn(b.tabs), _ = y.useMemo(() => ({orientation: d, activation: p, ...b}), [d, p, b]),
            E = ve(F => (x({type: 1, tab: F}), () => x({type: 2, tab: F}))),
            k = ve(F => (x({type: 3, panel: F}), () => x({type: 4, panel: F}))), T = ve(F => {
                O.current !== F && j.current(F), g || x({type: 0, index: F})
            }), O = gn(g ? e.selectedIndex : b.selectedIndex),
            A = y.useMemo(() => ({registerTab: E, registerPanel: k, change: T}), []);
        lt(() => {
            x({type: 0, index: l ?? n})
        }, [l]), lt(() => {
            if (O.current === void 0 || b.tabs.length <= 0) return;
            let F = hs(b.tabs, N => N.current);
            F.some((N, z) => b.tabs[z] !== N) && T(F.indexOf(b.tabs[O.current]))
        });
        let $ = {ref: v};
        return ee.createElement(DA, null, ee.createElement(om.Provider, {value: A}, ee.createElement(rm.Provider, {value: _}, _.tabs.length <= 0 && ee.createElement(NA, {
            onFocus: () => {
                var F, N;
                for (let z of C.current) if (((F = z.current) == null ? void 0 : F.tabIndex) === 0) return (N = z.current) == null || N.focus(), !0;
                return !1
            }
        }), Je({ourProps: $, theirProps: c, slot: w, defaultTag: UA, name: "Tabs"}))))
    }

    let GA = "div";

    function KA(e, t) {
        let {orientation: n, selectedIndex: r} = Wa("Tab.List"), o = rt(t);
        return Je({
            ourProps: {ref: o, role: "tablist", "aria-orientation": n},
            theirProps: e,
            slot: {selectedIndex: r},
            defaultTag: GA,
            name: "Tabs.List"
        })
    }

    let qA = "button";

    function YA(e, t) {
        var n, r;
        let o = Et(), {id: i = `headlessui-tabs-tab-${o}`, ...l} = e, {
            orientation: c,
            activation: d,
            selectedIndex: p,
            tabs: g,
            panels: m
        } = Wa("Tab"), v = sm("Tab"), b = Wa("Tab"), x = y.useRef(null), w = rt(x, t);
        lt(() => v.registerTab(x), [v, x]);
        let j = zx("tabs"), C = g.indexOf(x);
        C === -1 && (C = j);
        let _ = C === p, E = ve(N => {
            var z;
            let V = N();
            if (V === po.Success && d === "auto") {
                let X = (z = qs(x)) == null ? void 0 : z.activeElement, Z = b.tabs.findIndex(R => R.current === X);
                Z !== -1 && v.change(Z)
            }
            return V
        }), k = ve(N => {
            let z = g.map(V => V.current).filter(Boolean);
            if (N.key === $e.Space || N.key === $e.Enter) {
                N.preventDefault(), N.stopPropagation(), v.change(C);
                return
            }
            switch (N.key) {
                case $e.Home:
                case $e.PageUp:
                    return N.preventDefault(), N.stopPropagation(), E(() => hn(z, Pt.First));
                case $e.End:
                case $e.PageDown:
                    return N.preventDefault(), N.stopPropagation(), E(() => hn(z, Pt.Last))
            }
            if (E(() => qe(c, {
                vertical() {
                    return N.key === $e.ArrowUp ? hn(z, Pt.Previous | Pt.WrapAround) : N.key === $e.ArrowDown ? hn(z, Pt.Next | Pt.WrapAround) : po.Error
                }, horizontal() {
                    return N.key === $e.ArrowLeft ? hn(z, Pt.Previous | Pt.WrapAround) : N.key === $e.ArrowRight ? hn(z, Pt.Next | Pt.WrapAround) : po.Error
                }
            })) === po.Success) return N.preventDefault()
        }), T = y.useRef(!1), O = ve(() => {
            var N;
            T.current || (T.current = !0, (N = x.current) == null || N.focus({preventScroll: !0}), v.change(C), uc(() => {
                T.current = !1
            }))
        }), A = ve(N => {
            N.preventDefault()
        }), $ = y.useMemo(() => {
            var N;
            return {selected: _, disabled: (N = e.disabled) != null ? N : !1}
        }, [_, e.disabled]), F = {
            ref: w,
            onKeyDown: k,
            onMouseDown: A,
            onClick: O,
            id: i,
            role: "tab",
            type: Fa(e, x),
            "aria-controls": (r = (n = m[C]) == null ? void 0 : n.current) == null ? void 0 : r.id,
            "aria-selected": _,
            tabIndex: _ ? 0 : -1
        };
        return Je({ourProps: F, theirProps: l, slot: $, defaultTag: qA, name: "Tabs.Tab"})
    }

    let XA = "div";

    function ZA(e, t) {
        let {selectedIndex: n} = Wa("Tab.Panels"), r = rt(t), o = y.useMemo(() => ({selectedIndex: n}), [n]);
        return Je({ourProps: {ref: r}, theirProps: e, slot: o, defaultTag: XA, name: "Tabs.Panels"})
    }

    let JA = "div", QA = Rn.RenderStrategy | Rn.Static;

    function eR(e, t) {
        var n, r, o, i;
        let l = Et(), {id: c = `headlessui-tabs-panel-${l}`, tabIndex: d = 0, ...p} = e, {
            selectedIndex: g,
            tabs: m,
            panels: v
        } = Wa("Tab.Panel"), b = sm("Tab.Panel"), x = y.useRef(null), w = rt(x, t);
        lt(() => b.registerPanel(x), [b, x, c]);
        let j = zx("panels"), C = v.indexOf(x);
        C === -1 && (C = j);
        let _ = C === g, E = y.useMemo(() => ({selected: _}), [_]), k = {
            ref: w,
            id: c,
            role: "tabpanel",
            "aria-labelledby": (r = (n = m[C]) == null ? void 0 : n.current) == null ? void 0 : r.id,
            tabIndex: _ ? d : -1
        };
        return !_ && ((o = p.unmount) == null || o) && !((i = p.static) != null && i) ? ee.createElement(Sr, {
            as: "span",
            "aria-hidden": "true", ...k
        }) : Je({ourProps: k, theirProps: p, slot: E, defaultTag: JA, features: QA, visible: _, name: "Tabs.Panel"})
    }

    let tR = Qe(YA), nR = Qe(WA), rR = Qe(KA), oR = Qe(ZA), sR = Qe(eR),
        wc = Object.assign(tR, {Group: nR, List: rR, Panels: oR, Panel: sR});

    function iR(e) {
        let t = {called: !1};
        return (...n) => {
            if (!t.called) return t.called = !0, e(...n)
        }
    }

    function im(e, ...t) {
        e && t.length > 0 && e.classList.add(...t)
    }

    function am(e, ...t) {
        e && t.length > 0 && e.classList.remove(...t)
    }

    function aR(e, t) {
        let n = Vr();
        if (!e) return n.dispose;
        let {transitionDuration: r, transitionDelay: o} = getComputedStyle(e), [i, l] = [r, o].map(d => {
            let [p = 0] = d.split(",").filter(Boolean).map(g => g.includes("ms") ? parseFloat(g) : parseFloat(g) * 1e3).sort((g, m) => m - g);
            return p
        }), c = i + l;
        if (c !== 0) {
            n.group(p => {
                p.setTimeout(() => {
                    t(), p.dispose()
                }, c), p.addEventListener(e, "transitionrun", g => {
                    g.target === g.currentTarget && p.dispose()
                })
            });
            let d = n.addEventListener(e, "transitionend", p => {
                p.target === p.currentTarget && (t(), d())
            })
        } else t();
        return n.add(() => t()), n.dispose
    }

    function lR(e, t, n, r) {
        let o = n ? "enter" : "leave", i = Vr(), l = r !== void 0 ? iR(r) : () => {
        };
        o === "enter" && (e.removeAttribute("hidden"), e.style.display = "");
        let c = qe(o, {enter: () => t.enter, leave: () => t.leave}),
            d = qe(o, {enter: () => t.enterTo, leave: () => t.leaveTo}),
            p = qe(o, {enter: () => t.enterFrom, leave: () => t.leaveFrom});
        return am(e, ...t.base, ...t.enter, ...t.enterTo, ...t.enterFrom, ...t.leave, ...t.leaveFrom, ...t.leaveTo, ...t.entered), im(e, ...t.base, ...c, ...p), i.nextFrame(() => {
            am(e, ...t.base, ...c, ...p), im(e, ...t.base, ...c, ...d), aR(e, () => (am(e, ...t.base, ...c), im(e, ...t.base, ...t.entered), l()))
        }), i.dispose
    }

    function cR({immediate: e, container: t, direction: n, classes: r, onStart: o, onStop: i}) {
        let l = Ua(), c = Hr(), d = gn(n);
        lt(() => {
            e && (d.current = "enter")
        }, [e]), lt(() => {
            let p = Vr();
            c.add(p.dispose);
            let g = t.current;
            if (g && d.current !== "idle" && l.current) return p.dispose(), o.current(d.current), p.add(lR(g, r.current, d.current === "enter", () => {
                p.dispose(), i.current(d.current)
            })), p.dispose
        }, [n])
    }

    function Zs(e = "") {
        return e.split(/\s+/).filter(t => t.length > 1)
    }

    let Dd = y.createContext(null);
    Dd.displayName = "TransitionContext";
    var uR = (e => (e.Visible = "visible", e.Hidden = "hidden", e))(uR || {});

    function dR() {
        let e = y.useContext(Dd);
        if (e === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
        return e
    }

    function fR() {
        let e = y.useContext(Id);
        if (e === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
        return e
    }

    let Id = y.createContext(null);
    Id.displayName = "NestingContext";

    function Vd(e) {
        return "children" in e ? Vd(e.children) : e.current.filter(({el: t}) => t.current !== null).filter(({state: t}) => t === "visible").length > 0
    }

    function Bx(e, t) {
        let n = gn(e), r = y.useRef([]), o = Ua(), i = Hr(), l = ve((b, x = Ys.Hidden) => {
                let w = r.current.findIndex(({el: j}) => j === b);
                w !== -1 && (qe(x, {
                    [Ys.Unmount]() {
                        r.current.splice(w, 1)
                    }, [Ys.Hidden]() {
                        r.current[w].state = "hidden"
                    }
                }), i.microTask(() => {
                    var j;
                    !Vd(r) && o.current && ((j = n.current) == null || j.call(n))
                }))
            }), c = ve(b => {
                let x = r.current.find(({el: w}) => w === b);
                return x ? x.state !== "visible" && (x.state = "visible") : r.current.push({
                    el: b,
                    state: "visible"
                }), () => l(b, Ys.Unmount)
            }), d = y.useRef([]), p = y.useRef(Promise.resolve()), g = y.useRef({enter: [], leave: [], idle: []}),
            m = ve((b, x, w) => {
                d.current.splice(0), t && (t.chains.current[x] = t.chains.current[x].filter(([j]) => j !== b)), t == null || t.chains.current[x].push([b, new Promise(j => {
                    d.current.push(j)
                })]), t == null || t.chains.current[x].push([b, new Promise(j => {
                    Promise.all(g.current[x].map(([C, _]) => _)).then(() => j())
                })]), x === "enter" ? p.current = p.current.then(() => t == null ? void 0 : t.wait.current).then(() => w(x)) : w(x)
            }), v = ve((b, x, w) => {
                Promise.all(g.current[x].splice(0).map(([j, C]) => C)).then(() => {
                    var j;
                    (j = d.current.shift()) == null || j()
                }).then(() => w(x))
            });
        return y.useMemo(() => ({
            children: r,
            register: c,
            unregister: l,
            onStart: m,
            onStop: v,
            wait: p,
            chains: g
        }), [c, l, r, m, v, g, p])
    }

    function pR() {
    }

    let gR = ["beforeEnter", "afterEnter", "beforeLeave", "afterLeave"];

    function Ux(e) {
        var t;
        let n = {};
        for (let r of gR) n[r] = (t = e[r]) != null ? t : pR;
        return n
    }

    function hR(e) {
        let t = y.useRef(Ux(e));
        return y.useEffect(() => {
            t.current = Ux(e)
        }, [e]), t
    }

    let mR = "div", Wx = Rn.RenderStrategy;

    function vR(e, t) {
        var n, r;
        let {
            beforeEnter: o,
            afterEnter: i,
            beforeLeave: l,
            afterLeave: c,
            enter: d,
            enterFrom: p,
            enterTo: g,
            entered: m,
            leave: v,
            leaveFrom: b,
            leaveTo: x,
            ...w
        } = e, j = y.useRef(null), C = rt(j, t), _ = (n = w.unmount) == null || n ? Ys.Unmount : Ys.Hidden, {
            show: E,
            appear: k,
            initial: T
        } = dR(), [O, A] = y.useState(E ? "visible" : "hidden"), $ = fR(), {register: F, unregister: N} = $;
        y.useEffect(() => F(j), [F, j]), y.useEffect(() => {
            if (_ === Ys.Hidden && j.current) {
                if (E && O !== "visible") {
                    A("visible");
                    return
                }
                return qe(O, {hidden: () => N(j), visible: () => F(j)})
            }
        }, [O, j, F, N, E, _]);
        let z = gn({
            base: Zs(w.className),
            enter: Zs(d),
            enterFrom: Zs(p),
            enterTo: Zs(g),
            entered: Zs(m),
            leave: Zs(v),
            leaveFrom: Zs(b),
            leaveTo: Zs(x)
        }), V = hR({beforeEnter: o, afterEnter: i, beforeLeave: l, afterLeave: c}), X = Ha();
        y.useEffect(() => {
            if (X && O === "visible" && j.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")
        }, [j, O, X]);
        let Z = T && !k, R = k && E && T, B = (() => !X || Z ? "idle" : E ? "enter" : "leave")(), Q = Dx(0),
            H = ve(ne => qe(ne, {
                enter: () => {
                    Q.addFlag(xt.Opening), V.current.beforeEnter()
                }, leave: () => {
                    Q.addFlag(xt.Closing), V.current.beforeLeave()
                }, idle: () => {
                }
            })), I = ve(ne => qe(ne, {
                enter: () => {
                    Q.removeFlag(xt.Opening), V.current.afterEnter()
                }, leave: () => {
                    Q.removeFlag(xt.Closing), V.current.afterLeave()
                }, idle: () => {
                }
            })), D = Bx(() => {
                A("hidden"), N(j)
            }, $), M = y.useRef(!1);
        cR({
            immediate: R, container: j, classes: z, direction: B, onStart: gn(ne => {
                M.current = !0, D.onStart(j, ne, H)
            }), onStop: gn(ne => {
                M.current = !1, D.onStop(j, ne, I), ne === "leave" && !Vd(D) && (A("hidden"), N(j))
            })
        });
        let W = w, ce = {ref: C};
        return R ? W = {
            ...W,
            className: Od(w.className, ...z.current.enter, ...z.current.enterFrom)
        } : M.current && (W.className = Od(w.className, (r = j.current) == null ? void 0 : r.className), W.className === "" && delete W.className), ee.createElement(Id.Provider, {value: D}, ee.createElement(fc, {
            value: qe(O, {
                visible: xt.Open,
                hidden: xt.Closed
            }) | Q.flags
        }, Je({
            ourProps: ce,
            theirProps: W,
            defaultTag: mR,
            features: Wx,
            visible: O === "visible",
            name: "Transition.Child"
        })))
    }

    function yR(e, t) {
        let {show: n, appear: r = !1, unmount: o = !0, ...i} = e, l = y.useRef(null), c = rt(l, t);
        Ha();
        let d = Xs();
        if (n === void 0 && d !== null && (n = (d & xt.Open) === xt.Open), ![!0, !1].includes(n)) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
        let [p, g] = y.useState(n ? "visible" : "hidden"), m = Bx(() => {
            g("hidden")
        }), [v, b] = y.useState(!0), x = y.useRef([n]);
        lt(() => {
            v !== !1 && x.current[x.current.length - 1] !== n && (x.current.push(n), b(!1))
        }, [x, n]);
        let w = y.useMemo(() => ({show: n, appear: r, initial: v}), [n, r, v]);
        y.useEffect(() => {
            if (n) g("visible"); else if (!Vd(m)) g("hidden"); else {
                let E = l.current;
                if (!E) return;
                let k = E.getBoundingClientRect();
                k.x === 0 && k.y === 0 && k.width === 0 && k.height === 0 && g("hidden")
            }
        }, [n, m]);
        let j = {unmount: o}, C = ve(() => {
            var E;
            v && b(!1), (E = e.beforeEnter) == null || E.call(e)
        }), _ = ve(() => {
            var E;
            v && b(!1), (E = e.beforeLeave) == null || E.call(e)
        });
        return ee.createElement(Id.Provider, {value: m}, ee.createElement(Dd.Provider, {value: w}, Je({
            ourProps: {
                ...j,
                as: y.Fragment,
                children: ee.createElement(Gx, {ref: c, ...j, ...i, beforeEnter: C, beforeLeave: _})
            }, theirProps: {}, defaultTag: y.Fragment, features: Wx, visible: p === "visible", name: "Transition"
        })))
    }

    function bR(e, t) {
        let n = y.useContext(Dd) !== null, r = Xs() !== null;
        return ee.createElement(ee.Fragment, null, !n && r ? ee.createElement(lm, {ref: t, ...e}) : ee.createElement(Gx, {ref: t, ...e}))
    }

    let lm = Qe(yR), Gx = Qe(vR), xR = Qe(bR), zo = Object.assign(lm, {Child: xR, Root: lm});
    var Kx = function (t) {
            return t.reduce(function (n, r) {
                var o = r[0], i = r[1];
                return n[o] = i, n
            }, {})
        }, qx = typeof window < "u" && window.document && window.document.createElement ? y.useLayoutEffect : y.useEffect,
        Qn = "top", Fr = "bottom", zr = "right", er = "left", cm = "auto", Sc = [Qn, Fr, zr, er], Ga = "start",
        jc = "end", wR = "clippingParents", Yx = "viewport", Cc = "popper", SR = "reference",
        Xx = Sc.reduce(function (e, t) {
            return e.concat([t + "-" + Ga, t + "-" + jc])
        }, []), Zx = [].concat(Sc, [cm]).reduce(function (e, t) {
            return e.concat([t, t + "-" + Ga, t + "-" + jc])
        }, []), jR = "beforeRead", CR = "read", ER = "afterRead", PR = "beforeMain", _R = "main", kR = "afterMain",
        TR = "beforeWrite", OR = "write", LR = "afterWrite", MR = [jR, CR, ER, PR, _R, kR, TR, OR, LR];

    function Bo(e) {
        return e ? (e.nodeName || "").toLowerCase() : null
    }

    function Cr(e) {
        if (e == null) return window;
        if (e.toString() !== "[object Window]") {
            var t = e.ownerDocument;
            return t && t.defaultView || window
        }
        return e
    }

    function Ki(e) {
        var t = Cr(e).Element;
        return e instanceof t || e instanceof Element
    }

    function Br(e) {
        var t = Cr(e).HTMLElement;
        return e instanceof t || e instanceof HTMLElement
    }

    function um(e) {
        if (typeof ShadowRoot > "u") return !1;
        var t = Cr(e).ShadowRoot;
        return e instanceof t || e instanceof ShadowRoot
    }

    function AR(e) {
        var t = e.state;
        Object.keys(t.elements).forEach(function (n) {
            var r = t.styles[n] || {}, o = t.attributes[n] || {}, i = t.elements[n];
            !Br(i) || !Bo(i) || (Object.assign(i.style, r), Object.keys(o).forEach(function (l) {
                var c = o[l];
                c === !1 ? i.removeAttribute(l) : i.setAttribute(l, c === !0 ? "" : c)
            }))
        })
    }

    function RR(e) {
        var t = e.state, n = {
            popper: {position: t.options.strategy, left: "0", top: "0", margin: "0"},
            arrow: {position: "absolute"},
            reference: {}
        };
        return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function () {
            Object.keys(t.elements).forEach(function (r) {
                var o = t.elements[r], i = t.attributes[r] || {},
                    l = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), c = l.reduce(function (d, p) {
                        return d[p] = "", d
                    }, {});
                !Br(o) || !Bo(o) || (Object.assign(o.style, c), Object.keys(i).forEach(function (d) {
                    o.removeAttribute(d)
                }))
            })
        }
    }

    const NR = {name: "applyStyles", enabled: !0, phase: "write", fn: AR, effect: RR, requires: ["computeStyles"]};

    function Uo(e) {
        return e.split("-")[0]
    }

    var qi = Math.max, Hd = Math.min, Ka = Math.round;

    function dm() {
        var e = navigator.userAgentData;
        return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function (t) {
            return t.brand + "/" + t.version
        }).join(" ") : navigator.userAgent
    }

    function Jx() {
        return !/^((?!chrome|android).)*safari/i.test(dm())
    }

    function qa(e, t, n) {
        t === void 0 && (t = !1), n === void 0 && (n = !1);
        var r = e.getBoundingClientRect(), o = 1, i = 1;
        t && Br(e) && (o = e.offsetWidth > 0 && Ka(r.width) / e.offsetWidth || 1, i = e.offsetHeight > 0 && Ka(r.height) / e.offsetHeight || 1);
        var l = Ki(e) ? Cr(e) : window, c = l.visualViewport, d = !Jx() && n,
            p = (r.left + (d && c ? c.offsetLeft : 0)) / o, g = (r.top + (d && c ? c.offsetTop : 0)) / i,
            m = r.width / o, v = r.height / i;
        return {width: m, height: v, top: g, right: p + m, bottom: g + v, left: p, x: p, y: g}
    }

    function fm(e) {
        var t = qa(e), n = e.offsetWidth, r = e.offsetHeight;
        return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), {
            x: e.offsetLeft,
            y: e.offsetTop,
            width: n,
            height: r
        }
    }

    function Qx(e, t) {
        var n = t.getRootNode && t.getRootNode();
        if (e.contains(t)) return !0;
        if (n && um(n)) {
            var r = t;
            do {
                if (r && e.isSameNode(r)) return !0;
                r = r.parentNode || r.host
            } while (r)
        }
        return !1
    }

    function ys(e) {
        return Cr(e).getComputedStyle(e)
    }

    function $R(e) {
        return ["table", "td", "th"].indexOf(Bo(e)) >= 0
    }

    function Js(e) {
        return ((Ki(e) ? e.ownerDocument : e.document) || window.document).documentElement
    }

    function Fd(e) {
        return Bo(e) === "html" ? e : e.assignedSlot || e.parentNode || (um(e) ? e.host : null) || Js(e)
    }

    function ew(e) {
        return !Br(e) || ys(e).position === "fixed" ? null : e.offsetParent
    }

    function DR(e) {
        var t = /firefox/i.test(dm()), n = /Trident/i.test(dm());
        if (n && Br(e)) {
            var r = ys(e);
            if (r.position === "fixed") return null
        }
        var o = Fd(e);
        for (um(o) && (o = o.host); Br(o) && ["html", "body"].indexOf(Bo(o)) < 0;) {
            var i = ys(o);
            if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || t && i.willChange === "filter" || t && i.filter && i.filter !== "none") return o;
            o = o.parentNode
        }
        return null
    }

    function Ec(e) {
        for (var t = Cr(e), n = ew(e); n && $R(n) && ys(n).position === "static";) n = ew(n);
        return n && (Bo(n) === "html" || Bo(n) === "body" && ys(n).position === "static") ? t : n || DR(e) || t
    }

    function pm(e) {
        return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"
    }

    function Pc(e, t, n) {
        return qi(e, Hd(t, n))
    }

    function IR(e, t, n) {
        var r = Pc(e, t, n);
        return r > n ? n : r
    }

    function tw() {
        return {top: 0, right: 0, bottom: 0, left: 0}
    }

    function nw(e) {
        return Object.assign({}, tw(), e)
    }

    function rw(e, t) {
        return t.reduce(function (n, r) {
            return n[r] = e, n
        }, {})
    }

    var VR = function (t, n) {
        return t = typeof t == "function" ? t(Object.assign({}, n.rects, {placement: n.placement})) : t, nw(typeof t != "number" ? t : rw(t, Sc))
    };

    function HR(e) {
        var t, n = e.state, r = e.name, o = e.options, i = n.elements.arrow, l = n.modifiersData.popperOffsets,
            c = Uo(n.placement), d = pm(c), p = [er, zr].indexOf(c) >= 0, g = p ? "height" : "width";
        if (!(!i || !l)) {
            var m = VR(o.padding, n), v = fm(i), b = d === "y" ? Qn : er, x = d === "y" ? Fr : zr,
                w = n.rects.reference[g] + n.rects.reference[d] - l[d] - n.rects.popper[g],
                j = l[d] - n.rects.reference[d], C = Ec(i),
                _ = C ? d === "y" ? C.clientHeight || 0 : C.clientWidth || 0 : 0, E = w / 2 - j / 2, k = m[b],
                T = _ - v[g] - m[x], O = _ / 2 - v[g] / 2 + E, A = Pc(k, O, T), $ = d;
            n.modifiersData[r] = (t = {}, t[$] = A, t.centerOffset = A - O, t)
        }
    }

    function FR(e) {
        var t = e.state, n = e.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r;
        o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || Qx(t.elements.popper, o) && (t.elements.arrow = o))
    }

    const zR = {
        name: "arrow",
        enabled: !0,
        phase: "main",
        fn: HR,
        effect: FR,
        requires: ["popperOffsets"],
        requiresIfExists: ["preventOverflow"]
    };

    function Ya(e) {
        return e.split("-")[1]
    }

    var BR = {top: "auto", right: "auto", bottom: "auto", left: "auto"};

    function UR(e, t) {
        var n = e.x, r = e.y, o = t.devicePixelRatio || 1;
        return {x: Ka(n * o) / o || 0, y: Ka(r * o) / o || 0}
    }

    function ow(e) {
        var t, n = e.popper, r = e.popperRect, o = e.placement, i = e.variation, l = e.offsets, c = e.position,
            d = e.gpuAcceleration, p = e.adaptive, g = e.roundOffsets, m = e.isFixed, v = l.x, b = v === void 0 ? 0 : v,
            x = l.y, w = x === void 0 ? 0 : x, j = typeof g == "function" ? g({x: b, y: w}) : {x: b, y: w};
        b = j.x, w = j.y;
        var C = l.hasOwnProperty("x"), _ = l.hasOwnProperty("y"), E = er, k = Qn, T = window;
        if (p) {
            var O = Ec(n), A = "clientHeight", $ = "clientWidth";
            if (O === Cr(n) && (O = Js(n), ys(O).position !== "static" && c === "absolute" && (A = "scrollHeight", $ = "scrollWidth")), O = O, o === Qn || (o === er || o === zr) && i === jc) {
                k = Fr;
                var F = m && O === T && T.visualViewport ? T.visualViewport.height : O[A];
                w -= F - r.height, w *= d ? 1 : -1
            }
            if (o === er || (o === Qn || o === Fr) && i === jc) {
                E = zr;
                var N = m && O === T && T.visualViewport ? T.visualViewport.width : O[$];
                b -= N - r.width, b *= d ? 1 : -1
            }
        }
        var z = Object.assign({position: c}, p && BR), V = g === !0 ? UR({x: b, y: w}, Cr(n)) : {x: b, y: w};
        if (b = V.x, w = V.y, d) {
            var X;
            return Object.assign({}, z, (X = {}, X[k] = _ ? "0" : "", X[E] = C ? "0" : "", X.transform = (T.devicePixelRatio || 1) <= 1 ? "translate(" + b + "px, " + w + "px)" : "translate3d(" + b + "px, " + w + "px, 0)", X))
        }
        return Object.assign({}, z, (t = {}, t[k] = _ ? w + "px" : "", t[E] = C ? b + "px" : "", t.transform = "", t))
    }

    function WR(e) {
        var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, i = n.adaptive,
            l = i === void 0 ? !0 : i, c = n.roundOffsets, d = c === void 0 ? !0 : c, p = {
                placement: Uo(t.placement),
                variation: Ya(t.placement),
                popper: t.elements.popper,
                popperRect: t.rects.popper,
                gpuAcceleration: o,
                isFixed: t.options.strategy === "fixed"
            };
        t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, ow(Object.assign({}, p, {
            offsets: t.modifiersData.popperOffsets,
            position: t.options.strategy,
            adaptive: l,
            roundOffsets: d
        })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, ow(Object.assign({}, p, {
            offsets: t.modifiersData.arrow,
            position: "absolute",
            adaptive: !1,
            roundOffsets: d
        })))), t.attributes.popper = Object.assign({}, t.attributes.popper, {"data-popper-placement": t.placement})
    }

    const GR = {name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: WR, data: {}};
    var zd = {passive: !0};

    function KR(e) {
        var t = e.state, n = e.instance, r = e.options, o = r.scroll, i = o === void 0 ? !0 : o, l = r.resize,
            c = l === void 0 ? !0 : l, d = Cr(t.elements.popper),
            p = [].concat(t.scrollParents.reference, t.scrollParents.popper);
        return i && p.forEach(function (g) {
            g.addEventListener("scroll", n.update, zd)
        }), c && d.addEventListener("resize", n.update, zd), function () {
            i && p.forEach(function (g) {
                g.removeEventListener("scroll", n.update, zd)
            }), c && d.removeEventListener("resize", n.update, zd)
        }
    }

    const qR = {
        name: "eventListeners", enabled: !0, phase: "write", fn: function () {
        }, effect: KR, data: {}
    };
    var YR = {left: "right", right: "left", bottom: "top", top: "bottom"};

    function Bd(e) {
        return e.replace(/left|right|bottom|top/g, function (t) {
            return YR[t]
        })
    }

    var XR = {start: "end", end: "start"};

    function sw(e) {
        return e.replace(/start|end/g, function (t) {
            return XR[t]
        })
    }

    function gm(e) {
        var t = Cr(e), n = t.pageXOffset, r = t.pageYOffset;
        return {scrollLeft: n, scrollTop: r}
    }

    function hm(e) {
        return qa(Js(e)).left + gm(e).scrollLeft
    }

    function ZR(e, t) {
        var n = Cr(e), r = Js(e), o = n.visualViewport, i = r.clientWidth, l = r.clientHeight, c = 0, d = 0;
        if (o) {
            i = o.width, l = o.height;
            var p = Jx();
            (p || !p && t === "fixed") && (c = o.offsetLeft, d = o.offsetTop)
        }
        return {width: i, height: l, x: c + hm(e), y: d}
    }

    function JR(e) {
        var t, n = Js(e), r = gm(e), o = (t = e.ownerDocument) == null ? void 0 : t.body,
            i = qi(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0),
            l = qi(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0),
            c = -r.scrollLeft + hm(e), d = -r.scrollTop;
        return ys(o || n).direction === "rtl" && (c += qi(n.clientWidth, o ? o.clientWidth : 0) - i), {
            width: i,
            height: l,
            x: c,
            y: d
        }
    }

    function mm(e) {
        var t = ys(e), n = t.overflow, r = t.overflowX, o = t.overflowY;
        return /auto|scroll|overlay|hidden/.test(n + o + r)
    }

    function iw(e) {
        return ["html", "body", "#document"].indexOf(Bo(e)) >= 0 ? e.ownerDocument.body : Br(e) && mm(e) ? e : iw(Fd(e))
    }

    function _c(e, t) {
        var n;
        t === void 0 && (t = []);
        var r = iw(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), i = Cr(r),
            l = o ? [i].concat(i.visualViewport || [], mm(r) ? r : []) : r, c = t.concat(l);
        return o ? c : c.concat(_c(Fd(l)))
    }

    function vm(e) {
        return Object.assign({}, e, {left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height})
    }

    function QR(e, t) {
        var n = qa(e, !1, t === "fixed");
        return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n
    }

    function aw(e, t, n) {
        return t === Yx ? vm(ZR(e, n)) : Ki(t) ? QR(t, n) : vm(JR(Js(e)))
    }

    function eN(e) {
        var t = _c(Fd(e)), n = ["absolute", "fixed"].indexOf(ys(e).position) >= 0, r = n && Br(e) ? Ec(e) : e;
        return Ki(r) ? t.filter(function (o) {
            return Ki(o) && Qx(o, r) && Bo(o) !== "body"
        }) : []
    }

    function tN(e, t, n, r) {
        var o = t === "clippingParents" ? eN(e) : [].concat(t), i = [].concat(o, [n]), l = i[0],
            c = i.reduce(function (d, p) {
                var g = aw(e, p, r);
                return d.top = qi(g.top, d.top), d.right = Hd(g.right, d.right), d.bottom = Hd(g.bottom, d.bottom), d.left = qi(g.left, d.left), d
            }, aw(e, l, r));
        return c.width = c.right - c.left, c.height = c.bottom - c.top, c.x = c.left, c.y = c.top, c
    }

    function lw(e) {
        var t = e.reference, n = e.element, r = e.placement, o = r ? Uo(r) : null, i = r ? Ya(r) : null,
            l = t.x + t.width / 2 - n.width / 2, c = t.y + t.height / 2 - n.height / 2, d;
        switch (o) {
            case Qn:
                d = {x: l, y: t.y - n.height};
                break;
            case Fr:
                d = {x: l, y: t.y + t.height};
                break;
            case zr:
                d = {x: t.x + t.width, y: c};
                break;
            case er:
                d = {x: t.x - n.width, y: c};
                break;
            default:
                d = {x: t.x, y: t.y}
        }
        var p = o ? pm(o) : null;
        if (p != null) {
            var g = p === "y" ? "height" : "width";
            switch (i) {
                case Ga:
                    d[p] = d[p] - (t[g] / 2 - n[g] / 2);
                    break;
                case jc:
                    d[p] = d[p] + (t[g] / 2 - n[g] / 2);
                    break
            }
        }
        return d
    }

    function kc(e, t) {
        t === void 0 && (t = {});
        var n = t, r = n.placement, o = r === void 0 ? e.placement : r, i = n.strategy,
            l = i === void 0 ? e.strategy : i, c = n.boundary, d = c === void 0 ? wR : c, p = n.rootBoundary,
            g = p === void 0 ? Yx : p, m = n.elementContext, v = m === void 0 ? Cc : m, b = n.altBoundary,
            x = b === void 0 ? !1 : b, w = n.padding, j = w === void 0 ? 0 : w,
            C = nw(typeof j != "number" ? j : rw(j, Sc)), _ = v === Cc ? SR : Cc, E = e.rects.popper,
            k = e.elements[x ? _ : v], T = tN(Ki(k) ? k : k.contextElement || Js(e.elements.popper), d, g, l),
            O = qa(e.elements.reference), A = lw({reference: O, element: E, strategy: "absolute", placement: o}),
            $ = vm(Object.assign({}, E, A)), F = v === Cc ? $ : O, N = {
                top: T.top - F.top + C.top,
                bottom: F.bottom - T.bottom + C.bottom,
                left: T.left - F.left + C.left,
                right: F.right - T.right + C.right
            }, z = e.modifiersData.offset;
        if (v === Cc && z) {
            var V = z[o];
            Object.keys(N).forEach(function (X) {
                var Z = [zr, Fr].indexOf(X) >= 0 ? 1 : -1, R = [Qn, Fr].indexOf(X) >= 0 ? "y" : "x";
                N[X] += V[R] * Z
            })
        }
        return N
    }

    function nN(e, t) {
        t === void 0 && (t = {});
        var n = t, r = n.placement, o = n.boundary, i = n.rootBoundary, l = n.padding, c = n.flipVariations,
            d = n.allowedAutoPlacements, p = d === void 0 ? Zx : d, g = Ya(r), m = g ? c ? Xx : Xx.filter(function (x) {
                return Ya(x) === g
            }) : Sc, v = m.filter(function (x) {
                return p.indexOf(x) >= 0
            });
        v.length === 0 && (v = m);
        var b = v.reduce(function (x, w) {
            return x[w] = kc(e, {placement: w, boundary: o, rootBoundary: i, padding: l})[Uo(w)], x
        }, {});
        return Object.keys(b).sort(function (x, w) {
            return b[x] - b[w]
        })
    }

    function rN(e) {
        if (Uo(e) === cm) return [];
        var t = Bd(e);
        return [sw(e), t, sw(t)]
    }

    function oN(e) {
        var t = e.state, n = e.options, r = e.name;
        if (!t.modifiersData[r]._skip) {
            for (var o = n.mainAxis, i = o === void 0 ? !0 : o, l = n.altAxis, c = l === void 0 ? !0 : l, d = n.fallbackPlacements, p = n.padding, g = n.boundary, m = n.rootBoundary, v = n.altBoundary, b = n.flipVariations, x = b === void 0 ? !0 : b, w = n.allowedAutoPlacements, j = t.options.placement, C = Uo(j), _ = C === j, E = d || (_ || !x ? [Bd(j)] : rN(j)), k = [j].concat(E).reduce(function (ne, ue) {
                return ne.concat(Uo(ue) === cm ? nN(t, {
                    placement: ue,
                    boundary: g,
                    rootBoundary: m,
                    padding: p,
                    flipVariations: x,
                    allowedAutoPlacements: w
                }) : ue)
            }, []), T = t.rects.reference, O = t.rects.popper, A = new Map, $ = !0, F = k[0], N = 0; N < k.length; N++) {
                var z = k[N], V = Uo(z), X = Ya(z) === Ga, Z = [Qn, Fr].indexOf(V) >= 0, R = Z ? "width" : "height",
                    B = kc(t, {placement: z, boundary: g, rootBoundary: m, altBoundary: v, padding: p}),
                    Q = Z ? X ? zr : er : X ? Fr : Qn;
                T[R] > O[R] && (Q = Bd(Q));
                var H = Bd(Q), I = [];
                if (i && I.push(B[V] <= 0), c && I.push(B[Q] <= 0, B[H] <= 0), I.every(function (ne) {
                    return ne
                })) {
                    F = z, $ = !1;
                    break
                }
                A.set(z, I)
            }
            if ($) for (var D = x ? 3 : 1, M = function (ue) {
                var me = k.find(function (ae) {
                    var ie = A.get(ae);
                    if (ie) return ie.slice(0, ue).every(function (de) {
                        return de
                    })
                });
                if (me) return F = me, "break"
            }, W = D; W > 0; W--) {
                var ce = M(W);
                if (ce === "break") break
            }
            t.placement !== F && (t.modifiersData[r]._skip = !0, t.placement = F, t.reset = !0)
        }
    }

    const sN = {name: "flip", enabled: !0, phase: "main", fn: oN, requiresIfExists: ["offset"], data: {_skip: !1}};

    function cw(e, t, n) {
        return n === void 0 && (n = {x: 0, y: 0}), {
            top: e.top - t.height - n.y,
            right: e.right - t.width + n.x,
            bottom: e.bottom - t.height + n.y,
            left: e.left - t.width - n.x
        }
    }

    function uw(e) {
        return [Qn, zr, Fr, er].some(function (t) {
            return e[t] >= 0
        })
    }

    function iN(e) {
        var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, i = t.modifiersData.preventOverflow,
            l = kc(t, {elementContext: "reference"}), c = kc(t, {altBoundary: !0}), d = cw(l, r), p = cw(c, o, i),
            g = uw(d), m = uw(p);
        t.modifiersData[n] = {
            referenceClippingOffsets: d,
            popperEscapeOffsets: p,
            isReferenceHidden: g,
            hasPopperEscaped: m
        }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
            "data-popper-reference-hidden": g,
            "data-popper-escaped": m
        })
    }

    const aN = {name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: iN};

    function lN(e, t, n) {
        var r = Uo(e), o = [er, Qn].indexOf(r) >= 0 ? -1 : 1,
            i = typeof n == "function" ? n(Object.assign({}, t, {placement: e})) : n, l = i[0], c = i[1];
        return l = l || 0, c = (c || 0) * o, [er, zr].indexOf(r) >= 0 ? {x: c, y: l} : {x: l, y: c}
    }

    function cN(e) {
        var t = e.state, n = e.options, r = e.name, o = n.offset, i = o === void 0 ? [0, 0] : o,
            l = Zx.reduce(function (g, m) {
                return g[m] = lN(m, t.rects, i), g
            }, {}), c = l[t.placement], d = c.x, p = c.y;
        t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += d, t.modifiersData.popperOffsets.y += p), t.modifiersData[r] = l
    }

    const uN = {name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: cN};

    function dN(e) {
        var t = e.state, n = e.name;
        t.modifiersData[n] = lw({
            reference: t.rects.reference,
            element: t.rects.popper,
            strategy: "absolute",
            placement: t.placement
        })
    }

    const fN = {name: "popperOffsets", enabled: !0, phase: "read", fn: dN, data: {}};

    function pN(e) {
        return e === "x" ? "y" : "x"
    }

    function gN(e) {
        var t = e.state, n = e.options, r = e.name, o = n.mainAxis, i = o === void 0 ? !0 : o, l = n.altAxis,
            c = l === void 0 ? !1 : l, d = n.boundary, p = n.rootBoundary, g = n.altBoundary, m = n.padding,
            v = n.tether, b = v === void 0 ? !0 : v, x = n.tetherOffset, w = x === void 0 ? 0 : x,
            j = kc(t, {boundary: d, rootBoundary: p, padding: m, altBoundary: g}), C = Uo(t.placement),
            _ = Ya(t.placement), E = !_, k = pm(C), T = pN(k), O = t.modifiersData.popperOffsets, A = t.rects.reference,
            $ = t.rects.popper,
            F = typeof w == "function" ? w(Object.assign({}, t.rects, {placement: t.placement})) : w,
            N = typeof F == "number" ? {mainAxis: F, altAxis: F} : Object.assign({mainAxis: 0, altAxis: 0}, F),
            z = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, V = {x: 0, y: 0};
        if (O) {
            if (i) {
                var X, Z = k === "y" ? Qn : er, R = k === "y" ? Fr : zr, B = k === "y" ? "height" : "width", Q = O[k],
                    H = Q + j[Z], I = Q - j[R], D = b ? -$[B] / 2 : 0, M = _ === Ga ? A[B] : $[B],
                    W = _ === Ga ? -$[B] : -A[B], ce = t.elements.arrow, ne = b && ce ? fm(ce) : {width: 0, height: 0},
                    ue = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : tw(),
                    me = ue[Z], ae = ue[R], ie = Pc(0, A[B], ne[B]),
                    de = E ? A[B] / 2 - D - ie - me - N.mainAxis : M - ie - me - N.mainAxis,
                    je = E ? -A[B] / 2 + D + ie + ae + N.mainAxis : W + ie + ae + N.mainAxis,
                    he = t.elements.arrow && Ec(t.elements.arrow),
                    Ie = he ? k === "y" ? he.clientTop || 0 : he.clientLeft || 0 : 0,
                    He = (X = z == null ? void 0 : z[k]) != null ? X : 0, yt = Q + de - He - Ie, kt = Q + je - He,
                    Bt = Pc(b ? Hd(H, yt) : H, Q, b ? qi(I, kt) : I);
                O[k] = Bt, V[k] = Bt - Q
            }
            if (c) {
                var Ct, pt = k === "x" ? Qn : er, Sn = k === "x" ? Fr : zr, wt = O[T],
                    Dt = T === "y" ? "height" : "width", rn = wt + j[pt], Ut = wt - j[Sn],
                    Tt = [Qn, er].indexOf(C) !== -1, st = (Ct = z == null ? void 0 : z[T]) != null ? Ct : 0,
                    Lt = Tt ? rn : wt - A[Dt] - $[Dt] - st + N.altAxis,
                    qt = Tt ? wt + A[Dt] + $[Dt] - st - N.altAxis : Ut,
                    jn = b && Tt ? IR(Lt, wt, qt) : Pc(b ? Lt : rn, wt, b ? qt : Ut);
                O[T] = jn, V[T] = jn - wt
            }
            t.modifiersData[r] = V
        }
    }

    const hN = {name: "preventOverflow", enabled: !0, phase: "main", fn: gN, requiresIfExists: ["offset"]};

    function mN(e) {
        return {scrollLeft: e.scrollLeft, scrollTop: e.scrollTop}
    }

    function vN(e) {
        return e === Cr(e) || !Br(e) ? gm(e) : mN(e)
    }

    function yN(e) {
        var t = e.getBoundingClientRect(), n = Ka(t.width) / e.offsetWidth || 1, r = Ka(t.height) / e.offsetHeight || 1;
        return n !== 1 || r !== 1
    }

    function bN(e, t, n) {
        n === void 0 && (n = !1);
        var r = Br(t), o = Br(t) && yN(t), i = Js(t), l = qa(e, o, n), c = {scrollLeft: 0, scrollTop: 0},
            d = {x: 0, y: 0};
        return (r || !r && !n) && ((Bo(t) !== "body" || mm(i)) && (c = vN(t)), Br(t) ? (d = qa(t, !0), d.x += t.clientLeft, d.y += t.clientTop) : i && (d.x = hm(i))), {
            x: l.left + c.scrollLeft - d.x,
            y: l.top + c.scrollTop - d.y,
            width: l.width,
            height: l.height
        }
    }

    function xN(e) {
        var t = new Map, n = new Set, r = [];
        e.forEach(function (i) {
            t.set(i.name, i)
        });

        function o(i) {
            n.add(i.name);
            var l = [].concat(i.requires || [], i.requiresIfExists || []);
            l.forEach(function (c) {
                if (!n.has(c)) {
                    var d = t.get(c);
                    d && o(d)
                }
            }), r.push(i)
        }

        return e.forEach(function (i) {
            n.has(i.name) || o(i)
        }), r
    }

    function wN(e) {
        var t = xN(e);
        return MR.reduce(function (n, r) {
            return n.concat(t.filter(function (o) {
                return o.phase === r
            }))
        }, [])
    }

    function SN(e) {
        var t;
        return function () {
            return t || (t = new Promise(function (n) {
                Promise.resolve().then(function () {
                    t = void 0, n(e())
                })
            })), t
        }
    }

    function jN(e) {
        var t = e.reduce(function (n, r) {
            var o = n[r.name];
            return n[r.name] = o ? Object.assign({}, o, r, {
                options: Object.assign({}, o.options, r.options),
                data: Object.assign({}, o.data, r.data)
            }) : r, n
        }, {});
        return Object.keys(t).map(function (n) {
            return t[n]
        })
    }

    var dw = {placement: "bottom", modifiers: [], strategy: "absolute"};

    function fw() {
        for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
        return !t.some(function (r) {
            return !(r && typeof r.getBoundingClientRect == "function")
        })
    }

    function CN(e) {
        e === void 0 && (e = {});
        var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, i = o === void 0 ? dw : o;
        return function (c, d, p) {
            p === void 0 && (p = i);
            var g = {
                placement: "bottom",
                orderedModifiers: [],
                options: Object.assign({}, dw, i),
                modifiersData: {},
                elements: {reference: c, popper: d},
                attributes: {},
                styles: {}
            }, m = [], v = !1, b = {
                state: g, setOptions: function (C) {
                    var _ = typeof C == "function" ? C(g.options) : C;
                    w(), g.options = Object.assign({}, i, g.options, _), g.scrollParents = {
                        reference: Ki(c) ? _c(c) : c.contextElement ? _c(c.contextElement) : [],
                        popper: _c(d)
                    };
                    var E = wN(jN([].concat(r, g.options.modifiers)));
                    return g.orderedModifiers = E.filter(function (k) {
                        return k.enabled
                    }), x(), b.update()
                }, forceUpdate: function () {
                    if (!v) {
                        var C = g.elements, _ = C.reference, E = C.popper;
                        if (fw(_, E)) {
                            g.rects = {
                                reference: bN(_, Ec(E), g.options.strategy === "fixed"),
                                popper: fm(E)
                            }, g.reset = !1, g.placement = g.options.placement, g.orderedModifiers.forEach(function (N) {
                                return g.modifiersData[N.name] = Object.assign({}, N.data)
                            });
                            for (var k = 0; k < g.orderedModifiers.length; k++) {
                                if (g.reset === !0) {
                                    g.reset = !1, k = -1;
                                    continue
                                }
                                var T = g.orderedModifiers[k], O = T.fn, A = T.options, $ = A === void 0 ? {} : A,
                                    F = T.name;
                                typeof O == "function" && (g = O({state: g, options: $, name: F, instance: b}) || g)
                            }
                        }
                    }
                }, update: SN(function () {
                    return new Promise(function (j) {
                        b.forceUpdate(), j(g)
                    })
                }), destroy: function () {
                    w(), v = !0
                }
            };
            if (!fw(c, d)) return b;
            b.setOptions(p).then(function (j) {
                !v && p.onFirstUpdate && p.onFirstUpdate(j)
            });

            function x() {
                g.orderedModifiers.forEach(function (j) {
                    var C = j.name, _ = j.options, E = _ === void 0 ? {} : _, k = j.effect;
                    if (typeof k == "function") {
                        var T = k({state: g, name: C, instance: b, options: E}), O = function () {
                        };
                        m.push(T || O)
                    }
                })
            }

            function w() {
                m.forEach(function (j) {
                    return j()
                }), m = []
            }

            return b
        }
    }

    var EN = [qR, fN, GR, NR, uN, sN, hN, zR, aN], PN = CN({defaultModifiers: EN}), _N = typeof Element < "u",
        kN = typeof Map == "function", TN = typeof Set == "function",
        ON = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;

    function Ud(e, t) {
        if (e === t) return !0;
        if (e && t && typeof e == "object" && typeof t == "object") {
            if (e.constructor !== t.constructor) return !1;
            var n, r, o;
            if (Array.isArray(e)) {
                if (n = e.length, n != t.length) return !1;
                for (r = n; r-- !== 0;) if (!Ud(e[r], t[r])) return !1;
                return !0
            }
            var i;
            if (kN && e instanceof Map && t instanceof Map) {
                if (e.size !== t.size) return !1;
                for (i = e.entries(); !(r = i.next()).done;) if (!t.has(r.value[0])) return !1;
                for (i = e.entries(); !(r = i.next()).done;) if (!Ud(r.value[1], t.get(r.value[0]))) return !1;
                return !0
            }
            if (TN && e instanceof Set && t instanceof Set) {
                if (e.size !== t.size) return !1;
                for (i = e.entries(); !(r = i.next()).done;) if (!t.has(r.value[0])) return !1;
                return !0
            }
            if (ON && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
                if (n = e.length, n != t.length) return !1;
                for (r = n; r-- !== 0;) if (e[r] !== t[r]) return !1;
                return !0
            }
            if (e.constructor === RegExp) return e.source === t.source && e.flags === t.flags;
            if (e.valueOf !== Object.prototype.valueOf && typeof e.valueOf == "function" && typeof t.valueOf == "function") return e.valueOf() === t.valueOf();
            if (e.toString !== Object.prototype.toString && typeof e.toString == "function" && typeof t.toString == "function") return e.toString() === t.toString();
            if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length) return !1;
            for (r = n; r-- !== 0;) if (!Object.prototype.hasOwnProperty.call(t, o[r])) return !1;
            if (_N && e instanceof Element) return !1;
            for (r = n; r-- !== 0;) if (!((o[r] === "_owner" || o[r] === "__v" || o[r] === "__o") && e.$$typeof) && !Ud(e[o[r]], t[o[r]])) return !1;
            return !0
        }
        return e !== e && t !== t
    }

    var LN = function (t, n) {
        try {
            return Ud(t, n)
        } catch (r) {
            if ((r.message || "").match(/stack|recursion/i)) return console.warn("react-fast-compare cannot handle circular refs"), !1;
            throw r
        }
    };
    const MN = zl(LN);
    var AN = [], Xa = function (t, n, r) {
        r === void 0 && (r = {});
        var o = y.useRef(null), i = {
            onFirstUpdate: r.onFirstUpdate,
            placement: r.placement || "bottom",
            strategy: r.strategy || "absolute",
            modifiers: r.modifiers || AN
        }, l = y.useState({
            styles: {
                popper: {position: i.strategy, left: "0", top: "0"},
                arrow: {position: "absolute"}
            }, attributes: {}
        }), c = l[0], d = l[1], p = y.useMemo(function () {
            return {
                name: "updateState", enabled: !0, phase: "write", fn: function (b) {
                    var x = b.state, w = Object.keys(x.elements);
                    mr.flushSync(function () {
                        d({
                            styles: Kx(w.map(function (j) {
                                return [j, x.styles[j] || {}]
                            })), attributes: Kx(w.map(function (j) {
                                return [j, x.attributes[j]]
                            }))
                        })
                    })
                }, requires: ["computeStyles"]
            }
        }, []), g = y.useMemo(function () {
            var v = {
                onFirstUpdate: i.onFirstUpdate,
                placement: i.placement,
                strategy: i.strategy,
                modifiers: [].concat(i.modifiers, [p, {name: "applyStyles", enabled: !1}])
            };
            return MN(o.current, v) ? o.current || v : (o.current = v, v)
        }, [i.onFirstUpdate, i.placement, i.strategy, i.modifiers, p]), m = y.useRef();
        return qx(function () {
            m.current && m.current.setOptions(g)
        }, [g]), qx(function () {
            if (!(t == null || n == null)) {
                var v = r.createPopper || PN, b = v(t, n, g);
                return m.current = b, function () {
                    b.destroy(), m.current = null
                }
            }
        }, [t, n, r.createPopper]), {
            state: m.current ? m.current.state : null,
            styles: c.styles,
            attributes: c.attributes,
            update: m.current ? m.current.update : null,
            forceUpdate: m.current ? m.current.forceUpdate : null
        }
    };
    const tr = y.forwardRef(function ({
                                          children: t,
                                          title: n,
                                          onClose: r,
                                          icon: o,
                                          skipOverflow: i,
                                          shadow: l = !0,
                                          padding: c = !0,
                                          border: d = !0,
                                          round: p = !0,
                                          className: g,
                                          classNameBody: m,
                                          size: v = "m",
                                          titleClass: b = se("gs-utl-mb-2 gs-utl-mt-0.5"),
                                          style: x,
                                          bg: w,
                                          ...j
                                      }, C) {
        const _ = ps(o) ? o : {};
        return u.jsxs("div", {
            ...j,
            ref: C,
            style: x,
            className: se(["gs-utl-card", g, w || hh.bg, ye.b, p && ye.rnd, d ? te.br : ye.bT, !i && "gs-utl-overflow-auto", l && "gs-utl-shadow-md", c && v === "l" && "gs-utl-p-5", c && v === "m" && "gs-utl-px-4 gs-utl-py-2", c && v === "s" && "gs-utl-px-2 gs-utl-py-1", c && v === "xs" && "gs-utl-px-2 gs-utl-py-0.5", c && v === "x2s" && "gs-utl-px-0.5"]),
            children: [(n || r) && n !== !1 && u.jsxs(K, {
                className: se("gs-utl-card-title", b),
                items: "center",
                children: [u.jsx(q, {
                    className: se("truncate"),
                    grow: !0,
                    children: n
                }), (r || o) && u.jsx(q, {
                    onClick: r,
                    className: se("cursor-pointer transition-opacity opacity-50 hover:gs-utl-opacity-100"),
                    children: u.jsx(be, {icon: (zt(o) ? o : "") || fe.close, size: "18px", ..._})
                })]
            }), u.jsx("div", {className: se("gs-utl-card-body", m), children: t})]
        })
    });
    var Wd = (e => (e.canvas = "canvas", e.layers = "layers", e))(Wd || {}),
        bs = (e => (e.selectParent = "selectParent", e.duplicate = "duplicate", e.delete = "delete", e.symbolCreate = "symbolCreate", e.symbolDetach = "symbolDetach", e.symbolOverride = "symbolOverride", e.symbolOverrideClear = "symbolOverrideClear", e))(bs || {}),
        pw = (e => (e.select = "select", e.hover = "hover", e.target = "target", e.spacing = "spacing", e))(pw || {});

    class RN {
        constructor(t) {
            this.isOpen = !1, this.isEnabled = !0, this.items = [], this.coordinates = {
                x: 0,
                y: 0
            }, this.getItemsForComponent = Vi(function* (n, r = {}) {
                var C;
                if (!(n != null && n.em)) return [];
                const o = n.em.getEditor(), {isSymbol: i, isRoot: l} = o.Components.getSymbolInfo(n),
                    c = !!n.getSymbolOverride(), d = !!n.get("removable"), p = !!n.parent() && !!n.toolbar.length,
                    g = !!n.get("copyable"), m = [p && {
                        id: bs.selectParent, label: "Select parent", onClick: () => {
                            o.runCommand("core:component-exit", {force: !0})
                        }
                    }, g && {
                        id: bs.duplicate, label: "Duplicate", onClick: () => {
                            o.runCommand("tlb-clone")
                        }
                    }, !i && d && {
                        id: bs.symbolCreate, label: "Create Symbol", onClick: () => {
                            o.runCommand(_e.symbolAdd)
                        }
                    }, i && l && {
                        id: bs.symbolDetach, label: "Detach instance", onClick: () => {
                            o.runCommand(_e.symbolDetach)
                        }
                    }, i && !c && {
                        id: bs.symbolOverride, label: "Make overridable", onClick: () => {
                            o.runCommand(_e.symbolOverride, {override: !0})
                        }
                    }, i && c && {
                        id: bs.symbolOverrideClear, label: "Clear overridable", onClick: () => {
                            o.runCommand(_e.symbolOverride)
                        }
                    }, d && {
                        id: bs.delete, label: "Delete", onClick: () => {
                            o.runCommand("core:component-delete")
                        }
                    }].filter(Boolean), v = n.get("contextMenu"), b = {
                        ...r,
                        items: m,
                        component: n,
                        editor: o,
                        type: n.get("type") || "default",
                        source: r.source || Wd.canvas
                    }, x = yield gw(v, b),
                    w = (C = this.store.appEditorStore.sdkComponentsConfig) == null ? void 0 : C.contextMenu;
                return yield gw(w, {...b, items: x})
            }), this.store = t, Bn(this, {}, {autoBind: !0})
        }

        get publicState() {
            return {enabled: this.isEnabled}
        }

        setPublicState(t) {
            t.enabled !== void 0 && (this.isEnabled = t.enabled)
        }

        * showForComponent(t, n) {
            const r = t == null ? void 0 : t.em;
            if (!r) return;
            n.skipSelect || r.selected.hasComponent(t) || r.setSelected(t);
            const o = yield this.getItemsForComponent(t, n);
            o.length && this.show({...n, items: o})
        }

        show({items: t, x: n, y: r, w: o, h: i}) {
            this.isOpen = !0, this.coordinates = {x: n, y: r, w: o, h: i}, this.items = t
        }

        hide() {
            this.isOpen = !1, setTimeout(this.clear, 101)
        }

        clear() {
            this.items = [], this.coordinates = {x: 0, y: 0}
        }
    }

    const gw = async (e, t) => St(e) ? (await e(t)).filter(Boolean) : t.items, ym = () => On().contextMenu;
    var hw, mw = mr;
    hw = mw.createRoot, mw.hydrateRoot;

    function vw(e, t) {
        y.useEffect(() => {
            const n = "pointerdown", {current: r} = e;
            if (!r || !t.enabled) return;

            function o(i) {
                const l = i.target;
                r && l && !r.contains(l) && t.onTrigger(l)
            }

            return document.addEventListener(n, o), () => {
                document.removeEventListener(n, o)
            }
        }, [e.current, t.enabled])
    }

    const yw = (e, t) => {
        const {boxRectScreen: n, vwHeight: r, initialPos: o = "top-right", zoomMultiplier: i = 1} = t, l = o.split("-"),
            c = l[0], d = l[1], p = c === "top" ? "bottom" : "top", g = d === "right" ? "left" : "right";
        y.useLayoutEffect(() => {
            const m = e.current;
            if (m) {
                const {offsetWidth: v, offsetHeight: b} = m, x = n.y - b, w = n.x + n.width - v, j = n.height + b > r,
                    C = x < 0, _ = C && !j ? p : c, E = w < 0 ? g : d;
                if (t.setPos(`${_}-${E}`), j) {
                    const k = n.y + n.height, T = k < 0 ? x - k : x;
                    m.style.top = C ? `${parseInt(`${-T}`) * i}px` : ""
                } else m.style.top = ""
            }
        }, [e.current, n])
    }, bw = e => {
        const {ref: t, show: n, node: r, styles: o, update: i, reload: l} = e,
            c = {all: "initial", zIndex: "10", fontFamily: "inherit", ...o};
        y.useEffect(() => {
            const d = t.current;
            if (d && n) {
                if (!d.__sh) {
                    const m = d.attachShadow({mode: "closed"});
                    d.__sh = hw(m)
                }
                d.__sh.render(r), Object.keys(c).forEach(m => {
                    d.style.setProperty(_k(m), c[m], "important")
                });
                const p = new MutationObserver(l);
                p.observe(d, {attributeFilter: ["style"]});
                const g = new MutationObserver(m => {
                    Array.from(m[0].removedNodes).includes(d) && l()
                });
                return g.observe(d.parentNode, {childList: !0}), () => {
                    p.disconnect(), g.disconnect()
                }
            }
        }, [t.current, n, i])
    }, NN = "gs-cmp-popover";

    function Wo({
                    children: e,
                    handler: t,
                    title: n,
                    size: r,
                    padding: o = !0,
                    border: i = !0,
                    overlay: l,
                    clickAway: c,
                    topIcon: d,
                    placement: p = "auto",
                    offset: g,
                    open: m,
                    onClose: v,
                    buttonAs: b,
                    className: x,
                    classNameBody: w,
                    buttonProps: j = {},
                    disabled: C
                }) {
        const [_, E] = y.useState(!!m), [k, T] = y.useState(_), [O, A] = y.useState(null), [$, F] = y.useState(null),
            N = Xa(O, $, {...wm({offset: g}), placement: p}), z = () => {
                T(!1), v == null || v()
            };
        vw({current: $}, {onTrigger: z, enabled: c && _}), y.useEffect(() => {
            T(!!m)
        }, [m]), y.useEffect(() => {
            var Z;
            _ && ((Z = N.update) == null || Z.call(N))
        }, [_, N.update]), y.useEffect(() => {
            const Z = setTimeout(() => E(k), 10);
            return () => clearTimeout(Z)
        }, [k]);
        const V = se("w-full transition-colors", C && "pointer-events-none", ...tx({border: !1, size: "", ...j})),
            X = se(["fixed z-20", d && "gjs-mt-5", r === "s" && "w-full max-w-64", r === "sm" && "w-full max-w-sm", r === "md" && "w-full max-w-md"]);
        return u.jsxs(Zh, {
            className: se(NN, "relative flex", x),
            children: [u.jsx(Zh.Button, {
                ref: A,
                as: b,
                className: V,
                children: u.jsx("div", {onClick: () => !kn(m) && !C && T(!_), children: t})
            }), _ && l && u.jsx("div", {
                onClick: z,
                className: se("z-10 fixed inset-0")
            }), k && u.jsx(Zh.Panel, {
                static: !0,
                className: X,
                ref: F,
                style: N.styles.popper, ...N.attributes.popper,
                children: u.jsx(zo, {
                    as: y.Fragment,
                    show: _,
                    unmount: !1, ...gh,
                    children: u.jsx(tr, {
                        classNameBody: w,
                        title: n,
                        onClose: z,
                        padding: o,
                        border: i,
                        children: typeof e == "function" ? e({close: z}) : e
                    })
                })
            })]
        })
    }

    function Tc({action: e, icon: t, label: n, className: r, items: o, ...i}) {
        const l = y.useRef(null), [c, d] = y.useState(), p = l.current,
            g = se([r, "gs-utl-last:border-b-0 gs-utl-gap-2 gs-utl-select-none", te.br, et.xy, ye.bb, i.disabled && nt.disabled, ...e ? [te.hBgH, "gs-utl-cursor-pointer"] : ["gs-utl-cursor-default"]]),
            m = b => St(e) && e({event: b});
        y.useEffect(() => {
            if (!p) return;
            const b = setTimeout(() => d(p.getBoundingClientRect()), i.active ? 0 : Zb);
            return () => clearTimeout(b)
        }, [p, i.active]);
        const v = () => {
            var b;
            return (b = i.onActive) == null ? void 0 : b.call(i)
        };
        return u.jsxs(K, {
            ref: l,
            items: "center",
            nowrap: !0,
            className: g,
            onClick: m,
            onPointerEnter: v,
            children: [t && u.jsx(q, {
                children: u.jsx(be, {
                    icon: t,
                    size: Ee.s
                })
            }), u.jsx(q, {
                className: se(i.classNameLabel, nt.txtEllips),
                grow: !0,
                children: n
            }), !!(o != null && o.length) && u.jsxs(u.Fragment, {
                children: [u.jsx(q, {
                    children: u.jsx(be, {
                        icon: fe.chevronRight,
                        size: Ee.s,
                        className: se("-gs-utl-mr-2")
                    })
                }), c && i.active && u.jsx(kw, {items: o, x: c.left, y: c.top, w: c.width, h: c.height, open: !0})]
            })]
        })
    }

    function Ur({
                    className: e,
                    as: t = "label",
                    bold: n,
                    m: r = "gjs-mb-1",
                    size: o = "m",
                    capitalize: i = !0,
                    children: l,
                    tip: c,
                    onClear: d,
                    ...p
                }) {
        const g = t, m = !!d;
        return u.jsxs(g, {
            className: U(e, r, m && te.tAo, i && "gs-utl-capitalize", n && "gs-utl-font-semibold", o === "s" && "gs-utl-text-sm", c || m ? "gs-utl-flex gs-utl-gap-2 gs-utl-items-center" : "gs-utl-block"), ...m && {htmlFor: ""}, ...p,
            children: [!!c && u.jsx(mn, {
                classNameWrp: "gs-utl-normal-case gs-utl-whitespace-normal",
                classNameContent: "gs-utl-max-w-60",
                title: c,
                children: u.jsx(be, {icon: fe.information, size: Ee.s2x})
            }), l, m && u.jsx(Xt, {
                title: "Clear value",
                onClick: d,
                icon: {icon: fe.close, size: Ee.s2x},
                variant: "out-clear",
                border: !1,
                size: "",
                block: !0
            })]
        })
    }

    var xw = (e => (e.primary = "primary", e.outline = "outline", e.shallow = "shallow", e))(xw || {}),
        ww = (e => (e.none = "", e.x2s = "x2s", e.xs = "xs", e.s = "s", e.m = "m", e.lg = "lg", e))(ww || {});
    const $N = "gs-cmp-button", Gd = y.memo(xe(function ({
                                                             className: t,
                                                             children: n,
                                                             tooltip: r,
                                                             variant: o,
                                                             onClick: i,
                                                             editorEvents: l,
                                                             label: c,
                                                             size: d,
                                                             icon: p,
                                                             active: g,
                                                             buttonType: m,
                                                             disabled: v,
                                                             ...b
                                                         }) {
        const {editor: x} = Ae(), [w, j] = y.useState(() => ({
                disabled: v,
                variant: o,
                active: g,
                className: t,
                tooltip: r,
                icon: p,
                size: d,
                label: c
            })), C = w.variant, _ = C === "outline", E = C === "primary" ? "pr" : _ ? "out-clear" : void 0, k = w.label,
            T = O => {
                x && (i == null || i({event: O, editor: x, state: w, setState: A => j($ => ({...$, ...A}))}))
            };
        return y.useEffect(() => {
            if (!l || !x) return;
            const O = Object.keys(l).reduce(($, F) => ($[F] = (N = {}) => {
                l[F]({fromEvent: N, editor: x, state: w, setState: z => j(V => ({...V, ...z}))})
            }, $), {}), A = Object.keys(O);
            return A.forEach($ => x.on($, O[$])), () => {
                A.forEach($ => x.off($, O[$]))
            }
        }, [x, w]), u.jsx(Xt, {
            title: w.tooltip,
            className: $N,
            classNameWrp: w.className,
            variant: E,
            icon: w.icon,
            active: w.active,
            size: w.size,
            disabled: w.disabled,
            onClick: T,
            border: _,
            type: m,
            block: !0, ...b,
            children: k ? St(k) ? k({editor: x}) : k : n
        })
    }));
    var Kd = (e => (e.m = "m", e.s = "s", e))(Kd || {});
    const Sw = "gs-input-field", qd = e => kn(e) ? e : "",
        Oc = (e = {}) => U("gs-utl-w-full", te.bgTr, Da.inputText, e.disabled && te.txtLowEmphasis),
        bm = ({size: e = "m"} = {}) => U("gs-input-container gs-utl-w-full", te.bg, ye.b, ye.rnd, te.br, e === "m" && et.xy, e === "s" && "gs-utl-px-3 gs-utl-py-1"),
        Za = ({
                  className: e,
                  style: t,
                  row: n
              }) => ({
            className: U(e, "gs-utl-w-full", n && `${Sw}--row gs-utl-flex gs-utl-gap-2 gs-utl-items-center`),
            style: t
        }), Ja = e => {
            const {
                as: t,
                size: n = "m",
                label: r,
                description: o,
                hasClear: i,
                onChange: l,
                tip: c,
                row: d,
                afterLabel: p,
                afterLabelButtons: g
            } = e, m = !!r, v = !!o, b = i != null && i(e) ? () => l == null ? void 0 : l("") : void 0;
            if (!m && !(g != null && g.length) && !v) return null;
            const x = u.jsx(u.Fragment, {
                children: m && u.jsx(Ur, {
                    as: t,
                    size: n,
                    tip: v ? void 0 : c,
                    onClear: b,
                    children: r
                })
            }), w = p || g != null && g.length ? u.jsxs(K, {
                gap: "s",
                items: "center",
                justify: "between",
                nowrap: !0,
                children: [p, g == null ? void 0 : g.map((j, C) => u.jsx(Gd, {...j}, j.id ?? C))]
            }) : null;
            return u.jsxs(K, {
                className: U("gs-label-field-container", d && "gs-utl-whitespace-nowrap"),
                col: !0,
                children: [w ? u.jsxs(K, {
                    gap: "s",
                    items: "center",
                    justify: "between",
                    nowrap: !0,
                    children: [x, w]
                }) : x, v && u.jsx(Ur, {
                    size: n,
                    tip: c,
                    as: "span",
                    className: U(te.txtLowEmphasis),
                    capitalize: !1,
                    children: o
                })]
            })
        }, jt = y.forwardRef(function (t, n) {
            const {
                className: r,
                value: o,
                type: i,
                placeholder: l,
                required: c,
                disabled: d,
                readOnly: p,
                name: g,
                onInput: m,
                onChange: v,
                onBlur: b
            } = t, [x, w] = y.useState(qd(o)), j = Oc(t), C = y.useRef(null);
            y.useImperativeHandle(n, () => C.current, []), y.useEffect(() => {
                w(qd(o))
            }, [o]);
            const _ = (A, $) => {
                v == null || v(A, $)
            }, E = A => {
                const {key: $} = A;
                switch ($) {
                    case"Escape":
                        return w(o);
                    case"Enter":
                        return _(x)
                }
            }, k = () => {
                _(x), b == null || b()
            }, T = A => {
                const $ = A.target.value;
                w($), m == null || m($)
            }, O = Za({...t, className: U(Sw, r)});
            return u.jsxs("div", {
                ...O,
                ref: C,
                children: [u.jsx(Ja, {...t}), u.jsxs(K, {
                    className: bm(t),
                    items: "center",
                    gap: "x2s",
                    children: [t.beforeInput, u.jsx(q, {
                        grow: !0,
                        children: u.jsx("input", {
                            className: j,
                            name: g,
                            value: x,
                            onChange: T,
                            placeholder: l,
                            required: c,
                            onBlur: k,
                            onKeyDown: E,
                            readOnly: p,
                            disabled: d,
                            type: i
                        })
                    }), t.afterInput]
                })]
            })
        }), DN = (e, t) => e.filter(n => n.id === t)[0] || null,
        jw = (e, t) => (e == null ? void 0 : e.id) === (t == null ? void 0 : t.id),
        IN = (e, t) => e.label.toLowerCase().indexOf(t.toLowerCase()) >= 0,
        Cw = se("cursor-default select-none focus:gs-utl-outline-none", "z-20 max-h-full"), xm = {
            strategy: "fixed",
            placement: "bottom",
            modifiers: [{name: "offset", options: {offset: [0, 5]}}, {name: "flip", options: {fallbackPlacements: ["top"]}}]
        };

    function Ew(e) {
        var i;
        const {option: t, active: n, selected: r} = e, o = ((i = e.isSelected) == null ? void 0 : i.call(e)) || !0;
        return u.jsxs(K, {
            items: "center",
            className: se([et.xy, n && hh.bgH]),
            children: [u.jsx(q, {
                className: se("truncate"),
                grow: !0,
                children: t.label
            }), u.jsx(q, {
                className: se("gjs-pl-2"),
                children: jw(t, r) && o && u.jsx(be, {className: se(te.tA), icon: fe.check, size: Ee.s})
            })]
        })
    }

    const VN = "gs-select-field";

    function Ze(e) {
        const {
                value: t,
                onChange: n,
                onBlur: r,
                onFocus: o,
                handlerSelected: i,
                label: l,
                options: c,
                includeEmpty: d,
                className: p,
                search: g,
                open: m,
                caret: v = fe.chevronDown,
                size: b = "m",
                border: x,
                emptyState: w = "- Select an option -",
                name: j,
                required: C,
                disabled: _,
                classNameContainer: E,
                autoFocus: k,
                labelAs: T,
                hideCaret: O
            } = e, [A, $] = y.useState(null), [F, N] = y.useState(null), [z, V] = y.useState(""), {
                styles: X,
                attributes: Z
            } = Xa(A, F, xm), R = typeof g == "object" ? g.onChange : void 0,
            B = [...c].filter(me => g ? R || IN(me, z) : me), Q = g && (typeof g == "object" && g.value || z),
            H = Q && B.length ? B[0] : DN(B, t), I = me => n(me.id), D = {id: null, label: w},
            M = H ? i ? i(H) : H.content || H.label : i ? i(D) : w;
        d && B.unshift(D);
        const W = me => {
            const {value: ae} = me.target, ie = ae.trim();
            switch (me.key) {
                case"Escape":
                    n(null);
                    break;
                case"Enter":
                    n((B.length ? B[0].id : ie) || null);
                    break;
                case" ":
                    La(me);
                    break
            }
        }, ce = U("gs-utl-w-full gs-utl-text-left gs-utl-cursor-pointer gs-utl-block", ye.rnd, lc.focus), ne = () => {
            r == null || r()
        }, ue = Za({...e, className: U(VN, E, "gs-utl-relative", b.includes("s") && "gs-utl-text-xs")});
        return u.jsx(xc, {
            value: H, onChange: I, disabled: _, children: ({open: me}) => u.jsxs("div", {
                ...ue,
                children: [l && u.jsx(xc.Label, {
                    as: T,
                    className: e.classNameLabel,
                    children: u.jsx(Ja, {as: "span", ...e})
                }), j && u.jsx("input", {
                    type: "input",
                    name: j,
                    value: (H == null ? void 0 : H.id) ?? "",
                    onChange: () => {
                    },
                    className: se("gs-utl-w-[1px] gs-utl-h-[1px] gs-utl-opacity-[0.001] gs-utl-absolute"),
                    required: C,
                    disabled: _
                }), u.jsx(xc.Button, {
                    ref: $,
                    className: ce,
                    tabIndex: g ? -1 : void 0,
                    children: g ? u.jsx("input", {
                        autoFocus: k,
                        value: typeof g == "object" && g.value || z,
                        className: U([p, "gs-utl-w-full", ye.rnd, lc.focus, et.xyS]),
                        onChange: ae => {
                            V(ae.target.value), R == null || R(ae.target.value)
                        },
                        onKeyDown: W,
                        onClick: La,
                        onBlur: ne,
                        onFocus: o
                    }) : u.jsx(tr, {
                        border: x,
                        size: b,
                        title: M,
                        icon: O ? {className: "gs-utl-opacity-0 gs-utl-pointer-events-none"} : v,
                        shadow: !1,
                        className: se(p),
                        titleClass: "",
                        disabled: _
                    })
                }), u.jsx(xc.Options, {
                    static: m,
                    className: Cw,
                    ref: N,
                    style: X.popper, ...Z.popper,
                    children: u.jsxs(tr, {
                        padding: !1,
                        className: se("h-full"),
                        style: {minWidth: `${A == null ? void 0 : A.offsetWidth}px`, maxHeight: 200},
                        children: [!B.length && g && g !== !0 && u.jsx("div", {
                            className: se(et.xy),
                            children: g.empty
                        }), B.map((ae, ie) => u.jsx(xc.Option, {
                            value: ae,
                            children: ({active: de, selected: je}) => u.jsxs(K, {
                                items: "center",
                                className: se([ae.className, et.xy, de && hh.bgH]),
                                children: [u.jsx(q, {
                                    className: se("truncate"),
                                    grow: !0,
                                    children: ae.content || ae.label
                                }), u.jsx(q, {
                                    className: se("gjs-pl-2"),
                                    children: jw(ae, H) && !Q && u.jsx(be, {
                                        className: se(te.tA),
                                        icon: fe.check,
                                        size: Ee.s
                                    })
                                })]
                            })
                        }, ie))]
                    })
                })]
            })
        })
    }

    const Pw = Io() && document.body, wm = (e = {}) => ({
        ...xm,
        placement: "right-start",
        modifiers: [{name: "offset", options: {offset: e.offset || [0, 5]}}, {
            name: "flip",
            options: {boundary: e.boundary ?? Pw}
        }, {name: "preventOverflow", options: {boundary: e.boundary ?? Pw}}]
    }), _w = wm(), Yd = "gs-ctx-menu-list", kw = xe(function ({open: t, items: n, x: r, y: o, w: i, h: l}) {
        const c = ym(), [d, p] = y.useState(), [g, m] = y.useState(null),
            v = y.useMemo(() => ({getBoundingClientRect: () => new DOMRect(r, o, i, l)}), [r, o, i, l, t]), {
                styles: b,
                attributes: x
            } = Xa(v, g, _w), w = U(`${Yd}-wrp gs-utl-z-20`), j = U(`${Yd} gs-utl-z-20`),
            C = U(`${Yd}-body gs-utl-max-w-56`), _ = U(`${Yd}-item`), E = "gs-utl-max-w-40", k = T => {
                const {action: O, onClick: A} = T;
                if (O || A) return $ => {
                    const F = {editor: c.store.appEditorStore.editor, ...$};
                    St(O) ? (O(F), c.hide()) : St(A) && (A(F), c.hide())
                }
            };
        return u.jsx("div", {
            className: w,
            ref: m,
            style: b.popper, ...x.popper,
            children: u.jsx(zo, {
                show: !!t, ...ac,
                unmount: !1,
                children: u.jsx(tr, {
                    padding: !1,
                    className: j,
                    classNameBody: C,
                    children: n.map((T, O) => y.createElement(Tc, {
                        ...T,
                        key: T.id ?? O,
                        className: _,
                        classNameLabel: E,
                        action: k(T),
                        onActive: () => p(T),
                        active: d === T
                    }))
                })
            })
        })
    }), Sm = "gs-cmp-tooltip";

    function mn({
                    className: e,
                    classNameWrp: t,
                    classNameContent: n,
                    children: r,
                    title: o,
                    onClick: i,
                    inline: l,
                    size: c
                }) {
        const [d, p] = y.useState(!1), [g, m] = y.useState(!1),
            v = kn(c), [b, x] = y.useState(null), [w, j] = y.useState(null),
            C = Xa(b, w, {...wm(), placement: "bottom"});
        y.useEffect(() => {
            var k;
            d && ((k = C.update) == null || k.call(C))
        }, [d, C.update]), y.useEffect(() => {
            const k = setTimeout(() => p(g), 10);
            return () => clearTimeout(k)
        }, [g]);
        const _ = U(`${Sm}-target`, !l && "gs-utl-block", e, !i && "gs-utl-cursor-auto"),
            E = U(`${Sm}-content`, n, "gs-utl-fixed gs-utl-z-30 gs-utl-text-sm", !v && !n && "gs-utl-whitespace-nowrap", c === "s" && "gs-utl-w-60");
        return u.jsxs("div", {
            className: U(Sm, "gs-utl-relative", t),
            children: [u.jsx("span", {
                ref: x,
                className: _,
                onMouseEnter: () => o && m(!0),
                onMouseLeave: () => m(!1),
                children: u.jsx("div", {
                    className: U(l && "gs-utl-inline-block"), onClick: () => {
                        m(!1), i == null || i()
                    }, children: r
                })
            }), !!g && u.jsx("div", {
                className: E,
                ref: j,
                style: C.styles.popper, ...C.attributes.popper,
                children: u.jsx(zo, {
                    show: !!d,
                    unmount: !1, ...gh,
                    children: u.jsx(tr, {className: Qb.txt, bg: Qb.bg, size: "s", border: !1, children: o})
                })
            })]
        })
    }

    function Xt({children: e, title: t, classNameWrp: n, ...r}) {
        return u.jsx(mn, {title: t, classNameWrp: n, children: u.jsx(at, {...r, children: e})})
    }

    var Nn = (e => (e.Info = "info", e.Error = "error", e.Success = "success", e.Warning = "warning", e))(Nn || {});
    const HN = {
        [Nn.Info]: te.bgA,
        [Nn.Error]: "bg-red-500",
        [Nn.Success]: "bg-green-500",
        [Nn.Warning]: "bg-orange-400"
    }, FN = ee.forwardRef(function (t, n) {
        const r = {
            [Nn.Info]: fe.informationVariant,
            [Nn.Error]: fe.fire,
            [Nn.Success]: fe.checkBold,
            [Nn.Warning]: fe.alertRhombus
        }, {
            children: o,
            className: i,
            content: l,
            id: c,
            buttons: d = [],
            variant: p = Nn.Info,
            autoHideTimeout: g = 3e3
        } = t, m = y.useRef(null), v = y.useRef(), b = r[p], x = HN[p];
        y.useImperativeHandle(n, () => m.current, []);
        const w = () => {
            var E;
            return (E = t.onDismiss) == null ? void 0 : E.call(t, c)
        }, j = () => {
            g && (v.current = setTimeout(w, g))
        }, C = () => v.current && clearTimeout(v.current);
        y.useEffect(() => (j(), C), []);
        const _ = l || o;
        return u.jsx(tr, {
            className: pe(i, "overflow-hidden relative"),
            ref: m,
            onPointerEnter: C,
            onPointerLeave: j,
            children: u.jsxs(K, {
                space: "m",
                items: "center",
                className: pe(et.y),
                children: [u.jsx(q, {
                    className: pe(x, ye.pill, "text-white gjs-p-1"),
                    children: u.jsx(be, {icon: b, size: Ee.s})
                }), u.jsx(q, {
                    grow: !0,
                    className: pe("gjs-pr-3"),
                    children: u.jsxs(K, {
                        col: !0,
                        space: "xs",
                        children: [u.jsx(q, {
                            className: pe("text-lg font-medium leading-6"),
                            children: t.header
                        }), _ && u.jsx(q, {
                            className: pe(te.txtLowEmphasis),
                            children: _
                        }), !!d.length && u.jsx(K, {
                            space: "m",
                            justify: "end",
                            children: d.map(({id: E, ...k}) => u.jsx(at, {...k}, E))
                        })]
                    })
                }), u.jsx(q, {
                    className: pe("absolute top-1 right-1"),
                    children: u.jsx(Xt, {onClick: w, border: !1, children: u.jsx(be, {icon: fe.close, size: Ee.s})})
                })]
            })
        })
    }), zN = xe(ee.forwardRef(function ({className: t, toasts: n, onDismiss: r, ...o}, i) {
        const l = Qk({});
        return u.jsx("div", {
            className: pe(t, "w-80 gs-utl-z-30"), ...o,
            ref: l,
            children: n.map(c => u.jsx(FN, {...c, className: pe("gjs-mb-2"), onDismiss: r}, c.uuid || c.id))
        })
    }));
    var Xd = (e => (e.self = "self", e.cloud = "cloud", e))(Xd || {}),
        Qs = (e => (e.image = "image", e.video = "video", e))(Qs || {}),
        Wr = (e => (e.componentOutline = "componentOutline", e.preview = "preview", e.fullscreen = "fullscreen", e.showCode = "showCode", e.showImportCode = "showImportCode", e.clearCanvas = "clearCanvas", e.store = "store", e.undo = "undo", e.redo = "redo", e))(Wr || {}),
        $n = (e => (e.variable = "data-variable", e.condition = "data-condition", e.conditionTrue = "data-condition-true-content", e.conditionFalse = "data-condition-false-content", e.collection = "data-collection", e.collectionItem = "data-collection-item", e))($n || {}),
        Tw = (e => (e.text = "text", e.number = "number", e.color = "color", e.selectFont = "selectFont", e.select = "select", e.radio = "radio", e))(Tw || {}),
        Yi = (e => (e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e))(Yi || {}),
        Xi = (e => (e.popover = "popover", e.absolute = "absolute", e.static = "static", e.dialog = "dialog", e))(Xi || {}),
        Xe = (e => (e.web = "web", e.email = "email", e.document = "document", e.react = "react", e))(Xe || {}),
        nr = (e => (e.components = "Components", e.rte = "Rich Text Editor", e.canvas = "Canvas", e.layout = "Layout", e.assetProviders = "Asset Providers", e))(nr || {}),
        Gr = (e => (e.dark = "dark", e.light = "light", e.auto = "auto", e))(Gr || {}),
        Zd = (e => (e.browser = "browser", e.self = "self", e.cloud = "cloud", e))(Zd || {});
    const jm = () => {
            const {baseApiUrl: e} = iu();
            return `${e}/assets/sdk`
        }, BN = e => `${jm()}/${e}`, UN = async (e, t, n) => {
            const r = await Mo.get(jm(), {
                params: {}
            });
            return ((r == null ? void 0 : r.result) ?? []).map(({asset: o, cdnUrl: i}) => ({
                ...o,
                size: parseInt(o.size),
                src: i
            }))
        }, WN = async (e, t, n, r) => {
            const o = await Mo.post(jm(), {
                body: JSON.stringify({fileMetadata: e, projectId: n, identityId: r}),
                params: {}
            });
            return o == null ? void 0 : o.result
        }, GN = async (e, t) => await Mo.put(t, {body: e, rawText: !0}),
        KN = async (e, t, n, r) => Promise.all(e.map(o => WN({
            name: o.name,
            size: o.size,
            type: o.type
        }, t, n, r).then(async i => {
            if (!i) throw new Error("No asset");
            const {asset: l, cdnUrl: c, uploadUrl: d} = i, p = await GN(o, d);
            if (p instanceof Error) throw console.error(p), new Error("Upload failed");
            return {...l, size: parseInt(l.size), src: c, type: Qs.image}
        }))), qN = async (e, t, n, r) => {
            const o = await Mo.delete(BN(e), {
                body: JSON.stringify({projectId: n, identityId: r}),
                params: {}
            });
            return o == null ? void 0 : o.result
        }, Ow = async (e, t, n, r) => Promise.all(e.map(o => qN(o.id || o.src, t, n, r)));

    function xs(e, t, n) {
        let r, o, i, l, c;
        const d = t === void 0 ? 100 : t;

        function p() {
            const m = Date.now() - l;
            m < d && m >= 0 ? r = setTimeout(p, d - m) : (r = null, n || (c = e.apply(i, o), i = o = null))
        }

        const g = function () {
            i = this, o = arguments, l = Date.now();
            const m = n && !r;
            return r || (r = setTimeout(p, d)), m && (c = e.apply(i, o), i = o = null), c
        };
        return g.clear = function () {
            r && (clearTimeout(r), r = null)
        }, g.flush = function () {
            r && (c = e.apply(i, o), i = o = null, clearTimeout(r), r = null)
        }, g
    }

    const Lc = e => e.replaceAll('"', "").replaceAll("'", ""),
        Zi = e => e.includes(",") ? e : /\s/.test(e) ? `'${Lc(e)}'` : Lc(e),
        Lw = (e, t, n) => ({family: e, variant: t, ...n}), Mc = (e, t) => {
            e = Zi(e);
            const {menuVariant: n, variants: r} = t;
            return {
                family: e,
                familyLabel: Lc(e),
                menuVariant: n && Lw(Zi(`menuFont-${Lc(e)}`), "regular", n),
                variants: Object.assign({}, ...Object.entries(r).map(([o, i]) => ({[o]: Lw(e, o, i)})))
            }
        }, Cm = (e, t) => {
            var c;
            const n = Mc(e.family, e), r = n.menuVariant ?? ((c = Object.values(n.variants)) == null ? void 0 : c[0]);
            if (!r) return "Arial, Helvetica, sans-serif";
            const {source: o, descriptors: i} = r, l = Lc(r.family);
            if (!t) {
                const d = new FontFace(l, `url("${o}")`, i),
                    p = Array.from(document.fonts.values()).filter(g => g.family === l);
                for (const g of p) document.fonts.delete(g);
                document.fonts.add(d), d.load().catch(() => {
                })
            }
            return Zi(l)
        }, Go = ", sans-serif",
        Mw = ["Arial, Helvetica" + Go, "Arial Black, Gadget" + Go, "Brush Script MT" + Go, "Comic Sans MS, cursive" + Go, "Courier New, Courier, monospace", "Georgia, serif", "Helvetica" + Go, "Impact, Charcoal" + Go, "Lucida Sans Unicode, Lucida Grande" + Go, "Tahoma, Geneva" + Go, "Times New Roman, Times, serif", "Trebuchet MS, Helvetica" + Go, "Verdana, Geneva" + Go].map(e => ({
            id: e,
            label: e.split(",")[0]
        })), YN = String.raw, ws = (e, t) => {
            if (!t) return "";
            const n = e[0], r = e[1];
            return `${n}${t}${r}`
        }, XN = ({family: e, source: t, descriptors: n}) => {
            const {
                    display: r,
                    ascentOverride: o,
                    descentOverride: i,
                    featureSettings: l,
                    lineGapOverride: c,
                    stretch: d,
                    style: p,
                    unicodeRange: g,
                    weight: m
                } = n ?? {},
                v = [ws`font-ascent-override: ${o};`, ws`font-display: ${r};`, ws`font-descent-override: ${i};`, ws`font-feature-settings: ${l};`, ws`font-line-gap-override: ${c};`, ws`font-stretch: ${d};`, ws`font-style: ${p};`, ws`font-unicode-range: ${g};`, ws`font-weight: ${m};`].filter(Boolean);
            return YN`
    @font-face {
      font-family: ${e};
      src: url('${t}');
      ${v.join(`
`)}
    }
  `
        }, Aw = (e = {}) => {
            const t = Object.entries(e).map(([r, o]) => Mc(r, o));
            let n = "";
            for (const r of t) for (const o of Object.values(r.variants)) n += XN(o) + `
`;
            return n.trim()
        }, Em = "data-project-fonts", Pm = "true", ZN = `${Em}="${Pm}"`, Rw = (e = {}) => {
            const t = Aw(e);
            return t ? `<style ${ZN}>
${t}
</style>` : ""
        }, JN = e => e.sort((t, n) => t.familyLabel < n.familyLabel ? -1 : t.familyLabel > n.familyLabel ? 1 : 0),
        QN = e => e.sort((t, n) => t.id < n.id ? -1 : t.id > n.id ? 1 : 0), Nw = e => !!e.id,
        Qa = e => t => (t.tagName || "").toLowerCase() === e,
        Ko = (...e) => e.map(t => `[data-gjs-type="${t}"]`).join(","), e6 = (e, ...t) => {
            var n;
            return t.indexOf((n = e == null ? void 0 : e.tagName) == null ? void 0 : n.toUpperCase()) >= 0
        }, el = (e, ...t) => {
            var n;
            return !!e && t.indexOf((n = e.tagName) == null ? void 0 : n.toLowerCase()) >= 0
        }, ei = (e, t) => {
            var n;
            return (n = e == null ? void 0 : e.classList) == null ? void 0 : n.contains(t)
        }, Ac = (e, t) => {
            var n;
            return !!((n = e == null ? void 0 : e.hasAttribute) != null && n.call(e, t))
        }, Rc = (e, t) => {
            const n = e.Blocks.get(t);
            return n ? n.collection.indexOf(n) : -1
        }, t6 = e => e.replace(/[^a-z0-9.]/gi, "_").toLowerCase(), _m = (e, t, n = "html") => {
            const {Pages: r} = e, o = rr({page: t, key: "slug"}) ?? "";
            return `${r.getMain() === t ? "index" : Qg(o || t.getName())}.${n}`
        }, n6 = (e, t) => {
            const {toolbar: n} = e;
            n.some(o => o.id === t.id) || (n.unshift(t), e.set("toolbar", [...n]))
        }, Jd = "custom-html-body", Qd = "data-custom-html-body", $w = "data-global-custom-html-head",
        Dw = "data-global-custom-html-body", Iw = "global", r6 = function (e, t) {
            const n = o => {
                if (!o) return e.em.logError("loadGlobalHead: document not found");
                const i = Tm(t.appStore);
                let l = o.querySelector(`[${$w}]`);
                l || (l = o.createElement("div"), l.setAttribute($w, "true"), o.head.insertBefore(l, o.head.firstChild));
                const c = Rw(i.fonts), d = i.customCodeHead, p = [c, d].filter(g => !!g).join(`
`);
                l.innerHTML = p, Mb(l)
            }, r = o => {
                if (!o) return e.em.logError("loadGlobalBody: document not found");
                const i = Tm(t.appStore);
                let l = o.querySelector(`[${Dw}]`);
                if (!l) {
                    l = o.createElement("div"), l.setAttribute(Dw, "true");
                    const c = o.querySelector('[data-gjs-type="wrapper"]');
                    c == null || c.appendChild(l)
                }
                l.innerHTML = i.customCodeBody || "", Mb(l)
            };
            e.on(e.Canvas.events.frameLoad, o => {
                var i;
                return n((i = o.el.contentWindow) == null ? void 0 : i.document)
            }), e.on(e.Canvas.events.frameLoadBody, o => {
                var i;
                return r((i = o.el.contentWindow) == null ? void 0 : i.document)
            }), e.on(Jn.pageSettingsUpdate, o => {
                var l, c;
                if (o.page) return;
                const i = (c = (l = e.Canvas.getFrames()[0]) == null ? void 0 : l.view) == null ? void 0 : c.getDoc();
                n(i), r(i)
            }), e.Components.addType(Jd, {
                isComponent: o => Ac(o, Qd),
                model: {defaults: {attributes: {[Qd]: !0}, locked: !0, layerable: !1}, toHTML: () => ""}
            }), e.on(e.events.projectLoad, () => {
                const {appStore: o} = t, {globalPageSettings: i} = o.projectDataCustom;
                let l = (i == null ? void 0 : i.customCodeHead) || "", c = (i == null ? void 0 : i.customCodeBody) || "";
                e.Pages.getAll().forEach(d => {
                    const p = d.getMainComponent(), g = p.head.components(), m = [];
                    g.forEach(x => {
                        x.has(Iw) && m.push(x)
                    }), m.forEach(x => {
                        const w = x.toHTML();
                        l.includes(w) || (l += w), x.remove()
                    });
                    const v = [];
                    p.findType(Jd).forEach(x => {
                        x.has(Iw) && v.push(x)
                    }), v.forEach(x => {
                        const w = x.getInnerHTML();
                        c.includes(w) || (c += w), x.remove()
                    })
                }), (l || c) && o.setProjectDataCustom({globalPageSettings: {...i, customCodeHead: l, customCodeBody: c}})
            })
        }, Vw = e => {
            const t = e.getDirtyCount() || 0;
            e.em.set({changesCount: t + 1}, {})
        }, km = e => !!e.getSymbolOverride() ? u.jsx(be, {
            icon: fe.rhombusOutline,
            size: Ee.s3x
        }) : u.jsx(ph, {className: U("gs-cmp-svg-icon gs-utl-w-[16px] gs-utl-fill-current"), svg: e.getIcon()}), Hw = e => {
            e.getModel().set({changesCount: e.getDirtyCount() + 1})
        }, o6 = e => e && e === e.em.Pages.getMain(), Rt = {
            title: ({cmp: e}) => e.tagName === "title", favicon: ({cmp: e}) => {
                var t;
                return e.tagName === "link" && ((t = e.attributes.attributes) == null ? void 0 : t.rel) === "icon"
            }, description: ({cmp: e}) => {
                var t;
                return e.tagName === "meta" && ((t = e.attributes.attributes) == null ? void 0 : t.name) === "description"
            }, keywords: ({cmp: e}) => {
                var t;
                return e.tagName === "meta" && ((t = e.attributes.attributes) == null ? void 0 : t.name) === "keywords"
            }, socialTitle: ({cmp: e}) => {
                var t;
                return e.tagName === "meta" && ((t = e.attributes.attributes) == null ? void 0 : t.property) === "og:title"
            }, socialImage: ({cmp: e}) => {
                var t;
                return e.tagName === "meta" && ((t = e.attributes.attributes) == null ? void 0 : t.property) === "og:image"
            }, socialDescription: ({cmp: e}) => {
                var t;
                return e.tagName === "meta" && ((t = e.attributes.attributes) == null ? void 0 : t.property) === "og:description"
            }, charset: ({cmp: e}) => {
                var t;
                return e.tagName === "meta" && ((t = e.attributes.attributes) == null ? void 0 : t.charset)
            }, viewport: ({cmp: e}) => {
                var t;
                return e.tagName === "meta" && ((t = e.attributes.attributes) == null ? void 0 : t.name) === "viewport"
            }, robots: ({cmp: e}) => {
                var t;
                return e.tagName === "meta" && ((t = e.attributes.attributes) == null ? void 0 : t.name) === "robots"
            }, generator: ({cmp: e}) => {
                var t;
                return e.tagName === "meta" && ((t = e.attributes.attributes) == null ? void 0 : t.name) === "generator"
            }
        }, Fw = e => {
            for (const t in Rt) {
                const n = t;
                if (Rt[n]({cmp: e})) return n
            }
        }, zw = (e, t, n) => {
            const r = [];
            let o = n;
            return e.getMainComponent().findType(Jd).forEach(i => {
                r.push(i), o = (o || "") + i.getInnerHTML()
            }), {components: r, html: o, changed: o !== t}
        }, s6 = (e, t) => {
            const n = {...t}, r = e.getMainComponent(), {head: o} = r;
            if (o) {
                const l = [], c = o.components();
                c.forEach(p => {
                    Rt.title({cmp: p}) ? (p.components(t.title), delete n.title) : Rt.favicon({cmp: p}) ? (p.addAttributes({href: t.favicon}), delete n.favicon) : Rt.description({cmp: p}) ? (p.addAttributes({content: t.description}), delete n.description) : Rt.keywords({cmp: p}) ? (p.addAttributes({content: t.keywords}), delete n.keywords) : Rt.socialTitle({cmp: p}) ? (p.addAttributes({content: t.socialTitle}), delete n.socialTitle) : Rt.socialDescription({cmp: p}) ? (p.addAttributes({content: t.socialDescription}), delete n.socialDescription) : Rt.socialImage({cmp: p}) ? (p.addAttributes({content: t.socialImage}), delete n.socialImage) : Fw(p) || l.push(p)
                });
                const d = e.em.Parser.parseHtml(`<!DOCTYPE html><html><head>${t.customCodeHead}</head></html>`);
                d.head && (c.remove(l), d.head.components && c.add(d.head.components), delete n.customCodeHead)
            }
            const i = zw(e, n.customCodeBody);
            if (i.changed) {
                const [l, ...c] = i.components;
                (l || r.append({type: Jd})[0]).components(n.customCodeBody), c.forEach(p => p.remove()), delete n.customCodeBody
            }
            return e.set("settings", n)
        }, i6 = e => {
            const t = {...e.get("settings") ?? {}}, n = e.getMainComponent(), {head: r} = n;
            if (r) {
                const o = [];
                r.components().forEach(i => {
                    const {content: l, href: c} = i.getAttributes({noClass: !0, noStyle: !0});
                    Rt.title({cmp: i}) ? t.title = i.getInnerHTML() : Rt.favicon({cmp: i}) ? t.favicon = c : Rt.description({cmp: i}) ? t.description = l : Rt.keywords({cmp: i}) ? t.keywords = l : Rt.socialTitle({cmp: i}) ? t.socialTitle = l : Rt.socialDescription({cmp: i}) ? t.socialDescription = l : Rt.socialImage({cmp: i}) ? t.socialImage = l : Fw(i) || o.push(i.toHTML())
                }), o.length && (t.customCodeHead = o.join(`
`))
            }
            return t.customCodeBody = zw(e, t.customCodeBody).html, t
        }, a6 = (e, t) => {
            e.getModel().set("customData", {...tl(e), ...t})
        }, tl = e => e.getModel().get("customData") ?? {},
        Tm = e => (e == null ? void 0 : e.projectDataCustom.globalPageSettings) ?? {}, rr = e => {
            const {page: t, key: n, appEditorStore: r, def: o, defPage: i} = e;
            return t ? i6(t)[n] ?? i : Tm(r)[n] ?? o
        }, ti = (e, t) => {
            const n = e.em.getEditor(), o = tl(n).globalPageSettings || {};
            return rr({page: e, key: t}) || o[t]
        }, Bw = (e, t) => {
            const n = (e == null ? void 0 : e.getName()) ?? "", r = {page: e, appEditorStore: t, def: "", pageDef: ""};
            return {
                name: n,
                slug: rr({...r, key: "slug", defPage: Qg(n)}),
                title: rr({...r, key: "title", defPage: n}),
                description: rr({...r, key: "description"}),
                favicon: rr({...r, key: "favicon"}),
                keywords: rr({...r, key: "keywords"}),
                socialTitle: rr({...r, key: "socialTitle", defPage: n}),
                socialImage: rr({...r, key: "socialImage"}),
                socialDescription: rr({...r, key: "socialDescription"}),
                customCodeHead: rr({...r, key: "customCodeHead"}),
                customCodeBody: rr({...r, key: "customCodeBody"})
            }
        }, Uw = (e, t) => {
            var n;
            return (n = e.Styles.getSectors().find(r => !!r.getProperty(t))) == null ? void 0 : n.getProperty(t)
        }, l6 = (e, t, n) => {
            const r = Uw(e, t);
            return r == null ? void 0 : r.getProperty(n)
        };

    class Ww {
        constructor(t, n) {
            this.assetsStore = t, this.layoutPanelId = n, this.itemLayout = void 0, this.isLoadingAssets = !1, this.typeFilter = void 0, this.searchValue = "", this.customTypes = void 0, this.customProviders = void 0, this.providerFilter = void 0, this.customAssetProps = void 0, this.customPages = void 0, this.totalItems = void 0, this.optionalType = !1, this.optionalProvider = !0, Bn(this, {}, {autoBind: !0}), this.initTypeFilter(), this.initProviderFilter(), this.initOptionalType(), this.loadAssetsDebounced = xs(this.loadAssets, this.searchDebounceMs)
        }

        get typeFilterOptions() {
            return this.customTypes ?? []
        }

        get providers() {
            return this.assetsStore.allProviders.map(t => ({...t, types: Array.isArray(t.types) ? t.types : [t.types]}))
        }

        get providerFilterOptions() {
            return this.providers.filter(t => (!this.typeFilter || t.types.includes(this.typeFilter)) && (!this.customProviders || this.customProviders.includes(t.id)))
        }

        get provider() {
            return this.providers.find(t => t.id === this.providerFilter)
        }

        get assetPropsFromPages() {
            if (!this.customPages) return;
            const t = [];
            for (const n of this.customPages) t.push(...n.items);
            return t
        }

        get assetProps() {
            if (!!!this.assetPropsFromPages && this.isLoadingAssets) return [];
            const n = this.customAssetProps ?? this.assetPropsFromPages ?? this.assetsStore.projectAssetProps ?? [];
            return this.typeFilter ? n.filter(r => r.type === this.typeFilter) : n
        }

        get onProviderOrProjectDelete() {
            const {provider: t, assetsStore: n} = this;
            return t ? t.onDelete : n.onProjectDelete
        }

        get t() {
            return this.assetsStore.t
        }

        get isLoading() {
            return this.assetsStore.isLoadingAssets || this.isLoadingAssets
        }

        get handleDelete() {
            return this.onProviderOrProjectDelete && this.handleDeleteCallback
        }

        get shouldLoadNextPage() {
            var n;
            const t = (n = this.customPages) == null ? void 0 : n.at(-1);
            return t ? !t.isLastPage : !1
        }

        get reloadOnInput() {
            var t, n;
            return ((n = (t = this.provider) == null ? void 0 : t.search) == null ? void 0 : n.reloadOnInput) ?? !1
        }

        get searchDebounceMs() {
            var t, n;
            return ((n = (t = this.provider) == null ? void 0 : t.search) == null ? void 0 : n.debounceMs) ?? 1e3
        }

        initOptionalType() {
            this.setOptionalType(!1)
        }

        initOptionalProvider() {
            this.setOptionalProvider(!1)
        }

        initTypeFilter() {
            this.setTypeFilter(Qs.image)
        }

        initProviderFilter() {
            var t;
            this.setProviderFilter((t = this.assetsStore.sdkAssetConfig) == null ? void 0 : t.providerId)
        }

        setOptionalType(t) {
            this.optionalType = t
        }

        setOptionalProvider(t) {
            this.optionalProvider = t
        }

        setTypeFilter(t) {
            this.typeFilter = t
        }

        setProviderFilter(t) {
            this.providerFilter = t
        }

        setSearchValue(t) {
            this.searchValue = t, this.reloadOnInput && this.loadAssetsDebounced()
        }

        setCustomTypes(t) {
            this.customTypes = t
        }

        setCustomProviders(t) {
            this.customProviders = t
        }

        setCustomAssetProps(t) {
            this.customAssetProps = t
        }

        setCustomPages(t) {
            this.customPages = t
        }

        setItemLayout(t) {
            this.itemLayout = t
        }

        setIsLoadingAssets(t) {
            this.isLoadingAssets = t
        }

        selectProjectAssets() {
            this.setCustomAssetProps(void 0), this.setCustomPages(void 0), this.setItemLayout(void 0)
        }

        async loadProviderAssets(t) {
            var c, d, p, g;
            const {assetsStore: n} = this, {editor: r} = n;
            if (!r || !this.provider) return;
            t && (this.setCustomAssetProps(void 0), this.setCustomPages(void 0));
            const o = ((c = this.customPages) == null ? void 0 : c.length) ?? 0,
                i = (p = (d = this.customPages) == null ? void 0 : d.at(-1)) == null ? void 0 : p.nextPageCustomData,
                l = await this.provider.onLoad({
                    editor: r,
                    assetTypeFilter: this.typeFilter,
                    pageIndex: o,
                    searchValue: this.searchValue,
                    pageCustomData: i
                }) ?? [];
            if (Array.isArray(l)) {
                const m = l.map(n.toAssetProps);
                this.setCustomAssetProps(m)
            } else {
                const m = {...l, items: l.items.map(n.toAssetProps)};
                this.setCustomPages([...this.customPages ?? [], m])
            }
            this.setItemLayout((g = this.provider) == null ? void 0 : g.itemLayout)
        }

        async loadAssets(t = !0) {
            const {assetsStore: n} = this, {toastStore: r} = n.store;
            try {
                this.provider ? (this.setIsLoadingAssets(!0), await this.loadProviderAssets(t)) : this.selectProjectAssets()
            } catch (o) {
                console.error(o), r.addError("assets-error-get", this.t("errorLoad"))
            } finally {
                this.setIsLoadingAssets(!1)
            }
        }

        async reloadAssets(t) {
            const {assetsStore: n} = this, {cachedOnLoadAssetProps: r} = n;
            await this.loadAssets(t == null ? void 0 : t.clearExisting), !this.provider && r && (n.cachedOnLoadAssetProps = void 0, await n.loadProjectAssets())
        }

        async handleDeleteCallback(t) {
            const {assetsStore: n, onProviderOrProjectDelete: r} = this, {appEditorStore: o} = n.store, {editor: i} = o;
            if (!(!i || !r)) try {
                n.setIsLoadingAssets(!0), await r({
                    assets: [n.toAsset(t)],
                    assetProps: [t],
                    editor: i,
                    loadAssets: l => this.reloadAssets(l)
                })
            } catch (l) {
                console.error(l), n.store.toastStore.addError("assets-error-delete", {
                    header: this.t("errorDelete"),
                    content: l == null ? void 0 : l.message
                })
            } finally {
                n.setIsLoadingAssets(!1)
            }
        }
    }

    const Gw = e => On().assetsStore.assetPanelStores[e];

    class c6 {
        constructor(t) {
            this.store = t, this.isLoadingAssets = !1, this.mainPanelId = `main-${Nb()}`, this.assetPanelStores = {}, this.cachedOnLoadAssetProps = void 0, this.projectAssetProps = void 0, this.allProviders = [], this.assetPanelStores[this.mainPanelId] = new Ww(this, this.mainPanelId), this.setAllProviders(this.isUsingAssetCloud ? [this.userProvider] : []), Bn(this, {}, {autoBind: !0})
        }

        get sdkAssetConfig() {
            return this.store.appEditorStore.sdkOptions.assets
        }

        get isUsingAssetCloud() {
            var t;
            return ((t = this.sdkAssetConfig) == null ? void 0 : t.storageType) === Xd.cloud
        }

        get storageType() {
            var t;
            return (t = this.sdkAssetConfig) == null ? void 0 : t.storageType
        }

        get isSelfStorage() {
            return this.storageType === Xd.self
        }

        get editor() {
            return this.store.appEditorStore.editor
        }

        get customOnLoad() {
            var t;
            return (t = this.sdkAssetConfig) == null ? void 0 : t.onLoad
        }

        get customOnDelete() {
            var t;
            return (t = this.sdkAssetConfig) == null ? void 0 : t.onDelete
        }

        get customOnUpload() {
            var t;
            return (t = this.sdkAssetConfig) == null ? void 0 : t.onUpload
        }

        get onCloudOrCustomUpload() {
            const {appEditorStore: t} = this.store, {sdkProps: n} = t, o = n.options.licenseKey, i = t.sdkProjectId,
                l = t.sdkIdentityId, c = ({files: d}) => KN(d, o, i, l);
            return this.isUsingAssetCloud ? c : this.customOnUpload
        }

        get onProjectDelete() {
            const {customOnDelete: t, isSelfStorage: n, isUsingAssetCloud: r} = this;
            return n ? t ? async o => {
                await t(o), this.deleteFromProjectAssets(o)
            } : void 0 : r ? async o => {
                var d, p;
                const {sdkOptions: i} = this.store.appEditorStore, l = (d = i.project) == null ? void 0 : d.id,
                    c = (p = i.identity) == null ? void 0 : p.id;
                await Ow(o.assetProps, i.licenseKey, l, c), this.deleteFromProjectAssets(o)
            } : this.deleteFromProjectAssets
        }

        get t() {
            return this.store.i18nStore.tScoped("assetManager")
        }

        get userProvider() {
            var c, d;
            const {appEditorStore: t} = this.store, {sdkOptions: n} = t, r = (c = n.project) == null ? void 0 : c.id,
                o = (d = n.identity) == null ? void 0 : d.id, i = n.licenseKey;
            return {
                id: "grapesjs-user-provider",
                label: () => this.t("userAssets"),
                types: Qs.image,
                onLoad: () => UN(i, r, o),
                onDelete: async p => {
                    const {assetProps: g, loadAssets: m} = p;
                    await Ow(g, i, r, o), this.deleteFromProjectAssets(p), await m({clearExisting: !1})
                }
            }
        }

        onEditor() {
            const t = xs(() => !this.loadProjectAssets()), n = this.store.appEditorStore.editor;
            this.addSdkProviders();
            const r = n.Assets.events.all;
            n.on(r, t), this.loadProjectAssets()
        }

        addSdkProviders() {
            var r;
            const t = ((r = this.sdkAssetConfig) == null ? void 0 : r.providers) ?? [],
                n = St(t) ? t({providers: Bs(this.allProviders)}) : [...this.allProviders, ...t];
            this.setAllProviders(n)
        }

        addProvider(t, n = this.allProviders.length) {
            const r = [...this.allProviders];
            let o = this.allProviders.findIndex(l => l.id === t.id);
            const i = o !== -1;
            r.splice(n, 0, t), i && (o >= n && (o += 1), r.splice(o, 1)), this.setAllProviders(r)
        }

        hasType(t) {
            return !!this.allProviders.find(n => zt(n.types) ? n.types === t : n.types.includes(t))
        }

        createAssetManager(t) {
            const n = new Ww(this, t);
            this.assetPanelStores[t] = n
        }

        removeAssetManager(t) {
            delete this.assetPanelStores[t]
        }

        async loadProjectAssets() {
            const {
                editor: t,
                isSelfStorage: n,
                cachedOnLoadAssetProps: r,
                customOnLoad: o
            } = this, {toastStore: i} = this.store;
            let l;
            if (t) {
                try {
                    if (this.setIsLoadingAssets(!0), n && o) if (r) l = r; else {
                        const c = await o({editor: t});
                        this.cachedOnLoadAssetProps = c.map(this.toAssetProps), l = this.cachedOnLoadAssetProps
                    } else l = t.Assets.getAll().map(this.toAssetProps)
                } catch (c) {
                    console.error(c), i.addError("assets-error-load", {
                        header: this.t("errorLoad"),
                        content: c == null ? void 0 : c.message
                    })
                } finally {
                    this.setIsLoadingAssets(!1)
                }
                l && this.setProjectAssetProps(l)
            }
        }

        deleteFromProjectAssets({assets: t, editor: n, assetProps: r}) {
            const {cachedOnLoadAssetProps: o, customOnLoad: i} = this;
            if (i) {
                if (o) {
                    const l = r.map(c => c.id);
                    this.cachedOnLoadAssetProps = o.filter(({id: c}) => !l.includes(c)), this.setProjectAssetProps(this.cachedOnLoadAssetProps)
                }
            } else t.forEach(l => n.Assets.remove(l)), Vw(n)
        }

        addToProjectAssets(t) {
            const n = this.store.appEditorStore.editor, {cachedOnLoadAssetProps: r, customOnLoad: o} = this;
            o ? r && (this.cachedOnLoadAssetProps = [...t, ...r], this.setProjectAssetProps(this.cachedOnLoadAssetProps)) : (n.Assets.add(t), Vw(n))
        }

        async handleUpload(t) {
            var i, l;
            const {editor: n, onCloudOrCustomUpload: r} = this, {toastStore: o} = this.store;
            if (!(!n || !r)) try {
                this.setIsLoadingAssets(!0);
                const c = ((i = t.dataTransfer) == null ? void 0 : i.files) || ((l = t.target) == null ? void 0 : l.files) || [],
                    d = Array.from(c), p = await r({files: d, editor: n});
                p != null && p.length ? this.addToProjectAssets(p.map(this.toAssetProps)) : console.warn("No assets returned from the upload handler. Ensure to return an array of assets.")
            } catch (c) {
                console.error(c), o.addError("assets-error-upload", {
                    header: this.t("errorUpload"),
                    content: c == null ? void 0 : c.message
                })
            } finally {
                this.setIsLoadingAssets(!1)
            }
        }

        uploadFile(t) {
            var n;
            return (n = this.editor) == null ? void 0 : n.Assets.FileUploader().uploadFile(t)
        }

        isAsset(t) {
            return !!t.getSrc
        }

        toAssetProps(t) {
            if (this.isAsset(t)) {
                const r = t;
                return {
                    ...r.attributes,
                    id: r.attributes.id || r.getSrc(),
                    src: r.getSrc(),
                    name: r.attributes.name ?? r.getFilename(),
                    type: r.attributes.type ?? r.getType() ?? Qs.image,
                    asset: r
                }
            }
            return {...t, type: t.type || Qs.image, id: t.id || t.src}
        }

        toAsset(t) {
            const {editor: n} = this.store.appEditorStore;
            if (n) return t.asset ?? new n.AssetManager.Asset(t)
        }

        setProjectAssetProps(t) {
            this.projectAssetProps = t
        }

        setIsLoadingAssets(t) {
            this.isLoadingAssets = t
        }

        setAllProviders(t) {
            this.allProviders = t
        }
    }

    const Ji = () => On().assetsStore;

    class u6 {
        constructor(t) {
            var r;
            this.store = t, this.fonts = {}, Bn(this, {}, {autoBind: !0});
            const n = (r = this.sdkFontOptions) == null ? void 0 : r.default;
            this.sdkDefaultFonts = St(n) ? n({baseDefault: Mw}) : n
        }

        get staticFonts() {
            return this.sdkDefaultFonts ? this.sdkDefaultFonts.map(t => zt(t) ? {
                id: t,
                label: t
            } : Nw(t) ? t : null).filter(t => !!t) : Mw
        }

        get defaultWebFonts() {
            return this.sdkDefaultFonts ? this.sdkDefaultFonts.filter(n => !zt(n) && !Nw(n)).map(n => Mc(n.family, n)) : []
        }

        get sortedFonts() {
            return JN(Object.values(this.fonts))
        }

        get fontFamilyOptions() {
            const t = n => ({id: n.family, label: n.familyLabel});
            return QN([...this.staticFonts, ...Object.values(this.fonts).map(t)])
        }

        get sdkFontOptions() {
            return this.store.appEditorStore.sdkOptions.fonts
        }

        get enableFontManager() {
            var t;
            return (t = this.sdkFontOptions) == null ? void 0 : t.enableFontManager
        }

        get sdkShowProjectFonts() {
            const {showProjectFonts: t, enableFontManager: n} = this.sdkFontOptions || {};
            return kn(t) ? t : n
        }

        get sdkAddFonts() {
            const {addFonts: t, enableFontManager: n} = this.sdkFontOptions || {};
            return kn(t) ? t : n
        }

        loadFonts() {
            this.loadProjectFonts(), this.loadDefaultFonts()
        }

        loadProjectFonts() {
            const {editor: t} = this.store.appEditorStore;
            if (!t) return;
            const {globalPageSettings: n} = tl(t) ?? {}, {fonts: r} = n ?? {};
            if (r) for (const [o, i] of Object.entries(r)) {
                const l = Mc(o, i);
                this.addFont(l, {skipUpdate: !0})
            }
        }

        loadDefaultFonts() {
            const {editor: t} = this.store.appEditorStore;
            if (t) for (const n of this.defaultWebFonts) this.addFont(n, {overwrite: !1, skipUpdate: !0})
        }

        getFont(t) {
            return t = Zi(t), this.fonts[t]
        }

        addFont(t, {skipUpdate: n, overwrite: r = !0} = {}) {
            const o = Mc(t.family, t), {editor: i} = this.store.appEditorStore;
            if (!i) return;
            const {family: l} = o;
            !r && this.fonts[l] || (this.fonts[l] = o, n || this.updateProjectFonts(i))
        }

        removeFont(t) {
            t = Zi(t);
            const {editor: n} = this.store.appEditorStore;
            n && (delete this.fonts[t], this.updateProjectFonts(n))
        }

        updateProjectFonts(t) {
            const r = {...tl(t).globalPageSettings, fonts: Bs(this.fonts)};
            this.store.appEditorStore.setProjectDataCustom({globalPageSettings: r}), Hw(t), t.trigger(Jn.pageSettingsUpdate, {data: r})
        }
    }

    const Nc = () => On().fontsStore;

    class d6 {
        constructor(t) {
            this.store = t, Bn(this, {}, {autoBind: !0})
        }

        t(t, n = {}) {
            var o;
            const {editor: r} = this.store.appEditorStore;
            return ((o = r == null ? void 0 : r.I18n) == null ? void 0 : o.t(t, n)) || ""
        }

        tScoped(t) {
            return (n, r) => this.t(`${t}.${n}`, r)
        }
    }

    const Ke = () => On().i18nStore, or = (e, t) => y.Children.map(e, n => n && n.type === t ? n : null),
        Kw = "gs-custom-layout",
        f6 = y.forwardRef(function ({className: t, component: n, noWrapper: r, id: o, render: i, ...l}, c) {
            const {editor: d} = Ae(), p = y.useRef(null), g = n, m = g && d ? u.jsx(g, {editor: d}) : null,
                v = U(Kw, o && `${Kw}__${o}`, t), b = r && !i;
            return y.useImperativeHandle(c, () => p.current, []), y.useEffect(() => {
                const x = p.current;
                if (!i || !x) return;
                const w = _ => x.appendChild(_), j = _ => x.removeChild(_), C = i({editor: d, addEl: w, removeEl: j});
                if (zt(C)) x.innerHTML = C; else {
                    if (C instanceof HTMLElement) return w(C), () => {
                        j(C)
                    };
                    if (St(C)) return () => {
                        C()
                    }
                }
            }, [i, d, p.current]), b ? m : u.jsx("div", {className: v, ref: p, ...l, children: m})
        }), Om = xe(f6);

    class p6 {
        constructor(t) {
            this.customConfig = void 0, this.layouts = [], this.layoutsById = new Map, this.store = t, Bn(this, {}, {
                autoBind: !0,
                deep: !1
            })
        }

        get editor() {
            return this.store.appEditorStore.editor
        }

        setCustomConfig(t) {
            this.customConfig = t
        }

        add(t, n) {
            var r;
            this.get(t) || (this.layouts = [...this.layouts, {id: t, ...n}], (r = this.editor) == null || r.trigger(`${Jn.layoutToggleId}${t}`, {isOpen: !0}))
        }

        remove(t, n) {
            var o;
            const r = n == null ? void 0 : n.layout;
            r && this.layouts.forEach(i => {
                i.id === t && Object.assign(i, r)
            }), this.layouts = n != null && n.force ? this.layouts.filter(i => i.id !== t) : this.layouts.map(i => i.id === t ? {
                ...i,
                toRemove: !0
            } : i), (o = this.editor) == null || o.trigger(`${Jn.layoutToggleId}${t}`, {isOpen: !1})
        }

        get(t) {
            return this.layouts.find(n => n.id === t)
        }

        clear() {
            this.layouts = []
        }

        get layoutChildren() {
            var r;
            const {children: t} = this.store.appEditorStore.sdkProps,
                n = ((r = or(t, Om)) == null ? void 0 : r.filter(Boolean)) || [];
            return new Map(n.map(({props: o}) => [o.id, o]))
        }
    }

    const Lm = () => On().layoutStore, g6 = () => $f().layoutStore;

    class h6 {
        constructor(t) {
            this.isActive = !1, this.content = "", this.store = t, Bn(this, {}, {autoBind: !0})
        }

        show(t) {
            this.isActive = !0, this.content = t
        }

        hide() {
            this.isActive = !1, setTimeout(this.clear, 101)
        }

        clear() {
            this.content = ""
        }
    }

    const qw = () => On().pointerBadgeStore;
    var nl = (e => (e.Projects = "projects", e.Settings = "settings", e))(nl || {}),
        Yw = (e => (e.gjs = "gjs", e.gjsStudio = "gjs-studio", e))(Yw || {});
    const Xw = {}, m6 = 1, v6 = (e = {}) => new Promise((t, n) => {
        const r = (e == null ? void 0 : e.db) || "gjs", o = r === "gjs-studio" ? m6 : 1, i = Xw[r];
        if (i) t(i); else {
            if (!Io()) return n(new Error("window context not found"));
            const l = window.indexedDB.open(r, o);
            l.onerror = n, l.onsuccess = () => {
                const c = l.result;
                c.onerror = n, Xw[r] = c, t(c)
            }, l.onupgradeneeded = () => {
                const c = l.result;
                c.objectStoreNames.contains("projects") || c.createObjectStore("projects"), c.objectStoreNames.contains("settings") || c.createObjectStore("settings")
            }
        }
    }), ef = async (e, t) => (await v6(t)).transaction([e], "readwrite").objectStore(e), y6 = async (e, t) => {
        const n = await ef(e, t);
        return new Promise((r, o) => {
            const i = [], l = n.openCursor();
            l.onerror = o, l.onsuccess = function (c) {
                const p = c.target.result;
                if (p) {
                    const g = p.primaryKey, m = p.value;
                    i.push({key: g, data: m}), p.continue()
                } else r(i)
            }
        })
    }, b6 = async (e, t, n) => {
        const r = await ef(e, n);
        return new Promise((o, i) => {
            const l = r.get(t);
            l.onerror = i, l.onsuccess = () => o(l.result)
        })
    }, Zw = async (e, t, n, r) => {
        const o = await ef(e, r);
        return new Promise((i, l) => {
            const c = o.put(n, t);
            c.onerror = l, c.onsuccess = () => i()
        })
    }, x6 = async (e, t, n) => {
        const r = await ef(e, n);
        return new Promise((o, i) => {
            const l = r.delete(t);
            l.onerror = i, l.onsuccess = () => o()
        })
    };
    var $c = (e => (e.Existing = "existing", e.Templates = "templates", e))($c || {});
    const w6 = e => {
        const t = oI();
        return `${(t == null ? void 0 : t.baseApiUrl) || "/api"}/templates/${e}`
    }, S6 = (e, t) => Mo.get(w6(e), {...t}), j6 = async e => {
        try {
            const t = await S6(e);
            return (t == null ? void 0 : t.result) ?? []
        } catch (t) {
            return console.error(`Failed to load templates for type ${e}:`, t), []
        }
    }, Jw = async (e = Xe.web) => typeof window > "u" ? [] : (await y6(nl.Projects)).map(({key: r, data: o}) => {
        var i;
        return {id: `${r}`, name: `${((i = o.custom) == null ? void 0 : i.projectName) || r}`, data: o}
    }).filter(r => {
        var o;
        return ((o = r.data.custom) == null ? void 0 : o.projectType) === e
    });

    class C6 {
        constructor(t) {
            this.store = t, this._projectSourceFilter = $c.Existing, this._loadedProjects = void 0, this._loadedTemplates = void 0, this._projectTypeFilter = t.appEditorStore.projectType, Bn(this, {}, {autoBind: !0})
        }

        get projectTypeFilter() {
            return this._projectTypeFilter
        }

        get projectSourceFilter() {
            return this._projectSourceFilter
        }

        get templates() {
            return this._loadedTemplates
        }

        get projects() {
            return this._loadedProjects
        }

        get filteredTemplates() {
            return this.projectSourceFilter === $c.Existing ? this.projects : this.templates
        }

        async loadProjects() {
            const t = await Jw(this.projectTypeFilter);
            this.setProjects(t)
        }

        async loadTemplates() {
            var o;
            const t = (o = this.store.appEditorStore.sdkOptions.templates) == null ? void 0 : o.onLoad,
                n = async () => await j6(this.projectTypeFilter);
            let r;
            if (t) {
                const i = this.store.appEditorStore.editor;
                r = await t({editor: i, fetchCommunityTemplates: n})
            } else r = await n();
            this.setTemplates(r)
        }

        async loadAllTemplates() {
            await Promise.all([this.loadProjects(), this.loadTemplates()])
        }

        async removeProject(t) {
            x6(nl.Projects, t)
        }

        async setProjectTypeFilter(t) {
            this._projectTypeFilter = t, this.setProjects(void 0), this.setTemplates(void 0)
        }

        setProjectSourceFilter(t) {
            this._projectSourceFilter = t
        }

        setTemplates(t) {
            this._loadedTemplates = t
        }

        setProjects(t) {
            this._loadedProjects = t
        }
    }

    const Qw = () => On().templatesStore;

    class E6 {
        constructor(t) {
            this.toasts = [], this.store = t, Bn(this, {}, {autoBind: !0})
        }

        add(t, n) {
            this.toasts.find(r => r.id === t) || this.toasts.push({id: t, ...n})
        }

        addError(t, n) {
            this.add(t, {...zt(n) ? {header: n} : n, variant: Nn.Error})
        }

        addWarning(t, n) {
            this.add(t, {...zt(n) ? {header: n} : n, variant: Nn.Warning})
        }

        addSuccess(t, n) {
            this.add(t, {...zt(n) ? {header: n} : n, variant: Nn.Success})
        }

        addInfo(t, n) {
            this.add(t, {...zt(n) ? {header: n} : n, variant: Nn.Info})
        }

        remove(t) {
            this.toasts = this.toasts.filter(n => n.id !== t)
        }
    }

    const eS = () => On().toastStore;

    class P6 {
        constructor(t) {
            this.isOpen = !1, this.store = t, Bn(this, {}, {autoBind: !0})
        }

        setOpen(t) {
            this.isOpen = t, this.triggerEvent()
        }

        toggleOpen() {
            this.isOpen = !this.isOpen, this.triggerEvent()
        }

        triggerEvent() {
            var t;
            (t = this.store.appEditorStore.editor) == null || t.trigger(Jn.toggleBlocksPanel, {isOpen: this.isOpen})
        }
    }

    const tS = () => On().blockManagerStore;

    function _6(e) {
        const t = new Map, n = {items: []};
        return e.forEach(o => {
            const {category: i, item: l} = o;
            if (i) {
                const c = t.get(i.id);
                c ? (c.items.push(l), c.category = {...c.category, ...i}) : t.set(i.id, {category: i, items: [l]})
            } else n.items.push(l)
        }), [...Array.from(t).map(([, o]) => o), n].filter(o => o.items.length)
    }

    const k6 = "mjml-code-to-html";

    function nS(e) {
        function t(d) {
            const p = document.createElement("textarea");
            return p.innerHTML = d, p.value
        }

        const n = t(e || ""),
            r = ["checked", "disabled", "readonly", "required", "autofocus", "multiple", "selected", "hidden", "async", "defer", "formnovalidate", "novalidate", "ismap", "allowfullscreen", "autoplay", "controls", "loop", "muted", "open", "reversed", "scoped", "seamless", "typemustmatch", "default", "crossorigin"],
            o = new RegExp(`\\s+(${r.join("|")})(?=\\s|\\/?>)`, "gi");
        return n.replace(/<[^>]+>/g, d => d.replace(o, (p, g) => ` ${g}="${g === "crossorigin" ? "anonymous" : g}"`)).replace(/(\s[\w:-]+=\s*)("[^"]*"|'[^']*')/g, (d, p, g) => {
            const m = g.slice(1, -1).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
            return `${p}"${m}"`
        }).replace(new RegExp("(?<!&)(?:&(?!#?\\w+;))", "g"), "&amp;")
    }

    var Dc = (e => (e.root = "mjml", e.head = "mj-head", e.body = "mj-body", e.include = "mj-include", e))(Dc || {}),
        Mm = (e => (e.attributes = "mj-attributes", e.breakpoint = "mj-breakpoint", e.font = "mj-font", e.htmlAttributes = "mj-html-attributes", e.preview = "mj-preview", e.style = "mj-style", e.title = "mj-title", e.class = "mj-class", e.all = "mj-all", e))(Mm || {}),
        rS = (e => (e.accordion = "mj-accordion", e.accordionElement = "mj-accordion-element", e.accordionTitle = "mj-accordion-title", e.accordionText = "mj-accordion-text", e.button = "mj-button", e.carousel = "mj-carousel", e.carouselImage = "mj-carousel-image", e.column = "mj-column", e.divider = "mj-divider", e.group = "mj-group", e.hero = "mj-hero", e.image = "mj-image", e.navbar = "mj-navbar", e.navbarLink = "mj-navbar-link", e.raw = "mj-raw", e.section = "mj-section", e.social = "mj-social", e.socialElement = "mj-social-element", e.spacer = "mj-spacer", e.table = "mj-table", e.text = "mj-text", e.wrapper = "mj-wrapper", e))(rS || {}),
        Ic = (e => (e.globalStyles = "globalStyles", e.globalData = "globalData", e))(Ic || {});
    const oS = e => e.get("groups") || [], sS = (e, t) => oS(e).includes(t), T6 = (e, t) => {
        sS(e, t) || e.set("groups", [...oS(e), t])
    };

    class O6 {
        constructor(t) {
            this.dataSourceKeyid = Ic.globalStyles, this.records = [], this.openCategories = new Map, this.store = t, Bn(this, {openCategories: !1}, {autoBind: !0})
        }

        get sdkOptionStyles() {
            var t;
            return ((t = this.store.appEditorStore.sdkOptions.globalStyles) == null ? void 0 : t.default) || []
        }

        get editor() {
            return this.store.appEditorStore.editor
        }

        get DataSources() {
            var t;
            return (t = this.editor) == null ? void 0 : t.DataSources
        }

        get recordsByCategory() {
            const {records: t, sdkOptionStyles: n} = this, r = [],
                o = t.reduce((i, l) => (i.set(l.get("id"), l), i), new Map);
            return n.forEach(({id: i}) => {
                const l = o.get(i);
                l && (r.push(l), o.delete(i))
            }), Array.from(o).map(([, i]) => {
                i.get("_internal") || r.push(i)
            }), _6(r.map(i => ({category: i.get("category"), item: i})))
        }

        setCategoryOpen(t, n) {
            this.openCategories.set(t, n)
        }

        getDataSource() {
            var t;
            return (t = this.DataSources) == null ? void 0 : t.get(this.dataSourceKeyid)
        }

        getRuleByGroup(t) {
            var n;
            return (n = this.editor) == null ? void 0 : n.CssComposer.getAll().find(r => sS(r, t))
        }

        addStyleRule(t) {
            const n = t.get("id"), r = t.get("selector") || "", o = t.get("property"), i = t.getPath("value"),
                l = `${this.dataSourceKeyid}:${n}`,
                c = {[o]: {type: "data-variable", path: i, defaultValue: t.get("defaultValue")}}, {editor: d} = this;
            if (d && Rk(d) && r.startsWith("mj-")) {
                const g = d.Components.getWrapper(), {head: m} = Dc, {attributes: v} = Mm, b = g.findFirstType(Dc.root),
                    x = b.findFirstType(m) || b.append({type: m})[0], w = x.findFirstType(v) || x.append({type: v})[0],
                    j = w.findType(r).pop() || w.append({type: r})[0], C = (j.get("attributes") || {})[o];
                kn(C) && C !== "" && t.set("value", C), j.addAttributes(c, {silent: !0});
                return
            }
            const p = this.getRuleByGroup(l);
            if (p) p.addStyle(c); else {
                const g = d == null ? void 0 : d.CssComposer.addCollection([{
                    selectors: [],
                    selectorsAdd: r,
                    style: c
                }], {extend: !0, at: t.index})[0];
                g && T6(g, l)
            }
        }

        createDataSource() {
            return this.DataSources.add({id: this.dataSourceKeyid, records: []})
        }

        onLoad() {
            var r;
            const {sdkOptionStyles: t} = this;
            if (!t.length) {
                this.records = [];
                return
            }
            let n = this.getDataSource();
            n || (n = this.createDataSource()), t.forEach(o => {
                var l, c;
                const i = n.getRecord(o.id);
                if (i) {
                    const d = {label: o.label, field: o.field, category: o.category};
                    i.set({...d, _undo: !0})
                } else {
                    const d = (l = this.editor) == null ? void 0 : l.Css,
                        p = o.defaultValue ?? ((c = d == null ? void 0 : d.getRule(o.selector)) == null ? void 0 : c.getStyle()[o.property]);
                    n.addRecord({value: void 0, ...o, defaultValue: p, _internal: !0, _undo: !0})
                }
            }), n.getRecords().forEach(o => {
                this.addStyleRule(o)
            }), n.listenTo(n.records, "add", o => {
                this.addStyleRule(o)
            }), (r = this.editor) == null || r.UndoManager.add(n.records), this.records = n.getRecords()
        }
    }

    const L6 = () => On().globalStylesStore, iS = (e, t) => {
            let n;
            try {
                const r = Io() && e && localStorage.getItem(e);
                r && (n = JSON.parse(r))
            } catch (r) {
                console.error(r)
            }
            return {lastProjectId: "", ...t, ...n}
        }, aS = (e, t) => {
            const r = {...iS(e), ...t};
            try {
                Io() && e && localStorage.setItem(e, JSON.stringify(r))
            } catch (o) {
                console.error(o)
            }
            return r
        }, Am = "gs-utl-dark", M6 = () => Io() && window.matchMedia("(prefers-color-scheme: dark)").matches,
        lS = e => e === "dark" || e === "auto" && M6(), cS = (e, t) => {
            if (e && Io() && t.rootEl) {
                const {classList: n} = t.rootEl;
                let r = !1;
                if (lS(e) ? (n.add(Am), r = !0) : n.remove(Am), t.updateAppShell) {
                    const o = document.head.querySelector('meta[name="theme-color"]');
                    o && (o.content = r ? "#18181b" : "#ffffff")
                }
                t.resolvedTheme = r ? Gr.dark : Gr.light
            }
        };

    class A6 {
        constructor(t) {
            this.key = "", this.theme = Gr.auto, this.resolvedTheme = Gr.light, this.lastProjectId = "", this.updateAppShell = !1, this.rootEl = void 0, t && Object.keys(t).forEach(n => {
                const r = n, o = t[r];
                o !== void 0 && (this[r] = o)
            }), this.resolvedTheme = this.theme, Bn(this, {}, {autoBind: !0}), this.init()
        }

        init() {
            cS(this.theme, this)
        }

        changeTheme(t) {
            cS(t, this), aS(this.key, {theme: t})
        }

        setTheme(t) {
            this.theme = t
        }

        setRootEl(t) {
            this.rootEl = t
        }

        setLocalState(t) {
            Object.keys(t).forEach(n => {
                const r = n, o = t[r];
                o !== void 0 && (this[r] = o)
            }), aS(this.key, t)
        }

        get isDarkTheme() {
            return lS(this.theme)
        }
    }

    const R6 = e => {
        nb(() => e.theme, t => {
            e.changeTheme(t)
        })
    }, sr = () => On().localSettingsStore;

    class N6 {
        constructor(t) {
            this.isOpen = !1, this.title = "", this.content = "", this.size = "l", this.fullH = !1, this.modalProps = {}, this.buttons = [], this.store = t, Bn(this, {}, {autoBind: !0})
        }

        setModalProps(t) {
            this.modalProps = {title: "", size: "l", fullH: !1, buttons: [], ...t}
        }

        open({content: t, ...n}) {
            this.isOpen = !0, this.content = t, this.setModalProps(n)
        }

        close() {
            this.isOpen = !1, setTimeout(this.clear, 101)
        }

        clear() {
            this.content = "", this.setModalProps({size: this.modalProps.size})
        }

        confirm({content: t, size: n = "m", onConfirm: r, confirmButton: o, ...i}) {
            this.isOpen = !0, this.content = t;
            const l = () => {
                r == null || r(), this.close()
            };
            this.setModalProps({
                ...i,
                size: n,
                buttons: [{children: "Cancel", onClick: this.close, size: "m2"}, {
                    children: "Confirm",
                    onClick: l,
                    size: "m2",
                    variant: "pr", ...o
                }]
            })
        }
    }

    const go = () => On().modalStore, $6 = {
        add: "Add",
        delete: "Delete",
        duplicate: "Duplicate",
        rename: "Rename",
        remove: "Remove",
        clear: "Clear",
        select: "Select",
        selectList: "Select from the list",
        search: "Search",
        update: "Update",
        updated: "Updated!",
        confirm: "Confirm",
        cancel: "Cancel",
        enable: "Enable",
        disable: "Disable",
        upload: "Upload",
        close: "Close",
        load: "Load",
        copy: "Copy",
        save: "Save",
        current: "Current",
        toggleCss: "Toggle CSS",
        selectTarget: "Target Component",
        noCode: "No code available",
        noItems: "No items found",
        confirmAction: "Do you confirm this action?",
        eyeDropper: "Eyedropper",
        noEyeDropper: "Eyedropper not supported",
        unauthorized: "Unauthorized project",
        notItemsFound: "No items found",
        actions: {
            componentOutline: {title: "Component outline"},
            preview: {title: "Preview"},
            fullscreen: {title: "Fullscreen"},
            //showCode: {title: "Code", exportButton: "Export to ZIP"},
            undo: {title: "Undo"},
            redo: {title: "Redo"},
            save: {title: "Save project"},
            store: {title: "Save content"},
            open: {title: "Open project"},
            importCode: {
                title: "Edit code",
                parseError: "Parser error",
                content: "Paste here your HTML/CSS and click Insert",
                button: "Insert"
            },
            //clearCanvas: {title: "Clear page", content: "Are you sure you want to clear the page?"},
            about: {title: "About"},
            embed: {title: "Embed Studio"},
            newProject: {title: "Load project"},
            installApp: {title: "Install App", installed: "App installed"}
        },
        modals: {
            styleCatalog: {title: "Style Catalog", noStyles: "No styles found"},
            openProject: {title: "Open project"}
        },
        pluginManager: {
            plugins: "Plugins",
            all: "Available",
            installed: "Installed",
            install: "Install",
            uninstall: "Uninstall",
            allPlugins: "All plugins",
            updateStudio: "Restart Studio for plugin updates"
        },
        globalStyleManager: {notFound: "No global styles found"},
        pageManager: {
            pages: "Pages",
            page: "Page",
            newPage: "New Page",
            add: "Add page",
            rename: "Rename",
            duplicate: "Duplicate",
            copy: "Copy",
            delete: "Delete",
            deletePage: "Delete Page",
            confirmDelete: "Are you sure you want to delete the page?",
            settings: {
                label: "Settings", title: "Page settings", global: "Global settings", fields: {
                    name: {label: "Name"},
                    slug: {
                        label: "Slug",
                        description: "The slug is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens."
                    },
                    favicon: {
                        label: "Favicon",
                        description: "The favicon is the small icon that appears in the browser tab."
                    },
                    title: {
                        label: "Title",
                        description: "The title is the name of the page that appears in the browser tab."
                    },
                    description: {
                        label: "Description",
                        description: "The description is a short summary of the page content."
                    },
                    keywords: {
                        label: "Keywords",
                        description: "Keywords are words or phrases that describe the content of the page."
                    },
                    socialTitle: {
                        label: "Social title",
                        description: "The title is the name of the page that appears on social networks."
                    },
                    socialImage: {
                        label: "Social image",
                        description: "The image is the picture that appears on social networks."
                    },
                    socialDescription: {
                        label: "Social description",
                        description: "The description is a short summary of the page content that appears on social networks."
                    },
                    customCodeHead: {
                        label: "Custom HTML head",
                        description: "Add any custom HTML (e.g., meta tags, stylesheets, scripts) to be included in the <head> section of the page."
                    },
                    customCodeBody: {
                        label: "Custom HTML body",
                        description: "Add any custom HTML (e.g., scripts, tracking codes) to be included just before the closing </body> tag."
                    }
                }
            }
        },
        projectManager: {
            existentProjects: "Your projects",
            templates: "Templates",
            notAvailable: "No projects available",
            projectType: "Project type",
            projectName: "Project name",
            pages: "Pages"
        },
        templates: {notFound: "No templates found"},
        storageManager: {errorLoad: "Failed to load the project", errorStore: "Failed to save the project"},
        assetManager: {
            addUrl: "Add URL",
            projectAssets: "Assets in this project",
            userAssets: "Assets from all projects",
            errorLoad: "Failed to load assets",
            errorUpload: "Failed to upload",
            errorDelete: "Failed to delete",
            deleteConfirmQuestion: "Delete asset?",
            deleteConfirmExplanation: "This will affect existing and published projects that rely on this asset, if any exist.",
            assetTypes: {all: "All", image: "Images"},
            noProvider: "Project assets"
        },
        fontManager: {
            addFontToProject: "Add font to project",
            projectFonts: "Project fonts",
            emptyProjectFonts: "There are no fonts in this project.",
            selectFont: "Select a font"
        },
        blockManager: {
            notFound: "No blocks found",
            blocks: "Blocks",
            add: "Add more blocks",
            search: "Search...",
            labels: {
                section: "Section",
                column1: "1 Column",
                column2: "2 Columns",
                column3: "3 Columns",
                "column3-7": "2 Columns 3/7",
                gridRow: "Grid",
                heading: "Heading",
                divider: "Divider",
                imageBox: "Image Box",
                linkBox: "Link Box"
            },
            categories: {},
            types: {regular: "Regular", symbols: "Symbols"},
            symbols: {
                notFound: "No symbols found",
                instancesProject: "Instance/s in the project",
                delete: "Delete symbol",
                deleteConfirm: "Are you sure you want to delete the symbol? All instances inside the project will be detached."
            }
        },
        domComponents: {
            names: {
                section: "Section",
                gridRow: "Row",
                gridColumn: "Column",
                heading: "Heading",
                divider: "Divider",
                imageBox: "Image Box",
                linkBox: "Link Box"
            }
        },
        traitManager: {
            empty: "Select a component to see its properties",
            panelLabel: "Properties",
            traits: {
                labels: {
                    loading: "Lazy load",
                    target: "Open in new tab",
                    showList: "Show element list",
                    customAttributes: "Custom Attributes"
                }, attributes: {}
            }
        },
        deviceManager: {allDevices: "All devices"},
        selectorManager: {
            noSelecton: "You don't have any selected element.",
            selectFromCanvas: "Select an element from the canvas.",
            selectFromList: "Pick any style from the Style Catalog.",
            selectCustom: "Add your custom style selector.",
            selection: "Selection",
            selector: "Selector",
            addNewSelector: "Add new selector",
            removeSelector: "Remove selector",
            target: "Target",
            device: "Device",
            state: "State",
            deleteStyle: "Delete style",
            showCSS: "Show CSS code",
            searchStyle: "Search style",
            applyOnSelector: "Apply style changes on Selectors",
            noSelectors: "No Selectors applied",
            applyOnComponents: "Apply style changes on Components",
            noComponents: "No Components selected",
            currentSelection: "The current selection from which styles are displayed of"
        },
        layerManager: {layers: "Layers"},
        dataSources: {
            confirm: "Confirm",
            clearDataValue: "Clear data value",
            connectDataValue: "Connect data value",
            variable: "Variable",
            defaultValue: "Default value",
            variablePath: "Variable path",
            selectVariablePath: "Select variable path",
            openPathExplorer: "Open path explorer",
            closePathExplorer: "Close path explorer",
            toggleResolvedPath: "Toggle resolved path",
            items: "{length} item/s",
            properties: "{length} propertie/s",
            editVariable: "Edit variable",
            editCondition: "Edit condition",
            editCollection: "Edit collection",
            condition: "Condition",
            conditionTrue: "True condition",
            conditionFalse: "False condition",
            conditionAnd: "AND",
            conditionOr: "OR",
            conditionElse: "Else",
            addCondition: "Add condition",
            deleteCondition: "Delete condition",
            operator: "Operator",
            leftValue: "Left value",
            rightValue: "Right value",
            ifTrue: "Value if true",
            ifFalse: "Value if false",
            valueTrue: "True",
            valueFalse: "False",
            collection: "Collection",
            collectionItem: "Collection item",
            collectionId: "Collection ID",
            collectionStartIndex: "Start index",
            collectionEndIndex: "End index",
            collectionUpToEndIndex: "All",
            operators: {
                "=": "= (Equals)",
                "!=": "!= (Not equals)",
                ">": "> (Greater than)",
                ">=": ">= (Greater than or equals)",
                "<": "< (Less than)",
                "<=": "<= (Less than or equals)",
                contains: "Contains",
                startsWith: "Starts with",
                endsWith: "Ends with",
                matchesRegex: "Matches regex",
                equalsIgnoreCase: "Equals (ignore case)",
                trimEquals: "Trimmed equals",
                and: "AND",
                or: "OR",
                xor: "XOR",
                equals: "Equals",
                isDefined: "Is defined",
                isNull: "Is null",
                isUndefined: "Is undefined",
                isTruthy: "Is truthy",
                isFalsy: "Is falsy",
                isDefaultValue: "Is default value",
                isArray: "Is array",
                isObject: "Is object",
                isString: "Is string",
                isNumber: "Is number",
                isBoolean: "Is boolean"
            }
        },
        styleManager: {
            panelLabel: "Styles",
            layout: {
                flexChild: "Flex child",
                display: {
                    tips: {
                        block: "Block generates a block element box, generating line breaks both before and after the element when in the normal flow.",
                        inline: "Inline generates one or more inline element boxes that do not generate line breaks. The inline is generally default for text content.",
                        "inline-block": "Inline-block is similar to inline but allows to define width and height properties.",
                        flex: "Flex behaves like a block element and lays out its child elements on a vertical/horizontal axis",
                        none: "The element is hidden from the layout"
                    }
                },
                direction: {
                    title: {
                        row: "Horizontal",
                        "row-reverse": "Horizontal reversed",
                        column: "Vertical",
                        "column-reverse": "Vertical reversed"
                    }
                }
            },
            position: {
                tips: {
                    static: "Default position",
                    relative: "Similar to Static but with the ability to be moved relative to itself",
                    absolute: "Absolute position, relative to its closest non-static parent",
                    fixed: "Fixed position (even when the page is scrolled), relative to the browser viewport",
                    sticky: "Elements are keept in place but moved when the page is scrolled, based on indicated distance"
                },
                presets: {
                    title: "Presets",
                    options: {
                        topLeft: "Top left",
                        topRight: "Top right",
                        bottomLeft: "Bottom left",
                        bottomRight: "Bottom right",
                        left: "Left",
                        right: "Right",
                        bottom: "Bottom",
                        top: "Top",
                        full: "Full"
                    }
                }
            },
            properties: {
                "margin-top": "Top",
                "margin-right": "Right",
                "margin-bottom": "Bottom",
                "margin-left": "Left",
                "padding-top": "Top",
                "padding-right": "Right",
                "padding-bottom": "Bottom",
                "padding-left": "Left",
                "border-top-left-radius": "Top Left",
                "border-top-right-radius": "Top Right",
                "border-bottom-right-radius": "Bottom Right",
                "border-bottom-left-radius": "Bottom Left",
                "mix-blend-mode": "Blend mode",
                "transform-style": "Type",
                "backface-visibility": "Backface",
                "perspective-origin": "Perspective origin",
                "perspective-origin-x": "Left",
                "perspective-origin-y": "Top",
                "transform-origin-x": "Left",
                "transform-origin-y": "Top",
                "align-items": "Align",
                "align-self": "Align",
                "justify-content": "Justify",
                "row-gap": "Row",
                "column-gap": "Column",
                "font-family": "Font",
                "font-size": "Size",
                "font-weight": "Weight",
                "letter-spacing": "Spacing",
                "text-align": "Align",
                "text-decoration": "Decoration",
                "text-transform": "Transform",
                "white-space": "Breaking",
                "border-top-width": "Top",
                "border-right-width": "Right",
                "border-bottom-width": "Bottom",
                "border-left-width": "Left",
                "border-top-style": "Top",
                "border-right-style": "Right",
                "border-bottom-style": "Bottom",
                "border-left-style": "Left",
                "border-top-color": "Top",
                "border-right-color": "Right",
                "border-bottom-color": "Bottom",
                "border-left-color": "Left",
                "background-position": "Position",
                "background-position-x": "Left",
                "background-position-y": "Top",
                "background-size": "Size",
                "background-size-x": "Left",
                "background-size-y": "Top",
                "background-repeat": "Repeat",
                "background-attachment": "Attachment",
                "background-origin": "Origin",
                "background-clip": "Clip",
                "overflow-x": "X",
                "overflow-y": "Y"
            },
            options: {
                "__background-type": {image: "Image", gradient: "Gradient", color: "Color"},
                display: {block: "Block", inline: "Inline", "inline-block": "Inline block", flex: "Flex", none: "None"},
                overflow: {visible: "Visible", hidden: "Hidden", scroll: "Scroll", auto: "Auto"},
                "flex-wrap": {nowrap: "No wrap", wrap: "Wrap", "wrap-reverse": "Reverse wrap"}
            }
        }
    }, uS = "column1", dS = "column2", fS = "column3", Rm = "column3-7", D6 = function (e, t = {}) {
        const {Components: n, Blocks: r} = e, o = "gridRow", i = "gridColumn", l = "gjs-grid-row",
            c = "gjs-grid-column", d = {tl: 0, tc: 0, tr: 0, cl: 0, bl: 0, br: 0}, p = "flex-basis", g = 1, m = 1,
            v = 1;
        n.addType(o, {
            isComponent: j => ei(j, l), model: {
                defaults: {
                    emptyState: !0,
                    droppable: Ko(i),
                    highlightable: !1,
                    attributes: {class: l},
                    resizable: {...d, keyHeight: "min-height"},
                    icon: `
            <svg viewBox="0 0 24 24">
              <path d="M22 14c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2v-4c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2v4M4 14h4v-4H4v4m6 0h4v-4h-4v4m6 0h4v-4h-4v4z"></path>
            </svg>
          `,
                    "stylable-require": ["flex-align-items", "flex-align-items-v", "flex-direction-id", "flex-multiline"],
                    traits: ["id", "title", {
                        name: "add-column",
                        labelButton: "Add column",
                        type: "button",
                        full: !0,
                        command: j => {
                            j.getSelected().components().add({type: i})
                        }
                    }],
                    styles: `
            .${l} {
              display: flex;
              justify-content: flex-start;
              align-items: stretch;
              flex-direction: row;
              min-height: auto;
              padding: 10px 0;
            }
            @media (max-width: 992px) {
              .${l} {
                flex-direction: column;
              }
            }
          `
                }
            }
        }), n.addType(i, {
            isComponent: j => ei(j, c), model: {
                defaults: {
                    emptyState: !0,
                    attributes: {class: c},
                    draggable: Ko(o),
                    resizable: {...d, bc: 0, keyWidth: p, currentUnit: v, minDim: g, step: m},
                    icon: `
            <svg viewBox="0 0 24 24">
              <path d="M8 2h8c1.1 0 2 .9 2 2v16c0 1.1-.9 2-2 2H8c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2m0 8v4h8v-4H8m0 6v4h8v-4H8M8 4v4h8V4H8z"></path>
            </svg>
          `,
                    unstylable: ["width"],
                    "stylable-require": ["flex-basis", "flex-item-behaviour", "flex-item-h-align", "flex-order"],
                    traits: [{label: "Center content", name: "center-content", type: "checkbox", changeProp: !0}],
                    styles: `
            .${c} {
              flex: 1 1 0%;
              padding: 5px 0;
            }
          `
                }, init() {
                    this.listenTo(this, "change:center-content", this.handleCenter)
                }, handleCenter() {
                    const j = this.get("center-content");
                    this.addStyle({
                        display: j ? "flex" : "block",
                        "align-items": j ? "center" : "",
                        "justify-content": j ? "center" : ""
                    })
                }
            }
        });
        const b = {label: o, content: {type: o, components: [{type: i}, {type: i}, {type: i}]}, ...t.block},
            x = {merge: !0}, w = j => {
                var C;
                return ((C = r.get(j)) == null ? void 0 : C.category) || b.category
            };
        r.add(uS, {...b, category: w(uS), content: {type: o, components: [{type: i}]}}, x), r.add(dS, {
            ...b,
            category: w(dS),
            content: {type: o, components: [{type: i}, {type: i}]}
        }, x), r.add(fS, {
            ...b,
            category: w(fS),
            content: {type: o, components: [{type: i}, {type: i}, {type: i}]}
        }, x), r.add(Rm, {
            ...b,
            category: w(Rm),
            content: {type: o, components: [{type: i, style: {"flex-basis": "30%", "flex-grow": 0}}, {type: i}]}
        }, x)
    }, Vc = "section", Nm = "container", $m = "gjs-section", Dm = "gjs-container", I6 = function (e, t = {}) {
        const {Components: n, Blocks: r} = e;
        r.add(Vc, {
            label: Vc, media: `
        <svg viewBox="0 0 24 24">
          <path fill="currentColor" d="M21 18H2V20H21V18M19 10V14H4V10H19M20 8H3C2.45 8 2 8.45 2 9V15C2 15.55 2.45 16 3 16H20C20.55 16 21 15.55 21 15V9C21 8.45 20.55 8 20 8M21 4H2V6H21V4Z" />
        </svg>
      `, content: {type: Vc}, ...t.block
        }, {at: Rc(e, Rm) + 1}), n.addType(Vc, {
            isComponent: o => ei(o, $m), model: {
                defaults: {
                    tagName: "section",
                    emptyState: !0,
                    draggable: Ko("wrapper"),
                    droppable: Ko(Nm),
                    attributes: {class: $m},
                    components: {type: Nm},
                    styles: `
            .${$m} {
              display: flex;
              padding: 50px 0;
            }
          `
                }
            }
        }), n.addType(Nm, {
            isComponent: o => ei(o, Dm), model: {
                defaults: {
                    emptyState: !0, copyable: !1, removable: !1, draggable: !1, attributes: {class: Dm}, styles: `
            .${Dm} {
              width: 90%;
              margin: 0 auto;
              max-width: 1200px;
            }
          `
                }
            }
        })
    }, V6 = function (e, t = {}) {
        const {Components: n, Blocks: r} = e, o = "divider", i = "gjs-divider";
        r.add(o, {
            label: o, media: `
        <svg viewBox="0 0 24 24">
          <path d="M8,18H11V15H2V13H22V15H13V18H16L12,22L8,18M12,2L8,6H11V9H2V11H22V9H13V6H16L12,2Z" />
        </svg>
      `, content: {type: o}, ...t.block
        }, {at: Rc(e, Vc) + 1}), n.addType(o, {
            isComponent: l => ei(l, i), model: {
                defaults: {
                    droppable: !1,
                    highlightable: !1,
                    attributes: {class: i},
                    stylable: ["height", "width", "background-color", "margin", "margin-top", "margin-right", "margin-bottom", "margin-left"],
                    styles: `
            .${i} {
              height: 3px;
              width: 100%;
              margin: 10px;
              background-color: rgba(0, 0, 0, 0.05);
            }
          `
                }
            }
        })
    }, pS = "page://", H6 = function (e) {
        const {Components: t, Blocks: n} = e, o = t.getType("wrapper").model.getDefaults(), i = t.getType("head").model;
        t.addType("wrapper", {
            model: {
                defaults: {
                    emptyState: {styleIn: "height: 100vh", styleOut: "padding: 0;"},
                    stylable: [...o.stylable, "padding", "font-family", "color", "font-size", "font-weight", "line-height", "letter-spacing", "text-align", "vertical-align", "text-decoration", "text-transform", "direction", "white-space"]
                }
            }
        }), t.addType("head", {
            model: {
                components(p, g) {
                    return i.prototype.components.call(this, p, {...g, skipDomReset: !0})
                }
            }, view: {
                updateContent() {
                }
            }
        }), t.addType("text", {
            model: {
                defaults: {
                    highlightable: !1,
                    emptyState: {styleIn: "min-height: auto; font-size: inherit;"}
                }
            }
        }), t.addType("image", {
            model: {
                defaults: {
                    traits: [{
                        type: "image",
                        name: "src",
                        label: "Image",
                        typeProps: {inputField: !0}
                    }, "alt", {type: "checkbox", name: "loading", valueTrue: "lazy"}]
                }
            }
        });
        const c = t.getType("link").model;
        t.addType("link", {
            model: {
                defaults: {
                    emptyState: !0,
                    traits: ["title", {type: "checkbox", name: "target", valueTrue: "_blank"}, {
                        type: "href",
                        name: "href"
                    }]
                }, getAttrToHTML() {
                    const p = c.prototype.getAttrToHTML.apply(this), {href: g} = p;
                    if (g && g.indexOf(pS) === 0) {
                        const m = g.replace(pS, ""), v = e.Pages.get(m);
                        p.href = v ? `./${_m(e, v)}` : "##"
                    }
                    return p
                }
            }
        }), n.add("link", {
            label: "Link",
            content: {type: "link", content: "Link", style: {color: "#d983a6", padding: "10px"}}
        }, {merge: !0}), t.addType("select", {
            model: {
                defaults: {
                    traits: [{name: "name"}, {
                        type: "checkbox",
                        name: "required"
                    }, {
                        name: "options", type: "stack", getValue({component: p}) {
                            return p.components().map(g => ({
                                id: g.getAttributes().value || "",
                                label: g.getInnerHTML()
                            }))
                        }, setValue: ({component: p, value: g, emitUpdate: m}) => {
                            p.components(g.map(v => ({
                                type: "option",
                                content: v.label,
                                attributes: {value: v.id}
                            }))), m()
                        }, properties: [{name: "id"}, {name: "label"}]
                    }]
                }
            }
        });
        const d = "contentEditable";
        t.addType(d, {
            extend: "text",
            model: {
                defaults: {name: "Content", tagName: "span", hoverable: !1, draggable: !1, selectable: !1},
                toHTML(p) {
                    return this.getInnerHTML(p)
                }
            }
        }), t.addType("button", {
            model: {
                defaults: {
                    components: [{
                        type: d,
                        components: {type: "textnode", content: "Button"}
                    }],
                    traits: [{
                        type: "select",
                        name: "type",
                        options: [{id: "button", label: "Button"}, {id: "submit", label: "Submit"}, {
                            id: "reset",
                            label: "Reset"
                        }]
                    }]
                }, init() {
                    var g;
                    const p = [...this.components().models];
                    (p.length > 1 || !((g = p[0]) != null && g.is(d))) && this.append({type: d})[0].append(p)
                }
            }
        })
    }, F6 = function (e, t = {}) {
        const {Components: n, Blocks: r} = e, o = "heading";
        r.add(o, {
            label: o, media: `
        <svg viewBox="0 0 24 24">
          <path d="M8.3 11.5h7.4V6.9l-.2-1.6a1 1 0 00-.5-.5c-.3-.2-.7-.3-1-.3h-.6v-.4h6.8v.4h-.6c-.4 0-.7.1-1 .3a1 1 0 00-.6.6L18 6.9v10.3c0 .8 0 1.3.2 1.6 0 .2.2.3.4.5.4.2.7.3 1.1.3h.6v.4h-6.8v-.4h.5c.7 0 1.2-.2 1.5-.6.2-.3.3-.9.3-1.8v-4.9H8.3v4.9l.1 1.6.5.5c.3.2.7.3 1 .3h.7v.4H3.7v-.4h.6c.7 0 1.1-.2 1.4-.6.2-.3.3-.9.3-1.8V6.9L6 5.3a1 1 0 00-.5-.5l-1-.3h-.7v-.4h6.9v.4H10c-.4 0-.8.1-1 .3a1 1 0 00-.6.6l-.1 1.5v4.6z"></path>
        </svg>
      `, content: {type: o, components: "Insert your text here"}, ...t.block
        }, {at: Rc(e, "text")}), n.addType(o, {
            extend: "text",
            isComponent: i => e6(i, "H1", "H2", "H3", "H4", "H5", "H6"),
            model: {
                defaults: {
                    emptyState: !0,
                    tagName: "h1",
                    traits: [{
                        type: "select",
                        options: [{value: "h1", name: "One (largest)"}, {value: "h2", name: "Two"}, {
                            value: "h3",
                            name: "Three"
                        }, {value: "h4", name: "Four"}, {value: "h5", name: "Five"}, {
                            value: "h6",
                            name: "Six (smallest)"
                        }],
                        label: "Size",
                        name: "tagName",
                        changeProp: !0
                    }]
                }
            }
        })
    }, z6 = function (e, t = {}) {
        const {Components: n, Blocks: r} = e, o = e.Components.getType("default").model, i = "imageBox",
            l = "gjs-image-box";
        r.add(i, {
            label: i, media: `
        <svg viewBox="0 0 24 24">
          <path d="M19,19H5V5H19M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M13.96,12.29L11.21,15.83L9.25,13.47L6.5,17H17.5L13.96,12.29Z" />
        </svg>
      `, content: {type: i}, ...t.block
        }, {at: Rc(e, "image") + 1}), n.addType(i, {
            extend: "image", isComponent: c => ei(c, l), model: {
                defaults: {
                    tagName: "div",
                    void: !1,
                    droppable: !0,
                    emptyState: !1,
                    resizable: {tl: 0, tc: 0, tr: 0, cl: 0, cr: 0, bl: 0, br: 0},
                    traits: ["title"],
                    attributes: {class: l},
                    styles: `
            .${l} {
              height: 200px;
              width: 100%;
            }
          `
                }, getAttrToHTML(...c) {
                    return o.prototype.getAttrToHTML.apply(this, c)
                }
            }, view: {
                tagName: "div", updateSrc() {
                    const {model: c, em: d} = this, p = c.getSrcResult(), g = c.isDefaultSrc(), m = c.getStyle(),
                        v = `url('${p}')`;
                    p && c.addStyle({
                        "background-image": g && m["background-image"] || v,
                        "background-size": m["background-size"] || "contain",
                        "background-position": m["background-position"] || "center center",
                        "background-attachment": m["background-attachment"] || "scroll",
                        "background-repeat": m["background-repeat"] || "no-repeat"
                    }), p && d.trigger("component:toggled"), this.$el[p ? "removeClass" : "addClass"](this.classEmpty)
                }, onRender() {
                    this.renderChildren(), this.updateSrc()
                }
            }
        })
    }, B6 = function (e, t = {}) {
        const {Components: n, Blocks: r} = e, o = "linkBox", i = "gjs-link-box";
        r.add(o, {
            label: o, media: `
        <svg viewBox="0 0 24 24">
          <path d="M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M19,19H5V5H19V19M11,16H10C8.39,16 6,14.94 6,12C6,9.07 8.39,8 10,8H11V10H10C9.54,10 8,10.17 8,12C8,13.9 9.67,14 10,14H11V16M14,16H13V14H14C14.46,14 16,13.83 16,12C16,10.1 14.33,10 14,10H13V8H14C15.61,8 18,9.07 18,12C18,14.94 15.61,16 14,16M15,13H9V11H15V13Z" />
        </svg>
      `, content: {type: o}, ...t.block
        }, {at: Rc(e, "link") + 1}), n.addType(o, {
            isComponent: l => ei(l, i), extend: "link", model: {
                defaults: {
                    editable: !1, droppable: !0, attributes: {class: i}, styles: `
            .${i} {
              color: inherit;
              display: inline-block;
              vertical-align: top;
              padding: 10px;
              max-width: 100%;
              text-decoration: none;
            }
          `
                }
            }
        })
    }, gS = e => {
        const t = (e || "").split(" ");
        let n = t[0], r = t[0], o = t[0], i = t[0];
        return t.length === 4 ? (n = t[0], r = t[1], o = t[2], i = t[3]) : t.length === 3 ? (n = t[0], r = t[1], i = t[1], o = t[2]) : t.length === 2 && (n = t[0], r = t[1], i = t[1], o = t[0]), [n, r, o, i]
    };

    function U6(e) {
        const t = {};
        if (e.padding) {
            const n = e.padding.split(" ");
            let r = n[0], o = n[0], i = n[0], l = n[0];
            n.length === 4 ? (r = n[0], o = n[1], i = n[2], l = n[3]) : n.length === 3 ? (r = n[0], o = n[1], l = n[1], i = n[2]) : n.length === 2 && (r = n[0], o = n[1], l = n[1], i = n[0]), t["padding-top"] = e["padding-top"] || r, t["padding-right"] = e["padding-right"] || o, t["padding-bottom"] = e["padding-bottom"] || i, t["padding-left"] = e["padding-left"] || l, delete e.padding
        }
        return {...e, ...t}
    }

    const W6 = {ratioDefault: !0, tc: !1, cl: !1, cr: !1, bc: !1}, hS = `<svg viewBox="0 0 24 24">
  <path d="M16 9h3l-5 7m-4-7h4l-2 8M5 9h3l2 7m5-12h2l2 3h-3m-5-3h2l1 3h-4M7 4h2L8 7H5m1-5L2 8l10 14L22 8l-4-6H6z"></path>
</svg>`, G6 = function (e, t = {}) {
        const {Components: n, Blocks: r} = e, o = "icon", i = "gjs-icon", l = "data-type-icon";
        r.add(o, {label: "Icon", media: hS, content: {type: o}, ...t.block}), n.addType(o, {
            isComponent: c => ei(c, i) || Ac(c, l), model: {
                defaults: {
                    droppable: !1,
                    attributes: {class: i, [l]: !0},
                    resizable: W6,
                    components: hS,
                    traits: ["id", "title", {
                        type: "code",
                        label: "Content",
                        typeProps: {language: "html", clean: !0, padding: 5},
                        getValue({component: c}) {
                            return c.getInnerHTML()
                        },
                        setValue: xs(({editor: c, component: d, value: p}) => {
                            const g = c.Parser.parseHtml(p).html, m = Array.isArray(g) ? g[0] : g;
                            m && m.tagName === "svg" && d.components(m)
                        }, 500)
                    }],
                    styles: `
            .${i} {
              display: inline-block;
              text-decoration: none;
              color: inherit;
              vertical-align: middle;
              fill: currentColor;
              width: 50px;
              height: 50px;
            }
          `
                }, init() {
                    this.listenTo(this.components(), "change add", this.disableLayers), this.disableLayers()
                }, disableLayers() {
                    this.components().forEach(c => c.set("layerable", !1))
                }
            }, view: {
                init() {
                    const {model: c} = this;
                    this.listenTo(c.components(), "change", this.disableChildren)
                }, onRender() {
                    this.disableChildren()
                }, disableChildren() {
                    this.model.components().forEach(c => {
                        var p;
                        const d = (p = c.view) == null ? void 0 : p.el;
                        d && (d.style.pointerEvents = "none")
                    })
                }
            }
        })
    }, Im = "__nc", K6 = e => {
        const t = e.getAttributes({noClass: !0, noStyle: !0});
        return e.traits.forEach(n => {
            const r = n.getName();
            n.get("changeProp") || delete t[r]
        }), delete t.id, delete t.__p, t
    };

    function q6(e) {
        const {Components: t} = e, n = r => {
            const {model: o, id: i} = r, l = o.getDefaults();
            t.addType(i, {
                model: {
                    defaults: {
                        traits: [...l.traits, {
                            name: "customAttributes",
                            type: "stack",
                            getValue({component: c}) {
                                const d = K6(c);
                                return Object.keys(d).map(g => ({id: g, value: d[g]}))
                            },
                            setValue: ({component: c, value: d, options: p, emitUpdate: g}) => {
                                const m = p.removed, v = p.previous, b = p.item;
                                if (m) c.removeAttributes(m.id); else {
                                    v && b && v.id !== b.id && c.removeAttributes(v.id);
                                    const x = d.reduce((w, j) => (w[j.id] = j.value || "", w), {});
                                    c.addAttributes(x)
                                }
                                g()
                            },
                            addItem: () => ({id: Im, value: !1}),
                            labelItem: c => c.id === Im || !c.id && !c.value ? "- Empty -" : `${c.id || ""}="${c.value || ""}"`,
                            properties: [{
                                name: "id",
                                label: "Name",
                                getValue: c => c === Im ? "" : c,
                                setValue: (c, d) => c.trim().toLowerCase().replace(/^[^a-z]{1}/gi, "_").replace(/\s+/g, "-") || d
                            }, {name: "value", label: "Value", getValue: c => typeof c == "boolean" ? "" : c}]
                        }]
                    }
                }
            })
        };
        t.getTypes().forEach(n)
    }

    const Y6 = "Basic";

    function Vm(e, t) {
        const {appStore: n} = t;
        e.Css.getConfig().onBeforeStyle = U6;
        const r = e.Parser.getConfig().optionsHtml;
        r.htmlType = "text/html";
        const o = n.sdkOptions.pages || {};
        (kn(o.allowDocuments) ? o.allowDocuments : !0) && (r.detectDocument = !0, r.allowScripts = !0), e.Components.addType("trait-check", {
            model: {
                defaults: {
                    traits: ["id", "title", {
                        type: "select",
                        name: "select-type",
                        options: [{id: "value1", label: "Value 1"}, {id: "value2", label: "Value 2"}, {
                            id: "value3",
                            label: "Value 3"
                        }]
                    }, {type: "number", name: "number-type", units: ["px", "rem", "%"]}, {
                        type: "checkbox",
                        name: "checkbox-type"
                    }, {type: "color", name: "color-type"}, {
                        type: "button",
                        name: "button-type",
                        label: "Delete",
                        command: "core:component-delete"
                    }]
                }
            }
        });
        const l = {category: Y6, select: !0, activate: !0};
        r6(e, t), H6(e), D6(e, {block: l}), F6(e, {block: l}), I6(e, {block: l}), V6(e, {block: l}), z6(e, {block: l}), B6(e, {block: l}), G6(e, {block: l}), q6(e)
    }

    function X6(e) {
        const {code: t, appStore: n, showToastError: r} = e, {
                appEditorStore: o,
                toastStore: i,
                i18nStore: l
            } = n.store, {isProjectTypeEmail: c} = o, d = (t || "").trim(), p = new DOMParser,
            g = {input: t, output: "", error: ""};
        let m = "";
        try {
            if (c) {
                const v = nS(d), x = p.parseFromString(`<div>${v}</div>`, "text/xml").querySelector("parsererror div");
                g.error = (x == null ? void 0 : x.textContent) || "", m = v
            } else {
                const v = p.parseFromString(d, "text/html");
                mS(v.documentElement)
            }
        } catch (v) {
            g.error = v.message
        }
        return g.error ? r && i.addError("error-parser", {
            header: l.t("actions.importCode.parseError"),
            content: g.error
        }) : g.output = m || d, g
    }

    function mS(e) {
        if (!e || e.nodeType !== Node.ELEMENT_NODE) return;
        const t = Array.from(e.attributes), n = Array.from(e.children);
        for (const r of t) e.setAttribute(r.name, r.value);
        for (const r of n) mS(r)
    }

    function Z6(e, t, n) {
        return t in e ? Object.defineProperty(e, t, {
            value: n,
            enumerable: !0,
            configurable: !0,
            writable: !0
        }) : e[t] = n, e
    }

    function vS(e, t) {
        var n = Object.keys(e);
        if (Object.getOwnPropertySymbols) {
            var r = Object.getOwnPropertySymbols(e);
            t && (r = r.filter(function (o) {
                return Object.getOwnPropertyDescriptor(e, o).enumerable
            })), n.push.apply(n, r)
        }
        return n
    }

    function yS(e) {
        for (var t = 1; t < arguments.length; t++) {
            var n = arguments[t] != null ? arguments[t] : {};
            t % 2 ? vS(Object(n), !0).forEach(function (r) {
                Z6(e, r, n[r])
            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : vS(Object(n)).forEach(function (r) {
                Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r))
            })
        }
        return e
    }

    function J6(e, t) {
        if (e == null) return {};
        var n = {}, r = Object.keys(e), o, i;
        for (i = 0; i < r.length; i++) o = r[i], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
        return n
    }

    function Q6(e, t) {
        if (e == null) return {};
        var n = J6(e, t), r, o;
        if (Object.getOwnPropertySymbols) {
            var i = Object.getOwnPropertySymbols(e);
            for (o = 0; o < i.length; o++) r = i[o], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r])
        }
        return n
    }

    function e8(e, t) {
        return t8(e) || n8(e, t) || r8(e, t) || o8()
    }

    function t8(e) {
        if (Array.isArray(e)) return e
    }

    function n8(e, t) {
        if (!(typeof Symbol > "u" || !(Symbol.iterator in Object(e)))) {
            var n = [], r = !0, o = !1, i = void 0;
            try {
                for (var l = e[Symbol.iterator](), c; !(r = (c = l.next()).done) && (n.push(c.value), !(t && n.length === t)); r = !0) ;
            } catch (d) {
                o = !0, i = d
            } finally {
                try {
                    !r && l.return != null && l.return()
                } finally {
                    if (o) throw i
                }
            }
            return n
        }
    }

    function r8(e, t) {
        if (e) {
            if (typeof e == "string") return bS(e, t);
            var n = Object.prototype.toString.call(e).slice(8, -1);
            if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
            if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return bS(e, t)
        }
    }

    function bS(e, t) {
        (t == null || t > e.length) && (t = e.length);
        for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n];
        return r
    }

    function o8() {
        throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)
    }

    function s8(e, t, n) {
        return t in e ? Object.defineProperty(e, t, {
            value: n,
            enumerable: !0,
            configurable: !0,
            writable: !0
        }) : e[t] = n, e
    }

    function xS(e, t) {
        var n = Object.keys(e);
        if (Object.getOwnPropertySymbols) {
            var r = Object.getOwnPropertySymbols(e);
            t && (r = r.filter(function (o) {
                return Object.getOwnPropertyDescriptor(e, o).enumerable
            })), n.push.apply(n, r)
        }
        return n
    }

    function wS(e) {
        for (var t = 1; t < arguments.length; t++) {
            var n = arguments[t] != null ? arguments[t] : {};
            t % 2 ? xS(Object(n), !0).forEach(function (r) {
                s8(e, r, n[r])
            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : xS(Object(n)).forEach(function (r) {
                Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r))
            })
        }
        return e
    }

    function i8() {
        for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
        return function (r) {
            return t.reduceRight(function (o, i) {
                return i(o)
            }, r)
        }
    }

    function Hc(e) {
        return function t() {
            for (var n = this, r = arguments.length, o = new Array(r), i = 0; i < r; i++) o[i] = arguments[i];
            return o.length >= e.length ? e.apply(this, o) : function () {
                for (var l = arguments.length, c = new Array(l), d = 0; d < l; d++) c[d] = arguments[d];
                return t.apply(n, [].concat(o, c))
            }
        }
    }

    function tf(e) {
        return {}.toString.call(e).includes("Object")
    }

    function a8(e) {
        return !Object.keys(e).length
    }

    function Fc(e) {
        return typeof e == "function"
    }

    function l8(e, t) {
        return Object.prototype.hasOwnProperty.call(e, t)
    }

    function c8(e, t) {
        return tf(t) || ni("changeType"), Object.keys(t).some(function (n) {
            return !l8(e, n)
        }) && ni("changeField"), t
    }

    function u8(e) {
        Fc(e) || ni("selectorType")
    }

    function d8(e) {
        Fc(e) || tf(e) || ni("handlerType"), tf(e) && Object.values(e).some(function (t) {
            return !Fc(t)
        }) && ni("handlersType")
    }

    function f8(e) {
        e || ni("initialIsRequired"), tf(e) || ni("initialType"), a8(e) && ni("initialContent")
    }

    function p8(e, t) {
        throw new Error(e[t] || e.default)
    }

    var g8 = {
        initialIsRequired: "initial state is required",
        initialType: "initial state should be an object",
        initialContent: "initial state shouldn't be an empty object",
        handlerType: "handler should be an object or a function",
        handlersType: "all handlers should be a functions",
        selectorType: "selector should be a function",
        changeType: "provided value of changes should be an object",
        changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state',
        default: "an unknown error accured in `state-local` package"
    }, ni = Hc(p8)(g8), nf = {changes: c8, selector: u8, handler: d8, initial: f8};

    function h8(e) {
        var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
        nf.initial(e), nf.handler(t);
        var n = {current: e}, r = Hc(y8)(n, t), o = Hc(v8)(n), i = Hc(nf.changes)(e), l = Hc(m8)(n);

        function c() {
            var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function (g) {
                return g
            };
            return nf.selector(p), p(n.current)
        }

        function d(p) {
            i8(r, o, i, l)(p)
        }

        return [c, d]
    }

    function m8(e, t) {
        return Fc(t) ? t(e.current) : t
    }

    function v8(e, t) {
        return e.current = wS(wS({}, e.current), t), t
    }

    function y8(e, t, n) {
        return Fc(t) ? t(e.current) : Object.keys(n).forEach(function (r) {
            var o;
            return (o = t[r]) === null || o === void 0 ? void 0 : o.call(t, e.current[r])
        }), n
    }

    var b8 = {create: h8}, x8 = {paths: {vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};

    function w8(e) {
        return function t() {
            for (var n = this, r = arguments.length, o = new Array(r), i = 0; i < r; i++) o[i] = arguments[i];
            return o.length >= e.length ? e.apply(this, o) : function () {
                for (var l = arguments.length, c = new Array(l), d = 0; d < l; d++) c[d] = arguments[d];
                return t.apply(n, [].concat(o, c))
            }
        }
    }

    function S8(e) {
        return {}.toString.call(e).includes("Object")
    }

    function j8(e) {
        return e || jS("configIsRequired"), S8(e) || jS("configType"), e.urls ? (C8(), {paths: {vs: e.urls.monacoBase}}) : e
    }

    function C8() {
        console.warn(SS.deprecation)
    }

    function E8(e, t) {
        throw new Error(e[t] || e.default)
    }

    var SS = {
        configIsRequired: "the configuration object is required",
        configType: "the configuration object should be an object",
        default: "an unknown error accured in `@monaco-editor/loader` package",
        deprecation: `Deprecation warning!
    You are using deprecated way of configuration.

    Instead of using
      monaco.config({ urls: { monacoBase: '...' } })
    use
      monaco.config({ paths: { vs: '...' } })

    For more please check the link https://github.com/suren-atoyan/monaco-loader#config
  `
    }, jS = w8(E8)(SS), P8 = {config: j8}, _8 = function () {
        for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r];
        return function (o) {
            return n.reduceRight(function (i, l) {
                return l(i)
            }, o)
        }
    };

    function CS(e, t) {
        return Object.keys(t).forEach(function (n) {
            t[n] instanceof Object && e[n] && Object.assign(t[n], CS(e[n], t[n]))
        }), yS(yS({}, e), t)
    }

    var k8 = {type: "cancelation", msg: "operation is manually canceled"};

    function Hm(e) {
        var t = !1, n = new Promise(function (r, o) {
            e.then(function (i) {
                return t ? o(k8) : r(i)
            }), e.catch(o)
        });
        return n.cancel = function () {
            return t = !0
        }, n
    }

    var T8 = b8.create({config: x8, isInitialized: !1, resolve: null, reject: null, monaco: null}), ES = e8(T8, 2),
        zc = ES[0], rf = ES[1];

    function O8(e) {
        var t = P8.config(e), n = t.monaco, r = Q6(t, ["monaco"]);
        rf(function (o) {
            return {config: CS(o.config, r), monaco: n}
        })
    }

    function L8() {
        var e = zc(function (t) {
            var n = t.monaco, r = t.isInitialized, o = t.resolve;
            return {monaco: n, isInitialized: r, resolve: o}
        });
        if (!e.isInitialized) {
            if (rf({isInitialized: !0}), e.monaco) return e.resolve(e.monaco), Hm(Fm);
            if (window.monaco && window.monaco.editor) return PS(window.monaco), e.resolve(window.monaco), Hm(Fm);
            _8(M8, R8)(N8)
        }
        return Hm(Fm)
    }

    function M8(e) {
        return document.body.appendChild(e)
    }

    function A8(e) {
        var t = document.createElement("script");
        return e && (t.src = e), t
    }

    function R8(e) {
        var t = zc(function (r) {
            var o = r.config, i = r.reject;
            return {config: o, reject: i}
        }), n = A8("".concat(t.config.paths.vs, "/loader.js"));
        return n.onload = function () {
            return e()
        }, n.onerror = t.reject, n
    }

    function N8() {
        var e = zc(function (n) {
            var r = n.config, o = n.resolve, i = n.reject;
            return {config: r, resolve: o, reject: i}
        }), t = window.require;
        t.config(e.config), t(["vs/editor/editor.main"], function (n) {
            PS(n), e.resolve(n)
        }, function (n) {
            e.reject(n)
        })
    }

    function PS(e) {
        zc().monaco || rf({monaco: e})
    }

    function $8() {
        return zc(function (e) {
            var t = e.monaco;
            return t
        })
    }

    var Fm = new Promise(function (e, t) {
        return rf({resolve: e, reject: t})
    }), _S = {config: O8, init: L8, __getMonacoInstance: $8}, D8 = {
        wrapper: {display: "flex", position: "relative", textAlign: "initial"},
        fullWidth: {width: "100%"},
        hide: {display: "none"}
    }, zm = D8, I8 = {
        container: {
            display: "flex",
            height: "100%",
            width: "100%",
            justifyContent: "center",
            alignItems: "center"
        }
    }, V8 = I8;

    function H8({children: e}) {
        return ee.createElement("div", {style: V8.container}, e)
    }

    var F8 = H8, z8 = F8;

    function B8({width: e, height: t, isEditorReady: n, loading: r, _ref: o, className: i, wrapperProps: l}) {
        return ee.createElement("section", {
            style: {
                ...zm.wrapper,
                width: e,
                height: t
            }, ...l
        }, !n && ee.createElement(z8, null, r), ee.createElement("div", {
            ref: o,
            style: {...zm.fullWidth, ...!n && zm.hide},
            className: i
        }))
    }

    var U8 = B8, kS = y.memo(U8);

    function W8(e) {
        y.useEffect(e, [])
    }

    var TS = W8;

    function G8(e, t, n = !0) {
        let r = y.useRef(!0);
        y.useEffect(r.current || !n ? () => {
            r.current = !1
        } : e, t)
    }

    var Er = G8;

    function Bc() {
    }

    function rl(e, t, n, r) {
        return K8(e, r) || q8(e, t, n, r)
    }

    function K8(e, t) {
        return e.editor.getModel(OS(e, t))
    }

    function q8(e, t, n, r) {
        return e.editor.createModel(t, n, r ? OS(e, r) : void 0)
    }

    function OS(e, t) {
        return e.Uri.parse(t)
    }

    function Y8({
                    original: e,
                    modified: t,
                    language: n,
                    originalLanguage: r,
                    modifiedLanguage: o,
                    originalModelPath: i,
                    modifiedModelPath: l,
                    keepCurrentOriginalModel: c = !1,
                    keepCurrentModifiedModel: d = !1,
                    theme: p = "light",
                    loading: g = "Loading...",
                    options: m = {},
                    height: v = "100%",
                    width: b = "100%",
                    className: x,
                    wrapperProps: w = {},
                    beforeMount: j = Bc,
                    onMount: C = Bc
                }) {
        let [_, E] = y.useState(!1), [k, T] = y.useState(!0), O = y.useRef(null), A = y.useRef(null),
            $ = y.useRef(null), F = y.useRef(C), N = y.useRef(j), z = y.useRef(!1);
        TS(() => {
            let R = _S.init();
            return R.then(B => (A.current = B) && T(!1)).catch(B => (B == null ? void 0 : B.type) !== "cancelation" && console.error("Monaco initialization: error:", B)), () => O.current ? Z() : R.cancel()
        }), Er(() => {
            if (O.current && A.current) {
                let R = O.current.getOriginalEditor(), B = rl(A.current, e || "", r || n || "text", i || "");
                B !== R.getModel() && R.setModel(B)
            }
        }, [i], _), Er(() => {
            if (O.current && A.current) {
                let R = O.current.getModifiedEditor(), B = rl(A.current, t || "", o || n || "text", l || "");
                B !== R.getModel() && R.setModel(B)
            }
        }, [l], _), Er(() => {
            let R = O.current.getModifiedEditor();
            R.getOption(A.current.editor.EditorOption.readOnly) ? R.setValue(t || "") : t !== R.getValue() && (R.executeEdits("", [{
                range: R.getModel().getFullModelRange(),
                text: t || "",
                forceMoveMarkers: !0
            }]), R.pushUndoStop())
        }, [t], _), Er(() => {
            var R, B;
            (B = (R = O.current) == null ? void 0 : R.getModel()) == null || B.original.setValue(e || "")
        }, [e], _), Er(() => {
            let {original: R, modified: B} = O.current.getModel();
            A.current.editor.setModelLanguage(R, r || n || "text"), A.current.editor.setModelLanguage(B, o || n || "text")
        }, [n, r, o], _), Er(() => {
            var R;
            (R = A.current) == null || R.editor.setTheme(p)
        }, [p], _), Er(() => {
            var R;
            (R = O.current) == null || R.updateOptions(m)
        }, [m], _);
        let V = y.useCallback(() => {
            var Q;
            if (!A.current) return;
            N.current(A.current);
            let R = rl(A.current, e || "", r || n || "text", i || ""),
                B = rl(A.current, t || "", o || n || "text", l || "");
            (Q = O.current) == null || Q.setModel({original: R, modified: B})
        }, [n, t, o, e, r, i, l]), X = y.useCallback(() => {
            var R;
            !z.current && $.current && (O.current = A.current.editor.createDiffEditor($.current, {automaticLayout: !0, ...m}), V(), (R = A.current) == null || R.editor.setTheme(p), E(!0), z.current = !0)
        }, [m, p, V]);
        y.useEffect(() => {
            _ && F.current(O.current, A.current)
        }, [_]), y.useEffect(() => {
            !k && !_ && X()
        }, [k, _, X]);

        function Z() {
            var B, Q, H, I;
            let R = (B = O.current) == null ? void 0 : B.getModel();
            c || ((Q = R == null ? void 0 : R.original) == null || Q.dispose()), d || ((H = R == null ? void 0 : R.modified) == null || H.dispose()), (I = O.current) == null || I.dispose()
        }

        return ee.createElement(kS, {
            width: b,
            height: v,
            isEditorReady: _,
            loading: g,
            _ref: $,
            className: x,
            wrapperProps: w
        })
    }

    var X8 = Y8;
    y.memo(X8);

    function Z8(e) {
        let t = y.useRef();
        return y.useEffect(() => {
            t.current = e
        }, [e]), t.current
    }

    var J8 = Z8, of = new Map;

    function Q8({
                    defaultValue: e,
                    defaultLanguage: t,
                    defaultPath: n,
                    value: r,
                    language: o,
                    path: i,
                    theme: l = "light",
                    line: c,
                    loading: d = "Loading...",
                    options: p = {},
                    overrideServices: g = {},
                    saveViewState: m = !0,
                    keepCurrentModel: v = !1,
                    width: b = "100%",
                    height: x = "100%",
                    className: w,
                    wrapperProps: j = {},
                    beforeMount: C = Bc,
                    onMount: _ = Bc,
                    onChange: E,
                    onValidate: k = Bc
                }) {
        let [T, O] = y.useState(!1), [A, $] = y.useState(!0), F = y.useRef(null), N = y.useRef(null),
            z = y.useRef(null), V = y.useRef(_), X = y.useRef(C), Z = y.useRef(), R = y.useRef(r), B = J8(i),
            Q = y.useRef(!1), H = y.useRef(!1);
        TS(() => {
            let M = _S.init();
            return M.then(W => (F.current = W) && $(!1)).catch(W => (W == null ? void 0 : W.type) !== "cancelation" && console.error("Monaco initialization: error:", W)), () => N.current ? D() : M.cancel()
        }), Er(() => {
            var W, ce, ne, ue;
            let M = rl(F.current, e || r || "", t || o || "", i || n || "");
            M !== ((W = N.current) == null ? void 0 : W.getModel()) && (m && of.set(B, (ce = N.current) == null ? void 0 : ce.saveViewState()), (ne = N.current) == null || ne.setModel(M), m && ((ue = N.current) == null || ue.restoreViewState(of.get(i))))
        }, [i], T), Er(() => {
            var M;
            (M = N.current) == null || M.updateOptions(p)
        }, [p], T), Er(() => {
            !N.current || r === void 0 || (N.current.getOption(F.current.editor.EditorOption.readOnly) ? N.current.setValue(r) : r !== N.current.getValue() && (H.current = !0, N.current.executeEdits("", [{
                range: N.current.getModel().getFullModelRange(),
                text: r,
                forceMoveMarkers: !0
            }]), N.current.pushUndoStop(), H.current = !1))
        }, [r], T), Er(() => {
            var W, ce;
            let M = (W = N.current) == null ? void 0 : W.getModel();
            M && o && ((ce = F.current) == null || ce.editor.setModelLanguage(M, o))
        }, [o], T), Er(() => {
            var M;
            c !== void 0 && ((M = N.current) == null || M.revealLine(c))
        }, [c], T), Er(() => {
            var M;
            (M = F.current) == null || M.editor.setTheme(l)
        }, [l], T);
        let I = y.useCallback(() => {
            var M;
            if (!(!z.current || !F.current) && !Q.current) {
                X.current(F.current);
                let W = i || n, ce = rl(F.current, r || e || "", t || o || "", W || "");
                N.current = (M = F.current) == null ? void 0 : M.editor.create(z.current, {
                    model: ce,
                    automaticLayout: !0, ...p
                }, g), m && N.current.restoreViewState(of.get(W)), F.current.editor.setTheme(l), c !== void 0 && N.current.revealLine(c), O(!0), Q.current = !0
            }
        }, [e, t, n, r, o, i, p, g, m, l, c]);
        y.useEffect(() => {
            T && V.current(N.current, F.current)
        }, [T]), y.useEffect(() => {
            !A && !T && I()
        }, [A, T, I]), R.current = r, y.useEffect(() => {
            var M, W;
            T && E && ((M = Z.current) == null || M.dispose(), Z.current = (W = N.current) == null ? void 0 : W.onDidChangeModelContent(ce => {
                H.current || E(N.current.getValue(), ce)
            }))
        }, [T, E]), y.useEffect(() => {
            if (T) {
                let M = F.current.editor.onDidChangeMarkers(W => {
                    var ne;
                    let ce = (ne = N.current.getModel()) == null ? void 0 : ne.uri;
                    if (ce && W.find(ue => ue.path === ce.path)) {
                        let ue = F.current.editor.getModelMarkers({resource: ce});
                        k == null || k(ue)
                    }
                });
                return () => {
                    M == null || M.dispose()
                }
            }
            return () => {
            }
        }, [T, k]);

        function D() {
            var M, W;
            (M = Z.current) == null || M.dispose(), v ? m && of.set(i, N.current.saveViewState()) : (W = N.current.getModel()) == null || W.dispose(), N.current.dispose()
        }

        return ee.createElement(kS, {
            width: b,
            height: x,
            isEditorReady: T,
            loading: d,
            _ref: z,
            className: w,
            wrapperProps: j
        })
    }

    var e$ = Q8, t$ = y.memo(e$), n$ = t$;
    const LS = e => {
        var t;
        (t = e.getAction("editor.action.formatDocument")) == null || t.run()
    }, r$ = "gs-field-code", o$ = {
        minimap: {enabled: !1},
        lineNumbers: "off",
        scrollBeyondLastLine: !1,
        contextmenu: !1,
        fixedOverflowWidgets: !0,
        showFoldingControls: "always",
        suggestOnTriggerCharacters: !1,
        lineDecorationsWidth: 0,
        renderLineHighlight: "none",
        wordWrapOverride1: "off",
        tabSize: 2,
        scrollbar: {verticalScrollbarSize: 8, horizontal: "hidden", alwaysConsumeMouseWheel: !1}
    };

    function Ss(e) {
        const {
                value: t,
                language: n,
                onChange: r,
                clean: o,
                padding: i,
                isDarkTheme: l,
                className: c,
                containerClassName: d,
                minHeight: p = "170px",
                onMount: g,
                readOnly: m,
                name: v,
                required: b,
                disabled: x,
                monacoOptions: w
            } = e, j = typeof t == "string" ? t : JSON.stringify(t, null, 2),
            C = Za({...e, className: U(r$, "gs-utl-flex gs-utl-h-full", d, !e.row && "gs-utl-flex gs-utl-flex-col")}),
            _ = U("gs-utl-relative gs-utl-flex-grow");
        return u.jsxs("div", {
            ...C,
            children: [u.jsx(Ja, {...e}), u.jsxs("div", {
                className: _,
                style: {minHeight: p},
                children: [v && u.jsx("input", {
                    className: nt.hiddenVisually,
                    name: v,
                    value: j,
                    disabled: x,
                    required: b,
                    onChange: () => {
                    }
                }), u.jsx("div", {
                    className: U("gs-utl-absolute gs-utl-inset-0", x && nt.disabled),
                    children: u.jsx(n$, {
                        defaultLanguage: n,
                        defaultValue: j,
                        theme: l ? "vs-dark" : "light",
                        className: U(ye.b, ye.rnd, te.br, c),
                        options: {
                            ...o$, readOnly: m, ...o && {
                                domReadOnly: !0,
                                overviewRulerLanes: 0,
                                selectOnLineNumbers: !1,
                                folding: !1,
                                matchBrackets: "never",
                                guides: {indentation: !1}
                            }, ...kn(i) && {lineDecorationsWidth: i * 2, padding: {top: i, bottom: i}}, ...w
                        },
                        onChange: r,
                        onMount: (E, k) => {
                            let T = !1;
                            const O = () => LS(E);
                            E.onDidChangeModelLanguageConfiguration(O), E.onDidScrollChange(() => {
                                T || (T = !0, O())
                            }), setTimeout(O, 10), g == null || g(E, k)
                        }
                    })
                })]
            })]
        })
    }

    const MS = xe(function ({buttonProps: t, content: n, code: r, onAction: o}) {
        const i = go(), l = Ke(), c = Ae(), {isProjectTypeEmail: d} = c,
            p = c.editor, {isDarkTheme: g} = sr(), [m, v] = y.useState(), b = () => {
                let w = (m || "").trim();
                const j = X6({code: w, appStore: c, showToastError: !0});
                if (!j.error) w = j.output; else return;
                o ? o(w) : d ? p.loadProjectData({pages: [{component: w}]}) : p.setComponents(w), i.close()
            };
        y.useEffect(() => {
            r ? v(r) : (async () => {
                if (d) v(p.getHtml()); else {
                    const C = (await p.runCommand(_e.projectFiles, {
                        page: p.Pages.getSelected(),
                        skipProject: !0,
                        styles: "inline"
                    })).find(_ => _.mimeType === "text/html");
                    C && v(C.content)
                }
            })()
        }, []);
        const x = (t == null ? void 0 : t.children) || l.t("actions.importCode.button");
        return u.jsxs(K, {
            col: !0,
            space: "m",
            children: [u.jsx(q, {children: n ?? l.t("actions.importCode.content")}), u.jsx(q, {
                className: se("h-96"),
                children: m !== void 0 && u.jsx(Ss, {
                    value: m,
                    onChange: w => v(w || ""),
                    isDarkTheme: g,
                    language: "html"
                })
            }), u.jsx(K, {
                justify: "end",
                children: u.jsx(at, {size: "m2", variant: "pr", onClick: b, ...t, children: x})
            })]
        })
    }), Bm = "data-type-empty", AS = (e, t) => {
        e.Canvas.getFrames().forEach(n => {
            const {view: r} = n, o = Array.from(r.getDoc().querySelectorAll(`style[${Bm}]`));
            for (const i of o) i.disabled = !t
        })
    }, s$ = (e, t, n = "Empty", r = {}) => {
        const o = `[${Bm}="${t}"]`, i = e.frameView.getHead(), {
            midSelector: l = "",
            styleOut: c = "",
            styleIn: d = ""
        } = r;
        if (!i.querySelector(`style${o}`)) {
            const p = document.createElement("style");
            p.setAttribute(Bm, t), p.innerHTML = `
    [data-gjs-type="${t}"]${l}:empty {
      text-decoration: none;
      padding: 5px;
      ${r.limitW ? "min-width: 50px;" : ""}
      ${c}
    }
    [data-gjs-type="${t}"]${l}:empty:before {
      background-color: #ddd;
      color: #000;
      font-size: 16px;
      font-weight: bold;
      font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Open Sans", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 30px;
      padding: 0 10px;
      opacity: 0.3;
      border-radius: 3px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      content: "${n}";
      ${r.limitH ? "height: auto;" : ""}
      ${r.smallH ? "min-height: 30px;" : ""}
      ${d}
    }`, i.appendChild(p)
        }
    }, RS = (e, t) => {
        const {model: n} = t, r = n.constructor.getDefaults(), o = r.emptyState, i = n.get("type");
        if (!o || r.void === !0 || i !== e) return;
        const l = o === !0 ? {} : o;
        s$(t, i, n.getName({noCustom: !0}), l)
    }, i$ = function (t) {
        const {Components: n} = t, r = o => {
            const {id: i} = o;
            n.addType(i, {
                extendFnView: ["onRender"], view: {
                    onRender() {
                        RS(i, this)
                    }
                }
            })
        };
        n.getTypes().forEach(r), t.on("component:type:add", r)
    };

    function a$(e, t) {
        const {Components: n} = e, r = n.events, {
                modalStore: o,
                i18nStore: i,
                fontsStore: l
            } = t.appStore.store, {root: c, head: d, body: p} = Dc, {
                attributes: g,
                class: m,
                font: v,
                all: b,
                preview: x,
                title: w,
                style: j,
                breakpoint: C
            } = Mm, {
                section: _,
                column: E,
                text: k,
                button: T,
                image: O,
                divider: A,
                group: $,
                social: F,
                socialElement: N,
                spacer: z,
                navbar: V,
                navbarLink: X,
                raw: Z
            } = rS, {model: R} = n.getType("default"), {model: B} = n.getType(c), {
                model: Q,
                view: H
            } = n.getType(d), {model: I, view: D} = n.getType(V), {model: M, view: W} = n.getType(X), {
                model: ce,
                view: ne
            } = n.getType(_), {model: ue, view: me} = n.getType(E), {model: ae, view: ie} = n.getType(k), {
                model: de,
                view: je
            } = n.getType(T), {model: he, view: Ie} = n.getType(A), {model: He, view: yt} = n.getType(z), {
                view: kt,
                model: Bt
            } = n.getType(F), {view: Ct, model: pt} = n.getType(N), {view: Sn, model: wt} = n.getType($), Dt = "css-class",
            rn = {id: "link", name: "href", label: "Link", placeholder: "Link to redirect on click"},
            Ut = {name: "src", changeProp: !0, type: "image", label: "Image"}, Tt = {
                label: "Content",
                getValue: ({component: ge}) => ge.getInnerHTML(),
                setValue: ({component: ge, value: ke}) => ge.components(ke)
            }, st = ge => {
                o.open({
                    title: ge.getName({noCustom: !0}),
                    content: () => u.jsx(MS, {
                        content: "",
                        code: ge.getInnerHTML(),
                        onAction: ke => ge.components(ke),
                        buttonProps: {children: i.t("save")}
                    })
                })
            }, Lt = ge => {
                var Me;
                const ke = ge.getChildrenContainer();
                ((Me = ke == null ? void 0 : ke.innerHTML) == null ? void 0 : Me.trim()) === "" && (ke.innerHTML = "")
            }, qt = ge => ge.set({void: !1}, {silent: !0});

        function jn(ge = {}) {
            return R.prototype.toHTML.call(this, ge)
        }

        function Kn(ge) {
            const ke = ge.closestType(c), Me = ke == null ? void 0 : ke.findType(d)[0];
            return (Me == null ? void 0 : Me.toHTML()) || ""
        }

        function lr(ge) {
            const ke = ge.toHTML(), Me = e.runCommand(k6, {mjml: ke}),
                In = new DOMParser().parseFromString(Me.html, "text/html");
            return {mjml: ke, mjmlToHtml: Me, document: In}
        }

        const cr = function (ge) {
                const ke = ge.model, Me = xs(() => {
                    var We;
                    return (We = ke.closestType(c)) == null ? void 0 : We.trigger("rerender")
                });
                ge.listenTo(ke.components(), "add remove reset change", Me)
            }, xo = (ge, ke) => ge.replace(`<${c}>`, `<${c}>${Kn(ke)}`), Ls = ge => `cls-${ge.tagName}-${ge.getId()}`,
            aa = (ge, ke) => {
                const Me = ke.prototype.getMjmlAttributes.call(ge);
                return {...Me, [Dt]: `${Me[Dt] || ""} ${Ls(ge)}`.trim()}
            }, an = (ge, ke) => {
                const Me = ge.closestType(c),
                    We = (Me == null ? void 0 : Me.findFirstType(d)) || (Me == null ? void 0 : Me.append({type: d})[0]);
                We == null || We.trigger(ke ? "rerenderHeadImmediate" : "rerenderHead")
            }, Ht = ge => function () {
                return aa(this, ge)
            }, Mt = (ge, ke) => function (Me) {
                const We = Me.querySelector(`.${Ls(this.model)}`);
                return (ke ? We : We == null ? void 0 : We.outerHTML) || ge.prototype.getTemplateFromEl.call(this, Me)
            }, it = ge => function (...ke) {
                const Me = ge.prototype.toJSON.apply(this, ke), We = Me.attributes || {};
                return delete Me.style, delete We.style, delete We.__p, Me
            };

        function Qt() {
            return {start: `<mjml>${Kn(this.model)}<mj-body><mj-column>`, end: "</mj-column></mj-body></mjml>"}
        }

        const wo = (ge, ke = {}) => {
            var qn;
            const Me = ge.parents().filter(vn => vn.tagName.startsWith("mj-")),
                We = Me.map(vn => `<${vn.tagName}>`).reverse().join(""), In = Me.map(vn => `</${vn.tagName}>`).join(""),
                en = ke.withHead ? Kn(ge) : "",
                ur = ke.withSiblings ? (qn = ge.parent()) == null ? void 0 : qn.components().filter(vn => vn !== ge).map(({tagName: vn}) => `<${vn}></${vn}>`).join("") : "";
            return {start: `<${c}>${en}${We}`, end: `${ur || ""}${In}${ke.beforeRootEnd || ""}</${c}>`}
        };
        n.addType("wrapper", {
            extendFn: ["init"],
            model: {
                defaults: {stylable: !1, delegate: {layer: ge => ge.findType(c)[0]}}, init() {
                    this.on(`${r.update}:components`, this.__updateLayersRoot)
                }, __updateLayersRoot() {
                    this.findFirstType(c) && e.Layers.setRoot(this)
                }
            }
        }), n.addType(c, {
            model: {defaults: {tagName: c, name: "Root", toolbar: []}, toHTML: jn, toJSON: it(B)},
            view: {
                reset() {
                    this.render()
                }
            }
        }), n.addType(d, {
            model: {
                defaults: {
                    tagName: d, name: "Head", copyable: !1, stylable: !1, traits: [], icon: `<svg viewBox="0 0 24 24">
          <path d="M14.6,16.6L19.2,12L14.6,7.4L16,6L22,12L16,18L14.6,16.6M9.4,16.6L4.8,12L9.4,7.4L8,6L2,12L8,18L9.4,16.6Z" />
        </svg>`
                }, toJSON: it(Q)
            }, view: {
                init() {
                    this.renderHeadDebounced = xs(this.renderHead, 30);
                    const {em: ge, el: ke, model: Me} = this, We = Me.components(), In = "core:preview",
                        en = ge.Commands.events;
                    this.listenTo(ge, `${en.runCommand}${In}`, () => {
                        ke.style.display = "none"
                    }), this.listenTo(ge, `${en.stopCommand}${In}`, () => {
                        ke.style.display = ""
                    }), this.listenTo(We, "change", this.onComponentsChange), this.listenTo(We, "add remove reset", this.renderHead), this.listenTo(Me, "rerenderHead", this.renderHeadDebounced), this.listenTo(Me, "rerenderHeadImmediate", this.renderHead)
                }, onComponentsChange(ge) {
                    const ke = Object.keys(ge.changedAttributes());
                    ke.length === 1 && ke[0] === "status" || this.renderHead()
                }, renderHead() {
                    var en;
                    const {model: ge, el: ke} = this, Me = ge.closestType(c), We = Me && lr(Me),
                        In = (en = We == null ? void 0 : We.document) == null ? void 0 : en.head;
                    if (In) {
                        const ur = "mjml-head-result", qn = ke.ownerDocument,
                            vn = qn.querySelector(ur) || qn.createElement(ur);
                        vn.innerHTML = In.innerHTML, !qn.head.contains(vn) && qn.head.prepend(vn)
                    }
                }, render(...ge) {
                    const ke = H.prototype.render.apply(this, ge);
                    return this.renderHeadDebounced(), ke
                }
            }
        }), n.addType(g, {
            isComponent: Qa(g),
            model: {
                defaults: {
                    tagName: g,
                    name: "Attributes",
                    copyable: !1,
                    layerable: !1,
                    stylable: !1,
                    draggable: Ko(d),
                    traits: []
                }, toJSON: it(R)
            },
            view: {
                onRender() {
                    this.el.style.display = "none"
                }, init() {
                    cr(this)
                }
            }
        }), n.addType(m, {
            isComponent: Qa(m),
            model: {defaults: {tagName: m, name: "Class", stylable: !1, draggable: Ko(g), traits: []}, toJSON: it(R)}
        }), n.addType(v, {
            model: {
                defaults: {
                    tagName: v,
                    name: "Font",
                    stylable: !1,
                    draggable: Ko(d),
                    icon: '<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1-3.5 7H18V9M5 3h5a2 2 0 0 1 2 2v11H9v-5H6v5H3V5a2 2 0 0 1 2-2m1 2v4h3V5H6Z"/></svg>',
                    traits: [{name: "name", placeholder: "Name of the font"}, {
                        name: "href",
                        placeholder: "URL of a hosted CSS file"
                    }]
                }, toJSON: it(R)
            }, view: {
                tagName: () => "div", render() {
                    return this.el.style.cssText = "", this
                }
            }
        }), n.addType(C, {
            extend: c,
            isComponent: Qa(C),
            model: {
                defaults: {
                    tagName: C,
                    name: "Breakpoint",
                    stylable: ["width"],
                    removable: !0,
                    droppable: !1,
                    draggable: Ko(d),
                    icon: '<svg viewBox="0 0 24 24"><path d="M22,17H18V10H22M23,8H17A1,1 0 0,0 16,9V19A1,1 0 0,0 17,20H23A1,1 0 0,0 24,19V9A1,1 0 0,0 23,8M4,6H22V4H4A2,2 0 0,0 2,6V17H0V20H14V17H4V6Z" /></svg>',
                    traits: []
                }
            },
            view: {
                attributes: {}, render() {
                    return this.el.style.cssText = "", this
                }
            }
        }), n.addType(b, {
            isComponent: Qa(b),
            model: {
                defaults: {tagName: b, name: "All", stylable: !1, void: !0, draggable: Ko(g), traits: []},
                toHTML(...ge) {
                    return B.prototype.toHTML.apply(this, ge)
                },
                toJSON: it(R)
            }
        }), n.addType(x, {
            isComponent: Qa(x), model: {
                defaults: {
                    tagName: x,
                    name: "Preview",
                    copyable: !1,
                    droppable: !1,
                    stylable: !1,
                    draggable: Ko(d),
                    traits: [Tt],
                    icon: `<svg viewBox="0 0 24 24">
          <path d="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z" />
        </svg>`
                }, toJSON: it(R)
            }, view: {
                tagName: () => "div", init() {
                    const ge = this.model.components();
                    this.onRender = xs(this.onRender, 1), this.listenTo(ge, "add remove reset change", this.onRender)
                }, onRender() {
                    const {model: ge, el: ke} = this, Me = ge.getName({noCustom: !0}), We = ge.getInnerHTML();
                    ke.innerHTML = `<b>${Me}</b>: ${We}`, ke.style.padding = "5px 10px", ke.style.fontFamily = "system-ui"
                }
            }
        }), n.addType(w, {
            isComponent: Qa(w),
            extend: x,
            model: {
                defaults: {
                    tagName: w,
                    name: "Title",
                    icon: '<svg viewBox="0 0 24 24"><path d="M5,4V7H10.5V19H13.5V7H19V4H5Z" /></svg>'
                }
            }
        }), n.addType(j, {
            model: {
                defaults: {
                    tagName: j,
                    name: "Style",
                    droppable: !1,
                    layerable: !1,
                    stylable: !1,
                    traits: []
                }, toJSON: it(R)
            }, view: {
                render() {
                    return this
                }
            }
        }), n.addType(p, {
            model: {
                defaults: {
                    tagName: p, icon: `<svg viewBox="0 0 24 24">
          <path d="M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2M6,8V16H18V8H6Z" />
        </svg>`, traits: [], emptyState: {midSelector: ">div", styleOut: "height: 100vh;"}
                }, toJSON: it(R)
            }
        }), n.addType(_, {
            extendFn: ["init"], model: {
                defaults: {
                    tagName: _,
                    "style-default": {padding: "20px 0px", "text-align": "center"},
                    icon: `<svg viewBox="0 0 24 24">
          <path d="M2,3V6H21V3M20,8H3A1,1 0 0,0 2,9V15A1,1 0 0,0 3,16H20A1,1 0 0,0 21,15V9A1,1 0 0,0 20,8M2,21H21V18H2V21Z" />
        </svg>`,
                    traits: [{
                        type: "checkbox",
                        label: "Full width",
                        name: "full-width",
                        valueTrue: "full-width",
                        valueFalse: ""
                    }],
                    emptyState: {midSelector: ">div>table>tbody>tr>td"}
                }, init() {
                    qt(this)
                }, getMjmlAttributes: Ht(ce), toJSON: it(ce)
            }, extendFnView: ["render"], view: {
                getTemplateFromEl: Mt(ne), getMjmlTemplate() {
                    const {start: ge, end: ke} = ne.prototype.getMjmlTemplate.call(this);
                    return {start: xo(ge, this.model), end: ke}
                }, render() {
                    return Lt(this), this
                }
            }
        }), n.addType($, {
            extendFn: ["init"],
            model: {
                defaults: {
                    tagName: $,
                    "style-default": {},
                    icon: '<svg viewBox="0 0 24 24"><path d="M16,5V18H21V5M4,18H9V5H4M10,18H15V5H10V18Z" /></svg>'
                }, init() {
                    qt(this)
                }, getMjmlAttributes: Ht(wt), toJSON: it(wt)
            },
            extendFnView: ["init"],
            view: {
                init() {
                    this.listenTo(this.model.components(), "add remove reset", this.render)
                }, getTemplateFromEl: Mt(Sn, !0), getChildrenContainer() {
                    return this.el
                }, getMjmlTemplate() {
                    return {start: "<mjml><mj-body><mj-section>", end: "</mj-section></mj-body></mjml>"}
                }, render() {
                    const ge = this.getTemplateFromMjml(), ke = hk(ge);
                    return this.renderAttributes(), this.$el.attr(ke), this.el.innerHTML = ge.innerHTML, this.renderChildren(), this.childNodes = this.getChildrenContainer().childNodes, this.updateStatus(), this.postRender(), this
                }
            }
        }), n.addType(E, {
            extendFn: ["init"], model: {
                defaults: {
                    tagName: E, icon: `<svg viewBox="0 0 24 24" style="rotate: 90deg;">
          <path d="M2,3V6H21V3M20,8H3A1,1 0 0,0 2,9V15A1,1 0 0,0 3,16H20A1,1 0 0,0 21,15V9A1,1 0 0,0 20,8M2,21H21V18H2V21Z" />
        </svg>`, traits: [], emptyState: {midSelector: ">table>tbody", styleIn: "margin: 0 10px;"}
                }, init() {
                    qt(this)
                }, getMjmlAttributes: Ht(ue), toJSON: it(ue)
            }, view: {
                getMjmlTemplate() {
                    var Me;
                    const ge = (Me = this.model.parent()) == null ? void 0 : Me.is(g), ke = wo(this.model, {
                        withSiblings: !ge,
                        withHead: !ge,
                        beforeRootEnd: ge ? `<${p}><${_}><${E}/></${_}></${p}>` : ""
                    });
                    return {start: ke.start, end: ke.end}
                }, getTemplateFromEl: Mt(me, !0), getChildrenContainer() {
                    const {el: ge} = this;
                    return ge.querySelector("td > table tbody") || ge.querySelector("table tbody") || ge
                }, render() {
                    this.renderAttributes();
                    const ge = this.getTemplateFromMjml();
                    return this.el.innerHTML = ge.content, this.$el.attr(ge.attributes), this.getChildrenContainer().innerHTML = this.model.get("content"), this.renderChildren(), this.updateStatus(), this.postRender(), an(this.model, !0), this
                }
            }
        }), n.addType(k, {
            model: {
                defaults: {
                    tagName: k,
                    emptyState: {
                        midSelector: ' [contenteditable="false"]',
                        styleIn: "min-height: 20px;",
                        styleOut: "padding: 0 5px;"
                    },
                    traits: [],
                    "style-default": {padding: "10px 25px"}
                }, getMjmlAttributes: Ht(ae), toJSON: it(ae)
            }, view: {getMjmlTemplate: Qt, getTemplateFromEl: Mt(ie)}
        }), n.addType(T, {
            model: {
                defaults: {tagName: T, traits: [rn], "style-default": {}},
                getMjmlAttributes: Ht(de),
                toJSON: it(de)
            }, view: {getMjmlTemplate: Qt, getTemplateFromEl: Mt(je)}
        }), n.addType(O, {
            model: {
                defaults: {
                    tagName: O,
                    "style-default": {align: "center"},
                    traits: [{name: "src", changeProp: !0, type: "image", label: "Image"}, {
                        id: "altText",
                        name: "alt",
                        placeholder: "Image description"
                    }, "title", rn]
                }, toJSON: it(R)
            }, view: {
                getMjmlTemplate() {
                    return {
                        start: `<mjml>${Kn(this.model)}<mj-body><mj-section><mj-column>`,
                        end: "</mj-column></mj-section></mj-body></mjml>"
                    }
                }, getTemplateFromEl(ge) {
                    var ke, Me, We;
                    return (We = (Me = (ke = ge.querySelector("img")) == null ? void 0 : ke.closest("table")) == null ? void 0 : Me.closest("tr")) == null ? void 0 : We.innerHTML
                }
            }
        }), n.addType(A, {
            model: {
                defaults: {
                    tagName: A,
                    attributes: {align: "center"},
                    "style-default": {width: "100%"},
                    traits: [{
                        name: "align",
                        type: "radio",
                        options: [{
                            id: "left",
                            title: "Left",
                            labelReact: u.jsx(be, {icon: fe.alignHorizontalLeft, size: Ee.sx})
                        }, {
                            id: "center",
                            title: "Center",
                            labelReact: u.jsx(be, {icon: fe.alignHorizontalCenter, size: Ee.sx})
                        }, {
                            id: "right",
                            title: "Right",
                            labelReact: u.jsx(be, {icon: fe.alignHorizontalRight, size: Ee.sx})
                        }]
                    }]
                }, getMjmlAttributes: Ht(he), toJSON: it(he)
            }, view: {getMjmlTemplate: Qt, getTemplateFromEl: Mt(Ie)}
        }), n.addType(F, {
            model: {
                defaults: {
                    tagName: F,
                    name: "Social",
                    traits: [],
                    emptyState: {midSelector: ">td"},
                    "style-default": {align: "center"}
                }, getMjmlAttributes: Ht(Bt), toJSON: it(Bt)
            }, view: {getMjmlTemplate: Qt, getTemplateFromEl: Mt(kt)}
        }), n.addType(N, {
            extendFn: ["init"], model: {
                defaults: {
                    tagName: N,
                    "style-default": {align: "center"},
                    traits: [{
                        type: "select",
                        label: "Icon",
                        name: "name",
                        options: [{id: "custom", name: "Custom"}, {id: "facebook", name: "Facebook"}, {
                            id: "twitter",
                            name: "Twitter/X"
                        }, {id: "google", name: "Google"}, {id: "instagram", name: "Instagram"}, {
                            id: "web",
                            name: "Web"
                        }, {id: "youtube", name: "YouTube"}, {id: "pinterest", name: "Pinterest"}, {
                            id: "linkedin",
                            name: "Linkedin"
                        }, {id: "snapchat", name: "Snapchat"}, {id: "vimeo", name: "Vimeo"}, {
                            id: "tumblr",
                            name: "Tumblr"
                        }, {id: "github", name: "Github"}, {id: "soundcloud", name: "SoundCloud"}, {
                            id: "medium",
                            name: "Medium"
                        }, {id: "dribbble", name: "Dribbble"}, {id: "xing", name: "Xing"}]
                    }, Ut, rn, Tt]
                }, init() {
                    qt(this)
                }, getMjmlAttributes() {
                    const ge = aa(this, pt);
                    return {...this.getDefaultIconProps()[ge.name], ...ge}
                }, getAttrToHTML() {
                    const ge = pt.prototype.getAttrToHTML.call(this);
                    return {...this.getDefaultIconProps()[ge.name], ...ge}
                }, getDefaultIconProps() {
                    return {
                        twitter: {
                            src: "https://upload.wikimedia.org/wikipedia/commons/5/57/X_logo_2023_%28white%29.png",
                            "background-color": "black"
                        }
                    }
                }, toJSON: it(pt)
            }, extendFnView: ["init"], view: {
                init() {
                    this.listenTo(this.model, "component:update:components", this.rerender)
                }, getMjmlTemplate() {
                    const {start: ge, end: ke} = Ct.prototype.getMjmlTemplate.call(this);
                    return {start: xo(ge, this.model), end: ke}
                }, getInnerMjmlTemplate() {
                    var We;
                    const {start: ge, end: ke} = Ct.prototype.getInnerMjmlTemplate.call(this),
                        Me = ((We = this.model.getInnerHTML()) == null ? void 0 : We.trim()) || "";
                    return {start: `${ge}${Me}`, end: ke}
                }, getChildrenContainer() {
                    var We;
                    const {el: ge} = this,
                        ke = (We = ge.querySelector("tbody > tr > td")) == null ? void 0 : We.nextElementSibling;
                    return (ke == null ? void 0 : ke.firstElementChild) || ge.querySelector("img") || ge
                }
            }
        }), n.addType(z, {
            model: {defaults: {tagName: z, traits: []}, getMjmlAttributes: Ht(He), toJSON: it(He)},
            view: {getMjmlTemplate: Qt, getTemplateFromEl: Mt(yt)}
        }), n.addType(V, {
            model: {
                defaults: {tagName: V, emptyState: {midSelector: ">td>div"}},
                getMjmlAttributes: Ht(I),
                toJSON: it(I)
            }, view: {
                getMjmlTemplate: Qt, getTemplateFromEl: Mt(D, !0), render() {
                    this.renderAttributes();
                    const ge = this.getTemplateFromMjml();
                    return this.el.innerHTML = ge.content, this.$el.attr(ge.attributes), this.getChildrenContainer().innerHTML = this.model.get("content"), this.renderChildren(), this.renderStyle(), this.postRender(), an(this.model), this
                }
            }
        }), n.addType(X, {
            model: {
                defaults: {
                    tagName: X, icon: `<svg viewBox="0 0 24 24">
          <path fill="currentColor" d="M21,15.61L19.59,17L14.58,12L19.59,7L21,8.39L17.44,12L21,15.61M3,6H16V8H3V6M3,13V11H13V13H3M3,18V16H16V18H3Z" />
        </svg>`, emptyState: {midSelector: ">td>div"}, "style-default": {}
                }, toJSON: it(M)
            }, view: {
                getMjmlTemplate() {
                    const {start: ge, end: ke} = W.prototype.getMjmlTemplate.call(this);
                    return {start: xo(ge, this.model), end: ke}
                }, getTemplateFromEl(ge) {
                    return ge.querySelector(".mj-inline-links").innerHTML
                }
            }
        }), n.addType(Z, {
            extendFn: ["initToolbar"], model: {
                defaults: {tagName: Z, name: "HTML block", emptyState: {midSelector: ">div"}}, initToolbar() {
                    n6(this, {
                        id: "edit", command: () => st(this), label: `<svg viewBox="0 0 24 24">
            <path d="M14.6 16.6l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4m-5.2 0L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4z"></path>
          </svg>`
                    })
                }, toJSON: it(R)
            }, view: {
                events: {dblclick: "onActive"}, onActive() {
                    st(this.model)
                }
            }
        });
        const ln = ge => {
            const {id: ke, view: Me} = ge, We = Me.prototype;
            n.addType(ke, {
                view: {
                    render() {
                        return We.render.apply(this, arguments), RS(ke, this), this
                    }
                }
            })
        };
        [p, _, E, k, V, F, Z].forEach(ge => ln(n.getType(ge))), n.getTypes().forEach(({id: ge, view: ke}) => {
            ke.prototype.disableEditing && n.addType(ge, {
                view: {
                    onDisable(Me = {}) {
                        this.disableEditing({...Me, parserOptions: {htmlType: "text/html"}})
                    }
                }
            })
        });
        const So = () => {
            const ke = e.Components.getWrapper().findFirstType(c), Me = ke.findFirstType(d) || ke.append({type: d})[0];
            Me.components().filter(ur => ur.attributes[Em] == Pm).forEach(ur => ur.remove());
            const In = Aw(l.fonts), en = Me.append({type: j, content: In})[0];
            en == null || en.set({[Em]: Pm}, {silent: !0})
        }, Qr = Ic.globalStyles, jo = () => {
            const ge = e.Css.rules.filter(en => {
                const ur = en.attributes.groups;
                return !!(ur != null && ur.some(qn => qn.startsWith(`${Qr}:`)))
            }).map(en => en.toCSS());
            if (!ge.length) return;
            const Me = e.Components.getWrapper().findFirstType(Dc.root),
                We = Me.findFirstType(d) || Me.append({type: d})[0];
            (We.findType(j).find(en => en.getAttributes()[Dt] === Qr) || We.append({
                type: j,
                attributes: {[Dt]: Qr}
            })[0]).set("content", ge.join(`
`))
        }, Co = xs(jo, 100);
        e.on(Jn.pageSettingsUpdate, ge => {
            ge.page || So()
        }), e.on(e.events.projectLoad, ({loaded: ge}) => {
            ge && (jo(), So())
        }), e.on(e.Parser.events.htmlBefore, ge => {
            ge.input = nS(ge.input)
        }), e.onReady(() => {
            e.on(`${e.DataSources.events.pathSource}:${Qr}`, Co)
        })
    }

    function l$(e) {
        const {Blocks: t} = e, n = "Content", r = "Layout", o = {className: "h-7", full: !0, space: "s", nowrap: !0},
            i = {category: r, full: !0}, l = "gjs-border-2 gjs-border-current gjs-rounded-sm", c = (d, p) => {
                t.add(d, {select: !0, category: n, ...p})
            };
        c("mj-text", {
            label: "Text", media: `<svg viewBox="0 0 24 24">
      <path fill="currentColor" d="M18.5,4L19.66,8.35L18.7,8.61C18.25,7.74 17.79,6.87 17.26,6.43C16.73,6 16.11,6 15.5,6H13V16.5C13,17 13,17.5 13.33,17.75C13.67,18 14.33,18 15,18V19H9V18C9.67,18 10.33,18 10.67,17.75C11,17.5 11,17 11,16.5V6H8.5C7.89,6 7.27,6 6.74,6.43C6.21,6.87 5.75,7.74 5.3,8.61L4.34,8.35L5.5,4H18.5Z" />
    </svg>`, content: "<mj-text>Insert text here</mj-text>", activate: !0
        }), c("mj-button", {
            label: "Button", media: `<svg viewBox="0 0 24 24">
        <path fill="currentColor" d="M20 20.5C20 21.3 19.3 22 18.5 22H13C12.6 22 12.3 21.9 12 21.6L8 17.4L8.7 16.6C8.9 16.4 9.2 16.3 9.5 16.3H9.7L12 18V9C12 8.4 12.4 8 13 8S14 8.4 14 9V13.5L15.2 13.6L19.1 15.8C19.6 16 20 16.6 20 17.1V20.5M20 2H4C2.9 2 2 2.9 2 4V12C2 13.1 2.9 14 4 14H8V12H4V4H20V12H18V14H20C21.1 14 22 13.1 22 12V4C22 2.9 21.1 2 20 2Z" />
    </svg>`, content: "<mj-button>Button</mj-button>"
        }), c("mj-image", {
            label: "Image", media: `<svg viewBox="0 0 24 24">
      <path fill="currentColor" d="M21,3H3C2,3 1,4 1,5V19A2,2 0 0,0 3,21H21C22,21 23,20 23,19V5C23,4 22,3 21,3M5,17L8.5,12.5L11,15.5L14.5,11L19,17H5Z" />
    </svg>`, content: `<mj-image src="${Pk}"/>`, activate: !0
        }), c("mj-divider", {
            label: "Divider", media: `<svg viewBox="0 0 24 24">
        <path fill="currentColor" d="M21 18H2V20H21V18M19 10V14H4V10H19M20 8H3C2.45 8 2 8.45 2 9V15C2 15.55 2.45 16 3 16H20C20.55 16 21 15.55 21 15V9C21 8.45 20.55 8 20 8M21 4H2V6H21V4Z" />
    </svg>`, content: "<mj-divider/>"
        }), c("mj-social", {
            label: "Social", media: `<svg viewBox="0 0 24 24">
      <path fill="currentColor" d="M18,16.08C17.24,16.08 16.56,16.38 16.04,16.85L8.91,12.7C8.96,12.47 9,12.24 9,12C9,11.76 8.96,11.53 8.91,11.3L15.96,7.19C16.5,7.69 17.21,8 18,8A3,3 0 0,0 21,5A3,3 0 0,0 18,2A3,3 0 0,0 15,5C15,5.24 15.04,5.47 15.09,5.7L8.04,9.81C7.5,9.31 6.79,9 6,9A3,3 0 0,0 3,12A3,3 0 0,0 6,15C6.79,15 7.5,14.69 8.04,14.19L15.16,18.34C15.11,18.55 15.08,18.77 15.08,19C15.08,20.61 16.39,21.91 18,21.91C19.61,21.91 20.92,20.61 20.92,19A2.92,2.92 0 0,0 18,16.08Z" />
    </svg>`, content: `<mj-social font-size="12px" icon-size="24px" border-radius="12px" mode="horizontal">
        <mj-social-element name="facebook"></mj-social-element>
        <mj-social-element name="linkedin"></mj-social-element>
        <mj-social-element name="twitter"></mj-social-element>
      </mj-social>`
        }), c("mj-social-element", {
            label: "Social Element", media: `<svg viewBox="0 0 24 24">
      <path d="M18 16.08C17.24 16.08 16.56 16.38 16.04 16.85L8.91 12.7C8.96 12.47 9 12.24 9 12S8.96 11.53 8.91 11.3L15.96 7.19C16.5 7.69 17.21 8 18 8C19.66 8 21 6.66 21 5S19.66 2 18 2 15 3.34 15 5C15 5.24 15.04 5.47 15.09 5.7L8.04 9.81C7.5 9.31 6.79 9 6 9C4.34 9 3 10.34 3 12S4.34 15 6 15C6.79 15 7.5 14.69 8.04 14.19L15.16 18.34C15.11 18.55 15.08 18.77 15.08 19C15.08 20.61 16.39 21.91 18 21.91S20.92 20.61 20.92 19C20.92 17.39 19.61 16.08 18 16.08M18 4C18.55 4 19 4.45 19 5S18.55 6 18 6 17 5.55 17 5 17.45 4 18 4M6 13C5.45 13 5 12.55 5 12S5.45 11 6 11 7 11.45 7 12 6.55 13 6 13M18 20C17.45 20 17 19.55 17 19S17.45 18 18 18 19 18.45 19 19 18.55 20 18 20Z" />
    </svg>`, content: '<mj-social-element name="facebook">Facebook</mj-social-element>'
        }), c("mj-spacer", {
            label: "Spacer", media: `<svg viewBox="0 0 24 24">
        <path fill="currentColor" d="M8,18H11V15H2V13H22V15H13V18H16L12,22L8,18M12,2L8,6H11V9H2V11H22V9H13V6H16L12,2Z" />
    </svg>`, content: "<mj-spacer/>"
        }), c("mj-navbar", {
            label: "Navbar", media: `<svg viewBox="0 0 24 24">
        <path fill="currentColor" d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z" />
    </svg>`, content: `<mj-navbar>
      <mj-navbar-link>HOME</mj-navbar-link>
      <mj-navbar-link>ABOUT</mj-navbar-link>
      <mj-navbar-link>CONTACT</mj-navbar-link>
      <mj-navbar-link>BLOG</mj-navbar-link>
    </mj-navbar>`
        }), c("mj-hero", {
            label: "Hero",
            media: `<svg viewBox="0 0 24 24">
        <path fill="currentColor" d="M20,20H4A2,2 0 0,1 2,18V6A2,2 0 0,1 4,4H20A2,2 0 0,1 22,6V18A2,2 0 0,1 20,20M4,6V18H20V6H4M6,9H18V11H6V9M6,13H16V15H6V13Z" />
    </svg>`,
            content: `<mj-hero mode="fixed-height" height="469px" background-width="600px" background-height="469px" background-url="${Rb({
                width: 600,
                height: 300,
                text: "Hero Image",
                fg: "555"
            })}" background-color="#2a3448" padding="100px 0px">
      <mj-text padding="20px" color="#ffffff" font-family="Helvetica" align="center" font-size="45px" line-height="45px" font-weight="900">
        Heading title
      </mj-text>
      <mj-text padding="20px" color="#ffffff" font-family="Helvetica" align="center">
        Place here your hero content text
      </mj-text>
      <mj-button href="https://mjml.io/" align="center">
        Call to action!
      </mj-button>
    </mj-hero>`
        }), c("mj-raw", {
            label: "HTML block", activate: !0, media: `<svg viewBox="0 0 24 24">
      <path d="M5.59 3.41L7 4.82L3.82 8L7 11.18L5.59 12.6L1 8L5.59 3.41M11.41 3.41L16 8L11.41 12.6L10 11.18L13.18 8L10 4.82L11.41 3.41M22 6V18C22 19.11 21.11 20 20 20H4C2.9 20 2 19.11 2 18V14H4V18H20V6H17.03V4H20C21.11 4 22 4.89 22 6Z" />
    </svg>`, content: `<mj-raw>
      <span>Insert here you custom HTML</span>
    </mj-raw>`
        }), c("mj-1-column", {
            ...i,
            label: "1 Column",
            mediaReact: u.jsx(K, {...o, children: u.jsx(q, {className: l, grow: !0})}),
            content: `<mj-section>
        <mj-column></mj-column>
      </mj-section>`
        }), c("mj-2-columns-50-50", {
            ...i,
            label: "2 Columns 50/50",
            mediaReact: u.jsxs(K, {
                ...o,
                children: [u.jsx(q, {className: l, grow: !0}), u.jsx(q, {className: l, grow: !0})]
            }),
            content: `<mj-section>
      <mj-column></mj-column>
      <mj-column></mj-column>
    </mj-section>`
        }), c("mj-2-columns-25-75", {
            ...i,
            label: "2 Columns 25/75",
            mediaReact: u.jsxs(K, {
                ...o,
                children: [u.jsx(q, {className: pe(l, "gs-utl-basis-1/4")}), u.jsx(q, {className: pe(l, "gs-utl-basis-3/4")})]
            }),
            content: `<mj-section>
      <mj-column width="25%"></mj-column>
      <mj-column width="75%"></mj-column>
    </mj-section>`
        }), c("mj-2-columns-33-67", {
            ...i,
            label: "2 Columns 33/67",
            mediaReact: u.jsxs(K, {
                ...o,
                children: [u.jsx(q, {className: pe(l, "gs-utl-basis-1/3")}), u.jsx(q, {className: pe(l, "gs-utl-basis-2/3")})]
            }),
            content: `<mj-section>
      <mj-column width="33%"></mj-column>
      <mj-column width="67%"></mj-column>
    </mj-section>`
        }), c("mj-2-columns-67-33", {
            ...i,
            label: "2 Columns 67/33",
            mediaReact: u.jsxs(K, {
                ...o,
                children: [u.jsx(q, {className: pe(l, "gs-utl-basis-2/3")}), u.jsx(q, {className: pe(l, "gs-utl-basis-1/3")})]
            }),
            content: `<mj-section>
      <mj-column width="67%"></mj-column>
      <mj-column width="33%"></mj-column>
    </mj-section>`
        }), c("mj-2-columns-75-25", {
            ...i,
            label: "2 Columns 75/25",
            mediaReact: u.jsxs(K, {
                ...o,
                children: [u.jsx(q, {className: pe(l, "gs-utl-basis-3/4")}), u.jsx(q, {className: pe(l, "gs-utl-basis-1/4")})]
            }),
            content: `<mj-section>
      <mj-column width="75%"></mj-column>
      <mj-column width="25%"></mj-column>
    </mj-section>`
        }), c("mj-3-columns", {
            ...i,
            label: "3 Columns",
            mediaReact: u.jsxs(K, {
                ...o,
                children: [u.jsx(q, {className: l, grow: !0}), u.jsx(q, {
                    className: l,
                    grow: !0
                }), u.jsx(q, {className: l, grow: !0})]
            }),
            content: `<mj-section>
        <mj-column></mj-column>
        <mj-column></mj-column>
        <mj-column></mj-column>
      </mj-section>`
        }), c("mj-3-columns-25-25-50", {
            ...i,
            label: "3 Columns 25/25/50",
            mediaReact: u.jsxs(K, {
                ...o,
                children: [u.jsx(q, {className: pe(l, "gs-utl-basis-1/4")}), u.jsx(q, {className: pe(l, "gs-utl-basis-1/4")}), u.jsx(q, {className: pe(l, "gs-utl-basis-2/4")})]
            }),
            content: `<mj-section>
        <mj-column width="25%"></mj-column>
        <mj-column width="25%"></mj-column>
        <mj-column width="50%"></mj-column>
      </mj-section>`
        }), c("mj-3-columns-25-50-25", {
            ...i,
            label: "3 Columns 25/50/25",
            mediaReact: u.jsxs(K, {
                ...o,
                children: [u.jsx(q, {className: pe(l, "gs-utl-basis-1/4")}), u.jsx(q, {className: pe(l, "gs-utl-basis-2/4")}), u.jsx(q, {className: pe(l, "gs-utl-basis-1/4")})]
            }),
            content: `<mj-section>
        <mj-column width="25%"></mj-column>
        <mj-column width="50%"></mj-column>
        <mj-column width="25%"></mj-column>
      </mj-section>`
        }), c("mj-3-columns-50-25-25", {
            ...i,
            label: "3 Columns 50/25/25",
            mediaReact: u.jsxs(K, {
                ...o,
                children: [u.jsx(q, {className: pe(l, "gs-utl-basis-2/4")}), u.jsx(q, {className: pe(l, "gs-utl-basis-1/4")}), u.jsx(q, {className: pe(l, "gs-utl-basis-1/4")})]
            }),
            content: `<mj-section>
        <mj-column width="50%"></mj-column>
        <mj-column width="25%"></mj-column>
        <mj-column width="25%"></mj-column>
      </mj-section>`
        }), c("mj-4-columns", {
            ...i,
            label: "4 Columns",
            mediaReact: u.jsxs(K, {
                ...o,
                children: [u.jsx(q, {className: l, grow: !0}), u.jsx(q, {
                    className: l,
                    grow: !0
                }), u.jsx(q, {className: l, grow: !0}), u.jsx(q, {className: l, grow: !0})]
            }),
            content: `<mj-section>
        <mj-column></mj-column>
        <mj-column></mj-column>
        <mj-column></mj-column>
        <mj-column></mj-column>
      </mj-section>`
        })
    }

    const c$ = (e, t) => ({
            [Xe.web]: r => Vm(r, t),
            [Xe.document]: r => Vm(r, t),
            [Xe.react]: r => Vm(r, t),
            [Xe.email]: r => a$(r, t)
        })[e], ol = "https://cdn.jsdelivr.net/npm/",
        Um = {id: "gjs-blocks-basic", src: `js/build/grapesjs-blocks-basic.min.js`},
        u$ = {id: "grapesjs-plugin-forms", src: `js/build/grapesjs-plugin-forms.min.js`},
        Wm = {id: "grapesjs-parser-postcss", src: `js/build/grapesjs-parser-postcss.min.js`},
        Gm = {
            id: "grapesjs-plugin-export",
            src: `js/build/grapesjs-plugin-export.min.js`,
            options: {
                isBinary: (e, t) => {
                    const n = t.split(".")[1];
                    return /[\x00-\x08\x0E-\x1F]/.test(e) && !(n && ["html", "css"].indexOf(n) >= 0)
                }
            }
        }, f$ = {
            id: "grapesjs-mjml",
            src: `js/build/grapesjs-mjml.min.js`,
            options: {
                columnsPadding: "",
                useCustomTheme: !1,
                resetDevices: !1,
                resetBlocks: !1,
                blocks: [],
                useXmlParser: !0,
                resetStyleManager: !1
            }
        }, p$ = {
            [Xe.web]: [Um, u$, Gm, Wm],
        };

    function g$(e, t) {
        const {blocks: n} = t.appStore.sdkOptions;
        Array.isArray(n == null ? void 0 : n.default) && e.BlockManager.blocks.add(n.default), e.on("rteToolbarPosUpdate", r => {
            const o = -r.canvasOffset.left;
            r.left < o && (r.left = o)
        })
    }

    const h$ = e => e.Assets.getAll().reduce((r, o) => {
        const i = o.getSrc(), l = i.match(/^data:([^;]+);/);
        if (l) {
            const c = i.split(",")[1], d = t6(o.get("name"));
            r[i] = {mime: l[1], name: d, base64: c}
        }
        return r
    }, {}), m$ = e => e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), NS = (e, t, n = {}) => {
        let r = e;
        const o = n.pathPfx || "";
        for (const i in t) if (r.includes(i)) {
            const l = t[i];
            r = r.replace(new RegExp(m$(i), "g"), `${o}${l.name}`), l.found = !0
        }
        return r
    }, v$ = (e, t, n) => `${t || ""}${e || ""}${n || ""}`, y$ = (e, t) => {
        const n = e ? `<div ${Qd}>${e}</div>` : "", r = t ? `<div ${Qd} data-gjs-global>${t}</div>` : "";
        return `${n}${r}`
    }, b$ = async (e, t = {}) => {
        const {
                page: n,
                skipProject: r,
                assetsFolder: o = "assets",
                filenameCss: i = "style.css",
                styles: l,
                isMJML: c,
                exportConfig: d
            } = t, g = {getCustomPath: d == null ? void 0 : d.getCustomPath, ...e.config.optsHtml || {}, ...t.optionsHtml},
            m = [], v = n ? [n] : e.Pages.getAll(), b = h$(e), x = `${o}/`,
            w = e.getCss({keepUnusedStyles: !0, component: n == null ? void 0 : n.getMainComponent()}) || "",
            j = NS(w, b, {pathPfx: x}), C = l === "inline", _ = l === "skip", E = tl(e).globalPageSettings || {},
            k = v.map(T => {
                var rn, Ut, Tt;
                const O = T.getName(), A = ti(T, "title") || O, $ = ti(T, "favicon"), F = ti(T, "description"),
                    N = ti(T, "keywords"), z = ti(T, "socialTitle"), V = ti(T, "socialDescription"),
                    X = ti(T, "socialImage"), Z = Rw(ti(T, "fonts")), R = rr({page: T, key: "customCodeHead"}) ?? "",
                    B = v$(R, E.customCodeHead, Z), Q = rr({page: T, key: "customCodeBody"}) ?? "",
                    H = y$(Q, E.customCodeBody), I = T.getMainComponent(), D = e.getJs({component: I}),
                    M = D ? `<script>${D}<\/script>` : "", W = [], ce = [], ne = {asDocument: !1, ...g},
                    ue = I.toHTML(ne).replace("</body>", `${H}${M}</body>`), me = I.head;
                let ae = A && `<title>${A}</title>`, ie = $ && `<link rel="icon" href="${$}"/>`,
                    de = F && `<meta name="description" content="${F}"/>`,
                    je = N && `<meta name="keywords" content="${N}"/>`,
                    he = z && `<meta property="og:title" content="${z}"/>`,
                    Ie = V && `<meta property="og:description" content="${V}"/>`,
                    He = X && `<meta property="og:image" content="${X}"/>`, yt = '<meta charset="utf-8">',
                    kt = '<meta name="viewport" content="width=device-width,initial-scale=1">',
                    Bt = '<meta name="robots" content="index,follow">',
                    Ct = '<meta name="generator" content="GrapesJs">';
                me.components().forEach(st => {
                    const Lt = st.toHTML(g);
                    Rt.title({cmp: st}) ? ae = Lt : Rt.favicon({cmp: st}) ? ie = Lt : Rt.description({cmp: st}) ? de = Lt : Rt.keywords({cmp: st}) ? je = Lt : Rt.socialTitle({cmp: st}) ? he = Lt : Rt.socialDescription({cmp: st}) ? Ie = Lt : Rt.socialImage({cmp: st}) ? He = Lt : Rt.charset({cmp: st}) ? yt = Lt : Rt.viewport({cmp: st}) ? kt = Lt : Rt.robots({cmp: st}) ? Bt = Lt : Rt.generator({cmp: st}) && (Ct = Lt)
                }), ae && W.push(ae), yt && W.push(yt), kt && W.push(kt), Bt && W.push(Bt), Ct && W.push(Ct), de && W.push(de), je && W.push(je), he && W.push(he), Ie && W.push(Ie), He && W.push(He), ie && W.push(ie), ce.length && W.push(...ce), B && W.push(B), j && !_ && W.push(C ? `<style>${j}</style>` : `<link rel="stylesheet" href="./${i}">`);
                const pt = I.doctype || "<!DOCTYPE html>",
                    Sn = (Ut = (rn = I.docEl).__attrToString) == null ? void 0 : Ut.call(rn),
                    wt = (Tt = me.__attrToString) == null ? void 0 : Tt.call(me),
                    Dt = c ? e.runCommand("mjml-code-to-html").html : `${pt}
<html${Sn ? ` ${Sn}` : ""}>
  <head${wt ? ` ${wt}` : ""}>
    ${W.join(`
  `)}
  </head>
  ${ue}
</html>
`;
                return {filename: _m(e, T), content: NS(Dt, b, {pathPfx: x}), mimeType: "text/html"}
            });
        m.push(...k), c && v.forEach(T => {
            m.push({filename: _m(e, T, "mjml"), content: T.getMainComponent().toHTML(g), mimeType: "text/mjml"})
        });
        for (const T in b) {
            const O = b[T];
            O.found && m.push({path: o, filename: O.name, content: atob(O.base64), mimeType: O.mime})
        }
        return j && !C && !_ && m.push({
            filename: i,
            content: j,
            mimeType: "text/css"
        }), r || m.push({
            filename: "gjs-project.grapesjs",
            content: JSON.stringify(e.getProjectData()),
            mimeType: "application/json"
        }), m
    };

    function x$(e) {
        const {Components: t, Blocks: n} = e, r = o => {
            const {model: i, id: l} = o, c = i.getDefaults(), d = n.get(l), p = c.icon,
                g = d == null ? void 0 : d.get("media"),
                m = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M19 3H5c-1.11 0-2 .89-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5a2 2 0 0 0-2-2m0 2v14H5V5h14z"></path></svg>',
                v = p && p !== m && !g ? p : g || m;
            t.addType(l, {model: {defaults: {icon: v}}})
        };
        t.getTypes().forEach(r), e.on("component:type:add", r)
    }

    const w$ = (e, t) => {
            const {contextMenu: n} = t.appStore.store, {Canvas: r} = e;
            e.on(r.events.frameLoad, ({window: o, el: i}) => {
                o.document.addEventListener("contextmenu", async c => {
                    if (!n.isEnabled) return;
                    c.preventDefault();
                    const d = c.target, p = e.getModel().get("componentHovered") || e.Utils.helpers.getModel(d);
                    if (p) {
                        const g = i.getBoundingClientRect(), m = r.getZoomDecimal();
                        e.runCommand(_e.contextMenuComponent, {
                            component: p,
                            event: c,
                            x: c.clientX * m + g.left,
                            y: c.clientY * m + g.top
                        })
                    }
                })
            })
        }, Km = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="currentColor" d="M20 6c0-2.168-3.663-4-8-4S4 3.832 4 6v2c0 2.168 3.663 4 8 4s8-1.832 8-4zm-8 13c-4.337 0-8-1.832-8-4v3c0 2.168 3.663 4 8 4s8-1.832 8-4v-3c0 2.168-3.663 4-8 4"/><path fill="currentColor" d="M20 10c0 2.168-3.663 4-8 4s-8-1.832-8-4v3c0 2.168 3.663 4 8 4s8-1.832 8-4z"/></svg>`,
        Qi = "--before-content", qm = {select: !0, activate: !0, category: {id: "data-sources", label: "Data Sources"}};

    function $S(e) {
        return typeof e == "object" && e.type === $n.variable
    }

    function DS(e) {
        if ($S(e)) {
            const {path: t} = e;
            return IS(t || "")
        }
        return e
    }

    function IS(e) {
        return `{{ ${e} }}`
    }

    function S$(e) {
        const t = {};
        return e.DataSources.getAll().forEach(n => {
            const r = n.get("id");
            if (!r) return;
            const o = n.getRecords();
            if (!o) {
                t[r] = {};
                return
            }
            t[r] = o.reduce((i, l) => {
                if (!l) return i;
                const c = {...l.attributes};
                return delete c.__p, delete c.id, {...i, [l.id]: c}
            }, {})
        }), t
    }

    function VS(e) {
        return Object.entries(e || {}).map(([t, n]) => ({id: t, data: n}))
    }

    function j$(e, t) {
        var v;
        const {Components: n, I18n: r} = e, o = r.t("dataSources.collection"), i = $n.collection, l = $n.collectionItem,
            c = "data-type-data-collection",
            d = '<svg viewBox="0 0 24 24"><path d="M2 14H8V20H2M16 8H10V10H16M2 10H8V4H2M10 4V6H22V4M10 20H16V18H10M10 16H22V14H10" /></svg>',
            p = (v = t.appStore.sdkOptions.dataSources) == null ? void 0 : v.blocks, g = b => {
                const x = b.is(i) ? b : b.closestType(i);
                if (!x) return;
                const w = "dataCollectionPicker", j = {
                    id: w,
                    header: !1,
                    layout: {
                        type: "panelDataCollectionPicker",
                        component: x,
                        onConfirm: () => e.runCommand(_e.layoutRemove, {id: w})
                    },
                    placer: {type: "dialog", title: r.t("dataSources.editCollection"), size: "l"}
                };
                e.runCommand(_e.layoutToggle, {...j})
            }, m = ({items: b, component: x}) => [{id: `open-${i}-picker`, label: Km, command: () => g(x)}, ...b];
        n.addType(l, {
            isComponent: b => el(b, l),
            model: {
                defaults: {
                    name: r.t("dataSources.collectionItem"),
                    copyable: !1,
                    emptyState: !0,
                    icon: '<svg viewBox="0 0 24 24"><path d="M22 13H14V11H22V13M22 7H14V9H22V7M14 17H22V15H14V17M12 9V15C12 16.1 11.1 17 10 17H4C2.9 17 2 16.1 2 15V9C2 7.9 2.9 7 4 7H10C11.1 7 12 7.9 12 9M10.5 15L8.3 12L6.5 14.3L5.3 12.8L3.5 15H10.5Z" /></svg>',
                    toolbarItems: m
                }
            }
        }), n.addType(i, {
            isComponent: b => Ac(b, c) || el(b, i),
            block: p && {
                label: o,
                media: d,
                content: {
                    type: i,
                    components: {type: l},
                    dataResolver: {startIndex: 0, endIndex: 1, dataSource: {type: "data-variable", path: ""}}
                }, ...qm
            },
            model: {
                defaults: {icon: d, name: o, attributes: {[c]: !0}, toolbarItems: m}, init() {
                    const b = "collection-";
                    if (!this.getCollectionId()) {
                        const w = b + Math.random().toString(36).substring(2, 9);
                        this.setCollectionId(w)
                    }
                }
            },
            view: {
                onActive(b) {
                    b == null || b.stopPropagation(), g(this.model)
                }
            }
        })
    }

    function C$(e, t) {
        var j;
        const {Components: n, I18n: r} = e, o = r.t("dataSources.condition"), i = r.t("dataSources.conditionTrue"),
            l = r.t("dataSources.conditionFalse"), c = r.t("dataSources.conditionElse"),
            d = (j = t.appStore.sdkOptions.dataSources) == null ? void 0 : j.blocks, p = $n.condition,
            g = $n.conditionTrue, m = $n.conditionFalse, v = "data-type-data-condition", b = `<svg viewBox="0 0 24 24">
  <path d="M14,4L16.29,6.29L13.41,9.17L14.83,10.59L17.71,7.71L20,10V4M10,4H4V10L6.29,7.71L11,12.41V20H13V11.59L7.71,6.29" />
</svg>`, x = C => {
                const _ = C.is(p) ? C : C.closestType(p);
                if (!_) return;
                const E = "dataConditionPicker", k = {
                    id: E,
                    header: !1,
                    layout: {
                        type: "panelDataConditionPicker",
                        component: _,
                        onConfirm: () => e.runCommand(_e.layoutRemove, {id: E})
                    },
                    placer: {type: "dialog", title: r.t("dataSources.editCondition"), size: "l"}
                };
                e.runCommand(_e.layoutToggle, {...k})
            }, w = ({items: C, component: _}) => [{id: `open-${p}-picker`, label: Km, command: () => x(_)}, ...C];
        n.addType(g, {
            isComponent: C => el(C, g),
            model: {
                defaults: {
                    tagName: "span",
                    name: i,
                    copyable: !1,
                    emptyState: {styleIn: "display: inherit;"},
                    icon: '<svg viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" /></svg>',
                    toolbarItems: w
                }
            }
        }), n.addType(m, {
            isComponent: C => el(C, m),
            model: {
                defaults: {
                    tagName: "span",
                    name: l,
                    copyable: !1,
                    emptyState: {styleIn: "display: inherit;"},
                    icon: '<svg viewBox="0 0 24 24"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>',
                    toolbarItems: w
                }
            }
        }), n.addType(p, {
            isComponent: C => Ac(C, v) || el(C, p),
            block: d && {
                label: o,
                media: b,
                content: {
                    type: p,
                    dataResolver: {
                        condition: {
                            logicalOperator: "and",
                            statements: [{left: 1, operator: ">", right: 0}]
                        }
                    },
                    components: [{type: g}, {type: m}]
                }, ...qm
            },
            model: {
                defaults: {
                    icon: b,
                    name: o,
                    textable: !0,
                    stylable: !1,
                    tagName: "span",
                    attributes: {[v]: !0},
                    toolbarItems: w
                }
            },
            view: {
                events: () => ({dblclick: "onActive"}), init() {
                    const {em: C} = this;
                    this.listenTo(C, Jn.toggleDataSourcesPreview, this.renderDataResolver)
                }, onActive(C) {
                    e.getEditing() || (C == null || C.stopPropagation(), x(this.model))
                }, getConditionString() {
                    const {model: C} = this, {operator: _, statements: E = []} = C.getCondition(),
                        k = _ === "AND" ? " AND " : " OR ", O = E.map(A => {
                            const {left: $ = "", operator: F = "", right: N = ""} = A, z = DS($), V = DS(N);
                            return `(${z} ${F} ${V})`
                        }).join(k);
                    return `${o}: ${O}`
                }, renderDataResolver() {
                    const C = this.model, _ = C.getIfTrueContent(), E = C.getIfFalseContent(),
                        k = _ == null ? void 0 : _.getEl(), T = E == null ? void 0 : E.getEl();
                    if (e.runCommand(_e.getStateDataSource).showPlaceholder) {
                        k && (k.style.display = "", k.style.setProperty(Qi, `"${this.getConditionString()} "`)), T && (T.style.display = "", T.style.setProperty(Qi, `" ${c} "`));
                        return
                    }
                    const A = C.isTrue();
                    k && (k.style.removeProperty(Qi), k.style.display = A ? "" : "none"), T && (T.style.removeProperty(Qi), T.style.display = A ? "none" : "")
                }
            }
        })
    }

    function E$(e, t) {
        var g;
        const {Components: n, I18n: r} = e, o = $n.variable, i = "data-type-data-variable", l = "Variable",
            c = `<svg viewBox="0 0 24 24"><path fill="currentColor" d="${Cd.codeBraces}"/></svg>`,
            d = (g = t.appStore.sdkOptions.dataSources) == null ? void 0 : g.blocks, p = m => {
                const v = "dataVariablePicker", b = {
                    id: v,
                    header: !1,
                    layout: {
                        type: "panelDataVariablePicker",
                        component: m,
                        onConfirm: () => e.runCommand(_e.layoutRemove, {id: v})
                    },
                    placer: {type: "dialog", title: r.t("dataSources.editVariable"), size: "l"}
                };
                e.runCommand(_e.layoutToggle, {...b})
            };
        n.addType(o, {
            isComponent: m => Ac(m, i) || el(m, o),
            block: d && {
                label: l,
                media: c,
                content: {type: o, dataResolver: {path: "", defaultValue: r.t("dataSources.defaultValue")}}, ...qm
            },
            model: {
                defaults: {
                    icon: c,
                    name: l,
                    textable: !0,
                    tagName: "span",
                    attributes: {[i]: !0},
                    toolbarItems: ({items: m, component: v}) => [{
                        id: `open-${o}-modal`,
                        label: Km,
                        command: () => p(v)
                    }, ...m]
                }
            },
            view: {
                events: () => ({dblclick: "onActive"}), init() {
                    const {em: m} = this;
                    this.listenTo(m, Jn.toggleDataSourcesPreview, this.renderDataResolver)
                }, onActive(m) {
                    e.getEditing() || (m == null || m.stopPropagation(), p(this.model))
                }, renderDataResolver() {
                    const {model: m, el: v} = this;
                    if (e.runCommand(_e.getStateDataSource).showPlaceholder) {
                        const x = m.getPath();
                        v.textContent = "", v.style.setProperty(Qi, `"${IS(x)}"`);
                        return
                    }
                    v.style.removeProperty(Qi), v.textContent = m.getDataValue()
                }
            }
        })
    }

    const Ym = (e, t, n) => {
        const r = e.Components.getType(t);
        if (!r) {
            console.warn(`Component type ${t} not found`);
            return
        }
        const o = r.model;
        e.Components.addType(t, {
            model: {
                ...n, toHTML(i = {}) {
                    var c;
                    const {exporter: l} = i;
                    return l ? ((c = n.toHTML) == null ? void 0 : c.call(this, i)) ?? "" : o.prototype.toHTML.call(this, i) ?? ""
                }
            }
        })
    };

    function sf({component: e, value: t, getCustomPath: n}) {
        if ($S(t) && !t.collectionId && n) {
            const r = t.path ?? "", o = r.split(".");
            return {...t, path: n({component: e, path: r, paths: o})}
        }
        return t
    }

    function P$(e) {
        Ym(e, $n.variable, {
            toHTML(t) {
                var c;
                const n = t.exporter, r = this.tagName, o = this.__attrToString(t),
                    i = (c = this.getDataResolver) == null ? void 0 : c.call(this),
                    l = sf({component: this, value: i, getCustomPath: t == null ? void 0 : t.getCustomPath});
                return `<${r}${o ? ` ${o}` : ""}>${n.getVariableSyntax({component: this, dataResolver: l})}</${r}>`
            }
        }), Ym(e, $n.condition, {
            toHTML(t) {
                var m, v;
                const n = t.exporter, r = {component: this}, o = t == null ? void 0 : t.getCustomPath,
                    i = this.components(), [l, c] = (i == null ? void 0 : i.models) ?? [],
                    d = (m = this.getDataResolver) == null ? void 0 : m.call(this),
                    p = ((v = this.resolveCondition) == null ? void 0 : v.call(this, d == null ? void 0 : d.condition, o)) ?? {};
                let g = "";
                return c && (g = `
${n.getConditionElseSyntax(r)}
  ${c.toHTML(t) ?? ""}`), `
${n.getConditionalStartSyntax({...r, dataResolver: {condition: p}})}
  ${(l == null ? void 0 : l.toHTML(t)) ?? ""}${g}
${n.getConditionalEndSyntax(r)}
`
            }, resolveCondition(t, n) {
                var o, i;
                if (!t) return {};
                if (t.operator === "and" || t.operator === "or") return {
                    operator: t.operator,
                    statements: ((i = (o = t.statements) == null ? void 0 : o.map) == null ? void 0 : i.call(o, l => {
                        var c;
                        return ((c = this.resolveCondition) == null ? void 0 : c.call(this, l, n)) ?? {}
                    })) ?? []
                };
                const r = {component: this, getCustomPath: n};
                return {...t, left: sf({...r, value: t.left}), right: sf({...r, value: t.right})}
            }
        }), Ym(e, $n.collection, {
            toHTML(t) {
                const n = t.exporter, r = {component: this}, o = this.tagName, i = this.__attrToString(t),
                    l = this.getDataResolver(), c = {
                        ...l,
                        dataSource: sf({
                            component: this,
                            value: l == null ? void 0 : l.dataSource,
                            getCustomPath: t == null ? void 0 : t.getCustomPath
                        })
                    }, d = this.components().at(0);
                return `
<${o}${i ? ` ${i}` : ""}>${n.getCollectionStartSyntax({...r, dataResolver: c})}
  ${(d == null ? void 0 : d.toHTML(t)) ?? ""}
${n.getCollectionEndSyntax(r)}</${o}>
`
            }
        })
    }

    const _$ = function (e, t) {
        const {Components: n, Canvas: r, events: o} = e;
        if (!n.getType($n.conditionTrue)) return;
        const {dataSources: i} = t.appStore.sdkOptions;
        i != null && i.globalData && e.on(o.projectLoad, () => {
            e.DataSources.add({id: Ic.globalData, records: VS(i.globalData), skipFromStorage: !0})
        }), e.on(r.events.frameLoadBody, ({window: l}) => {
            const c = "data-outline-ds", d = l.document;
            if (d.querySelector(`style[${c}]`)) return;
            const g = d.createElement("style"),
                m = [$n.variable, $n.condition, $n.collection].map(v => `.gjs-dashed [data-gjs-highlightable][data-gjs-type="${v}"]`);
            g.setAttribute(c, ""), g.textContent = `
      ${m.join(",")} {
        outline: 2px dotted #8b5cf6;
      }

      .gjs-dashed *[data-gjs-type="data-condition-true-content"],
      .gjs-dashed *[data-gjs-type="data-condition-false-content"] {
        outline: none !important;
      }

      [data-gjs-type="data-variable"]::before,
      [data-gjs-type="data-condition-true-content"]::before,
      [data-gjs-type="data-condition-false-content"]::before {
          content: var(${Qi});
          font-style: italic;
          color: #666;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          max-width: 100%;
      }
    `, d.head.appendChild(g)
        }), E$(e, t), C$(e, t), j$(e, t), P$(e)
    };

    function k$(e) {
        const {Components: t} = e, n = r => {
            const {id: o, model: i} = r;
            if (o === "custom-code") {
                const l = "<span>Insert here your custom code</span>";
                t.addType(o, {
                    model: {
                        defaults: {
                            emptyState: !0,
                            icon: '<svg viewBox="0 0 24 24"><path d="M14.6 16.6l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4m-5.2 0L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4z"></path></svg>',
                            classes: "gjs-custom-code",
                            components: l,
                            "custom-code-plugin__code": l,
                            styles: ".gjs-custom-code { padding: 5px; }"
                        }
                    }
                })
            }
            if (o === "typed") {
                const l = i.getDefaults().traits.map(c => c.name === "strings" ? {
                    ...c, type: "stack", addItem(d) {
                        return {id: d, label: `New string ${d}`}
                    }, getValue({component: d}) {
                        return d.get("strings").map((p, g) => ({id: `${g}`, label: p}))
                    }, setValue: ({component: d, value: p}) => {
                        const g = p.map(m => m.label);
                        d.set({strings: g}), d.trigger("rerender")
                    }, properties: [{name: "label"}]
                } : c);
                t.addType(o, {
                    model: {
                        defaults: {
                            traits: l,
                            strings: ["These are the default values...!!!", "Use your own strings from Properties!", "Have a great day!"],
                            icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"><path d="M212.3 44l2.3 49.6h-6A60 60 0 00204 75c-3.2-6-7.5-10.5-12.9-13.3a44.9 44.9 0 00-21.1-4.3h-29.8V219c0 13 1.4 21 4.2 24.3 4 4.4 10 6.6 18.2 6.6h7.4v5.7H80.2V250h7.5c9 0 15.3-2.7 19-8.2 2.4-3.3 3.5-10.9 3.5-22.7V57.3H84.8a71 71 0 00-21.1 2.2 29 29 0 00-13.9 11.3 46.1 46.1 0 00-6.9 22.8H37L39.5 44h172.8zM245 22h18v256h-18z"/></svg>',
                            classes: "gjs-typed",
                            styles: `
                  .gjs-typed {
                    padding: 5px;
                  }
                `
                        }
                    }
                })
            }
            if (["tabs", "tab-content", "tab-contents", "tab", "tab-container"].indexOf(o) >= 0) {
                const c = {
                    emptyState: !0, icon: o === "tabs" ? `
            <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
              <path d="M22 9.3c0-.8-.5-1.3-1.3-1.3H3.4C2.5 8 2 8.5 2 9.3v7.4c0 .8.5 1.3 1.3 1.3h17.4c.8 0 1.3-.5 1.3-1.3V9.3zM21 17H3V9h18v8z" fill-rule="nonzero"/><rect x="3" y="5" width="4" height="2" rx=".5"/><rect x="8" y="5" width="4" height="2" rx=".5"/><rect x="13" y="5" width="4" height="2" rx=".5"/>
            </svg>
          ` : void 0
                };
                o === "tab" && (c.traits = [{
                    type: "button", label: !1, text: "Style Active", command: d => {
                        d.select(), d.runCommand(FS), setTimeout(() => d.Selectors.select(".tab.tab-active"))
                    }
                }]), t.addType(o, {model: {defaults: c}})
            }
        };
        e.on("component:type:add", n)
    }

    const T$ = (e, t) => {
            const n = t.appStore.store.globalStylesStore;
            e.on(e.events.projectLoad, ({loaded: r}) => r && n.onLoad())
        }, O$ = (e, t) => {
            const {assetsStore: n} = t.appStore.store;
            if (n.onCloudOrCustomUpload) {
                const {Assets: r} = e;
                r.getConfig().uploadFile = o => n.handleUpload(o)
            }
        }, L$ = (e, t) => {
            t.runCommand(_e.fontAdd, {font: e})
        }, Xm = (e, {onSelect: t, ...n} = {}) => {
            const r = "font",
                l = e.runCommand(_e.assetProviderGet).filter(c => zt(c.types) ? c.types === r : c.types.includes(r))[0];
            if (!l) {
                e.em.logWarning("No font provider found");
                return
            }
            e.Assets.open({
                types: [],
                modalTitle: e.I18n.t("fontManager.selectFont"),
                optionalProvider: !1,
                typeId: r,
                providerId: l.id,
                onSelect: c => {
                    const d = c.assetProps;
                    L$(d.customData.font, e), t == null || t(c)
                },
                content: {header: {addUrl: !1, upload: !1}, itemsPerRow: 1}, ...n
            })
        }, M$ = () => {
            const {baseApiUrl: e} = iu();
            return `${e}/sdk/projects`
        }, HS = e => `${M$()}/${e}`, A$ = async ({licenseKey: e, projectId: t, ...n}) => {
            const r = await Mo.put(HS(t), {body: JSON.stringify(n), params: {}});
            return r == null ? void 0 : r.result
        }, R$ = async (e, t) => await Mo.put(t, {body: e, headers: {"Content-Type": "application/json"}}),
        N$ = async (e, t, n, r) => {
            const o = JSON.stringify(e), i = await A$({
                licenseKey: t,
                projectId: n,
                fileMetadata: {size: new Blob([o]).size},
                identityId: r,
                name: e.name,
                description: e.description
            });
            if (!i) throw new Error("Project not found");
            const {uploadUrl: l} = i;
            await R$(o, l)
        }, $$ = (e, t, n) => Mo.get(HS(t), {params: {}}),
        D$ = async e => await Mo.get(e), I$ = async (e, t, n, r) => {
            const o = await $$(t, n, r), i = o == null ? void 0 : o.result, l = o == null ? void 0 : o.errorData;
            if (!i && (l != null && l.notFoundInDb)) return {id: n, project: {}};
            if (!i) throw new Error("Project not found");
            const {downloadUrl: c} = i, d = await D$(c);
            if (!d || d instanceof Error) throw new Error("Project download failed");
            return {id: n, project: d}
        }, V$ = (e, t) => {
            const {appEditorStore: n, toastStore: r, i18nStore: o} = t.appStore.store, {
                isUsingProjectSelfHosted: i,
                isUsingProjectCloud: l,
                sdkOptions: c
            } = n, d = c.storage || {}, {project: p, onLoad: g, onSave: m, autosaveChanges: v, autosaveIntervalMs: b} = d;
            let x, w, j, C;
            if (i) j = g, C = m, x = v, w = b; else if (l) {
                const O = c.licenseKey, A = n.sdkProjectId, $ = n.sdkIdentityId, F = 10, N = 1e4;
                C = ({project: z}) => N$(z, O, A, $), j = ({editor: z}) => I$(z, O, A, $), x = Math.max(F, v ?? F), b && (w = Math.max(N, b))
            }
            const {Storage: _, events: E} = e, {events: k} = _;
            let T = !1;
            if (e.once(E.projectLoad, O => {
                T = !!O.loaded
            }), e.once("change:readyLoad", () => {
                var A;
                const O = (A = c.project) == null ? void 0 : A.default;
                !T && O && e.loadProjectData(O)
            }), e.on(k.startStore, () => n.setIsSaving(!0)), e.on(k.endStore, () => n.setIsSaving(!1)), (j || p) && C) {
                const O = "remote";
                _.setCurrent(O), _.add(O, {
                    async load() {
                        return p || (await j({editor: e})).project
                    }, async store(A) {
                        await C({project: A, editor: e})
                    }
                }), e.on(k.errorLoad, A => {
                    r.addError("storage-error-load", {header: o.t("storageManager.errorLoad"), content: A.message})
                }), e.on(k.errorStore, A => {
                    r.addError("storage-error-store", {header: o.t("storageManager.errorStore"), content: A.message})
                }), x && _.setStepsBeforeSave(x), w && e.onReady(() => {
                    const A = setInterval(async () => {
                        e.getDirtyCount() > 0 && !n.isSaving && await e.store()
                    }, w);
                    e.on("destroy", () => clearInterval(A))
                })
            }
        }, af = "select-target", FS = "enable-sm";

    function H$(e, t) {
        var Z, R, B, Q;
        const {
                appEditorStore: n,
                blockManagerStore: r,
                toastStore: o,
                modalStore: i,
                layoutStore: l,
                contextMenu: c,
                assetsStore: d,
                fontsStore: p
            } = t.appStore.store, {projectIdToLoad: g, nextProjectData: m, sdkOptions: v} = n, b = () => r.toggleOpen(),
            x = () => n.toggleLeftSidebar(), w = () => n.toggleRightSidebar(), j = e.getConfig(), {
                Assets: C,
                Storage: _,
                Commands: E
            } = e, k = E.events, T = e.events,
            O = (R = (Z = v.gjsOptions) == null ? void 0 : Z.assetManager) == null ? void 0 : R.custom;
        let A = !1;
        if (C.all.model.prototype.idAttribute = "src", kn(O) && (C.getConfig().custom = O), m && (j.projectData = m, n.setNextProjectData()), g) {
            const H = _.getConfig().options;
            H && (H.local.key = g)
        }
        e.on(T.projectLoad, ({project: H}) => {
            var I;
            t.appStore.setProjectDataCustom(H.custom || {projectType: (I = n.sdkOptions.project) == null ? void 0 : I.type}), p.loadFonts()
        }), e.on(T.projectGet, ({project: H}) => {
            H.custom = tl(e)
        }), e.RichTextEditor.getConfig().custom = !0;
        const {Canvas: $} = e, F = xs(() => n.setCanvasPanning(!1), 200);
        e.on($.events.coords, () => {
            n.setCanvasPanning(!0), F()
        }), e.on($.events.frameLoad, ({el: H}) => {
            H.tabIndex = -1
        });
        const {Parser: N} = e, z = ((B = n.sdkOptions.parser) == null ? void 0 : B.showErrors) !== !1;
        (Q = N.events) != null && Q.css && z && e.on(N.events.css, H => {
            const {error: I} = H;
            if (I) {
                const D = zt(I) ? I : I.name && I.reason ? `${I.name}: ${I.reason}` : I.message;
                o.addError("css-error", {header: "CSS Parser Error", content: D})
            }
        }), [{id: "toggle-lsidebar", keys: "alt+ctrl+,", cmd: x}, {
            id: "toggle-lsidebar2",
            keys: "alt+⌘+,",
            cmd: x
        }, {id: "toggle-rsidebar", keys: "alt+ctrl+., alt+⌘+.", cmd: w}, {
            id: "show-blocks",
            keys: "ctrl+b, ⌘+b",
            cmd: b
        }, {id: "add-symbol", keys: "alt+ctrl+k, alt+⌘+k", cmd: _e.symbolAdd}, {
            id: "detach-symbol",
            keys: "shift+alt+ctrl+k, shift+alt+⌘+k",
            cmd: _e.symbolDetach
        }].forEach(({id: H, keys: I, cmd: D}) => {
            e.Keymaps.add(`preset:${H}`, I, D, {prevent: !0})
        }), e.on(`${k.runCommand}core:preview`, () => {
            n.setPreview(!0), r.setOpen(!1), AS(e, !1)
        }), e.on(`${k.stopCommand}core:preview`, () => {
            n.setPreview(!1), AS(e, !0), setTimeout(() => {
                e.refresh()
            }, n.transitionTime)
        });
        const V = "target-selection", {Components: X} = e;
        E.add(af, {
            opts: {}, init() {
                this.beforeSelect = this.beforeSelect.bind(this)
            }, onComponentHover(H, I) {
                const D = {id: V, type: "target", component: I};
                I ? $.addSpot(D) : $.removeSpots(D)
            }, beforeSelect(H, I = {}) {
                I.abort = !0, I.useValid = !1, this.opts.onSelect(H), e.stopCommand(af)
            }, run(H, I, D) {
                this.opts = D, e.on("component:select:before", this.beforeSelect), e.on("change:componentHovered", this.onComponentHover)
            }, stop() {
                e.off("component:select:before", this.beforeSelect), e.off("change:componentHovered", this.onComponentHover), $.removeSpots({id: V}), n.setSelectingTarget(!1)
            }
        }), E.add(FS, () => {
            n.setSelectedDesignerTab("style")
        }), E.add(_e.toastAdd, (H, I, D) => {
            o.add(D.id, D)
        }), E.add(_e.toastRemove, (H, I, D) => {
            o.remove(D.id)
        }), E.add(_e.dialogOpen, (H, I, D) => {
            i.open(D)
        }), E.add(_e.dialogClose, () => {
            i.close()
        }), E.add(_e.sidebarLeftGet, () => ({visible: n.isLeftSidebarOpen})), E.add(_e.sidebarLeftSet, (H, I, D) => {
            n.setLeftSidebarOpen(!!D.visible)
        }), E.add(_e.sidebarLeftToggle, () => {
            n.setLeftSidebarOpen(!n.isLeftSidebarOpen)
        }), E.add(_e.sidebarRightGet, () => ({visible: n.isRightSidebarOpen})), E.add(_e.sidebarRightSet, (H, I, D) => {
            n.setRightSidebarOpen(!!D.visible)
        }), E.add(_e.sidebarRightToggle, () => {
            n.setRightSidebarOpen(!n.isRightSidebarOpen)
        }), E.add(_e.sidebarTopGet, () => ({visible: n.isTopSidebarOpen})), E.add(_e.sidebarTopSet, (H, I, D) => {
            n.setTopSidebarOpen(!!D.visible)
        }), E.add(_e.sidebarTopToggle, () => {
            n.setTopSidebarOpen(!n.isTopSidebarOpen)
        }), E.add(_e.sidebarBottomGet, () => ({visible: n.isBottomSidebarOpen})), E.add(_e.sidebarBottomSet, (H, I, D) => {
            n.setBottomSidebarOpen(!!D.visible)
        }), E.add(_e.sidebarBottomToggle, () => {
            n.setBottomSidebarOpen(!n.isBottomSidebarOpen)
        }), E.add(_e.layoutAdd, (H, I, D) => {
            D.id && l.add(D.id, D)
        }), E.add(_e.layoutRemove, (H, I, D) => {
            const {id: M, ...W} = D;
            l.remove(M, W)
        }), E.add(_e.layoutToggle, (H, I, D) => {
            const {id: M, ...W} = D;
            M && (l.get(M) ? l.remove(M, W) : l.add(M, W))
        }), E.add(_e.layoutUpdate, (H, I, D) => {
            const M = D;
            e.runCommand(_e.layoutRemove, {
                id: M.id,
                layout: {placer: {...M.placer, skipCleanup: !0}},
                force: !0
            }), setTimeout(() => e.runCommand(_e.layoutAdd, {...M}))
        }), E.add(_e.layoutGet, (H, I, D) => [Bs(l.get(D.id))]), E.add(_e.layoutConfigGet, () => Bs(l.customConfig)), E.add(_e.layoutConfigSet, (H, I, D) => {
            const M = D;
            l.setCustomConfig(M)
        }), E.add(_e.getStateTheme, () => n.publicStateTheme), E.add(_e.setStateTheme, (H, I, D) => n.setPublicStateTheme(D)), E.add(_e.getPagesConfig, () => n.sdkPagesConfig), E.add(_e.setPagesConfig, (H, I, D) => {
            const {config: M} = D || {};
            kn(M) && n.setSdkPagesConfig(M)
        }), E.add(_e.getPageSettings, () => JSON.parse(JSON.stringify(n.panelPageSettings))), E.add(_e.setPageSettings, (H, I, D) => {
            n.setPanelPageSettings(D)
        }), E.add(_e.projectFiles, (H, I, D) => {
            var ne, ue;
            const M = (ne = n.sdkOptions.dataSources) == null ? void 0 : ne.exportConfig,
                W = ((ue = D.exportConfig) == null ? void 0 : ue.exportPreset) ?? M,
                ce = {isMJML: n.isProjectTypeEmail, exportConfig: W, ...D};
            return b$(H, ce)
        }), E.add(_e.getBlocksPanel, () => ({isOpen: r.isOpen})), E.add(_e.setBlocksPanel, (H, I, D) => {
            const M = D || {};
            kn(M.isOpen) && r.setOpen(M.isOpen)
        }), E.add(_e.canvasReload, () => {
            const H = e.getSelected(), I = $.getCanvasView(), {frames: D} = $.canvas;
            D.once("loaded:all", () => {
                const M = H == null ? void 0 : H.getView();
                M && !M.isInViewport() && M.el.scrollIntoView({block: "center"})
            }), I.renderFrames()
        }), E.add(_e.contextMenuComponent, (H, I, D) => {
            const {component: M, ...W} = D;
            c.showForComponent(M, W)
        }), E.add(_e.getStateContextMenu, () => c.publicState), E.add(_e.setStateContextMenu, (H, I, D) => {
            c.setPublicState(D)
        }), E.add(_e.symbolAdd, (H, I, D) => {
            const M = D.component || e.getSelected();
            if (M) return X.getSymbolInfo(M).isSymbol ? o.add("skip-symbol", {
                header: "The selected element is already a symbol",
                variant: Nn.Warning
            }) : X.addSymbol(M)
        }), E.add(_e.symbolDetach, (H, I, D) => {
            const M = D.component || e.getSelected();
            M && X.getSymbolInfo(M).isRoot && X.detachSymbol(M)
        }), E.add(_e.symbolOverride, (H, I, D) => {
            const M = D.component || e.getSelected();
            M && (M.setSymbolOverride(D.override), e.Layers.updateLayer(M))
        }), E.add(_e.symbolPropagateStyles, (H, I, D) => {
            const M = D.component || e.getSelected();
            if (!M) return;
            const {Css: W} = e, ce = W.getComponentRules(M, {current: !0})[0];
            if (ce) {
                const {state: ne, mediaText: ue} = ce.attributes, me = ce.getStyle();
                X.getSymbolInfo(M).relatives.forEach(ae => {
                    W.setIdRule(ae.getId(), me, {state: ne, mediaText: ue})
                })
            }
            D.deep && M.components().forEach(ne => e.runCommand(_e.symbolPropagateStyles, {...D, component: ne}))
        }), E.add(_e.assetProviderGet, () => Bs(d.allProviders)), E.add(_e.assetProviderAdd, (H, I, {
            provider: D,
            index: M
        }) => {
            d.addProvider(D, M)
        }), E.add(_e.assetProviderRemove, (H, I, {id: D}) => {
            const M = d.allProviders.filter(W => W.id !== D);
            d.setAllProviders(M)
        }), E.add(_e.fontGet, () => Bs(p.fonts)), E.add(_e.fontAdd, (H, I, {font: D}) => {
            p.addFont(D)
        }), E.add(_e.fontRemove, (H, I, {family: D}) => {
            p.removeFont(D)
        }), E.add(_e.fontManagerOpen, (H, I, D) => {
            Xm(H, D)
        }), E.add(_e.menuFontLoad, (H, I, {font: D}) => Cm(D, !1)), E.add(_e.toggleStateDataSource, () => (A = !A, e.trigger(Jn.toggleDataSourcesPreview, {showPlaceholder: A}), e.refresh({tools: !0}), {showPlaceholder: A})), E.add(_e.getStateDataSource, () => ({showPlaceholder: A})), E.add(_e.dataSourceSetGlobalData, (H, I, {globalData: D}) => {
            const M = VS(D);
            return e.DataSources.get(Ic.globalData).setRecords(M)
        }), E.add(_e.setDragAbsolute, (H, I, {enabled: D}) => {
            n.setIsDraggingAbsolute(!!D)
        }), E.add(_e.dataSourceSetImporter, (H, I, D) => {
            e.on(e.Parser.events.htmlBefore, M => {
                M.input = D.import(M.input)
            })
        }), E.add(_e.dataSourceSetExporter, (H, I, D) => {
            e.config.optsHtml = {...e.config.optsHtml, exporter: D}
        }), O$(e, t), V$(e, t), T$(e, t), k$(e), x$(e), i$(e), w$(e, t), _$(e, t)
    }

    const F$ = /\s(?![^(]*\))/, zS = /^-?[0-9]+[a-zA-Z%]{0,}$/;

    function BS(e) {
        const t = e.split(F$), n = t.indexOf("inset") >= 0, r = t.filter(g => g !== "inset"),
            o = r.filter(g => !zS.test(g))[0] || "currentColor",
            i = r.filter(g => zS.test(g)), [l = "0", c = "0", d = "0", p = "0"] = i;
        return {x: l, y: c, blur: d, spread: p, inset: n, color: o}
    }

    function lf(e) {
        const t = e.indexOf("(") + 1, n = e.lastIndexOf(")");
        return {
            name: e.substring(0, t - 1).trim(),
            value: String.prototype.substring.apply(e, [t, n >= 0 ? n : void 0]).trim()
        }
    }

    var z$ = {grad: .9, turn: 360, rad: 360 / (2 * Math.PI)}, js = function (e) {
            return typeof e == "string" ? e.length > 0 : typeof e == "number"
        }, xn = function (e, t, n) {
            return t === void 0 && (t = 0), n === void 0 && (n = Math.pow(10, t)), Math.round(n * e) / n + 0
        }, Kr = function (e, t, n) {
            return t === void 0 && (t = 0), n === void 0 && (n = 1), e > n ? n : e > t ? e : t
        }, US = function (e) {
            return (e = isFinite(e) ? e % 360 : 0) > 0 ? e : e + 360
        }, WS = function (e) {
            return {r: Kr(e.r, 0, 255), g: Kr(e.g, 0, 255), b: Kr(e.b, 0, 255), a: Kr(e.a)}
        }, Zm = function (e) {
            return {r: xn(e.r), g: xn(e.g), b: xn(e.b), a: xn(e.a, 3)}
        }, B$ = /^#([0-9a-f]{3,8})$/i, cf = function (e) {
            var t = e.toString(16);
            return t.length < 2 ? "0" + t : t
        }, GS = function (e) {
            var t = e.r, n = e.g, r = e.b, o = e.a, i = Math.max(t, n, r), l = i - Math.min(t, n, r),
                c = l ? i === t ? (n - r) / l : i === n ? 2 + (r - t) / l : 4 + (t - n) / l : 0;
            return {h: 60 * (c < 0 ? c + 6 : c), s: i ? l / i * 100 : 0, v: i / 255 * 100, a: o}
        }, KS = function (e) {
            var t = e.h, n = e.s, r = e.v, o = e.a;
            t = t / 360 * 6, n /= 100, r /= 100;
            var i = Math.floor(t), l = r * (1 - n), c = r * (1 - (t - i) * n), d = r * (1 - (1 - t + i) * n), p = i % 6;
            return {r: 255 * [r, c, l, l, d, r][p], g: 255 * [d, r, r, c, l, l][p], b: 255 * [l, l, d, r, r, c][p], a: o}
        }, qS = function (e) {
            return {h: US(e.h), s: Kr(e.s, 0, 100), l: Kr(e.l, 0, 100), a: Kr(e.a)}
        }, YS = function (e) {
            return {h: xn(e.h), s: xn(e.s), l: xn(e.l), a: xn(e.a, 3)}
        }, XS = function (e) {
            return KS((n = (t = e).s, {
                h: t.h,
                s: (n *= ((r = t.l) < 50 ? r : 100 - r) / 100) > 0 ? 2 * n / (r + n) * 100 : 0,
                v: r + n,
                a: t.a
            }));
            var t, n, r
        }, Uc = function (e) {
            return {
                h: (t = GS(e)).h,
                s: (o = (200 - (n = t.s)) * (r = t.v) / 100) > 0 && o < 200 ? n * r / 100 / (o <= 100 ? o : 200 - o) * 100 : 0,
                l: o / 2,
                a: t.a
            };
            var t, n, r, o
        },
        U$ = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,
        W$ = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,
        G$ = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,
        K$ = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,
        Jm = {
            string: [[function (e) {
                var t = B$.exec(e);
                return t ? (e = t[1]).length <= 4 ? {
                    r: parseInt(e[0] + e[0], 16),
                    g: parseInt(e[1] + e[1], 16),
                    b: parseInt(e[2] + e[2], 16),
                    a: e.length === 4 ? xn(parseInt(e[3] + e[3], 16) / 255, 2) : 1
                } : e.length === 6 || e.length === 8 ? {
                    r: parseInt(e.substr(0, 2), 16),
                    g: parseInt(e.substr(2, 2), 16),
                    b: parseInt(e.substr(4, 2), 16),
                    a: e.length === 8 ? xn(parseInt(e.substr(6, 2), 16) / 255, 2) : 1
                } : null : null
            }, "hex"], [function (e) {
                var t = G$.exec(e) || K$.exec(e);
                return t ? t[2] !== t[4] || t[4] !== t[6] ? null : WS({
                    r: Number(t[1]) / (t[2] ? 100 / 255 : 1),
                    g: Number(t[3]) / (t[4] ? 100 / 255 : 1),
                    b: Number(t[5]) / (t[6] ? 100 / 255 : 1),
                    a: t[7] === void 0 ? 1 : Number(t[7]) / (t[8] ? 100 : 1)
                }) : null
            }, "rgb"], [function (e) {
                var t = U$.exec(e) || W$.exec(e);
                if (!t) return null;
                var n, r, o = qS({
                    h: (n = t[1], r = t[2], r === void 0 && (r = "deg"), Number(n) * (z$[r] || 1)),
                    s: Number(t[3]),
                    l: Number(t[4]),
                    a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1)
                });
                return XS(o)
            }, "hsl"]], object: [[function (e) {
                var t = e.r, n = e.g, r = e.b, o = e.a, i = o === void 0 ? 1 : o;
                return js(t) && js(n) && js(r) ? WS({r: Number(t), g: Number(n), b: Number(r), a: Number(i)}) : null
            }, "rgb"], [function (e) {
                var t = e.h, n = e.s, r = e.l, o = e.a, i = o === void 0 ? 1 : o;
                if (!js(t) || !js(n) || !js(r)) return null;
                var l = qS({h: Number(t), s: Number(n), l: Number(r), a: Number(i)});
                return XS(l)
            }, "hsl"], [function (e) {
                var t = e.h, n = e.s, r = e.v, o = e.a, i = o === void 0 ? 1 : o;
                if (!js(t) || !js(n) || !js(r)) return null;
                var l = function (c) {
                    return {h: US(c.h), s: Kr(c.s, 0, 100), v: Kr(c.v, 0, 100), a: Kr(c.a)}
                }({h: Number(t), s: Number(n), v: Number(r), a: Number(i)});
                return KS(l)
            }, "hsv"]]
        }, ZS = function (e, t) {
            for (var n = 0; n < t.length; n++) {
                var r = t[n][0](e);
                if (r) return [r, t[n][1]]
            }
            return [null, void 0]
        }, q$ = function (e) {
            return typeof e == "string" ? ZS(e.trim(), Jm.string) : typeof e == "object" && e !== null ? ZS(e, Jm.object) : [null, void 0]
        }, Qm = function (e, t) {
            var n = Uc(e);
            return {h: n.h, s: Kr(n.s + 100 * t, 0, 100), l: n.l, a: n.a}
        }, e1 = function (e) {
            return (299 * e.r + 587 * e.g + 114 * e.b) / 1e3 / 255
        }, JS = function (e, t) {
            var n = Uc(e);
            return {h: n.h, s: n.s, l: Kr(n.l + 100 * t, 0, 100), a: n.a}
        }, t1 = function () {
            function e(t) {
                this.parsed = q$(t)[0], this.rgba = this.parsed || {r: 0, g: 0, b: 0, a: 1}
            }

            return e.prototype.isValid = function () {
                return this.parsed !== null
            }, e.prototype.brightness = function () {
                return xn(e1(this.rgba), 2)
            }, e.prototype.isDark = function () {
                return e1(this.rgba) < .5
            }, e.prototype.isLight = function () {
                return e1(this.rgba) >= .5
            }, e.prototype.toHex = function () {
                return t = Zm(this.rgba), n = t.r, r = t.g, o = t.b, l = (i = t.a) < 1 ? cf(xn(255 * i)) : "", "#" + cf(n) + cf(r) + cf(o) + l;
                var t, n, r, o, i, l
            }, e.prototype.toRgb = function () {
                return Zm(this.rgba)
            }, e.prototype.toRgbString = function () {
                return t = Zm(this.rgba), n = t.r, r = t.g, o = t.b, (i = t.a) < 1 ? "rgba(" + n + ", " + r + ", " + o + ", " + i + ")" : "rgb(" + n + ", " + r + ", " + o + ")";
                var t, n, r, o, i
            }, e.prototype.toHsl = function () {
                return YS(Uc(this.rgba))
            }, e.prototype.toHslString = function () {
                return t = YS(Uc(this.rgba)), n = t.h, r = t.s, o = t.l, (i = t.a) < 1 ? "hsla(" + n + ", " + r + "%, " + o + "%, " + i + ")" : "hsl(" + n + ", " + r + "%, " + o + "%)";
                var t, n, r, o, i
            }, e.prototype.toHsv = function () {
                return t = GS(this.rgba), {h: xn(t.h), s: xn(t.s), v: xn(t.v), a: xn(t.a, 3)};
                var t
            }, e.prototype.invert = function () {
                return qo({r: 255 - (t = this.rgba).r, g: 255 - t.g, b: 255 - t.b, a: t.a});
                var t
            }, e.prototype.saturate = function (t) {
                return t === void 0 && (t = .1), qo(Qm(this.rgba, t))
            }, e.prototype.desaturate = function (t) {
                return t === void 0 && (t = .1), qo(Qm(this.rgba, -t))
            }, e.prototype.grayscale = function () {
                return qo(Qm(this.rgba, -1))
            }, e.prototype.lighten = function (t) {
                return t === void 0 && (t = .1), qo(JS(this.rgba, t))
            }, e.prototype.darken = function (t) {
                return t === void 0 && (t = .1), qo(JS(this.rgba, -t))
            }, e.prototype.rotate = function (t) {
                return t === void 0 && (t = 15), this.hue(this.hue() + t)
            }, e.prototype.alpha = function (t) {
                return typeof t == "number" ? qo({r: (n = this.rgba).r, g: n.g, b: n.b, a: t}) : xn(this.rgba.a, 3);
                var n
            }, e.prototype.hue = function (t) {
                var n = Uc(this.rgba);
                return typeof t == "number" ? qo({h: t, s: n.s, l: n.l, a: n.a}) : xn(n.h)
            }, e.prototype.isEqual = function (t) {
                return this.toHex() === qo(t).toHex()
            }, e
        }(), qo = function (e) {
            return e instanceof t1 ? e : new t1(e)
        }, QS = [], Y$ = function (e) {
            e.forEach(function (t) {
                QS.indexOf(t) < 0 && (t(t1, Jm), QS.push(t))
            })
        };

    function X$(e, t) {
        var n = {
            white: "#ffffff",
            bisque: "#ffe4c4",
            blue: "#0000ff",
            cadetblue: "#5f9ea0",
            chartreuse: "#7fff00",
            chocolate: "#d2691e",
            coral: "#ff7f50",
            antiquewhite: "#faebd7",
            aqua: "#00ffff",
            azure: "#f0ffff",
            whitesmoke: "#f5f5f5",
            papayawhip: "#ffefd5",
            plum: "#dda0dd",
            blanchedalmond: "#ffebcd",
            black: "#000000",
            gold: "#ffd700",
            goldenrod: "#daa520",
            gainsboro: "#dcdcdc",
            cornsilk: "#fff8dc",
            cornflowerblue: "#6495ed",
            burlywood: "#deb887",
            aquamarine: "#7fffd4",
            beige: "#f5f5dc",
            crimson: "#dc143c",
            cyan: "#00ffff",
            darkblue: "#00008b",
            darkcyan: "#008b8b",
            darkgoldenrod: "#b8860b",
            darkkhaki: "#bdb76b",
            darkgray: "#a9a9a9",
            darkgreen: "#006400",
            darkgrey: "#a9a9a9",
            peachpuff: "#ffdab9",
            darkmagenta: "#8b008b",
            darkred: "#8b0000",
            darkorchid: "#9932cc",
            darkorange: "#ff8c00",
            darkslateblue: "#483d8b",
            gray: "#808080",
            darkslategray: "#2f4f4f",
            darkslategrey: "#2f4f4f",
            deeppink: "#ff1493",
            deepskyblue: "#00bfff",
            wheat: "#f5deb3",
            firebrick: "#b22222",
            floralwhite: "#fffaf0",
            ghostwhite: "#f8f8ff",
            darkviolet: "#9400d3",
            magenta: "#ff00ff",
            green: "#008000",
            dodgerblue: "#1e90ff",
            grey: "#808080",
            honeydew: "#f0fff0",
            hotpink: "#ff69b4",
            blueviolet: "#8a2be2",
            forestgreen: "#228b22",
            lawngreen: "#7cfc00",
            indianred: "#cd5c5c",
            indigo: "#4b0082",
            fuchsia: "#ff00ff",
            brown: "#a52a2a",
            maroon: "#800000",
            mediumblue: "#0000cd",
            lightcoral: "#f08080",
            darkturquoise: "#00ced1",
            lightcyan: "#e0ffff",
            ivory: "#fffff0",
            lightyellow: "#ffffe0",
            lightsalmon: "#ffa07a",
            lightseagreen: "#20b2aa",
            linen: "#faf0e6",
            mediumaquamarine: "#66cdaa",
            lemonchiffon: "#fffacd",
            lime: "#00ff00",
            khaki: "#f0e68c",
            mediumseagreen: "#3cb371",
            limegreen: "#32cd32",
            mediumspringgreen: "#00fa9a",
            lightskyblue: "#87cefa",
            lightblue: "#add8e6",
            midnightblue: "#191970",
            lightpink: "#ffb6c1",
            mistyrose: "#ffe4e1",
            moccasin: "#ffe4b5",
            mintcream: "#f5fffa",
            lightslategray: "#778899",
            lightslategrey: "#778899",
            navajowhite: "#ffdead",
            navy: "#000080",
            mediumvioletred: "#c71585",
            powderblue: "#b0e0e6",
            palegoldenrod: "#eee8aa",
            oldlace: "#fdf5e6",
            paleturquoise: "#afeeee",
            mediumturquoise: "#48d1cc",
            mediumorchid: "#ba55d3",
            rebeccapurple: "#663399",
            lightsteelblue: "#b0c4de",
            mediumslateblue: "#7b68ee",
            thistle: "#d8bfd8",
            tan: "#d2b48c",
            orchid: "#da70d6",
            mediumpurple: "#9370db",
            purple: "#800080",
            pink: "#ffc0cb",
            skyblue: "#87ceeb",
            springgreen: "#00ff7f",
            palegreen: "#98fb98",
            red: "#ff0000",
            yellow: "#ffff00",
            slateblue: "#6a5acd",
            lavenderblush: "#fff0f5",
            peru: "#cd853f",
            palevioletred: "#db7093",
            violet: "#ee82ee",
            teal: "#008080",
            slategray: "#708090",
            slategrey: "#708090",
            aliceblue: "#f0f8ff",
            darkseagreen: "#8fbc8f",
            darkolivegreen: "#556b2f",
            greenyellow: "#adff2f",
            seagreen: "#2e8b57",
            seashell: "#fff5ee",
            tomato: "#ff6347",
            silver: "#c0c0c0",
            sienna: "#a0522d",
            lavender: "#e6e6fa",
            lightgreen: "#90ee90",
            orange: "#ffa500",
            orangered: "#ff4500",
            steelblue: "#4682b4",
            royalblue: "#4169e1",
            turquoise: "#40e0d0",
            yellowgreen: "#9acd32",
            salmon: "#fa8072",
            saddlebrown: "#8b4513",
            sandybrown: "#f4a460",
            rosybrown: "#bc8f8f",
            darksalmon: "#e9967a",
            lightgoldenrodyellow: "#fafad2",
            snow: "#fffafa",
            lightgrey: "#d3d3d3",
            lightgray: "#d3d3d3",
            dimgray: "#696969",
            dimgrey: "#696969",
            olivedrab: "#6b8e23",
            olive: "#808000"
        }, r = {};
        for (var o in n) r[n[o]] = o;
        var i = {};
        e.prototype.toName = function (l) {
            if (!(this.rgba.a || this.rgba.r || this.rgba.g || this.rgba.b)) return "transparent";
            var c, d, p = r[this.toHex()];
            if (p) return p;
            if (l != null && l.closest) {
                var g = this.toRgb(), m = 1 / 0, v = "black";
                if (!i.length) for (var b in n) i[b] = new e(n[b]).toRgb();
                for (var x in n) {
                    var w = (c = g, d = i[x], Math.pow(c.r - d.r, 2) + Math.pow(c.g - d.g, 2) + Math.pow(c.b - d.b, 2));
                    w < m && (m = w, v = x)
                }
                return v
            }
        }, t.string.push([function (l) {
            var c = l.toLowerCase(), d = c === "transparent" ? "#0000" : n[c];
            return d ? new e(d).toRgb() : null
        }, "name"])
    }

    function uf() {
        return (uf = Object.assign || function (e) {
            for (var t = 1; t < arguments.length; t++) {
                var n = arguments[t];
                for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
            }
            return e
        }).apply(this, arguments)
    }

    function e2(e, t) {
        if (e == null) return {};
        var n, r, o = {}, i = Object.keys(e);
        for (r = 0; r < i.length; r++) t.indexOf(n = i[r]) >= 0 || (o[n] = e[n]);
        return o
    }

    function n1(e) {
        var t = y.useRef(e), n = y.useRef(function (r) {
            t.current && t.current(r)
        });
        return t.current = e, n.current
    }

    var sl = function (e, t, n) {
        return t === void 0 && (t = 0), n === void 0 && (n = 1), e > n ? n : e < t ? t : e
    }, Wc = function (e) {
        return "touches" in e
    }, r1 = function (e) {
        return e && e.ownerDocument.defaultView || self
    }, t2 = function (e, t, n) {
        var r = e.getBoundingClientRect(), o = Wc(t) ? function (i, l) {
            for (var c = 0; c < i.length; c++) if (i[c].identifier === l) return i[c];
            return i[0]
        }(t.touches, n) : t;
        return {
            left: sl((o.pageX - (r.left + r1(e).pageXOffset)) / r.width),
            top: sl((o.pageY - (r.top + r1(e).pageYOffset)) / r.height)
        }
    }, n2 = function (e) {
        !Wc(e) && e.preventDefault()
    }, o1 = ee.memo(function (e) {
        var t = e.onMove, n = e.onKey, r = e2(e, ["onMove", "onKey"]), o = y.useRef(null), i = n1(t), l = n1(n),
            c = y.useRef(null), d = y.useRef(!1), p = y.useMemo(function () {
                var b = function (j) {
                    n2(j), (Wc(j) ? j.touches.length > 0 : j.buttons > 0) && o.current ? i(t2(o.current, j, c.current)) : w(!1)
                }, x = function () {
                    return w(!1)
                };

                function w(j) {
                    var C = d.current, _ = r1(o.current), E = j ? _.addEventListener : _.removeEventListener;
                    E(C ? "touchmove" : "mousemove", b), E(C ? "touchend" : "mouseup", x)
                }

                return [function (j) {
                    var C = j.nativeEvent, _ = o.current;
                    if (_ && (n2(C), !function (k, T) {
                        return T && !Wc(k)
                    }(C, d.current) && _)) {
                        if (Wc(C)) {
                            d.current = !0;
                            var E = C.changedTouches || [];
                            E.length && (c.current = E[0].identifier)
                        }
                        _.focus(), i(t2(_, C, c.current)), w(!0)
                    }
                }, function (j) {
                    var C = j.which || j.keyCode;
                    C < 37 || C > 40 || (j.preventDefault(), l({
                        left: C === 39 ? .05 : C === 37 ? -.05 : 0,
                        top: C === 40 ? .05 : C === 38 ? -.05 : 0
                    }))
                }, w]
            }, [l, i]), g = p[0], m = p[1], v = p[2];
        return y.useEffect(function () {
            return v
        }, [v]), ee.createElement("div", uf({}, r, {
            onTouchStart: g,
            onMouseDown: g,
            className: "react-colorful__interactive",
            ref: o,
            onKeyDown: m,
            tabIndex: 0,
            role: "slider"
        }))
    }), df = function (e) {
        return e.filter(Boolean).join(" ")
    }, s1 = function (e) {
        var t = e.color, n = e.left, r = e.top, o = r === void 0 ? .5 : r,
            i = df(["react-colorful__pointer", e.className]);
        return ee.createElement("div", {
            className: i,
            style: {top: 100 * o + "%", left: 100 * n + "%"}
        }, ee.createElement("div", {className: "react-colorful__pointer-fill", style: {backgroundColor: t}}))
    }, Un = function (e, t, n) {
        return t === void 0 && (t = 0), n === void 0 && (n = Math.pow(10, t)), Math.round(n * e) / n
    }, r2 = function (e) {
        var t = e.s, n = e.v, r = e.a, o = (200 - t) * n / 100;
        return {
            h: Un(e.h),
            s: Un(o > 0 && o < 200 ? t * n / 100 / (o <= 100 ? o : 200 - o) * 100 : 0),
            l: Un(o / 2),
            a: Un(r, 2)
        }
    }, i1 = function (e) {
        var t = r2(e);
        return "hsl(" + t.h + ", " + t.s + "%, " + t.l + "%)"
    }, a1 = function (e) {
        var t = r2(e);
        return "hsla(" + t.h + ", " + t.s + "%, " + t.l + "%, " + t.a + ")"
    }, Z$ = function (e) {
        var t = e.h, n = e.s, r = e.v, o = e.a;
        t = t / 360 * 6, n /= 100, r /= 100;
        var i = Math.floor(t), l = r * (1 - n), c = r * (1 - (t - i) * n), d = r * (1 - (1 - t + i) * n), p = i % 6;
        return {
            r: Un(255 * [r, c, l, l, d, r][p]),
            g: Un(255 * [d, r, r, c, l, l][p]),
            b: Un(255 * [l, l, d, r, r, c][p]),
            a: Un(o, 2)
        }
    }, J$ = function (e) {
        var t = /rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);
        return t ? Q$({
            r: Number(t[1]) / (t[2] ? 100 / 255 : 1),
            g: Number(t[3]) / (t[4] ? 100 / 255 : 1),
            b: Number(t[5]) / (t[6] ? 100 / 255 : 1),
            a: t[7] === void 0 ? 1 : Number(t[7]) / (t[8] ? 100 : 1)
        }) : {h: 0, s: 0, v: 0, a: 1}
    }, Q$ = function (e) {
        var t = e.r, n = e.g, r = e.b, o = e.a, i = Math.max(t, n, r), l = i - Math.min(t, n, r),
            c = l ? i === t ? (n - r) / l : i === n ? 2 + (r - t) / l : 4 + (t - n) / l : 0;
        return {h: Un(60 * (c < 0 ? c + 6 : c)), s: Un(i ? l / i * 100 : 0), v: Un(i / 255 * 100), a: o}
    }, e9 = ee.memo(function (e) {
        var t = e.hue, n = e.onChange, r = df(["react-colorful__hue", e.className]);
        return ee.createElement("div", {className: r}, ee.createElement(o1, {
            onMove: function (o) {
                n({h: 360 * o.left})
            }, onKey: function (o) {
                n({h: sl(t + 360 * o.left, 0, 360)})
            }, "aria-label": "Hue", "aria-valuenow": Un(t), "aria-valuemax": "360", "aria-valuemin": "0"
        }, ee.createElement(s1, {
            className: "react-colorful__hue-pointer",
            left: t / 360,
            color: i1({h: t, s: 100, v: 100, a: 1})
        })))
    }), t9 = ee.memo(function (e) {
        var t = e.hsva, n = e.onChange, r = {backgroundColor: i1({h: t.h, s: 100, v: 100, a: 1})};
        return ee.createElement("div", {
            className: "react-colorful__saturation",
            style: r
        }, ee.createElement(o1, {
            onMove: function (o) {
                n({s: 100 * o.left, v: 100 - 100 * o.top})
            }, onKey: function (o) {
                n({s: sl(t.s + 100 * o.left, 0, 100), v: sl(t.v - 100 * o.top, 0, 100)})
            }, "aria-label": "Color", "aria-valuetext": "Saturation " + Un(t.s) + "%, Brightness " + Un(t.v) + "%"
        }, ee.createElement(s1, {
            className: "react-colorful__saturation-pointer",
            top: 1 - t.v / 100,
            left: t.s / 100,
            color: i1(t)
        })))
    }), n9 = function (e, t) {
        if (e === t) return !0;
        for (var n in e) if (e[n] !== t[n]) return !1;
        return !0
    }, r9 = function (e, t) {
        return e.replace(/\s/g, "") === t.replace(/\s/g, "")
    };

    function o9(e, t, n) {
        var r = n1(n), o = y.useState(function () {
            return e.toHsva(t)
        }), i = o[0], l = o[1], c = y.useRef({color: t, hsva: i});
        y.useEffect(function () {
            if (!e.equal(t, c.current.color)) {
                var p = e.toHsva(t);
                c.current = {hsva: p, color: t}, l(p)
            }
        }, [t, e]), y.useEffect(function () {
            var p;
            n9(i, c.current.hsva) || e.equal(p = e.fromHsva(i), c.current.color) || (c.current = {
                hsva: i,
                color: p
            }, r(p))
        }, [i, e, r]);
        var d = y.useCallback(function (p) {
            l(function (g) {
                return Object.assign({}, g, p)
            })
        }, []);
        return [i, d]
    }

    var s9 = typeof window < "u" ? y.useLayoutEffect : y.useEffect, i9 = function () {
        return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0
    }, o2 = new Map, a9 = function (e) {
        s9(function () {
            var t = e.current ? e.current.ownerDocument : document;
            if (t !== void 0 && !o2.has(t)) {
                var n = t.createElement("style");
                n.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`, o2.set(t, n);
                var r = i9();
                r && n.setAttribute("nonce", r), t.head.appendChild(n)
            }
        }, [])
    }, l9 = function (e) {
        var t = e.className, n = e.hsva, r = e.onChange,
            o = {backgroundImage: "linear-gradient(90deg, " + a1(Object.assign({}, n, {a: 0})) + ", " + a1(Object.assign({}, n, {a: 1})) + ")"},
            i = df(["react-colorful__alpha", t]), l = Un(100 * n.a);
        return ee.createElement("div", {className: i}, ee.createElement("div", {
            className: "react-colorful__alpha-gradient",
            style: o
        }), ee.createElement(o1, {
            onMove: function (c) {
                r({a: c.left})
            },
            onKey: function (c) {
                r({a: sl(n.a + c.left)})
            },
            "aria-label": "Alpha",
            "aria-valuetext": l + "%",
            "aria-valuenow": l,
            "aria-valuemin": "0",
            "aria-valuemax": "100"
        }, ee.createElement(s1, {className: "react-colorful__alpha-pointer", left: n.a, color: a1(n)})))
    }, c9 = function (e) {
        var t = e.className, n = e.colorModel, r = e.color, o = r === void 0 ? n.defaultColor : r, i = e.onChange,
            l = e2(e, ["className", "colorModel", "color", "onChange"]), c = y.useRef(null);
        a9(c);
        var d = o9(n, o, i), p = d[0], g = d[1], m = df(["react-colorful", t]);
        return ee.createElement("div", uf({}, l, {ref: c, className: m}), ee.createElement(t9, {
            hsva: p,
            onChange: g
        }), ee.createElement(e9, {hue: p.h, onChange: g}), ee.createElement(l9, {
            hsva: p,
            onChange: g,
            className: "react-colorful__last-control"
        }))
    }, u9 = {
        defaultColor: "rgba(0, 0, 0, 1)", toHsva: J$, fromHsva: function (e) {
            var t = Z$(e);
            return "rgba(" + t.r + ", " + t.g + ", " + t.b + ", " + t.a + ")"
        }, equal: r9
    }, d9 = function (e) {
        return ee.createElement(c9, uf({}, e, {colorModel: u9}))
    };
    Y$([X$]);
    const f9 = "gs-cmp-color-picker", p9 = {backgroundSize: "10px"}, g9 = [0, 15],
        h9 = e => e.startsWith("rgba") ? e : qo(e).toRgbString();

    function s2({className: e, value: t, onChange: n, disabled: r}) {
        const o = h9(t || ""), [i, l] = y.useState(!1), c = Io() && !!window.EyeDropper,
            d = U(`${f9}-handler gs-utl-bg-checker gs-utl-overflow-hidden gs-utl-cursor-pointer`, e, ye.b, ye.rnd, te.br),
            p = x => {
                n == null || n(x, !0)
            }, g = () => {
                c && new window.EyeDropper().open().then(w => p(w.sRGBHex))
            }, m = () => {
                l(!0)
            }, v = () => {
                n == null || n(o, !1), l(!1)
            }, b = u.jsxs("div", {
                style: p9,
                className: d,
                children: [i && u.jsx("div", {
                    onPointerUp: v,
                    className: U("gs-utl-fixed gs-utl-inset-0 gs-utl-z-50 gs-utl-cursor-grabbing")
                }), u.jsx("div", {className: U("gs-utl-w-4 gs-utl-h-4"), style: {backgroundColor: t}})]
            });
        return u.jsxs(Wo, {
            handler: b,
            title: "Color",
            size: "s",
            placement: "left-end",
            offset: g9,
            clickAway: !0,
            disabled: r,
            children: [u.jsx(d9, {
                className: "color-picker",
                color: o,
                onChange: p,
                onPointerDown: m,
                onPointerUp: v
            }), u.jsxs(K, {
                className: U("gs-utl-mt-3"),
                space: "s",
                children: [u.jsx(q, {
                    grow: !0,
                    children: u.jsx(jt, {size: "s", value: o, onChange: p})
                }), c && u.jsx(at, {
                    type: "button",
                    onClick: g,
                    children: u.jsx(be, {icon: fe.eyedropperVariant, size: Ee.s})
                })]
            })]
        })
    }

    const m9 = e => {
        const t = parseFloat(e), n = e.replace(`${t}`, "").trim();
        return {number: t || t === 0 ? `${t}` : "", unit: n}
    }, i2 = ({value: e, step: t}) => {
        const n = parseFloat(`${e}`);
        let r = 0;
        if (Math.floor(n) !== n && t) {
            const o = `${t}`.split(".")[1];
            r = (o == null ? void 0 : o.length) || 0
        }
        return r ? parseFloat(n.toFixed(r)) : n
    }, v9 = ({value: e, key: t, shiftKey: n, min: r, max: o, step: i = 1}) => {
        const l = t === "ArrowUp", c = t === "ArrowDown";
        let d = null;
        if (l || c) {
            d = Number(e);
            const p = parseFloat(`${i}`);
            l && (d += (n ? 10 : 1) * p), c && (d -= (n ? 10 : 1) * p), d = `${ff({
                min: r,
                max: o,
                value: d
            })}`, d = i2({value: d, step: i})
        }
        return d
    }, ff = ({min: e, max: t, value: n}) => {
        const r = parseFloat(`${n}`);
        let o = r || 0;
        return kn(e) && (o = Math.max(o, parseFloat(`${e}`) || 0)), kn(t) && (o = Math.min(o, parseFloat(`${t}`) || 0)), `${`${r}` != `${n}` ? n : o}`
    }, y9 = (e, t, n, r = {}) => {
        const o = parseInt(`${e}`, 10) || 0, {min: i, max: l, step: c = 1} = r;
        let d = o;
        const p = m => {
            const v = m.clientY - t, b = o - v * parseFloat(`${c}`);
            d = i2({value: ff({min: i, max: l, value: b}), step: c}), n(d, !0)
        }, g = () => {
            window.removeEventListener("mousemove", p), window.removeEventListener("mouseup", g), n(d)
        };
        window.addEventListener("mousemove", p), window.addEventListener("mouseup", g)
    }, b9 = (e, t, n = {}) => {
        const {partial: r} = n, o = (i, l) => i === l || r && i.startsWith(l);
        return t.some(i => o(typeof i == "string" ? i : i.id, e))
    }, a2 = e => kn(e) ? e : "", x9 = "gs-cmp-number-field";

    function tt(e) {
        const {
                className: t,
                value: n,
                units: r,
                valueUnit: o,
                size: i = "m",
                pan: l = !0,
                min: c,
                max: d,
                step: p,
                placeholder: g,
                disabled: m,
                onChange: v,
                onChangeUnit: b
            } = e, [x, w] = y.useState(a2(n)), [j, C] = y.useState(!1),
            _ = (r == null ? void 0 : r.map(F => ({id: F, label: F}))) || [], E = {min: c, max: d, step: p};
        y.useEffect(() => {
            w(a2(n))
        }, [n, o]);
        const k = (F, N) => {
            v == null || v(ff({min: c, max: d, value: F}), N)
        }, T = F => {
            if (m) return;
            C(!0);
            const N = (z, V) => {
                k(z, !!V), !V && C(!1)
            };
            y9(x, F.clientY, N, E)
        }, O = F => {
            const {key: N, shiftKey: z} = F;
            switch (N) {
                case"Escape":
                    return w(n);
                case"Enter":
                    return k(x)
            }
            const V = v9({step: p, value: n, key: N, shiftKey: z});
            V !== null && (F.preventDefault(), k(V))
        }, A = () => {
            k(x)
        }, $ = Za({...e, className: U(x9, t)});
        return u.jsxs("div", {
            ...$,
            children: [j && u.jsx("div", {className: U("gs-utl-fixed gs-utl-inset-0 gs-utl-z-50 gs-utl-cursor-ns")}), u.jsx(Ja, {as: e.labelAs, ...e}), u.jsxs(K, {
                className: bm(e),
                items: "center",
                space: "x2s",
                children: [!!l && u.jsx(q, {
                    onMouseDown: T,
                    className: U("gs-utl-opacity-50 gs-utl-cursor-ns", i === "m" && "-gs-utl-ml-3", i === "s" && "-gs-utl-ml-2", l !== !0 && "gs-utl-mr-0.5 -gs-utl-ml-1"),
                    children: l === !0 ? u.jsx(be, {icon: fe.panVertical, size: Ee.s2x}) : l
                }), u.jsx(q, {
                    grow: !0,
                    children: u.jsx("input", {
                        className: Oc(e),
                        value: x,
                        disabled: m,
                        onChange: F => w(F.target.value),
                        placeholder: g,
                        onBlur: A,
                        onKeyDown: O
                    })
                }), !!_.length && u.jsx(q, {
                    className: U(_.length === 1 && "gs-utl-opacity-50 gs-utl-pointer-events-none"),
                    children: u.jsx(Ze, {
                        caret: "",
                        size: "x2s",
                        pos: "right",
                        width: "75px",
                        emptyState: "-",
                        border: !1,
                        value: o,
                        disabled: m,
                        onChange: F => b == null ? void 0 : b(F),
                        options: _
                    })
                })]
            })]
        })
    }

    const w9 = "gs-cmp-switch-field";

    function Gc({className: e, value: t, label: n, border: r, size: o = "m", tip: i, disabled: l, onChange: c}) {
        const d = !!t,
            p = U("gs-utl-relative gs-utl-inline-flex gs-utl-items-center gs-utl-h-6 gs-utl-rounded-full gs-utl-w-11 gs-utl-transition-colors focus:gs-utl-outline-none", d ? te.bgA : te.bgH, lc.focus, r && `${te.br} ${ye.b}`);
        return u.jsx(nm.Group, {
            children: u.jsxs(K, {
                items: "center",
                className: U(w9, e),
                full: !0,
                children: [!!n && u.jsx(nm.Label, {
                    className: U("gs-utl-mr-4 gs-utl-flex-1 gs-utl-flex gs-utl-gap-2 gs-utl-items-center"),
                    passive: !0,
                    children: u.jsx(Ur, {as: "span", size: o, tip: i, m: "", children: n})
                }), u.jsx(nm, {
                    checked: d,
                    onChange: c,
                    className: p,
                    disabled: l,
                    children: u.jsx("span", {className: U(te.bg, "gs-utl-inline-block gs-utl-w-4 gs-utl-h-4 gs-utl-transform gs-utl-rounded-full gs-utl-transition-transform", d ? "gs-utl-translate-x-6" : "gs-utl-translate-x-1")})
                })]
            })
        })
    }

    const S9 = /^-?[0-9]+(\.[0-9]+)?[a-zA-Z%]{0,}$/, j9 = /,(?![^(]*\))/, l1 = /\s(?![^(]*\))/,
        C9 = /^(closest-side|closest-corner|farthest-side|farthest-corner)/i, c1 = /^circle|ellipse/i, u1 = e => {
            var g;
            const t = [], {name: n, value: r} = lf(e), [o, ...i] = r.split(j9).map(m => m.trim()).filter(Boolean),
                l = i.length > 1, c = l ? o : "", d = {type: "none"}, p = l ? i : [o, ...i];
            if (S9.test(c)) d.type = "angle", d.value = c; else if (/^to\s/.test(c)) d.type = "side-or-corner", d.value = c; else if (C9.test(c)) d.type = "size", d.value = c; else if (c1.test(c) || /^at\s/.test(c) || /\sat\s/.test(c)) {
                d.type = "at", d.value = c;
                const m = ((g = c.match(c1)) == null ? void 0 : g[0]) || "circle";
                d.shape = m;
                const v = {x: "0%", y: "0%"},
                    b = {x: "0%", y: "0%"}, [x, w] = c.replace(c1, "").trim().split("at").map(j => j.trim());
                if (x) {
                    const [j, C] = x.split(l1);
                    v.x = j, v.y = C || j
                }
                if (w) {
                    const [j, C] = w.split(l1);
                    b.x = j, b.y = C || j
                }
                d.size = v, d.position = b
            }
            return p.forEach(m => {
                const [v, b] = m.split(l1);
                t.push({color: v, hint: b ? parseFloat(b) : null})
            }), t.forEach((m, v) => {
                m.hint === null && (m.hint = v / (t.length - 1) * 100)
            }), {name: n, orientation: d, colorStops: t}
        }, ri = ({stops: e, orientation: t = "to right", name: n = "linear-gradient"}) => {
            const o = (e.length === 1 ? [{color: e[0].color, hint: null}, {
                color: e[0].color,
                hint: null
            }] : e).map(i => `${i.color} ${i.hint ? `${i.hint}%` : ""}`.trim()).join(", ");
            return o ? `${n}(${t}, ${o})` : "none"
        }, E9 = e => e.slice().sort((t, n) => (t.hint || 0) - (n.hint || 0)), P9 = "gs-cmp-grad-picker";

    function _9({className: e, value: t, onChange: n}) {
        var B, Q, H;
        const r = u1(t), [o, i] = y.useState(r.colorStops), [l, c] = y.useState(null), d = y.useRef(null),
            p = se(P9, "gs-grad-picker gs-utl-select-none gs-utl-gap-1", e, ye.rnd), g = r.name || "linear-gradient",
            m = g.indexOf("radial") >= 0, v = g.indexOf("repeating") >= 0, b = r.orientation.value,
            x = `${parseFloat(`${b}`) || 180}`,
            w = `${parseFloat(`${(B = r.orientation.size) == null ? void 0 : B.x}`) || 0}`,
            j = `${parseFloat(`${(Q = r.orientation.position) == null ? void 0 : Q.x}`) || 0}`,
            C = `${parseFloat(`${(H = r.orientation.position) == null ? void 0 : H.y}`) || 0}`, _ = 0, E = 100,
            k = (I, D = !1) => {
                const M = E9(I);
                i(M), n == null || n(ri({name: g, orientation: b, stops: M}), D)
            }, T = (I, D = !1) => {
                n == null || n(ri({stops: o, name: g, orientation: `${I}deg`}), D)
            }, O = (I, D = !1) => {
                n == null || n(ri({stops: o, name: g, orientation: `${I}px at ${j}% ${C}%`}), D)
            }, A = (I, D = !1) => {
                n == null || n(ri({stops: o, name: g, orientation: `${w}px at ${I}% ${C}%`}), D)
            }, $ = (I, D = !1) => {
                n == null || n(ri({stops: o, name: g, orientation: `${w}px at ${j}% ${I}%`}), D)
            }, F = I => {
                const D = `${I ? "repeating-" : ""}${m ? "radial" : "linear"}-gradient`;
                n == null || n(ri({stops: o, orientation: b, name: D}))
            }, N = I => {
                const D = `${v ? "repeating-" : ""}${I ? "radial" : "linear"}-gradient`;
                n == null || n(ri({stops: o, orientation: I ? "100px at 50% 50%" : "90deg", name: D}))
            };
        y.useEffect(() => {
            if (!l) return;
            const I = parseFloat(`${l.stop.hint}`), D = W => {
                let ne = (W.clientX - l.x) * 100;
                ne = ne / l.w, ne = I + ne, ne = ne < _ ? _ : ne, ne = ne > E ? E : ne, l.stop.hint = parseInt(`${ne}`, 10), k(o, !0)
            }, M = () => {
                c(null), k(o)
            };
            return window.addEventListener("pointermove", D), window.addEventListener("pointerup", M), () => {
                window.removeEventListener("pointermove", D), window.removeEventListener("pointerup", M), M()
            }
        }, [l]);
        const z = (I, D) => {
            const M = d.current;
            c({
                stop: D,
                w: (M == null ? void 0 : M.clientWidth) || 0,
                h: (M == null ? void 0 : M.clientHeight) || 0,
                x: I.clientX,
                y: I.clientY
            })
        }, V = I => {
            const D = d.current, M = (D == null ? void 0 : D.clientWidth) || 0,
                W = (D == null ? void 0 : D.clientHeight) || 0,
                ce = I.nativeEvent.offsetX - ((D == null ? void 0 : D.clientLeft) || 0),
                ne = I.nativeEvent.offsetY - ((D == null ? void 0 : D.clientTop) || 0), ue = ce / M * 100,
                me = document.createElement("canvas"), ae = me.getContext("2d");
            if (!ae) return;
            me.width = M, me.height = W;
            const ie = ae.createLinearGradient(0, 0, M, W);
            o.forEach(He => ie.addColorStop(parseFloat(`${He.hint}`) / 100, He.color)), ae.fillStyle = ie, ae.fillRect(0, 0, me.width, me.height), me.style.background = "black";
            const de = ae.getImageData(ce, ne, 1, 1).data, je = de[3] ? (100 / 255 * de[3] / 100).toFixed(2) : 0,
                he = `rgba(${de[0]}, ${de[1]}, ${de[2]}, ${je})`, Ie = he === "rgba(0, 0, 0, 0)" ? "#000" : he;
            k([...o, {color: Ie, hint: ue}])
        }, X = I => {
            k(o.filter(D => D !== I))
        }, Z = (I, D, M) => {
            D && (I.color = D), k(o, M)
        }, R = I => (l == null ? void 0 : l.stop) === I;
        return u.jsxs(K, {
            className: p,
            col: !0,
            children: [!!(l != null && l.stop) && u.jsx("div", {className: se("fixed inset-0 z-50 cursor-colr")}), u.jsxs("div", {
                className: se("relative gjs-mb-6 gjs-mt-3"),
                children: [u.jsx("div", {
                    className: se("bg-checker h-8", ye.rnd),
                    children: u.jsx("div", {
                        ref: d,
                        className: se("w-full h-full cursor-cross", ye.b, ye.rnd, te.br),
                        style: {backgroundImage: ri({stops: o})},
                        onClick: V
                    })
                }), o.map((I, D) => u.jsxs("div", {
                    className: se("absolute top-0 h-full"),
                    style: {left: `${I.hint}%`},
                    children: [u.jsx("div", {
                        className: se("cursor-pointer absolute gs-utl-translate-x-[-50%] gs-utl-top-[-14px]"),
                        onClick: () => X(I),
                        children: u.jsx(be, {icon: fe.close, size: Ee.s3x})
                    }), u.jsx("div", {
                        onPointerDown: M => z(M, I),
                        className: se("h-full w-1 gs-utl-translate-x-[-50%] cursor-colr opacity-50 gjs-border-white", ye.br, ye.bl, R(I) ? "gjs-bg-white" : "gjs-bg-black")
                    }), u.jsx("div", {
                        className: se("cursor-pointer gs-utl-bottom-[-17px] gs-utl-left-[-7px] absolute"),
                        children: u.jsx(s2, {
                            value: I.color,
                            onChange: (M, W) => Z(I, M, W),
                            className: se("h-4 w-4 gjs-rounded-full gjs-border-2")
                        })
                    })]
                }, D))]
            }), u.jsxs(K, {
                space: "s",
                items: "center",
                children: [u.jsx(q, {
                    grow: !0,
                    children: u.jsx(Gc, {label: "Repeat", value: v, onChange: F})
                }), u.jsx(q, {grow: !0, children: u.jsx(Gc, {label: "Radial", value: m, onChange: N})})]
            }), m ? u.jsxs(K, {
                space: "s",
                col: !0,
                children: [u.jsx(q, {
                    children: u.jsx(K, {
                        space: "s",
                        items: "center",
                        children: u.jsx(q, {
                            grow: !0,
                            children: u.jsx(tt, {
                                pan: "S",
                                size: "s",
                                value: w,
                                onChange: O,
                                valueUnit: "px",
                                units: ["px"]
                            })
                        })
                    })
                }), u.jsx(q, {
                    children: u.jsxs(K, {
                        space: "s",
                        children: [u.jsx(q, {
                            grow: !0,
                            children: u.jsx(tt, {
                                pan: "X",
                                size: "s",
                                value: j,
                                onChange: A,
                                valueUnit: "%",
                                units: ["%"]
                            })
                        }), u.jsx(q, {
                            grow: !0,
                            children: u.jsx(tt, {
                                pan: "Y",
                                size: "s",
                                value: C,
                                onChange: $,
                                valueUnit: "%",
                                units: ["%"]
                            })
                        })]
                    })
                })]
            }) : u.jsx(K, {
                space: "s",
                items: "center",
                nowrap: !0,
                children: u.jsx(q, {
                    grow: !0,
                    children: u.jsx(tt, {pan: "A", size: "s", value: x, onChange: T, valueUnit: "deg", units: ["deg"]})
                })
            })]
        })
    }

    const l2 = y.createContext(null), k9 = ({children: e}) => {
        const [t, n] = y.useState({
            setEditor: r => {
                n(o => ({...o, editor: r}))
            }
        });
        return u.jsx(l2.Provider, {value: t, children: e})
    }, qr = () => {
        const e = y.useContext(l2);
        if (!e) throw new Error("useEditorInstance must be used within EditorInstanceProvider");
        return e
    }, Pr = () => {
        const {editor: e} = qr();
        if (!e) throw new Error("useEditor used before the load of the editor instance. You can wrap your component in `<WithEditor>` or make use of `useEditorMaybe` hook and ensure the `editor` exists.");
        return e
    }, d1 = () => qr().editor, c2 = y.createContext(null), T9 = ({children: e}) => {
        const [t, n] = y.useState(() => ({
            setRefCanvas(r) {
                n(o => ({...o, refCanvas: r}))
            }, setCustomModal(r) {
                n(o => ({...o, customModal: r}))
            }, setCustomAssets(r) {
                n(o => ({...o, customAssets: r}))
            }, setCustomBlocks(r) {
                n(o => ({...o, customBlocks: r}))
            }, setCustomRte(r) {
                n(o => ({...o, customRte: r}))
            }, setCustomStyles(r) {
                n(o => ({...o, customStyles: r}))
            }, setCustomLayers(r) {
                n(o => ({...o, customLayers: r}))
            }, setCustomSelectors(r) {
                n(o => ({...o, customSelectors: r}))
            }, setCustomTraits(r) {
                n(o => ({...o, customTraits: r}))
            }, setReady(r) {
                n(o => ({...o, ready: r}))
            }
        }));
        return u.jsx(c2.Provider, {value: t, children: e})
    }, Yo = () => {
        const e = y.useContext(c2);
        if (!e) throw new Error("useEditorOptions must be used within EditorOptionsProvider");
        return e
    };

    function O9(...e) {
        return (Array.isArray(e[0]) ? e[0] : [...e]).filter(Boolean).join(" ")
    }

    function oi(e) {
        return typeof e == "function"
    }

    function ho() {
    }

    const u2 = e => typeof e == "string", L9 = async e => {
        const t = document.createElement("link");
        t.href = e, t.rel = "stylesheet", document.head.appendChild(t)
    }, d2 = e => {
        const t = u2(e) ? {id: e, src: e} : e;
        return new Promise((n, r) => {
            const o = document.createElement("script");
            if (document.querySelector(`script[src="${t.src}"]`)) return n(t.id);
            o.src = t.src, o.onload = () => n(t.id), o.onerror = () => r(t.id), document.head.appendChild(o)
        })
    }, M9 = e => {
        const t = e.map(n => d2(n));
        return Promise.allSettled(t)
    }, f2 = e => function () {
        const t = y.useRef(null);
        return y.useEffect(() => {
            const {current: n} = t;
            n && (u2(e) ? n.innerHTML = e : n.appendChild(e))
        }, [t.current]), u.jsx("div", {ref: t})
    }, p2 = new WeakMap;

    function il(e) {
        if (!e) return () => u.jsx(u.Fragment, {});
        const t = p2.get(e);
        if (t) return t;
        const n = function ({children: r}) {
            return mr.createPortal(y.createElement("div", null, r), e)
        };
        return p2.set(e, n), n
    }

    const A9 = y.memo(function ({children: e}) {
        const {editor: t} = qr(), n = Yo(), [r, o] = y.useState(!1), [i, l] = y.useState({
            assets: [],
            types: [],
            close: () => {
            },
            select: () => {
            },
            Container: () => u.jsx(u.Fragment, {})
        });
        return y.useEffect(() => {
            if (!t) return;
            const c = t.Assets.events.custom,
                d = ({open: p, assets: g, types: m, select: v, close: b, container: x}) => {
                    p && l({assets: g, types: m, select: v, close: b, Container: il(x)}), o(p)
                };
            return t.on(c, d), () => {
                t.off(c, d)
            }
        }, [t]), y.useEffect(() => n.setCustomAssets(!0), []), t ? oi(e) ? e({open: r, ...i}) : u.jsx(u.Fragment, {}) : u.jsx(u.Fragment, {})
    });
    y.memo(function ({children: e}) {
        const {editor: t} = qr(), n = Yo(), [r, o] = y.useState(() => ({
            blocks: [],
            dragStart: ho,
            dragStop: ho,
            mapCategoryBlocks: new Map,
            Container: () => u.jsx(u.Fragment, {})
        }));
        return y.useEffect(() => {
            if (!t) return;
            const i = t.Blocks.events.custom, l = ({blocks: c, container: d, dragStart: p, dragStop: g}) => {
                const m = c.reduce((v, b) => {
                    const x = b.getCategoryLabel(), w = v.get(x);
                    return w ? w.push(b) : v.set(x, [b]), v
                }, new Map);
                o({blocks: c, dragStart: p, dragStop: g, mapCategoryBlocks: m, Container: il(d)})
            };
            return t.on(i, l), t.Blocks.__trgCustom(), () => {
                t.off(i, l)
            }
        }, [t]), y.useEffect(() => n.setCustomBlocks(!0), []), t ? oi(e) ? e(r) : u.jsx(u.Fragment, {}) : u.jsx(u.Fragment, {})
    });

    function R9({children: e, ...t}) {
        const n = Yo(), r = y.useRef(null);
        return y.useEffect(() => {
            r.current && n.setRefCanvas(r.current)
        }, [r.current]), u.jsx("div", {...t, ref: r, children: e})
    }

    const N9 = y.memo(function ({children: e}) {
        const {editor: t} = qr(), [n, r] = y.useState(() => ({devices: [], selected: "", select: ho}));
        return y.useEffect(() => {
            if (!t) return;
            const {Devices: o} = t, i = o.events.all, l = () => {
                var c;
                r({
                    devices: o.getDevices(),
                    selected: (c = o.getSelected()) == null ? void 0 : c.id,
                    select: d => o.select(d)
                })
            };
            return t.on(i, l), l(), () => {
                t.off(i, l)
            }
        }, [t]), t ? oi(e) ? e(n) : u.jsx(u.Fragment, {}) : u.jsx(u.Fragment, {})
    }), $9 = e => !!(e && !Array.isArray(e) && typeof e == "object");

    async function D9(e) {
        const t = e.map(({id: i, src: l}) => ({id: i, src: l})), n = e.reduce((i, l) => (i[l.id] = l, i), {}), r = [],
            o = [];
        return (await M9(t)).forEach(i => {
            i.status === "fulfilled" ? r.push(n[i.value]) : o.push(n[i.reason])
        }), {loaded: r, failed: o}
    }

    const I9 = async e => {
        const t = [...e], n = {};
        if (t.length) {
            const r = {}, o = [];
            if (t.forEach((i, l) => {
                $9(i) && (r[i.id] = {index: l}, o.push(i))
            }), o.length) {
                const {loaded: i} = await D9(o);
                i.forEach(({id: l, options: c}) => {
                    r[l].loaded = !0, n[l] = c || {}
                })
            }
            Object.keys(r).forEach(i => {
                const l = r[i];
                l.loaded ? t[l.index] = i : t[l.index] = !1
            })
        }
        return {plugins: t.filter(Boolean), pluginOptions: n}
    }, V9 = y.memo(function ({
                                 children: e,
                                 className: t,
                                 style: n,
                                 options: r = {},
                                 plugins: o = [],
                                 grapesjs: i,
                                 grapesjsCss: l,
                                 onEditor: c = ho,
                                 onReady: d,
                                 onUpdate: p,
                                 waitReady: g,
                                 ...m
                             }) {
        const {setEditor: v} = qr(), b = Yo(), [x, w] = y.useState(!1), j = y.useRef(null);
        y.useEffect(() => {
            if (!b.ready || !j.current) return;
            const A = j.current, $ = b.refCanvas;
            let F, N = {}, z = [];
            const V = X => {
                const Z = {
                    height: "100%", ...r,
                    plugins: [...z, ...r.plugins || []],
                    pluginsOpts: {...r.pluginsOpts, ...N},
                    modal: {custom: !!b.customModal, ...r.modal},
                    assetManager: {custom: !!b.customAssets, ...r.assetManager},
                    styleManager: {custom: !!b.customStyles, ...r.styleManager},
                    blockManager: {custom: !!b.customBlocks, ...r.blockManager},
                    richTextEditor: {custom: !!b.customRte, ...r.richTextEditor},
                    layerManager: {custom: !!b.customLayers, ...r.layerManager},
                    traitManager: {custom: !!b.customTraits, ...r.traitManager},
                    selectorManager: {custom: !!b.customSelectors, ...r.selectorManager},
                    container: $ || A,
                    customUI: !!$, ...$ ? {panels: {defaults: []}} : {}
                };
                F = X.init(Z), v(F), c(F), p && F.on("update", () => {
                    p(F.getProjectData(), F)
                }), F.onReady(() => {
                    w(!0), d == null || d(F)
                })
            };
            return (async () => {
                l && await L9(l);
                const X = await I9(o);
                z = X.plugins, N = X.pluginOptions, typeof i == "string" ? (await d2(i), V(window.grapesjs)) : V(i)
            })(), () => F == null ? void 0 : F.destroy()
        }, [b.ready]);
        const C = r.height ?? "100%", _ = r.width ?? "100%", E = O9("gjs-editor-wrapper", t), k = g && !x,
            T = y.useMemo(() => ({...n, height: C, width: _}), [C, _, n]),
            O = y.useMemo(() => ({...T, ...k ? {opacity: 0, width: 0, height: 0} : {}}), [T, k]);
        return u.jsxs(u.Fragment, {
            children: [g && !x ? u.jsx("div", {
                className: E,
                style: T,
                children: g
            }) : null, u.jsx("div", {...m, ref: j, className: E, style: O, children: e})]
        })
    }), H9 = y.memo(function () {
        const e = Yo();
        return y.useEffect(() => e.setReady(!0), []), u.jsx(u.Fragment, {})
    }), F9 = y.memo(function ({children: e, ...t}) {
        return u.jsx(k9, {children: u.jsx(T9, {children: u.jsxs(V9, {...t, children: [e, u.jsx(H9, {})]})})})
    }), g2 = y.memo(function ({children: e}) {
        const {editor: t} = qr(), n = Yo(), [r, o] = y.useState(() => ({
            root: void 0,
            Container: () => u.jsx(u.Fragment, {})
        }));
        return y.useEffect(() => {
            if (!t) return;
            const {Layers: i} = t, l = i.events.custom, c = ({container: d}) => {
                o({root: i.getRoot(), Container: il(d)})
            };
            return t.on(l, c), i.__trgCustom({}), () => {
                t.off(l, c)
            }
        }, [t]), y.useEffect(() => n.setCustomLayers(!0), []), t ? oi(e) ? e(r) : u.jsx(u.Fragment, {}) : u.jsx(u.Fragment, {})
    }), z9 = y.memo(function ({children: e}) {
        const {editor: t} = qr(), n = Yo(), [r, o] = y.useState(!1), [i, l] = y.useState({
            title: u.jsx(u.Fragment, {}),
            content: u.jsx(u.Fragment, {}),
            attributes: {},
            close: ho
        });
        return y.useEffect(() => {
            if (!t) return;
            const c = "modal", d = ({open: p, title: g, content: m, close: v, attributes: b}) => {
                p && l({title: y.createElement(f2(g)), content: y.createElement(f2(m)), attributes: b, close: v}), o(p)
            };
            return t.on(c, d), () => {
                t.off(c, d)
            }
        }, [t]), y.useEffect(() => n.setCustomModal(!0), []), t ? typeof e == "function" ? e({open: r, ...i}) : u.jsx(u.Fragment, {}) : u.jsx(u.Fragment, {})
    }), h2 = y.memo(function ({children: e}) {
        const {editor: t} = qr(), [n, r] = y.useState(() => ({
            pages: [],
            selected: void 0,
            select: ho,
            add: ho,
            remove: ho
        }));
        return y.useEffect(() => {
            if (!t) return;
            const {Pages: o} = t, i = o.events.all, l = () => {
                r({
                    pages: o.getAll(),
                    selected: o.getSelected(),
                    select: (...c) => o.select(...c),
                    add: (...c) => o.add(...c),
                    remove: (...c) => o.remove(...c)
                })
            };
            return t.on(i, l), l(), () => {
                t.off(i, l)
            }
        }, [t]), t ? oi(e) ? e(n) : u.jsx(u.Fragment, {}) : u.jsx(u.Fragment, {})
    }), m2 = y.memo(function ({children: e}) {
        const {editor: t} = qr(), n = Yo(), [r, o] = y.useState(() => ({
            selectors: [],
            states: [],
            selectedState: "",
            targets: [],
            addSelector: ho,
            removeSelector: ho,
            setState: ho,
            Container: () => u.jsx(u.Fragment, {})
        }));
        return y.useEffect(() => {
            if (!t) return;
            const {Selectors: i} = t, l = i.events.custom, c = ({container: d}) => {
                o({
                    selectors: i.getSelected(),
                    states: i.getStates(),
                    selectedState: i.getState(),
                    targets: i.getSelectedTargets().map(p => p.getSelectorsString()),
                    addSelector: (...p) => i.addSelected(...p),
                    removeSelector: (...p) => i.removeSelected(...p),
                    setState: (...p) => i.setState(...p),
                    Container: il(d)
                })
            };
            return t.on(l, c), () => {
                t.off(l, c)
            }
        }, [t]), y.useEffect(() => n.setCustomSelectors(!0), []), t ? oi(e) ? e(r) : u.jsx(u.Fragment, {}) : u.jsx(u.Fragment, {})
    }), v2 = y.memo(function ({children: e}) {
        const {editor: t} = qr(), n = Yo(), [r, o] = y.useState(() => ({
            sectors: [],
            Container: () => u.jsx(u.Fragment, {})
        }));
        return y.useEffect(() => {
            if (!t) return;
            const {Styles: i} = t, l = i.events.custom, c = ({container: d}) => {
                o({sectors: i.getSectors({visible: !0}), Container: il(d)})
            };
            return t.on(l, c), () => {
                t.off(l, c)
            }
        }, [t]), y.useEffect(() => n.setCustomStyles(!0), []), t ? oi(e) ? e(r) : u.jsx(u.Fragment, {}) : u.jsx(u.Fragment, {})
    }), f1 = y.memo(function ({children: e}) {
        const {editor: t} = qr(), n = Yo(), [r, o] = y.useState(() => ({
            traits: [],
            Container: () => u.jsx(u.Fragment, {})
        }));
        return y.useEffect(() => {
            if (!t) return;
            const {Traits: i} = t, l = i.events.custom, c = ({container: d}) => {
                o({traits: i.getCurrent(), Container: il(d)})
            };
            return t.on(l, c), i.__trgCustom(), () => {
                t.off(l, c)
            }
        }, [t]), y.useEffect(() => n.setCustomTraits(!0), []), t ? oi(e) ? e(r) : u.jsx(u.Fragment, {}) : u.jsx(u.Fragment, {})
    }), ea = ({children: e}) => d1() ? u.jsx(u.Fragment, {children: e}) : u.jsx(u.Fragment, {});

    function pf(e) {
        return ["data-variable", "data-condition"].includes((e == null ? void 0 : e.type) ?? "")
    }

    const B9 = e => {
        const {value: t = {}, onConfirm: n, additionalSources: r, editor: o} = e;
        if (!o) return;
        const i = "DataValuePicker", l = {
            id: i, header: !1, layout: {
                type: "panelDataValuePicker", value: t, onConfirm: ({value: c}) => {
                    n == null || n(c), o.runCommand(_e.layoutRemove, {id: i})
                }, additionalSources: r
            }, placer: {type: "dialog", size: "l"}
        };
        o.runCommand(_e.layoutToggle, {...l})
    };

    function Kc(e) {
        const {
            initialDataValue: t,
            handleDataValueChange: n,
            handleValueClear: r,
            editor: o,
            additionalSources: i,
            enableDataValue: l,
            hasDataResolverValue: c
        } = e;
        if (!o || !l) return [];
        const d = {
            type: "button",
            className: c ? te.tAo : "",
            variant: "out-clear",
            size: "x2s",
            block: !0,
            border: !1
        }, p = [{
            ...d,
            title: o.I18n.t("dataSources.connectDataValue"),
            icon: {icon: fe.databaseOutline, size: Ee.s2x},
            onClick: () => B9({value: t, onConfirm: n, additionalSources: i, editor: o})
        }];
        return c && p.push({
            ...d,
            title: o.I18n.t("dataSources.clearDataValue"),
            icon: {icon: fe.close, size: Ee.s2x},
            onClick: r
        }), p
    }

    const p1 = "gs-cmp-accordion", g1 = `${p1}-handler`, gf = `${g1}__content`, U9 = `${p1}-content`;

    function ta({
                    className: e,
                    classNameWrap: t,
                    classNameContent: n,
                    style: r,
                    handler: o,
                    handlerIcon: i,
                    children: l,
                    inverted: c,
                    disabled: d,
                    sticky: p,
                    onChange: g,
                    open: m
                }) {
        return u.jsx(Bh, {
            as: "div",
            defaultOpen: m,
            className: se(p1, t, "relative"),
            children: ({open: v}) => u.jsxs(u.Fragment, {
                children: [u.jsx(Bh.Button, {
                    as: d ? "div" : "button",
                    disabled: d,
                    style: r,
                    onClick: b => g == null ? void 0 : g({event: b, open: !v}),
                    className: ({open: b}) => U(g1, St(e) ? e(b) : e, p && "gs-utl-sticky gs-utl-top-0 gs-utl-z-10", "gs-utl-w-full"),
                    children: ({open: b}) => u.jsxs(K, {
                        items: "center",
                        className: se("gap-2"),
                        full: !0,
                        children: [u.jsx(q, {
                            className: se(gf, "text-left"),
                            grow: !0,
                            children: St(o) ? o(b) : u.jsxs(K, {
                                items: "center",
                                className: se(`${gf}-wrp`, "gap-3"),
                                nowrap: !0,
                                children: [!!i && u.jsx(be, {
                                    className: se(`${gf}-icon`),
                                    icon: i,
                                    size: Ee.s2x
                                }), u.jsx(q, {className: se(`${gf}-label gs-utl-w-full`), children: o})]
                            })
                        }), u.jsx(q, {
                            className: se(`${g1}-toggle`, c && "-order-1", d && "gs-utl-hidden"),
                            children: u.jsx(be, {
                                icon: fe.chevronDown,
                                className: se("w-5 h-5 transition-transform", b && "rotate-180")
                            })
                        })]
                    })
                }), u.jsx(Bh.Panel, {className: se(U9, n), children: l})]
            })
        })
    }

    function mo({
                    label: e,
                    property: t,
                    hasValue: n,
                    empty: r,
                    onClear: o,
                    children: i,
                    shallow: l,
                    row: c,
                    tooltip: d,
                    skipClear: p,
                    className: g,
                    ...m
                }) {
        const v = e || (t == null ? void 0 : t.getLabel()), b = t == null ? void 0 : t.getParentTarget(),
            x = n || !r && (t == null ? void 0 : t.hasValue({noParent: !0})),
            w = !x && (t == null ? void 0 : t.hasValue()) && b, j = b == null ? void 0 : b.getDevice(),
            C = b == null ? void 0 : b.getState(), _ = b == null ? void 0 : b.getComponent(),
            E = () => o ? o() : t == null ? void 0 : t.clear(),
            k = {className: U(g, "gs-utl-text-sm gs-utl-w-full"), col: !c, items: c ? "center" : void 0, ...m},
            T = U("gs-utl-flex-1", x && !l && te.tAo);
        return t && !t.isVisible() ? null : u.jsxs(K, {
            gap: "xs", ...k, children: [u.jsxs(K, {
                className: T,
                as: "label",
                items: "center",
                gap: "xs",
                nowrap: !0,
                children: [d && u.jsx(q, {
                    children: u.jsx(mn, {
                        title: d,
                        children: u.jsx(be, {icon: fe.information, size: Ee.sx})
                    })
                }), u.jsx(q, {children: r ? u.jsx("span", {children: " "}) : v}), !!w && !l && u.jsx(mn, {
                    title: u.jsxs(u.Fragment, {
                        children: [u.jsx("div", {
                            className: U("gs-utl-mb-1"),
                            children: "Value inherited from"
                        }), !!j && u.jsxs(K, {
                            gap: "s",
                            children: [u.jsx(q, {
                                children: u.jsx(be, {
                                    icon: fe.cellphoneLink,
                                    size: Ee.sx
                                })
                            }), u.jsx(q, {children: u.jsx("b", {children: j.getName()})})]
                        }), u.jsxs(K, {
                            gap: "s",
                            children: [u.jsx(q, {
                                children: u.jsx(be, {
                                    icon: _ ? fe.targetVariant : fe.tag,
                                    size: Ee.sx
                                })
                            }), u.jsxs(q, {
                                children: [u.jsx("b", {children: _ ? "Components" : "Selectors"}), u.jsxs("span", {
                                    className: U("gs-utl-text-xs gs-utl-opacity-75"),
                                    children: [" ", b == null ? void 0 : b.selectorsToString({skipState: 1})]
                                })]
                            })]
                        }), !!C && u.jsxs(K, {
                            gap: "s",
                            children: [u.jsx(q, {
                                children: u.jsx(be, {
                                    icon: fe.flare,
                                    size: Ee.sx
                                })
                            }), u.jsx(q, {children: u.jsx("b", {children: C.getLabel()})})]
                        })]
                    }),
                    children: u.jsx("div", {className: U("gs-utl-w-[6px] gs-utl-h-[6px] gs-utl-rounded-full", te.bgW)})
                }), x && !l && !p && u.jsx(mn, {
                    title: "Clear value",
                    onClick: E,
                    children: u.jsx(be, {className: nt.click, icon: fe.close, size: Ee.s2x})
                })]
            }), !!i && u.jsx(q, {grow: !0, className: "gs-utl-max-w-full", children: i})]
        })
    }

    function Wn(e) {
        const {
                className: t,
                options: n,
                name: r,
                value: o,
                size: i = "m",
                required: l,
                disabled: c,
                onChange: d,
                labelAs: p
            } = e, g = b => {
                const x = n.filter(w => w.id === b)[0];
                return n.indexOf(x) === n.length - 1
            },
            m = (b, x) => U("gs-utl-cursor-pointer", i === "m" && et.xy, i === "s" && "gs-utl-px-2 gs-utl-py-1 text-sm", i === "xs" && "gs-utl-p-1 text-sm", te.br, b && te.bgO, !g(x) && ye.br),
            v = Za({...e, className: "gs-field-buttons"});
        return u.jsxs(Hx, {
            value: o,
            onChange: d,
            disabled: c, ...v,
            children: [u.jsx(Ja, {...e, as: p}), r && u.jsx("input", {
                type: "hidden",
                name: r,
                value: o,
                required: l
            }), u.jsx(K, {
                className: U(t, ye.b, ye.rnd, te.br, "gs-utl-cursor-pointer"),
                items: "center",
                full: !0,
                nowrap: !0,
                children: n.map(({id: b, label: x, title: w, icon: j}) => u.jsx(mn, {
                    title: w,
                    className: U("gs-utl-w-full"),
                    classNameWrp: U("gs-utl-flex-1"),
                    children: u.jsx(Hx.Option, {
                        value: b,
                        className: ({checked: C}) => m(C, b),
                        children: u.jsxs(K, {
                            justify: "center",
                            gap: "s",
                            full: !0,
                            children: [!!j && u.jsx(be, {icon: j, size: Ee.s}), x && u.jsx(q, {children: x})]
                        })
                    })
                }, b))
            })]
        })
    }

    const W9 = "gs-cmp-color-field";

    function Cs(e) {
        const {
            className: t,
            value: n,
            placeholder: r,
            preventSubmitOnEnter: o = !1,
            onChange: i,
            labelAs: l,
            disabled: c
        } = e, [d, p] = y.useState(qd(n)), g = Oc(e);
        y.useEffect(() => {
            p(qd(n))
        }, [n]);
        const m = (w, j) => {
            i == null || i(w, j)
        }, v = w => {
            switch (w.key) {
                case"Escape":
                    return p(n);
                case"Enter":
                    m(d), o && (w.preventDefault(), w.stopPropagation())
            }
        }, b = () => {
            m(d)
        }, x = Za({...e, className: U(W9, t)});
        return u.jsxs("div", {
            ...x,
            children: [u.jsx(Ja, {...e, as: l}), u.jsxs(K, {
                className: bm(e),
                items: "center",
                space: "s",
                children: [u.jsx(q, {children: u.jsx(s2, {value: n, onChange: i, disabled: c})}), u.jsx(q, {
                    grow: !0,
                    children: u.jsx("input", {
                        className: U(g, c && "gs-utl-pointer-events-none"),
                        value: d,
                        onChange: w => p(w.target.value),
                        placeholder: r,
                        onBlur: b,
                        onKeyDown: v,
                        disabled: c
                    })
                })]
            })]
        })
    }

    const Es = "gs-cmp-file-field";

    function qc({
                    className: e,
                    value: t,
                    label: n,
                    btnLabel: r,
                    nameLabel: o,
                    size: i,
                    isContain: l,
                    clear: c,
                    inputField: d,
                    placeholder: p,
                    description: g,
                    preview: m = 50,
                    onChange: v,
                    onOpen: b
                }) {
        var E;
        const x = (t || "").replace(/^"|"$/gi, ""),
            w = ((E = x.split("/").pop()) == null ? void 0 : E.split("?")[0]) || "", j = {minWidth: m, minHeight: m},
            C = x ? {...j, backgroundImage: `url("${x}")`} : j,
            _ = U(" gs-utl-w-full gs-utl-bg-checker gs-utl-bg-no-repeat gs-utl-bg-center", l ? "gs-utl-bg-contain" : "gs-utl-bg-cover", ye.b, ye.rnd, te.br);
        return u.jsxs(K, {
            className: U(Es, e, "gs-utl-gap-1"),
            col: !0,
            nowrap: !0,
            children: [!!n && u.jsx(Ur, {
                className: U(`${Es}-label`),
                size: i,
                m: "",
                children: n
            }), !!g && u.jsx(Ur, {
                className: U(`${Es}-desc`, te.txtLowEmphasis),
                size: i,
                as: "span",
                m: "",
                capitalize: !1,
                children: g
            }), u.jsxs(K, {
                className: U(`${Es}-content gs-utl-gap-1`, te.bg),
                items: "center",
                nowrap: !0,
                children: [u.jsx(q, {
                    className: U(`${Es}-preview`),
                    children: u.jsx("div", {className: _, style: C})
                }), u.jsxs(q, {
                    className: U(`${Es}-fields gs-utl-overflow-hidden`),
                    grow: !0,
                    children: [w && o !== !1 && u.jsx(Ur, {
                        className: U(`${Es}-name`, "gs-utl-mb-2", nt.txtEllips),
                        as: "div",
                        size: i,
                        capitalize: !1,
                        children: w
                    }), u.jsxs(K, {
                        className: U(`${Es}-buttons`),
                        space: "s",
                        nowrap: !0,
                        children: [u.jsx(at, {
                            onClick: () => b == null ? void 0 : b(t),
                            size: i,
                            type: "button",
                            block: !0,
                            full: !0,
                            children: r || "Select image"
                        }), !!t && c && u.jsx(Xt, {
                            onClick: () => v == null ? void 0 : v(""),
                            title: c.tooltip,
                            size: i,
                            icon: {icon: fe.close, size: Ee.s},
                            type: "button",
                            block: !0
                        })]
                    })]
                })]
            }), d && u.jsx(jt, {className: U(`${Es}-input`), value: x, onChange: v, size: i, placeholder: p})]
        })
    }

    const hf = xe(e => {
        const {buttonClassName: t, value: n, ...r} = e, {editor: o} = Ae(), i = Ke(), l = Ji(), c = Nc(),
            d = [...r.options || [], ...c.fontFamilyOptions].map(p => {
                const g = c.getFont(p.id), m = g ? Cm(g) : p.id;
                return {
                    ...p,
                    content: u.jsx(K, {col: !0, children: u.jsx(q, {style: {fontFamily: m}, children: p.label})})
                }
            });
        return u.jsx(Ze, {
            ...r,
            value: Zi(n),
            options: d,
            afterLabel: c.sdkAddFonts && l.hasType("font") && u.jsx(Xt, {
                className: t,
                title: i.t("fontManager.addFontToProject"),
                icon: fe.plus,
                size: "xs",
                border: !1,
                onClick: () => o && Xm(o, {
                    onSelect: ({assetProps: p}) => {
                        const {customData: {font: g}} = p;
                        r.onChange(Zi(g.family))
                    }
                })
            })
        })
    });

    function G9() {
        for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
        return y.useMemo(() => r => {
            t.forEach(o => o(r))
        }, t)
    }

    const mf = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";

    function al(e) {
        const t = Object.prototype.toString.call(e);
        return t === "[object Window]" || t === "[object global]"
    }

    function h1(e) {
        return "nodeType" in e
    }

    function si(e) {
        var t, n;
        return e ? al(e) ? e : h1(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window
    }

    function m1(e) {
        const {Document: t} = si(e);
        return e instanceof t
    }

    function ll(e) {
        return al(e) ? !1 : e instanceof si(e).HTMLElement
    }

    function y2(e) {
        return e instanceof si(e).SVGElement
    }

    function cl(e) {
        return e ? al(e) ? e.document : h1(e) ? m1(e) ? e : ll(e) || y2(e) ? e.ownerDocument : document : document : document
    }

    const na = mf ? y.useLayoutEffect : y.useEffect;

    function K9(e) {
        const t = y.useRef(e);
        return na(() => {
            t.current = e
        }), y.useCallback(function () {
            for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++) r[o] = arguments[o];
            return t.current == null ? void 0 : t.current(...r)
        }, [])
    }

    function q9() {
        const e = y.useRef(null), t = y.useCallback((r, o) => {
            e.current = setInterval(r, o)
        }, []), n = y.useCallback(() => {
            e.current !== null && (clearInterval(e.current), e.current = null)
        }, []);
        return [t, n]
    }

    function Yc(e, t) {
        const n = y.useRef();
        return y.useMemo(() => {
            const r = e(n.current);
            return n.current = r, r
        }, [...t])
    }

    function v1(e) {
        const t = K9(e), n = y.useRef(null), r = y.useCallback(o => {
            o !== n.current && (t == null || t(o, n.current)), n.current = o
        }, []);
        return [n, r]
    }

    let y1 = {};

    function Xc(e, t) {
        return y.useMemo(() => {
            if (t) return t;
            const n = y1[e] == null ? 0 : y1[e] + 1;
            return y1[e] = n, e + "-" + n
        }, [e, t])
    }

    function b2(e) {
        return function (t) {
            for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o];
            return r.reduce((i, l) => {
                const c = Object.entries(l);
                for (const [d, p] of c) {
                    const g = i[d];
                    g != null && (i[d] = g + e * p)
                }
                return i
            }, {...t})
        }
    }

    const Zc = b2(1), x2 = b2(-1);

    function Y9(e) {
        return "clientX" in e && "clientY" in e
    }

    function X9(e) {
        if (!e) return !1;
        const {KeyboardEvent: t} = si(e.target);
        return t && e instanceof t
    }

    function Z9(e) {
        if (!e) return !1;
        const {TouchEvent: t} = si(e.target);
        return t && e instanceof t
    }

    function b1(e) {
        if (Z9(e)) {
            if (e.touches && e.touches.length) {
                const {clientX: t, clientY: n} = e.touches[0];
                return {x: t, y: n}
            } else if (e.changedTouches && e.changedTouches.length) {
                const {clientX: t, clientY: n} = e.changedTouches[0];
                return {x: t, y: n}
            }
        }
        return Y9(e) ? {x: e.clientX, y: e.clientY} : null
    }

    const Jc = Object.freeze({
        Translate: {
            toString(e) {
                if (!e) return;
                const {x: t, y: n} = e;
                return "translate3d(" + (t ? Math.round(t) : 0) + "px, " + (n ? Math.round(n) : 0) + "px, 0)"
            }
        }, Scale: {
            toString(e) {
                if (!e) return;
                const {scaleX: t, scaleY: n} = e;
                return "scaleX(" + t + ") scaleY(" + n + ")"
            }
        }, Transform: {
            toString(e) {
                if (e) return [Jc.Translate.toString(e), Jc.Scale.toString(e)].join(" ")
            }
        }, Transition: {
            toString(e) {
                let {property: t, duration: n, easing: r} = e;
                return t + " " + n + "ms " + r
            }
        }
    }), J9 = {display: "none"};

    function Q9(e) {
        let {id: t, value: n} = e;
        return ee.createElement("div", {id: t, style: J9}, n)
    }

    function e7(e) {
        let {id: t, announcement: n, ariaLiveType: r = "assertive"} = e;
        const o = {
            position: "fixed",
            width: 1,
            height: 1,
            margin: -1,
            border: 0,
            padding: 0,
            overflow: "hidden",
            clip: "rect(0 0 0 0)",
            clipPath: "inset(100%)",
            whiteSpace: "nowrap"
        };
        return ee.createElement("div", {id: t, style: o, role: "status", "aria-live": r, "aria-atomic": !0}, n)
    }

    function t7() {
        const [e, t] = y.useState("");
        return {
            announce: y.useCallback(r => {
                r != null && t(r)
            }, []), announcement: e
        }
    }

    const n7 = {
        draggable: `
    To pick up a draggable item, press the space bar.
    While dragging, use the arrow keys to move the item.
    Press space again to drop the item in its new position, or press escape to cancel.
  `
    }, r7 = {
        onDragStart(e) {
            return `Picked up draggable item ${e}.`
        }, onDragOver(e, t) {
            return t ? `Draggable item ${e} was moved over droppable area ${t}.` : `Draggable item ${e} is no longer over a droppable area.`
        }, onDragEnd(e, t) {
            return t ? `Draggable item ${e} was dropped over droppable area ${t}` : `Draggable item ${e} was dropped.`
        }, onDragCancel(e) {
            return `Dragging was cancelled. Draggable item ${e} was dropped.`
        }
    };
    var Nt;
    (function (e) {
        e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable"
    })(Nt || (Nt = {}));

    function x1(...e) {
    }

    class Qc extends Map {
        get(t) {
            var n;
            return t != null && (n = super.get(t)) != null ? n : void 0
        }

        toArray() {
            return Array.from(this.values())
        }

        getEnabled() {
            return this.toArray().filter(({disabled: t}) => !t)
        }

        getNodeFor(t) {
            var n, r;
            return (n = (r = this.get(t)) == null ? void 0 : r.node.current) != null ? n : void 0
        }
    }

    const vf = y.createContext({
        activatorEvent: null,
        active: null,
        activeNode: null,
        activeNodeRect: null,
        activeNodeClientRect: null,
        activators: [],
        ariaDescribedById: {draggable: ""},
        containerNodeRect: null,
        dispatch: x1,
        draggableNodes: {},
        droppableRects: new Map,
        droppableContainers: new Qc,
        over: null,
        dragOverlay: {nodeRef: {current: null}, rect: null, setRef: x1},
        scrollableAncestors: [],
        scrollableAncestorRects: [],
        recomputeLayouts: x1,
        windowRect: null,
        willRecomputeLayouts: !1
    });

    function o7() {
        return {
            draggable: {active: null, initialCoordinates: {x: 0, y: 0}, nodes: {}, translate: {x: 0, y: 0}},
            droppable: {containers: new Qc}
        }
    }

    function s7(e, t) {
        switch (t.type) {
            case Nt.DragStart:
                return {...e, draggable: {...e.draggable, initialCoordinates: t.initialCoordinates, active: t.active}};
            case Nt.DragMove:
                return e.draggable.active ? {
                    ...e,
                    draggable: {
                        ...e.draggable,
                        translate: {
                            x: t.coordinates.x - e.draggable.initialCoordinates.x,
                            y: t.coordinates.y - e.draggable.initialCoordinates.y
                        }
                    }
                } : e;
            case Nt.DragEnd:
            case Nt.DragCancel:
                return {
                    ...e,
                    draggable: {...e.draggable, active: null, initialCoordinates: {x: 0, y: 0}, translate: {x: 0, y: 0}}
                };
            case Nt.RegisterDroppable: {
                const {element: n} = t, {id: r} = n, o = new Qc(e.droppable.containers);
                return o.set(r, n), {...e, droppable: {...e.droppable, containers: o}}
            }
            case Nt.SetDroppableDisabled: {
                const {id: n, key: r, disabled: o} = t, i = e.droppable.containers.get(n);
                if (!i || r !== i.key) return e;
                const l = new Qc(e.droppable.containers);
                return l.set(n, {...i, disabled: o}), {...e, droppable: {...e.droppable, containers: l}}
            }
            case Nt.UnregisterDroppable: {
                const {id: n, key: r} = t, o = e.droppable.containers.get(n);
                if (!o || r !== o.key) return e;
                const i = new Qc(e.droppable.containers);
                return i.delete(n), {...e, droppable: {...e.droppable, containers: i}}
            }
            default:
                return e
        }
    }

    const w2 = y.createContext({type: null, event: null});

    function i7({onDragStart: e, onDragMove: t, onDragOver: n, onDragEnd: r, onDragCancel: o}) {
        const i = y.useContext(w2), l = y.useRef(i);
        y.useEffect(() => {
            if (i !== l.current) {
                const {type: c, event: d} = i;
                switch (c) {
                    case Nt.DragStart:
                        e == null || e(d);
                        break;
                    case Nt.DragMove:
                        t == null || t(d);
                        break;
                    case Nt.DragOver:
                        n == null || n(d);
                        break;
                    case Nt.DragCancel:
                        o == null || o(d);
                        break;
                    case Nt.DragEnd:
                        r == null || r(d);
                        break
                }
                l.current = i
            }
        }, [i, e, t, n, r, o])
    }

    function a7({announcements: e = r7, hiddenTextDescribedById: t, screenReaderInstructions: n}) {
        const {announce: r, announcement: o} = t7(), i = Xc("DndLiveRegion"), [l, c] = y.useState(!1);
        return y.useEffect(() => {
            c(!0)
        }, []), i7(y.useMemo(() => ({
            onDragStart({active: d}) {
                r(e.onDragStart(d.id))
            }, onDragMove({active: d, over: p}) {
                e.onDragMove && r(e.onDragMove(d.id, p == null ? void 0 : p.id))
            }, onDragOver({active: d, over: p}) {
                r(e.onDragOver(d.id, p == null ? void 0 : p.id))
            }, onDragEnd({active: d, over: p}) {
                r(e.onDragEnd(d.id, p == null ? void 0 : p.id))
            }, onDragCancel({active: d}) {
                r(e.onDragCancel(d.id))
            }
        }), [r, e])), l ? mr.createPortal(ee.createElement(ee.Fragment, null, ee.createElement(Q9, {
            id: t,
            value: n.draggable
        }), ee.createElement(e7, {id: i, announcement: o})), document.body) : null
    }

    const Ps = Object.freeze({x: 0, y: 0});

    function S2(e, t) {
        return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2))
    }

    function j2(e, t = e.offsetLeft, n = e.offsetTop) {
        return {x: t + e.width * .5, y: n + e.height * .5}
    }

    const l7 = ({collisionRect: e, droppableContainers: t}) => {
        const n = j2(e, e.left, e.top);
        let r = 1 / 0, o = null;
        for (const i of t) {
            const {rect: {current: l}} = i;
            if (l) {
                const c = S2(j2(l), n);
                c < r && (r = c, o = i.id)
            }
        }
        return o
    };

    function c7(e, t, n) {
        return {...e, scaleX: t && n ? t.width / n.width : 1, scaleY: t && n ? t.height / n.height : 1}
    }

    function u7(e, t) {
        return e && t ? {x: e.left - t.left, y: e.top - t.top} : Ps
    }

    function d7(e) {
        return function (n, ...r) {
            return r.reduce((o, i) => ({
                ...o,
                top: o.top + e * i.y,
                bottom: o.bottom + e * i.y,
                left: o.left + e * i.x,
                right: o.right + e * i.x,
                offsetLeft: o.offsetLeft + e * i.x,
                offsetTop: o.offsetTop + e * i.y
            }), {...n})
        }
    }

    const C2 = d7(1);

    function f7(e, t = window.getComputedStyle(e)) {
        return t.position === "fixed"
    }

    function p7(e, t = window.getComputedStyle(e)) {
        const n = /(auto|scroll|overlay)/;
        return ["overflow", "overflowX", "overflowY"].find(o => {
            const i = t[o];
            return typeof i == "string" ? n.test(i) : !1
        }) != null
    }

    function w1(e) {
        const t = [];

        function n(r) {
            if (!r) return t;
            if (m1(r) && r.scrollingElement != null && !t.includes(r.scrollingElement)) return t.push(r.scrollingElement), t;
            if (!ll(r) || y2(r) || t.includes(r)) return t;
            const o = window.getComputedStyle(r);
            return p7(r, o) && t.push(r), f7(r, o) ? t : n(r.parentNode)
        }

        return e ? n(e.parentNode) : t
    }

    function S1(e) {
        return !mf || !e ? null : al(e) ? e : h1(e) ? m1(e) || e === cl(e).scrollingElement ? window : ll(e) ? e : null : null
    }

    function j1(e) {
        return al(e) ? {x: e.scrollX, y: e.scrollY} : {x: e.scrollLeft, y: e.scrollTop}
    }

    var ul;
    (function (e) {
        e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward"
    })(ul || (ul = {}));

    function E2(e) {
        const t = {x: 0, y: 0}, n = {x: e.scrollWidth - e.clientWidth, y: e.scrollHeight - e.clientHeight},
            r = e.scrollTop <= t.y, o = e.scrollLeft <= t.x, i = e.scrollTop >= n.y, l = e.scrollLeft >= n.x;
        return {isTop: r, isLeft: o, isBottom: i, isRight: l, maxScroll: n, minScroll: t}
    }

    function g7(e) {
        return !mf || !e ? !1 : e === document.scrollingElement
    }

    const h7 = {x: .2, y: .2};

    function m7(e, t, {top: n, left: r, right: o, bottom: i}, l = 10, c = h7) {
        const {clientHeight: d, clientWidth: p} = e,
            g = g7(e) ? {top: 0, left: 0, right: p, bottom: d, width: p, height: d} : t, {
                isTop: m,
                isBottom: v,
                isLeft: b,
                isRight: x
            } = E2(e), w = {x: 0, y: 0}, j = {x: 0, y: 0}, C = {height: g.height * c.y, width: g.width * c.x};
        return !m && n <= g.top + C.height ? (w.y = ul.Backward, j.y = l * Math.abs((g.top + C.height - n) / C.height)) : !v && i >= g.bottom - C.height && (w.y = ul.Forward, j.y = l * Math.abs((g.bottom - C.height - i) / C.height)), !x && o >= g.right - C.width ? (w.x = ul.Forward, j.x = l * Math.abs((g.right - C.width - o) / C.width)) : !b && r <= g.left + C.width && (w.x = ul.Backward, j.x = l * Math.abs((g.left + C.width - r) / C.width)), {
            direction: w,
            speed: j
        }
    }

    function v7(e) {
        if (e === document.scrollingElement) {
            const {innerWidth: i, innerHeight: l} = window;
            return {top: 0, left: 0, right: i, bottom: l, width: i, height: l}
        }
        const {top: t, left: n, right: r, bottom: o} = e.getBoundingClientRect();
        return {top: t, left: n, right: r, bottom: o, width: e.clientWidth, height: e.clientHeight}
    }

    function P2(e) {
        return e.reduce((t, n) => Zc(t, j1(n)), Ps)
    }

    function _2(e, t, n = Ps) {
        if (!e || !ll(e)) return n;
        const r = {x: n.x + e.offsetLeft, y: n.y + e.offsetTop};
        return e.offsetParent === t ? r : _2(e.offsetParent, t, r)
    }

    function yf(e) {
        const {offsetWidth: t, offsetHeight: n} = e, {x: r, y: o} = _2(e, null);
        return {width: t, height: n, offsetTop: o, offsetLeft: r}
    }

    function bf(e) {
        if (al(e)) {
            const p = window.innerWidth, g = window.innerHeight;
            return {top: 0, left: 0, right: p, bottom: g, width: p, height: g, offsetTop: 0, offsetLeft: 0}
        }
        const {offsetTop: t, offsetLeft: n} = yf(e), {
            width: r,
            height: o,
            top: i,
            bottom: l,
            left: c,
            right: d
        } = e.getBoundingClientRect();
        return {width: r, height: o, top: i, bottom: l, right: d, left: c, offsetTop: t, offsetLeft: n}
    }

    function C1(e) {
        const {width: t, height: n, offsetTop: r, offsetLeft: o} = yf(e), i = w1(e), l = P2(i), c = r - l.y,
            d = o - l.x;
        return {width: t, height: n, top: c, bottom: c + n, right: d + t, left: d, offsetTop: r, offsetLeft: o}
    }

    function k2(e) {
        return "top" in e
    }

    function T2(e, t = e.offsetLeft, n = e.offsetTop) {
        return [{x: t, y: n}, {x: t + e.width, y: n}, {x: t, y: n + e.height}, {x: t + e.width, y: n + e.height}]
    }

    const y7 = ({collisionRect: e, droppableContainers: t}) => {
        let n = 1 / 0, r = null;
        const o = T2(e, e.left, e.top);
        for (const i of t) {
            const {rect: {current: l}} = i;
            if (l) {
                const c = T2(l, k2(l) ? l.left : void 0, k2(l) ? l.top : void 0),
                    d = o.reduce((g, m, v) => g + S2(c[v], m), 0), p = Number((d / 4).toFixed(4));
                p < n && (n = p, r = i.id)
            }
        }
        return r
    };

    function b7(e, t) {
        const n = Math.max(t.top, e.offsetTop), r = Math.max(t.left, e.offsetLeft),
            o = Math.min(t.left + t.width, e.offsetLeft + e.width),
            i = Math.min(t.top + t.height, e.offsetTop + e.height), l = o - r, c = i - n;
        if (r < o && n < i) {
            const d = t.width * t.height, p = e.width * e.height, g = l * c, m = g / (d + p - g);
            return Number(m.toFixed(4))
        }
        return 0
    }

    const x7 = ({collisionRect: e, droppableContainers: t}) => {
        let n = 0, r = null;
        for (const o of t) {
            const {rect: {current: i}} = o;
            if (i) {
                const l = b7(i, e);
                l > n && (n = l, r = o.id)
            }
        }
        return r
    };
    var eu;
    (function (e) {
        e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect"
    })(eu || (eu = {}));
    var xf;
    (function (e) {
        e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder"
    })(xf || (xf = {}));

    function w7({
                    acceleration: e,
                    activator: t = eu.Pointer,
                    canScroll: n,
                    draggingRect: r,
                    enabled: o,
                    interval: i = 5,
                    order: l = xf.TreeOrder,
                    pointerCoordinates: c,
                    scrollableAncestors: d,
                    scrollableAncestorRects: p,
                    threshold: g
                }) {
        const [m, v] = q9(), b = y.useRef({x: 1, y: 1}), x = y.useMemo(() => {
            switch (t) {
                case eu.Pointer:
                    return c ? {top: c.y, bottom: c.y, left: c.x, right: c.x} : null;
                case eu.DraggableRect:
                    return r
            }
            return null
        }, [t, r, c]), w = y.useRef(Ps), j = y.useRef(null), C = y.useCallback(() => {
            const E = j.current;
            if (!E) return;
            const k = b.current.x * w.current.x, T = b.current.y * w.current.y;
            E.scrollBy(k, T)
        }, []), _ = y.useMemo(() => l === xf.TreeOrder ? [...d].reverse() : d, [l, d]);
        y.useEffect(() => {
            if (!o || !d.length || !x) {
                v();
                return
            }
            for (const E of _) {
                if ((n == null ? void 0 : n(E)) === !1) continue;
                const k = d.indexOf(E), T = p[k];
                if (!T) continue;
                const {direction: O, speed: A} = m7(E, T, x, e, g);
                if (A.x > 0 || A.y > 0) {
                    v(), j.current = E, m(C, i), b.current = A, w.current = O;
                    return
                }
            }
            b.current = {x: 0, y: 0}, w.current = {x: 0, y: 0}, v()
        }, [e, C, n, v, o, i, JSON.stringify(x), m, d, _, p, JSON.stringify(g)])
    }

    function S7(e, t) {
        const n = t !== null ? e[t] : void 0, r = n ? n.node.current : null;
        return Yc(o => {
            var i;
            return t === null ? null : (i = r ?? o) != null ? i : null
        }, [r, t])
    }

    function j7(e, t) {
        return y.useMemo(() => e.reduce((n, r) => {
            const {sensor: o} = r, i = o.activators.map(l => ({eventName: l.eventName, handler: t(l.handler, r)}));
            return [...n, ...i]
        }, []), [e, t])
    }

    function O2(e) {
        const t = y.useRef(e);
        return na(() => {
            t.current !== e && (t.current = e)
        }, [e]), t
    }

    var tu;
    (function (e) {
        e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging"
    })(tu || (tu = {}));
    var E1;
    (function (e) {
        e.Optimized = "optimized"
    })(E1 || (E1 = {}));
    const L2 = new Map, C7 = {measure: yf, strategy: tu.WhileDragging, frequency: E1.Optimized};

    function E7(e, {dragging: t, dependencies: n, config: r}) {
        const [o, i] = y.useState(!1), {frequency: l, measure: c, strategy: d} = {...C7, ...r}, p = y.useRef(e),
            g = y.useCallback(() => i(!0), []), m = y.useRef(null), v = x(), b = Yc(w => {
                if (v && !t) return L2;
                if (!w || w === L2 || p.current !== e || o) {
                    for (let j of e) j && (j.rect.current = j.node.current ? c(j.node.current) : null);
                    return P7(e)
                }
                return w
            }, [e, t, v, c, o]);
        return y.useEffect(() => {
            p.current = e
        }, [e]), y.useEffect(() => {
            o && i(!1)
        }, [o]), y.useEffect(function () {
            v || requestAnimationFrame(g)
        }, [t, v]), y.useEffect(function () {
            v || typeof l != "number" || m.current !== null || (m.current = setTimeout(() => {
                g(), m.current = null
            }, l))
        }, [l, v, g, ...n]), {layoutRectMap: b, recomputeLayouts: g, willRecomputeLayouts: o};

        function x() {
            switch (d) {
                case tu.Always:
                    return !1;
                case tu.BeforeDragging:
                    return t;
                default:
                    return !t
            }
        }
    }

    function P7(e) {
        const t = new Map;
        if (e) for (const n of e) {
            if (!n) continue;
            const {id: r, rect: o} = n;
            o.current != null && t.set(r, o.current)
        }
        return t
    }

    function _7(e) {
        const [t, n] = y.useState(null), r = y.useRef(e), o = y.useCallback(i => {
            const l = S1(i.target);
            l && n(c => c ? (c.set(l, j1(l)), new Map(c)) : null)
        }, []);
        return y.useEffect(() => {
            const i = r.current;
            if (e !== i) {
                l(i);
                const c = e.map(d => {
                    const p = S1(d);
                    return p ? (p.addEventListener("scroll", o, {passive: !0}), [p, j1(p)]) : null
                }).filter(d => d != null);
                n(c.length ? new Map(c) : null), r.current = e
            }
            return () => {
                l(e), l(i)
            };

            function l(c) {
                c.forEach(d => {
                    const p = S1(d);
                    p == null || p.removeEventListener("scroll", o)
                })
            }
        }, [o, e]), y.useMemo(() => e.length ? t ? Array.from(t.values()).reduce((i, l) => Zc(i, l), Ps) : P2(e) : Ps, [e, t])
    }

    const k7 = [];

    function T7(e) {
        const t = y.useRef(e),
            n = Yc(r => e ? r && e && t.current && e.parentNode === t.current.parentNode ? r : w1(e) : k7, [e]);
        return y.useEffect(() => {
            t.current = e
        }, [e]), n
    }

    function O7(e) {
        y.useEffect(() => {
            if (!mf) return;
            const t = e.map(({sensor: n}) => n.setup == null ? void 0 : n.setup());
            return () => {
                for (const n of t) n == null || n()
            }
        }, e.map(({sensor: t}) => t))
    }

    function L7(e, t) {
        return y.useMemo(() => e.reduce((n, {eventName: r, handler: o}) => (n[r] = i => {
            o(i, t)
        }, n), {}), [e, t])
    }

    const P1 = A2(bf), M7 = A7(bf);

    function M2(e, t, n) {
        const r = y.useRef(e);
        return Yc(o => e ? n || !o && e || e !== r.current ? ll(e) && e.parentNode == null ? null : t(e) : o ?? null : null, [e, n, t])
    }

    function A2(e) {
        return (t, n) => M2(t, e, n)
    }

    function A7(e) {
        const t = [];
        return function (r, o) {
            const i = y.useRef(r);
            return Yc(l => r.length ? o || !l && r.length || r !== i.current ? r.map(c => e(c)) : l ?? t : t, [r, o])
        }
    }

    function R7(e) {
        if (!e) return null;
        if (e.children.length > 1) return e;
        const t = e.children[0];
        return ll(t) ? t : e
    }

    function N7(e) {
        const {width: t, height: n, offsetLeft: r, offsetTop: o} = yf(e);
        return {top: o, bottom: o + n, left: r, right: r + t, width: t, height: n, offsetTop: o, offsetLeft: r}
    }

    const $7 = A2(N7);

    function D7({disabled: e, forceRecompute: t}) {
        const [n, r] = v1(), o = $7(e ? null : R7(n.current), t);
        return y.useMemo(() => ({nodeRef: n, rect: o, setRef: r}), [o, n, r])
    }

    function R2(e, t) {
        return y.useMemo(() => ({sensor: e, options: t ?? {}}), [e, t])
    }

    function I7(...e) {
        return y.useMemo(() => [...e].filter(t => t != null), [...e])
    }

    class nu {
        constructor(t) {
            this.target = t, this.listeners = [], this.removeAll = () => {
                this.listeners.forEach(n => {
                    var r;
                    return (r = this.target) == null ? void 0 : r.removeEventListener(...n)
                })
            }
        }

        add(t, n, r) {
            var o;
            (o = this.target) == null || o.addEventListener(t, n, r), this.listeners.push([t, n, r])
        }
    }

    function V7(e) {
        const {EventTarget: t} = si(e);
        return e instanceof t ? e : cl(e)
    }

    function _1(e, t) {
        const n = Math.abs(e.x), r = Math.abs(e.y);
        return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1
    }

    var Yr;
    (function (e) {
        e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange"
    })(Yr || (Yr = {}));

    function N2(e) {
        e.preventDefault()
    }

    function H7(e) {
        e.stopPropagation()
    }

    var dt;
    (function (e) {
        e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter"
    })(dt || (dt = {}));
    const $2 = {start: [dt.Space, dt.Enter], cancel: [dt.Esc], end: [dt.Space, dt.Enter]},
        F7 = (e, {currentCoordinates: t}) => {
            switch (e.code) {
                case dt.Right:
                    return {...t, x: t.x + 25};
                case dt.Left:
                    return {...t, x: t.x - 25};
                case dt.Down:
                    return {...t, y: t.y + 25};
                case dt.Up:
                    return {...t, y: t.y - 25}
            }
        };

    class k1 {
        constructor(t) {
            this.props = t, this.autoScrollEnabled = !1, this.coordinates = Ps;
            const {event: {target: n}} = t;
            this.props = t, this.listeners = new nu(cl(n)), this.windowListeners = new nu(si(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach()
        }

        attach() {
            this.handleStart(), this.windowListeners.add(Yr.Resize, this.handleCancel), this.windowListeners.add(Yr.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(Yr.Keydown, this.handleKeyDown))
        }

        handleStart() {
            const {activeNode: t, onStart: n} = this.props;
            if (!t.node.current) throw new Error("Active draggable node is undefined");
            const r = bf(t.node.current), o = {x: r.left, y: r.top};
            this.coordinates = o, n(o)
        }

        handleKeyDown(t) {
            if (X9(t)) {
                const {coordinates: n} = this, {active: r, context: o, options: i} = this.props, {
                    keyboardCodes: l = $2,
                    coordinateGetter: c = F7,
                    scrollBehavior: d = "smooth"
                } = i, {code: p} = t;
                if (l.end.includes(p)) {
                    this.handleEnd(t);
                    return
                }
                if (l.cancel.includes(p)) {
                    this.handleCancel(t);
                    return
                }
                const g = c(t, {active: r, context: o.current, currentCoordinates: n});
                if (g) {
                    const m = {x: 0, y: 0}, {scrollableAncestors: v} = o.current;
                    for (const b of v) {
                        const x = t.code, w = x2(g, n), {
                                isTop: j,
                                isRight: C,
                                isLeft: _,
                                isBottom: E,
                                maxScroll: k,
                                minScroll: T
                            } = E2(b), O = v7(b), A = {
                                x: Math.min(x === dt.Right ? O.right - O.width / 2 : O.right, Math.max(x === dt.Right ? O.left : O.left + O.width / 2, g.x)),
                                y: Math.min(x === dt.Down ? O.bottom - O.height / 2 : O.bottom, Math.max(x === dt.Down ? O.top : O.top + O.height / 2, g.y))
                            }, $ = x === dt.Right && !C || x === dt.Left && !_,
                            F = x === dt.Down && !E || x === dt.Up && !j;
                        if ($ && A.x !== g.x) {
                            if (x === dt.Right && b.scrollLeft + w.x <= k.x || x === dt.Left && b.scrollLeft + w.x >= T.x) {
                                b.scrollBy({left: w.x, behavior: d});
                                return
                            }
                            m.x = x === dt.Right ? b.scrollLeft - k.x : b.scrollLeft - T.x, b.scrollBy({
                                left: -m.x,
                                behavior: d
                            });
                            break
                        } else if (F && A.y !== g.y) {
                            if (x === dt.Down && b.scrollTop + w.y <= k.y || x === dt.Up && b.scrollTop + w.y >= T.y) {
                                b.scrollBy({top: w.y, behavior: d});
                                return
                            }
                            m.y = x === dt.Down ? b.scrollTop - k.y : b.scrollTop - T.y, b.scrollBy({
                                top: -m.y,
                                behavior: d
                            });
                            break
                        }
                    }
                    this.handleMove(t, Zc(g, m))
                }
            }
        }

        handleMove(t, n) {
            const {onMove: r} = this.props;
            t.preventDefault(), r(n), this.coordinates = n
        }

        handleEnd(t) {
            const {onEnd: n} = this.props;
            t.preventDefault(), this.detach(), n()
        }

        handleCancel(t) {
            const {onCancel: n} = this.props;
            t.preventDefault(), this.detach(), n()
        }

        detach() {
            this.listeners.removeAll(), this.windowListeners.removeAll()
        }
    }

    k1.activators = [{
        eventName: "onKeyDown", handler: (e, {keyboardCodes: t = $2, onActivation: n}) => {
            const {code: r} = e.nativeEvent;
            return t.start.includes(r) ? (e.preventDefault(), n == null || n({event: e.nativeEvent}), !0) : !1
        }
    }];

    function D2(e) {
        return !!(e && "distance" in e)
    }

    function I2(e) {
        return !!(e && "delay" in e)
    }

    class T1 {
        constructor(t, n, r = V7(t.event.target)) {
            this.props = t, this.events = n, this.autoScrollEnabled = !0, this.activated = !1, this.timeoutId = null;
            const {event: o} = t, {target: i} = o;
            this.props = t, this.events = n, this.document = cl(i), this.documentListeners = new nu(this.document), this.listeners = new nu(r), this.windowListeners = new nu(si(i)), this.initialCoordinates = b1(o), this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach()
        }

        attach() {
            const {events: t, props: {options: {activationConstraint: n}}} = this;
            if (this.listeners.add(t.move.name, this.handleMove, {passive: !1}), this.listeners.add(t.end.name, this.handleEnd), this.windowListeners.add(Yr.Resize, this.handleCancel), this.windowListeners.add(Yr.DragStart, N2), this.windowListeners.add(Yr.VisibilityChange, this.handleCancel), this.windowListeners.add(Yr.ContextMenu, N2), this.documentListeners.add(Yr.Keydown, this.handleKeydown), n) {
                if (D2(n)) return;
                if (I2(n)) {
                    this.timeoutId = setTimeout(this.handleStart, n.delay);
                    return
                }
            }
            this.handleStart()
        }

        detach() {
            this.listeners.removeAll(), this.windowListeners.removeAll(), setTimeout(this.documentListeners.removeAll, 50), this.timeoutId !== null && (clearTimeout(this.timeoutId), this.timeoutId = null)
        }

        handleStart() {
            const {initialCoordinates: t} = this, {onStart: n} = this.props;
            t && (this.activated = !0, this.documentListeners.add(Yr.Click, H7, {capture: !0}), this.removeTextSelection(), this.documentListeners.add(Yr.SelectionChange, this.removeTextSelection), n(t))
        }

        handleMove(t) {
            const {activated: n, initialCoordinates: r, props: o} = this, {
                onMove: i,
                options: {activationConstraint: l}
            } = o;
            if (!r) return;
            const c = b1(t), d = x2(r, c);
            if (!n && l) {
                if (I2(l)) return _1(d, l.tolerance) ? this.handleCancel() : void 0;
                if (D2(l)) return l.tolerance != null && _1(d, l.tolerance) ? this.handleCancel() : _1(d, l.distance) ? this.handleStart() : void 0
            }
            t.cancelable && t.preventDefault(), i(c)
        }

        handleEnd() {
            const {onEnd: t} = this.props;
            this.detach(), t()
        }

        handleCancel() {
            const {onCancel: t} = this.props;
            this.detach(), t()
        }

        handleKeydown(t) {
            t.code === dt.Esc && this.handleCancel()
        }

        removeTextSelection() {
            var t;
            (t = this.document.getSelection()) == null || t.removeAllRanges()
        }
    }

    const z7 = {move: {name: "pointermove"}, end: {name: "pointerup"}};

    class O1 extends T1 {
        constructor(t) {
            const {event: n} = t, r = cl(n.target);
            super(t, z7, r)
        }
    }

    O1.activators = [{
        eventName: "onPointerDown",
        handler: ({nativeEvent: e}, {onActivation: t}) => !e.isPrimary || e.button !== 0 ? !1 : (t == null || t({event: e}), !0)
    }];
    const B7 = {move: {name: "mousemove"}, end: {name: "mouseup"}};
    var L1;
    (function (e) {
        e[e.RightClick = 2] = "RightClick"
    })(L1 || (L1 = {}));

    class U7 extends T1 {
        constructor(t) {
            super(t, B7, cl(t.event.target))
        }
    }

    U7.activators = [{
        eventName: "onMouseDown",
        handler: ({nativeEvent: e}, {onActivation: t}) => e.button === L1.RightClick ? !1 : (t == null || t({event: e}), !0)
    }];
    const M1 = {move: {name: "touchmove"}, end: {name: "touchend"}};

    class W7 extends T1 {
        constructor(t) {
            super(t, M1)
        }

        static setup() {
            return window.addEventListener(M1.move.name, t, {capture: !1, passive: !1}), function () {
                window.removeEventListener(M1.move.name, t)
            };

            function t() {
            }
        }
    }

    W7.activators = [{
        eventName: "onTouchStart", handler: ({nativeEvent: e}, {onActivation: t}) => {
            const {touches: n} = e;
            return n.length > 1 ? !1 : (t == null || t({event: e}), !0)
        }
    }];

    function G7(e, {transform: t, ...n}) {
        return e != null && e.length ? e.reduce((r, o) => o({transform: r, ...n}), t) : t
    }

    const K7 = [{sensor: O1, options: {}}, {sensor: k1, options: {}}], q7 = {current: {}},
        V2 = y.createContext({...Ps, scaleX: 1, scaleY: 1}), Y7 = y.memo(function ({
                                                                                       id: t,
                                                                                       autoScroll: n = !0,
                                                                                       announcements: r,
                                                                                       children: o,
                                                                                       sensors: i = K7,
                                                                                       collisionDetection: l = x7,
                                                                                       measuring: c,
                                                                                       modifiers: d,
                                                                                       screenReaderInstructions: p = n7,
                                                                                       ...g
                                                                                   }) {
            var m, v, b, x, w;
            const j = y.useReducer(s7, void 0, o7), [C, _] = j, [E, k] = y.useState(() => ({
                    type: null,
                    event: null
                })), [T, O] = y.useState(!1), {draggable: {active: A, nodes: $, translate: F}, droppable: {containers: N}} = C,
                z = A ? $[A] : null, V = y.useRef({initial: null, translated: null}), X = y.useMemo(() => {
                    var an;
                    return A != null ? {id: A, data: (an = z == null ? void 0 : z.data) != null ? an : q7, rect: V} : null
                }, [A, z]), Z = y.useRef(null), [R, B] = y.useState(null), [Q, H] = y.useState(null), I = y.useRef(g),
                D = Xc("DndDescribedBy", t), M = y.useMemo(() => N.getEnabled(), [N]), {
                    layoutRectMap: W,
                    recomputeLayouts: ce,
                    willRecomputeLayouts: ne
                } = E7(M, {dragging: T, dependencies: [F.x, F.y], config: c == null ? void 0 : c.droppable}), ue = S7($, A),
                me = Q ? b1(Q) : null,
                ae = M2(ue, (m = c == null || (v = c.draggable) == null ? void 0 : v.measure) != null ? m : C1),
                ie = P1(ue), de = y.useRef(null), je = de.current, he = y.useRef({
                    active: null,
                    activeNode: ue,
                    collisionRect: null,
                    droppableRects: W,
                    draggableNodes: $,
                    draggingNodeRect: null,
                    droppableContainers: N,
                    over: null,
                    scrollableAncestors: [],
                    scrollAdjustedTranslate: null,
                    translatedRect: null
                }), Ie = N.getNodeFor((b = he.current.over) == null ? void 0 : b.id),
                He = P1(ue ? ue.ownerDocument.defaultView : null), yt = P1(ue ? ue.parentElement : null),
                kt = T7(A ? Ie ?? ue : null), Bt = M7(kt), Ct = D7({disabled: A == null, forceRecompute: ne}),
                pt = (x = Ct.rect) != null ? x : ae, Sn = pt === ae ? u7(ae, je) : Ps, wt = G7(d, {
                    transform: {x: F.x - Sn.x, y: F.y - Sn.y, scaleX: 1, scaleY: 1},
                    activatorEvent: Q,
                    active: X,
                    activeNodeRect: ie,
                    containerNodeRect: yt,
                    draggingNodeRect: pt,
                    over: he.current.over,
                    overlayNodeRect: Ct.rect,
                    scrollableAncestors: kt,
                    scrollableAncestorRects: Bt,
                    windowRect: He
                }), Dt = me ? Zc(me, F) : null, rn = _7(kt), Ut = Zc(wt, rn), Tt = pt ? C2(pt, wt) : null,
                st = Tt ? C2(Tt, rn) : null, Lt = X && st ? l({
                    active: X,
                    collisionRect: st,
                    droppableContainers: M
                }) : null, [qt, jn] = y.useState(null), Kn = c7(wt, (w = qt == null ? void 0 : qt.rect) != null ? w : null, ae),
                lr = y.useCallback((an, {sensor: Ht, options: Mt}) => {
                    if (!Z.current) return;
                    const it = $[Z.current];
                    if (!it) return;
                    const Qt = new Ht({
                        active: Z.current,
                        activeNode: it,
                        event: an.nativeEvent,
                        options: Mt,
                        context: he,
                        onStart(ln) {
                            const Or = Z.current;
                            if (!Or) return;
                            const So = $[Or];
                            if (!So) return;
                            const {onDragStart: Qr} = I.current, jo = {active: {id: Or, data: So.data, rect: V}};
                            mr.unstable_batchedUpdates(() => {
                                _({type: Nt.DragStart, initialCoordinates: ln, active: Or}), k({
                                    type: Nt.DragStart,
                                    event: jo
                                })
                            }), Qr == null || Qr(jo)
                        },
                        onMove(ln) {
                            _({type: Nt.DragMove, coordinates: ln})
                        },
                        onEnd: wo(Nt.DragEnd),
                        onCancel: wo(Nt.DragCancel)
                    });
                    mr.unstable_batchedUpdates(() => {
                        B(Qt), H(an.nativeEvent)
                    });

                    function wo(ln) {
                        return async function () {
                            const {active: So, over: Qr, scrollAdjustedTranslate: jo} = he.current;
                            let Co = null;
                            if (So && jo) {
                                const {cancelDrop: ge} = I.current;
                                Co = {
                                    active: So,
                                    delta: jo,
                                    over: Qr
                                }, ln === Nt.DragEnd && typeof ge == "function" && await Promise.resolve(ge(Co)) && (ln = Nt.DragCancel)
                            }
                            if (Z.current = null, mr.unstable_batchedUpdates(() => {
                                _({type: ln}), jn(null), O(!1), B(null), H(null), Co && k({type: ln, event: Co})
                            }), Co) {
                                const {onDragCancel: ge, onDragEnd: ke} = I.current, Me = ln === Nt.DragEnd ? ke : ge;
                                Me == null || Me(Co)
                            }
                        }
                    }
                }, [_, $]), cr = y.useCallback((an, Ht) => (Mt, it) => {
                    const Qt = Mt.nativeEvent;
                    Z.current !== null || Qt.dndKit || Qt.defaultPrevented || an(Mt, Ht.options) === !0 && (Qt.dndKit = {capturedBy: Ht.sensor}, Z.current = it, lr(Mt, Ht))
                }, [lr]), xo = j7(i, cr);
            O7(i), na(() => {
                I.current = g
            }, Object.values(g)), y.useEffect(() => {
                A != null && O(!0)
            }, [A]), y.useEffect(() => {
                X || (de.current = null), X && ae && !de.current && (de.current = ae)
            }, [ae, X]), y.useEffect(() => {
                const {onDragMove: an} = I.current, {active: Ht, over: Mt} = he.current;
                if (!Ht) return;
                const it = {active: Ht, delta: {x: Ut.x, y: Ut.y}, over: Mt};
                k({type: Nt.DragMove, event: it}), an == null || an(it)
            }, [Ut.x, Ut.y]), y.useEffect(() => {
                const {active: an, droppableContainers: Ht, scrollAdjustedTranslate: Mt} = he.current;
                if (!an || !Z.current || !Mt) return;
                const {onDragOver: it} = I.current, Qt = Ht.get(Lt), wo = Qt && Qt.rect.current ? {
                    id: Qt.id,
                    rect: Qt.rect.current,
                    data: Qt.data,
                    disabled: Qt.disabled
                } : null, ln = {active: an, delta: {x: Mt.x, y: Mt.y}, over: wo};
                mr.unstable_batchedUpdates(() => {
                    jn(wo), k({type: Nt.DragOver, event: ln}), it == null || it(ln)
                })
            }, [Lt]), na(() => {
                he.current = {
                    active: X,
                    activeNode: ue,
                    collisionRect: st,
                    droppableRects: W,
                    draggableNodes: $,
                    draggingNodeRect: pt,
                    droppableContainers: N,
                    over: qt,
                    scrollableAncestors: kt,
                    scrollAdjustedTranslate: Ut,
                    translatedRect: Tt
                }, V.current = {initial: pt, translated: Tt}
            }, [X, ue, st, $, pt, W, N, qt, kt, Ut, Tt]), w7({
                ...aa(),
                draggingRect: Tt,
                pointerCoordinates: Dt,
                scrollableAncestors: kt,
                scrollableAncestorRects: Bt
            });
            const Ls = y.useMemo(() => ({
                active: X,
                activeNode: ue,
                activeNodeRect: ae,
                activeNodeClientRect: ie,
                activatorEvent: Q,
                activators: xo,
                ariaDescribedById: {draggable: D},
                containerNodeRect: yt,
                dispatch: _,
                dragOverlay: Ct,
                draggableNodes: $,
                droppableContainers: N,
                droppableRects: W,
                over: qt,
                recomputeLayouts: ce,
                scrollableAncestors: kt,
                scrollableAncestorRects: Bt,
                willRecomputeLayouts: ne,
                windowRect: He
            }), [X, ue, ie, ae, Q, xo, yt, Ct, _, $, D, N, W, qt, ce, kt, Bt, ne, He]);
            return ee.createElement(w2.Provider, {value: E}, ee.createElement(vf.Provider, {value: Ls}, ee.createElement(V2.Provider, {value: Kn}, o)), ee.createElement(a7, {
                announcements: r,
                hiddenTextDescribedById: D,
                screenReaderInstructions: p
            }));

            function aa() {
                const an = (R == null ? void 0 : R.autoScrollEnabled) === !1,
                    Ht = typeof n == "object" ? n.enabled === !1 : n === !1, Mt = !an && !Ht;
                return typeof n == "object" ? {...n, enabled: Mt} : {enabled: Mt}
            }
        }), X7 = y.createContext(null), H2 = "button", Z7 = "Droppable";

    function J7({id: e, data: t, disabled: n = !1, attributes: r}) {
        const o = Xc(Z7), {
                active: i,
                activeNodeRect: l,
                activatorEvent: c,
                ariaDescribedById: d,
                draggableNodes: p,
                droppableRects: g,
                activators: m,
                over: v
            } = y.useContext(vf), {role: b = H2, roleDescription: x = "draggable", tabIndex: w = 0} = r ?? {},
            j = (i == null ? void 0 : i.id) === e, C = y.useContext(j ? V2 : X7), [_, E] = v1(), k = L7(m, e),
            T = O2(t);
        y.useEffect(() => (p[e] = {id: e, key: o, node: _, data: T}, () => {
            const A = p[e];
            A && A.key === o && delete p[e]
        }), [p, e]);
        const O = y.useMemo(() => ({
            role: b,
            tabIndex: w,
            "aria-pressed": j && b === H2 ? !0 : void 0,
            "aria-roledescription": x,
            "aria-describedby": d.draggable
        }), [b, w, j, x, d.draggable]);
        return {
            active: i,
            activeNodeRect: l,
            activatorEvent: c,
            attributes: O,
            droppableRects: g,
            isDragging: j,
            listeners: n ? void 0 : k,
            node: _,
            over: v,
            setNodeRef: E,
            transform: C
        }
    }

    function Q7() {
        return y.useContext(vf)
    }

    const eD = "Droppable";

    function tD({data: e, disabled: t = !1, id: n}) {
        const r = Xc(eD), {active: o, dispatch: i, over: l} = y.useContext(vf), c = y.useRef(null), [d, p] = v1(),
            g = O2(e);
        return na(() => (i({
            type: Nt.RegisterDroppable,
            element: {id: n, key: r, disabled: t, node: d, rect: c, data: g}
        }), () => i({type: Nt.UnregisterDroppable, key: r, id: n})), [n]), y.useEffect(() => {
            i({type: Nt.SetDroppableDisabled, id: n, key: r, disabled: t})
        }, [t]), {active: o, rect: c, isOver: (l == null ? void 0 : l.id) === n, node: d, over: l, setNodeRef: p}
    }

    function nD(e, t, n) {
        const r = {...e};
        return t.top + e.y <= n.top ? r.y = n.top - t.top : t.bottom + e.y >= n.top + n.height && (r.y = n.top + n.height - t.bottom), t.left + e.x <= n.left ? r.x = n.left - t.left : t.right + e.x >= n.left + n.width && (r.x = n.left + n.width - t.right), r
    }

    const rD = ({draggingNodeRect: e, transform: t, scrollableAncestorRects: n}) => {
        const r = n[0];
        return !e || !r ? t : nD(t, e, r)
    }, oD = ({transform: e}) => ({...e, x: 0});

    function F2(e, t, n) {
        const r = e.slice();
        return r.splice(n < 0 ? r.length + n : n, 0, r.splice(t, 1)[0]), r
    }

    function sD(e, t) {
        return e.reduce((n, r, o) => {
            const i = t.get(r);
            return i && (n[o] = i), n
        }, Array(e.length))
    }

    function wf(e) {
        return e !== null && e >= 0
    }

    const z2 = ({layoutRects: e, activeIndex: t, overIndex: n, index: r}) => {
            const o = F2(e, n, t), i = e[r], l = o[r];
            return !l || !i ? null : {
                x: l.offsetLeft - i.offsetLeft,
                y: l.offsetTop - i.offsetTop,
                scaleX: l.width / i.width,
                scaleY: l.height / i.height
            }
        }, Sf = {scaleX: 1, scaleY: 1},
        iD = ({activeIndex: e, activeNodeRect: t, index: n, layoutRects: r, overIndex: o}) => {
            var i;
            const l = (i = r[e]) != null ? i : t;
            if (!l) return null;
            if (n === e) {
                const d = r[o];
                return d ? {
                    x: 0,
                    y: e < o ? d.offsetTop + d.height - (l.offsetTop + l.height) : d.offsetTop - l.offsetTop, ...Sf
                } : null
            }
            const c = aD(r, n, e);
            return n > e && n <= o ? {x: 0, y: -l.height - c, ...Sf} : n < e && n >= o ? {
                x: 0,
                y: l.height + c, ...Sf
            } : {x: 0, y: 0, ...Sf}
        };

    function aD(e, t, n) {
        const r = e[t], o = e[t - 1], i = e[t + 1];
        return r ? n < t ? o ? r.offsetTop - (o.offsetTop + o.height) : i ? i.offsetTop - (r.offsetTop + r.height) : 0 : i ? i.offsetTop - (r.offsetTop + r.height) : o ? r.offsetTop - (o.offsetTop + o.height) : 0 : 0
    }

    const B2 = "Sortable", U2 = ee.createContext({
        activeIndex: -1,
        containerId: B2,
        disableTransforms: !1,
        items: [],
        overIndex: -1,
        useDragOverlay: !1,
        sortedRects: [],
        strategy: z2,
        wasDragging: {current: !1}
    });

    function lD({children: e, id: t, items: n, strategy: r = z2}) {
        const {
                active: o,
                dragOverlay: i,
                droppableRects: l,
                over: c,
                recomputeLayouts: d,
                willRecomputeLayouts: p
            } = Q7(), g = Xc(B2, t), m = i.rect !== null,
            v = y.useMemo(() => n.map(A => typeof A == "string" ? A : A.id), [n]), b = o != null, x = y.useRef(!1),
            w = o ? v.indexOf(o.id) : -1, j = w !== -1, C = c ? v.indexOf(c.id) : -1, _ = y.useRef(v), E = sD(v, l),
            k = !cD(v, _.current), T = C !== -1 && w === -1 || k;
        na(() => {
            k && j && !p && d()
        }, [k, j, d, p]), y.useEffect(() => {
            _.current = v
        }, [v]), y.useEffect(() => {
            const A = setTimeout(() => {
                x.current = b
            }, 100);
            return () => clearTimeout(A)
        }, [b]);
        const O = y.useMemo(() => ({
            activeIndex: w,
            containerId: g,
            disableTransforms: T,
            items: v,
            overIndex: C,
            useDragOverlay: m,
            sortedRects: E,
            strategy: r,
            wasDragging: x
        }), [w, g, T, v, C, E, m, r, x]);
        return ee.createElement(U2.Provider, {value: O}, e)
    }

    function cD(e, t) {
        return e.join() === t.join()
    }

    const uD = ({id: e, items: t, activeIndex: n, overIndex: r}) => F2(t, n, r).indexOf(e), dD = ({
                                                                                                      containerId: e,
                                                                                                      isSorting: t,
                                                                                                      wasDragging: n,
                                                                                                      index: r,
                                                                                                      items: o,
                                                                                                      newIndex: i,
                                                                                                      previousItems: l,
                                                                                                      previousContainerId: c,
                                                                                                      transition: d
                                                                                                  }) => !d || !n || l !== o && r === i ? !1 : t ? !0 : i !== r && e === c,
        fD = {duration: 200, easing: "ease"}, W2 = "transform",
        pD = Jc.Transition.toString({property: W2, duration: 0, easing: "linear"}), gD = {roleDescription: "sortable"};

    function hD({disabled: e, index: t, node: n, rect: r}) {
        const [o, i] = y.useState(null), l = y.useRef(t);
        return na(() => {
            if (!e && t !== l.current && n.current) {
                const c = r.current;
                if (c) {
                    const d = bf(n.current), p = {
                        x: c.offsetLeft - d.offsetLeft,
                        y: c.offsetTop - d.offsetTop,
                        scaleX: c.width / d.width,
                        scaleY: c.height / d.height
                    };
                    (p.x || p.y) && i(p)
                }
            }
            t !== l.current && (l.current = t)
        }, [e, t, n, r]), y.useEffect(() => {
            o && requestAnimationFrame(() => {
                i(null)
            })
        }, [o]), o
    }

    function mD({
                    animateLayoutChanges: e = dD,
                    attributes: t,
                    disabled: n,
                    data: r,
                    getNewIndex: o = uD,
                    id: i,
                    strategy: l,
                    transition: c = fD
                }) {
        const {
                items: d,
                containerId: p,
                activeIndex: g,
                disableTransforms: m,
                sortedRects: v,
                overIndex: b,
                useDragOverlay: x,
                strategy: w,
                wasDragging: j
            } = y.useContext(U2), C = d.indexOf(i),
            _ = y.useMemo(() => ({sortable: {containerId: p, index: C, items: d}, ...r}), [p, r, C, d]), {
                rect: E,
                node: k,
                setNodeRef: T
            } = tD({id: i, data: _}), {
                active: O,
                activeNodeRect: A,
                activatorEvent: $,
                attributes: F,
                setNodeRef: N,
                listeners: z,
                isDragging: V,
                over: X,
                transform: Z
            } = J7({id: i, data: _, attributes: {...gD, ...t}, disabled: n}), R = G9(T, N), B = !!O,
            Q = B && j.current && !m && wf(g) && wf(b), H = !x && V, I = H && Q ? Z : null,
            M = Q ? I ?? (l ?? w)({layoutRects: v, activeNodeRect: A, activeIndex: g, overIndex: b, index: C}) : null,
            W = wf(g) && wf(b) ? o({id: i, items: d, activeIndex: g, overIndex: b}) : C, ce = y.useRef(d),
            ne = d !== ce.current, ue = y.useRef(W), me = y.useRef(p), ae = e({
                active: O,
                containerId: p,
                isDragging: V,
                isSorting: B,
                id: i,
                index: C,
                items: d,
                newIndex: ue.current,
                previousItems: ce.current,
                previousContainerId: me.current,
                transition: c,
                wasDragging: j.current
            }), ie = hD({disabled: !ae, index: C, node: k, rect: E});
        return y.useEffect(() => {
            B && ue.current !== W && (ue.current = W), p !== me.current && (me.current = p), d !== ce.current && (ce.current = d)
        }, [B, W, p, d]), {
            active: O,
            attributes: F,
            activatorEvent: $,
            rect: E,
            index: C,
            isSorting: B,
            isDragging: V,
            listeners: z,
            node: k,
            overIndex: b,
            over: X,
            setNodeRef: R,
            setDroppableNodeRef: T,
            setDraggableNodeRef: N,
            transform: ie ?? M,
            transition: de()
        };

        function de() {
            if (ie || ne && ue.current === C) return pD;
            if (!(H || !c) && (B || ae)) return Jc.Transition.toString({...c, property: W2})
        }
    }

    const vD = [dt.Down, dt.Right, dt.Up, dt.Left],
        yD = (e, {context: {active: t, droppableContainers: n, translatedRect: r, scrollableAncestors: o}}) => {
            if (vD.includes(e.code)) {
                if (e.preventDefault(), !t || !r) return;
                const l = [];
                n.getEnabled().forEach(d => {
                    if (!d || d != null && d.disabled) return;
                    const p = d == null ? void 0 : d.node.current;
                    if (!p) return;
                    const g = C1(p), m = {...d, rect: {current: g}};
                    switch (e.code) {
                        case dt.Down:
                            r.top + r.height <= g.top && l.push(m);
                            break;
                        case dt.Up:
                            r.top >= g.top + g.height && l.push(m);
                            break;
                        case dt.Left:
                            r.left >= g.left + g.width && l.push(m);
                            break;
                        case dt.Right:
                            r.left + r.width <= g.left && l.push(m);
                            break
                    }
                });
                const c = y7({active: t, collisionRect: r, droppableContainers: l});
                if (c) {
                    var i;
                    const d = (i = n.get(c)) == null ? void 0 : i.node.current;
                    if (d) {
                        const g = w1(d).some((x, w) => o[w] !== x), m = C1(d),
                            v = g ? {x: 0, y: 0} : {x: r.width - m.width, y: r.height - m.height};
                        return {x: m.left - v.x, y: m.top - v.y}
                    }
                }
            }
        };

    function bD(e) {
        const {
                id: t,
                item: n,
                className: r,
                select: o,
                remove: i,
                renderItem: l,
                previewStyle: c,
                sortable: d = !0
            } = e, {attributes: p, listeners: g, setNodeRef: m, transform: v, transition: b} = mD({id: t}),
            x = {transform: Jc.Transform.toString(v), transition: b}, w = () => o == null ? void 0 : o(n);
        return u.jsx("div", {
            ...d ? {ref: m, style: x, ...p} : {},
            children: u.jsxs(K, {
                space: "s",
                onClick: w,
                className: r,
                items: "center",
                nowrap: !0,
                children: [d && u.jsx(q, {
                    className: se(nt.hover, "cursor-grab"), ...g,
                    children: u.jsx(be, {icon: fe.dotsVertical, size: Ee.sx})
                }), u.jsx(q, {
                    grow: !0,
                    className: se("overflow-hidden"),
                    children: u.jsxs(K, {
                        children: [u.jsx(q, {
                            grow: !0,
                            className: se("overflow-ellipsis overflow-hidden"),
                            children: l(n)
                        }), !!c && u.jsx(q, {
                            children: u.jsx("div", {
                                className: se("w-4 h-4 gjs-bg-white", ye.b, ye.rnd),
                                style: c(n)
                            })
                        })]
                    })
                }), u.jsx(q, {
                    className: se(nt.click), onClick: j => {
                        La(j), i == null || i(n)
                    }, children: u.jsx(be, {icon: fe.close, size: Ee.sx})
                })]
            }, n.getIndex ? n.getIndex() : n.id || n.cid)
        })
    }

    function Xo({
                    className: e,
                    items: t,
                    selected: n,
                    children: r,
                    title: o,
                    titleAdd: i,
                    label: l,
                    emptyState: c,
                    select: d,
                    add: p,
                    move: g,
                    remove: m,
                    renderItem: v,
                    previewStyle: b,
                    getItemId: x = w => w.cid ?? w.id
                }) {
        const w = I7(R2(O1), R2(k1, {coordinateGetter: yD}));

        function j(E) {
            const {active: k, over: T} = E;
            if (k.id !== (T == null ? void 0 : T.id)) {
                const O = t.find($ => x($) === k.id), A = t.findIndex($ => x($) === (T == null ? void 0 : T.id));
                O && (g == null || g(O, A))
            }
        }

        const C = se(ye.rnd, te.br, t.length && ye.b, t.length && "gjs-mt-1");
        let _ = u.jsxs("div", {
            className: C,
            children: [t.length === 0 && c && u.jsx(K, {
                className: U("gs-utl-p-2 gs-utl-text-center", te.txtLowEmphasis),
                items: "center",
                justify: "center",
                children: c
            }), t.map((E, k) => {
                const T = x(E), O = E === n,
                    A = se("gjs-px-2 gjs-py-2 text-xs", te.br, k && ye.bt, !!d && !O && te.hBgH2, O && te.bgH);
                return u.jsx(bD, {
                    id: T,
                    item: E,
                    className: A,
                    select: d,
                    remove: m,
                    renderItem: v,
                    previewStyle: b,
                    sortable: !!g
                }, T)
            })]
        });
        return g && (_ = u.jsx(Y7, {
            sensors: w,
            collisionDetection: l7,
            onDragEnd: j,
            modifiers: [oD, rD],
            children: u.jsx(lD, {items: t.map(x), strategy: iD, children: _})
        })), d && (_ = u.jsx(Wo, {
            placement: "left",
            size: "s",
            buttonAs: "div",
            title: o,
            classNameBody: "gs-utl-gap-2 gs-utl-flex gs-utl-flex-col",
            open: !!n,
            onClose: () => d == null ? void 0 : d(null),
            handler: _,
            children: r
        })), u.jsxs("div", {
            className: se(e, "w-full"),
            children: [!!(l || p) && u.jsxs(K, {
                items: "center",
                children: [u.jsx(q, {
                    grow: !0,
                    children: u.jsx(Ur, {size: "s", children: l})
                }), !!p && u.jsx(q, {
                    children: u.jsx(mn, {
                        title: i,
                        inline: !0,
                        children: u.jsx(at, {onClick: p, size: "s", children: u.jsx(be, {icon: fe.plus, size: Ee.s})})
                    })
                })]
            }), _]
        })
    }

    function G2(e) {
        return e.isFull() || ["slider", "composite", "stack", "file"].includes(e.getType())
    }

    function xD(e) {
        return ["composite", "stack", "selectFont", "number", "slider", "integer", "select", "radio", "color"].includes(e.getType())
    }

    const K2 = "gs-cmp-style-field";

    function A1({property: e, sector: t, styleManagerDataConfig: n, fieldProps: r}) {
        const o = U(K2, `${K2}__${e.id}`), i = {sector: t, styleManagerDataConfig: n};
        switch (e.getType()) {
            case"selectFont":
                return u.jsx(hf, {className: o, ...nj(e)});
            case"number":
            case"slider":
            case"integer":
                return u.jsx(tt, {className: o, ..._t(e, i), ...r});
            case"color":
                return u.jsx(Cs, {className: o, ...oa(e, i)});
            case"select":
                return u.jsx(Ze, {className: o, ...Zt(e, i), ...r});
            case"radio":
                return u.jsx(Wn, {className: o, ...Zo(e, i), ...r});
            case"file":
                return u.jsx(qc, {className: o, ...ID(e)});
            case"composite":
                return u.jsx(ir, {
                    className: o,
                    property: e,
                    corners: e.get("corners"),
                    generic: e.get("generic"), ...i
                });
            case"stack": {
                const l = e.getProperties();
                return u.jsx(Xo, {className: o, ...ii(e), children: u.jsx(R1, {properties: l, ...i})})
            }
            default:
                return u.jsx(jt, {className: o, ...ej(e)})
        }
    }

    const q2 = "gs-cmp-style-prop-row";

    function R1({properties: e, sector: t, styleManagerDataConfig: n}) {
        const r = {sector: t, styleManagerDataConfig: n};
        return u.jsx(u.Fragment, {
            children: e.map(o => {
                const i = o.getId(), l = U(q2, `${q2}__${i}`, G2(o) && "gs-utl-col-span-full");
                return o.isVisible() ? xD(o) ? u.jsx("div", {
                    className: l,
                    children: u.jsx(A1, {property: o, ...r})
                }, i) : u.jsx(mo, {property: o, className: l, children: u.jsx(A1, {property: o, ...r})}, i) : null
            })
        })
    }

    function wD({sector: e, styleManagerDataConfig: t}) {
        const n = Nc(),
            r = e.getProperties().filter(o => o.isVisible()).map(o => (n.sdkAddFonts && o.getId() === "font-family" && o.set("type", "selectFont"), o));
        return u.jsx("div", {
            className: U("gs-utl-grid gs-utl-grid-cols-2 gs-utl-gap-2"),
            children: u.jsx(R1, {properties: r, sector: e, styleManagerDataConfig: t})
        })
    }

    const SD = "gs-cmp-sector-row";

    function De({className: e, children: t, bottom: n, separator: r, separatorTop: o, property: i, ...l}) {
        const c = u.jsx("div", {className: se("gjs-mb-2 -gjs-ml-2 -gjs-mr-2", ye.bb, te.br)}),
            d = se(SD, e, "w-full gs-utl-gap-2", n), p = (Array.isArray(i) ? i : [i]).filter(Boolean);
        return (p.length ? p.some(m => m.isVisible()) : !0) ? u.jsxs(u.Fragment, {
            children: [o && c, u.jsx(K, {
                className: d,
                nowrap: !0, ...l,
                children: t
            }), r && c]
        }) : null
    }

    function ru(e, t, n = {}) {
        const r = e.getType(), {compact: o = !1, sector: i, styleManagerDataConfig: l} = n, c = e.getParent(),
            d = {sector: i, styleManagerDataConfig: l}, p = e.getDefaultValue();
        if (r === "select") {
            const m = {property: c.getName()};
            return u.jsx(Ze, {
                ...Zt(e, d, m), ...t ? {
                    value: t.same ? e.getValue({noDefault: !0}) : "",
                    emptyState: t.same ? e.getOptionLabel(p, m) || p : "Custom",
                    onChange: v => t.all.map(b => b.upValue(v))
                } : {}, label: void 0
            })
        } else return r === "color" ? u.jsx(Cs, {
            ...oa(e, d), ...t ? {
                value: t.same ? e.getValue({noDefault: !0}) : "",
                placeholder: t.same ? p : "Custom",
                onChange: (g, m) => t.all.map(v => v.upValue(g, {partial: m}))
            } : {}, label: void 0
        }) : u.jsx(tt, {
            ..._t(e, d), ...o ? {pan: e.getLabel()[0]} : {}, ...t ? {
                value: t.same ? e.getValue({noDefault: !0}) : "",
                valueUnit: t.same ? e.getUnit() : "",
                placeholder: t.same ? p : "Custom",
                onChange: (g, m) => t.all.map(v => v.upValue(g, {partial: m})),
                onChangeUnit: g => t.all.map(m => m.upUnit(g))
            } : {}, label: void 0
        })
    }

    const jf = "gs-cmp-style-prop-composite";

    function ir({
                    className: e,
                    property: t,
                    sector: n,
                    styleManagerDataConfig: r,
                    corners: o,
                    compact: i,
                    generic: l,
                    children: c,
                    options: d
                }) {
        const [p, g] = y.useState(null);
        if (!(t != null && t.isVisible())) return null;
        const m = {id: "custom", label: u.jsx(be, {icon: fe.borderStyle, size: Ee.s}), title: "Custom"},
            v = [{id: "all", label: u.jsx(be, {icon: fe.borderAllVariant, size: Ee.s}), title: "All"}, m],
            b = t.isDetached(), x = t.getProperties(), w = x.length, [j, C, _, E] = x, k = j.getFullValue(),
            O = x.map(H => H.getFullValue()).every(H => H === k), A = p !== null ? p : O || d ? "all" : m.id,
            $ = d ? [...d, m] : [], F = t.getFullValue(), N = $.some(H => H.id === F),
            z = A === m.id || (d ? !N : !1) || !!l, V = {compact: i, sector: n, styleManagerDataConfig: r},
            X = u.jsx(mo, {property: i ? null : j, shallow: !b, children: ru(j, null, V)}),
            Z = u.jsx(mo, {property: i ? null : C, shallow: !b, children: ru(C, null, V)}),
            R = !!_ && u.jsx(mo, {property: i ? null : _, shallow: !b, children: ru(_, null, V)}),
            B = !!E && u.jsx(mo, {property: i ? null : E, shallow: !b, children: ru(E, null, V)}),
            Q = i ? {label: t.getLabel()} : {property: t};
        return u.jsxs(K, {
            className: se(jf, e, "gs-utl-w-full gs-utl-gap-2"),
            col: !0,
            nowrap: !0,
            children: [u.jsx(De, {
                className: `${jf}__main`,
                children: u.jsx(mo, {
                    ...Q,
                    children: !l && u.jsx(De, {
                        bottom: "0",
                        children: c !== void 0 ? c : d ? u.jsx(u.Fragment, {
                            children: u.jsx(q, {
                                grow: !0,
                                children: u.jsx(Wn, {
                                    size: "s", options: $, value: z ? m.id : F, onChange: H => {
                                        H === m.id ? g(H) : (t.upValue(H), g(""))
                                    }
                                })
                            })
                        }) : u.jsxs(u.Fragment, {
                            children: [u.jsx(q, {
                                grow: !0,
                                children: ru(j, {same: O, all: x}, V)
                            }), u.jsx(q, {
                                grow: !0,
                                children: u.jsx(Wn, {size: "s", options: v, value: A, onChange: g})
                            })]
                        })
                    })
                })
            }), z && u.jsx(De, {
                col: !0,
                className: se(`${jf}__details`, "gjs-px-2 gjs-py-1", te.bgH2, ye.rnd, ye.b, te.br),
                children: l ? u.jsx("div", {
                    className: se(`${jf}__props`, "grid grid-cols-2 gap-2"),
                    children: x.map(H => u.jsx(mo, {
                        property: H,
                        shallow: !b,
                        className: se(G2(H) && "col-span-full"),
                        children: u.jsx(A1, {property: H, ...V, fieldProps: {label: void 0}})
                    }, H.getId()))
                }) : w === 2 ? u.jsx(u.Fragment, {
                    children: u.jsxs(K, {
                        space: "s",
                        children: [u.jsx(q, {grow: !0, children: X}), u.jsx(q, {grow: !0, children: Z})]
                    })
                }) : w === 3 ? u.jsxs(u.Fragment, {
                    children: [u.jsxs(K, {
                        space: "s",
                        children: [u.jsx(q, {grow: !0, children: X}), u.jsx(q, {grow: !0, children: Z})]
                    }), u.jsx(K, {space: "s", children: u.jsx(q, {grow: !0, children: R})})]
                }) : o ? u.jsxs(u.Fragment, {
                    children: [u.jsxs(K, {
                        space: "s",
                        children: [u.jsx(q, {grow: !0, children: X}), u.jsx(q, {grow: !0, children: Z})]
                    }), u.jsxs(K, {
                        space: "s",
                        children: [u.jsx(q, {grow: !0, children: B}), u.jsx(q, {grow: !0, children: R})]
                    })]
                }) : u.jsxs(u.Fragment, {
                    children: [u.jsx(K, {
                        className: se("gs-utl-w-1/2 gjs-m-auto"),
                        children: X
                    }), u.jsxs(K, {
                        space: "s",
                        children: [u.jsx(q, {grow: !0, children: B}), u.jsx(q, {grow: !0, children: Z})]
                    }), u.jsx(K, {className: se("gs-utl-w-1/2 gjs-m-auto"), children: R})]
                })
            })]
        })
    }

    function jD({sector: e, styleManagerDataConfig: t}) {
        const n = e.getProperty("border-radius"), r = {sector: e, styleManagerDataConfig: t};
        return u.jsxs(u.Fragment, {
            children: [u.jsx(ir, {
                property: n,
                corners: !0, ...r
            }), u.jsx(ir, {property: e.getProperty("border-width"), ...r}), u.jsx(ir, {property: e.getProperty("border-style"), ...r}), u.jsx(ir, {property: e.getProperty("border-color"), ...r})]
        })
    }

    const ra = e => ff({value: parseFloat(e), min: -3, max: 3}), N1 = (e, t = "filter", n) => {
        const r = e.getProperty(`${t}-value`), o = e.getProperty(`${t}-name`).getOption() || {}, i = o.units || [],
            l = r.getUnit(), c = b9(l, i) ? l : i[0];
        return {
            ..._t(r, n), units: i, valueUnit: c, onChange: (d, p) => {
                r.upValue(d, {partial: p, units: i, min: o.min, max: o.max})
            }
        }
    }, Y2 = (e, t, n, r) => {
        const o = e.getProperty(`${t}-name`), i = e.getProperty(`${t}-value`);
        return {
            ...Zt(o, n, r), onChange: l => {
                o.upValue(l), i.upValue("")
            }
        }
    }, CD = {"text-shadow-h": "1px", "text-shadow-v": "1px", "text-shadow-blur": "5px"};

    function ED({sector: e, styleManagerDataConfig: t}) {
        const n = e.getProperty("box-shadow"), r = e.getProperty("text-shadow"), o = e.getProperty("filter"),
            i = e.getProperty("backdrop-filter"), l = e.getProperty("transition"), c = e.getProperty("transform"),
            d = e.getProperty("perspective-origin"), p = e.getProperty("backface-visibility"),
            g = e.getProperty("perspective"), m = e.getProperty("transform-style"), v = e.getProperty("opacity"),
            b = e.getProperty("mix-blend-mode"), x = e.getProperty("cursor"),
            w = {sector: e, styleManagerDataConfig: t}, j = _ => {
                const {
                        boxShadowH: E,
                        boxShadowV: k,
                        boxShadowBlur: T,
                        boxShadowColor: O,
                        boxShadowSpread: A,
                        boxShadowType: $
                    } = _.getValues({camelCase: !0}), F = ra(E), N = ra(k), z = ra(T), V = ra(A),
                    X = `${F}px ${N}px ${z}px ${V}px ${O} ${$}`.trim();
                return u.jsxs(K, {
                    space: "s",
                    items: "center",
                    children: [u.jsxs(q, {
                        grow: !0,
                        children: [E, " ", k, " ", T, " ", A]
                    }), u.jsx(q, {
                        children: u.jsx("div", {
                            className: se("w-4 h-4 gjs-bg-white", ye.b, ye.rnd),
                            style: {boxShadow: X}
                        })
                    })]
                })
            }, C = _ => {
                const {
                    textShadowH: E,
                    textShadowV: k,
                    textShadowBlur: T,
                    textShadowColor: O
                } = _.getValues({camelCase: !0}), A = ra(E), $ = ra(k), F = ra(T), N = `${A}px ${$}px ${F}px ${O}`.trim();
                return u.jsxs(K, {
                    space: "s",
                    items: "center",
                    children: [u.jsxs(q, {
                        grow: !0,
                        children: [E, " ", k, " ", T]
                    }), u.jsx(q, {
                        children: u.jsx("div", {
                            className: se("w-4 h-4 gjs-bg-white", ye.b, ye.rnd),
                            style: {boxShadow: N}
                        })
                    })]
                })
            };
        return u.jsxs(u.Fragment, {
            children: [u.jsxs(De, {
                property: [v, b],
                children: [u.jsx(tt, {..._t(v, w)}), u.jsx(Ze, {...Zt(b, w)})]
            }), u.jsx(De, {property: x, separator: !0, children: u.jsx(Ze, {...Zt(x, w)})}), u.jsx(De, {
                property: n,
                separator: !0,
                children: u.jsxs(Xo, {
                    ...ii(n),
                    renderItem: j,
                    children: [u.jsx(De, {
                        children: u.jsx(Wn, {
                            ...Zo(n.getProperty("box-shadow-type"), w),
                            label: ""
                        })
                    }), u.jsxs(De, {
                        children: [u.jsx(tt, {
                            ..._t(n.getProperty("box-shadow-h"), w),
                            label: "X offset"
                        }), u.jsx(tt, {..._t(n.getProperty("box-shadow-v"), w), label: "Y offset"})]
                    }), u.jsxs(De, {
                        children: [u.jsx(tt, {
                            ..._t(n.getProperty("box-shadow-blur"), w),
                            label: "Blur"
                        }), u.jsx(tt, {..._t(n.getProperty("box-shadow-spread"), w), label: "Spread"})]
                    }), u.jsx(De, {children: u.jsx(Cs, {...oa(n.getProperty("box-shadow-color"), w), label: "Color"})})]
                })
            }), u.jsx(De, {
                property: r,
                separator: !0,
                children: u.jsxs(Xo, {
                    ...ii(r, CD),
                    renderItem: C,
                    children: [u.jsxs(De, {
                        children: [u.jsx(tt, {
                            ..._t(r.getProperty("text-shadow-h"), w),
                            label: "X offset"
                        }), u.jsx(tt, {..._t(r.getProperty("text-shadow-v"), w), label: "Y offset"})]
                    }), u.jsx(De, {
                        children: u.jsx(tt, {
                            ..._t(r.getProperty("text-shadow-blur"), w),
                            label: "Blur"
                        })
                    }), u.jsx(De, {
                        children: u.jsx(Cs, {
                            ...oa(r.getProperty("text-shadow-color"), w),
                            label: "Color"
                        })
                    })]
                })
            }), u.jsx(De, {
                property: o,
                separator: !0,
                children: u.jsx(Xo, {
                    ...ii(o, {"filter-name": "blur", "filter-value": "3px"}),
                    children: u.jsxs(De, {
                        children: [u.jsx(Ze, {
                            ...Y2(o, "filter", w),
                            label: "Type"
                        }), u.jsx(tt, {...N1(o, void 0, w), label: "Value"})]
                    })
                })
            }), u.jsx(De, {
                property: i,
                separator: !0,
                children: u.jsx(Xo, {
                    ...ii(i, {"backdrop-filter-name": "blur", "backdrop-filter-value": "3px"}),
                    children: u.jsxs(De, {
                        children: [u.jsx(Ze, {
                            ...Zt(i.getProperty("backdrop-filter-name"), w),
                            label: "Type"
                        }), u.jsx(tt, {...N1(i, "backdrop-filter", w), label: "Value"})]
                    })
                })
            }), u.jsx(De, {
                property: l,
                separator: !0,
                children: u.jsxs(Xo, {
                    ...ii(l),
                    children: [u.jsx(De, {
                        children: u.jsx(Ze, {
                            ...Zt(l.getProperty("transition-property"), w),
                            label: "Type"
                        })
                    }), u.jsx(De, {
                        children: u.jsx(Ze, {
                            ...Zt(l.getProperty("transition-timing-function"), w),
                            label: "Easing"
                        })
                    }), u.jsxs(De, {
                        children: [u.jsx(tt, {
                            ..._t(l.getProperty("transition-duration"), w),
                            label: "Duration"
                        }), u.jsx(tt, {..._t(l.getProperty("transition-delay"), w), label: "Delay"})]
                    })]
                })
            }), u.jsx(De, {
                property: c,
                separator: !0,
                children: u.jsx(Xo, {
                    ...ii(c),
                    children: u.jsxs(De, {
                        children: [u.jsx(Ze, {
                            ...Y2(c, "transform", w),
                            label: "Type"
                        }), u.jsx(tt, {...N1(c, "transform", w), label: "Value"})]
                    })
                })
            }), u.jsx(ir, {property: e.getProperty("transform-origin"), ...w}), u.jsx(ir, {property: e.getProperty("overflow"), ...w}), u.jsx(De, {
                property: p,
                children: u.jsx(Wn, {...Zo(p, w)})
            }), u.jsx(De, {
                property: [g, m, d],
                separatorTop: !0,
                children: "Children transform"
            }), u.jsxs(De, {
                property: [g, m],
                children: [u.jsx(tt, {..._t(g, w)}), u.jsx(Wn, {...Zo(m, w)})]
            }), u.jsx(ir, {property: d, ...w})]
        })
    }

    function PD(e, t) {
        return e.indexOf(t) >= 0
    }

    const Vt = Ee.s, Cf = "M6 6v12h13V6H6zm0 13v5H5V0h1v5h13c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1H6zm6-14h1v14h-1V5z",
        Ef = "M6 6v12h13V6H6zm0-1h13c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1H6a1 1 0 01-1-1V6c0-.6.4-1 1-1zm6-5h1v24h-1V0z",
        Pf = "M6 6v12h13V6H6zm13-1V0h1v24h-1v-5H6a1 1 0 01-1-1V6c0-.6.4-1 1-1h13zm-7 0h1v14h-1V5z",
        X2 = "M2 6v12h6V6H2zm0 13v5H1V0h1v5h6c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1H2zM16 6v12h6V6h-6zm6-1V0h1v24h-1v-5h-6a1 1 0 01-1-1V6c0-.6.4-1 1-1h6z",
        Z2 = "M11 0h1v24h-1V0zM1 6h6v12H1V6zm0-1h6c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1H1a1 1 0 01-1-1V6c0-.6.4-1 1-1zm15 1h6v12h-6V6zm0-1h6c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1h-6a1 1 0 01-1-1V6c0-.6.4-1 1-1z",
        _D = "M3 6v12h6V6H3zm0-1h6c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1H3a1 1 0 01-1-1V6c0-.6.4-1 1-1zM0 0h1v24H0V0zm14 6v12h6V6h-6zm0-1h6c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1h-6a1 1 0 01-1-1V6c0-.6.4-1 1-1zm8-5h1v24h-1V0zM11 0h1v24h-1V0z",
        $1 = "M15 19H9V6h6v13zM8 6v13H0v1h24v-1h-8V6h8V5H0v1h8z";

    function kD({sector: e, styleManagerDataConfig: t}) {
        const n = e.em.getEditor(), r = Ke(), [o, i] = y.useState({}), [l, c] = y.useState({}),
            d = e.getProperty("display"), p = e.getProperty("flex-direction"), g = e.getProperty("justify-content"),
            m = e.getProperty("align-items"), v = e.getProperty("flex-wrap"), b = e.getProperty("align-content"),
            x = e.getProperty("align-self"), w = e.getProperty("order"), j = e.getProperty("gap"),
            C = e.getProperty("flex"), _ = {sector: e, styleManagerDataConfig: t},
            E = [d, p, g, m, v, b, x, w, j, C].map(H => H.id),
            k = e.getProperties().filter(H => !E.includes(`${H.id}`)), T = H => r.t(`styleManager.layout.${H}`),
            O = d.getValue(), A = O === "flex", $ = (l.display || "").indexOf("flex") >= 0, F = p.getValue(),
            N = F.indexOf("reverse") >= 0, z = !PD(["column", "column-reverse"], F), V = [{
                id: "row",
                label: u.jsx(be, {icon: fe.arrowRight, size: Ee.sx}),
                title: T("direction.title.row")
            }, {
                id: "row-reverse",
                label: u.jsx(be, {icon: fe.arrowRight, size: Vt, horizontal: !0}),
                title: T("direction.title.row-reverse")
            }, {
                id: "column",
                label: u.jsx(be, {icon: fe.arrowDown, size: Ee.sx}),
                title: T("direction.title.column")
            }, {
                id: "column-reverse",
                label: u.jsx(be, {icon: fe.arrowDown, size: Vt, vertical: !0}),
                title: T("direction.title.column-reverse")
            }], X = [{
                id: "flex-start",
                title: "Start",
                label: u.jsx(be, {icon: Cf, size: Vt, rotate: z ? 0 : 90, horizontal: z && N, vertical: !z && N})
            }, {id: "center", title: "Center", label: u.jsx(be, {icon: Ef, size: Vt, rotate: z ? 0 : 90})}, {
                id: "flex-end",
                title: "End",
                label: u.jsx(be, {icon: Pf, size: Vt, rotate: z ? 0 : 90, horizontal: z && N, vertical: !z && N})
            }, {
                id: "space-between",
                title: "Space between",
                label: u.jsx(be, {icon: X2, size: Vt, rotate: z ? 0 : 90})
            }, {
                id: "space-around",
                title: "Space around",
                label: u.jsx(be, {icon: Z2, size: Vt, rotate: z ? 0 : 90})
            }, {id: "space-evenly", title: "Space evenly", label: u.jsx(be, {icon: _D, size: Vt, rotate: z ? 0 : 90})}],
            Z = [{
                id: "stretch",
                title: "Stretch",
                label: u.jsx(be, {icon: $1, size: Vt, rotate: z ? 0 : 90})
            }, {
                id: "flex-start",
                title: "Start",
                label: u.jsx(be, {icon: Cf, size: Vt, rotate: z ? 90 : 0})
            }, {
                id: "center",
                title: "Center",
                label: u.jsx(be, {icon: Ef, size: Vt, rotate: z ? 90 : 0})
            }, {id: "flex-end", title: "End", label: u.jsx(be, {icon: Pf, size: Vt, rotate: z ? 90 : 0})}], R = [{
                id: "flex-start",
                title: "Start",
                label: u.jsx(be, {icon: Cf, size: Vt, rotate: z ? 90 : 0, horizontal: z && N, vertical: !z && N})
            }, {id: "center", title: "Center", label: u.jsx(be, {icon: Ef, size: Vt, rotate: z ? 90 : 0})}, {
                id: "flex-end",
                title: "End",
                label: u.jsx(be, {icon: Pf, size: Vt, rotate: z ? 90 : 0, horizontal: z && N, vertical: !z && N})
            }, {
                id: "space-between",
                title: "Space between",
                label: u.jsx(be, {icon: X2, size: Vt, rotate: z ? 90 : 0})
            }, {
                id: "space-around",
                title: "Space around",
                label: u.jsx(be, {icon: Z2, size: Vt, rotate: z ? 90 : 0})
            }, {id: "stretch", title: "Stretch", label: u.jsx(be, {icon: $1, size: Vt, rotate: z ? 0 : 90})}],
            B = [{id: "auto", title: "Auto", label: u.jsx(be, {icon: fe.close, size: Vt})}, {
                id: "flex-start",
                title: "Start",
                label: u.jsx(be, {icon: Cf, size: Vt, rotate: 90})
            }, {id: "center", title: "Center", label: u.jsx(be, {icon: Ef, size: Vt, rotate: 90})}, {
                id: "flex-end",
                title: "End",
                label: u.jsx(be, {icon: Pf, size: Vt, rotate: 90})
            }, {id: "stretch", title: "Stretch", label: u.jsx(be, {icon: $1, size: Vt, rotate: 0})}],
            Q = [{id: "0 0 auto", label: u.jsx(be, {icon: fe.close, size: Vt}), title: "Auto"}, {
                id: "1 1 0%",
                label: u.jsx(be, {icon: fe.unfoldMoreHorizontal, size: Vt, rotate: 90}),
                title: "Fill container"
            }, {
                id: "0 1 auto",
                label: u.jsx(be, {icon: fe.unfoldLessHorizontal, size: Vt, rotate: 90}),
                title: "Hug contents"
            }];
        return y.useEffect(() => {
            if (!n) return () => {
            };
            const {Styles: H} = n, I = () => {
                const M = n.getSelected();
                let W = {}, ce = {};
                if (M) {
                    const ne = M.getEl();
                    if (ne) {
                        W = window.getComputedStyle(ne);
                        const ue = ne.parentElement;
                        ue && (ce = window.getComputedStyle(ue))
                    }
                }
                i(W), c(ce)
            }, D = H.events.target;
            return n.on(D, I), I(), () => n.off(D, I)
        }, [n]), u.jsxs(u.Fragment, {
            children: [u.jsx(De, {
                children: u.jsx(Ze, {
                    ...Zt(d, _), ...D1,
                    tip: T(`display.tips.${O}`)
                })
            }), A && u.jsxs(u.Fragment, {
                children: [u.jsx(De, {
                    children: u.jsx(Wn, {
                        ...Zo(p, _),
                        options: V
                    })
                }), u.jsx(De, {
                    children: u.jsx(Wn, {
                        ...Zo(g, _),
                        options: X
                    })
                }), u.jsx(De, {
                    children: u.jsx(Wn, {
                        ...Zo(m, _),
                        options: Z
                    })
                }), u.jsx(De, {children: u.jsx(ir, {property: j, ..._})}), u.jsx(De, {children: u.jsx(Ze, {...Zt(v, _), ...D1})}), v.getValue() !== "nowrap" && u.jsx(De, {
                    children: u.jsx(Wn, {
                        ...Zo(b, _),
                        options: R
                    })
                })]
            }), $ && u.jsxs(u.Fragment, {
                children: [u.jsx(De, {
                    separatorTop: !0,
                    children: T("flexChild")
                }), u.jsx(De, {
                    children: u.jsx(ir, {
                        property: C,
                        options: Q, ..._
                    })
                }), u.jsx(De, {
                    children: u.jsx(Wn, {
                        ...Zo(x, _),
                        options: B
                    })
                }), u.jsx(De, {children: u.jsx(tt, {..._t(w, {sector: e, styleManagerDataConfig: t})})})]
            }), k.length > 0 && u.jsx(R1, {properties: k, ..._})]
        })
    }

    const TD = ["topLeft", "topRight", "bottomLeft", "bottomRight", "left", "right", "bottom", "top", "full"];

    function OD({sector: e, styleManagerDataConfig: t}) {
        var x;
        const n = Ke(), r = e.getProperty("position"), o = r.getValue(), i = e.getProperty("top"),
            l = e.getProperty("right"), c = e.getProperty("bottom"), d = e.getProperty("left"),
            p = {sector: e, styleManagerDataConfig: t}, g = w => n.t(`styleManager.position.${w}`),
            m = TD.map(w => ({id: w, label: g(`presets.options.${w}`)})), v = ["absolute", "fixed"].includes(o),
            b = w => {
                let j = "auto", C = "auto", _ = "auto", E = "auto";
                switch (w) {
                    case"topLeft":
                        j = "0%", E = "0%";
                        break;
                    case"topRight":
                        j = "0%", C = "0%";
                        break;
                    case"bottomLeft":
                        _ = "0%", E = "0%";
                        break;
                    case"bottomRight":
                        _ = "0%", C = "0%";
                        break;
                    case"left":
                        j = "0%", _ = "0%", E = "0%";
                        break;
                    case"right":
                        j = "0%", _ = "0%", C = "0%";
                        break;
                    case"bottom":
                        E = "0%", _ = "0%", C = "0%";
                        break;
                    case"top":
                        E = "0%", j = "0%", C = "0%";
                        break;
                    case"full":
                        E = "0%", j = "0%", C = "0%", _ = "0%";
                        break
                }
                i.upValue(j), l.upValue(C), c.upValue(_), d.upValue(E)
            };
        return u.jsxs(u.Fragment, {
            children: [u.jsxs(De, {
                children: [u.jsx(Ze, {
                    ...Zt(r, p),
                    tip: g(`tips.${(x = r.getOption()) == null ? void 0 : x.id}`), ...D1
                }), v && u.jsx(q, {
                    children: u.jsx(mn, {
                        title: g("presets.title"),
                        children: u.jsx(Ze, {options: m, onChange: b, emptyState: "P", size: "s", caret: "", value: !0})
                    })
                })]
            }), o !== "static" && u.jsxs(u.Fragment, {
                children: [u.jsxs(De, {
                    col: !0,
                    children: [u.jsx(K, {
                        className: se("gs-utl-w-1/2 gjs-m-auto"),
                        children: u.jsx(tt, {..._t(i, p)})
                    }), u.jsxs(K, {
                        gap: "s",
                        children: [u.jsx(q, {grow: !0, children: u.jsx(tt, {..._t(d, p)})}), u.jsx(q, {
                            grow: !0,
                            children: u.jsx(tt, {..._t(l, p)})
                        })]
                    }), u.jsx(K, {className: se("gs-utl-w-1/2 gjs-m-auto"), children: u.jsx(tt, {..._t(c, p)})})]
                }), u.jsx(De, {children: u.jsx(tt, {..._t(e.getProperty("z-index"), p)})})]
            })]
        })
    }

    function LD({sector: e, styleManagerDataConfig: t}) {
        const n = e.getProperty("width"), r = e.getProperty("min-width"), o = e.getProperty("max-width"),
            i = e.getProperty("height"), l = e.getProperty("min-height"), c = e.getProperty("max-height"),
            d = {sector: e, styleManagerDataConfig: t};
        return u.jsxs(u.Fragment, {
            children: [u.jsxs(De, {
                property: [n, i],
                children: [u.jsx(tt, {..._t(n, d)}), u.jsx(tt, {..._t(i, d)})]
            }), u.jsxs(De, {
                property: [r, l],
                children: [u.jsx(tt, {..._t(r, d)}), u.jsx(tt, {..._t(l, d)})]
            }), u.jsxs(De, {property: [o, c], children: [u.jsx(tt, {..._t(o, d)}), u.jsx(tt, {..._t(c, d)})]})]
        })
    }

    function MD({sector: e, styleManagerDataConfig: t}) {
        const n = {sector: e, styleManagerDataConfig: t};
        return u.jsxs(u.Fragment, {children: [u.jsx(ir, {property: e.getProperty("padding"), ...n}), u.jsx(ir, {property: e.getProperty("margin"), ...n})]})
    }

    function AD({sector: e, styleManagerDataConfig: t}) {
        const n = e.getProperty("font-family"), r = e.getProperty("color"), o = e.getProperty("font-size"),
            i = e.getProperty("font-weight"), l = e.getProperty("line-height"), c = e.getProperty("letter-spacing"),
            d = e.getProperty("text-align"), p = e.getProperty("vertical-align"), g = e.getProperty("text-decoration"),
            m = e.getProperty("text-transform"), v = e.getProperty("direction"), b = e.getProperty("white-space"),
            x = {sector: e, styleManagerDataConfig: t}, {sdkAddFonts: w} = Nc();
        return u.jsxs(u.Fragment, {
            children: [!!n && u.jsx(De, {
                property: n,
                children: w ? u.jsx(hf, {...nj(n)}) : u.jsx(Ze, {...Zt(n, x)})
            }), !!r && u.jsx(De, {property: r, children: u.jsx(Cs, {...oa(r, x)})}), u.jsxs(De, {
                property: [o, i],
                children: [!!o && u.jsx(tt, {..._t(o, x)}), !!i && u.jsx(Ze, {...Zt(i, x)})]
            }), u.jsxs(De, {
                property: [l, c],
                children: [!!l && u.jsx(tt, {..._t(l, x)}), !!c && u.jsx(tt, {..._t(c, x)})]
            }), u.jsxs(De, {
                property: [d, p],
                children: [!!d && u.jsx(Ze, {...Zt(d, x)}), !!p && u.jsx(Ze, {...Zt(p, x)})]
            }), u.jsxs(De, {
                property: [m, v],
                children: [!!m && u.jsx(Ze, {...Zt(m, x)}), !!v && u.jsx(Ze, {...Zt(v, x)})]
            }), u.jsxs(De, {
                property: [b, g],
                children: [!!b && u.jsx(Ze, {...Zt(b, x)}), !!g && u.jsx(Ze, {...Zt(g, x)})]
            })]
        })
    }

    const D1 = {row: !0, classNameLabel: "gs-utl-w-full"},
        I1 = ({property: e, skipClear: t, label: n, afterLabelButtons: r = []}) => u.jsxs(K, {
            nowrap: !0,
            full: !0,
            items: "center",
            justify: "between",
            gap: "s",
            children: [u.jsx(q, {
                grow: !1,
                children: u.jsx(mo, {property: e, skipClear: t, label: n})
            }), !!r.length && u.jsx(K, {
                nowrap: !0,
                items: "center",
                justify: "start",
                gap: "x2s",
                children: r.map((o, i) => u.jsx(Xt, {...o}, i))
            })]
        }), J2 = "gs-style-manager", _f = `${J2}-sector`, RD = `${_f}-header`, ND = `${_f}-content`,
        Q2 = (e, t = 0, n = !0) => se(RD, te.bgH2, et.xyS, te.br, t && ye.bt, (e || n) && ye.bb),
        $D = (e, t = {}) => e.getOptions().map(n => ({
            id: e.getOptionId(n),
            label: e.getOptionLabel(e.getOptionId(n), t),
            title: n.title
        })), DD = (e, t) => t.map(n => ({...n, title: e.getOptionLabel(e.getOptionId(n))})), ej = e => ({
            size: "s",
            value: e.getValue({noDefault: !0}),
            placeholder: e.getDefaultValue(),
            onChange: (t, n) => e.upValue(t, {partial: n})
        }), tj = (e, t, n) => {
            const r = V1(e, t), {enableDataValue: o, hasDataResolverValue: i, initialDataValue: l} = r;
            let c = [];
            return t && (c = Kc(r)), {
                fieldProps: {
                    size: "s",
                    value: i ? l : e.getValue(),
                    options: $D(e, n ?? {}),
                    disabled: i,
                    onChange: d => e.upValue(d),
                    labelAs: o ? "span" : void 0,
                    label: u.jsx(I1, {property: e, skipClear: i, label: t.label, afterLabelButtons: c})
                }, connectDataSources: r
            }
        }, Zo = (e, t, n) => tj(e, t, n).fieldProps, Zt = (e, t, n) => {
            const {fieldProps: r, connectDataSources: o} = tj(e, t, n), {hasDataResolverValue: i} = o,
                l = i ? e.getValue() || " " : r.emptyState;
            return {...r, emptyState: l, hideCaret: i}
        }, nj = e => ({
            size: "s",
            options: void 0,
            value: e.getValue(),
            onChange: t => e.upValue(t),
            buttonClassName: "gs-utl-mb-1",
            labelAs: "div",
            label: u.jsx(mo, {property: e})
        }), ii = (e, t = {}) => ({
            title: e.getLabel(),
            titleAdd: `Add new ${e.getLabel()}`,
            items: e.getLayers(),
            selected: e.getSelectedLayer(),
            renderItem: n => e.getLayerLabel(n),
            add: () => e.addLayer(t, {at: 0}),
            select: n => e.selectLayer(n),
            remove: n => e.removeLayer(n),
            move: (n, r = 0) => e.moveLayer(n, r),
            label: u.jsx(mo, {property: e})
        }), _t = (e, t) => {
            const n = V1(e, t), r = Kc(n), {hasDataResolverValue: o} = n, {label: i} = t;
            return {
                size: "s",
                value: n.dataResolverValue ?? e.getValue({noDefault: !0}),
                valueUnit: e.getUnit(),
                pan: !o,
                units: o ? [] : e.getUnits(),
                disabled: o,
                min: e.getMin(),
                max: e.getMax() || void 0,
                step: e.getStep(),
                placeholder: e.getDefaultValue(),
                onChangeUnit: l => e.upUnit(l),
                onChange: (l, c) => e.upValue(l, {partial: c}),
                labelAs: r.length ? "span" : void 0,
                label: u.jsx(I1, {property: e, skipClear: o, label: i, afterLabelButtons: r})
            }
        };

    function V1(e, t) {
        const {styleManagerDataConfig: n = !1, sector: r} = t, o = e.em.getEditor(), {Styles: i} = o,
            l = o.getSelected(), c = i.getSelectedAll(), d = i.getSelected();
        let p = !1;
        n === !0 ? p = !0 : l && ps(n) && St(n.enable) && (p = n.enable({
            property: e,
            sector: r,
            component: l,
            editor: o
        }));
        const g = e.getName(), m = (d == null ? void 0 : d.getStyle("", {skipResolve: !0})[g]) ?? "", v = pf(m),
            b = l == null ? void 0 : l.collectionsStateMap;
        return {
            hasDataResolverValue: v,
            dataResolverValue: v ? d == null ? void 0 : d.getStyle()[g] : void 0,
            enableDataValue: p,
            initialDataValue: m,
            handleDataValueChange: x => {
                c.forEach(w => {
                    w.addStyle({[g]: x})
                })
            },
            handleValueClear: () => {
                c.forEach(x => {
                    const w = x.getStyle()[g] ?? "";
                    x.addStyle({[g]: w})
                })
            },
            editor: o,
            additionalSources: b
        }
    }

    const oa = (e, t) => {
        const n = V1(e, t), r = Kc(n), {hasDataResolverValue: o} = n, {label: i} = t;
        return {
            size: "s",
            value: n.dataResolverValue ?? e.getValue({noDefault: !0}),
            placeholder: e.getDefaultValue(),
            disabled: o,
            onChange: (l, c) => e.upValue(l, {partial: c}),
            labelAs: r.length ? "span" : void 0,
            label: u.jsx(I1, {property: e, skipClear: o, label: i, afterLabelButtons: r})
        }
    }, ID = e => ({
        ...ej(e), onOpen() {
            const t = e.em.Assets;
            t.open({
                select(n) {
                    e.upValue(n.getSrc()), t.close()
                }
            })
        }
    }), VD = (e, {styleManagerDataConfig: t}) => {
        const n = e.getId();
        let r = wD;
        switch (n) {
            case"gs-layout":
                r = kD;
                break;
            case"gs-size":
                r = LD;
                break;
            case"gs-space":
                r = MD;
                break;
            case"gs-position":
                r = OD;
                break;
            case"gs-borders":
                r = jD;
                break;
            case"gs-effects":
                r = ED;
                break;
            case"gs-typography":
                r = AD;
                break;
            case"gs-background":
                r = zD;
                break
        }
        return u.jsx(r, {sector: e, styleManagerDataConfig: t})
    }, H1 = {}, rj = xe(function ({className: t, sectors: n}) {
        var v;
        const [r, o] = y.useState(H1), i = Ae(), {editor: l} = i, c = l == null ? void 0 : l.Styles,
            d = c == null ? void 0 : c.getSelected(), p = l == null ? void 0 : l.getSelected();
        if (y.useEffect(() => {
            if (p && l) {
                const b = setTimeout(() => {
                    let x = H1;
                    const w = p.get("styleManager");
                    St(w) && (x = w({editor: l, component: p})), o(x || H1)
                });
                return () => clearTimeout(b)
            }
        }, [p, l]), !c || !d) return null;
        const g = n.length ? n : c.getSectors({visible: !0}),
            m = (v = i.sdkOptions.dataSources) == null ? void 0 : v.styleManager;
        return r.disabled ? null : u.jsx("div", {
            className: se(J2, t, "select-none"),
            children: g.map((b, x) => u.jsx(ta, {
                classNameWrap: U(_f, `${_f}__${b.id}`),
                sticky: !0,
                handler: () => {
                    const w = b.getProperties({withValue: !0}).length > 0,
                        j = b.getProperties({withParentValue: !0}).length > 0;
                    return u.jsxs(K, {
                        space: "xs",
                        items: "center",
                        children: [u.jsx(q, {
                            className: se("gjs-mr-2"),
                            children: b.getName()
                        }), w && u.jsx(q, {children: u.jsx("div", {className: se(nt.dot, te.bgA2)})}), j && u.jsx(q, {children: u.jsx("div", {className: se(nt.dot, te.bgW)})})]
                    })
                },
                className: w => Q2(w, x, x === g.length - 1),
                children: u.jsx(K, {
                    className: se(ND, "gs-utl-p-2 gs-utl-gap-2"),
                    col: !0,
                    children: VD(b, {styleManagerDataConfig: m})
                })
            }, b.id))
        })
    });
    var ai = (e => (e.Image = "image", e.Gradient = "gradient", e.Color = "color", e))(ai || {});
    const kf = "background-image", Jo = "__background-type", ou = kf,
        oj = "https://placehold.co/150/777/white.png?text=IMAGE", F1 = "50px", HD = {
            [Jo]: "image",
            "background-image": `url("${oj}")`,
            "background-size": `${F1} ${F1}`,
            "background-repeat": "repeat",
            "background-position": "0px 0px"
        }, FD = e => (e.includes("gradient(") ? u1(e).colorStops[0].color : e) || "";

    function zD({sector: e, styleManagerDataConfig: t}) {
        var _;
        const n = Pr(), r = e.getProperty("background"), o = r.getProperty(Jo), i = r.getProperty("background-image"),
            l = r.getProperty("background-position"), c = r.getProperty("background-size"),
            d = e.getProperty("background-color"), p = e.getProperty("background-clip"),
            g = {sector: e, styleManagerDataConfig: t},
            m = ((_ = r.getSelectedLayer()) == null ? void 0 : _.getIndex()) || -1,
            v = o == null ? void 0 : o.getValue(), b = v === "image", x = i.getValue(), w = () => {
                const E = n.Assets;
                E.open({
                    select(k) {
                        const T = k.getSrc();
                        i.upValue(`url("${T}")`), E.close()
                    }
                })
            }, j = E => {
                let k = "none", T = "100%";
                E === "image" ? (k = `url("${oj}")`, T = F1) : E === "gradient" ? k = "linear-gradient(90deg, black 10%, white 90%)" : E === "color" && (k = "rgba(0, 0, 0, 0.5)"), i.upValue(k), o.upValue(E), l.upValue("0 0"), c.upValue(`${T} ${T}`)
            }, C = DD(o, [{id: "image", label: u.jsx(be, {icon: fe.image, size: Ee.s})}, {
                id: "gradient",
                label: u.jsx(be, {icon: fe.gradientVertical, size: Ee.s})
            }, {id: "color", label: u.jsx(be, {icon: fe.checkboxBlank, size: Ee.s})}]);
        return u.jsxs(u.Fragment, {
            children: [u.jsx(De, {
                property: r,
                separator: !0,
                children: u.jsxs(Xo, {
                    ...ii(r, HD),
                    previewStyle: E => r.getStyleFromLayer(E, {camelCase: !0}),
                    children: [u.jsx(De, {
                        children: u.jsx(Wn, {
                            ...Zo(o, g),
                            options: C,
                            onChange: j,
                            label: void 0
                        })
                    }), u.jsx(De, {
                        children: u.jsxs(mo, {
                            children: [b && u.jsx(qc, {
                                value: lf(x).value,
                                onOpen: w
                            }), v === "color" && u.jsx(Cs, {
                                ...oa(i, g),
                                value: FD(x),
                                label: void 0
                            }), v === "gradient" && u.jsx(_9, {
                                value: x,
                                onChange: (E, k) => i.upValue(E, {partial: k})
                            }, m)]
                        })
                    }), b && u.jsxs(u.Fragment, {
                        children: [u.jsx(De, {
                            col: !0,
                            children: u.jsx(ir, {property: l, ...g})
                        }), u.jsx(De, {
                            col: !0,
                            children: u.jsx(ir, {property: c, ...g})
                        }), u.jsxs(De, {children: [u.jsx(Ze, {...Zt(r.getProperty("background-repeat"), g)}), u.jsx(Ze, {...Zt(r.getProperty("background-attachment"), g)})]}), u.jsx(De, {children: u.jsx(Ze, {...Zt(r.getProperty("background-origin"), g)})})]
                    })]
                })
            }), u.jsx(De, {property: d, children: u.jsx(Cs, {...oa(d, g)})}), u.jsx(De, {
                property: p,
                children: u.jsx(Ze, {...Zt(p, g)})
            })]
        })
    }

    const Tf = ["%"], Of = ["s", "ms"], su = ["deg", "rad", "grad"], Qo = ["px", "%", "em", "rem", "vw", "vh"],
        sj = {type: "select", options: ["visible", "hidden", "scroll", "auto"].map(e => ({id: e})), default: "visible"},
        BD = e => `linear-gradient(${e} 1%, ${e} 100%)`, Lf = e => ({id: e, label: e.split("-").map(Vo).join(" ")}),
        ij = e => ({property: t, to: n}) => {
            if (n.value) {
                const r = t.getOption(), o = t.getParent().getProperty(e), i = o.getUnit(),
                    l = {units: r.units || [], min: r.min, max: r.max, unit: ""};
                (!i || (l == null ? void 0 : l.units.indexOf(i)) < 0) && (l.unit = (l == null ? void 0 : l.units[0]) || ""), o.up(l)
            }
        }, UD = e => {
            const t = `${e}-name`, n = `${e}-value`;
            return (r, {separatorLayers: o}) => {
                const i = r[e] || "";
                return i ? i.split(o).map(l => {
                    const {name: c, value: d} = lf(l);
                    return {[t]: c, [n]: d}
                }) : []
            }
        }, aj = e => {
            const t = {[ou]: e};
            if (e.indexOf("url(") > -1) t[Jo] = ai.Image; else if (e.indexOf("gradient(") > -1) {
                const n = u1(e), r = n.colorStops, o = n.name.indexOf("linear") >= 0;
                r.length === 2 && o && r[0].color === r[1].color ? t[Jo] = ai.Color : t[Jo] = ai.Gradient
            } else t[Jo] = ai.Color, t[ou] = BD(e);
            return t
        }, lj = (e = "filter") => {
            const t = `${e}-name`, n = `${e}-value`;
            return {
                property: e,
                type: "stack",
                layerSeparator: " ",
                fromStyle(r, {separatorLayers: o}) {
                    const i = r[e] || "";
                    return i ? i.split(o).map(l => {
                        const {name: c, value: d} = lf(l);
                        return {[t]: c, [n]: d}
                    }) : []
                },
                toStyle(r, {name: o}) {
                    return {[o]: `${r[t]}(${r[n] || "0"})`}
                },
                properties: [{
                    property: t,
                    type: "select",
                    default: "blur",
                    options: [{
                        id: "blur",
                        label: "Blur",
                        min: 0,
                        units: ["px", "em", "rem", "vw", "vh"]
                    }, {id: "brightness", label: "Brightness", min: 0, units: ["%"]}, {
                        id: "contrast",
                        label: "Contrast",
                        min: 0,
                        units: ["%"]
                    }, {id: "grayscale", label: "Grayscale", min: 0, max: 100, units: ["%"]}, {
                        id: "hue-rotate",
                        label: "Hue rotate",
                        min: 0,
                        max: 360,
                        units: ["deg", "rad", "grad"]
                    }, {id: "invert", label: "Invert", min: 0, max: 100, units: ["%"]}, {
                        id: "saturate",
                        label: "Saturate",
                        min: 0,
                        units: ["%"]
                    }, {id: "sepia", label: "Sepia", min: 0, max: 100, units: ["%"]}],
                    onChange: ij(n)
                }, {property: n, type: "integer"}]
            }
        }, Mf = (e, {x: t, y: n, mergable: r} = {}) => {
            const o = {property: `${e}-x`, type: "integer", units: Qo, ...t},
                i = {property: `${e}-y`, type: "integer", units: Qo, ...n};
            return {
                property: e, type: "composite", properties: [o, i], ...r && {
                    fromStyle(l, {
                        name: c,
                        separator: d,
                        property: p
                    }) {
                        const [g, m] = p.getProperties(), [v, b] = (l[c] || "").split(d);
                        return {[g.getId()]: l[g.getName()] || v || "", [m.getId()]: l[m.getName()] || b || v || ""}
                    }, toStyle(l, {name: c, property: d}) {
                        const [p, g] = d.getProperties(), m = l[p.getId()], v = l[g.getId()];
                        return {[c]: m === v ? m : `${m} ${v}`}
                    }
                }
            }
        }, WD = (e, t = "") => {
            const n = `${e}-name`, r = `${e}-value`;
            return (o, {name: i}) => ({[i]: `${o[n]}(${o[r] || t})`})
        }, GD = [{
            name: "Size",
            open: !1,
            buildProps: ["width", "height", "max-width", "min-height"],
            properties: [{property: "icon-size", type: "number", defaults: "20px", units: ["px", "%"]}]
        }, {
            name: "Space",
            open: !1,
            buildProps: ["margin", "padding", "vertical-align"],
            properties: [{
                property: "margin",
                properties: [{name: "Top", property: "margin-top"}, {
                    name: "Right",
                    property: "margin-right"
                }, {name: "Bottom", property: "margin-bottom"}, {name: "Left", property: "margin-left"}]
            }, {
                property: "padding",
                properties: [{name: "Top", property: "padding-top"}, {
                    name: "Right",
                    property: "padding-right"
                }, {name: "Bottom", property: "padding-bottom"}, {name: "Left", property: "padding-left"}]
            }, {property: "vertical-align", type: "select", options: ["top", "middle", "bottom"].map(Lf)}]
        }, {
            name: "Typography",
            open: !1,
            buildProps: ["font-family", "font-size", "font-weight", "letter-spacing", "color", "line-height", "text-align", "align", "text-decoration", "font-style"],
            properties: [{name: "Font", property: "font-family"}, {
                name: "Weight",
                property: "font-weight"
            }, {name: "Font color", property: "color"}, {
                property: "text-align",
                defaults: "left",
                type: "select",
                options: [{id: "left", label: "Left"}, {id: "center", label: "Center"}, {
                    id: "right",
                    label: "Right"
                }, {id: "justify", label: "Justify"}]
            }, {
                property: "align",
                defaults: "left",
                type: "select",
                options: [{id: "left", label: "Left"}, {id: "center", label: "Center"}, {
                    id: "right",
                    label: "Right"
                }, {id: "justify", label: "Justify"}]
            }, {
                property: "text-decoration",
                type: "select",
                defaults: "none",
                options: [{id: "none", label: "None"}, {id: "underline", label: "underline"}, {
                    id: "line-through",
                    label: "Line-through"
                }]
            }, {
                property: "font-style",
                type: "select",
                defaults: "normal",
                options: [{id: "normal", label: "Normal"}, {id: "italic", label: "Italic"}]
            }]
        }, {
            name: "Borders",
            open: !1,
            buildProps: ["border-radius", "border"],
            properties: [{
                property: "border-radius",
                corners: !0,
                properties: [{name: "Top", property: "border-top-left-radius"}, {
                    name: "Right",
                    property: "border-top-right-radius"
                }, {name: "Bottom", property: "border-bottom-left-radius"}, {
                    name: "Left",
                    property: "border-bottom-right-radius"
                }]
            }, {property: "border", generic: !0}, {
                property: "border-detached",
                name: "Border",
                type: "composite",
                detached: !0,
                generic: !0,
                properties: [{name: "Width", property: "border-width", type: "integer", units: ["px", "%"]}, {
                    name: "Style",
                    property: "border-style",
                    type: "select",
                    options: ["none", "solid", "dotted", "dashed", "double", "groove", "ridge", "inset", "outset"].map(Lf)
                }, {name: "Color", property: "border-color", type: "color"}]
            }]
        }, {
            name: "Decorations",
            open: !1,
            buildProps: ["background-color", "container-background-color", "background-url", "background-repeat", "background-size"],
            properties: [{
                name: "Background color",
                property: "container-background-color",
                full: !0,
                type: "color"
            }, {property: "background-url", type: "file"}]
        }], KD = [{
            id: "gs-layout",
            name: "Layout",
            properties: [{extend: "display"}, {
                extend: "flex-direction",
                name: "Direction",
                type: "radio",
                default: "row"
            }, {extend: "justify-content", type: "radio", default: "flex-start"}, {
                extend: "align-items",
                type: "radio",
                default: "stretch"
            }, Mf("gap", {
                x: {property: "row-gap", min: 0, default: "0"},
                y: {property: "column-gap", min: 0, default: "0"},
                mergable: !0
            }), {extend: "flex-wrap"}, {extend: "align-content"}, {extend: "align-self"}, {extend: "order"}, {
                property: "flex",
                type: "composite",
                properties: [{type: "integer", property: "flex-grow", default: "0", min: 0}, {
                    type: "integer",
                    property: "flex-shrink",
                    default: "0",
                    min: 0
                }, {type: "integer", property: "flex-basis", fixedValues: ["auto"], default: "auto", units: Qo, min: 0}]
            }]
        }, {
            id: "gs-size",
            name: "Size",
            properties: [{extend: "width"}, {extend: "min-width"}, {extend: "max-width"}, {extend: "height"}, {extend: "min-height"}, {extend: "max-height"}]
        }, {
            id: "gs-space",
            name: "Space",
            properties: [{extend: "padding", detached: !0}, {extend: "margin", detached: !0}]
        }, {
            id: "gs-position",
            name: "Position",
            properties: [{
                extend: "position",
                options: [{id: "static", label: "Static"}, {id: "relative", label: "Relative"}, {
                    id: "absolute",
                    label: "Absolute"
                }, {id: "fixed", label: "Fixed"}, {id: "sticky", label: "Sticky"}],
                onChange({opts: e, property: t}) {
                    if (e.__clear) {
                        const n = {top: "", right: "", bottom: "", left: "", "z-index": ""};
                        t.__upTargetsStyle(n, e)
                    }
                }
            }, {extend: "top"}, {extend: "right"}, {extend: "bottom"}, {extend: "left"}, {
                extend: "z-index",
                type: "integer",
                default: "0"
            }]
        }, {
            id: "gs-typography",
            name: "Typography",
            properties: [{extend: "font-family"}, {extend: "color"}, {extend: "font-size"}, {extend: "font-weight"}, {
                extend: "line-height",
                min: 0
            }, {extend: "letter-spacing"}, {extend: "text-align"}, {
                property: "vertical-align",
                type: "select",
                default: "baseline",
                options: ["baseline", "top", "middle", "bottom"].map(Lf)
            }, {
                extend: "text-decoration",
                type: "select",
                default: "none",
                options: [{id: "none", label: "None"}, {id: "underline", label: "Underline"}, {
                    id: "overline",
                    label: "Overline"
                }, {id: "line-through", label: "Line through"}]
            }, {
                extend: "text-transform",
                type: "select",
                default: "none",
                options: [{id: "none", label: "None"}, {id: "capitalize", label: "Capitalize"}, {
                    id: "uppercase",
                    label: "Uppercase"
                }, {id: "lowercase", label: "Lowercase"}]
            }, {
                extend: "direction",
                type: "radio",
                default: "ltr",
                options: [{id: "ltr", label: "LTR"}, {id: "rtl", label: "RTL"}]
            }, {
                extend: "white-space",
                type: "select",
                default: "normal",
                options: [{id: "normal", label: "Normal"}, {id: "nowrap", label: "No wrap"}, {
                    id: "pre",
                    label: "Pre"
                }, {id: "pre-wrap", label: "Pre wrap"}, {id: "pre-line", label: "Pre line"}, {
                    id: "break-spaces",
                    label: "Break spaces"
                }]
            }]
        }, {
            id: "gs-background", name: "Background", properties: [{
                property: "background",
                type: "stack",
                layerSeparator: new RegExp("(?<!\\(.*[^)]),(?![^(]*\\))"),
                layerJoin: ", ",
                detached: !0,
                layerLabel: (e, {values: t, property: n}) => n.getProperty(Jo).getOptionLabel(t[Jo]),
                toStyle(e) {
                    const t = e[Jo];
                    let n = e[ou];
                    return t === "color" && n.indexOf("linear-gradient") < 0 && (n = `linear-gradient(${n} 1%, ${n} 100%)`), {
                        ...e,
                        [ou]: n
                    }
                },
                fromStyle(e, {property: t, name: n, separatorLayers: r}) {
                    const o = r, i = t.getProperties();
                    let l = [];
                    return e[kf] ? (l = t.__splitStyleName(e, kf, o).map(aj), i.forEach(c => {
                        const d = c.getId(), p = c.getName();
                        p !== kf && t.__splitStyleName(e, p, o).map(g => ({[d]: g || c.getDefaultValue()})).forEach((g, m) => {
                            l[m] = l[m] ? {...l[m], ...g} : g
                        })
                    })) : e[n] && (l = t.__splitStyleName(e, n, /(?![^)(]*\([^)(]*?\)\)),(?![^\(]*\))/).map(c => c.substring(0, c.lastIndexOf(")") + 1)).map(aj)), l
                },
                properties: [{
                    property: Jo,
                    type: "radio",
                    default: "image",
                    options: [{id: ai.Image}, {id: ai.Gradient}, {id: ai.Color}]
                }, {property: ou, default: "none"}, {
                    property: "background-position",
                    type: "composite",
                    properties: ["background-position-x", "background-position-y"].map(e => ({
                        type: "integer",
                        property: e,
                        units: Qo,
                        default: "0px"
                    }))
                }, {
                    property: "background-size",
                    type: "composite",
                    properties: ["background-size-x", "background-size-y"].map(e => ({
                        type: "integer",
                        property: e,
                        units: Qo,
                        default: "auto"
                    }))
                }, {
                    property: "background-repeat",
                    default: "repeat",
                    type: "select",
                    options: [{id: "repeat", label: "Repeat"}, {id: "repeat-x", label: "Repeat x"}, {
                        id: "repeat-y",
                        label: "Repeat y"
                    }, {id: "no-repeat", label: "No repeat"}, {id: "space", label: "Space"}, {id: "round", label: "Round"}]
                }, {
                    property: "background-attachment",
                    default: "scroll",
                    type: "select",
                    options: [{id: "scroll", label: "Scroll"}, {id: "fixed", label: "Fixed"}]
                }, {
                    property: "background-origin",
                    default: "padding-box",
                    type: "select",
                    options: [{id: "padding-box", label: "Padding box"}, {
                        id: "border-box",
                        label: "Border box"
                    }, {id: "content-box", label: "Content box"}]
                }]
            }, {property: "background-color", type: "color", default: "none"}, {
                property: "background-clip",
                default: "border-box",
                type: "select",
                options: [{id: "border-box", label: "Border box"}, {
                    id: "padding-box",
                    label: "Padding box"
                }, {id: "content-box", label: "Content box"}, {id: "text", label: "Text"}],
                onChange({to: e, property: t, opts: n}) {
                    const {value: r} = e;
                    if (r !== void 0) {
                        const o = r === "text";
                        t.__upTargetsStyle({
                            "-webkit-background-clip": o ? r : "",
                            "-webkit-text-fill-color": o ? "transparent" : ""
                        }, n)
                    }
                }
            }]
        }, {
            id: "gs-borders",
            name: "Borders",
            properties: [{extend: "border-radius", detached: !0}, {
                extend: "border-width",
                type: "composite",
                detached: !0,
                properties: ["border-top-width", "border-right-width", "border-bottom-width", "border-left-width"].map(e => ({
                    type: "integer",
                    property: e,
                    default: "0",
                    units: Qo
                }))
            }, {
                extend: "border-style",
                type: "composite",
                detached: !0,
                properties: ["border-top-style", "border-right-style", "border-bottom-style", "border-left-style"].map(e => ({
                    type: "select",
                    property: e,
                    default: "none",
                    options: [{id: "none", label: "None"}, {id: "solid", label: "Solid"}, {
                        id: "dotted",
                        label: "Dotted"
                    }, {id: "dashed", label: "Dashed"}, {id: "double", label: "Double"}, {
                        id: "groove",
                        label: "Groove"
                    }, {id: "ridge", label: "Ridge"}, {id: "inset", label: "Inset"}, {id: "outset", label: "Outset"}]
                }))
            }, {
                extend: "border-color",
                type: "composite",
                detached: !0,
                properties: ["border-top-color", "border-right-color", "border-bottom-color", "border-left-color"].map(e => ({
                    type: "color",
                    property: e,
                    default: "currentColor"
                }))
            }]
        }, {
            id: "gs-effects",
            name: "Effects",
            properties: [{
                property: "opacity",
                type: "integer",
                min: 0,
                max: 100,
                default: "100",
                units: ["%"]
            }, {
                property: "mix-blend-mode",
                type: "select",
                default: "normal",
                options: [{id: "normal", label: "Normal"}, {id: "multiply", label: "Multiply"}, {
                    id: "screen",
                    label: "Screen"
                }, {id: "overlay", label: "Overlay"}, {id: "darken", label: "Darken"}, {
                    id: "lighten",
                    label: "Lighten"
                }, {id: "color-dodge", label: "Color dodge"}, {id: "color-burn", label: "Color burn"}, {
                    id: "hard-light",
                    label: "Hard light"
                }, {id: "soft-light", label: "Soft light"}, {id: "difference", label: "Difference"}, {
                    id: "exclusion",
                    label: "Exclusion"
                }, {id: "hue", label: "Hue"}, {id: "saturation", label: "Saturation"}, {
                    id: "color",
                    label: "Color"
                }, {id: "luminosity", label: "Luminosity"}]
            }, {extend: "cursor"}, Mf("overflow", {x: sj, y: sj, mergable: !0}), {
                extend: "box-shadow",
                fromStyle(e, {separatorLayers: t}) {
                    const n = e["box-shadow"] || "";
                    return n ? n.split(t).map(o => {
                        const {x: i, y: l, blur: c, spread: d, inset: p, color: g} = BS(o);
                        return {
                            "box-shadow-h": i,
                            "box-shadow-v": l,
                            "box-shadow-blur": c,
                            "box-shadow-spread": d,
                            "box-shadow-color": g,
                            "box-shadow-type": p ? "inset" : ""
                        }
                    }) : []
                }
            }, {
                extend: "text-shadow", fromStyle(e, {separatorLayers: t}) {
                    const n = e["text-shadow"] || "";
                    return n ? n.split(t).map(o => {
                        const {x: i, y: l, blur: c, color: d} = BS(o);
                        return {"text-shadow-h": i, "text-shadow-v": l, "text-shadow-blur": c, "text-shadow-color": d}
                    }) : []
                }
            }, lj(), lj("backdrop-filter"), {
                property: "transition",
                type: "stack",
                layerLabel: (e, {values: t}) => `${Vo(t["transition-property"])}: ${t["transition-duration"]}`,
                properties: [{
                    property: "transition-property",
                    type: "select",
                    default: "opacity",
                    options: ["width", "height", "min-width", "min-height", "max-width", "max-height", "padding", "margin", "color", "font-size", "line-height", "letter-height", "border", "border-radius", "background", "opacity", "box-shadow", "text-shadow", "filter", "backdrop-filter", "transform", "all"].map(Lf)
                }, {
                    property: "transition-duration",
                    type: "integer",
                    default: "1s",
                    unit: Of[0],
                    units: Of,
                    min: 0
                }, {
                    property: "transition-timing-function",
                    type: "select",
                    default: "ease",
                    options: [{id: "ease", label: "Ease"}, {id: "ease-in", label: "Ease-In"}, {
                        id: "ease-in-out",
                        label: "Ease-In-Out"
                    }, {id: "ease-out", label: "Ease-Out"}, {id: "linear", label: "Linear"}]
                }, {property: "transition-delay", type: "integer", default: "0s", unit: Of[0], units: Of}]
            }, {
                property: "transform",
                type: "stack",
                layerSeparator: " ",
                layerLabel: (e, {values: t, property: n}) => {
                    const r = n.getProperty("transform-name").getOptionLabel(t["transform-name"]);
                    return `${Vo(r)}: ${t["transform-value"]}`
                },
                fromStyle: UD("transform"),
                toStyle: WD("transform", "0"),
                properties: [{
                    property: "transform-name",
                    type: "select",
                    default: "translateX",
                    options: [{id: "translateX", label: "Move X", units: Qo}, {
                        id: "translateY",
                        label: "Move Y",
                        units: Qo
                    }, {id: "translateZ", label: "Move Z", units: Qo}, {
                        id: "rotateX",
                        label: "Rotate X",
                        units: su
                    }, {id: "rotateY", label: "Rotate Y", units: su}, {
                        id: "rotateZ",
                        label: "Rotate Z",
                        units: su
                    }, {id: "scale", label: "Scale", units: Tf}, {id: "scaleX", label: "Scale X", units: Tf}, {
                        id: "scaleY",
                        label: "Scale Y",
                        units: Tf
                    }, {id: "scaleZ", label: "Scale Z", units: Tf}, {id: "skewX", label: "Skew X", units: su}, {
                        id: "skewY",
                        label: "Skew Y",
                        units: su
                    }],
                    onChange: ij("transform-value")
                }, {property: "transform-value", type: "integer", default: "0"}]
            }, Mf("transform-origin", {x: {default: "50%"}, y: {default: "50%"}}), {
                property: "backface-visibility",
                type: "radio",
                default: "visible",
                options: [{id: "visible", label: "Visible"}, {id: "hidden", label: "Hidden"}]
            }, {
                property: "perspective",
                type: "integer",
                min: 0,
                default: "none",
                units: Qo
            }, Mf("perspective-origin", {x: {default: "50%"}, y: {default: "50%"}}), {
                property: "transform-style",
                type: "radio",
                default: "flat",
                options: [{id: "flat", label: "2D"}, {id: "preserve-3d", label: "3D"}]
            }]
        }], cj = [{id: "desktop", name: "Desktop", width: ""}, {
            id: "mobilePortrait",
            name: "Mobile",
            width: "320px",
            widthMedia: "480px"
        }];

    function uj(e, t) {
        return [n => g$(n, t), ...p$[e], n => H$(n, t), c$(e, t)]
    }

    function dj(e, t = {}) {
        var l;
        const n = e === Xe.email, {devices: r} = t,
            o = r ? {default: r.selected, devices: r.default ?? (n ? cj : void 0)} : n ? {devices: cj} : {}, i = {
                undoManager: {trackSelection: !1},
                showOffsets: !0,
                cssIcons: "",
                assetManager: {},
                styleManager: {sectors: n ? GD : KD},
                parser: {optionsHtml: {convertDataGjsAttributesHyphens: !0}},
                selectorManager: {componentFirst: !0},
                i18n: {messagesAdd: ic({en: $6}, ((l = t.i18n) == null ? void 0 : l.locales) ?? {})},
                deviceManager: o,
                canvasCss: `
      [contenteditable] { outline: 0px solid transparent;}
    `,
                canvas: {customSpots: {select: !0, hover: !0, spacing: !0, target: !0}},
                telemetry: !1
            };
        return ic(i, t.gjsOptions ?? {})
    }

    class qD {
        constructor(t) {
            this.loadCounter = 0, this.pendingInstalled = [], this.pendingUninstalled = [], this.selectedShown = !1, this.store = t, Bn(this, {}, {autoBind: !0})
        }

        get hasPending() {
            return !!this.pendingInstalled.length || !!this.pendingUninstalled.length
        }

        * initProjectPlugins(t) {
            this.clearPending();
            const r = (yield Af()).filter(o => o.projectType.includes(t));
            this.setProjectPlugins(r)
        }

        setProjectPlugins(t, n = {}) {
            this.projectPlugins = [...t], n.clearPending && this.clearPending()
        }

        clearPending() {
            this.pendingInstalled = [], this.pendingUninstalled = []
        }

        getPluginsToLoad(t, n) {
            const r = [...uj(t, {appStore: n}), ...this.projectPlugins || []], o = n.sdkOptions.plugins || [];
            return St(o) ? o({plugins: r}) : [...r, ...o]
        }

        addPendingInstalled(t) {
            const {pendingInstalled: n, pendingUninstalled: r} = this, o = t.id;
            r.includes(o) ? this.pendingUninstalled = r.filter(i => i !== o) : n.includes(o) || n.push(o)
        }

        addPendingUninstalled(t) {
            const {pendingInstalled: n, pendingUninstalled: r} = this, o = t.id;
            n.includes(o) ? this.pendingInstalled = n.filter(i => i !== o) : r.push(o)
        }

        setSelectedShown(t) {
            this.selectedShown = t
        }
    }

    const z1 = {db: Yw.gjsStudio}, Af = () => new Promise(async e => {
        let t = [];
        try {
            t = await b6(nl.Settings, "plugins", z1) || []
        } catch (n) {
            Io() && console.error(n)
        }
        e(t)
    }), YD = (e, t = {}) => new Promise(async n => {
        try {
            const o = [...t.installed || await Af(), e];
            fj().addPendingInstalled(e), t.skipUpdateLocal || await Zw(nl.Settings, "plugins", o, z1)
        } catch (r) {
            console.error(r)
        }
        n()
    }), XD = (e, t = {}) => new Promise(async n => {
        try {
            const o = (t.installed || await Af()).filter(i => i.id !== e.id);
            fj().addPendingUninstalled(e), t.skipUpdateLocal || await Zw(nl.Settings, "plugins", o, z1)
        } catch (r) {
            console.error(r)
        }
        n()
    }), B1 = () => On().pluginStore, fj = () => $f().pluginStore;
    let Rf;
    const pj = y.createContext(void 0);

    class Nf {
        constructor(t) {
            this.blockManagerStore = new P6(this), this.appEditorStore = new eI(this, t == null ? void 0 : t.appEditorStore), this.localSettingsStore = new A6(t == null ? void 0 : t.localSettingsStore), this.toastStore = new E6(this), this.modalStore = new N6(this), this.i18nStore = new d6(this), this.pluginStore = new qD(this), this.pointerBadgeStore = new h6(this), this.contextMenu = new RN(this), this.layoutStore = new p6(this), this.templatesStore = new C6(this), this.assetsStore = new c6(this), this.globalStylesStore = new O6(this), this.fontsStore = new u6(this), this.appEditorStore.init(), Jg() && (window.__gjss = this)
        }
    }

    const ZD = e => {
        R6(e.localSettingsStore), nI(e.appEditorStore)
    }, JD = ({children: e, initialState: t}) => (Rf = y.useMemo(() => {
        const n = new Nf(t);
        return ZD(n), n
    }, []), u.jsx(pj.Provider, {value: Rf, children: e})), On = () => {
        const e = y.useContext(pj);
        if (!e) throw new Error("useStore must be used inside of StoreProvider");
        return e
    }, $f = () => {
        if (!Rf) throw new Error("Store has not been initialized");
        return Rf
    }, Df = ({icon: e, layout: t, tooltip: n, className: r, forceRemove: o, removeLayouts: i}) => ({
        type: "button",
        icon: e,
        tooltip: n,
        className: r,
        size: "s",
        editorEvents: {
            [`${Jn.layoutToggleId}${t.id}`]: ({fromEvent: l, setState: c}) => {
                c({active: l.isOpen})
            }
        },
        onClick: ({editor: l}) => {
            i == null || i.forEach(c => l.runCommand(_e.layoutRemove, {
                id: c,
                force: o
            })), l.runCommand(_e.layoutToggle, {...t})
        }
    }), gj = {type: "static", layoutId: "leftPanelsContainer"}, hj = {width: 240, overflow: "hidden"};
    Df({
        tooltip: "Blocks",
        removeLayouts: ["pagesLayers", "ps"],
        layout: {id: "blocks", layout: "panelBlocks", header: {label: "Blocks"}, style: hj, placer: gj}
    }), Df({
        tooltip: "Pages & Layers",
        removeLayouts: ["blocks", "ps"],
        layout: {id: "pagesLayers", layout: "panelPagesLayers", header: !1, style: hj, placer: gj}
    }), Df({
        tooltip: "Page Settings",
        removeLayouts: ["pagesLayers", "blocks"],
        layout: {id: "ps", layout: "panelPageSettings", header: {label: "Page Settings"}, style: {marginLeft: 40}}
    }), Df({
        icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12,10.11C13.03,10.11 13.87,10.95 13.87,12C13.87,13 13.03,13.85 12,13.85C10.97,13.85 10.13,13 10.13,12C10.13,10.95 10.97,10.11 12,10.11M7.37,20C8,20.38 9.38,19.8 10.97,18.3C10.45,17.71 9.94,17.07 9.46,16.4C8.64,16.32 7.83,16.2 7.06,16.04C6.55,18.18 6.74,19.65 7.37,20M8.08,14.26L7.79,13.75C7.68,14.04 7.57,14.33 7.5,14.61C7.77,14.67 8.07,14.72 8.38,14.77C8.28,14.6 8.18,14.43 8.08,14.26M14.62,13.5L15.43,12L14.62,10.5C14.32,9.97 14,9.5 13.71,9.03C13.17,9 12.6,9 12,9C11.4,9 10.83,9 10.29,9.03C10,9.5 9.68,9.97 9.38,10.5L8.57,12L9.38,13.5C9.68,14.03 10,14.5 10.29,14.97C10.83,15 11.4,15 12,15C12.6,15 13.17,15 13.71,14.97C14,14.5 14.32,14.03 14.62,13.5M12,6.78C11.81,7 11.61,7.23 11.41,7.5C11.61,7.5 11.8,7.5 12,7.5C12.2,7.5 12.39,7.5 12.59,7.5C12.39,7.23 12.19,7 12,6.78M12,17.22C12.19,17 12.39,16.77 12.59,16.5C12.39,16.5 12.2,16.5 12,16.5C11.8,16.5 11.61,16.5 11.41,16.5C11.61,16.77 11.81,17 12,17.22M16.62,4C16,3.62 14.62,4.2 13.03,5.7C13.55,6.29 14.06,6.93 14.54,7.6C15.36,7.68 16.17,7.8 16.94,7.96C17.45,5.82 17.26,4.35 16.62,4M15.92,9.74L16.21,10.25C16.32,9.96 16.43,9.67 16.5,9.39C16.23,9.33 15.93,9.28 15.62,9.23C15.72,9.4 15.82,9.57 15.92,9.74M17.37,2.69C18.84,3.53 19,5.74 18.38,8.32C20.92,9.07 22.75,10.31 22.75,12C22.75,13.69 20.92,14.93 18.38,15.68C19,18.26 18.84,20.47 17.37,21.31C15.91,22.15 13.92,21.19 12,19.36C10.08,21.19 8.09,22.15 6.62,21.31C5.16,20.47 5,18.26 5.62,15.68C3.08,14.93 1.25,13.69 1.25,12C1.25,10.31 3.08,9.07 5.62,8.32C5,5.74 5.16,3.53 6.62,2.69C8.09,1.85 10.08,2.81 12,4.64C13.92,2.81 15.91,1.85 17.37,2.69M17.08,12C17.42,12.75 17.72,13.5 17.97,14.26C20.07,13.63 21.25,12.73 21.25,12C21.25,11.27 20.07,10.37 17.97,9.74C17.72,10.5 17.42,11.25 17.08,12M6.92,12C6.58,11.25 6.28,10.5 6.03,9.74C3.93,10.37 2.75,11.27 2.75,12C2.75,12.73 3.93,13.63 6.03,14.26C6.28,13.5 6.58,12.75 6.92,12M15.92,14.26C15.82,14.43 15.72,14.6 15.62,14.77C15.93,14.72 16.23,14.67 16.5,14.61C16.43,14.33 16.32,14.04 16.21,13.75L15.92,14.26M13.03,18.3C14.62,19.8 16,20.38 16.62,20C17.26,19.65 17.45,18.18 16.94,16.04C16.17,16.2 15.36,16.32 14.54,16.4C14.06,17.07 13.55,17.71 13.03,18.3M8.08,9.74C8.18,9.57 8.28,9.4 8.38,9.23C8.07,9.28 7.77,9.33 7.5,9.39C7.57,9.67 7.68,9.96 7.79,10.25L8.08,9.74M10.97,5.7C9.38,4.2 8,3.62 7.37,4C6.74,4.35 6.55,5.82 7.06,7.96C7.83,7.8 8.64,7.68 9.46,7.6C9.94,6.93 10.45,6.29 10.97,5.7Z" /></svg>',
        tooltip: "Custom Component",
        className: "gs-utl-mt-auto",
        layout: {
            id: "customLayout",
            layout: {type: "custom", component: () => u.jsx("div", {children: "Custom Reat component"})},
            header: {label: "Custom"},
            style: {marginLeft: 40}
        }
    });
    const QD = {
        type: "row",
        style: {height: "100%"},
        children: [{type: "sidebarLeft"}, {type: "canvasSidebarTop"}, {type: "sidebarRight"}]
    };

    class eI {
        constructor(t, n) {
            this.projectType = Xe.web, this.editor = void 0, this.sdkProps = {}, this.sdkLicenseError = "", this.licenseCheckRetry = 0, this.showPoweredBy = !1, this.isInPreview = !1, this.isCssPanelActive = !1, this.isLeftSidebarOpen = !0, this.isRightSidebarOpen = !0, this.isTopSidebarOpen = !0, this.isBottomSidebarOpen = !0, this.isSelectingTarget = !1, this.leftSidebarSize = 240, this.rightSidebarSize = 240, this.transitionTime = 152, this.topBarSize = 36, this.isDev = !1, this.isStage = !1, this.editorKey = 0, this.appInstalled = !1, this.licenseKey = "", this.licenseCheckStarted = !1, this.GrapesJsVersion = "0.9.44", this.projectDataCustom = {}, this.displayMode = "browser", this.projectPlugins = [], this.queryParams = {}, this.isCanvasPanning = !1, this.selectedDesignerTab = "style", this.customAssets = void 0, this.nextProjectData = void 0, this.isDraggingAbsolute = !1, this.isSaving = !1, this.isReady = !1, this.sdkPagesConfigUpdates = 0, this.panelPageSettings = {
                isOpen: !1,
                width: 300,
                page: void 0
            }, this.rootElWidth = 0, this._projectId = "", this.store = t, n && Object.keys(n).forEach(o => {
                const i = o, l = n[i];
                l !== void 0 && (this[i] = l)
            });
            const r = Io() ? window.location.search : "";
            this.queryParams = Mk(r), Bn(this, {sdkProps: !1}, {autoBind: !0})
        }

        get baseApiUrl() {
            const {isDev: t, isStage: n} = this;
            return Ek({isDev: t, isStage: n})
        }

        get projectId() {
            var r, o;
            const {project: t, storage: n} = this.sdkOptions;
            return this._projectId || ((o = (r = (n == null ? void 0 : n.project) || (t == null ? void 0 : t.default)) == null ? void 0 : r.custom) == null ? void 0 : o.id) || ""
        }

        get projectIdToLoad() {
            return this.store.localSettingsStore.lastProjectId || this.projectId
        }

        get currentProjectId() {
            return this.projectDataCustom.id || this.projectId
        }

        get isBrowserMode() {
            return this.displayMode === "browser"
        }

        get sdkOptions() {
            return this.sdkProps.options
        }

        get sdkProjectId() {
            var t, n;
            return (n = (t = this.sdkOptions.project) == null ? void 0 : t.id) == null ? void 0 : n.toString()
        }

        get sdkIdentityId() {
            var t, n;
            return (n = (t = this.sdkOptions.identity) == null ? void 0 : t.id) == null ? void 0 : n.toString()
        }

        get sdkPagesConfig() {
            return this.sdkPagesConfigUpdates, this.sdkOptions.pages
        }

        get sdkLayoutConfig() {
            return this.sdkOptions.layout
        }

        get sdkComponentsConfig() {
            return this.sdkOptions.components
        }

        get currentLayout() {
            const {sdkLayoutConfig: t, rootElWidth: n, store: r} = this, {customConfig: o} = r.layoutStore,
                i = (o == null ? void 0 : o.responsive) || (t == null ? void 0 : t.responsive);
            let l = (o == null ? void 0 : o.default) || (t == null ? void 0 : t.default) || QD;
            if (n && i) {
                const d = Object.keys(i).map(Number).sort((p, g) => p - g).find(p => n <= p);
                l = d ? i[d] : l
            }
            return l
        }

        get sdkCustomIcons() {
            var t;
            return (t = this.sdkOptions.customTheme) == null ? void 0 : t.icons
        }

        get isProjectTypeEmail() {
            return this.projectType === Xe.email
        }

        get showPages() {
            return this.isReady && this.sdkPagesConfig !== !1 && !this.isProjectTypeEmail
        }

        get showSelectors() {
            return !this.isProjectTypeEmail
        }

        get sdkMisconfigurationError() {
            if (this.store.assetsStore.isUsingAssetCloud || this.isUsingProjectCloud) {
                const n = this.sdkProjectId, r = this.sdkIdentityId;
                if (!n || !r) return 'SDK Misconfiguration Error: When using assets.storageType == "cloud" or storage.type === "cloud", project.id and identity.id are required.'
            }
            return ""
        }

        get isUsingProjectSelfHosted() {
            var t;
            return ((t = this.sdkOptions.storage) == null ? void 0 : t.type) === Zd.self
        }

        get isUsingProjectCloud() {
            var t;
            return ((t = this.sdkOptions.storage) == null ? void 0 : t.type) === Zd.cloud
        }

        get publicStateTheme() {
            const {theme: t, resolvedTheme: n} = this.store.localSettingsStore;
            return {theme: t, resolvedTheme: n}
        }

        setPublicStateTheme(t) {
            t.theme !== void 0 && (this.store.localSettingsStore.theme = t.theme)
        }

        * init() {
            var m, v;
            const {store: t, sdkOptions: n} = this, {lastProjectId: r, lastProjectType: o} = t.localSettingsStore,
                i = (m = n.project) == null ? void 0 : m.default, {project: l} = n.storage || {};
            let c, d;
            o && (this.store.templatesStore._projectTypeFilter = o), r && (c = (v = (yield Jw(o)).find(x => x.id === r)) == null ? void 0 : v.data), c ? d = c : l ? d = l : i && (d = i);
            const p = (d == null ? void 0 : d.custom) || {}, g = p.projectType;
            g && (this.projectType = g), p.projectType = this.projectType, this.setProjectDataCustom({
                ...p,
                id: this.projectIdToLoad
            }), yield t.pluginStore.initProjectPlugins(this.projectType), this.editorKey++
        }

        setInstallEvent(t) {
            this.installEvent = t
        }

        setAppInstalled(t) {
            this.appInstalled = t
        }

        setDisplayMode(t) {
            this.displayMode = t
        }

        setProject(t) {
            const n = this.editor, {id: r, data: o, isTemplate: i} = t, l = n.Storage.getConfig().options.local,
                c = i ? `${r}__${Ak()}` : r;
            this._projectId = c, l.key = c, Lk(o) || this.loadProjectData({
                ...o,
                custom: {...o.custom, id: c, projectType: this.store.templatesStore.projectTypeFilter}
            })
        }

        setProjectDataCustom(t) {
            const n = {...this.projectDataCustom, ...t};
            this.projectDataCustom = n, this.projectType = n.projectType || Xe.web, this.editor && a6(this.editor, n), n.id && this.store.localSettingsStore.setLocalState({
                lastProjectId: n.id,
                lastProjectType: this.projectType
            })
        }

        loadProjectData(t) {
            const n = t.custom || {};
            if (tI(t) !== this.projectType) this.setNextProjectData(t), this.setProjectDataCustom(n), this.updateStudio(); else {
                const r = this.editor;
                r.loadProjectData(t), r.UndoManager.clear(), this.setProjectDataCustom(n)
            }
        }

        setNextProjectData(t) {
            this.nextProjectData = t
        }

        setLeftSidebarSize(t) {
            this.leftSidebarSize = t
        }

        setRightSidebarSize(t) {
            this.rightSidebarSize = t
        }

        setEditor(t) {
            this.editor = t
        }

        setPreview(t) {
            this.isInPreview = t
        }

        toggleCssPanel() {
            this.isCssPanelActive = !this.isCssPanelActive
        }

        toggleLeftSidebar() {
            this.isLeftSidebarOpen = !this.isLeftSidebarOpen, this.refreshEditorPostTransition()
        }

        setLeftSidebarOpen(t) {
            this.isLeftSidebarOpen = t, this.refreshEditorPostTransition()
        }

        toggleRightSidebar() {
            this.isRightSidebarOpen = !this.isRightSidebarOpen, this.refreshEditorPostTransition()
        }

        setRightSidebarOpen(t) {
            this.isRightSidebarOpen = t, this.refreshEditorPostTransition()
        }

        setTopSidebarOpen(t) {
            this.isTopSidebarOpen = t, this.refreshEditorPostTransition()
        }

        setBottomSidebarOpen(t) {
            this.isBottomSidebarOpen = t, this.refreshEditorPostTransition()
        }

        refreshEditorPostTransition() {
            setTimeout(() => {
                var t;
                return (t = this.editor) == null ? void 0 : t.refresh()
            }, this.transitionTime)
        }

        setCanvasPanning(t) {
            this.isCanvasPanning = t
        }

        setSelectingTarget(t) {
            this.isSelectingTarget = t
        }

        setSelectedDesignerTab(t) {
            this.selectedDesignerTab = t
        }

        setCustomAssets(t) {
            this.customAssets = t
        }

        setIsDraggingAbsolute(t) {
            this.isDraggingAbsolute = t
        }

        setIsSaving(t) {
            this.isSaving = t
        }

        setIsReady(t) {
            this.isReady = t
        }

        setPanelPageSettings(t) {
            this.panelPageSettings = {...this.panelPageSettings, ...t}
        }

        setSdkPagesConfig(t) {
            this.sdkProps.options.pages = t && {...this.sdkPagesConfig, ...t}, ++this.sdkPagesConfigUpdates
        }

        setRootElWidth(t) {
            this.rootElWidth = t, this.refreshEditorCanvas()
        }

        * updateStudio() {
            const {pluginStore: t} = this.store, {projectType: n} = this.projectDataCustom;
            yield t.initProjectPlugins(n), this.editorKey++
        }

        refreshStudio() {
            var t;
            this.editorKey && (this.setNextProjectData((t = this.editor) == null ? void 0 : t.getProjectData()), this.store.layoutStore.clear(), this.editorKey++)
        }

        refreshEditorCanvas() {
            var t;
            (t = this.editor) == null || t.refresh({tools: !0})
        }
    }

    const tI = e => {
        var t;
        return ((t = e.custom) == null ? void 0 : t.projectType) || Xe.web
    }, nI = e => {
        nb(() => e.currentLayout, () => e.refreshStudio())
    }, Ae = () => On().appEditorStore, rI = () => {
        try {
            return Ae()
        } catch {
        }
    }, iu = () => $f().appEditorStore, oI = () => {
        try {
            return $f().appEditorStore
        } catch {
        }
    }, If = () => {
        const [e, t] = y.useState(0), n = On().appEditorStore, {transitionTime: r} = n;
        return y.useEffect(() => {
            setTimeout(() => t(o => ++o), r)
        }, [r]), [e]
    }, sI = {
        light: {
            colors: {
                global: {
                    background1: "rgba(244, 244, 244, 1)",
                    background2: "rgba(253, 253, 253, 1)",
                    background3: "rgba(255, 255, 255, 1)",
                    backgroundHover: "rgba(244, 244, 244, 1)",
                    text: "rgba(24, 24, 24, 1)",
                    border: "rgba(210, 210, 210, 1)",
                    focus: "rgba(195, 180, 253, 80%)",
                    placeholder: "rgba(163, 163, 163, 1)"
                },
                primary: {
                    background1: "rgba(137.09, 90.27, 246.33, 1)",
                    background3: "rgba(242.25, 239.7, 255, 1)",
                    backgroundHover: "rgba(89.86, 33.2, 181, 1)",
                    text: "rgba(255, 255, 255, 1)"
                },
                component: {
                    background1: "rgba(31.87, 127.5, 223.12, 1)",
                    background2: "rgba(121.12, 178.5, 235.87, 1)",
                    background3: "rgba(210.37, 229.5, 248.62, 1)",
                    text: "rgba(255, 255, 255, 1)"
                },
                selector: {
                    background1: "rgba(129.28, 23.71, 65.94, 1)",
                    background2: "rgba(250.92, 208.08, 225.22, 1)",
                    text: "rgba(255, 255, 255, 1)"
                },
                symbol: {
                    background1: "rgba(137.09, 90.27, 246.33, 1)",
                    background2: "rgba(221.68, 215.22, 253.98, 1)",
                    background3: "rgba(242.25, 239.7, 255, 1)",
                    text: "rgba(255, 255, 255, 1)"
                }
            }
        },
        dark: {
            colors: {
                global: {
                    background1: "rgba(63, 63, 63, 1)",
                    background2: "rgba(39, 39, 39, 1)",
                    background3: "rgba(24, 24, 24, 1)",
                    backgroundHover: "rgba(55, 55, 55, 1)",
                    text: "rgba(163, 163, 163, 1)",
                    border: "rgba(63, 63, 63, 1)",
                    focus: "rgba(194.95, 180.41, 253.09, 0.8)",
                    placeholder: "rgba(163, 163, 163, 1)"
                },
                primary: {
                    background1: "rgba(137.09, 90.27, 246.33, 1)",
                    background3: "rgba(39, 39, 39, 1)",
                    backgroundHover: "rgba(89.86, 33.2, 181, 1)",
                    text: "rgba(255, 255, 255, 1)"
                },
                component: {
                    background1: "rgba(50.06, 135.15, 220.24, 1)",
                    background2: "rgba(6.89, 87.44, 130.82, 1)",
                    background3: "rgba(31.21, 41.33, 55.49, 1)",
                    text: "rgba(255, 255, 255, 1)"
                },
                selector: {
                    background1: "rgba(129.28, 23.71, 65.94, 1)",
                    background2: "rgba(250.92, 208.08, 225.22, 1)",
                    text: "rgba(255, 255, 255, 1)"
                },
                symbol: {
                    background1: "rgba(137.09, 90.27, 246.33, 1)",
                    background2: "rgba(89.86, 33.2, 181, 1)",
                    background3: "rgba(44.61, 27.03, 74.97, 1)",
                    text: "rgba(255, 255, 255, 1)"
                }
            }
        }
    }, mj = String.raw, gt = (e, t) => {
        if (t == null) return "";
        const n = e[0], r = e[1];
        return `${n}${t}${r}`
    }, iI = (e, t = "") => {
        var n, r, o, i, l, c, d, p, g, m, v, b, x, w, j, C, _, E, k, T, O, A, $, F, N, z, V, X, Z, R, B, Q, H, I, D, M,
            W, ce, ne, ue, me, ae, ie, de, je, he, Ie, He, yt, kt, Bt, Ct, pt, Sn, wt, Dt, rn, Ut, Tt, st, Lt, qt, jn,
            Kn, lr, cr;
        return mj`
  ${t}.${ut.txt} {
    ${gt`color: ${(r = (n = e.colors) == null ? void 0 : n.global) == null ? void 0 : r.text};`}
  }

  ${t}.${ut.bg} {
    ${gt`background-color: ${(i = (o = e.colors) == null ? void 0 : o.global) == null ? void 0 : i.background3};`}
  }

  ${t}.${ut.br} {
    ${gt`border-color: ${(c = (l = e.colors) == null ? void 0 : l.global) == null ? void 0 : c.border};`}
  }

  ${t}.${ut.bgA} {
    ${gt`background-color: ${(p = (d = e.colors) == null ? void 0 : d.primary) == null ? void 0 : p.background1};`}
    ${gt`color: ${(m = (g = e.colors) == null ? void 0 : g.primary) == null ? void 0 : m.text};`}
  }

  ${t}.${ut.bgA2} {
    ${gt`background-color: ${(b = (v = e.colors) == null ? void 0 : v.primary) == null ? void 0 : b.background1};`}
    ${gt`color: ${(w = (x = e.colors) == null ? void 0 : x.primary) == null ? void 0 : w.text};`}
  }

  ${t}.${ut.hBgAct}:hover.${ut.hBgAct}:hover,
  ${t}.${ut.hBgA2}:hover.${ut.hBgA2}:hover {
    ${gt`background-color: ${(C = (j = e.colors) == null ? void 0 : j.primary) == null ? void 0 : C.backgroundHover};`}
  }

  ${t}.${ut.tA} {
    ${gt`color: ${(E = (_ = e.colors) == null ? void 0 : _.primary) == null ? void 0 : E.background1};`}
  }

  ${t}.${ut.tAo} {
    ${gt`color: ${(T = (k = e.colors) == null ? void 0 : k.primary) == null ? void 0 : T.background1};`}
  }

  ${t}.${ut.hTAo}:hover.${ut.hTAo}:hover,
  ${t}.group:hover .${ut.grouphTAo} {
    ${gt`color: ${(A = (O = e.colors) == null ? void 0 : O.primary) == null ? void 0 : A.backgroundHover};`}
  }

  ${t}.${ut.bA} {
    ${gt`border-color: ${(F = ($ = e.colors) == null ? void 0 : $.primary) == null ? void 0 : F.background1};`}
  }

  ${t}.${ut.bg0} {
    ${gt`background-color: ${(z = (N = e.colors) == null ? void 0 : N.primary) == null ? void 0 : z.background3};`}
    ${gt`color: ${(X = (V = e.colors) == null ? void 0 : V.primary) == null ? void 0 : X.background1};`}
  }

  ${t}.${ut.bgH} {
    ${gt`background-color: ${(R = (Z = e.colors) == null ? void 0 : Z.global) == null ? void 0 : R.background1};`}
  }

  ${t}.${ut.bgH2} {
    ${gt`background-color: ${(Q = (B = e.colors) == null ? void 0 : B.global) == null ? void 0 : Q.background2};`}
  }

  ${t}.${ut.hBgH}:hover,
  ${t}.${ut.hBgH2}:hover {
    ${gt`background-color: ${(I = (H = e.colors) == null ? void 0 : H.global) == null ? void 0 : I.backgroundHover};`}
  }

  ${t}.${ut.sel} {
    ${gt`background-color: ${(M = (D = e.colors) == null ? void 0 : D.selector) == null ? void 0 : M.background2};`}
    ${gt`color: ${(ce = (W = e.colors) == null ? void 0 : W.selector) == null ? void 0 : ce.text};`}
  }

  ${t}.${ut.selBr} {
    ${gt`border-color: ${(ue = (ne = e.colors) == null ? void 0 : ne.selector) == null ? void 0 : ue.background1};`}
  }

  ${t}.${ut.cmp} {
    ${gt`background-color: ${(ae = (me = e.colors) == null ? void 0 : me.component) == null ? void 0 : ae.background1};`}
    ${gt`color: ${(de = (ie = e.colors) == null ? void 0 : ie.component) == null ? void 0 : de.text};`}
  }

  ${t}.${ut.cmpBgSoft} {
    ${gt`background-color: ${(he = (je = e.colors) == null ? void 0 : je.component) == null ? void 0 : he.background2};`}
  }

  ${t}.${ut.cmpBgSoftX} {
    ${gt`background-color: ${(He = (Ie = e.colors) == null ? void 0 : Ie.component) == null ? void 0 : He.background3};`}
  }

  ${t}.${ut.cmpBr} {
    ${gt`border-color: ${(kt = (yt = e.colors) == null ? void 0 : yt.component) == null ? void 0 : kt.background1};`}
  }

  ${t}.${ut.cmpSymbol} {
    ${gt`background-color: ${(Ct = (Bt = e.colors) == null ? void 0 : Bt.symbol) == null ? void 0 : Ct.background1};`}
    ${gt`color: ${(Sn = (pt = e.colors) == null ? void 0 : pt.symbol) == null ? void 0 : Sn.text};`}
  }

  ${t}.${ut.cmpBgSymbolSoft} {
    ${gt`background-color: ${(Dt = (wt = e.colors) == null ? void 0 : wt.symbol) == null ? void 0 : Dt.background2};`}
  }

  ${t}.${ut.cmpBgSymbolSoftX} {
    ${gt`background-color: ${(Ut = (rn = e.colors) == null ? void 0 : rn.symbol) == null ? void 0 : Ut.background3};`}
  }

  ${t}.${ut.cmpSymbolBr} {
    ${gt`border-color: ${(st = (Tt = e.colors) == null ? void 0 : Tt.symbol) == null ? void 0 : st.background1};`}
  }

  ${t}.${ut.cmpTxtActive} {
    ${gt`color: ${(qt = (Lt = e.colors) == null ? void 0 : Lt.component) == null ? void 0 : qt.text};`}
  }

  ${t}.${ut.focus}:focus-visible {
    ${gt`box-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) ${(Kn = (jn = e.colors) == null ? void 0 : jn.global) == null ? void 0 : Kn.focus};`}
  }

  ${t}.${ut.inputText}::placeholder {
    ${gt`color: ${(cr = (lr = e.colors) == null ? void 0 : lr.global) == null ? void 0 : cr.placeholder};`}
  }
`
    }, aI = e => {
        var l, c, d, p, g;
        const t = (l = e.colors) == null ? void 0 : l.global, n = (c = e.colors) == null ? void 0 : c.primary,
            r = (d = e.colors) == null ? void 0 : d.component, o = (p = e.colors) == null ? void 0 : p.symbol,
            i = (g = e.colors) == null ? void 0 : g.selector;
        return `
  :root {
    --gs-theme-cl-glb-bg1: ${t == null ? void 0 : t.background1};
    --gs-theme-cl-glb-bg2: ${t == null ? void 0 : t.background2};
    --gs-theme-cl-glb-bg3: ${t == null ? void 0 : t.background3};
    --gs-theme-cl-glb-bgh: ${t == null ? void 0 : t.backgroundHover};
    --gs-theme-cl-glb-br: ${t == null ? void 0 : t.border};
    --gs-theme-cl-glb-fcs: ${t == null ? void 0 : t.focus};
    --gs-theme-cl-glb-plh: ${t == null ? void 0 : t.placeholder};
    --gs-theme-cl-glb-txt: ${t == null ? void 0 : t.text};
    --gs-theme-cl-prm-bg1: ${n == null ? void 0 : n.background1};
    --gs-theme-cl-prm-bg2: ${n == null ? void 0 : n.background2};
    --gs-theme-cl-prm-bg3: ${n == null ? void 0 : n.background3};
    --gs-theme-cl-prm-bgh: ${n == null ? void 0 : n.backgroundHover};
    --gs-theme-cl-prm-txt: ${n == null ? void 0 : n.text};
    --gs-theme-cl-cmp-bg1: ${r == null ? void 0 : r.background1};
    --gs-theme-cl-cmp-bg2: ${r == null ? void 0 : r.background2};
    --gs-theme-cl-cmp-bg3: ${r == null ? void 0 : r.background3};
    --gs-theme-cl-cmp-bgh: ${r == null ? void 0 : r.backgroundHover};
    --gs-theme-cl-cmp-txt: ${r == null ? void 0 : r.text};
    --gs-theme-cl-symb-bg1: ${o == null ? void 0 : o.background1};
    --gs-theme-cl-symb-bg2: ${o == null ? void 0 : o.background2};
    --gs-theme-cl-symb-bg3: ${o == null ? void 0 : o.background3};
    --gs-theme-cl-symb-bgh: ${o == null ? void 0 : o.backgroundHover};
    --gs-theme-cl-symb-txt: ${o == null ? void 0 : o.text};
    --gs-theme-cl-sel-bg1: ${i == null ? void 0 : i.background1};
    --gs-theme-cl-sel-bg2: ${i == null ? void 0 : i.background2};
    --gs-theme-cl-sel-bg3: ${i == null ? void 0 : i.background3};
    --gs-theme-cl-sel-bgh: ${i == null ? void 0 : i.backgroundHover};
    --gs-theme-cl-sel-txt: ${i == null ? void 0 : i.text};
  }
`
    }, lI = xe(() => {
        const {
                sdkOptions: e,
                publicStateTheme: t
            } = Ae(), [n, r] = y.useState(""), {customTheme: o} = e, {resolvedTheme: i} = t, l = e.theme === Gr.light,
            c = o == null ? void 0 : o.default, d = y.useMemo(() => {
                const m = sI[i], v = ic(ic({}, m || {}), c || {});
                return aI(v).trim()
            }, [i]), p = mj`
    ${c ? iI(c, l ? `:not(.gs-utl-${Gr.dark}) ` : `.gs-utl-${Gr.dark} `) : ""}
  `.trim(), g = `
    ${d}
    ${p}
  `.trim();
        return y.useEffect(() => {
            r(g)
        }, [g]), u.jsx("style", {"data-gs-editor-theme": !0, children: n})
    }), cI = xe(function () {
        const t = ym(), {isOpen: n, items: r, coordinates: o} = t, {x: i, y: l} = o;
        return y.useEffect(() => {
            const c = window.document, d = p => p.key === "Escape" && t.hide();
            return c.addEventListener("keydown", d), () => {
                c.removeEventListener("keydown", d)
            }
        }, []), u.jsxs(u.Fragment, {
            children: [u.jsx(kw, {
                open: n,
                items: r,
                x: i,
                y: l
            }), n && u.jsx("div", {onClick: t.hide, className: pe("z-10 fixed inset-0")})]
        })
    });

    function dn({children: e, label: t, s: n = "m", pill: r, border: o, nopad: i, className: l, block: c, ...d}) {
        return u.jsx("div", {
            className: U(!c && "gs-utl-inline-block", l, !i && et.xyS2, r ? ye.pill : ye.rnd, o && `${ye.b} ${te.br}`, n === "s" && "gs-utl-text-sm", n === "xs" && "gs-utl-p-1"), ...d,
            children: t || e
        })
    }

    const vj = 15, uI = xe(function () {
        const {isActive: t, content: n} = qw(), [r, o] = y.useState({x: 0, y: 0});
        y.useEffect(() => {
            const l = c => {
                o({x: c.clientX, y: Math.max(0, c.clientY)})
            };
            return t && window.addEventListener("pointermove", l), () => {
                window.removeEventListener("pointermove", l)
            }
        }, [t]);
        const i = y.useMemo(() => ({transform: `translate(${r.x + vj}px, ${r.y + vj}px)`}), [r]);
        return u.jsx(zo, {
            show: t, ...ac,
            children: u.jsx("div", {
                className: pe("fixed top-0 left-0 pointer-badge pointer-events-none z-10"),
                style: i,
                children: u.jsx(dn, {
                    className: pe("gjs-px-4 gjs-py-2", te.bgBlur, te.txtHighEmphasis),
                    pill: !0,
                    border: !0,
                    nopad: !0,
                    children: n
                })
            })
        })
    }), dI = xe(function () {
        const t = eS();
        return u.jsx(zN, {className: se("fixed top-5 right-5 z-20"), toasts: t.toasts, onDismiss: t.remove})
    }), U1 = typeof window < "u" ? window.location.hostname : "";
    U1 || U1 === "[::1]" || U1.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/);

    function fI(e) {
        if ("serviceWorker" in navigator) {
            if (new URL({
                NODE_ENV: "production",
                NPM_PACKAGE_VERSION: "1.0.0",
                STUDIO_NPM_PACKAGE_VERSION: "1.0.55"
            }.PUBLIC_URL || "", window.location.href).origin !== window.location.origin) return;
            window.addEventListener("beforeinstallprompt", o => {
                o.preventDefault(), iu().setInstallEvent(o)
            }), window.addEventListener("appinstalled", () => {
                iu().setAppInstalled(!0)
            }), navigator.serviceWorker.addEventListener("controllerchange", () => {
            });
            const n = o => {
                let i = "browser";
                const l = navigator.standalone || document.referrer.startsWith("android-app://");
                (o || l) && (i = "standalone"), iu().setDisplayMode(i)
            }, r = window.matchMedia("(display-mode: standalone)");
            r.addEventListener("change", o => n(o.matches)), n(r.matches)
        }
    }

    const pI = y.forwardRef(function ({children: t}, n) {
        const [r, o] = y.useState(""), i = sr(), l = y.useRef(null), c = Ae(), {
            style: d,
            className: p,
            options: g = Ov,
            onUpdate: m,
            onEditor: v,
            onReady: b,
            ...x
        } = c.sdkProps, {autoHeight: w = !0, serviceWorker: j} = g;
        y.useImperativeHandle(n, () => l.current, []);
        const C = y.useMemo(() => ({...d, height: r || (d == null ? void 0 : d.height) || ""}), [d, r]);
        return y.useEffect(() => {
            const _ = l.current, E = () => {
                var O;
                return (O = _ == null ? void 0 : _.parentElement) == null ? void 0 : O.offsetHeight
            }, k = E(), T = () => {
                const O = _.style.position;
                _.style.position = "absolute";
                const A = E();
                A && o(`${A}px`), _.style.position = O
            };
            if (k && w) return o(`${k}px`), window.addEventListener("resize", T), () => window.removeEventListener("resize", T)
        }, [w, l.current]), y.useEffect(() => {
            const _ = l.current;
            if (!_) return;
            i.rootEl || i.setRootEl(_), i.init();
            const E = new ResizeObserver(() => {
                c.setRootElWidth(_.offsetWidth)
            });
            return c.setRootElWidth(_.offsetWidth), E.observe(_), () => {
                E.disconnect()
            }
        }, [l.current]), y.useEffect(() => {
            j && fI()
        }, []), u.jsxs("div", {
            ref: l,
            className: U(pe(Tb, "gs-studio-editor overflow-hidden h-full w-full text-base"), p),
            style: C, ...x,
            children: [u.jsx(lI, {}), t, u.jsxs("div", {
                className: pe("gs-studio-els", te.txt),
                children: [u.jsx(dI, {}), u.jsx(uI, {}), u.jsx(cI, {})]
            })]
        })
    });
    var au = (e => (e.REGULAR = "regular", e.SYMBOLS = "symbols", e))(au || {});
    const Vf = "gs-cmp-tabs";

    function _s({
                    tabs: e,
                    className: t,
                    classNamePanel: n,
                    classNameTab: r,
                    variant: o,
                    style: i,
                    onChange: l = kk,
                    value: c
                }) {
        const d = o === "pills",
            p = d ? U("gs-utl-rounded-full gs-utl-text-sm gs-utl-px-[2px] gs-utl-py-[2px]", te.bgH) : "",
            g = w => d ? U("gs-utl-rounded-full gs-utl-px-3 gs-utl-py-1", w ? te.bg : "") : U("gs-utl-border-b-2", et.xy),
            m = w => {
                w && (w.tabIndex = -1)
            }, v = w => {
                const j = w.currentTarget;
                setTimeout(() => j.blur(), 10)
            }, b = kn(c) ? e.findIndex(w => w.id === c) : void 0, x = !e.some(w => !!w.content);
        return u.jsxs(wc.Group, {
            onChange: w => l(e[w].id),
            defaultIndex: e.findIndex(w => w.id === c),
            selectedIndex: b,
            children: [u.jsx(wc.List, {
                as: K,
                className: U(Vf, t, p),
                style: i,
                full: !0,
                nowrap: !0,
                children: e.map(w => u.jsx(wc, {
                    disabled: w.disabled,
                    className: ({selected: j}) => U(`${Vf}__tab`, "gs-utl-flex-1 focus:gs-utl-outline-none", w.disabled && "gs-utl-cursor-not-allowed gs-utl-opacity-50", lc.focus, g(j), j ? `${te.tAo} ${te.bA}` : te.br, r),
                    children: w.label
                }, w.id))
            }), u.jsx(wc.Panels, {
                className: U(`${Vf}__panels`, "gs-utl-overflow-hidden gs-utl-flex-1", x && "gs-utl-hidden", n),
                children: e.map(w => u.jsx(wc.Panel, {
                    tabIndex: -1,
                    className: U(`${Vf}__panel`, "gs-utl-h-full"),
                    ref: m,
                    onFocus: v,
                    children: w.content
                }, w.id))
            })]
        })
    }

    const gI = "gs-cmp-button-group-field", hI = y.memo(xe(function ({
                                                                         className: t,
                                                                         label: n,
                                                                         name: r,
                                                                         value: o,
                                                                         options: i,
                                                                         size: l,
                                                                         required: c,
                                                                         disabled: d,
                                                                         onChange: p,
                                                                         editorEvents: g
                                                                     }) {
        const {editor: m} = Ae(), [v, b] = y.useState(() => ({
            className: t,
            label: n,
            name: r,
            value: o,
            options: i,
            size: l,
            required: c,
            disabled: d
        })), x = w => {
            p({value: w, editor: m, state: v, setState: j => b(C => ({...C, ...j}))})
        };
        return ml({
            editor: m,
            editorEvents: g,
            localState: v,
            setLocalState: b
        }), u.jsx(Wn, {
            className: U(gI, v.className),
            label: v.label,
            name: v.name,
            value: v.value,
            options: v.options ?? [],
            size: v.size,
            required: v.required,
            disabled: v.disabled,
            onChange: x
        })
    }));

    function Hf({colors: e, ...t}) {
        return e ? u.jsxs("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            fill: "none",
            viewBox: "0 0 79 79", ...t,
            children: [u.jsx("path", {
                fill: "url(#a)",
                d: "M39.6 77.1a37.5 37.5 0 1 0 0-75 37.5 37.5 0 0 0 0 75Z"
            }), u.jsx("path", {
                stroke: "#fff",
                strokeLinecap: "round",
                strokeMiterlimit: "10",
                strokeWidth: "5",
                d: "m40 19-14.58 8.79a6.36 6.36 0 0 0-2.82 5.33v14.13a6.14 6.14 0 0 0 3.12 5.13l11.21 5.8a6.12 6.12 0 0 0 6.14 0l11.41-6.3a6.09 6.09 0 0 0 3.12-5.13V33.12c0-1.28-1.4-2.07-2.52-1.48l-15.08 8"
            }), u.jsx("defs", {
                children: u.jsxs("linearGradient", {
                    id: "a",
                    x1: "2.1",
                    x2: "77.2",
                    y1: "39.6",
                    y2: "39.6",
                    gradientUnits: "userSpaceOnUse",
                    children: [u.jsx("stop", {stopColor: "#D7709E"}), u.jsx("stop", {
                        offset: "1",
                        stopColor: "#A84A87"
                    })]
                })
            })]
        }) : u.jsx("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            fill: "none",
            viewBox: "0 0 76 76", ...t,
            children: u.jsx("path", {
                fill: "currentColor",
                fillRule: "evenodd",
                d: "M64.117 64.117a37.5 37.5 0 1 1-53.034-53.034 37.5 37.5 0 0 1 53.034 53.034ZM39.29 19.14a2.5 2.5 0 1 0-2.582-4.282l-14.583 8.79-.05.03-.047.032a8.861 8.861 0 0 0-2.917 3.229 8.729 8.729 0 0 0-1.011 4.203V45.293l.002.047a8.64 8.64 0 0 0 1.25 4.164 8.78 8.78 0 0 0 3.115 3.043l.05.03.053.027 11.165 5.769a8.62 8.62 0 0 0 4.264 1.127c1.507 0 2.99-.394 4.295-1.145l11.394-6.276.006-.004a8.585 8.585 0 0 0 3.178-3.05 8.443 8.443 0 0 0 1.227-4.225V31.123c0-3.265-3.502-5.122-6.19-3.688l-.005.003-15.076 7.995a2.5 2.5 0 0 0 2.342 4.418l13.93-7.387v12.263a3.444 3.444 0 0 1-.502 1.703 3.584 3.584 0 0 1-1.326 1.271l-.003.002-11.409 6.284-.024.014-.023.013a3.619 3.619 0 0 1-1.814.486 3.62 3.62 0 0 1-1.814-.486l-.052-.03-.054-.028-11.155-5.764a3.78 3.78 0 0 1-1.297-1.283 3.642 3.642 0 0 1-.527-1.715V31.081a3.73 3.73 0 0 1 .432-1.806 3.858 3.858 0 0 1 1.23-1.377L39.29 19.14Z",
                clipRule: "evenodd"
            })
        })
    }

    const mI = y.memo(xe(function () {
            const {isStage: e, updateStudio: t} = Ae(), {isDarkTheme: n} = sr(), r = y.useRef(null), {
                bg: o,
                text: i
            } = ex(n);
            return bw({
                ref: r,
                show: e,
                update: n,
                reload: t,
                styles: {
                    display: "flex",
                    justifyContent: "center",
                    position: "absolute",
                    bottom: "0",
                    right: "0",
                    left: "0"
                },
                node: u.jsxs(u.Fragment, {
                    children: [u.jsx("style", {
                        children: `
              .gs-banner {
                  box-shadow: 0 0 5px #1c1b1b21;
                  padding: 30px 10px;
                  border-radius: 10px;
                  margin: 5px;
                  font-size: 30px;
                  background-color: ${o};
                  color: ${i};
                  width: 95%;
              }
              .gs-banner-row {
                  justify-content: center;
                  align-items: center;
                  display: flex;
                  gap: 10px;
              }
              .gs-gs-logo {
                  width: 35px;
              }
            `
                    }), u.jsx(tr, {
                        className: "gs-banner",
                        children: u.jsxs(K, {
                            className: "gs-banner-row",
                            children: [u.jsx(Hf, {
                                className: "gs-gs-logo",
                                colors: !0
                            }), u.jsx("div", {children: "GrapesJs!"})]
                        })
                    })]
                })
            }), u.jsx("div", {ref: r})
        })), vI = () => `https://grapesjs.com?ref=${window.location.host}`, yI = y.memo(xe(function () {
            const {updateStudio: e, showPoweredBy: t} = Ae(), {isDarkTheme: n} = sr(), r = y.useRef(null), {
                bg: o,
                text: i,
                link: l
            } = ex(n);
            return bw({
                ref: r,
                show: t,
                update: n,
                reload: e,
                styles: {display: "flex", justifyContent: "center", position: "absolute", bottom: "0", left: "0"},
                node: u.jsxs(u.Fragment, {
                    children: [u.jsx("style", {
                        children: `
              .gs-banner {
                  box-shadow: 0 0 5px #1c1b1b21;
                  padding: 5px 10px;
                  border-radius: 9999px;
                  margin: 5px;
                  font-size: 12px;
                  background-color: ${o};
                  color: ${i};
              }
              .gs-banner-row {
                  justify-content: center;
                  align-items: center;
                  display: flex;
                  gap: 3px;
              }
              .gs-link {
                  color: ${l};
                  text-decoration: none;
              }
              .gs-logo {
                  width: 20px;
              }
             `
                    }), u.jsx(tr, {
                        className: "gs-banner",
                        children: u.jsxs(K, {
                            className: "gs-banner-row",
                            children: [u.jsx("a", {
                                className: "gs-link",
                                href: vI(),
                                target: "_blank",
                                children: "GrapesJs"
                            }), u.jsx(Hf, {className: "gs-logo", colors: !0})]
                        })
                    })]
                })
            }), u.jsx("div", {ref: r})
        })), lu = ee.forwardRef(function ({full: t, abs: n, small: r, className: o, bg: i}, l) {
            const c = U(t && "gs-utl-w-full gs-utl-h-full", n ? nt.coverAbs : "gs-utl-relative", o),
                d = U(r ? "gs-utl-w-5 gs-utl-h-5" : "gs-utl-w-10 gs-utl-h-10", "gs-utl-animate-spin-fast", "!gs-utl-border-y-transparent !gs-utl-border-r-transparent", ye.pill, ye.bS, ye.bA);
            return u.jsxs(K, {
                ref: l,
                className: c,
                items: "center",
                justify: "center",
                children: [!!i && u.jsx("div", {className: U(nt.coverAbs, te.bg, nt.disabled)}), u.jsx("div", {className: d})]
            })
        }), yj = "gs-canvas-content", bI = y.memo(xe(function () {
            const {isReady: t} = Ae(),
                n = U(`${yj}__overlay gs-utl-pointer-events-none gs-utl-absolute gs-utl-inset-0`, te.bgH2);
            return u.jsxs(u.Fragment, {
                children: [u.jsxs("div", {
                    className: yj,
                    children: [u.jsx("div", {className: n}), !t && u.jsx(lu, {
                        className: U("gs-utl-z-10"),
                        abs: !0,
                        full: !0
                    })]
                }), u.jsx(mI, {}), u.jsx(yI, {})]
            })
        })), xI = "gs-canvas", bj = y.memo(function ({className: t, style: n, grow: r}) {
            return u.jsx(R9, {
                style: n,
                className: U(xI, "gs-utl-relative", r && "gs-utl-flex-grow", t),
                children: u.jsx(ea, {children: u.jsx(bI, {})})
            })
        }), Ff = ({
                      className: e,
                      grow: t,
                      alignItems: n,
                      justifyContent: r
                  }) => U(e, te.br, t && "gs-utl-flex-grow", n === "start" && "gs-utl-items-start", n === "end" && "gs-utl-items-end", n === "center" && "gs-utl-items-center", n === "baseline" && "gs-utl-items-baseline", n === "stretch" && "gs-utl-items-stretch", r === "start" && "gs-utl-justify-start", r === "end" && "gs-utl-justify-end", r === "center" && "gs-utl-justify-center", r === "between" && "gs-utl-justify-between", r === "around" && "gs-utl-justify-around", r === "evenly" && "gs-utl-justify-evenly"),
        zf = ({style: e, width: t, height: n, gap: r}) => ({height: n, gap: r, width: t, ...e}),
        _r = y.memo(xe(function ({
                                     id: t,
                                     children: n,
                                     className: r,
                                     style: o,
                                     width: i,
                                     gap: l,
                                     height: c,
                                     grow: d,
                                     alignItems: p,
                                     justifyContent: g,
                                     htmlAttrs: m,
                                     ...v
                                 }) {
            const {layoutsById: b} = Lm(), [x, w] = y.useState({}), {className: j, style: C, ..._} = m || {},
                E = r ?? j, k = o ?? C, T = y.useMemo(() => zf({height: c, gap: l, width: i, style: k}), [k, i, c, l]),
                O = Ff({className: E, grow: d, alignItems: p, justifyContent: g});
            y.useEffect(() => {
                if (t) return b.set(t, {state: x, setState: w}), () => {
                    b.delete(t)
                }
            }, [b, x]);
            const A = v.as ?? "div";
            return u.jsx(A, {style: T, className: O, ...v, ..._, children: x.children ?? n})
        })), W1 = (() => {
            if (typeof self > "u") return !1;
            if ("top" in self && self !== top) try {
                top.window.document._ = 0
            } catch {
                return !1
            }
            return "showOpenFilePicker" in self
        })(), wI = W1 ? Promise.resolve().then(function () {
            return _I
        }) : Promise.resolve().then(function () {
            return AI
        });

    async function SI(...e) {
        return (await wI).default(...e)
    }

    W1 ? Promise.resolve().then(function () {
        return TI
    }) : Promise.resolve().then(function () {
        return NI
    });
    const jI = W1 ? Promise.resolve().then(function () {
        return LI
    }) : Promise.resolve().then(function () {
        return DI
    });

    async function CI(...e) {
        return (await jI).default(...e)
    }

    const EI = async e => {
        const t = await e.getFile();
        return t.handle = e, t
    };
    var PI = async (e = [{}]) => {
        Array.isArray(e) || (e = [e]);
        const t = [];
        e.forEach((o, i) => {
            t[i] = {description: o.description || "Files", accept: {}}, o.mimeTypes ? o.mimeTypes.map(l => {
                t[i].accept[l] = o.extensions || []
            }) : t[i].accept["*/*"] = o.extensions || []
        });
        const n = await window.showOpenFilePicker({
            id: e[0].id,
            startIn: e[0].startIn,
            types: t,
            multiple: e[0].multiple || !1,
            excludeAcceptAllOption: e[0].excludeAcceptAllOption || !1
        }), r = await Promise.all(n.map(EI));
        return e[0].multiple ? r : r[0]
    }, _I = {__proto__: null, default: PI};

    function Bf(e) {
        function t(n) {
            if (Object(n) !== n) return Promise.reject(new TypeError(n + " is not an object."));
            var r = n.done;
            return Promise.resolve(n.value).then(function (o) {
                return {value: o, done: r}
            })
        }

        return Bf = function (n) {
            this.s = n, this.n = n.next
        }, Bf.prototype = {
            s: null, n: null, next: function () {
                return t(this.n.apply(this.s, arguments))
            }, return: function (n) {
                var r = this.s.return;
                return r === void 0 ? Promise.resolve({value: n, done: !0}) : t(r.apply(this.s, arguments))
            }, throw: function (n) {
                var r = this.s.return;
                return r === void 0 ? Promise.reject(n) : t(r.apply(this.s, arguments))
            }
        }, new Bf(e)
    }

    const xj = async (e, t, n = e.name, r) => {
        const o = [], i = [];
        var l, c = !1, d = !1;
        try {
            for (var p, g = function (m) {
                var v, b, x, w = 2;
                for (typeof Symbol < "u" && (b = Symbol.asyncIterator, x = Symbol.iterator); w--;) {
                    if (b && (v = m[b]) != null) return v.call(m);
                    if (x && (v = m[x]) != null) return new Bf(v.call(m));
                    b = "@@asyncIterator", x = "@@iterator"
                }
                throw new TypeError("Object is not async iterable")
            }(e.values()); c = !(p = await g.next()).done; c = !1) {
                const m = p.value, v = `${n}/${m.name}`;
                m.kind === "file" ? i.push(m.getFile().then(b => (b.directoryHandle = e, b.handle = m, Object.defineProperty(b, "webkitRelativePath", {
                    configurable: !0,
                    enumerable: !0,
                    get: () => v
                })))) : m.kind !== "directory" || !t || r && r(m) || o.push(xj(m, t, v, r))
            }
        } catch (m) {
            d = !0, l = m
        } finally {
            try {
                c && g.return != null && await g.return()
            } finally {
                if (d) throw l
            }
        }
        return [...(await Promise.all(o)).flat(), ...await Promise.all(i)]
    };
    var kI = async (e = {}) => {
            e.recursive = e.recursive || !1, e.mode = e.mode || "read";
            const t = await window.showDirectoryPicker({id: e.id, startIn: e.startIn, mode: e.mode});
            return (await (await t.values()).next()).done ? [t] : xj(t, e.recursive, void 0, e.skipDirectory)
        }, TI = {__proto__: null, default: kI}, OI = async (e, t = [{}], n = null, r = !1, o = null) => {
            Array.isArray(t) || (t = [t]), t[0].fileName = t[0].fileName || "Untitled";
            const i = [];
            let l = null;
            if (e instanceof Blob && e.type ? l = e.type : e.headers && e.headers.get("content-type") && (l = e.headers.get("content-type")), t.forEach((p, g) => {
                i[g] = {
                    description: p.description || "Files",
                    accept: {}
                }, p.mimeTypes ? (g === 0 && l && p.mimeTypes.push(l), p.mimeTypes.map(m => {
                    i[g].accept[m] = p.extensions || []
                })) : l ? i[g].accept[l] = p.extensions || [] : i[g].accept["*/*"] = p.extensions || []
            }), n) try {
                await n.getFile()
            } catch (p) {
                if (n = null, r) throw p
            }
            const c = n || await window.showSaveFilePicker({
                suggestedName: t[0].fileName,
                id: t[0].id,
                startIn: t[0].startIn,
                types: i,
                excludeAcceptAllOption: t[0].excludeAcceptAllOption || !1
            });
            !n && o && o(c);
            const d = await c.createWritable();
            return "stream" in e ? (await e.stream().pipeTo(d), c) : "body" in e ? (await e.body.pipeTo(d), c) : (await d.write(await e), await d.close(), c)
        }, LI = {__proto__: null, default: OI},
        MI = async (e = [{}]) => (Array.isArray(e) || (e = [e]), new Promise((t, n) => {
            const r = document.createElement("input");
            r.type = "file";
            const o = [...e.map(d => d.mimeTypes || []), ...e.map(d => d.extensions || [])].join();
            r.multiple = e[0].multiple || !1, r.accept = o || "", r.style.display = "none", document.body.append(r);
            const i = d => {
                typeof l == "function" && l(), t(d)
            }, l = e[0].legacySetup && e[0].legacySetup(i, () => l(n), r), c = () => {
                window.removeEventListener("focus", c), r.remove()
            };
            r.addEventListener("click", () => {
                window.addEventListener("focus", c)
            }), r.addEventListener("change", () => {
                window.removeEventListener("focus", c), r.remove(), i(r.multiple ? Array.from(r.files) : r.files[0])
            }), "showPicker" in HTMLInputElement.prototype ? r.showPicker() : r.click()
        })), AI = {__proto__: null, default: MI},
        RI = async (e = [{}]) => (Array.isArray(e) || (e = [e]), e[0].recursive = e[0].recursive || !1, new Promise((t, n) => {
            const r = document.createElement("input");
            r.type = "file", r.webkitdirectory = !0;
            const o = l => {
                typeof i == "function" && i(), t(l)
            }, i = e[0].legacySetup && e[0].legacySetup(o, () => i(n), r);
            r.addEventListener("change", () => {
                let l = Array.from(r.files);
                e[0].recursive ? e[0].recursive && e[0].skipDirectory && (l = l.filter(c => c.webkitRelativePath.split("/").every(d => !e[0].skipDirectory({
                    name: d,
                    kind: "directory"
                })))) : l = l.filter(c => c.webkitRelativePath.split("/").length === 2), o(l)
            }), "showPicker" in HTMLInputElement.prototype ? r.showPicker() : r.click()
        })), NI = {__proto__: null, default: RI}, $I = async (e, t = {}) => {
            Array.isArray(t) && (t = t[0]);
            const n = document.createElement("a");
            let r = e;
            "body" in e && (r = await async function (l, c) {
                const d = l.getReader(), p = new ReadableStream({
                    start: v => async function b() {
                        return d.read().then(({done: x, value: w}) => {
                            if (!x) return v.enqueue(w), b();
                            v.close()
                        })
                    }()
                }), g = new Response(p), m = await g.blob();
                return d.releaseLock(), new Blob([m], {type: c})
            }(e.body, e.headers.get("content-type"))), n.download = t.fileName || "Untitled", n.href = URL.createObjectURL(await r);
            const o = () => {
                typeof i == "function" && i()
            }, i = t.legacySetup && t.legacySetup(o, () => i(), n);
            return n.addEventListener("click", () => {
                setTimeout(() => URL.revokeObjectURL(n.href), 3e4), o()
            }), n.click(), null
        }, DI = {__proto__: null, default: $I};
    const II = {
        NODE_ENV: "production",
        NPM_PACKAGE_VERSION: "1.0.0",
        STUDIO_NPM_PACKAGE_VERSION: "1.0.55"
    }.REACT_APP_VERSION ?? "1.0.0", VI = xe(function () {
        var n;
        const t = (n = window.grapesjs) == null ? void 0 : n.version;
        return u.jsxs(K, {
            col: !0,
            space: "m",
            children: [u.jsx(K, {
                justify: "center",
                children: u.jsxs(q, {
                    className: pe("relative"),
                    children: [u.jsx(Hf, {className: pe("w-24 opacity-50")}), t && u.jsx(dn, {
                        className: pe(te.bgA, "absolute gs-utl-right-[-20px] bottom-0"),
                        label: `v${t}`,
                        s: "s",
                        pill: !0
                    })]
                })
            }), u.jsxs(q, {
                children: [u.jsxs("p", {
                    children: [u.jsx("b", {children: "GrapesJs"}), " is an innovative experimental editor, initially created to improve and extend the customization capability of the", " ", u.jsx("a", {
                        className: pe(Da.link),
                        href: "https://grapesjs.com",
                        children: "GrapesJS"
                    }), " ", "library. Beyond pushing the evolution of the core library itself, this application aspires to empower individuals in creating and managing their web projects autonomously, free from subscriptions or dependency on the internet connection."]
                }), u.jsx("br", {}), u.jsxs("p", {
                    children: ["If you like the vision of this project and you're eager to play a role in its continued development, consider becoming a backer or sponsor through", " ", u.jsx("a", {
                        className: pe(Da.link),
                        href: "https://opencollective.com/grapesjs",
                        children: "Open Collective"
                    }), "."]
                })]
            }), u.jsxs(q, {className: pe(te.txtLowEmphasis, "text-right"), children: ["GrapesJs: v", II]})]
        })
    }), HI = xe(function () {
        return u.jsxs(K, {
            col: !0,
            space: "m",
            children: [u.jsx(K, {
                justify: "center",
                children: u.jsx(q, {className: se("relative"), children: u.jsx(Hf, {className: se("w-24 opacity-50")})})
            }), u.jsx(q, {
                children: u.jsxs("p", {
                    children: ["We're excited to introduce the GrapesJs, an embeddable version of the Studio editor.", u.jsx("br", {}), u.jsx("br", {}), "The Studio SDK offers a powerful and flexible web editing experience that can be seamlessly integrated into your platform as a white-label editor. This enables your users to effortlessly create and manage content with advanced tools.", u.jsx("br", {}), u.jsx("br", {}), "You can try the initial release of the Studio SDK by creating a license and following the instructions on the", " ", u.jsx("a", {
                        className: se(Da.link),
                        href: "/dashboard/sdk/licenses",
                        target: "_blank",
                        children: "Studio SDK license page"
                    }), u.jsx("br", {}), u.jsx("br", {}), "If you have any questions or need assistance with specific use cases, please fill out this", " ", u.jsx("a", {
                        className: se(Da.link),
                        href: "https://forms.gle/VUycp3rc8iCpbh9k8",
                        target: "_blank",
                        rel: "noreferrer",
                        children: "form"
                    }), " ", "and we'll get back to you as soon as possible."]
                })
            })]
        })
    });

    function wj({onCopy: e, getValue: t, value: n, title: r = "Copy", ...o}) {
        const [i, l] = y.useState(!1), c = () => {
            vk((t == null ? void 0 : t()) ?? n), l(!0), e == null || e()
        };
        return y.useEffect(() => {
            if (!i) return;
            const d = setTimeout(() => l(!1), 3e3);
            return () => clearTimeout(d)
        }, [i]), u.jsx(Xt, {
            onClick: c,
            title: r,
            type: "button",
            size: "lg",
            withBg: !0, ...o,
            children: u.jsx(be, {className: pe(i && te.tA), icon: i ? fe.check : fe.contentCopy, size: Ee.s})
        })
    }

    function G1(e) {
        return e = e.trimStart(), e = e.replace(/\s*([\{\}\:\;\,])\s*/g, "$1"), e = e.replace(/;\s*;/g, ";"), e = e.replace(/\,[\s\.\#\d]*{/g, "{"), e = e.replace(/([^\s])\{([^\s])/g, `$1 {
	$2`), e = e.replace(/([^\s])\}([^\n]*)/g, `$1
}
$2`), e = e.replace(/([^\s]);([^\s\}])/g, `$1;
	$2`), e
    }

    const Sj = xe(function () {
        const t = Pr(), n = Ke(), {Styles: r} = t, {isDarkTheme: o} = sr(), i = r.getSelected(), [l, c] = y.useState(0),
            d = i ? G1(i == null ? void 0 : i.toCSS({allowEmpty: !0})) : "", [p, g] = y.useState(d);
        y.useEffect(() => {
            const v = () => c(x => ++x), b = r.events.custom;
            return t.on(b, v), () => {
                t.off(b, v)
            }
        }, [r, t]);
        const m = () => {
            if (p) {
                const v = t.Parser.parseCss(p)[0];
                v && (i == null || i.setStyle(v.style))
            }
        };
        return u.jsxs(K, {
            className: se("relative"),
            col: !0,
            full: !0,
            children: [u.jsx(q, {
                grow: !0,
                children: i ? u.jsx(Ss, {
                    padding: 5,
                    language: "css",
                    value: d,
                    onChange: g,
                    isDarkTheme: o,
                    clean: !0
                }, l) : n.t("noCode")
            }), u.jsx(at, {
                className: se("absolute right-2 bottom-2 text-sm"),
                variant: "pr",
                size: "m2",
                onClick: m,
                children: n.t("update")
            })]
        })
    }), jj = [{id: "html", label: "HTML"}, {id: "mjml", label: "MJML"}], FI = xe(function (t) {
        var E;
        const n = Ke(), r = Ae(), {isProjectTypeEmail: o} = r,
            i = r.editor, [l, c] = y.useState(jj[0].id), [d, p] = y.useState(), {isDarkTheme: g} = sr(), [m] = y.useState(() => G1(i.getCss())), [v, b] = y.useState(),
            x = k => n.t(`actions.showCode.${k}`), w = {...t.options, ...o ? {export: !1} : {}},
            j = (E = r.sdkOptions.dataSources) == null ? void 0 : E.exportConfig, C = () => {
                i.runCommand("gjs-export-zip", {
                    filenamePfx: "gjs-export", root: async k => {
                        const T = await k.runCommand(_e.projectFiles, {exportConfig: j}), O = {};
                        for (const A in T) {
                            const $ = T[A], {filename: F, content: N} = $;
                            if ($.path) {
                                const z = $.path.split("/").filter(Boolean);
                                let V = O;
                                for (const X of z) V[X] = V[X] || {}, V = V[X];
                                V[F] = N
                            } else O[F] = N
                        }
                        return O
                    }
                })
            };
        y.useEffect(() => {
            var k;
            if (o) {
                let T = i.getHtml();
                if (l !== "mjml") try {
                    const O = i.runCommand("mjml-code-to-html");
                    (k = O.errors) != null && k.length && console.warn(O.errors), T = O.html
                } catch (O) {
                    console.error(O)
                }
                p(T)
            } else (async () => {
                const A = (await i.runCommand(_e.projectFiles, {
                    page: i.Pages.getSelected(),
                    skipProject: !0,
                    styles: "skip",
                    exportConfig: j
                })).find($ => $.mimeType === "text/html");
                A && p(A.content)
            })()
        }, [l]), y.useEffect(() => {
            var k;
            v && ((k = v.getModel()) == null || k.setValue(d), LS(v))
        }, [v, d]);
        const _ = {padding: 5, isDarkTheme: g, clean: !0};
        return u.jsxs(K, {
            col: !0,
            space: "m",
            children: [u.jsxs(K, {
                className: se("h-96"),
                space: "m",
                children: [u.jsxs(q, {
                    className: se("relative"),
                    grow: !0,
                    children: [o && u.jsxs(K, {
                        className: se("absolute top-3 right-3 z-10"),
                        space: "s",
                        nowrap: !0,
                        children: [u.jsx(Ze, {
                            value: l,
                            onChange: c,
                            options: jj,
                            className: se("min-w-24")
                        }), u.jsx(wj, {getValue: () => v.getModel().getValue()})]
                    }), d !== void 0 && u.jsx(Ss, {value: d, language: "html", onMount: b, ..._})]
                }), !o && u.jsx(q, {grow: !0, children: u.jsx(Ss, {value: m, language: "css", ..._})})]
            }), w.export !== !1 && u.jsx(K, {
                justify: "end",
                children: u.jsx(at, {size: "m2", variant: "pr", onClick: C, children: x("exportButton")})
            })]
        })
    }), zI = () => [{
        id: Xe.web,
        label: Vo(Xe.web),
        content: u.jsxs(K, {
            gap: "s",
            items: "center",
            nowrap: !0,
            children: [u.jsx(be, {icon: fe.web, size: Ee.s}), u.jsx("span", {children: Vo(Xe.web)})]
        })
    }, {
        id: Xe.email,
        label: Vo(Xe.email),
        content: u.jsxs(K, {
            gap: "s",
            items: "center",
            nowrap: !0,
            children: [u.jsx(be, {icon: fe.emailOutline, size: Ee.s}), u.jsx("span", {children: Vo(Xe.email)})]
        })
    }], Uf = 0, li = 1, dl = 2, Cj = 4;

    function BI(e, t) {
        return n => e(t(n))
    }

    function UI(e, t) {
        return t(e)
    }

    function Ej(e, t) {
        return n => e(t, n)
    }

    function Pj(e, t) {
        return () => e(t)
    }

    function K1(e, t) {
        return t(e), e
    }

    function sa(...e) {
        return e
    }

    function WI(e) {
        e()
    }

    function _j(e) {
        return () => e
    }

    function GI(...e) {
        return () => {
            e.map(WI)
        }
    }

    function Wf() {
    }

    function Dn(e, t) {
        return e(li, t)
    }

    function wn(e, t) {
        e(Uf, t)
    }

    function q1(e) {
        e(dl)
    }

    function fl(e) {
        return e(Cj)
    }

    function $t(e, t) {
        return Dn(e, Ej(t, Uf))
    }

    function kj(e, t) {
        const n = e(li, r => {
            n(), t(r)
        });
        return n
    }

    function sn() {
        const e = [];
        return (t, n) => {
            switch (t) {
                case dl:
                    e.splice(0, e.length);
                    return;
                case li:
                    return e.push(n), () => {
                        const r = e.indexOf(n);
                        r > -1 && e.splice(r, 1)
                    };
                case Uf:
                    e.slice().forEach(r => {
                        r(n)
                    });
                    return;
                default:
                    throw new Error(`unrecognized action ${t}`)
            }
        }
    }

    function Ue(e) {
        let t = e;
        const n = sn();
        return (r, o) => {
            switch (r) {
                case li:
                    o(t);
                    break;
                case Uf:
                    t = o;
                    break;
                case Cj:
                    return t
            }
            return n(r, o)
        }
    }

    function KI(e) {
        let t, n;
        const r = () => t && t();
        return function (o, i) {
            switch (o) {
                case li:
                    return i ? n === i ? void 0 : (r(), n = i, t = Dn(e, i), t) : (r(), Wf);
                case dl:
                    r(), n = null;
                    return;
                default:
                    throw new Error(`unrecognized action ${o}`)
            }
        }
    }

    function cu(e) {
        return K1(sn(), t => $t(e, t))
    }

    function pl(e, t) {
        return K1(Ue(t), n => $t(e, n))
    }

    function qI(...e) {
        return t => e.reduceRight(UI, t)
    }

    function Ye(e, ...t) {
        const n = qI(...t);
        return (r, o) => {
            switch (r) {
                case li:
                    return Dn(e, n(o));
                case dl:
                    q1(e);
                    return
            }
        }
    }

    function Tj(e, t) {
        return e === t
    }

    function ar(e = Tj) {
        let t;
        return n => r => {
            e(t, r) || (t = r, n(r))
        }
    }

    function Ln(e) {
        return t => n => {
            e(n) && t(n)
        }
    }

    function Kt(e) {
        return t => BI(t, e)
    }

    function ci(e) {
        return t => () => t(e)
    }

    function Gf(e, t) {
        return n => r => n(t = e(t, r))
    }

    function Y1(e) {
        return t => n => {
            e > 0 ? e-- : t(n)
        }
    }

    function uu(e) {
        let t = null, n;
        return r => o => {
            t = o, !n && (n = setTimeout(() => {
                n = void 0, r(t)
            }, e))
        }
    }

    function Oj(e) {
        let t, n;
        return r => o => {
            t = o, n && clearTimeout(n), n = setTimeout(() => {
                r(t)
            }, e)
        }
    }

    function es(...e) {
        const t = new Array(e.length);
        let n = 0, r = null;
        const o = Math.pow(2, e.length) - 1;
        return e.forEach((i, l) => {
            const c = Math.pow(2, l);
            Dn(i, d => {
                const p = n;
                n = n | c, t[l] = d, p !== o && n === o && r && (r(), r = null)
            })
        }), i => l => {
            const c = () => i([l].concat(t));
            n === o ? c() : r = c
        }
    }

    function Lj(...e) {
        return function (t, n) {
            switch (t) {
                case li:
                    return GI(...e.map(r => Dn(r, n)));
                case dl:
                    return;
                default:
                    throw new Error(`unrecognized action ${t}`)
            }
        }
    }

    function ft(e, t = Tj) {
        return Ye(e, ar(t))
    }

    function ks(...e) {
        const t = sn(), n = new Array(e.length);
        let r = 0;
        const o = Math.pow(2, e.length) - 1;
        return e.forEach((i, l) => {
            const c = Math.pow(2, l);
            Dn(i, d => {
                n[l] = d, r = r | c, r === o && wn(t, n)
            })
        }), function (i, l) {
            switch (i) {
                case li:
                    return r === o && l(n), Dn(t, l);
                case dl:
                    return q1(t);
                default:
                    throw new Error(`unrecognized action ${i}`)
            }
        }
    }

    function ts(e, t = [], {singleton: n} = {singleton: !0}) {
        return {id: YI(), constructor: e, dependencies: t, singleton: n}
    }

    const YI = () => Symbol();

    function XI(e) {
        const t = new Map, n = ({id: r, constructor: o, dependencies: i, singleton: l}) => {
            if (l && t.has(r)) return t.get(r);
            const c = o(i.map(d => n(d)));
            return l && t.set(r, c), c
        };
        return n(e)
    }

    function ZI(e, t) {
        const n = {}, r = {};
        let o = 0;
        const i = e.length;
        for (; o < i;) r[e[o]] = 1, o += 1;
        for (const l in t) r.hasOwnProperty(l) || (n[l] = t[l]);
        return n
    }

    const Kf = typeof document < "u" ? ee.useLayoutEffect : ee.useEffect;

    function JI(e, t, n) {
        const r = Object.keys(t.required || {}), o = Object.keys(t.optional || {}), i = Object.keys(t.methods || {}),
            l = Object.keys(t.events || {}), c = ee.createContext({});

        function d(C, _) {
            C.propsReady && wn(C.propsReady, !1);
            for (const E of r) {
                const k = C[t.required[E]];
                wn(k, _[E])
            }
            for (const E of o) if (E in _) {
                const k = C[t.optional[E]];
                wn(k, _[E])
            }
            C.propsReady && wn(C.propsReady, !0)
        }

        function p(C) {
            return i.reduce((_, E) => (_[E] = k => {
                const T = C[t.methods[E]];
                wn(T, k)
            }, _), {})
        }

        function g(C) {
            return l.reduce((_, E) => (_[E] = KI(C[t.events[E]]), _), {})
        }

        const m = ee.forwardRef((C, _) => {
            const {
                children: E,
                ...k
            } = C, [T] = ee.useState(() => K1(XI(e), $ => d($, k))), [O] = ee.useState(Pj(g, T));
            Kf(() => {
                for (const $ of l) $ in k && Dn(O[$], k[$]);
                return () => {
                    Object.values(O).map(q1)
                }
            }, [k, O, T]), Kf(() => {
                d(T, k)
            }), ee.useImperativeHandle(_, _j(p(T)));
            const A = n;
            return u.jsx(c.Provider, {
                value: T,
                children: n ? u.jsx(A, {...ZI([...r, ...o, ...l], k), children: E}) : E
            })
        }), v = C => ee.useCallback(Ej(wn, ee.useContext(c)[C]), [C]), b = C => {
            const E = ee.useContext(c)[C], k = ee.useCallback(T => Dn(E, T), [E]);
            return ee.useSyncExternalStore(k, () => fl(E), () => fl(E))
        }, x = C => {
            const E = ee.useContext(c)[C], [k, T] = ee.useState(Pj(fl, E));
            return Kf(() => Dn(E, O => {
                O !== k && T(_j(O))
            }), [E, k]), k
        }, w = ee.version.startsWith("18") ? b : x;
        return {
            Component: m, usePublisher: v, useEmitterValue: w, useEmitter: (C, _) => {
                const k = ee.useContext(c)[C];
                Kf(() => Dn(k, _), [_, k])
            }
        }
    }

    const Mj = typeof document < "u" ? ee.useLayoutEffect : ee.useEffect;
    var X1 = (e => (e[e.DEBUG = 0] = "DEBUG", e[e.INFO = 1] = "INFO", e[e.WARN = 2] = "WARN", e[e.ERROR = 3] = "ERROR", e))(X1 || {});
    const QI = {0: "debug", 1: "log", 2: "warn", 3: "error"}, eV = () => typeof globalThis > "u" ? window : globalThis,
        Aj = ts(() => {
            const e = Ue(3);
            return {
                log: Ue((n, r, o = 1) => {
                    var i;
                    const l = (i = eV().VIRTUOSO_LOG_LEVEL) != null ? i : fl(e);
                    o >= l && console[QI[o]]("%creact-virtuoso: %c%s %o", "color: #0253b3; font-weight: bold", "color: initial", n, r)
                }), logLevel: e
            }
        }, [], {singleton: !0});

    function Rj(e, t, n) {
        const r = ee.useRef(null);
        let o = i => {
        };
        if (typeof ResizeObserver < "u") {
            const i = ee.useMemo(() => new ResizeObserver(l => {
                const c = () => {
                    const d = l[0].target;
                    d.offsetParent !== null && e(d)
                };
                n ? c() : requestAnimationFrame(c)
            }), [e]);
            o = l => {
                l && t ? (i.observe(l), r.current = l) : (r.current && i.unobserve(r.current), r.current = null)
            }
        }
        return {ref: r, callbackRef: o}
    }

    function qf(e, t, n) {
        return Rj(e, t, n).callbackRef
    }

    function Yf(e, t) {
        return Math.round(e.getBoundingClientRect()[t])
    }

    function Nj(e, t) {
        return Math.abs(e - t) < 1.01
    }

    function $j(e, t, n, r = Wf, o, i) {
        const l = ee.useRef(null), c = ee.useRef(null), d = ee.useRef(null), p = ee.useCallback(v => {
            const b = v.target, x = b === window || b === document,
                w = i ? x ? window.pageXOffset || document.documentElement.scrollLeft : b.scrollLeft : x ? window.pageYOffset || document.documentElement.scrollTop : b.scrollTop,
                j = i ? x ? document.documentElement.scrollWidth : b.scrollWidth : x ? document.documentElement.scrollHeight : b.scrollHeight,
                C = i ? x ? window.innerWidth : b.offsetWidth : x ? window.innerHeight : b.offsetHeight, _ = () => {
                    e({scrollTop: Math.max(w, 0), scrollHeight: j, viewportHeight: C})
                };
            v.suppressFlushSync ? _() : kg.flushSync(_), c.current !== null && (w === c.current || w <= 0 || w === j - C) && (c.current = null, t(!0), d.current && (clearTimeout(d.current), d.current = null))
        }, [e, t]);
        ee.useEffect(() => {
            const v = o || l.current;
            return r(o || l.current), p({
                target: v,
                suppressFlushSync: !0
            }), v.addEventListener("scroll", p, {passive: !0}), () => {
                r(null), v.removeEventListener("scroll", p)
            }
        }, [l, p, n, r, o]);

        function g(v) {
            const b = l.current;
            if (!b || (i ? "offsetWidth" in b && b.offsetWidth === 0 : "offsetHeight" in b && b.offsetHeight === 0)) return;
            const x = v.behavior === "smooth";
            let w, j, C;
            b === window ? (j = Math.max(Yf(document.documentElement, i ? "width" : "height"), i ? document.documentElement.scrollWidth : document.documentElement.scrollHeight), w = i ? window.innerWidth : window.innerHeight, C = i ? document.documentElement.scrollLeft : document.documentElement.scrollTop) : (j = b[i ? "scrollWidth" : "scrollHeight"], w = Yf(b, i ? "width" : "height"), C = b[i ? "scrollLeft" : "scrollTop"]);
            const _ = j - w;
            if (v.top = Math.ceil(Math.max(Math.min(_, v.top), 0)), Nj(w, j) || v.top === C) {
                e({scrollTop: C, scrollHeight: j, viewportHeight: w}), x && t(!0);
                return
            }
            x ? (c.current = v.top, d.current && clearTimeout(d.current), d.current = setTimeout(() => {
                d.current = null, c.current = null, t(!0)
            }, 1e3)) : c.current = null, i && (v = {left: v.top, behavior: v.behavior}), b.scrollTo(v)
        }

        function m(v) {
            i && (v = {left: v.top, behavior: v.behavior}), l.current.scrollBy(v)
        }

        return {scrollerRef: l, scrollByCallback: m, scrollToCallback: g}
    }

    const Xf = ts(() => {
        const e = sn(), t = sn(), n = Ue(0), r = sn(), o = Ue(0), i = sn(), l = sn(), c = Ue(0), d = Ue(0), p = Ue(0),
            g = Ue(0), m = sn(), v = sn(), b = Ue(!1), x = Ue(!1), w = Ue(!1);
        return $t(Ye(e, Kt(({scrollTop: j}) => j)), t), $t(Ye(e, Kt(({scrollHeight: j}) => j)), l), $t(t, o), {
            scrollContainerState: e,
            scrollTop: t,
            viewportHeight: i,
            headerHeight: c,
            fixedHeaderHeight: d,
            fixedFooterHeight: p,
            footerHeight: g,
            scrollHeight: l,
            smoothScrollTargetReached: r,
            horizontalDirection: x,
            skipAnimationFrameInResizeObserver: w,
            scrollTo: m,
            scrollBy: v,
            statefulScrollTop: o,
            deviation: n,
            scrollingInProgress: b
        }
    }, [], {singleton: !0}), tV = typeof document < "u" && "scrollBehavior" in document.documentElement.style;

    function nV(e) {
        const t = typeof e == "number" ? {index: e} : e;
        return t.align || (t.align = "start"), (!t.behavior || !tV) && (t.behavior = "auto"), t.offset || (t.offset = 0), t
    }

    const Zf = "up", du = "down", rV = "none", oV = {
        atBottom: !1,
        notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
        state: {offsetBottom: 0, scrollTop: 0, viewportHeight: 0, scrollHeight: 0}
    }, sV = 0, Dj = ts(([{
        scrollContainerState: e,
        scrollTop: t,
        viewportHeight: n,
        headerHeight: r,
        footerHeight: o,
        scrollBy: i
    }]) => {
        const l = Ue(!1), c = Ue(!0), d = sn(), p = sn(), g = Ue(4), m = Ue(sV),
            v = pl(Ye(Lj(Ye(ft(t), Y1(1), ci(!0)), Ye(ft(t), Y1(1), ci(!1), Oj(100))), ar()), !1),
            b = pl(Ye(Lj(Ye(i, ci(!0)), Ye(i, ci(!1), Oj(200))), ar()), !1);
        $t(Ye(ks(ft(t), ft(m)), Kt(([_, E]) => _ <= E), ar()), c), $t(Ye(c, uu(50)), p);
        const x = cu(Ye(ks(e, ft(n), ft(r), ft(o), ft(g)), Gf((_, [{scrollTop: E, scrollHeight: k}, T, O, A, $]) => {
                const F = E + T - k > -$, N = {viewportHeight: T, scrollTop: E, scrollHeight: k};
                if (F) {
                    let V, X;
                    return E > _.state.scrollTop ? (V = "SCROLLED_DOWN", X = _.state.scrollTop - E) : (V = "SIZE_DECREASED", X = _.state.scrollTop - E || _.scrollTopDelta), {
                        atBottom: !0,
                        state: N,
                        atBottomBecause: V,
                        scrollTopDelta: X
                    }
                }
                let z;
                return N.scrollHeight > _.state.scrollHeight ? z = "SIZE_INCREASED" : T < _.state.viewportHeight ? z = "VIEWPORT_HEIGHT_DECREASING" : E < _.state.scrollTop ? z = "SCROLLING_UPWARDS" : z = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
                    atBottom: !1,
                    notAtBottomBecause: z,
                    state: N
                }
            }, oV), ar((_, E) => _ && _.atBottom === E.atBottom))),
            w = pl(Ye(e, Gf((_, {scrollTop: E, scrollHeight: k, viewportHeight: T}) => {
                if (Nj(_.scrollHeight, k)) return {scrollTop: E, scrollHeight: k, jump: 0, changed: !1};
                {
                    const O = k - (E + T) < 1;
                    return _.scrollTop !== E && O ? {
                        scrollHeight: k,
                        scrollTop: E,
                        jump: _.scrollTop - E,
                        changed: !0
                    } : {scrollHeight: k, scrollTop: E, jump: 0, changed: !0}
                }
            }, {scrollHeight: 0, jump: 0, scrollTop: 0, changed: !1}), Ln(_ => _.changed), Kt(_ => _.jump)), 0);
        $t(Ye(x, Kt(_ => _.atBottom)), l), $t(Ye(l, uu(50)), d);
        const j = Ue(du);
        $t(Ye(e, Kt(({scrollTop: _}) => _), ar(), Gf((_, E) => fl(b) ? {
            direction: _.direction,
            prevScrollTop: E
        } : {direction: E < _.prevScrollTop ? Zf : du, prevScrollTop: E}, {
            direction: du,
            prevScrollTop: 0
        }), Kt(_ => _.direction)), j), $t(Ye(e, uu(50), ci(rV)), j);
        const C = Ue(0);
        return $t(Ye(v, Ln(_ => !_), ci(0)), C), $t(Ye(t, uu(100), es(v), Ln(([_, E]) => !!E), Gf(([_, E], [k]) => [E, k], [0, 0]), Kt(([_, E]) => E - _)), C), {
            isScrolling: v,
            isAtTop: c,
            isAtBottom: l,
            atBottomState: x,
            atTopStateChange: p,
            atBottomStateChange: d,
            scrollDirection: j,
            atBottomThreshold: g,
            atTopThreshold: m,
            scrollVelocity: C,
            lastJumpDueToItemResize: w
        }
    }, sa(Xf)), iV = ts(([{log: e}]) => {
        const t = Ue(!1), n = cu(Ye(t, Ln(r => r), ar()));
        return Dn(t, r => {
            r && fl(e)("props updated", {}, X1.DEBUG)
        }), {propsReady: t, didMount: n}
    }, sa(Aj), {singleton: !0});

    function Ij(e, t) {
        e == 0 ? t() : requestAnimationFrame(() => Ij(e - 1, t))
    }

    function aV(e, t) {
        const n = t - 1;
        return typeof e == "number" ? e : e.index === "LAST" ? n : e.index
    }

    function Z1(e, t) {
        return !!(e && e[0] === t[0] && e[1] === t[1])
    }

    function lV(e, t) {
        return !!(e && e.startIndex === t.startIndex && e.endIndex === t.endIndex)
    }

    const Jf = "top", Qf = "bottom", Vj = "none";

    function Hj(e, t, n) {
        return typeof e == "number" ? n === Zf && t === Jf || n === du && t === Qf ? e : 0 : n === Zf ? t === Jf ? e.main : e.reverse : t === Qf ? e.main : e.reverse
    }

    function Fj(e, t) {
        return typeof e == "number" ? e : e[t] || 0
    }

    const cV = ts(([{scrollTop: e, viewportHeight: t, deviation: n, headerHeight: r, fixedHeaderHeight: o}]) => {
        const i = sn(), l = Ue(0), c = Ue(0), d = Ue(0),
            p = pl(Ye(ks(ft(e), ft(t), ft(r), ft(i, Z1), ft(d), ft(l), ft(o), ft(n), ft(c)), Kt(([g, m, v, [b, x], w, j, C, _, E]) => {
                const k = g - _, T = j + C, O = Math.max(v - k, 0);
                let A = Vj;
                const $ = Fj(E, Jf), F = Fj(E, Qf);
                return b -= _, b += v + C, x += v + C, x -= _, b > g + T - $ && (A = Zf), x < g - O + m + F && (A = du), A !== Vj ? [Math.max(k - v - Hj(w, Jf, A) - $, 0), k - O - C + m + Hj(w, Qf, A) + F] : null
            }), Ln(g => g != null), ar(Z1)), [0, 0]);
        return {listBoundary: i, overscan: d, topListHeight: l, increaseViewportBy: c, visibleRange: p}
    }, sa(Xf), {singleton: !0}), uV = ts(([{scrollVelocity: e}]) => {
        const t = Ue(!1), n = sn(), r = Ue(!1);
        return $t(Ye(e, es(r, t, n), Ln(([o, i]) => !!i), Kt(([o, i, l, c]) => {
            const {exit: d, enter: p} = i;
            if (l) {
                if (d(o, c)) return !1
            } else if (p(o, c)) return !0;
            return l
        }), ar()), t), Dn(Ye(ks(t, e, n), es(r)), ([[o, i, l], c]) => o && c && c.change && c.change(i, l)), {
            isSeeking: t,
            scrollSeekConfiguration: r,
            scrollVelocity: e,
            scrollSeekRangeChanged: n
        }
    }, sa(Dj), {singleton: !0});

    function dV(e) {
        let t = !1, n;
        return () => (t || (t = !0, n = e()), n)
    }

    const fV = ts(([{scrollTo: e, scrollContainerState: t}]) => {
        const n = sn(), r = sn(), o = sn(), i = Ue(!1), l = Ue(void 0);
        return $t(Ye(ks(n, r), Kt(([{
            viewportHeight: c,
            scrollTop: d,
            scrollHeight: p
        }, {offsetTop: g}]) => ({
            scrollTop: Math.max(0, d - g),
            scrollHeight: p,
            viewportHeight: c
        }))), t), $t(Ye(e, es(r), Kt(([c, {offsetTop: d}]) => ({...c, top: c.top + d}))), o), {
            useWindowScroll: i,
            customScrollParent: l,
            windowScrollContainerState: n,
            windowViewportRect: r,
            windowScrollTo: o
        }
    }, sa(Xf)), J1 = "-webkit-sticky", zj = "sticky", Bj = dV(() => {
        if (typeof document > "u") return zj;
        const e = document.createElement("div");
        return e.style.position = J1, e.style.position === J1 ? J1 : zj
    });

    function pV(e, t, n) {
        const r = ee.useRef(null), o = ee.useCallback(d => {
            if (d === null || !d.offsetParent) return;
            const p = d.getBoundingClientRect(), g = p.width;
            let m, v;
            if (t) {
                const b = t.getBoundingClientRect(), x = p.top - b.top;
                m = b.height - Math.max(0, x), v = x + t.scrollTop
            } else m = window.innerHeight - Math.max(0, p.top), v = p.top + window.pageYOffset;
            r.current = {offsetTop: v, visibleHeight: m, visibleWidth: g}, e(r.current)
        }, [e, t]), {callbackRef: i, ref: l} = Rj(o, !0, n), c = ee.useCallback(() => {
            o(l.current)
        }, [o, l]);
        return ee.useEffect(() => {
            if (t) {
                t.addEventListener("scroll", c);
                const d = new ResizeObserver(() => {
                    requestAnimationFrame(c)
                });
                return d.observe(t), () => {
                    t.removeEventListener("scroll", c), d.unobserve(t)
                }
            } else return window.addEventListener("scroll", c), window.addEventListener("resize", c), () => {
                window.removeEventListener("scroll", c), window.removeEventListener("resize", c)
            }
        }, [c, t]), i
    }

    ee.createContext(void 0);
    const Uj = ee.createContext(void 0);

    function gV(e) {
        return e
    }

    Bj();
    const hV = {
        height: "100%",
        outline: "none",
        overflowY: "auto",
        position: "relative",
        WebkitOverflowScrolling: "touch"
    }, mV = {outline: "none", overflowX: "auto", position: "relative"}, Wj = e => ({
        width: "100%", height: "100%", position: "absolute", top: 0, ...e ? {
            display: "flex",
            flexDirection: "column"
        } : {}
    });
    Bj();

    function ia(e, t) {
        if (typeof e != "string") return {context: t}
    }

    function vV({usePublisher: e, useEmitter: t, useEmitterValue: n}) {
        return ee.memo(function ({style: i, children: l, ...c}) {
            const d = e("scrollContainerState"), p = n("ScrollerComponent"), g = e("smoothScrollTargetReached"),
                m = n("scrollerRef"), v = n("context"), b = n("horizontalDirection") || !1, {
                    scrollerRef: x,
                    scrollByCallback: w,
                    scrollToCallback: j
                } = $j(d, g, p, m, void 0, b);
            t("scrollTo", j), t("scrollBy", w);
            const C = b ? mV : hV;
            return u.jsx(p, {
                ref: x,
                style: {...C, ...i},
                "data-testid": "virtuoso-scroller",
                "data-virtuoso-scroller": !0,
                tabIndex: 0, ...c, ...ia(p, v),
                children: l
            })
        })
    }

    function yV({usePublisher: e, useEmitter: t, useEmitterValue: n}) {
        return ee.memo(function ({style: i, children: l, ...c}) {
            const d = e("windowScrollContainerState"), p = n("ScrollerComponent"), g = e("smoothScrollTargetReached"),
                m = n("totalListHeight"), v = n("deviation"), b = n("customScrollParent"),
                x = n("context"), {scrollerRef: w, scrollByCallback: j, scrollToCallback: C} = $j(d, g, p, Wf, b);
            return Mj(() => (w.current = b || window, () => {
                w.current = null
            }), [w, b]), t("windowScrollTo", C), t("scrollBy", j), u.jsx(p, {
                style: {position: "relative", ...i, ...m !== 0 ? {height: m + v} : {}},
                "data-virtuoso-scroller": !0, ...c, ...ia(p, x),
                children: l
            })
        })
    }

    const Gj = {items: [], offsetBottom: 0, offsetTop: 0, top: 0, bottom: 0, itemHeight: 0, itemWidth: 0}, bV = {
        items: [{index: 0}],
        offsetBottom: 0,
        offsetTop: 0,
        top: 0,
        bottom: 0,
        itemHeight: 0,
        itemWidth: 0
    }, {round: Kj, ceil: qj, floor: ep, min: Q1, max: fu} = Math;

    function xV(e) {
        return {...bV, items: e}
    }

    function Yj(e, t, n) {
        return Array.from({length: t - e + 1}).map((r, o) => {
            const i = n === null ? null : n[o + e];
            return {index: o + e, data: i}
        })
    }

    function wV(e, t) {
        return e && e.column === t.column && e.row === t.row
    }

    function tp(e, t) {
        return e && e.width === t.width && e.height === t.height
    }

    const SV = ts(([{overscan: e, visibleRange: t, listBoundary: n, increaseViewportBy: r}, {
        scrollTop: o,
        viewportHeight: i,
        scrollBy: l,
        scrollTo: c,
        smoothScrollTargetReached: d,
        scrollContainerState: p,
        footerHeight: g,
        headerHeight: m
    }, v, b, {propsReady: x, didMount: w}, {
        windowViewportRect: j,
        useWindowScroll: C,
        customScrollParent: _,
        windowScrollContainerState: E,
        windowScrollTo: k
    }, T]) => {
        const O = Ue(0), A = Ue(0), $ = Ue(Gj), F = Ue({height: 0, width: 0}), N = Ue({height: 0, width: 0}), z = sn(),
            V = sn(), X = Ue(0), Z = Ue(null), R = Ue({row: 0, column: 0}), B = sn(), Q = sn(), H = Ue(!1), I = Ue(0),
            D = Ue(!0), M = Ue(!1), W = Ue(!1);
        Dn(Ye(w, es(I), Ln(([ie, de]) => !!de)), () => {
            wn(D, !1)
        }), Dn(Ye(ks(w, D, N, F, I, M), Ln(([ie, de, je, he, , Ie]) => ie && !de && je.height !== 0 && he.height !== 0 && !Ie)), ([, , , , ie]) => {
            wn(M, !0), Ij(1, () => {
                wn(z, ie)
            }), kj(Ye(o), () => {
                wn(n, [0, 0]), wn(D, !0)
            })
        }), $t(Ye(Q, Ln(ie => ie != null && ie.scrollTop > 0), ci(0)), A), Dn(Ye(w, es(Q), Ln(([, ie]) => ie != null)), ([, ie]) => {
            ie && (wn(F, ie.viewport), wn(N, ie == null ? void 0 : ie.item), wn(R, ie.gap), ie.scrollTop > 0 && (wn(H, !0), kj(Ye(o, Y1(1)), de => {
                wn(H, !1)
            }), wn(c, {top: ie.scrollTop})))
        }), $t(Ye(F, Kt(({height: ie}) => ie)), i), $t(Ye(ks(ft(F, tp), ft(N, tp), ft(R, (ie, de) => ie && ie.column === de.column && ie.row === de.row), ft(o)), Kt(([ie, de, je, he]) => ({
            viewport: ie,
            item: de,
            gap: je,
            scrollTop: he
        }))), B), $t(Ye(ks(ft(O), t, ft(R, wV), ft(N, tp), ft(F, tp), ft(Z), ft(A), ft(H), ft(D), ft(I)), Ln(([, , , , , , , ie]) => !ie), Kt(([ie, [de, je], he, Ie, He, yt, kt, , Bt, Ct]) => {
            const {row: pt, column: Sn} = he, {height: wt, width: Dt} = Ie, {width: rn} = He;
            if (kt === 0 && (ie === 0 || rn === 0)) return Gj;
            if (Dt === 0) {
                const xo = aV(Ct, ie), Ls = Math.max(xo + kt - 1, 0);
                return xV(Yj(xo, Ls, yt))
            }
            const Ut = Zj(rn, Dt, Sn);
            let Tt, st;
            Bt ? de === 0 && je === 0 && kt > 0 ? (Tt = 0, st = kt - 1) : (Tt = Ut * ep((de + pt) / (wt + pt)), st = Ut * qj((je + pt) / (wt + pt)) - 1, st = Q1(ie - 1, fu(st, Ut - 1)), Tt = Q1(st, fu(0, Tt))) : (Tt = 0, st = -1);
            const Lt = Yj(Tt, st, yt), {top: qt, bottom: jn} = Xj(He, he, Ie, Lt), Kn = qj(ie / Ut),
                cr = Kn * wt + (Kn - 1) * pt - jn;
            return {items: Lt, offsetTop: qt, offsetBottom: cr, top: qt, bottom: jn, itemHeight: wt, itemWidth: Dt}
        })), $), $t(Ye(Z, Ln(ie => ie !== null), Kt(ie => ie.length)), O), $t(Ye(ks(F, N, $, R), Ln(([ie, de, {items: je}]) => je.length > 0 && de.height !== 0 && ie.height !== 0), Kt(([ie, de, {items: je}, he]) => {
            const {top: Ie, bottom: He} = Xj(ie, he, de, je);
            return [Ie, He]
        }), ar(Z1)), n);
        const ce = Ue(!1);
        $t(Ye(o, es(ce), Kt(([ie, de]) => de || ie !== 0)), ce);
        const ne = cu(Ye(ft($), Ln(({items: ie}) => ie.length > 0), es(O, ce), Ln(([{items: ie}, de, je]) => je && ie[ie.length - 1].index === de - 1), Kt(([, ie]) => ie - 1), ar())),
            ue = cu(Ye(ft($), Ln(({items: ie}) => ie.length > 0 && ie[0].index === 0), ci(0), ar())),
            me = cu(Ye(ft($), es(H), Ln(([{items: ie}, de]) => ie.length > 0 && !de), Kt(([{items: ie}]) => ({
                startIndex: ie[0].index,
                endIndex: ie[ie.length - 1].index
            })), ar(lV), uu(0)));
        $t(me, b.scrollSeekRangeChanged), $t(Ye(z, es(F, N, O, R), Kt(([ie, de, je, he, Ie]) => {
            const He = nV(ie), {align: yt, behavior: kt, offset: Bt} = He;
            let Ct = He.index;
            Ct === "LAST" && (Ct = he - 1), Ct = fu(0, Ct, Q1(he - 1, Ct));
            let pt = ev(de, Ie, je, Ct);
            return yt === "end" ? pt = Kj(pt - de.height + je.height) : yt === "center" && (pt = Kj(pt - de.height / 2 + je.height / 2)), Bt && (pt += Bt), {
                top: pt,
                behavior: kt
            }
        })), c);
        const ae = pl(Ye($, Kt(ie => ie.offsetBottom + ie.bottom)), 0);
        return $t(Ye(j, Kt(ie => ({width: ie.visibleWidth, height: ie.visibleHeight}))), F), {
            data: Z,
            totalCount: O,
            viewportDimensions: F,
            itemDimensions: N,
            scrollTop: o,
            scrollHeight: V,
            overscan: e,
            increaseViewportBy: r,
            scrollBy: l,
            scrollTo: c,
            scrollToIndex: z,
            smoothScrollTargetReached: d,
            windowViewportRect: j,
            windowScrollTo: k,
            useWindowScroll: C,
            customScrollParent: _,
            windowScrollContainerState: E,
            deviation: X,
            scrollContainerState: p,
            footerHeight: g,
            headerHeight: m,
            initialItemCount: A,
            gap: R,
            restoreStateFrom: Q, ...b,
            initialTopMostItemIndex: I,
            horizontalDirection: W,
            gridState: $,
            totalListHeight: ae, ...v,
            startReached: ue,
            endReached: ne,
            rangeChanged: me,
            stateChanged: B,
            propsReady: x,
            stateRestoreInProgress: H, ...T
        }
    }, sa(cV, Xf, Dj, uV, iV, fV, Aj));

    function Xj(e, t, n, r) {
        const {height: o} = n;
        if (o === void 0 || r.length === 0) return {top: 0, bottom: 0};
        const i = ev(e, t, n, r[0].index), l = ev(e, t, n, r[r.length - 1].index) + o;
        return {top: i, bottom: l}
    }

    function ev(e, t, n, r) {
        const o = Zj(e.width, n.width, t.column), i = ep(r / o), l = i * n.height + fu(0, i - 1) * t.row;
        return l > 0 ? l + t.row : l
    }

    function Zj(e, t, n) {
        return fu(1, ep((e + n) / (ep(t) + n)))
    }

    const jV = ts(([e, t]) => ({...e, ...t}), sa(SV, ts(() => {
            const e = Ue(m => `Item ${m}`), t = Ue({}), n = Ue(null), r = Ue("virtuoso-grid-item"),
                o = Ue("virtuoso-grid-list"), i = Ue(gV), l = Ue("div"), c = Ue(Wf),
                d = (m, v = null) => pl(Ye(t, Kt(b => b[m]), ar()), v), p = Ue(!1), g = Ue(!1);
            return $t(ft(g), p), {
                readyStateChanged: p,
                reportReadyState: g,
                context: n,
                itemContent: e,
                components: t,
                computeItemKey: i,
                itemClassName: r,
                listClassName: o,
                headerFooterTag: l,
                scrollerRef: c,
                FooterComponent: d("Footer"),
                HeaderComponent: d("Header"),
                ListComponent: d("List", "div"),
                ItemComponent: d("Item", "div"),
                ScrollerComponent: d("Scroller", "div"),
                ScrollSeekPlaceholder: d("ScrollSeekPlaceholder", "div")
            }
        }))), CV = ee.memo(function () {
            const t = Jt("gridState"), n = Jt("listClassName"), r = Jt("itemClassName"), o = Jt("itemContent"),
                i = Jt("computeItemKey"), l = Jt("isSeeking"), c = Xr("scrollHeight"), d = Jt("ItemComponent"),
                p = Jt("ListComponent"), g = Jt("ScrollSeekPlaceholder"), m = Jt("context"), v = Xr("itemDimensions"),
                b = Xr("gap"), x = Jt("log"), w = Jt("stateRestoreInProgress"), j = Xr("reportReadyState"),
                C = qf(ee.useMemo(() => _ => {
                    const E = _.parentElement.parentElement.scrollHeight;
                    c(E);
                    const k = _.firstChild;
                    if (k) {
                        const {width: T, height: O} = k.getBoundingClientRect();
                        v({width: T, height: O})
                    }
                    b({
                        row: Qj("row-gap", getComputedStyle(_).rowGap, x),
                        column: Qj("column-gap", getComputedStyle(_).columnGap, x)
                    })
                }, [c, v, b, x]), !0, !1);
            return Mj(() => {
                t.itemHeight > 0 && t.itemWidth > 0 && j(!0)
            }, [t]), w ? null : u.jsx(p, {
                ref: C,
                className: n, ...ia(p, m),
                style: {paddingTop: t.offsetTop, paddingBottom: t.offsetBottom},
                "data-testid": "virtuoso-item-list",
                children: t.items.map(_ => {
                    const E = i(_.index, _.data, m);
                    return l ? u.jsx(g, {
                        ...ia(g, m),
                        index: _.index,
                        height: t.itemHeight,
                        width: t.itemWidth
                    }, E) : y.createElement(d, {
                        ...ia(d, m),
                        className: r,
                        "data-index": _.index,
                        key: E
                    }, o(_.index, _.data, m))
                })
            })
        }), EV = ee.memo(function () {
            const t = Jt("HeaderComponent"), n = Xr("headerHeight"), r = Jt("headerFooterTag"),
                o = qf(ee.useMemo(() => l => n(Yf(l, "height")), [n]), !0, !1), i = Jt("context");
            return t ? u.jsx(r, {ref: o, children: u.jsx(t, {...ia(t, i)})}) : null
        }), PV = ee.memo(function () {
            const t = Jt("FooterComponent"), n = Xr("footerHeight"), r = Jt("headerFooterTag"),
                o = qf(ee.useMemo(() => l => n(Yf(l, "height")), [n]), !0, !1), i = Jt("context");
            return t ? u.jsx(r, {ref: o, children: u.jsx(t, {...ia(t, i)})}) : null
        }), _V = ({children: e}) => {
            const t = ee.useContext(Uj), n = Xr("itemDimensions"), r = Xr("viewportDimensions"),
                o = qf(ee.useMemo(() => i => {
                    r(i.getBoundingClientRect())
                }, [r]), !0, !1);
            return ee.useEffect(() => {
                t && (r({height: t.viewportHeight, width: t.viewportWidth}), n({height: t.itemHeight, width: t.itemWidth}))
            }, [t, r, n]), u.jsx("div", {style: Wj(!1), ref: o, children: e})
        }, kV = ({children: e}) => {
            const t = ee.useContext(Uj), n = Xr("windowViewportRect"), r = Xr("itemDimensions"),
                o = Jt("customScrollParent"), i = pV(n, o, !1);
            return ee.useEffect(() => {
                t && (r({height: t.itemHeight, width: t.itemWidth}), n({
                    offsetTop: 0,
                    visibleHeight: t.viewportHeight,
                    visibleWidth: t.viewportWidth
                }))
            }, [t, n, r]), u.jsx("div", {ref: i, style: Wj(!1), children: e})
        }, TV = ee.memo(function ({...t}) {
            const n = Jt("useWindowScroll"), r = Jt("customScrollParent"), o = r || n ? MV : LV, i = r || n ? kV : _V;
            return u.jsx(o, {...t, children: u.jsxs(i, {children: [u.jsx(EV, {}), u.jsx(CV, {}), u.jsx(PV, {})]})})
        }), {Component: OV, usePublisher: Xr, useEmitterValue: Jt, useEmitter: Jj} = JI(jV, {
            optional: {
                context: "context",
                totalCount: "totalCount",
                overscan: "overscan",
                itemContent: "itemContent",
                components: "components",
                computeItemKey: "computeItemKey",
                data: "data",
                initialItemCount: "initialItemCount",
                scrollSeekConfiguration: "scrollSeekConfiguration",
                headerFooterTag: "headerFooterTag",
                listClassName: "listClassName",
                itemClassName: "itemClassName",
                useWindowScroll: "useWindowScroll",
                customScrollParent: "customScrollParent",
                scrollerRef: "scrollerRef",
                logLevel: "logLevel",
                restoreStateFrom: "restoreStateFrom",
                initialTopMostItemIndex: "initialTopMostItemIndex",
                increaseViewportBy: "increaseViewportBy"
            },
            methods: {scrollTo: "scrollTo", scrollBy: "scrollBy", scrollToIndex: "scrollToIndex"},
            events: {
                isScrolling: "isScrolling",
                endReached: "endReached",
                startReached: "startReached",
                rangeChanged: "rangeChanged",
                atBottomStateChange: "atBottomStateChange",
                atTopStateChange: "atTopStateChange",
                stateChanged: "stateChanged",
                readyStateChanged: "readyStateChanged"
            }
        }, TV), LV = vV({usePublisher: Xr, useEmitterValue: Jt, useEmitter: Jj}),
        MV = yV({usePublisher: Xr, useEmitterValue: Jt, useEmitter: Jj});

    function Qj(e, t, n) {
        return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, X1.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10)
    }

    const pu = OV, tv = e => {
        const t = "gs-utl-grid-cols-4", n = parseInt(`${e || 4}`, 10);
        return n === 1 ? "gs-utl-grid-cols-1" : n === 2 ? "gs-utl-grid-cols-2" : n === 3 ? "gs-utl-grid-cols-3" : n === 4 ? t : n === 5 ? "gs-utl-grid-cols-5" : n === 6 ? "gs-utl-grid-cols-6" : n === 7 ? "gs-utl-grid-cols-7" : n === 8 ? "gs-utl-grid-cols-8" : n === 9 ? "gs-utl-grid-cols-9" : n === 10 ? "gs-utl-grid-cols-10" : n === 11 ? "gs-utl-grid-cols-11" : n === 12 ? "gs-utl-grid-cols-12" : t
    }, AV = e => !!(e && !Array.isArray(e) && typeof e == "object");

    async function RV(e) {
        const t = e.map(({id: l, src: c}) => ({id: l, src: c})), n = e.reduce((l, c) => (l[c.id] = c, l), {}), r = [],
            o = [];
        return (await xk(t)).forEach(l => {
            l.status === "fulfilled" ? r.push(n[l.value]) : o.push(n[l.reason])
        }), {loaded: r, failed: o}
    }

    const NV = async e => {
        const t = [...e], n = {};
        if (t.length) {
            const r = {}, o = [];
            if (t.forEach((i, l) => {
                AV(i) && (r[i.id] = {index: l}, o.push(i))
            }), o.length) {
                const {loaded: i} = await RV(o);
                i.forEach(({id: l, options: c}) => {
                    r[l].loaded = !0, n[l] = c || {}
                })
            }
            Object.keys(r).forEach(i => {
                const l = r[i];
                l.loaded ? t[l.index] = i : t[l.index] = !1
            })
        }
        return {plugins: t.filter(Boolean), pluginOptions: n}
    }, $V = (e, t, n, r = {}) => {
        e.loadData(t);
        let o = `${e.getHtml()}<style>${e.getCss()}</style>`;
        if (n === Xe.email) try {
            o = e.runCommand("mjml-code-to-html").html
        } catch (i) {
            console.error(i)
        }
        return r.skipReplace ? o : o.replace("<body", "<div data-body").replace("</body>", "</div>")
    }, DV = async (e, t, n) => {
        const r = uj(t, {appStore: n}), o = await NV(r);
        return e.init({
            headless: !0, projectData: {}, noticeOnUnload: !1, storageManager: !1, plugins: [...o.plugins, i => {
                i.Storage.setCurrent("")
            }], pluginsOpts: o.pluginOptions, protectedCss: `
      * { box-sizing: border-box; }
      [data-body] {
        margin: 0;
        background-color: white;
        width: 100%;
        height: 100%;
        color: initial;
        font-family: initial;
        font-weight: initial;
        line-height: initial;
      }
      [data-body]:before {
        content: "";
        display: block;
        height: 0px;
        overflow: hidden;
      }
    `
        })
    };

    function nv({
                    children: e,
                    text: t,
                    onConfirm: n,
                    onCancel: r,
                    className: o = "w-[200px]",
                    confirmButtonProps: i = {},
                    ...l
                }) {
        const c = Ke();
        return u.jsx(Wo, {
            ...l,
            overlay: !0,
            title: !1,
            buttonAs: "span",
            handler: e,
            children: ({close: d}) => u.jsxs(K, {
                className: se(o),
                space: "m",
                col: !0,
                children: [u.jsx(q, {
                    grow: !0,
                    className: se("text-center"),
                    children: t || c.t("confirmAction")
                }), u.jsxs(K, {
                    justify: "center",
                    items: "center",
                    space: "m",
                    children: [u.jsx(at, {
                        variant: "pr", size: "m2", onClick: () => {
                            d(), n == null || n()
                        }, ...i, children: c.t("confirm")
                    }), u.jsx(at, {
                        size: "m2", onClick: () => {
                            d(), r == null || r()
                        }, children: c.t("cancel")
                    })]
                })]
            })
        })
    }

    const eC = new Map, tC = new Map, IV = async ({html: e = "", el: t}) => {
            const n = e, r = {};
            if (document.body.attachShadow) {
                const o = t.shadowRoot || t.attachShadow({mode: "open"});
                o.innerHTML = n
            }
            return r
        }, VV = xe(function ({
                                 template: t,
                                 projectType: n,
                                 skipProjectNamePopover: r,
                                 className: o,
                                 onSelect: i,
                                 onRemove: l
                             }) {
            var A;
            const c = Ke(), d = Ae(), p = d.editor, [g, m] = y.useState(""), v = y.useRef(null),
                b = c.t("projectManager.projectName"),
                x = !t.isTemplate && d.currentProjectId === ((A = t.data.custom) == null ? void 0 : A.id), w = n === Xe.web,
                j = !t.isTemplate || r, C = () => {
                    j && (i == null || i({editor: p, template: t, loadTemplate: _}))
                }, _ = d.setProject, E = $ => {
                    $.preventDefault(), i({editor: p, template: t, loadTemplate: _})
                };
            y.useEffect(() => {
                const F = setTimeout(async () => {
                    if (!v.current || !p) return;
                    const N = `${t.isTemplate ? "t-" : ""}${t.id}`;
                    let z = eC.get(N);
                    if (!z) {
                        let X = tC.get(n);
                        if (!X) {
                            const Z = new Nf({appEditorStore: {sdkProps: {options: {licenseKey: ""}}}});
                            X = await DV(p.config.grapesjs, n, Z.appEditorStore), tC.set(n, X)
                        }
                        z = $V(X, t.data, n), eC.set(N, z)
                    }
                    const V = v.current;
                    IV({el: V, html: z})
                });
                return () => clearTimeout(F)
            }, [v, p, n, t.data]);
            const {media: k, author: T} = t, O = u.jsx(at, {
                className: pe("text-sm"),
                size: "m2",
                variant: "pr",
                onClick: C,
                disabled: x,
                children: c.t("select")
            });
            return u.jsx(tr, {
                padding: !1, className: pe("overflow-hidden max-w-full group", o), children: u.jsxs(K, {
                    col: !0, children: [u.jsxs(q, {
                        className: pe("relative group h-36 bg-checker max-w-full"),
                        children: [u.jsx("div", {
                            className: pe("gs-utl-relative", "gs-utl-h-full", "gs-utl-overflow-hidden", "gs-utl-flex", "gs-utl-justify-center"),
                            children: k ? u.jsx("img", {
                                src: k,
                                alt: t.name,
                                className: pe("max-w-full")
                            }) : u.jsx("div", {
                                className: pe("gs-utl-w-[1200px]", "gs-utl-flex-shrink-0", "gs-utl-flex-grow-0", "gs-utl-origin-top", "gs-utl-bg-white", "gs-utl-scale-[0.232]", "gs-utl-h-[431.034%]"),
                                ref: v
                            })
                        }), x && u.jsx(dn, {
                            className: pe("absolute top-2 right-2", te.bgA2),
                            label: c.t("current"),
                            s: "s",
                            pill: !0
                        }), u.jsx(K, {
                            justify: "center",
                            items: "center",
                            className: pe(nt.coverAbs, te.bgH75, "group-hover:gs-utl-opacity-100 opacity-0 transition-opacity"),
                            children: j ? O : u.jsx(Wo, {
                                overlay: !0,
                                title: !1,
                                buttonAs: "span",
                                handler: O,
                                children: () => u.jsx("form", {
                                    onSubmit: E,
                                    children: u.jsxs(K, {
                                        space: "m",
                                        col: !0,
                                        children: [u.jsx(q, {
                                            children: u.jsx(jt, {
                                                size: "s",
                                                value: g,
                                                onChange: m,
                                                placeholder: b,
                                                required: !0
                                            })
                                        }), u.jsx(q, {
                                            children: u.jsx(at, {
                                                type: "submit",
                                                variant: "pr",
                                                size: "m2",
                                                full: !0,
                                                children: c.t("load")
                                            })
                                        })]
                                    })
                                })
                            })
                        })]
                    }), u.jsxs(K, {
                        className: pe("gjs-p-2 max-w-full", ye.bt, te.br),
                        col: !0,
                        space: "s",
                        children: [u.jsxs(K, {
                            className: pe("text-sm w-full"),
                            space: "s",
                            nowrap: !0,
                            children: [u.jsx(q, {
                                className: pe(nt.txtEllips, "max-w-full"),
                                grow: !0,
                                children: t.name
                            }), !!T && u.jsxs(q, {
                                children: ["by", " ", u.jsx("a", {
                                    className: pe(Da.link),
                                    href: T.link,
                                    rel: "noreferrer",
                                    target: "_blank",
                                    children: T.name
                                })]
                            })]
                        }), u.jsxs(K, {
                            items: "center",
                            children: [w && u.jsxs(q, {
                                className: pe("gjs-mr-auto"),
                                children: [c.t("projectManager.pages"), ": ", t.data.pages.length]
                            }), !t.isTemplate && l && u.jsx(q, {
                                className: pe("gjs-ml-auto"),
                                children: u.jsx(nv, {
                                    onConfirm: () => l(t),
                                    className: "",
                                    children: u.jsx(Xt, {
                                        title: c.t("delete"),
                                        children: u.jsx(be, {icon: fe.delete, size: Ee.sx})
                                    })
                                })
                            })]
                        })]
                    })]
                })
            })
        }), nC = xe(function ({
                                  templates: e,
                                  projectType: t,
                                  content: n,
                                  skipProjectNamePopover: r,
                                  onSelect: o,
                                  onRemove: i
                              }) {
            const [l] = If(), d = Ke().tScoped("templates"), g = Ae().editor, m = tv(n == null ? void 0 : n.itemsPerRow),
                v = o ?? (({template: b, loadTemplate: x}) => x(b));
            return u.jsx(u.Fragment, {
                children: g && e ? e.length === 0 ? u.jsx(K, {
                    justify: "center",
                    children: d("notFound")
                }) : u.jsx(pu, {
                    data: e,
                    listClassName: pe("grid gap-2 gjs-pr-2", m),
                    itemContent: (b, x) => u.jsx(VV, {
                        template: x,
                        projectType: t,
                        onSelect: v,
                        onRemove: i,
                        skipProjectNamePopover: r
                    }, x.id)
                }, l) : u.jsx(lu, {})
            })
        }), HV = xe(function () {
            var w;
            const t = Ae(), n = Qw(), {filteredTemplates: r, projectSourceFilter: o, projectTypeFilter: i} = n, l = Ke(),
                c = go(), {sdkOptions: d} = t, p = l.tScoped("projectManager"),
                g = async ({loadTemplate: j, template: C}) => {
                    j(C), c.close()
                }, m = async j => {
                    n.setProjectTypeFilter(j), await n.loadAllTemplates()
                }, v = j => {
                    n.removeProject(j.id), n.loadProjects()
                }, b = y.useMemo(() => [{id: $c.Existing, label: p("existentProjects")}, {
                    id: $c.Templates,
                    label: p("templates")
                }], [l]), x = ((w = d.project) == null ? void 0 : w.types) && Jg();
            return y.useEffect(() => {
                n.loadAllTemplates()
            }, []), u.jsxs(K, {
                col: !0,
                full: !0,
                space: "m",
                children: [x && u.jsx(K, {
                    items: "center",
                    space: "m",
                    children: u.jsx(q, {
                        className: pe("gjs-ml-auto"),
                        children: u.jsx(Ze, {
                            value: i,
                            onChange: m,
                            options: zI(),
                            handlerSelected: j => u.jsxs(u.Fragment, {children: [u.jsx("b", {children: p("projectType")}), ": ", j.label]})
                        })
                    })
                }), u.jsx(q, {
                    children: u.jsx(_s, {
                        tabs: b,
                        value: o,
                        onChange: n.setProjectSourceFilter
                    })
                }), u.jsx(q, {
                    grow: !0,
                    children: u.jsx(nC, {
                        templates: r,
                        projectType: Xe[i],
                        onSelect: g,
                        onRemove: v,
                        content: {itemsPerRow: 3}
                    })
                })]
            })
        }), FV = [{id: Gr.auto, label: "Auto"}, {id: Gr.dark, label: "Dark"}, {id: Gr.light, label: "Light"}],
        zV = {size: "s"}, rv = ".grapesjs", BV = (e, t) => {
            const n = e == null ? void 0 : e.settingsMenu;
            return n !== !1 && (n == null ? void 0 : n[t]) !== !1
        }, UV = ({actions: e, editor: t, buttons: n, sdkOptions: r}) => {
            const o = r.actions;
            return o === !1 ? [] : St(o) ? o({actions: e, editor: t}) : o || (n ? St(n) ? n({items: e, editor: t}) : n : e)
        }, WV = "gs-cmp-topbar-right", GV = xe(function ({editor: t, className: n, buttons: r, ...o}) {
            var Z;
            const i = Ae(), {theme: l, setTheme: c} = sr(), {
                    Commands: d,
                    UndoManager: p,
                    Components: g
                } = t, {
                    installEvent: m,
                    appInstalled: v,
                    isBrowserMode: b,
                    setInstallEvent: x,
                    sdkOptions: w,
                    isProjectTypeEmail: j
                } = i, C = go(), _ = Ke(), E = R => _.t(`actions.${R}`), k = (Z = w.commands) == null ? void 0 : Z.options,
                T = t.Storage.events, O = d.events, A = "change:changesCount", $ = (R, B) => () => {
                    St(R) ? R({editor: t}) : d.isActive(R) ? d.stop(R) : d.run(R, B)
                }, F = R => ({
                    [`${O.runCommand}${R}`]: ({setState: B}) => B({active: !0}),
                    [`${O.stopCommand}${R}`]: ({setState: B}) => B({active: !1})
                }), N = [
                    {
                        id: Wr.componentOutline,
                        icon: fe.borderRadius,
                        tooltip: E("componentOutline.title"),
                        onClick: $("core:component-outline"),
                        editorEvents: F("core:component-outline")
                    },
                    {
                        id: Wr.preview,
                        icon: fe.eye,
                        tooltip: E("preview.title"),
                        onClick: $("core:preview"),
                        editorEvents: F("core:preview")
                    },
                    {
                        id: Wr.fullscreen,
                        icon: fe.fullscreen,
                        tooltip: E("fullscreen.title"),
                        onClick: $("core:fullscreen", {target: "body"}),
                        editorEvents: F("core:fullscreen")
                    },
                    // {
                    //     id: Wr.showCode,
                    //     icon: fe.xml,
                    //     tooltip: E("showCode.title"),
                    //     onClick: () => C.open({
                    //         title: E("showCode.title"),
                    //         content: () => u.jsx(FI, {options: k == null ? void 0 : k[Wr.showCode]})
                    //     })
                    // },
                    {
                        id: Wr.showImportCode,
                        icon: fe.trayArrowDown,
                        tooltip: E("importCode.title"),
                        onClick: () => C.open({title: E("importCode.title"), content: () => u.jsx(MS, {})})
                    },
                    // {
                    //     id: Wr.clearCanvas,
                    //     icon: fe.delete,
                    //     tooltip: E("clearCanvas.title"),
                    //     onClick: () => C.confirm({
                    //         title: E("clearCanvas.title"),
                    //         content: E("clearCanvas.content"),
                    //         confirmButton: {variant: "danger", children: E("clearCanvas.title")},
                    //         onConfirm: () => {
                    //             var R;
                    //             if (j) {
                    //                 const B = (R = g.getWrapper()) == null ? void 0 : R.findType("mjml")[0];
                    //                 B == null || B.components().forEach(Q => {
                    //                     Q.components().map(I => I).forEach(I => I.remove())
                    //                 })
                    //             } else t.Components.clear()
                    //         }
                    //     })
                    // },
                    {
                        id: Wr.store,
                        tooltip: E("store.title"),
                        onClick: async () => !i.isSaving && t.store(),
                        editorEvents: {
                            "change:changesCount": ({setState: R}) => R({}),
                            [T.startStore]: ({setState: R}) => R({disabled: !0}),
                            [T.endStore]: ({setState: R}) => R({disabled: !1})
                        },
                        label: () => u.jsxs("div", {
                            className: se("relative"),
                            children: [u.jsx(be, {
                                icon: fe.floppy,
                                size: Ee.s
                            }), !!t.getDirtyCount() && !i.isSaving && u.jsx("div", {
                                className: se("absolute right-0 gjs-p-0.5 bottom-0 gjs-rounded-full", te.bg),
                                children: u.jsx("div", {className: se(nt.dot, te.bgW)})
                            }), i.isSaving && u.jsx("div", {
                                className: se("absolute right-0 bottom-0 gjs-rounded-full", te.bg),
                                children: u.jsx(be, {icon: fe.refresh, size: "11px", className: se(nt.spin)})
                            })]
                        })
                    },
                    {
                        id: Wr.undo,
                        icon: fe.arrowULeftTop,
                        disabled: !0,
                        onClick: $("core:undo"),
                        editorEvents: {[A]: ({setState: R}) => R({disabled: !p.hasUndo()})}
                    },
                    {
                        id: Wr.redo,
                        icon: fe.arrowURightTop,
                        disabled: !0,
                        onClick: $("core:redo"),
                        editorEvents: {[A]: ({setState: R}) => R({disabled: !p.hasRedo()})}
                    }], z = UV({actions: N, sdkOptions: w, editor: t, buttons: r}), V = [{
                    id: "about",
                    label: E("about.title"),
                    icon: fe.helpCircle,
                    action: () => C.open({size: "m", title: E("about.title"), content: () => u.jsx(VI, {})})
                }, {
                    id: "embed",
                    label: E("embed.title"),
                    icon: fe.powerPlug,
                    action: () => C.open({size: "m", title: E("embed.title"), content: () => u.jsx(HI, {})})
                }, {
                    id: "openProject", label: E("open.title"), icon: fe.folder, action: async () => {
                        let R = "";
                        try {
                            R = await (await SI({extensions: [rv]})).text()
                        } catch (B) {
                            return console.error(B)
                        }
                        i.loadProjectData(JSON.parse(R))
                    }
                }, {
                    id: "saveProject", label: E("save.title"), icon: fe.contentSave, action: async () => {
                        const R = t.getProjectData(), B = new Blob([JSON.stringify(R)]),
                            Q = `Untitled-${new Date().toISOString().replace("T", "-").replace(/:|\./g, "").substring(0, 17)}`;
                        try {
                            await CI(B, {fileName: `${Q}${rv}`, extensions: [rv]})
                        } catch (H) {
                            return console.error(H)
                        }
                    }
                }, {
                    id: "loadProject",
                    label: E("newProject.title"),
                    icon: fe.newspaperVariantOutline,
                    action: () => C.open({fullH: !0, title: E("newProject.title"), content: () => u.jsx(HV, {})})
                }, {
                    id: "installApp",
                    label: E(v ? "installApp.installed" : "installApp.title"),
                    icon: fe.applicationBracketsOutline,
                    action: async () => {
                        if (v) return;
                        m == null || m.prompt();
                        const R = await (m == null ? void 0 : m.userChoice);
                        (R == null ? void 0 : R.outcome) === "accepted" && x()
                    }
                }, ...w.customTheme ? [] : [{
                    id: "theme",
                    label: u.jsxs(K, {
                        items: "center",
                        space: "m",
                        children: [u.jsx(q, {children: "Theme"}), u.jsx(q, {
                            children: u.jsx(_s, {
                                tabs: FV,
                                onChange: R => c(R),
                                value: l,
                                variant: "pills"
                            })
                        })]
                    })
                }]].filter(({id: R}) => !((!b || !m) && R === "installApp" || !BV(w, R))), X = (R, B) => Q => {
                    St(R) && (R(Q), B())
                };
            return u.jsxs(K, {
                space: "s",
                items: "center",
                justify: "end",
                className: se(WV, et.xS, n),
                nowrap: !0, ...o,
                children: [z.map(({
                                      id: R,
                                      ...B
                                  }) => u.jsx(Gd, {size: "s", ...B}, R)), u.jsx(q, {
                    children: w.settingsMenu !== !1 && V.length > 0 && u.jsx(Wo, {
                        placement: "bottom-end",
                        title: !1,
                        padding: !1,
                        handler: u.jsx(be, {icon: fe.cog, size: Ee.s}),
                        buttonProps: zV,
                        overlay: !0,
                        children: ({close: R}) => u.jsx(u.Fragment, {
                            children: V.map(B => u.jsx(Tc, {
                                action: X(B.action, R),
                                icon: B.icon,
                                label: B.label
                            }, B.id))
                        })
                    })
                })]
            })
        }), KV = ({items: e, editor: t, customItems: n}) => n === !1 ? [] : St(n) ? n({items: e, editor: t}) : n || e,
        rC = e => ({icon: fe.plus, size: Ee.s, className: se("gs-utl-transition-transform", e && "gs-utl-rotate-45")}),
        qV = "gs-cmp-topbar-left", YV = xe(function ({buttons: t, className: n, style: r}) {
            const o = Ae(), i = Ke(), {isOpen: l, toggleOpen: c} = tS(), d = o.editor,
                g = i.tScoped("blockManager")("blocks"), m = KV({
                    items: [{
                        id: `blocks-${g}`,
                        tooltip: g,
                        size: ww.s,
                        icon: rC(l),
                        variant: xw.primary,
                        editorEvents: {
                            [Jn.toggleBlocksPanel]: ({fromEvent: v, setState: b}) => {
                                b({icon: rC(v.isOpen)})
                            }
                        },
                        onClick: () => c()
                    }], customItems: t, editor: d
                });
            return u.jsx(K, {
                space: "s",
                items: "center",
                justify: "start",
                className: se(qV, et.xS, n),
                style: r,
                nowrap: !0,
                children: m.map(({id: v, ...b}) => u.jsx(Gd, {...b}, v))
            })
        });

    function XV({devices: e, selected: t, className: n, style: r, select: o}) {
        const i = e.map(l => ({id: l.id, label: l.getName()}));
        return i.length ? u.jsx(Ze, {size: "xs", className: n, style: r, value: t, options: i, onChange: o}) : null
    }

    const ZV = "gs-devices", oC = y.memo(function ({className: t, style: n}) {
        return u.jsx(N9, {children: r => u.jsx(XV, {className: U(ZV, t), style: n, ...r})})
    }), gu = "gs-cmp-editor-topbar", JV = xe(function ({
                                                           className: t,
                                                           height: n,
                                                           style: r,
                                                           children: o,
                                                           leftContainer: i,
                                                           rightContainer: l,
                                                           devices: c
                                                       }) {
        const {topBarSize: d, isInPreview: p, editor: g, isTopSidebarOpen: m} = Ae(), v = n ?? d,
            b = y.useMemo(() => ({...r, minHeight: v, marginTop: p || !m ? `-${v}px` : 0}), [p, m, r]);
        return u.jsxs(u.Fragment, {
            children: [u.jsx(q, {
                className: U(gu, "gs-utl-transition-spacing gs-utl-w-full", ye.bb, te.br, t),
                style: b,
                children: o ?? u.jsxs(K, {
                    className: U(`${gu}__wrp`, "gs-utl-h-full"),
                    items: "center",
                    full: !0,
                    nowrap: !0,
                    children: [u.jsx(q, {
                        className: U(`${gu}__wrp-left`),
                        grow: !0,
                        children: i !== !1 && u.jsx(YV, {...i})
                    }), u.jsx(q, {
                        className: U(`${gu}__wrp-center`),
                        children: c !== !1 && u.jsx(oC, {...c})
                    }), u.jsx(q, {
                        className: U(`${gu}__wrp-right`),
                        grow: !0,
                        children: l !== !1 && g && u.jsx(GV, {editor: g, ...l})
                    })]
                })
            }), u.jsx(q, {
                className: U("gs-utl-transition-transform gs-utl-absolute gs-utl-top-0 gs-utl-left-0 gs-utl-z-10", !p && "-gs-utl-translate-y-full"),
                children: u.jsx(at, {
                    className: U("gs-cmp-close-preview gs-utl-m-4", te.bg),
                    size: "s",
                    onClick: () => g == null ? void 0 : g.Commands.stop("core:preview"),
                    children: u.jsx(be, {icon: fe.eyeOff, size: Ee.s})
                })
            })]
        })
    }), QV = "gs-sidebar-top", sC = y.memo(xe(function ({height: t, children: n, ...r}) {
        return u.jsx(JV, {
            height: t, ...r,
            style: zf(r),
            className: U(QV, "gs-utl-flex", Ff(r)),
            children: n ? Gn(n) : void 0
        })
    })), eH = "gs-canvas-sidebar-top", tH = y.memo(xe(function ({className: t, sidebarTop: n, ...r}) {
        return u.jsxs(_r, {
            className: U(eH, "gs-utl-flex gs-utl-flex-col", t),
            grow: !0, ...r,
            children: [u.jsx(sC, {...n}), u.jsx(bj, {grow: !0})]
        })
    })), nH = "gs-cmp-column", rH = y.memo(function ({className: t, children: n, full: r, ...o}) {
        return u.jsx(_r, {
            className: U(nH, te.bg, "gs-utl-flex gs-utl-flex-col", r && "gs-utl-h-full", t), ...o,
            children: Gn(n)
        })
    }), oH = "gs-cmp-input-field", sH = y.memo(xe(function ({
                                                                className: t,
                                                                style: n,
                                                                label: r,
                                                                name: o,
                                                                value: i,
                                                                size: l,
                                                                disabled: c,
                                                                inputType: d,
                                                                readOnly: p,
                                                                required: g,
                                                                placeholder: m,
                                                                onChange: v,
                                                                onInput: b,
                                                                editorEvents: x
                                                            }) {
        const {editor: w} = Ae(), [j, C] = y.useState(() => ({
                className: t,
                style: n,
                label: r,
                name: o,
                value: i,
                size: l,
                readOnly: p,
                disabled: c,
                required: g,
                placeholder: m
            })), _ = T => ({value: T, editor: w, state: j, setState: O => C(A => ({...A, ...O}))}),
            E = T => v == null ? void 0 : v(_(T)), k = T => b == null ? void 0 : b(_(T));
        return ml({editor: w, editorEvents: x, localState: j, setLocalState: C}), u.jsx(jt, {
            type: d,
            className: U(oH, j.className),
            style: j.style,
            label: j.label,
            name: j.name,
            value: j.value,
            size: j.size,
            required: j.required,
            disabled: j.disabled,
            readOnly: j.readOnly,
            placeholder: j.placeholder,
            onChange: E,
            onInput: k
        })
    }));

    function iH({children: e, accept: t, onChange: n, multiple: r = !0, ...o}) {
        const i = Ke(), l = y.useRef(null), c = () => {
            const {current: d} = l;
            d && (d.value = "", d.click())
        };
        return u.jsxs(u.Fragment, {
            children: [u.jsx("input", {
                className: se("hidden"),
                ref: l,
                type: "file",
                multiple: r,
                accept: t,
                onChange: n
            }), u.jsx(at, {variant: "pr", size: "m2", ...o, onClick: c, children: e || i.t("upload")})]
        })
    }

    const aH = xe(iH), lH = xe(function ({editor: t, assetProps: n, itemLayout: r, onSelect: o, onRemove: i}) {
            const l = Ji();
            return Gn(r({
                asset: Bs(l.toAsset(n)),
                assetProps: Bs(n),
                onSelect: c => o(l.toAssetProps(c)),
                onDelete: i && (c => i(l.toAssetProps(c))),
                editor: t
            }))
        }), cH = "gs-cmp-asset-card", uH = xe(function (t) {
            var m;
            const {assetProps: n, onSelect: r, onRemove: o, className: i, itemLayout: l} = t, c = Ke(), {editor: d} = Ae();
            if (l) return d ? u.jsx(lH, {...t, editor: d, itemLayout: l}) : null;
            const {src: p} = n, g = n.name || ((m = p.split("/").pop()) == null ? void 0 : m.split("?").shift());
            return u.jsx(tr, {
                padding: !1, className: pe(cH, "overflow-hidden max-w-full group", i), children: u.jsxs(K, {
                    col: !0,
                    children: [u.jsxs(q, {
                        className: pe("relative group h-24 cursor-pointer bg-checker"),
                        onClick: () => r(n),
                        children: [u.jsx("div", {
                            className: pe("w-full h-full bg-contain bg-no-repeat bg-center"),
                            style: {backgroundImage: `url("${p}")`}
                        }), u.jsx(K, {
                            justify: "center",
                            items: "center",
                            className: pe(nt.coverAbs, te.bgH75, "group-hover:gs-utl-opacity-100 opacity-0 transition-opacity"),
                            children: u.jsx(at, {
                                className: pe("text-sm"),
                                size: "m2",
                                variant: "pr",
                                children: c.t("select")
                            })
                        })]
                    }), u.jsxs(K, {
                        className: pe("gjs-p-1 max-w-full"),
                        space: "s",
                        items: "center",
                        nowrap: !0,
                        children: [u.jsx(q, {
                            className: pe(nt.txtEllips, "text-sm gjs-mr-auto"),
                            children: g
                        }), o && u.jsx(nv, {
                            onConfirm: () => o == null ? void 0 : o(n),
                            text: u.jsxs(K, {
                                col: !0,
                                space: "m",
                                items: "stretch",
                                children: [u.jsx("p", {
                                    className: pe("text-center", te.txtHighEmphasis),
                                    children: c.t("assetManager.deleteConfirmQuestion")
                                }), u.jsx("p", {
                                    className: pe("text-center"),
                                    children: c.t("assetManager.deleteConfirmExplanation")
                                })]
                            }),
                            confirmButtonProps: {variant: "danger"},
                            children: u.jsx(Xt, {title: c.t("delete"), children: u.jsx(be, {icon: fe.delete, size: Ee.sx})})
                        })]
                    })]
                })
            })
        }), ov = "gs-asset-manager", dH = {search: !0, addUrl: !0, upload: !0}, fH = xe(function ({
                                                                                                      assetProps: t,
                                                                                                      typeFilterOptions: n,
                                                                                                      providerFilterOptions: r,
                                                                                                      typeFilter: o,
                                                                                                      providerFilter: i,
                                                                                                      searchValue: l,
                                                                                                      isLoading: c,
                                                                                                      optionalType: d,
                                                                                                      optionalProvider: p,
                                                                                                      useLocalSearch: g,
                                                                                                      itemLayout: m,
                                                                                                      content: v,
                                                                                                      onSelect: b,
                                                                                                      onChangeTypeFilter: x,
                                                                                                      onChangeProviderFilter: w,
                                                                                                      onChangeSearchValue: j,
                                                                                                      onChangeUpload: C,
                                                                                                      onAddUrl: _,
                                                                                                      onRemove: E,
                                                                                                      onEndReached: k
                                                                                                  }) {
            const T = Ae(), {editor: O} = T, A = Ke(), [$] = If(),
                F = tv(v == null ? void 0 : v.itemsPerRow), [N, z] = y.useState(""),
                V = (v == null ? void 0 : v.header) === !1 ? !1 : {...dH, ...ps(v == null ? void 0 : v.header) ? v.header : {}};
            if (!O) return;
            const X = g ? t.filter(Z => !(l && !Ma(Z.src, l) && !Ma(Z.name ?? "", l))) : t;
            return u.jsxs(K, {
                className: se(ov, "relative gs-utl-h-full", c && nt.disabled),
                nowrap: !0,
                col: !0,
                space: "m",
                children: [V !== !1 && u.jsxs(K, {
                    className: se(`${ov}__header`, "gs-utl-gap-4"),
                    justify: "between",
                    items: "center",
                    children: [u.jsxs(K, {
                        items: "center",
                        space: "m",
                        children: [V.search && u.jsx(q, {
                            children: u.jsx(jt, {
                                size: "s",
                                type: "search",
                                value: l,
                                onInput: j,
                                placeholder: `${A.t("search")}...`
                            })
                        }), n.length > (d ? 0 : 1) && u.jsx(q, {
                            children: u.jsx(Ze, {
                                className: se("items-center"),
                                size: "m",
                                options: n,
                                value: o,
                                onChange: x,
                                emptyState: A.t("assetManager.assetTypes.all"),
                                includeEmpty: d
                            })
                        }), r.length > (p ? 0 : 1) && u.jsx(q, {
                            children: u.jsx(Ze, {
                                className: se("items-center"),
                                size: "m",
                                options: r.map(Z => ({...Z, label: St(Z.label) ? Z.label({editor: O}) : Z.label})),
                                value: i,
                                onChange: w,
                                emptyState: A.t("assetManager.noProvider"),
                                includeEmpty: p
                            })
                        })]
                    }), u.jsxs(K, {
                        items: "center",
                        space: "m",
                        children: [V.upload && u.jsx(q, {children: u.jsx(aH, {onChange: C})}), V.addUrl && !!_ && u.jsx(q, {
                            children: u.jsx(Wo, {
                                overlay: !0,
                                placement: "bottom-end",
                                title: !1,
                                buttonAs: "span",
                                handler: u.jsx(at, {variant: "pr", size: "m2", children: A.t("assetManager.addUrl")}),
                                children: ({close: Z}) => u.jsxs(K, {
                                    space: "m",
                                    children: [u.jsx(q, {
                                        children: u.jsx(jt, {
                                            type: "url",
                                            size: "s",
                                            value: N,
                                            onChange: z,
                                            placeholder: A.t("assetManager.inputPlh")
                                        })
                                    }), u.jsx(q, {
                                        children: u.jsx(at, {
                                            variant: "pr", size: "m2", onClick: () => {
                                                _(N), Z()
                                            }, children: A.t("add")
                                        })
                                    })]
                                })
                            })
                        })]
                    })]
                }), u.jsx(K, {
                    className: se(`${ov}__content`, "gs-utl-h-[75vh] gs-utl-flex-grow"),
                    space: "m",
                    col: !0,
                    nowrap: !0,
                    children: !c && !X.length ? u.jsx(K, {
                        justify: "center",
                        children: A.t("noItems")
                    }) : !!$ && u.jsx(pu, {
                        data: X,
                        listClassName: se("gs-utl-grid gs-utl-gap-2", F),
                        endReached: k,
                        itemContent: (Z, R) => u.jsx(uH, {assetProps: R, onSelect: b, onRemove: E, itemLayout: m}, R.id),
                        components: {Footer: k ? pH : void 0}
                    })
                }), c && u.jsx(lu, {abs: !0})]
            })
        }), pH = () => u.jsx("div", {style: {padding: "2rem", display: "flex", justifyContent: "center", height: 200}}),
        iC = xe(function ({
                              panelId: t,
                              content: n,
                              assets: r,
                              types: o,
                              providers: i,
                              typeId: l,
                              providerId: c,
                              optionalType: d,
                              optionalProvider: p,
                              onSelect: g,
                              close: m
                          }) {
            const {appEditorStore: v, i18nStore: b} = On(), {editor: x} = v, w = Ji(), {customOnLoad: j} = w, C = Gw(t);
            y.useEffect(() => {
                const O = $ => zt($) ? {id: $, label: b.t(`assetManager.assetTypes.${$}`) || $} : $;
                C.setCustomTypes(o == null ? void 0 : o.map(O)), C.setCustomProviders(zt(i) ? [i] : i), l ? C.setTypeFilter(l) : C.initTypeFilter(), c ? C.setProviderFilter(c) : C.initProviderFilter(), d ? C.setOptionalType(d) : C.initOptionalType(), p ? C.setOptionalProvider(p) : C.initOptionalProvider();
                const A = setTimeout(() => C.loadAssets());
                return () => clearTimeout(A)
            }, [o, i, l, c, d, p]);
            const _ = O => {
                    w.addToProjectAssets([{id: O, src: O, type: C.typeFilter ?? Qs.image}])
                }, E = O => {
                    x && (g == null || g({asset: w.toAsset(O), assetProps: O, editor: x}), m == null || m())
                }, k = r == null ? void 0 : r.map(w.toAssetProps),
                T = C.shouldLoadNextPage ? () => C.loadAssets(!1) : void 0;
            return u.jsx(fH, {
                assetProps: k ?? C.assetProps,
                typeFilter: C.typeFilter,
                typeFilterOptions: C.typeFilterOptions,
                providerFilter: C.providerFilter,
                providerFilterOptions: C.providerFilterOptions,
                searchValue: C.searchValue,
                onChangeTypeFilter: O => {
                    C.setTypeFilter(O), C.loadAssets()
                },
                onChangeProviderFilter: O => {
                    C.setProviderFilter(O), C.loadAssets()
                },
                onChangeSearchValue: C.setSearchValue,
                onSelect: E,
                onAddUrl: j ? void 0 : _,
                onChangeUpload: O => w.uploadFile(O.nativeEvent),
                onRemove: k ? void 0 : C.handleDelete,
                onEndReached: T,
                isLoading: C.isLoading,
                itemLayout: C.itemLayout,
                content: n,
                optionalType: C.optionalType,
                optionalProvider: C.optionalProvider,
                useLocalSearch: !C.reloadOnInput
            })
        });
    var gH = globalThis && globalThis.__extends || function () {
            var e = function (t, n) {
                return e = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (r, o) {
                    r.__proto__ = o
                } || function (r, o) {
                    for (var i in o) Object.prototype.hasOwnProperty.call(o, i) && (r[i] = o[i])
                }, e(t, n)
            };
            return function (t, n) {
                e(t, n);

                function r() {
                    this.constructor = t
                }

                t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r)
            }
        }(), fn = globalThis && globalThis.__assign || function () {
            return fn = Object.assign || function (e) {
                for (var t, n = 1, r = arguments.length; n < r; n++) {
                    t = arguments[n];
                    for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o])
                }
                return e
            }, fn.apply(this, arguments)
        }, aC = {width: "100%", height: "10px", top: "0px", left: "0px", cursor: "row-resize"},
        lC = {width: "10px", height: "100%", top: "0px", left: "0px", cursor: "col-resize"},
        np = {width: "20px", height: "20px", position: "absolute"}, hH = {
            top: fn(fn({}, aC), {top: "-5px"}),
            right: fn(fn({}, lC), {left: void 0, right: "-5px"}),
            bottom: fn(fn({}, aC), {top: void 0, bottom: "-5px"}),
            left: fn(fn({}, lC), {left: "-5px"}),
            topRight: fn(fn({}, np), {right: "-10px", top: "-10px", cursor: "ne-resize"}),
            bottomRight: fn(fn({}, np), {right: "-10px", bottom: "-10px", cursor: "se-resize"}),
            bottomLeft: fn(fn({}, np), {left: "-10px", bottom: "-10px", cursor: "sw-resize"}),
            topLeft: fn(fn({}, np), {left: "-10px", top: "-10px", cursor: "nw-resize"})
        }, mH = function (e) {
            gH(t, e);

            function t() {
                var n = e !== null && e.apply(this, arguments) || this;
                return n.onMouseDown = function (r) {
                    n.props.onResizeStart(r, n.props.direction)
                }, n.onTouchStart = function (r) {
                    n.props.onResizeStart(r, n.props.direction)
                }, n
            }

            return t.prototype.render = function () {
                return y.createElement("div", {
                    className: this.props.className || "",
                    style: fn(fn({
                        position: "absolute",
                        userSelect: "none"
                    }, hH[this.props.direction]), this.props.replaceStyles || {}),
                    onMouseDown: this.onMouseDown,
                    onTouchStart: this.onTouchStart
                }, this.props.children)
            }, t
        }(y.PureComponent), vH = globalThis && globalThis.__extends || function () {
            var e = function (t, n) {
                return e = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (r, o) {
                    r.__proto__ = o
                } || function (r, o) {
                    for (var i in o) Object.prototype.hasOwnProperty.call(o, i) && (r[i] = o[i])
                }, e(t, n)
            };
            return function (t, n) {
                e(t, n);

                function r() {
                    this.constructor = t
                }

                t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r)
            }
        }(), ns = globalThis && globalThis.__assign || function () {
            return ns = Object.assign || function (e) {
                for (var t, n = 1, r = arguments.length; n < r; n++) {
                    t = arguments[n];
                    for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o])
                }
                return e
            }, ns.apply(this, arguments)
        }, yH = {width: "auto", height: "auto"}, rp = function (e, t, n) {
            return Math.max(Math.min(e, n), t)
        }, cC = function (e, t, n) {
            var r = Math.round(e / t);
            return r * t + n * (r - 1)
        }, gl = function (e, t) {
            return new RegExp(e, "i").test(t)
        }, op = function (e) {
            return !!(e.touches && e.touches.length)
        }, bH = function (e) {
            return !!((e.clientX || e.clientX === 0) && (e.clientY || e.clientY === 0))
        }, uC = function (e, t, n) {
            n === void 0 && (n = 0);
            var r = t.reduce(function (i, l, c) {
                return Math.abs(l - e) < Math.abs(t[i] - e) ? c : i
            }, 0), o = Math.abs(t[r] - e);
            return n === 0 || o < n ? t[r] : e
        }, sv = function (e) {
            return e = e.toString(), e === "auto" || e.endsWith("px") || e.endsWith("%") || e.endsWith("vh") || e.endsWith("vw") || e.endsWith("vmax") || e.endsWith("vmin") ? e : e + "px"
        }, sp = function (e, t, n, r) {
            if (e && typeof e == "string") {
                if (e.endsWith("px")) return Number(e.replace("px", ""));
                if (e.endsWith("%")) {
                    var o = Number(e.replace("%", "")) / 100;
                    return t * o
                }
                if (e.endsWith("vw")) {
                    var o = Number(e.replace("vw", "")) / 100;
                    return n * o
                }
                if (e.endsWith("vh")) {
                    var o = Number(e.replace("vh", "")) / 100;
                    return r * o
                }
            }
            return e
        }, xH = function (e, t, n, r, o, i, l) {
            return r = sp(r, e.width, t, n), o = sp(o, e.height, t, n), i = sp(i, e.width, t, n), l = sp(l, e.height, t, n), {
                maxWidth: typeof r > "u" ? void 0 : Number(r),
                maxHeight: typeof o > "u" ? void 0 : Number(o),
                minWidth: typeof i > "u" ? void 0 : Number(i),
                minHeight: typeof l > "u" ? void 0 : Number(l)
            }
        }, wH = function (e) {
            return Array.isArray(e) ? e : [e, e]
        },
        SH = ["as", "ref", "style", "className", "grid", "gridGap", "snap", "bounds", "boundsByDirection", "size", "defaultSize", "minWidth", "minHeight", "maxWidth", "maxHeight", "lockAspectRatio", "lockAspectRatioExtraWidth", "lockAspectRatioExtraHeight", "enable", "handleStyles", "handleClasses", "handleWrapperStyle", "handleWrapperClass", "children", "onResizeStart", "onResize", "onResizeStop", "handleComponent", "scale", "resizeRatio", "snapGap"],
        dC = "__resizable_base__", jH = function (e) {
            vH(t, e);

            function t(n) {
                var r, o, i, l, c = e.call(this, n) || this;
                return c.ratio = 1, c.resizable = null, c.parentLeft = 0, c.parentTop = 0, c.resizableLeft = 0, c.resizableRight = 0, c.resizableTop = 0, c.resizableBottom = 0, c.targetLeft = 0, c.targetTop = 0, c.appendBase = function () {
                    if (!c.resizable || !c.window) return null;
                    var d = c.parentNode;
                    if (!d) return null;
                    var p = c.window.document.createElement("div");
                    return p.style.width = "100%", p.style.height = "100%", p.style.position = "absolute", p.style.transform = "scale(0, 0)", p.style.left = "0", p.style.flex = "0 0 100%", p.classList ? p.classList.add(dC) : p.className += dC, d.appendChild(p), p
                }, c.removeBase = function (d) {
                    var p = c.parentNode;
                    p && p.removeChild(d)
                }, c.state = {
                    isResizing: !1,
                    width: (o = (r = c.propsSize) === null || r === void 0 ? void 0 : r.width) !== null && o !== void 0 ? o : "auto",
                    height: (l = (i = c.propsSize) === null || i === void 0 ? void 0 : i.height) !== null && l !== void 0 ? l : "auto",
                    direction: "right",
                    original: {x: 0, y: 0, width: 0, height: 0},
                    backgroundStyle: {
                        height: "100%",
                        width: "100%",
                        backgroundColor: "rgba(0,0,0,0)",
                        cursor: "auto",
                        opacity: 0,
                        position: "fixed",
                        zIndex: 9999,
                        top: "0",
                        left: "0",
                        bottom: "0",
                        right: "0"
                    },
                    flexBasis: void 0
                }, c.onResizeStart = c.onResizeStart.bind(c), c.onMouseMove = c.onMouseMove.bind(c), c.onMouseUp = c.onMouseUp.bind(c), c
            }

            return Object.defineProperty(t.prototype, "parentNode", {
                get: function () {
                    return this.resizable ? this.resizable.parentNode : null
                }, enumerable: !1, configurable: !0
            }), Object.defineProperty(t.prototype, "window", {
                get: function () {
                    return !this.resizable || !this.resizable.ownerDocument ? null : this.resizable.ownerDocument.defaultView
                }, enumerable: !1, configurable: !0
            }), Object.defineProperty(t.prototype, "propsSize", {
                get: function () {
                    return this.props.size || this.props.defaultSize || yH
                }, enumerable: !1, configurable: !0
            }), Object.defineProperty(t.prototype, "size", {
                get: function () {
                    var n = 0, r = 0;
                    if (this.resizable && this.window) {
                        var o = this.resizable.offsetWidth, i = this.resizable.offsetHeight,
                            l = this.resizable.style.position;
                        l !== "relative" && (this.resizable.style.position = "relative"), n = this.resizable.style.width !== "auto" ? this.resizable.offsetWidth : o, r = this.resizable.style.height !== "auto" ? this.resizable.offsetHeight : i, this.resizable.style.position = l
                    }
                    return {width: n, height: r}
                }, enumerable: !1, configurable: !0
            }), Object.defineProperty(t.prototype, "sizeStyle", {
                get: function () {
                    var n = this, r = this.props.size, o = function (c) {
                            var d;
                            if (typeof n.state[c] > "u" || n.state[c] === "auto") return "auto";
                            if (n.propsSize && n.propsSize[c] && (!((d = n.propsSize[c]) === null || d === void 0) && d.toString().endsWith("%"))) {
                                if (n.state[c].toString().endsWith("%")) return n.state[c].toString();
                                var p = n.getParentSize(), g = Number(n.state[c].toString().replace("px", "")),
                                    m = g / p[c] * 100;
                                return m + "%"
                            }
                            return sv(n.state[c])
                        }, i = r && typeof r.width < "u" && !this.state.isResizing ? sv(r.width) : o("width"),
                        l = r && typeof r.height < "u" && !this.state.isResizing ? sv(r.height) : o("height");
                    return {width: i, height: l}
                }, enumerable: !1, configurable: !0
            }), t.prototype.getParentSize = function () {
                if (!this.parentNode) return this.window ? {
                    width: this.window.innerWidth,
                    height: this.window.innerHeight
                } : {width: 0, height: 0};
                var n = this.appendBase();
                if (!n) return {width: 0, height: 0};
                var r = !1, o = this.parentNode.style.flexWrap;
                o !== "wrap" && (r = !0, this.parentNode.style.flexWrap = "wrap"), n.style.position = "relative", n.style.minWidth = "100%", n.style.minHeight = "100%";
                var i = {width: n.offsetWidth, height: n.offsetHeight};
                return r && (this.parentNode.style.flexWrap = o), this.removeBase(n), i
            }, t.prototype.bindEvents = function () {
                this.window && (this.window.addEventListener("mouseup", this.onMouseUp), this.window.addEventListener("mousemove", this.onMouseMove), this.window.addEventListener("mouseleave", this.onMouseUp), this.window.addEventListener("touchmove", this.onMouseMove, {
                    capture: !0,
                    passive: !1
                }), this.window.addEventListener("touchend", this.onMouseUp))
            }, t.prototype.unbindEvents = function () {
                this.window && (this.window.removeEventListener("mouseup", this.onMouseUp), this.window.removeEventListener("mousemove", this.onMouseMove), this.window.removeEventListener("mouseleave", this.onMouseUp), this.window.removeEventListener("touchmove", this.onMouseMove, !0), this.window.removeEventListener("touchend", this.onMouseUp))
            }, t.prototype.componentDidMount = function () {
                if (!(!this.resizable || !this.window)) {
                    var n = this.window.getComputedStyle(this.resizable);
                    this.setState({
                        width: this.state.width || this.size.width,
                        height: this.state.height || this.size.height,
                        flexBasis: n.flexBasis !== "auto" ? n.flexBasis : void 0
                    })
                }
            }, t.prototype.componentWillUnmount = function () {
                this.window && this.unbindEvents()
            }, t.prototype.createSizeForCssProperty = function (n, r) {
                var o = this.propsSize && this.propsSize[r];
                return this.state[r] === "auto" && this.state.original[r] === n && (typeof o > "u" || o === "auto") ? "auto" : n
            }, t.prototype.calculateNewMaxFromBoundary = function (n, r) {
                var o = this.props.boundsByDirection, i = this.state.direction, l = o && gl("left", i),
                    c = o && gl("top", i), d, p;
                if (this.props.bounds === "parent") {
                    var g = this.parentNode;
                    g && (d = l ? this.resizableRight - this.parentLeft : g.offsetWidth + (this.parentLeft - this.resizableLeft), p = c ? this.resizableBottom - this.parentTop : g.offsetHeight + (this.parentTop - this.resizableTop))
                } else this.props.bounds === "window" ? this.window && (d = l ? this.resizableRight : this.window.innerWidth - this.resizableLeft, p = c ? this.resizableBottom : this.window.innerHeight - this.resizableTop) : this.props.bounds && (d = l ? this.resizableRight - this.targetLeft : this.props.bounds.offsetWidth + (this.targetLeft - this.resizableLeft), p = c ? this.resizableBottom - this.targetTop : this.props.bounds.offsetHeight + (this.targetTop - this.resizableTop));
                return d && Number.isFinite(d) && (n = n && n < d ? n : d), p && Number.isFinite(p) && (r = r && r < p ? r : p), {
                    maxWidth: n,
                    maxHeight: r
                }
            }, t.prototype.calculateNewSizeFromDirection = function (n, r) {
                var o = this.props.scale || 1, i = wH(this.props.resizeRatio || 1), l = i[0], c = i[1], d = this.state,
                    p = d.direction, g = d.original, m = this.props, v = m.lockAspectRatio,
                    b = m.lockAspectRatioExtraHeight, x = m.lockAspectRatioExtraWidth, w = g.width, j = g.height,
                    C = b || 0, _ = x || 0;
                return gl("right", p) && (w = g.width + (n - g.x) * l / o, v && (j = (w - _) / this.ratio + C)), gl("left", p) && (w = g.width - (n - g.x) * l / o, v && (j = (w - _) / this.ratio + C)), gl("bottom", p) && (j = g.height + (r - g.y) * c / o, v && (w = (j - C) * this.ratio + _)), gl("top", p) && (j = g.height - (r - g.y) * c / o, v && (w = (j - C) * this.ratio + _)), {
                    newWidth: w,
                    newHeight: j
                }
            }, t.prototype.calculateNewSizeFromAspectRatio = function (n, r, o, i) {
                var l = this.props, c = l.lockAspectRatio, d = l.lockAspectRatioExtraHeight,
                    p = l.lockAspectRatioExtraWidth, g = typeof i.width > "u" ? 10 : i.width,
                    m = typeof o.width > "u" || o.width < 0 ? n : o.width, v = typeof i.height > "u" ? 10 : i.height,
                    b = typeof o.height > "u" || o.height < 0 ? r : o.height, x = d || 0, w = p || 0;
                if (c) {
                    var j = (v - x) * this.ratio + w, C = (b - x) * this.ratio + w, _ = (g - w) / this.ratio + x,
                        E = (m - w) / this.ratio + x, k = Math.max(g, j), T = Math.min(m, C), O = Math.max(v, _),
                        A = Math.min(b, E);
                    n = rp(n, k, T), r = rp(r, O, A)
                } else n = rp(n, g, m), r = rp(r, v, b);
                return {newWidth: n, newHeight: r}
            }, t.prototype.setBoundingClientRect = function () {
                var n = 1 / (this.props.scale || 1);
                if (this.props.bounds === "parent") {
                    var r = this.parentNode;
                    if (r) {
                        var o = r.getBoundingClientRect();
                        this.parentLeft = o.left * n, this.parentTop = o.top * n
                    }
                }
                if (this.props.bounds && typeof this.props.bounds != "string") {
                    var i = this.props.bounds.getBoundingClientRect();
                    this.targetLeft = i.left * n, this.targetTop = i.top * n
                }
                if (this.resizable) {
                    var l = this.resizable.getBoundingClientRect(), c = l.left, d = l.top, p = l.right, g = l.bottom;
                    this.resizableLeft = c * n, this.resizableRight = p * n, this.resizableTop = d * n, this.resizableBottom = g * n
                }
            }, t.prototype.onResizeStart = function (n, r) {
                if (!(!this.resizable || !this.window)) {
                    var o = 0, i = 0;
                    if (n.nativeEvent && bH(n.nativeEvent) ? (o = n.nativeEvent.clientX, i = n.nativeEvent.clientY) : n.nativeEvent && op(n.nativeEvent) && (o = n.nativeEvent.touches[0].clientX, i = n.nativeEvent.touches[0].clientY), this.props.onResizeStart && this.resizable) {
                        var l = this.props.onResizeStart(n, r, this.resizable);
                        if (l === !1) return
                    }
                    this.props.size && (typeof this.props.size.height < "u" && this.props.size.height !== this.state.height && this.setState({height: this.props.size.height}), typeof this.props.size.width < "u" && this.props.size.width !== this.state.width && this.setState({width: this.props.size.width})), this.ratio = typeof this.props.lockAspectRatio == "number" ? this.props.lockAspectRatio : this.size.width / this.size.height;
                    var c, d = this.window.getComputedStyle(this.resizable);
                    if (d.flexBasis !== "auto") {
                        var p = this.parentNode;
                        if (p) {
                            var g = this.window.getComputedStyle(p).flexDirection;
                            this.flexDir = g.startsWith("row") ? "row" : "column", c = d.flexBasis
                        }
                    }
                    this.setBoundingClientRect(), this.bindEvents();
                    var m = {
                        original: {x: o, y: i, width: this.size.width, height: this.size.height},
                        isResizing: !0,
                        backgroundStyle: ns(ns({}, this.state.backgroundStyle), {cursor: this.window.getComputedStyle(n.target).cursor || "auto"}),
                        direction: r,
                        flexBasis: c
                    };
                    this.setState(m)
                }
            }, t.prototype.onMouseMove = function (n) {
                var r = this;
                if (!(!this.state.isResizing || !this.resizable || !this.window)) {
                    if (this.window.TouchEvent && op(n)) try {
                        n.preventDefault(), n.stopPropagation()
                    } catch {
                    }
                    var o = this.props, i = o.maxWidth, l = o.maxHeight, c = o.minWidth, d = o.minHeight,
                        p = op(n) ? n.touches[0].clientX : n.clientX, g = op(n) ? n.touches[0].clientY : n.clientY,
                        m = this.state, v = m.direction, b = m.original, x = m.width, w = m.height,
                        j = this.getParentSize(), C = xH(j, this.window.innerWidth, this.window.innerHeight, i, l, c, d);
                    i = C.maxWidth, l = C.maxHeight, c = C.minWidth, d = C.minHeight;
                    var _ = this.calculateNewSizeFromDirection(p, g), E = _.newHeight, k = _.newWidth,
                        T = this.calculateNewMaxFromBoundary(i, l);
                    this.props.snap && this.props.snap.x && (k = uC(k, this.props.snap.x, this.props.snapGap)), this.props.snap && this.props.snap.y && (E = uC(E, this.props.snap.y, this.props.snapGap));
                    var O = this.calculateNewSizeFromAspectRatio(k, E, {width: T.maxWidth, height: T.maxHeight}, {
                        width: c,
                        height: d
                    });
                    if (k = O.newWidth, E = O.newHeight, this.props.grid) {
                        var A = cC(k, this.props.grid[0], this.props.gridGap ? this.props.gridGap[0] : 0),
                            $ = cC(E, this.props.grid[1], this.props.gridGap ? this.props.gridGap[1] : 0),
                            F = this.props.snapGap || 0, N = F === 0 || Math.abs(A - k) <= F ? A : k,
                            z = F === 0 || Math.abs($ - E) <= F ? $ : E;
                        k = N, E = z
                    }
                    var V = {width: k - b.width, height: E - b.height};
                    if (x && typeof x == "string") {
                        if (x.endsWith("%")) {
                            var X = k / j.width * 100;
                            k = X + "%"
                        } else if (x.endsWith("vw")) {
                            var Z = k / this.window.innerWidth * 100;
                            k = Z + "vw"
                        } else if (x.endsWith("vh")) {
                            var R = k / this.window.innerHeight * 100;
                            k = R + "vh"
                        }
                    }
                    if (w && typeof w == "string") {
                        if (w.endsWith("%")) {
                            var X = E / j.height * 100;
                            E = X + "%"
                        } else if (w.endsWith("vw")) {
                            var Z = E / this.window.innerWidth * 100;
                            E = Z + "vw"
                        } else if (w.endsWith("vh")) {
                            var R = E / this.window.innerHeight * 100;
                            E = R + "vh"
                        }
                    }
                    var B = {
                        width: this.createSizeForCssProperty(k, "width"),
                        height: this.createSizeForCssProperty(E, "height")
                    };
                    this.flexDir === "row" ? B.flexBasis = B.width : this.flexDir === "column" && (B.flexBasis = B.height);
                    var Q = this.state.width !== B.width, H = this.state.height !== B.height,
                        I = this.state.flexBasis !== B.flexBasis, D = Q || H || I;
                    D && mr.flushSync(function () {
                        r.setState(B)
                    }), this.props.onResize && D && this.props.onResize(n, v, this.resizable, V)
                }
            }, t.prototype.onMouseUp = function (n) {
                var r, o, i = this.state, l = i.isResizing, c = i.direction, d = i.original;
                if (!(!l || !this.resizable)) {
                    var p = {width: this.size.width - d.width, height: this.size.height - d.height};
                    this.props.onResizeStop && this.props.onResizeStop(n, c, this.resizable, p), this.props.size && this.setState({
                        width: (r = this.props.size.width) !== null && r !== void 0 ? r : "auto",
                        height: (o = this.props.size.height) !== null && o !== void 0 ? o : "auto"
                    }), this.unbindEvents(), this.setState({
                        isResizing: !1,
                        backgroundStyle: ns(ns({}, this.state.backgroundStyle), {cursor: "auto"})
                    })
                }
            }, t.prototype.updateSize = function (n) {
                var r, o;
                this.setState({
                    width: (r = n.width) !== null && r !== void 0 ? r : "auto",
                    height: (o = n.height) !== null && o !== void 0 ? o : "auto"
                })
            }, t.prototype.renderResizer = function (n) {
                var r = this, o = this.props, i = o.enable, l = o.handleStyles, c = o.handleClasses,
                    d = o.handleWrapperStyle, p = o.handleWrapperClass, g = o.handleComponent;
                if (!i) return null;
                var m = n.filter(function (v) {
                    return i[v] !== !1
                }).map(function (v) {
                    return i[v] !== !1 ? y.createElement(mH, {
                        key: v,
                        direction: v,
                        onResizeStart: r.onResizeStart,
                        replaceStyles: l && l[v],
                        className: c && c[v]
                    }, g && g[v] ? g[v] : null) : null
                });
                return y.createElement("div", {className: p, style: d}, m)
            }, t.prototype.render = function () {
                var n = this, r = Object.keys(this.props).reduce(function (l, c) {
                    return SH.indexOf(c) !== -1 || (l[c] = n.props[c]), l
                }, {}), o = ns(ns(ns({
                    position: "relative",
                    userSelect: this.state.isResizing ? "none" : "auto"
                }, this.props.style), this.sizeStyle), {
                    maxWidth: this.props.maxWidth,
                    maxHeight: this.props.maxHeight,
                    minWidth: this.props.minWidth,
                    minHeight: this.props.minHeight,
                    boxSizing: "border-box",
                    flexShrink: 0
                });
                this.state.flexBasis && (o.flexBasis = this.state.flexBasis);
                var i = this.props.as || "div";
                return y.createElement(i, ns({style: o, className: this.props.className}, r, {
                    ref: function (l) {
                        l && (n.resizable = l)
                    }
                }), this.state.isResizing && y.createElement("div", {style: this.state.backgroundStyle}), this.renderResizer(["topLeft", "top", "topRight", "left"]), this.props.children, this.renderResizer(["right", "bottomLeft", "bottom", "bottomRight"]))
            }, t.defaultProps = {
                as: "div",
                onResizeStart: function () {
                },
                onResize: function () {
                },
                onResizeStop: function () {
                },
                enable: {
                    top: !0,
                    right: !0,
                    bottom: !0,
                    left: !0,
                    topRight: !0,
                    bottomRight: !0,
                    bottomLeft: !0,
                    topLeft: !0
                },
                style: {},
                grid: [1, 1],
                gridGap: [0, 0],
                lockAspectRatio: !1,
                lockAspectRatioExtraWidth: 0,
                lockAspectRatioExtraHeight: 0,
                scale: 1,
                resizeRatio: 1,
                snapGap: 0
            }, t
        }(y.PureComponent);

    function ip({
                    className: e,
                    children: t,
                    top: n,
                    bottom: r,
                    right: o,
                    left: i,
                    width: l,
                    height: c,
                    minHeight: d,
                    minWidth: p,
                    maxHeight: g,
                    maxWidth: m,
                    style: v,
                    onResize: b,
                    onResizeStop: x,
                    ...w
                }) {
        const j = {
                top: n || !1,
                right: o || !1,
                bottom: r || !1,
                left: i || !1,
                topRight: !1,
                bottomRight: !1,
                bottomLeft: !1,
                topLeft: !1
            }, C = {width: l || "auto", height: c || "auto"}, _ = se("z-10", te.hBgAct), E = {bottom: _, right: _, left: _},
            k = {bottom: {bottom: 0, height: 2}, right: {right: -1, width: 2}, left: {left: -1, width: 2}};
        return u.jsx(jH, {
            className: e,
            enable: w.enable ?? j,
            defaultSize: C,
            handleStyles: k,
            handleClasses: E,
            onResize: b,
            onResizeStop: x,
            minHeight: d,
            minWidth: p,
            maxHeight: g,
            maxWidth: m,
            style: v,
            children: t
        })
    }

    const hu = "gs-studio-panel", fC = (e, t = {}) => ({...t, ...e === !0 ? {} : e || void 0}), vo = y.memo(function ({
                                                                                                                          children: t,
                                                                                                                          header: n,
                                                                                                                          resizable: r,
                                                                                                                          className: o,
                                                                                                                          classNameAccordion: i,
                                                                                                                          classNameAccordionContent: l,
                                                                                                                          ...c
                                                                                                                      }) {
            const d = u.jsx(_r, {className: U(hu, o), ...c, children: t}),
                p = r ? r === !0 ? {top: !0, right: !0, bottom: !0, left: !0} : r : void 0,
                g = p ? u.jsx(ip, {className: U([`${hu}__resizer`]), ...p, children: d}) : d,
                m = n === !0 ? {collapsible: !0} : n || void 0;
            return m ? u.jsx(ta, {
                classNameWrap: U(`${hu}__accordion`, i),
                className: U(`${hu}__accordion-header`, et.xy, m.className),
                classNameContent: U(`${hu}__accordion-content`, l),
                disabled: m.collapsible === !1,
                style: m.style,
                handler: u.jsxs(K, {
                    space: "s",
                    items: "center",
                    children: [!!m.icon && u.jsx(be, {icon: m.icon, size: Ee.s}), u.jsx(q, {grow: !0, children: m.label})]
                }),
                open: n ? m.collapsed !== !0 : !0,
                children: g
            }) : g
        }), CH = "gs-panel-assets", EH = y.memo(xe(function ({
                                                                 className: t,
                                                                 onSelect: n,
                                                                 content: r,
                                                                 assets: o,
                                                                 types: i,
                                                                 providers: l,
                                                                 typeId: c,
                                                                 providerId: d,
                                                                 optionalType: p,
                                                                 optionalProvider: g,
                                                                 ...m
                                                             }) {
            const v = Ae(), b = Ji(), x = v.editor, [w] = y.useState(() => m.id || Nb());
            return y.useEffect(() => (b.createAssetManager(w), () => {
                b.removeAssetManager(w)
            }), [w]), Gw(w) ? u.jsx(vo, {
                className: U(CH, "gs-utl-overflow-hidden gs-utl-h-full", t),
                classNameAccordion: U("gs-utl-overflow-hidden gs-utl-flex gs-utl-flex-col"),
                classNameAccordionContent: U("gs-utl-overflow-hidden gs-utl-flex gs-utl-flex-col"), ...m,
                children: x && u.jsx(iC, {
                    panelId: w,
                    assets: o,
                    types: i,
                    providers: l,
                    onSelect: n,
                    typeId: c,
                    providerId: d,
                    content: r,
                    optionalType: p,
                    optionalProvider: g
                })
            }) : null
        })), pC = y.forwardRef(function ({children: t, className: n, ...r}, o) {
            return u.jsx("div", {className: U(pe("gs-block-manager-after"), n), ref: o, ...r, children: t})
        }), gC = y.forwardRef(function ({children: t, className: n, ...r}, o) {
            return u.jsx("div", {className: U(pe("gs-block-manager-before"), n), ref: o, ...r, children: t})
        }), PH = "gs-panel-blocks", _H = y.memo(xe(function ({
                                                                 className: t,
                                                                 symbols: n,
                                                                 search: r,
                                                                 hideCategories: o,
                                                                 blocks: i,
                                                                 itemLayout: l,
                                                                 ...c
                                                             }) {
            const d = Ae().sdkProps.children,
                p = {search: r, symbols: n, hideCategories: o, isOpen: !0, blocks: i, itemLayout: l};
            return u.jsx(vo, {
                className: U(PH, "gs-utl-overflow-hidden", t),
                classNameAccordion: U("gs-utl-overflow-hidden gs-utl-flex gs-utl-flex-col"),
                classNameAccordionContent: U("gs-utl-overflow-hidden gs-utl-flex gs-utl-flex-col"), ...c,
                children: u.jsxs(ea, {children: [or(d, gC), u.jsx(uE, {className: U("gs-utl-overflow-hidden gs-utl-flex-nowrap"), ...p}), or(d, pC)]})
            })
        })), kH = (e, {t, id: n}) => t(`fields.${n}.label`) || Vo(`${e}`.replace(/-/g, " ")), hC = (e, {t, id: n}) => {
            const r = zt(e) ? {id: e, label: e} : e;
            return {...r, label: t(`fields.${n}.options.${r.id}`) || r.label}
        }, mC = e => e.get("defaultValue") || "", mu = e => e.get("field"), vC = e => {
            const t = mu(e);
            return zt(t) ? {type: t} : t
        }, yC = e => `${e.get("value") || mC(e) || vC(e).defaultValue || ""}`, TH = (e, t) => e || mC(t) || "",
        vu = ({record: e, value: t, partial: n}) => {
            e.set({value: TH(t, e)}, {partial: n}), e.em.refreshCanvas({tools: !0})
        }, yu = (e, t) => {
            const {className: n, defaultValue: r, size: o, ...i} = vC(e), l = r || e.get("defaultValue");
            return {
                ...i,
                hasClear: () => {
                    const c = e.get("value");
                    return !!c && kn(l) && c !== l
                },
                className: U(n, "gs-utl-w-full"),
                size: o || "s",
                value: yC(e),
                label: kH(e.get("label") || e.id || "", t),
                onChange: (c, d) => vu({record: e, value: c, partial: d})
            }
        }, OH = (e, t) => {
            const n = mu(e), r = ps(n) ? n : void 0, o = (r == null ? void 0 : r.units) || [], i = m9(yC(e)), l = i.number,
                c = i.unit || o[0] || "";
            return {
                ...yu(e, t),
                value: l,
                valueUnit: c,
                min: r == null ? void 0 : r.min,
                max: r == null ? void 0 : r.max,
                step: r == null ? void 0 : r.step,
                units: r == null ? void 0 : r.units,
                onChange: (d, p) => {
                    vu({value: d ? `${d}${c}` : "", record: e, partial: p})
                },
                onChangeUnit: d => {
                    vu({value: l ? `${l}${d}` : "", record: e})
                }
            }
        }, bC = (e, t) => {
            var i;
            const n = mu(e), r = ps(n) ? n : void 0,
                o = ((i = r == null ? void 0 : r.options) == null ? void 0 : i.map(l => hC(l, t))) || [];
            return {...yu(e, t), options: o, onChange: l => vu({value: l, record: e})}
        }, LH = (e, t) => ({...yu(e, t), onChange: n => vu({value: n, record: e})}), MH = (e, t) => {
            var i;
            const n = mu(e), r = ps(n) ? n : void 0,
                o = ((i = r == null ? void 0 : r.options) == null ? void 0 : i.map(l => hC(l, t))) || [];
            return {...bC(e, t), size: "s", options: o}
        };

    function AH(e, t) {
        const n = mu(e);
        switch (zt(n) ? n : n == null ? void 0 : n.type) {
            case"radio":
                return u.jsx(Wn, {...MH(e, t)});
            case"select":
                return u.jsx(Ze, {...bC(e, t)});
            case"selectFont": {
                const o = LH(e, t);
                return u.jsx(hf, {...o, labelAs: "div"})
            }
            case"number":
                return u.jsx(tt, {...OH(e, t)});
            case"color":
                return u.jsx(Cs, {...yu(e, t)});
            default:
                return u.jsx(jt, {...yu(e, t)})
        }
    }

    const xC = "gs-cmp-global-style-field", RH = xe(function ({record: t}) {
        const n = Ae(), o = Ke().tScoped("globalStyleManager"), [, i] = y.useState(0), l = n.editor, c = t.id,
            d = {t: o, id: c};
        return y.useEffect(() => {
            if (!l) return;
            const p = `data:path:${t.getPath("value")}`, g = () => i(m => ++m);
            return l.on(p, g), () => {
                l.off(p, g)
            }
        }, [l]), u.jsx(K, {className: U(xC, `${xC}__${c}`), children: AH(t, d)})
    }), bu = "gs-cmp-global-style-manager", wC = ({items: e, category: t, className: n}) => {
        const r = U(t ? `${bu}__cat-fields--${t.id}` : `${bu}__uncat-fields`, "gs-utl-gap-2", et.xy, n);
        return u.jsx(K, {className: r, nowrap: !0, col: !0, children: e.map(o => u.jsx(RH, {record: o}, o.id))})
    }, NH = xe(function () {
        const t = L6(), {recordsByCategory: n, openCategories: r} = t, i = Ke().tScoped("globalStyleManager");
        return u.jsx(K, {
            col: !0,
            full: !0,
            nowrap: !0,
            className: U(bu, "gs-utl-flex-grow gs-utl-overflow-hidden"),
            children: u.jsx(K, {
                col: !0,
                nowrap: !0,
                className: U(`${bu}__fields`, nt.scrollY, "gs-utl-select-none"),
                children: n.length ? n.map(({category: l, items: c}, d) => l ? u.jsx(ta, {
                    sticky: !0,
                    open: r.get(l.id) ?? l.open,
                    handler: i(`categories.${l.id}.label`) || l.label || l.id,
                    onChange: ({open: p}) => t.setCategoryOpen(l.id, p),
                    className: p => U(`${bu}__cat-fields`, mh.itemList({
                        index: d,
                        open: p,
                        length: n.length
                    }), d === 0 && ye.bt),
                    children: u.jsx(wC, {category: l, items: c})
                }, l.id) : u.jsx(wC, {
                    items: c,
                    className: U(n.length !== 1 && [ye.bt, te.br])
                }, d)) : u.jsx(K, {className: U("gs-utl-text-center"), justify: "center", children: i("notFound")})
            })
        })
    }), $H = "gs-panel-global-styles", DH = y.memo(xe(function ({className: t, ...n}) {
        return u.jsx(vo, {
            className: U($H, "gs-utl-overflow-auto", t),
            classNameAccordion: U("gs-utl-overflow-hidden gs-utl-flex gs-utl-flex-col"),
            classNameAccordionContent: U("gs-utl-overflow-auto"), ...n,
            children: u.jsx(ea, {children: u.jsx(NH, {})})
        })
    }));

    function iv({className: e, value: t, onChange: n}) {
        const [r, o] = y.useState(t), i = y.useRef(null), l = p => {
            const {value: g} = p.target;
            o(g)
        }, c = () => {
            n(r || t)
        }, d = p => {
            switch (p.key) {
                case"Escape":
                    n(t);
                    break;
                case"Enter":
                    n(r || t);
                    break
            }
        };
        return y.useEffect(() => {
            i.current && i.current.select()
        }, []), u.jsx("input", {
            autoFocus: !0,
            className: se([e, "w-full", te.bgTr]),
            value: r,
            onChange: l,
            onBlur: c,
            onKeyDown: d,
            onPointerDown: La,
            ref: i
        })
    }

    const IH = {maxWidth: `${Tk}px`}, VH = "gs-cmp-layer-item";

    function SC({component: e, draggingCmp: t, dragParent: n, ...r}) {
        const o = Pr(), {Layers: i} = o,
            l = y.useRef(null), [c, d] = y.useState(!1), [p, g] = y.useState(i.getLayerData(e)), {
                open: m,
                selected: v,
                hovered: b,
                components: x,
                visible: w,
                locked: j,
                name: C
            } = p, _ = x.map(H => H.cid), E = t === e, k = _.join("-"), T = r.level + 1, O = b || n === e;
        y.useEffect(() => {
            T === 0 && g(i.getLayerData(e)), l.current && (l.current.__cmp = e)
        }, [e]), y.useEffect(() => {
            const H = l.current;
            if (!H) return;
            const {select: I} = o.Components.events, D = M => M === e && H.scrollIntoView({block: "nearest"});
            return o.on(I, D), () => {
                o.off(I, D)
            }
        }, [e, l.current]), y.useEffect(() => {
            const H = D => {
                D === e && g(i.getLayerData(D))
            }, I = i.events.component;
            return o.on(I, H), () => {
                o.off(I, H)
            }
        }, [o, i, e]);
        const A = y.useMemo(() => x.map(H => u.jsx(SC, {
                component: H,
                level: T,
                draggingCmp: t,
                dragParent: n
            }, H.cid)), [k, t, n]), $ = H => {
                i.setLayerData(e, {name: H}), d(!1)
            }, F = H => {
                H.stopPropagation(), i.setLayerData(e, {open: !m})
            }, N = H => {
                H.stopPropagation(), i.setLayerData(e, {visible: !w})
            }, z = H => {
                H.stopPropagation(), i.setLayerData(e, {locked: !j})
            }, V = H => {
                H.stopPropagation(), i.setLayerData(e, {selected: !0}, {event: H})
            }, X = H => {
                H.preventDefault(), o.runCommand(_e.contextMenuComponent, {
                    source: Wd.layers,
                    component: e,
                    event: H.nativeEvent,
                    x: H.clientX,
                    y: H.clientY
                })
            }, Z = H => {
                (!H || !t) && i.setLayerData(e, {hovered: H})
            }, R = Ia(e), B = se("layer-item", (v || R.isSymbol) && R.bgSoftX, (!w || E) && "opacity-50"),
            Q = se(et.xyS, ye.b, O ? R.border : ye.bT, v && R.bgSoft);
        return u.jsx("div", {
            className: VH, children: u.jsxs(K, {
                col: !0,
                className: B,
                children: [u.jsx(q, {
                    onClick: V,
                    onContextMenu: X,
                    onMouseEnter: () => Z(!0),
                    onMouseLeave: () => Z(!1),
                    className: se("group max-w-full"),
                    "data-layer-item": !0,
                    ref: l,
                    children: u.jsxs(K, {
                        items: "center",
                        space: "xs",
                        className: Q,
                        children: [u.jsx(q, {
                            style: {marginLeft: `${T * 10}px`},
                            className: se("cursor-pointer", !x.length && "pointer-events-none opacity-0"),
                            onClick: F,
                            children: u.jsx(be, {icon: fe.menuDown, size: Ee.sx, rotate: m ? 0 : -90})
                        }), u.jsx(q, {children: km(e)}), u.jsx(q, {
                            className: se("truncate"),
                            onDoubleClick: () => d(!0),
                            style: IH,
                            grow: !0,
                            children: c ? u.jsx(iv, {value: C, onChange: $}) : u.jsx(u.Fragment, {children: C})
                        }), !c && u.jsxs(u.Fragment, {
                            children: [u.jsx(q, {
                                className: se("group-hover:gs-utl-opacity-100 cursor-pointer", j ? "opacity-100" : "opacity-0"),
                                onClick: z,
                                children: u.jsx(be, {icon: j ? fe.lock : fe.lockOpenVariant, size: Ee.s3x})
                            }), u.jsx(q, {
                                className: se("group-hover:gs-utl-opacity-100 cursor-pointer", w ? "opacity-0" : "opacity-100"),
                                onClick: N,
                                children: u.jsx(be, {icon: w ? fe.eyeOutline : fe.eyeOffOutline, size: Ee.sx})
                            })]
                        })]
                    })
                }), !!(m && x.length) && u.jsx(q, {className: se("max-w-full", !m && "hidden"), children: A})]
            })
        })
    }

    const HH = {touchAction: "none"}, jC = 5, FH = e => {
        const t = document.elementFromPoint(e.clientX, e.clientY),
            n = t == null ? void 0 : t.closest("[data-layer-item]");
        return {el: n, cmp: n == null ? void 0 : n.__cmp}
    }, CC = xe(function ({root: t, header: n}) {
        const {editor: r} = Ae(), [o, i] = y.useState(!1), [l, c] = y.useState({}), [d, p] = y.useState(), [g, m] = y.useState(), [v, b] = y.useState(), [x, w] = y.useState(),
            j = y.useRef(null);
        if (y.useEffect(() => {
            const F = window.document, N = z => {
                z.key === "Escape" && (c({...l, result: !1}), k())
            };
            return F.addEventListener("keydown", N), () => {
                F.removeEventListener("keydown", N)
            }
        }, []), !r) return null;
        const {Components: C} = r, _ = F => {
                F.button === 0 && i(!0)
            }, E = F => {
                if (!o) return;
                const {cmp: N, el: z} = FH(F);
                if (!z || !N) return;
                const V = z.getBoundingClientRect(), X = z.offsetHeight, Z = z.offsetTop, R = F.clientY,
                    B = R < V.y + X / 2, Q = g || N, H = N.parent(), I = N.index() + (B ? 0 : 1);
                !g && m(N), p(N);
                const D = C.canMove(H, Q, I), M = C.canMove(N, Q), W = {...D, canMoveInside: M, index: I};
                let ce = !1;
                M.result && R > V.y + jC && R < V.y + X - jC && (ce = !0, W.target = N, delete W.index), b(ce ? N : void 0), c(W), w({
                    pointerInside: ce,
                    y: Z + (B ? 0 : X),
                    h: X
                })
            }, k = () => {
                var F;
                l != null && l.result && ((F = l.source) == null || F.move(l.target, {at: l.index})), c({}), i(!1), m(void 0), p(void 0), b(void 0), w(void 0)
            }, T = (d ? d.parents() : []).length, O = !!(g && x && (l != null && l.result) && !x.pointerInside),
            A = O ? {top: x.y, left: 0, marginLeft: T * 10 + 20} : {},
            $ = n && (n == null ? void 0 : n.label) || "Layers";
        return u.jsxs(K, {
            col: !0,
            full: !0,
            nowrap: !0,
            className: se("gs-layer-manager flex-grow overflow-hidden"),
            children: [n !== !1 && u.jsx(q, {
                children: u.jsxs(K, {
                    space: "s",
                    items: "center",
                    className: se([et.xy, ye.bb, te.br]),
                    children: [u.jsx(q, {children: u.jsx(be, {icon: fe.layers, size: Ee.s})}), u.jsx(q, {
                        grow: !0,
                        children: $
                    })]
                })
            }), u.jsxs(q, {
                className: se("overflow-y-auto overflow-x-hidden text-sm select-none relative"),
                style: HH,
                onPointerDown: _,
                onPointerMove: E,
                onPointerUp: k,
                grow: !0,
                children: [!!t && u.jsx(SC, {
                    component: t,
                    level: -1,
                    draggingCmp: g,
                    dragParent: v
                }), O && u.jsx("div", {ref: j, className: se("absolute w-full gs-utl-h-0.5", te.cmp), style: A})]
            })]
        })
    }), EC = y.forwardRef(function ({children: t, className: n, ...r}, o) {
        return u.jsx("div", {className: U(pe("gs-layer-manager-after"), n), ref: o, ...r, children: t})
    }), PC = y.forwardRef(function ({children: t, className: n, ...r}, o) {
        return u.jsx("div", {className: U(pe("gs-layer-manager-before"), n), ref: o, ...r, children: t})
    }), zH = "gs-panel-layers", _C = y.memo(xe(function ({className: t, ...n}) {
        const r = Ae().sdkProps.children;
        return u.jsx(vo, {
            className: U(zH, "gs-utl-overflow-auto", t),
            classNameAccordion: U("gs-utl-overflow-hidden gs-utl-flex gs-utl-flex-col"),
            classNameAccordionContent: U("gs-utl-overflow-auto"), ...n,
            children: u.jsx(g2, {
                children: o => u.jsxs(u.Fragment, {
                    children: [or(r, PC), u.jsx(CC, {
                        ...o,
                        header: !1
                    }), or(r, EC)]
                })
            })
        })
    })), BH = xe(function () {
        const t = Ke(), {editor: n} = Ae(), r = Ji(), o = Nc(), i = o.sortedFonts;
        return n ? u.jsx(Xo, {
            items: i,
            selected: null,
            renderItem: l => {
                const c = Cm(l);
                return u.jsxs(K, {
                    col: !0,
                    children: [u.jsx(q, {
                        className: "gs-utl-text-lg",
                        style: {fontFamily: c},
                        children: l.familyLabel
                    }), u.jsx(q, {children: l.familyLabel})]
                })
            },
            remove: l => o.removeFont(l.family),
            add: o.sdkAddFonts && r.hasType("font") ? () => Xm(n) : void 0,
            titleAdd: t.t("fontManager.addFontToProject"),
            label: t.t("fontManager.projectFonts"),
            getItemId: l => l.family,
            emptyState: t.t("fontManager.emptyProjectFonts")
        }) : null
    }), kC = ee.forwardRef(function ({
                                         size: t = "m",
                                         className: n,
                                         classNameContent: r,
                                         border: o = !0,
                                         children: i,
                                         ...l
                                     }, c) {
        const d = pe(te.bg, te.br, o && `${ye.b} ${ye.rnd}`, t === "m" && et.xy, t === "s" && "gjs-px-3 gjs-py-1", n);
        return u.jsx(K, {
            className: d,
            items: "center",
            space: "x2s", ...l,
            ref: c,
            children: u.jsx(q, {grow: !0, className: r, children: i})
        })
    }), UH = ({autoResize: e, style: t = {}, ...n}) => {
        const r = y.useRef(null);
        return y.useEffect(() => {
            !r.current || !e || (r.current.style.height = "auto", r.current.style.height = r.current.scrollHeight + "px")
        }, [n.value]), u.jsx("textarea", {ref: r, style: {...t, ...e ? {resize: "none"} : {}}, ...n})
    }, WH = "gs-field-textarea";

    function TC(e) {
        const {
            className: t,
            value: n,
            label: r,
            size: o,
            description: i,
            placeholder: l,
            readOnly: c,
            disabled: d,
            required: p,
            onChange: g,
            onKeyDown: m,
            afterInput: v,
            minHeight: b,
            maxHeight: x,
            autoResize: w,
            classNameField: j,
            classNameFieldContent: C,
            classNameInput: _
        } = e, E = Oc(e);
        return u.jsxs("div", {
            className: se(WH, t),
            children: [!!r && u.jsx(Ur, {size: o, children: r}), !!i && u.jsx(Ur, {
                size: o,
                as: "span",
                className: se(te.txtLowEmphasis),
                capitalize: !1,
                children: i
            }), u.jsxs(kC, {
                size: o,
                className: j,
                classNameContent: C,
                children: [u.jsx(UH, {
                    className: se(E, _),
                    autoResize: w,
                    value: n,
                    placeholder: l,
                    readOnly: c,
                    disabled: d,
                    required: p,
                    onChange: k => g == null ? void 0 : g(k.target.value),
                    onKeyDown: m,
                    style: {minHeight: b, maxHeight: x}
                }), v]
            })]
        })
    }

    const ap = "gs-page-settings", GH = `${ap}-header`, KH = `${ap}-content`, qH = `${ap}-footer`, OC = "",
        LC = xe(function ({
                              className: t,
                              classNameHeader: n,
                              classNameContent: r,
                              classNameFooter: o,
                              page: i,
                              size: l = Kd.m
                          }) {
            const c = Ae(), {isDarkTheme: d} = sr(), p = Nc(),
                g = Ke(), [m, v] = y.useState(i), [b, x] = y.useState(() => Bw(m, c)), [w, j] = y.useState(() => g.t("update")),
                C = g.tScoped("pageManager.settings"), _ = g.tScoped("pageManager.settings.fields"), E = c.editor,
                k = {containerClassName: pe("min-h-80"), size: l, padding: 5, isDarkTheme: d, clean: !0},
                T = V => x(X => ({...X, ...V})), O = V => {
                    V.preventDefault();
                    const {name: X, ...Z} = b;
                    Z.customCodeHead = jk(Z.customCodeHead), Z.customCodeBody = Sk(Z.customCodeBody), m ? (s6(m, Z), m.setName(X)) : c.setProjectDataCustom({globalPageSettings: Z}), j(g.t("updated")), setTimeout(() => j(g.t("update")), 2e3), Hw(E), E.trigger(Jn.pageSettingsUpdate, {
                        page: m,
                        data: {name: X, ...Z}
                    })
                }, A = {tooltip: g.t("clear")}, $ = (m == null ? void 0 : m.getId()) ?? OC, F = V => {
                    const X = E.Pages.get(V);
                    v(X), x(Bw(X, c))
                }, N = o6(m),
                z = [{id: OC, label: C("global")}, ...E.Pages.getAll().map(V => ({id: V.getId(), label: V.getName()}))];
            return u.jsx("form", {
                onSubmit: O, className: pe(ap, "h-full", t), children: u.jsxs(K, {
                    col: !0,
                    full: !0,
                    className: pe("gap-1 gs-utl-overflow-hidden"),
                    nowrap: !0,
                    children: [u.jsx(q, {
                        className: pe(GH, n, te.br, ye.bb),
                        children: u.jsx(Ze, {
                            value: $,
                            onChange: F,
                            options: z,
                            handlerSelected: V => u.jsxs(u.Fragment, {children: [u.jsx("b", {children: g.t("pageManager.page")}), ": ", V.label]})
                        })
                    }), u.jsxs(K, {
                        col: !0,
                        className: pe(KH, "gap-5 overflow-y-auto", r),
                        nowrap: !0,
                        children: [!!$ && u.jsxs(u.Fragment, {
                            children: [u.jsx(jt, {
                                size: l,
                                value: b.name,
                                onChange: V => T({name: V}),
                                label: _("name.label"),
                                description: _("name.description"),
                                required: !0
                            }), !N && u.jsx(jt, {
                                size: l,
                                value: b.slug,
                                onChange: V => T({slug: Qg(V)}),
                                label: _("slug.label"),
                                description: _("slug.description"),
                                required: !0
                            })]
                        }), u.jsx(jt, {
                            size: l,
                            value: b.title,
                            onChange: V => T({title: V}),
                            label: _("title.label"),
                            description: _("title.description")
                        }), u.jsx(TC, {
                            size: l,
                            value: b.description,
                            onChange: V => T({description: V}),
                            label: _("description.label"),
                            description: _("description.description")
                        }), u.jsx(qc, {
                            size: l,
                            clear: A,
                            value: b.favicon,
                            onChange: V => T({favicon: V}),
                            onOpen: () => {
                                E.Assets.open({
                                    select(V) {
                                        T({favicon: V.getSrc()}), E.Assets.close()
                                    }
                                })
                            },
                            label: _("favicon.label"),
                            description: _("favicon.description")
                        }), u.jsx(jt, {
                            size: l,
                            value: b.keywords,
                            onChange: V => T({keywords: V}),
                            label: _("keywords.label"),
                            description: _("keywords.description")
                        }), u.jsx(jt, {
                            size: l,
                            value: b.socialTitle,
                            onChange: V => T({socialTitle: V}),
                            label: _("socialTitle.label"),
                            description: _("socialTitle.description")
                        }), u.jsx(qc, {
                            size: l,
                            clear: A,
                            value: b.socialImage,
                            onChange: V => T({socialImage: V}),
                            onOpen: () => {
                                E.Assets.open({
                                    select(V) {
                                        T({socialImage: V.getSrc()}), E.Assets.close()
                                    }
                                })
                            },
                            label: _("socialImage.label"),
                            description: _("socialImage.description")
                        }), u.jsx(TC, {
                            size: l,
                            value: b.socialDescription,
                            onChange: V => T({socialDescription: V}),
                            label: _("socialDescription.label"),
                            description: _("socialDescription.description")
                        }), u.jsx(Ss, {
                            language: "html",
                            value: b.customCodeHead,
                            onChange: V => T({customCodeHead: V}),
                            label: _("customCodeHead.label"),
                            description: _("customCodeHead.description"), ...k
                        }, `head-${$}`), u.jsx(Ss, {
                            language: "html",
                            value: b.customCodeBody,
                            onChange: V => T({customCodeBody: V}),
                            label: _("customCodeBody.label"),
                            description: _("customCodeBody.description"), ...k
                        }, `body-${$}`), p.sdkShowProjectFonts && !$ && u.jsx(BH, {})]
                    }), u.jsx(K, {
                        className: pe(qH, "mt-auto", o, te.br, ye.bt),
                        children: u.jsx(at, {type: "submit", variant: "pr", size: "m2", full: !0, children: w})
                    })]
                })
            })
        }), YH = "gs-panel-page-settings", XH = y.memo(xe(function ({className: t, page: n, ...r}) {
            return u.jsx(vo, {
                className: U(YH, "gs-utl-overflow-hidden", t),
                classNameAccordion: U("gs-utl-overflow-hidden gs-utl-flex gs-utl-flex-col"),
                classNameAccordionContent: U("gs-utl-overflow-hidden gs-utl-flex gs-utl-flex-col"), ...r,
                children: u.jsx(ea, {
                    children: u.jsx(LC, {
                        className: U("gs-utl-overflow-hidden gs-utl-flex gs-utl-flex-col"),
                        page: n,
                        size: Kd.s,
                        classNameHeader: et.s,
                        classNameContent: et.s,
                        classNameFooter: et.s
                    })
                })
            })
        })), av = "gs-page-item", MC = xe(function ({page: t, rename: n, setRename: r, commandItems: o}) {
            const i = Ae(), l = Ke(), c = i.editor, {Pages: d} = c, {sdkPagesConfig: p} = i,
                g = p == null ? void 0 : p.settings, m = E => l.t(`pageManager.${E}`), v = E => d.select(E),
                b = E => d.getSelected() === E, x = E => E === n, w = E => E.getName() || E.getId(), j = E => {
                    n == null || n.set({name: E}), r(void 0)
                }, C = pe("group-hover:gs-utl-opacity-100 opacity-0 cursor-pointer transition-opacity"),
                _ = () => c.runCommand(_e.setPageSettings, {page: t, isOpen: !0});
            return u.jsxs(K, {
                space: "s",
                items: "center",
                onClick: () => v(t),
                className: pe([av, "group cursor-default", et.xy, b(t) && te.bgH, !b(t) && te.hBgH2]),
                children: [u.jsx(q, {
                    className: pe(`${av}__name truncate`),
                    grow: !0,
                    children: x(t) ? u.jsx(iv, {value: w(t), onChange: j}) : u.jsx(u.Fragment, {children: w(t)})
                }), u.jsxs(K, {
                    className: `${av}__actions`,
                    space: "xs",
                    onClick: La,
                    items: "center",
                    children: [!n && g !== !1 && u.jsx(Xt, {
                        className: C,
                        size: "xs",
                        border: !1,
                        title: m("settings.label"),
                        onClick: _,
                        block: !0,
                        children: u.jsx(be, {icon: fe.cog, size: Ee.s3x})
                    }), b(t) && !!o.length && u.jsx(Wo, {
                        placement: "right-start",
                        handler: u.jsx(be, {icon: fe.dotsVertical, size: Ee.s}),
                        title: !1,
                        padding: !1,
                        fixed: !0,
                        overlay: !0,
                        children: ({close: E}) => o.map(k => u.jsx(Tc, {
                            label: St(k.label) ? k.label({editor: c}) : k.label,
                            action: () => {
                                var T;
                                E(), (T = k.cmd) == null || T.call(k, {page: t, editor: c})
                            }
                        }, k.id))
                    })]
                })]
            }, t.getId())
        });

    function ZH({dragging: e, dragRect: t}) {
        const n = !!(e && t), r = n ? {top: t.y, left: 0, marginLeft: 0} : {};
        return {showIndicator: n, indicatorStyle: r}
    }

    var AC = (e => (e.horizontal = "horizontal", e.vertical = "vertical", e))(AC || {});
    const lv = "gs-cmp-sortable", JH = ({items: e, direction: t, onDrop: n, renderItem: r}) => {
            const [o, i] = y.useState(null), [l, c] = y.useState(-1), [d, p] = y.useState(),
                g = y.useRef(null), {showIndicator: m, indicatorStyle: v} = ZH({dragging: !!o, dragRect: d}),
                b = y.useMemo(() => [], [e]);
            y.useEffect(() => {
                const T = window.document, O = A => A.key === "Escape" && j(A);
                return T.addEventListener("keydown", O), () => T.removeEventListener("keydown", O)
            }, []);
            const x = T => O => {
                    O.button === 0 && (g.current = {x: O.clientX, y: O.clientY}, i(T), O.target.setPointerCapture(O.pointerId))
                }, w = T => {
                    if (!o || !g.current) return;
                    const O = T.clientY;
                    let A = -1;
                    b.forEach((N, z) => {
                        const V = N.getBoundingClientRect();
                        O > V.top + V.height / 2 && (A = z)
                    });
                    const $ = e.findIndex(N => N.id === o.id);
                    A < $ && (A += 1), A = Math.min(A, e.length - 1), c(A);
                    const F = b[A];
                    if (F) {
                        const {height: N, top: z} = F.getBoundingClientRect(), V = O < z + N / 2;
                        p({y: F.offsetTop + (V ? 0 : N), h: N})
                    }
                }, j = T => {
                    i(null), g.current = null, p(void 0);
                    const O = T.target, {pointerId: A} = T;
                    A && (O == null || O.releasePointerCapture(A))
                }, C = T => {
                    !o || !g.current || (d && l !== -1 && (n == null || n(o, l)), j(T))
                }, _ = U(lv, "gs-utl-relative"),
                E = U(`${lv}__indicator`, te.cmp, "gs-utl-absolute gs-utl-w-full gs-utl-h-0.5"),
                k = T => U(`${lv}__item`, m && (o == null ? void 0 : o.id) === T.id && "gs-utl-opacity-50 gs-utl-select-none");
            return u.jsxs(u.Fragment, {
                children: [u.jsx(K, {
                    col: t === "vertical",
                    className: _,
                    children: e.map((T, O) => u.jsx(q, {
                        ref: A => {
                            A && (b[O] = A)
                        }, className: k(T), onPointerDown: x(T), onPointerMove: w, onPointerUp: C, children: r(T)
                    }, T.id))
                }), m && u.jsx("div", {className: E, style: v})]
            })
        }, QH = ({pages: e, commandItems: t, rename: n, setRename: r, editor: o}) => {
            if (!o.Pages.move) return e.map(d => u.jsx(MC, {page: d, commandItems: t, rename: n, setRename: r}, d.getId()));
            const i = (d, p) => {
                    o.Pages.move(d.entity, {at: p})
                }, l = d => u.jsx(MC, {page: d.entity, commandItems: t, rename: n, setRename: r}, d.id),
                c = e.map(d => ({id: d.getId(), entity: d}));
            return u.jsx(JH, {items: c, direction: AC.vertical, onDrop: i, renderItem: l})
        }, eF = ({items: e, editor: t, sdkPageConfig: n}) => {
            const r = n == null ? void 0 : n.commandItems;
            return r === !1 ? [] : St(r) ? r({items: e, editor: t}) : r || e
        }, cv = "gs-panel-page-manager", RC = xe(function ({
                                                               pages: t,
                                                               select: n,
                                                               add: r,
                                                               remove: o,
                                                               header: i,
                                                               resizable: l = {bottom: !0},
                                                               height: c = 200
                                                           }) {
            const d = Ae(), p = go(), g = Ke(), {sdkPagesConfig: m} = d, v = d.editor, [b, x] = y.useState(),
                w = V => g.t(`pageManager.${V}`), j = m == null ? void 0 : m.add, C = m == null ? void 0 : m.duplicate,
                _ = m == null ? void 0 : m.remove, E = V => {
                    La(V);
                    const X = R => {
                        const B = t.length + 1;
                        return r({name: `${w("page")} ${B}`, component: `<div>${w("newPage")} ${B}</div>`, ...R}, {select: !0})
                    };
                    if (j) return j({event: V, editor: v, rename: x, addPage: X});
                    const Z = X();
                    Z && x(Z)
                }, k = ({page: V}) => {
                    if (_) return _({editor: v, page: V});
                    p.confirm({
                        title: w("deletePage"),
                        content: w("confirmDelete"),
                        confirmButton: {variant: "danger", children: w("deletePage")},
                        onConfirm: () => {
                            const X = t.indexOf(V), Z = t[X + 1] || t[0];
                            n(Z), o(V)
                        }
                    })
                }, T = ({page: V}) => {
                    if (C) return C({editor: v, page: V, rename: x});
                    const X = V.getMainComponent(),
                        Z = r({name: `${V.getName()} (${w("copy")})`, component: X.clone()}, {select: !0});
                    Z && x(Z)
                }, O = [{id: "rename", label: w("rename"), cmd: ({page: V}) => x(V)}, C !== !1 && {
                    id: "duplicate",
                    label: w("duplicate"),
                    cmd: T
                }, t.length > 1 && _ !== !1 && {id: "remove", label: w("delete"), cmd: k}].filter(Boolean),
                A = eF({items: O, editor: v, sdkPageConfig: m}),
                $ = fC(i, {collapsible: !0, label: w("pages"), icon: fe.textBoxMultiple}),
                F = l ? l === !0 ? {top: !0, right: !0, bottom: !0, left: !0} : l : void 0,
                N = u.jsx(QH, {pages: t, commandItems: A, rename: b, setRename: x, editor: v}), z = F ? u.jsx(ip, {
                    className: se([`${cv}__content`, "text-sm overflow-auto", ye.bt, te.br]),
                    height: c, ...F,
                    children: N
                }) : N;
            return u.jsx(ta, {
                classNameWrap: cv,
                className: se(`${cv}__header`, et.xy, i === !1 && "gs-utl-hidden"),
                disabled: $ && $.collapsible === !1,
                handler: u.jsxs(K, {
                    space: "s",
                    items: "center",
                    children: [!!$.icon && u.jsx(q, {children: u.jsx(be, {icon: $.icon, size: Ee.s})}), u.jsx(q, {
                        grow: !0,
                        children: $.label
                    }), j !== !1 && u.jsx(mn, {
                        title: w("add"),
                        children: u.jsx(K, {
                            onClick: E,
                            className: se("cursor-pointer"),
                            children: u.jsx(be, {icon: fe.plus, size: Ee.s})
                        })
                    })]
                }),
                open: $ ? $.collapsed !== !0 : !0,
                children: z
            })
        }), NC = y.forwardRef(function ({children: t, className: n, ...r}, o) {
            return u.jsx("div", {className: U(pe("gs-page-manager-after"), n), ref: o, ...r, children: t})
        }), $C = y.forwardRef(function ({children: t, className: n, ...r}, o) {
            return u.jsx("div", {className: U(pe("gs-page-manager-before"), n), ref: o, ...r, children: t})
        }), tF = "gs-panel-pages", DC = y.memo(xe(function ({className: t, header: n, height: r, resizable: o, ...i}) {
            const l = Ae().sdkProps.children;
            return u.jsx(_r, {
                className: U(tF, t), ...i,
                children: u.jsx(h2, {
                    children: c => u.jsxs(u.Fragment, {
                        children: [or(l, $C), u.jsx(RC, {
                            header: n,
                            height: r,
                            resizable: o, ...c
                        }), or(l, NC)]
                    })
                })
            })
        })), nF = "gs-panel-pages-layers",
        rF = y.memo(xe(function ({className: t, panelPagesProps: n, panelLayersProps: r, ...o}) {
            const {showPages: i} = Ae(), l = Ke(), {className: c, ...d} = n || {},
                p = fC(r == null ? void 0 : r.header, {
                    icon: fe.layers,
                    collapsible: !1,
                    label: l.t("layerManager.layers"),
                    className: U(ye.bb, te.br)
                });
            return u.jsxs(vo, {
                className: U(nF, "gs-utl-flex gs-utl-flex-col gs-utl-h-full", t), ...o,
                children: [i && u.jsx(DC, {className: U(c, ye.bb, te.br), ...d}), u.jsx(_C, {...r, header: p})]
            })
        })), oF = "gs-trait-custom", sF = xe(function ({trait: t, editor: n}) {
            const [, r] = y.useState(0), o = y.useRef(null), i = t.get("component"), l = t.get("render"), c = t.target,
                d = o.current;
            return y.useEffect(() => {
                if (c) {
                    let p = () => {
                    }, g = () => {
                    };
                    const m = () => {
                        g(), r(v => ++v)
                    };
                    if (c.on("change", m), !i && l && d) {
                        const v = w => d.appendChild(w), b = w => d.removeChild(w), x = l({
                            editor: n, component: c, trait: t, addEl: v, removeEl: b, onUpdate: w => {
                                g = w
                            }
                        });
                        x instanceof HTMLElement ? (v(x), p = () => b(x)) : St(x) && (p = () => x())
                    }
                    return () => {
                        c.off("change", m), p()
                    }
                }
            }, [c, d]), c ? i ? u.jsx(i, {trait: t, component: c, editor: n}) : l ? u.jsx("div", {
                className: oF,
                ref: o
            }) : null : null
        });

    function IC({
                    className: e,
                    options: t,
                    value: n,
                    name: r,
                    label: o,
                    border: i,
                    hideCaret: l,
                    size: c = "s",
                    autoFocus: d,
                    open: p,
                    allowNew: g,
                    onChange: m,
                    onBlur: v,
                    placeholder: b
                }) {
        const [x, w] = y.useState(null), [j, C] = y.useState(null), {
                styles: _,
                attributes: E
            } = Xa(x, j, xm), [k, T] = y.useState(""), O = Oc(),
            A = k === "" ? t : t.filter(Z => Z.label.toLowerCase().includes(k.toLowerCase())),
            $ = Z => T(Z.target.value), F = Z => Z == null ? void 0 : Z.label,
            N = g && k.length > 0 && !A.some(Z => Z.label === k), z = St(g) ? g(k) : g,
            V = {minWidth: `${x == null ? void 0 : x.offsetWidth}px`, maxHeight: 200},
            X = () => v == null ? void 0 : v();
        return u.jsxs("div", {
            className: se("w-full", e),
            children: [!!o && u.jsx(Ur, {size: c, children: o}), u.jsxs(Ba, {
                value: n,
                onChange: m,
                name: r,
                nullable: !0,
                children: [u.jsx(kC, {
                    size: c,
                    ref: w,
                    border: i,
                    children: u.jsxs(K, {
                        nowrap: !0,
                        children: [u.jsx(Ba.Input, {
                            autoFocus: d,
                            className: O,
                            displayValue: F,
                            onChange: $,
                            onBlur: X,
                            placeholder: b
                        }), !l && u.jsx(Ba.Button, {children: u.jsx(be, {icon: fe.chevronDown, size: Ee.sx})})]
                    })
                }), u.jsx(Ba.Options, {
                    static: p,
                    className: Cw,
                    ref: C,
                    style: _.popper, ...E.popper,
                    children: u.jsxs(tr, {
                        className: se("h-full"),
                        padding: !1,
                        style: V,
                        children: [N && u.jsx(Ba.Option, {
                            value: {id: null, label: k},
                            children: ({active: Z}) => u.jsx(Ew, {option: {id: null, label: z}, active: Z, selected: n})
                        }), !N && A.length === 0 && u.jsx("div", {
                            className: se(et.xy),
                            children: "No items found"
                        }), A.map(Z => u.jsx(Ba.Option, {
                            value: Z,
                            children: ({active: R}) => u.jsx(Ew, {option: Z, active: R, selected: n})
                        }, Z.id))]
                    })
                })]
            })]
        })
    }

    const iF = "page://", VC = "#", lp = "mailto:", uv = "subject=", dv = "tel:", HC = "hrefType", FC = "showIdList",
        zC = (e, t) => {
            const n = t == null ? void 0 : t.get(HC);
            return n || (e.startsWith(dv) ? "phone" : e.startsWith(lp) ? "email" : e.startsWith(iF) ? "pages" : e.startsWith(VC) ? "elements" : "url")
        }, BC = e => `${e.getName()} - #${e.getId()}`, aF = xe(function ({trait: t}) {
            const n = t.getValue(), r = t.component,
                o = Ae(), {isSelectingTarget: i} = o, [, l] = y.useState(0), [c, d] = y.useState(""), [p, g] = y.useState(""), [m, v] = y.useState(""), [b, x] = y.useState([]),
                w = Pr(), j = Ke(), C = w.Pages.getAll(), _ = j.tScoped("traitManager.traits.labels"),
                E = () => l(B => ++B), k = r.get(FC) ?? !1, T = zC(n, r), O = B => {
                    t.setValue(B)
                }, A = B => {
                    r.set({[FC]: B}), E()
                }, $ = B => {
                    d(""), g(""), v(""), O(""), r.set({[HC]: B}), E()
                }, F = B => {
                    O(B), E()
                }, N = B => {
                    B && (O(B.id), E())
                }, z = B => {
                    O(`${dv}${B}`), v(B)
                }, V = B => {
                    O(`${lp}${B}${p ? `?${uv}${p}` : ""}`), d(B)
                }, X = B => {
                    O(`${lp}${c}${B ? `?${uv}${B}` : ""}`), g(B)
                }, Z = () => {
                    o.setSelectingTarget(!i)
                }, R = B => {
                    const Q = B.replace(VC, ""), H = w.Components.componentsById[Q];
                    return {id: B, label: H ? BC(H) : B}
                };
            return y.useEffect(() => {
                var Q;
                const B = [];
                if (k) {
                    const H = ["path", "br", "b", "u", "i", "strike"],
                        I = (Q = w.Pages.getSelected()) == null ? void 0 : Q.getMainComponent();
                    I == null || I.forEachChild(D => {
                        !D.is("comment") && !D.is("textnode") && !H.includes(D.get("tagName")) && B.push({
                            id: `#${D.getId()}`,
                            label: BC(D)
                        })
                    })
                }
                x(B)
            }, [k]), y.useEffect(() => {
                let B = () => {
                };
                const Q = () => {
                    B(), w.stopCommand(af)
                };
                return i && (B = yk(Q), w.runCommand(af, {onSelect: H => O(`#${H.getId()}`)})), Q
            }, [i]), y.useEffect(() => {
                if (!n) return;
                switch (zC(n, r)) {
                    case"phone":
                        v(n.replace(dv, ""));
                        break;
                    case"email": {
                        const [Q, H = ""] = n.replace(lp, "").split("?");
                        d(Q), g(H.replace(uv, ""));
                        break
                    }
                }
            }, [n]), u.jsx(_s, {
                onChange: $,
                classNamePanel: "gs-utl-p-1",
                value: T,
                tabs: [{
                    id: "url",
                    label: u.jsx(be, {icon: fe.link, size: Ee.s}),
                    content: u.jsx(jt, {
                        placeholder: "eg. https://google.com",
                        value: n,
                        label: "URL",
                        onChange: O,
                        size: "s",
                        type: "url"
                    })
                }, {
                    id: "pages",
                    label: u.jsx(be, {icon: fe.textBoxMultiple, size: Ee.s}),
                    content: u.jsx(Ze, {
                        size: "s",
                        options: C.map(B => ({id: `page://${B.getId()}`, label: B.getName()})),
                        value: n,
                        onChange: F,
                        label: "Page"
                    })
                }, {
                    id: "elements",
                    label: u.jsx(be, {icon: fe.viewDayOutline, size: Ee.s}),
                    content: u.jsxs(K, {
                        gap: "s",
                        col: !0,
                        children: [u.jsx(Ur, {size: "s", children: "Element ID"}), u.jsxs(K, {
                            gap: "xs",
                            nowrap: !0,
                            children: [k ? u.jsx(IC, {
                                options: b,
                                onChange: N,
                                value: R(n),
                                placeholder: j.t("selectList")
                            }) : u.jsx(jt, {
                                size: "s",
                                placeholder: "eg. #my-element-in-page",
                                value: n,
                                onChange: O,
                                className: "gs-utl-flex-1"
                            }), u.jsx(Xt, {
                                title: j.t("selectTarget"),
                                size: "m2",
                                active: i,
                                onClick: Z,
                                className: "gs-utl-h-[30px]",
                                children: u.jsx(be, {icon: fe.target, size: Ee.sx})
                            })]
                        }), u.jsx(Gc, {value: k, onChange: A, label: _("showList")})]
                    })
                }, {
                    id: "email",
                    label: u.jsx(be, {icon: fe.email, size: Ee.s}),
                    content: u.jsxs(K, {
                        gap: "s",
                        col: !0,
                        children: [u.jsx(jt, {
                            placeholder: "eg. mail@gmail.com",
                            value: c,
                            onChange: V,
                            size: "s",
                            label: "Email",
                            type: "email"
                        }), u.jsx(jt, {placeholder: "eg. My subject", value: p, onChange: X, label: "Subject", size: "s"})]
                    })
                }, {
                    id: "phone",
                    label: u.jsx(be, {icon: fe.phone, size: Ee.s}),
                    content: u.jsx(jt, {
                        size: "s",
                        type: "tel",
                        label: "Phone",
                        placeholder: "eg. +55123456789",
                        value: m,
                        onChange: z
                    })
                }]
            })
        });

    function lF({trait: e}) {
        const [t, n] = y.useState(), r = e.get("properties"), o = e.get("addItem"), i = e.get("labelItem"),
            l = e.getValue(), c = l.findIndex(d => d.id === (t == null ? void 0 : t.id));
        return u.jsx(Xo, {
            items: l,
            selected: c > -1 ? t : null,
            add: () => {
                const d = l.length + 1, p = o ? o(d) : {id: `opt${d}`, label: `New option ${d}`};
                e.setValue([...l, p])
            },
            select: n,
            move: (d, p) => {
                const g = e.getValue().filter(m => m.id !== d.id);
                g.splice(p, 0, d), e.setValue(g)
            },
            remove: d => {
                const p = e.getValue().filter(g => g.id !== d.id);
                e.setValue(p, {removed: d})
            },
            label: e.getLabel({locale: !0}),
            renderItem: d => i ? i(d) : d.label,
            children: u.jsx(K, {
                space: "m", col: !0, children: !!t && r.map(d => {
                    const {name: p, getValue: g} = d, m = d.setValue, v = d.label || p, b = l[c];
                    if (!b) return null;
                    const x = b[p], w = g ? g(x) : x, j = _ => {
                        const E = {...b};
                        b[p] = m ? m(_, w) : _, e.setValue([...l], {item: b, previous: E}), p === "id" && n(b)
                    };
                    let C = u.jsx(jt, {label: v, value: w, onChange: j});
                    switch (d.type) {
                        case"select":
                            C = u.jsx(Ze, {label: v, options: d.options, value: w, onChange: j})
                    }
                    return u.jsx(y.Fragment, {children: C}, p)
                })
            })
        })
    }

    const cF = "gs-trait-custom-type", uF = xe(function ({trait: t, editor: n}) {
        const r = y.useRef(null), o = t.getType(), i = t.target, {Traits: l} = n, c = l.getType(o), d = !!(i && c),
            p = r.current;
        return y.useEffect(() => {
            if (c && p && i) {
                const g = new c({model: t, config: l.getConfig(), attributes: t.get("attributes")}), m = g.render().el;
                return p.appendChild(m), g.listenTo(i, "change", () => g.postUpdate()), () => {
                    p.removeChild(m), g.removeView()
                }
            }
        }, [p]), d && u.jsx("div", {className: cF, ref: r})
    }), cp = e => Vo((e || "").replace(/-/g, " ")), UC = e => ({size: "s", tip: e.get("tip")}), hl = (e, t) => ({
        ...UC(e),
        type: e.getType(),
        value: e.getValue(),
        label: e.get("label") !== !1 && cp(e.getLabel({locale: !0})),
        placeholder: (t == null ? void 0 : t.t(`traitManager.traits.attributes.${e.getId()}.placeholder`)) || e.get("placeholder") || "",
        onChange: (n, r) => e.setValue(n, {partial: r})
    }), WC = ({label: e, buttons: t}) => u.jsxs(K, {
        nowrap: !0,
        full: !0,
        items: "center",
        justify: "between",
        children: [u.jsx(q, {grow: !0, children: e}), u.jsx(K, {
            nowrap: !0,
            items: "center",
            justify: "end",
            gap: "x2s",
            children: t.map((n, r) => u.jsx(Xt, {...n}, r))
        })]
    }), GC = (e, t) => {
        const n = KC(e, t.traitManagerDataConfig), r = Kc(n), {hasDataResolverValue: o, enableDataValue: i} = n,
            l = hl(e), c = e.get("labelToTitle");
        return {
            fieldProps: {
                ...l,
                disabled: o,
                options: e.getOptions().map(d => {
                    const p = d.labelReact || d.name || d.label || d.value;
                    return zt(d) ? {id: d, label: d} : {
                        id: d.id || d.value,
                        title: c ? p : d.title,
                        icon: d.icon,
                        label: c ? "" : p
                    }
                }),
                onChange: d => e.setValue(d),
                labelAs: i ? "span" : void 0,
                label: u.jsx(WC, {label: l.label, buttons: r})
            }, connectDataSources: n
        }
    }, dF = (e, t) => {
        const {fieldProps: n, connectDataSources: r} = GC(e, t), {hasDataResolverValue: o} = r,
            i = o ? e.getValue() || void 0 : n.emptyState;
        return {...n, emptyState: i, hideCaret: o}
    }, fF = (e, t) => GC(e, t).fieldProps, pF = (e, t) => {
        const n = KC(e, t.traitManagerDataConfig), r = Kc(n), {hasDataResolverValue: o} = n, i = hl(e);
        return {
            disabled: o, ...i,
            min: e.get("min"),
            max: e.get("max"),
            step: e.get("step"),
            pan: !o,
            units: o ? [] : e.get("units"),
            onChange: (l, c) => {
                const d = c || isNaN(parseFloat(l)) ? l : parseFloat(l);
                e.setValue(d, {partial: c})
            },
            labelAs: r.length ? "span" : void 0,
            label: u.jsx(WC, {label: i.label, buttons: r})
        }
    };

    function KC(e, t) {
        const n = e.em.getEditor(), r = e.target;
        let o = !1;
        t === !0 ? o = !0 : ps(t) && St(t.enable) && (o = t.enable({trait: e, component: r, editor: n}));
        const i = e.getValue({skipResolve: !0}), l = r.collectionsStateMap, c = pf(i);
        return {
            hasDataResolverValue: c,
            dataResolverValue: c ? e.getValue() : void 0,
            enableDataValue: o,
            initialDataValue: i,
            handleDataValueChange: d => e.setValue(d),
            handleValueClear: () => {
                const d = e.getValue();
                e.setValue(""), e.setValue(d)
            },
            editor: n,
            additionalSources: l
        }
    }

    const gF = e => ({
        children: cp(e.getLabel() || e.get("text") || e.get("labelButton")), onClick: () => {
            const t = e.em.Editor, n = e.get("command");
            zt(n) ? t.runCommand(n) : n == null || n(t, e)
        }, full: !0
    }), hF = e => ({
        ...UC(e),
        value: !!e.getValue({useType: !0}),
        label: cp(e.getLabel()),
        onChange: t => e.setValue(t)
    }), mF = e => ({
        language: "css", ...e.get("typeProps") || {},
        value: e.getValue(),
        label: cp(e.getLabel()),
        onChange: n => e.setValue(n)
    }), vF = (e, t) => {
        const n = e.get("typeProps") || {};
        return {
            ...hl(e, t), isContain: !0, onOpen() {
                const r = t == null ? void 0 : t.Assets;
                r == null || r.open({
                    select(o) {
                        e.setValue(o.getSrc()), r.close()
                    }
                })
            }, btnLabel: e.get("text"), ...n
        }
    };

    function yF(e, t, n = {}) {
        var l;
        const r = e.get("visible"), o = e.getType(), i = {traitManagerDataConfig: n.traitManagerDataConfig};
        if (St(r) && r({component: e.target, trait: e}) === !1) return null;
        switch (o) {
            case"text":
                return u.jsx(jt, {...hl(e, t)});
            case"select":
                return u.jsx(Ze, {...dF(e, i)});
            case"number":
                return u.jsx(tt, {...pF(e, i)});
            case"checkbox":
                return u.jsx(Gc, {...hF(e)});
            case"color":
                return u.jsx(Cs, {...hl(e)});
            case"button":
                return u.jsx(at, {...gF(e)});
            case"radio":
                return u.jsx(Wn, {...fF(e, i)});
            case"code":
                return u.jsx(Ss, {...mF(e), ...n}, ((l = t == null ? void 0 : t.getSelected()) == null ? void 0 : l.getId()) || "");
            case"image":
            case"file":
                return u.jsx(qc, {...vF(e, t)});
            case"stack":
                return u.jsx(lF, {trait: e});
            case"href":
                return u.jsx(aF, {trait: e});
            case"custom":
                return u.jsx(sF, {editor: t, trait: e});
            default:
                return !!t.Traits.getType(o) ? u.jsx(uF, {editor: t, trait: e}) : u.jsx(jt, {...hl(e, t)})
        }
    }

    const fv = "gs-trait-manager", qC = ({
                                             trait: e,
                                             isDarkTheme: t,
                                             traitManagerDataConfig: n
                                         }) => u.jsx(q, {
        className: se(`${fv}-field gs-utl-mb-2 gs-utl-w-full`),
        children: yF(e, e.em.getEditor(), {isDarkTheme: t, traitManagerDataConfig: n})
    });

    function bF({traits: e, className: t}) {
        var g, m;
        const n = Pr(), {isDarkTheme: r} = sr(),
            i = (g = Ae().sdkOptions.dataSources) == null ? void 0 : g.traitManager,
            l = n.Traits.getTraitsByCategory(e), c = (m = l.find(v => !v.category)) == null ? void 0 : m.items,
            d = l.filter(v => v.category), p = se("gs-utl-text-center");
        return u.jsx(K, {
            className: se(fv, t),
            col: !0,
            children: n.getSelected() ? e.length ? u.jsxs(u.Fragment, {
                children: [c == null ? void 0 : c.map(v => u.jsx(qC, {
                    trait: v,
                    isDarkTheme: r,
                    traitManagerDataConfig: i
                }, v.id)), d.map(({category: v, items: b}, x) => u.jsx(ta, {
                    open: !!(v != null && v.get("open")),
                    onChange: ({open: w}) => v == null ? void 0 : v.set({open: w}),
                    handler: v == null ? void 0 : v.getLabel(),
                    handlerIcon: v == null ? void 0 : v.get("icon"),
                    classNameContent: "gs-utl-p-2",
                    classNameWrap: `${fv}-category -gs-utl-mx-2`,
                    className: w => se(mh.itemList({index: x + (c ? 1 : 0), open: w, length: d.length})),
                    children: b.map(w => u.jsx(qC, {trait: w, isDarkTheme: r, traitManagerDataConfig: i}, w.id))
                }, v == null ? void 0 : v.id))]
            }) : u.jsx(q, {className: p, children: "No properties available"}) : u.jsx(q, {
                className: p,
                children: n.t("traitManager.empty")
            })
        })
    }

    const pv = xe(bF), xF = "gs-panel-properties", wF = y.memo(xe(function ({className: t, ...n}) {
        return u.jsx(vo, {
            className: U(xF, "gs-utl-overflow-auto gs-utl-h-full", t),
            classNameAccordion: U("gs-utl-overflow-hidden gs-utl-flex gs-utl-flex-col"),
            classNameAccordionContent: U("gs-utl-overflow-auto"), ...n,
            children: u.jsx(f1, {children: r => u.jsx(pv, {...r})})
        })
    })), SF = async ({html: e = "", css: t = "", el: n}) => {
        const r = `<span style="color: initial; display: inline-block;"><style> body { margin: 0; } ${t}</style>${e}</span>`,
            o = {};
        if (document.body.attachShadow) {
            const i = n.shadowRoot || n.attachShadow({mode: "open"});
            i.innerHTML = r
        }
        return o
    }, jF = xe(function ({rule: t, onSelect: n, onRemove: r, className: o}) {
        const i = y.useRef(null), c = Ae().editor, d = Ke(), p = t.getDevice(),
            g = t.getState(), {isDarkTheme: m} = sr(), [v, b] = y.useState(t.toCSS({allowEmpty: !0})), [x, w] = y.useState(v),
            j = t.selectorsToString(), C = () => {
                c.select(), setTimeout(() => c.Selectors.select(t)), n == null || n()
            }, _ = () => {
                c.Css.remove(t), r == null || r()
            }, E = () => {
                if (x) {
                    const k = c.Parser.parseCss(x)[0];
                    k && (t.setStyle(k.style), b(x))
                }
            };
        return y.useEffect(() => {
            if (i.current) {
                const k = i.current;
                SF({
                    el: k, html: '<div class="prv-rule">Preview</div>', css: `
        .prv-rule {
          background-color: #fff;
          padding: 5px;
        }
        .prv-rule, ${v}
        `
                })
            }
        }, [i, v]), u.jsx(tr, {
            padding: !1, className: pe("overflow-hidden max-w-full group", o), children: u.jsxs(K, {
                col: !0,
                space: "xs",
                children: [u.jsx(K, {
                    className: pe("bg-checker gjs-p-3 overflow-auto overflow-x-hidden h-20"),
                    justify: "center",
                    items: "center",
                    children: u.jsx("div", {ref: i, className: pe("relative flex items-center justify-center")})
                }), u.jsxs(K, {
                    className: pe("gjs-p-1 w-full"),
                    col: !0,
                    space: "s",
                    children: [u.jsxs(K, {
                        nowrap: !0,
                        items: "center",
                        space: "xs",
                        full: !0,
                        children: [u.jsx(q, {
                            grow: !0,
                            children: u.jsx("pre", {
                                className: pe("text-xs bg-white/10", te.txt, ye.rnd, et.xyS),
                                children: j
                            })
                        }), !!p && p.getWidthMedia() && u.jsx(q, {
                            children: u.jsx(mn, {
                                title: u.jsxs(u.Fragment, {children: [d.t("deviceManager.device"), ": ", u.jsx("b", {children: p.getName()})]}),
                                children: u.jsx(be, {icon: fe.cellphoneLink, size: Ee.sx})
                            })
                        }), !!g && u.jsx(q, {
                            children: u.jsx(mn, {
                                title: u.jsxs(u.Fragment, {children: [d.t("selectorManager.state"), ": ", u.jsx("b", {children: g.getLabel()})]}),
                                children: u.jsx(be, {icon: fe.flare, size: Ee.sx})
                            })
                        })]
                    }), u.jsxs(K, {
                        nowrap: !0,
                        className: pe(nt.txtEllips),
                        space: "s",
                        children: [u.jsx(q, {
                            className: pe("group-hover:gs-utl-opacity-100 opacity-0 transition-opacity"),
                            grow: !0,
                            children: u.jsx(at, {
                                onClick: C,
                                className: pe("text-sm gjs-mr-auto"),
                                size: "m2",
                                full: !0,
                                children: d.t("select")
                            })
                        }), u.jsx(Wo, {
                            overlay: !0,
                            title: !1,
                            padding: !1,
                            buttonAs: "span",
                            handler: u.jsx(Xt, {
                                title: d.t("selectorManager.showCSS"),
                                children: u.jsx(be, {icon: fe.codeBraces, size: Ee.sx})
                            }),
                            children: ({close: k}) => u.jsxs(K, {
                                className: pe("relative w-80 h-48"),
                                col: !0,
                                children: [u.jsx(q, {
                                    grow: !0,
                                    children: u.jsx(Ss, {
                                        value: G1(v),
                                        onChange: w,
                                        language: "css",
                                        padding: 5,
                                        isDarkTheme: m,
                                        clean: !0
                                    })
                                }), u.jsx(at, {
                                    className: pe("absolute right-2 bottom-2 text-sm"),
                                    variant: "pr",
                                    size: "m2",
                                    onClick: () => {
                                        E(), k()
                                    },
                                    children: d.t("update")
                                })]
                            })
                        }), u.jsx(nv, {
                            onConfirm: _,
                            className: pe("w-48"),
                            children: u.jsx(Xt, {
                                title: d.t("selectorManager.deleteStyle"),
                                children: u.jsx(be, {icon: fe.delete, size: Ee.sx})
                            })
                        })]
                    })]
                })]
            }, t.cid)
        })
    }), CF = xe(function () {
        const [t] = If(), n = go(), r = Ke(), [o, i] = y.useState(""), [l, c] = y.useState(""),
            p = Ae().editor, [g, m] = y.useState(p.Css.getRules("")),
            v = p.Devices.getDevices().map(w => ({id: w.id, label: w.getName()})), b = g.filter(w => {
                var j;
                return !(o && !Ma(w.selectorsToString(), o) || l && ((j = w.getDevice()) == null ? void 0 : j.id) !== l)
            }), x = () => m(p.Css.getRules(""));
        return u.jsxs(K, {
            col: !0,
            space: "m",
            children: [u.jsxs(K, {
                items: "center",
                space: "m",
                children: [u.jsx(q, {
                    children: u.jsx(jt, {
                        size: "s",
                        type: "search",
                        value: o,
                        onInput: i,
                        placeholder: `${r.t("selectorManager.searchStyle")}...`
                    })
                }), u.jsx(q, {
                    children: u.jsx(Ze, {
                        includeEmpty: !0,
                        size: "s",
                        value: l,
                        options: v,
                        onChange: c,
                        emptyState: r.t("deviceManager.allDevices"),
                        handlerSelected: w => u.jsxs(K, {
                            space: "s",
                            items: "center",
                            children: [u.jsx(be, {
                                icon: fe.cellphoneLink,
                                size: Ee.sx
                            }), u.jsx("span", {children: w.label})]
                        })
                    })
                })]
            }), u.jsx(q, {
                className: pe("gs-utl-h-[75vh] w-full overflow-auto"),
                children: b.length ? u.jsx(pu, {
                    data: b,
                    listClassName: pe("grid grid-cols-4 gap-2 gjs-pr-2"),
                    itemContent: (w, j) => u.jsx(jF, {rule: j, onRemove: x, onSelect: n.close}, j.cid)
                }, t) : u.jsx(K, {justify: "center", children: r.t("modals.styleCatalog.noStyles")})
            })]
        })
    });

    function YC({className: e, value: t, active: n, unstyled: r, activable: o, onChange: i, onActive: l, ...c}) {
        const [d, p] = y.useState(n);
        y.useEffect(() => {
            p(n)
        }, [n]);
        const g = v => {
            l == null || l(v), p(v)
        }, m = v => {
            i(v), g(!1)
        };
        return u.jsx("div", {
            className: se("truncate", e), ...c,
            onDoubleClick: () => o && g(!0),
            children: d ? u.jsx(iv, {
                className: se(r && nt.noFocusOut),
                value: t,
                onChange: m
            }) : u.jsx(u.Fragment, {children: t})
        })
    }

    const EF = xe(function ({selector: t, className: n, removable: r, toggleable: o}) {
            const i = Ke(), l = Ae(), [c, d] = y.useState(), [p, g] = y.useState(t.getActive()),
                m = l.editor, {Selectors: v} = m, b = t.getLabel(), x = u.jsx(be, {icon: fe.dotsVertical, size: Ee.sx}),
                w = () => {
                    v.removeSelected(t)
                }, j = O => {
                    c && v.rename(c, O), d(void 0)
                }, C = () => {
                    v.duplicateSelected(t)
                }, _ = () => {
                    const O = !t.getActive();
                    g(O), t.setActive(O)
                }, k = [{id: "rename", label: i.t("rename"), action: () => d(t)}, {
                    id: "duplicate",
                    label: i.t("duplicate"),
                    action: C
                }, r && {id: "delete", label: i.t("delete"), action: w}, o && {
                    id: "active",
                    label: i.t(p ? "disable" : "enable"),
                    action: _
                }].filter(Boolean), T = (O, A) => $ => {
                    O(), St(A) && A($)
                };
            return u.jsx(dn, {
                className: pe(["gjs-ml-1 gjs-my-1 group overflow-hidden cursor-default relative", te.sel, n]),
                s: "s",
                children: u.jsxs(K, {
                    items: "center",
                    children: [u.jsx(q, {
                        className: pe("gjs-mr-4", !c && !p && "opacity-50 line-through"),
                        children: u.jsx(YC, {value: b, onChange: j, active: !!c, unstyled: !0})
                    }), u.jsx(K, {
                        className: pe("absolute h-full right-0 transition-opacity", te.sel, te.selBr, ye.bl),
                        children: u.jsx(Wo, {
                            handler: x,
                            title: !1,
                            padding: !1,
                            fixed: !0,
                            overlay: !0,
                            children: ({close: O}) => k.map(A => u.jsx(Tc, {
                                className: pe(te.txt),
                                label: A.label,
                                action: T(O, A.action)
                            }, A.id))
                        })
                    })]
                })
            })
        }), PF = e => {
            var r, o;
            let t = (r = e == null ? void 0 : e.selectorsToString) == null ? void 0 : r.call(e);
            const n = (o = e == null ? void 0 : e.getAtRule) == null ? void 0 : o.call(e);
            return t && n && (t = `${n} {
	${t}
}`), t
        }, Zr = "gs-cmp-selector-manager", gv = {},
        XC = xe(function ({selectedState: t, states: n, setState: r, styleCatalog: o, stateSelector: i}) {
            var ie, de, je;
            const l = Ke(), c = go(), [d, p] = y.useState(!1), [g, m] = y.useState(gv), {
                toggleCssPanel: v,
                isCssPanelActive: b,
                editor: x
            } = Ae(), w = x == null ? void 0 : x.getSelected(), j = x == null ? void 0 : x.Styles.getSelected();
            if (y.useEffect(() => {
                if (x && j) {
                    const he = setTimeout(() => {
                        let Ie = gv;
                        const He = w == null ? void 0 : w.get("selectorManager");
                        w && St(He) && (Ie = He({editor: x, component: w})), m(Ie || gv)
                    });
                    return () => clearTimeout(he)
                }
            }, [w, x, j]), !x) return null;
            const {Selectors: C} = x, _ = g.disableClasses, E = g.disableComponent, k = _ && E,
                T = C.getComponentFirst() && !E, O = C.getSelectedAll(), A = C.getAll({array: !0}),
                $ = x.getSelectedAll(), F = n.map(he => ({id: he.getName(), label: he.getLabel()})), N = x.getModel(),
                z = (ie = j == null ? void 0 : j.getDevice) == null ? void 0 : ie.call(j),
                V = (de = j == null ? void 0 : j.getState) == null ? void 0 : de.call(j), X = O.reduce((he, Ie) => {
                    const He = he.indexOf(Ie);
                    return He >= 0 && he.splice(He, 1), he
                }, A), Z = U("gs-utl-overflow-hidden", ye.b, ye.rnd, te.br), R = U(te.bA),
                B = U("gs-utl-flex gs-utl-h-full gs-utl-cursor-pointer gs-utl-p-2", ye.br, te.br), Q = `${te.bgA}`,
                H = PF(j), I = O.length > 0, D = $.length > 0, M = I || D, W = T && D || !T && !I,
                ce = W ? "Components" : "Selectors", ne = he => l.t(`selectorManager.${he}`),
                ue = l.t("modals.styleCatalog.title"), me = () => c.open({title: ue, content: u.jsx(CF, {})}),
                ae = X.filter(he => he.isClass()).map(he => ({id: he, label: he.getLabel()}));
            return u.jsxs(K, {
                className: Zr,
                gap: "s",
                col: !0,
                full: !0,
                children: [u.jsxs(K, {
                    className: U(`${Zr}__head`),
                    items: "center",
                    justify: "between",
                    gap: "m",
                    children: [u.jsxs(K, {
                        className: U(`${Zr}__head-start`),
                        items: "center",
                        gap: "s",
                        children: [u.jsx(q, {
                            className: U(`${Zr}__head-title`),
                            children: ne("selection")
                        }), o !== !1 && u.jsx(q, {
                            className: U(`${Zr}__style-catalog`),
                            children: u.jsx(mn, {
                                className: "gs-utl-cursor-pointer",
                                onClick: me,
                                title: ue,
                                children: u.jsx(be, {icon: fe.paletteSwatch, size: Ee.s})
                            })
                        })]
                    }), !!j && i !== !1 && !k && u.jsx(q, {
                        className: `${Zr}__head-end`,
                        children: u.jsx(Ze, {
                            size: "s",
                            value: t,
                            options: F,
                            includeEmpty: !0,
                            onChange: r,
                            emptyState: `- ${ne("state")} -`,
                            className: U(t && te.bA)
                        })
                    })]
                }), M && !k ? u.jsxs(u.Fragment, {
                    children: [!_ && u.jsxs(K, {
                        className: U(`${Zr}__field-selectors`, Z, !W && R),
                        items: "stretch",
                        gap: "xs",
                        children: [u.jsx(mn, {
                            title: ne(I ? "applyOnSelector" : "noSelectors"),
                            className: U(B, !W && Q),
                            onClick: () => I && C.setComponentFirst(!1),
                            children: u.jsx(K, {
                                className: "gs-utl-h-full",
                                items: "center",
                                children: u.jsx(be, {icon: fe.tag, size: Ee.sx})
                            })
                        }), u.jsx(q, {
                            grow: !0,
                            children: u.jsx(K, {
                                className: "gs-utl-h-full gs-utl-pr-1",
                                items: "center",
                                children: d ? u.jsx(IC, {
                                    autoFocus: !0,
                                    open: !0,
                                    hideCaret: !0,
                                    border: !1,
                                    options: ae,
                                    allowNew: ne("addNewSelector"),
                                    onBlur: () => setTimeout(() => p(!1), 100),
                                    onChange: he => {
                                        he && (C.addSelected(he.id || he.label), p(!1))
                                    }
                                }) : u.jsxs(u.Fragment, {
                                    children: [D && u.jsx(Xt, {
                                        title: ne("addNewSelector"),
                                        variant: "out",
                                        size: "xs",
                                        className: "gs-utl-p-0.5",
                                        onClick: () => p(!0),
                                        block: !0,
                                        children: u.jsx(be, {icon: fe.plus, size: Ee.sx})
                                    }), O.map(he => u.jsx(EF, {
                                        selector: he,
                                        removable: D,
                                        toggleable: D && O.filter(Ie => Ie.getActive() || Ie === he).length > 1
                                    }, he.toString()))]
                                })
                            })
                        })]
                    }), !E && u.jsxs(K, {
                        className: U(`${Zr}__field-components`, Z, W && R),
                        items: "stretch",
                        gap: "xs",
                        children: [u.jsx(mn, {
                            title: ne(D ? "applyOnComponents" : "noComponents"),
                            onClick: () => D && C.setComponentFirst(!0),
                            className: U(B, W && Q),
                            children: u.jsx(K, {
                                className: "gs-utl-h-full",
                                items: "center",
                                children: u.jsx(be, {icon: fe.targetVariant, size: Ee.sx})
                            })
                        }), u.jsx(q, {
                            grow: !0,
                            className: "gs-utl-py-0.5",
                            children: u.jsx(K, {
                                className: "gs-utl-h-full gs-utl-pr-1",
                                items: "center",
                                children: $.map(he => u.jsx(dn, {
                                    s: "s",
                                    className: U("gs-utl-ml-1 gs-utl-my-0.5 gs-utl-cursor-default", te.cmp),
                                    onPointerEnter: () => N.setHovered(he),
                                    onPointerOut: () => N.setHovered(),
                                    label: he.getName()
                                }, he.getId()))
                            })
                        })]
                    }), u.jsxs(K, {
                        className: `${Zr}__actions`,
                        gap: "s",
                        items: "center",
                        justify: "between",
                        children: [u.jsx(mn, {
                            title: u.jsxs(u.Fragment, {
                                children: [u.jsx("div", {children: ne("selected")}), u.jsx("pre", {
                                    className: U("gs-utl-text-xs gs-utl-mt-1 gs-utl-bg-white/10 gs-utl-text-gray-400", ye.rnd, et.xyS),
                                    children: H
                                }), u.jsx("div", {
                                    className: "gs-utl-text-xs gs-utl-mt-1.5",
                                    children: ne("currentSelection")
                                })]
                            }),
                            children: u.jsx(dn, {
                                className: U(ye.b, ye.rnd, te.br),
                                s: "xs",
                                nopad: !0,
                                block: !0,
                                children: u.jsx(be, {icon: fe.target, size: Ee.sx})
                            })
                        }), u.jsx(q, {
                            className: "gs-utl-text-sm",
                            children: u.jsx(dn, {
                                className: U(ye.b, ye.rnd, te.br),
                                s: "xs",
                                nopad: !0,
                                children: u.jsxs(K, {
                                    space: "xs",
                                    items: "center",
                                    nowrap: !0,
                                    children: [!!z && z.getWidthMedia() && u.jsxs(u.Fragment, {
                                        children: [u.jsx(mn, {
                                            title: u.jsxs(u.Fragment, {children: [ne("device"), ": ", u.jsx("b", {children: z.getName()})]}),
                                            children: u.jsx(be, {icon: fe.cellphoneLink, size: Ee.sx})
                                        }), u.jsx(q, {className: "gs-utl-opacity-30", children: "|"})]
                                    }), u.jsx(mn, {
                                        title: u.jsxs(u.Fragment, {
                                            children: [ne("target"), ": ", u.jsx("b", {children: ce}), u.jsxs("span", {
                                                className: "gs-utl-text-xs gs-utl-opacity-75",
                                                children: [" ", (je = j == null ? void 0 : j.selectorsToString) == null ? void 0 : je.call(j, {skipState: 1})]
                                            })]
                                        }), children: u.jsx(be, {icon: W ? fe.targetVariant : fe.tag, size: Ee.sx})
                                    }), !!V && u.jsxs(u.Fragment, {
                                        children: [u.jsx(q, {
                                            className: "gs-utl-opacity-30",
                                            children: "|"
                                        }), u.jsx(mn, {
                                            title: u.jsxs(u.Fragment, {children: [ne("state"), ": ", u.jsx("b", {children: V.getLabel()})]}),
                                            children: u.jsx(be, {icon: fe.flare, size: Ee.sx})
                                        })]
                                    })]
                                })
                            })
                        }), u.jsx(Xt, {
                            title: l.t("toggleCss"),
                            onClick: v,
                            active: b,
                            size: "s",
                            children: u.jsx(be, {icon: fe.codeBraces, size: Ee.sx})
                        })]
                    })]
                }) : u.jsxs(K, {
                    className: U(`${Zr}__empty-state`, "gs-utl-text-sm gs-utl-leading-6 gs-utl-my-4"),
                    col: !0,
                    children: [u.jsx(q, {
                        className: `${Zr}__empty-state-title`,
                        children: ne("noSelecton")
                    }), u.jsxs("ul", {
                        className: U(`${Zr}__empty-state-list`, "gs-utl-list-disc gs-utl-pl-5 gs-utl-mt-2"),
                        children: [u.jsx("li", {children: ne("selectFromCanvas")}), u.jsx("li", {children: ne("selectFromList")})]
                    })]
                })]
            })
        }), _F = "gs-panel-selectors",
        kF = y.memo(xe(function ({className: t, styleCatalog: n, stateSelector: r, ...o}) {
            return u.jsx(vo, {
                className: U(_F, t), ...o,
                children: u.jsx(m2, {children: i => u.jsx(XC, {...i, styleCatalog: n, stateSelector: r})})
            })
        })), TF = y.forwardRef(function ({children: t, className: n, content: r, ...o}, i) {
            return u.jsx("div", {className: U(pe("gs-design-manager-tab"), n), ref: i, ...o, children: t})
        }), ZC = "gs-cmp-sidebar-right", JC = "gs-cmp-traits-provider",
        hv = U("gs-utl-overflow-y-auto gs-utl-overflow-x-hidden gs-utl-max-w-full");

    function OF() {
        var _, E, k;
        const {
                isCssPanelActive: e,
                selectedDesignerTab: t,
                showSelectors: n,
                setSelectedDesignerTab: r,
                sdkProps: o,
                sdkOptions: i,
                isProjectTypeEmail: l
            } = Ae(), c = Ke(), d = U(e && "gs-utl-hidden"),
            g = (((_ = or(o.children, TF)) == null ? void 0 : _.filter(Boolean)) || []).map(({props: T}, O) => ({
                id: T.id,
                label: T.label,
                content: u.jsx(ea, {children: T.children}),
                order: T.order ?? 2 + O + 1
            })), m = (E = i.designPanel) == null ? void 0 : E.propsInStyles,
            v = (k = i.designPanel) == null ? void 0 : k.hideTabs, b = m === !0 || l && m !== !1,
            x = v === !0 || l && v !== !1, w = c.t("traitManager.panelLabel"), C = [{
                id: "style",
                label: c.t("styleManager.panelLabel"),
                order: 1,
                content: u.jsxs(K, {
                    col: !0,
                    full: !0,
                    children: [!!n && u.jsx(q, {
                        className: U("gs-cmp-selectors-provider", et.s, ye.bb, te.br),
                        children: u.jsx(m2, {children: T => u.jsx(XC, {...T})})
                    }), b && u.jsx(q, {
                        className: U(JC, hv),
                        children: u.jsx(ta, {
                            handler: w,
                            className: Q2(!1),
                            sticky: !0,
                            open: !0,
                            children: u.jsx(f1, {
                                children: T => u.jsx(pv, {
                                    ...T,
                                    className: U("gs-utl-p-2", te.br, ye.bb)
                                })
                            })
                        })
                    }), u.jsx(q, {
                        className: U("gs-cmp-styles-provider", hv),
                        grow: !0,
                        children: u.jsx(v2, {children: T => u.jsxs(u.Fragment, {children: [e && u.jsx(Sj, {}), u.jsx(rj, {className: d, ...T})]})})
                    })]
                })
            }, !b && {
                id: "props",
                label: w,
                order: 2,
                content: u.jsx(K, {
                    className: JC,
                    col: !0,
                    full: !0,
                    children: u.jsx(q, {className: U(et.s, hv), children: u.jsx(f1, {children: T => u.jsx(pv, {...T})})})
                })
            }, ...g].filter(Boolean).sort((T, O) => T.order - O.order);
        return u.jsx(K, {
            className: ZC,
            col: !0,
            full: !0,
            nowrap: !0,
            children: u.jsx(_s, {value: t, onChange: r, tabs: C, className: U(`${ZC}__tabs`, x && "gs-utl-hidden")})
        })
    }

    const QC = xe(OF), LF = "gs-panel-sidebar-tabs", MF = y.memo(xe(function ({className: t, ...n}) {
            return u.jsx(vo, {className: U(LF, "gs-utl-h-full", t), ...n, children: u.jsx(QC, {})})
        })), AF = "gs-panel-styles", RF = y.memo(xe(function ({className: t, ...n}) {
            const {isCssPanelActive: r} = Ae(), o = U(r && " gs-utl-hidden");
            return u.jsx(vo, {
                className: U(AF, "gs-utl-overflow-auto gs-utl-h-full", t),
                classNameAccordion: U("gs-utl-overflow-hidden gs-utl-flex gs-utl-flex-col"),
                classNameAccordionContent: U("gs-utl-overflow-auto"), ...n,
                children: u.jsx(v2, {children: i => u.jsxs(u.Fragment, {children: [r && u.jsx(Sj, {}), u.jsx(rj, {className: o, ...i})]})})
            })
        })), NF = "gs-panel-templates",
        $F = y.memo(xe(function ({className: t, templates: n, content: r, onSelect: o, ...i}) {
            const l = Qw(), {projectTypeFilter: c} = l;
            let d = n ?? l.templates;
            return d = d == null ? void 0 : d.map(p => ({...p, isTemplate: !0})), y.useEffect(() => {
                n || l.loadTemplates()
            }, [n]), u.jsx(vo, {
                className: U(NF, "gs-utl-overflow-hidden gs-utl-h-full", t),
                classNameAccordion: U("gs-utl-overflow-hidden gs-utl-flex gs-utl-flex-col"),
                classNameAccordionContent: U("gs-utl-overflow-hidden gs-utl-flex gs-utl-flex-col"), ...i,
                children: u.jsx(K, {
                    className: pe("relative gs-utl-h-full"),
                    nowrap: !0,
                    col: !0,
                    space: "m",
                    children: u.jsx(K, {
                        className: pe("gs-utl-h-[75vh] gs-utl-flex-grow"),
                        nowrap: !0,
                        col: !0,
                        space: "m",
                        children: u.jsx(nC, {
                            templates: d,
                            projectType: Xe[c],
                            content: r,
                            onSelect: o,
                            skipProjectNamePopover: !0
                        })
                    })
                })
            })
        })), DF = "gs-cmp-row", IF = y.memo(function ({className: t, children: n, full: r, ...o}) {
            return u.jsx(_r, {className: U(DF, te.bg, "gs-utl-flex", r && "gs-utl-w-full", t), ...o, children: Gn(n)})
        }), VF = "gs-cmp-select-field", HF = y.memo(xe(function ({
                                                                     className: t,
                                                                     style: n,
                                                                     label: r,
                                                                     name: o,
                                                                     value: i,
                                                                     options: l,
                                                                     size: c,
                                                                     onChange: d,
                                                                     required: p,
                                                                     disabled: g,
                                                                     emptyState: m,
                                                                     editorEvents: v
                                                                 }) {
            const {editor: b} = Ae(), [x, w] = y.useState(() => ({
                required: p,
                disabled: g,
                style: n,
                className: t,
                label: r,
                name: o,
                value: i,
                options: l,
                size: c,
                emptyState: m
            })), j = C => {
                d({value: C, editor: b, state: x, setState: _ => w(E => ({...E, ..._}))})
            };
            return ml({
                editor: b,
                editorEvents: v,
                localState: x,
                setLocalState: w
            }), u.jsx(Ze, {
                classNameContainer: U(VF, x.className),
                style: x.style,
                label: x.label,
                name: x.name,
                value: x.value ?? "",
                options: x.options ?? [],
                size: x.size,
                required: x.required,
                disabled: x.disabled,
                emptyState: x.emptyState,
                onChange: j
            })
        })), FF = "gs-cmp-select-field", zF = y.memo(xe(function ({
                                                                      className: t,
                                                                      style: n,
                                                                      label: r,
                                                                      name: o,
                                                                      value: i,
                                                                      size: l,
                                                                      onChange: c,
                                                                      required: d,
                                                                      disabled: p,
                                                                      emptyState: g,
                                                                      editorEvents: m
                                                                  }) {
            const {editor: v} = Ae(), [b, x] = y.useState(() => ({
                required: d,
                disabled: p,
                style: n,
                className: t,
                label: r,
                name: o,
                value: i,
                size: l,
                emptyState: g
            })), w = j => {
                c({value: j, editor: v, state: b, setState: C => x(_ => ({..._, ...C}))})
            };
            return ml({
                editor: v,
                editorEvents: m,
                localState: b,
                setLocalState: x
            }), u.jsx(hf, {
                classNameContainer: U(FF, b.className),
                style: b.style,
                label: b.label,
                name: b.name,
                value: b.value ?? "",
                size: b.size,
                required: b.required,
                disabled: b.disabled,
                emptyState: b.emptyState,
                onChange: w
            })
        })), BF = "gs-sidebar-bottom", UF = y.memo(xe(function ({children: t, className: n, style: r, height: o, ...i}) {
            const {isInPreview: l, isBottomSidebarOpen: c} = Ae(), d = o ?? 35,
                p = y.useMemo(() => ({height: d, marginBottom: l || !c ? `-${d}px` : 0, ...r}), [l, c, r]);
            return u.jsx(_r, {
                className: U(BF, "gs-utl-flex gs-utl-transition-spacing", ye.bt, te.br, n),
                style: p, ...i,
                children: t ? Gn(t) : void 0
            })
        })), WF = xe(function (t) {
            var E;
            const {
                    leftSidebarSize: n,
                    setLeftSidebarSize: r,
                    editor: o,
                    isInPreview: i,
                    isLeftSidebarOpen: l,
                    sdkProps: c,
                    showPages: d
                } = Ae(), p = c.children, g = ((E = t.style) == null ? void 0 : E.width) ?? t.width, m = g ?? n,
                v = t.resizable === !1, b = U(t.className, "gs-utl-h-full gs-utl-transition-spacing", ye.br, te.br),
                x = U("gs-utl-w-full", ye.bb, te.br),
                w = U("gs-utl-w-full gs-utl-overflow-hidden gs-utl-flex gs-utl-flex-col"),
                j = y.useMemo(() => ({marginLeft: i || !l ? `-${m}px` : 0, ...t.style}), [m, i, l, t.style]),
                C = () => o == null ? void 0 : o.refresh(), _ = (k, T, O) => {
                    r(O.getBoundingClientRect().width)
                };
            return u.jsx(ip, {
                className: b,
                enable: v ? !1 : void 0,
                right: !v,
                style: j,
                height: "100%",
                width: m,
                minWidth: g ?? 200,
                maxWidth: g ?? 400,
                onResize: C,
                onResizeStop: _,
                children: t.children ?? u.jsxs(K, {
                    full: !0,
                    col: !0,
                    children: [d && u.jsx(q, {
                        className: x,
                        children: u.jsx(h2, {children: k => u.jsxs(u.Fragment, {children: [or(p, $C), u.jsx(RC, {...k}), or(p, NC)]})})
                    }), u.jsx(q, {
                        className: w,
                        grow: !0,
                        children: u.jsx(g2, {children: k => u.jsxs(u.Fragment, {children: [or(p, PC), u.jsx(CC, {...k}), or(p, EC)]})})
                    })]
                })
            })
        }), GF = "gs-sidebar-left", KF = y.memo(xe(function ({children: t, width: n, resizable: r, ...o}) {
            return u.jsx(WF, {
                className: U(GF, "gs-utl-flex gs-utl-flex-col gs-utl-flex-nowrap", Ff(o)),
                width: n,
                resizable: r,
                style: zf(o),
                children: t ? Gn(t) : void 0
            })
        })), qF = xe(function (t) {
            var x;
            const {rightSidebarSize: n, setRightSidebarSize: r, editor: o, isInPreview: i, isRightSidebarOpen: l} = Ae(),
                c = ((x = t.style) == null ? void 0 : x.width) ?? t.width, d = c ?? n, p = t.resizable === !1,
                g = U(t.className, "gs-utl-h-full gs-utl-transition-spacing", ye.bl, te.br),
                m = y.useMemo(() => ({marginRight: i || !l ? `-${d}px` : 0, ...t.style}), [d, i, l, t.style]),
                v = () => o == null ? void 0 : o.refresh(), b = (w, j, C) => {
                    r(C.getBoundingClientRect().width)
                };
            return u.jsx(ip, {
                className: g,
                enable: p ? !1 : void 0,
                left: !p,
                style: m,
                height: "100%",
                width: d,
                minWidth: c ?? 200,
                maxWidth: c ?? 400,
                onResize: v,
                onResizeStop: b,
                children: t.children ?? u.jsx(QC, {})
            })
        }), YF = "gs-sidebar-right", XF = y.memo(xe(function ({children: t, resizable: n, ...r}) {
            return u.jsx(qF, {
                className: U(YF, "gs-utl-flex gs-utl-flex-col gs-utl-flex-nowrap", Ff(r)),
                resizable: n,
                style: zf(r),
                children: t ? Gn(t) : void 0
            })
        })), ZF = xe(function ({className: t, variant: n, value: r, tabs: o, style: i, editorEvents: l, onChange: c}) {
            const {editor: d} = Ae(), [p, g] = y.useState(() => ({tabs: o, style: i, value: r, variant: n, className: t})),
                m = y.useMemo(() => {
                    var b;
                    return ((b = p.tabs) == null ? void 0 : b.map(x => ({...x, content: Gn(x.children)}))) || []
                }, [p.tabs]), v = b => {
                    c && d ? c({value: b, editor: d, state: p, setState: x => g(w => ({...w, ...x}))}) : g(x => ({
                        ...x,
                        value: b
                    }))
                };
            return ml({editor: d, editorEvents: l, localState: p, setLocalState: g}), u.jsx(_s, {
                tabs: m,
                className: U(p.className),
                variant: p.variant,
                value: p.value,
                style: p.style,
                onChange: v
            })
        }), JF = "gs-cmp-text", QF = y.memo(function ({className: t, content: n, children: r, ...o}) {
            return u.jsx(_r, {className: U(JF, t), ...o, children: r || n})
        }), ez = "gs-cmp-virtual-list",
        tz = xe(function ({id: t, items: n, itemLayout: r, itemsPerRow: o = 12, className: i, style: l, htmlAttrs: c}) {
            const [d, p] = y.useState(0), {editor: g, transitionTime: m} = Ae(), v = tv(o);
            return y.useEffect(() => {
                const b = setTimeout(() => p(x => ++x), m);
                return () => clearTimeout(b)
            }, [m]), !!d && u.jsx(pu, {
                ...c,
                data: n,
                className: U(ez, "gs-utl-h-full", i),
                listClassName: `gs-utl-grid gs-utl-gap-2 gs-utl-pr-2 ${v}`,
                style: l,
                itemContent: (b, x) => u.jsx(ee.Fragment, {
                    children: r ? Gn(r({
                        item: x,
                        editor: g
                    })) : u.jsx("pre", {children: JSON.stringify(x, void 0, 2)})
                }, x.id ?? b)
            }, t)
        });
    var mv = (e => (e.text = "text", e.row = "row", e.column = "column", e.button = "button", e.buttonGroupField = "buttonGroupField", e.menuList = "menuList", e.inputField = "inputField", e.codeField = "codeField", e.selectField = "selectField", e.selectFontField = "selectFontField", e.tabs = "tabs", e.devices = "devices", e.custom = "custom", e.panelLayers = "panelLayers", e.panelPages = "panelPages", e.panelSelectors = "panelSelectors", e.panelStyles = "panelStyles", e.panelProperties = "panelProperties", e.panelSidebarTabs = "panelSidebarTabs", e.panelPagesLayers = "panelPagesLayers", e.panelBlocks = "panelBlocks", e.panelPageSettings = "panelPageSettings", e.panelGlobalStyles = "panelGlobalStyles", e.panelAssets = "panelAssets", e.panelTemplates = "panelTemplates", e.sidebarLeft = "sidebarLeft", e.sidebarRight = "sidebarRight", e.sidebarTop = "sidebarTop", e.sidebarBottom = "sidebarBottom", e.canvas = "canvas", e.canvasSidebarTop = "canvasSidebarTop", e.virtualList = "virtualList", e.dataPathField = "dataPathField", e.panelDataVariablePicker = "panelDataVariablePicker", e.panelDataConditionPicker = "panelDataConditionPicker", e.panelDataCollectionPicker = "panelDataCollectionPicker", e.panelDataValuePicker = "panelDataValuePicker", e))(mv || {});
    const nz = {
            array: fe.codeBrackets,
            object: fe.codeBraces,
            string: fe.codeString,
            number: fe.number,
            boolean: fe.toggleSwitchOffOutline,
            default: fe.null
        }, rz = e => Array.isArray(e) ? "array" : e === null ? "default" : typeof e,
        oz = xe(({name: e, value: t, isActive: n, onClick: r, className: o}) => {
            const i = Ke().tScoped("dataSources"), l = rz(t), c = typeof t == "object" && t !== null,
                d = U(o, "gs-utl-text-left", te.hBgH, ye.b, ye.rnd, et.xy, n ? [ye.bA, te.tA] : [te.br, te.txtHighEmphasisH]),
                p = g => typeof g == "object" ? Array.isArray(g) ? i("items", {params: {length: g.length}}) : g ? i("properties", {params: {length: Object.keys(g).length}}) : "null" : String(g);
            return u.jsx(at, {
                onClick: r,
                border: !1,
                className: d,
                full: !0,
                children: u.jsxs(K, {
                    items: "center",
                    justify: "between",
                    gap: "s",
                    nowrap: !0,
                    children: [u.jsxs(K, {
                        className: "gs-utl-flex-grow gs-utl-overflow-hidden",
                        gap: "s",
                        col: !0,
                        children: [u.jsxs(K, {
                            className: "gs-utl-overflow-hidden",
                            items: "center",
                            gap: "s",
                            full: !0,
                            nowrap: !0,
                            children: [u.jsx(be, {icon: nz[l], size: Ee.s}), u.jsx(q, {
                                className: U(nt.txtEllips),
                                children: e
                            })]
                        }), u.jsx(q, {className: U("gs-utl-w-full", nt.txtEllips, nt.disabled), children: p(t)})]
                    }), c && u.jsx(q, {
                        children: u.jsx(be, {
                            size: Ee.sx,
                            icon: fe.arrowRight,
                            className: U(n && "gs-utl-rotate-180", "gs-utl-transition-transform gs-utl-duration-200")
                        })
                    })]
                })
            })
        }), sz = "gs-cmp-data-path-explorer", eE = xe(function ({additionalSources: t, onChange: n, path: r = ""}) {
            const {editor: o} = Ae(), i = y.useRef({}), [l, c] = y.useState(() => r.split(".")), [d, p] = y.useState([]),
                g = y.useMemo(() => ({...o ? S$(o) : {}, ...t}), [o, t]), m = (w, j) => {
                    let C = i.current;
                    for (let _ = 0; _ < j && _ < w.length; _++) {
                        const E = w[_];
                        if (C && typeof C == "object" && E in C) C = C[E]; else {
                            C = void 0;
                            break
                        }
                    }
                    return !C || typeof C != "object" ? [] : Object.entries(C).map(([_, E]) => {
                        const k = w.slice(0, j).concat(_), T = l[j] === _, O = () => {
                            const A = T ? k.slice(0, -1) : k;
                            n == null || n(A.join("."), {paths: A}), c(A)
                        };
                        return u.jsx(oz, {name: _, value: E, isActive: T, onClick: O}, _)
                    })
                };
            y.useEffect(() => {
                i.current = g;
                const w = [];
                for (let j = 0; j <= l.length; j++) {
                    const C = m(l, j);
                    C.length > 0 && w.push(C)
                }
                p(w)
            }, [g, l]);
            const v = U(sz, te.bg, te.br, ye.b, ye.rnd, nt.scrollX, "gs-utl-h-full"), b = U("gs-utl-min-w-[220px]", te.br),
                x = U("gs-utl-h-full gs-utl-max-h-[60vh]", nt.scrollY, et.xyS);
            return u.jsx(K, {
                className: v,
                full: !0,
                nowrap: !0,
                children: d.map((w, j) => u.jsx(q, {
                    className: U(b, j !== d.length - 1 && ye.br),
                    children: u.jsx(K, {col: !0, nowrap: !0, gap: "m", className: x, children: w})
                }, j))
            })
        }), iz = "gs-cmp-data-path-field", xu = xe(e => {
            const {
                    size: t = "m",
                    value: n = "",
                    label: r,
                    open: o,
                    defaultValue: i,
                    additionalSources: l,
                    readOnly: c,
                    disabled: d,
                    pickerInPopover: p,
                    onChange: g,
                    onPickerToggle: m
                } = e, {editor: v} = Ae(), b = Ke().tScoped("dataSources"), [x, w] = y.useState(!!o), [j, C] = y.useState(!1),
                _ = !!c || x || j, E = () => C(!j), k = B => {
                    const Q = B ?? !x;
                    w(Q), m == null || m(Q)
                }, T = () => k(!1), O = (...B) => {
                    g == null || g(...B)
                }, A = B => {
                    _ || g == null || g(B, {paths: B.split(".")})
                }, $ = j && v ? `"${v.DataSources.getValue(n, i)}"` : n, F = t === "m", N = F ? "lg" : t, z = F ? Ee.l : Ee.s,
                V = b(x ? "closePathExplorer" : "openPathExplorer"),
                X = {icon: x ? fe.close : fe.databaseOutline, size: Ee.l},
                Z = {icon: j ? fe.eyeOff : fe.eye, size: F ? Ee.m : z},
                R = u.jsx(Xt, {block: !0, variant: "pr", size: N, title: V, onClick: () => k(), icon: X});
            return u.jsxs(K, {
                className: iz,
                gap: t,
                col: !0,
                children: [u.jsxs(K, {
                    gap: t,
                    items: "end",
                    nowrap: !0,
                    children: [u.jsx(jt, {
                        readOnly: _,
                        label: r,
                        value: n ? $ : "",
                        size: t,
                        disabled: d,
                        onChange: A,
                        placeholder: b("selectVariablePath"),
                        className: U("gs-utl-flex-grow", te.txt, nt.txtEllips),
                        afterInput: !!n && u.jsx(Xt, {
                            block: !0,
                            variant: "out-clear",
                            size: "xs",
                            border: !1,
                            title: b("toggleResolvedPath"),
                            onClick: E,
                            className: nt.hover,
                            icon: Z
                        })
                    }), p ? u.jsx(Wo, {
                        placement: "bottom-end",
                        classNameBody: "gs-utl-w-[400px] gs-utl-h-[300px]",
                        title: !1,
                        padding: !1,
                        border: !1,
                        buttonAs: "span",
                        handler: R,
                        onClose: T,
                        overlay: !0,
                        children: u.jsx(eE, {path: n ?? "", onChange: O, additionalSources: l})
                    }) : R]
                }), !!x && !p && u.jsx(eE, {path: n ?? "", onChange: O, additionalSources: l})]
            })
        }), az = "gs-data-path-field", lz = xe(({className: e, value: t = "", onChange: n, ...r}) => u.jsx(_r, {
            className: U(az, e), ...r,
            children: u.jsx(xu, {onChange: o => n({value: o}), value: t})
        }));

    function tE(e) {
        const {collectionId: t, variableType: n, path: r = ""} = e;
        return t ? [t, n, r].filter(Boolean).join(".") : r
    }

    function vv(e, t) {
        const [n = "", r = "", ...o] = e.split(".");
        return n && t[n] ? {collectionId: n, variableType: r, path: o.join(".")} : {
            path: e,
            collectionId: void 0,
            variableType: void 0
        }
    }

    function yv(e) {
        var l;
        const [t, n] = y.useState(((l = e.getDataResolver) == null ? void 0 : l.call(e)) ?? {}), r = y.useRef(t),
            o = c => {
                const d = {...r.current, ...c};
                r.current = d, n(d)
            }, i = () => {
                e.setDataResolver(r.current)
            };
        return y.useEffect(() => {
            const c = "change:dataResolver", d = () => {
                const p = e.getDataResolver();
                n(p)
            };
            return e.on(c, d), () => {
                e.off(c, d)
            }
        }, [e]), {localData: t, updateLocalData: o, syncToComponent: i}
    }

    const cz = "gs-cmp-data-variable-picker", uz = xe(({component: e, onConfirm: t}) => {
        const {localData: n, updateLocalData: r, syncToComponent: o} = yv(e),
            i = Ke().tScoped("dataSources"), {path: l = "", defaultValue: c = ""} = n, d = e.collectionsStateMap,
            p = v => {
                r(vv(v, d))
            }, g = () => {
                o(), t == null || t({value: n})
            }, m = v => r({defaultValue: v});
        return u.jsxs(K, {
            className: cz,
            gap: "s",
            col: !0,
            nowrap: !0,
            children: [u.jsx(xu, {
                value: l,
                label: i("variablePath"),
                additionalSources: d,
                defaultValue: c,
                onChange: p
            }), u.jsx(jt, {label: i("defaultValue"), value: c, onChange: m}), u.jsx(K, {
                full: !0,
                justify: "end",
                className: et.y,
                children: u.jsx(at, {onClick: g, variant: "pr", size: "m", children: i("confirm")})
            })]
        })
    }), dz = "gs-data-variable-picker", fz = xe(function ({className: t, component: n, onConfirm: r, ...o}) {
        return u.jsx(_r, {className: U(dz, t), ...o, children: u.jsx(uz, {component: n, onConfirm: r})})
    });
    var kr = (e => (e.STRING = "string", e.NUMBER = "number", e.DATA_SOURCE = "dataSource", e))(kr || {}),
        Tr = (e => (e.equals = "equals", e.isTruthy = "isTruthy", e.isFalsy = "isFalsy", e.isDefined = "isDefined", e.isNull = "isNull", e.isUndefined = "isUndefined", e.isArray = "isArray", e.isObject = "isObject", e.isString = "isString", e.isNumber = "isNumber", e.isBoolean = "isBoolean", e.isDefaultValue = "isDefaultValue", e))(Tr || {}),
        bv = (e => (e.greaterThan = ">", e.lessThan = "<", e.greaterThanOrEqual = ">=", e.lessThanOrEqual = "<=", e.equals = "=", e.notEquals = "!=", e))(bv || {}),
        xv = (e => (e.contains = "contains", e.startsWith = "startsWith", e.endsWith = "endsWith", e.equalsIgnoreCase = "equalsIgnoreCase", e.trimEquals = "trimEquals", e))(xv || {});
    const pz = [...Object.values(xv), ...Object.values(bv), ...Object.values(Tr)],
        wv = {string: Object.values(xv), number: Object.values(bv), dataSource: pz}, gz = y.memo(function (t) {
            const {additionalSources: n, side: r, type: o, value: i, onChange: l} = t;
            switch (o) {
                case kr.DATA_SOURCE:
                    return u.jsx(xu, {
                        size: "s",
                        pickerInPopover: !0,
                        value: tE(i),
                        onChange: c => l(r, c, o),
                        additionalSources: n
                    });
                case kr.NUMBER:
                    return u.jsx(tt, {size: "s", value: i, onChange: c => l(r, c, o)});
                default:
                    return u.jsx(jt, {size: "s", value: i, onChange: c => l(r, c, o)})
            }
        }), hz = "gs-cmp-statement-side", nE = y.memo(function ({
                                                                    side: t,
                                                                    type: n,
                                                                    value: r,
                                                                    label: o,
                                                                    onChange: i,
                                                                    onTypeChange: l,
                                                                    additionalSources: c,
                                                                    typeOptions: d
                                                                }) {
            return u.jsxs(K, {
                className: U(hz, "gs-utl-flex-grow"),
                col: !0,
                children: [u.jsx(Ur, {size: "s", children: o}), u.jsxs(K, {
                    items: "center",
                    gap: "xs",
                    children: [u.jsx(q, {
                        children: u.jsx(Ze, {
                            size: "s",
                            value: n,
                            options: d,
                            onChange: p => l(t, p)
                        })
                    }), u.jsx(q, {
                        grow: !0,
                        children: u.jsx(gz, {additionalSources: c, side: t, type: n, value: r, onChange: i})
                    })]
                })]
            })
        }),
        up = e => typeof e == "object" && (e == null ? void 0 : e.type) === "data-variable" ? kr.DATA_SOURCE : typeof e == "string" ? kr.STRING : typeof e == "number" ? kr.NUMBER : kr.STRING,
        mz = (e, t, n) => {
            switch (t) {
                case kr.STRING:
                    return e || "";
                case kr.NUMBER:
                    return e ? Number(e) : 0;
                case kr.DATA_SOURCE: {
                    const r = n || {};
                    return {type: "data-variable", ...(zt(e) ? vv(e, r) : e) ?? {path: "", defaultValue: ""}}
                }
                default:
                    return e
            }
        }, vz = e => wv[e][0],
        yz = e => ![Tr.isTruthy, Tr.isFalsy, Tr.isDefined, Tr.isNull, Tr.isUndefined, Tr.isArray, Tr.isObject, Tr.isString, Tr.isNumber, Tr.isBoolean, Tr.isDefaultValue].includes(e),
        bz = "gs-cmp-statement", xz = xe(e => {
            const {statement: t, onChange: n, className: r, additionalSources: o} = e,
                i = Ke().tScoped("dataSources"), [l, c] = y.useState(() => up(t.left)), [d, p] = y.useState(() => up(t.right)),
                g = wv[l] || wv[kr.STRING], m = y.useMemo(() => Object.values(kr).map(k => ({id: k, label: Vo(k)})), []),
                v = y.useMemo(() => g.map(k => ({id: k, label: i(`operators.${k}`)})), [g, i]);
            y.useEffect(() => {
                c(up(t.left)), p(up(t.right))
            }, [t.left, t.right]);
            const b = k => {
                    n({...t, ...k})
                }, x = (k, T, O) => {
                    const A = mz(T, O, o), $ = k === "left", F = $ && O !== kr.DATA_SOURCE;
                    $ ? c(O) : p(O), b({[k]: A, ...F && {operator: vz(O)}})
                }, w = (k, T) => x(k, null, T), j = k => b({operator: k}), C = U(bz, r, te.br, ye.b, ye.rnd, et.xy),
                _ = yz(t.operator), E = {additionalSources: o, onChange: x, onTypeChange: w, typeOptions: m};
            return u.jsx(K, {
                className: U(C, "gs-utl-w-full"),
                items: "stretch",
                gap: "m",
                col: !0,
                full: !0,
                nowrap: !0,
                children: u.jsxs(K, {
                    gap: "m",
                    items: "center",
                    full: !0,
                    nowrap: !0,
                    children: [u.jsx(nE, {
                        side: "left",
                        type: l,
                        value: t.left,
                        label: i("leftValue"), ...E
                    }), u.jsx(q, {
                        children: u.jsx(Ze, {
                            size: "s",
                            label: i("operator"),
                            value: t.operator,
                            options: v,
                            onChange: j
                        })
                    }), _ && u.jsx(nE, {side: "right", type: d, value: t.right, label: i("rightValue"), ...E})]
                })
            })
        }), Sv = "gs-cmp-statements-group", wz = e => e === "and" || e === "or",
        dp = e => ({...e, statements: [...e.statements ?? [], {left: "", operator: "equals", right: ""}]}),
        rE = xe(e => {
            const {className: t, condition: n, onUpdate: r, additionalSources: o, skipAddCondition: i} = e,
                l = Ke().tScoped("dataSources"), c = n.statements ?? [], d = n.logicalOperator || "and", p = x => {
                    wz(x) && r({...n, logicalOperator: x})
                }, g = () => {
                    dp(n), r(dp(n))
                }, m = x => {
                    const w = c.filter((j, C) => C !== x);
                    r({...n, statements: w})
                }, v = (x, w) => {
                    if (x >= 0 && x < c.length) {
                        const j = [...c];
                        j[x] = w, r({...n, statements: j})
                    }
                }, b = [{id: "and", label: l("conditionAnd")}, {id: "or", label: l("conditionOr")}];
            return u.jsxs(K, {
                className: U(Sv, t, "gs-utl-w-full"),
                full: !0,
                gap: "m",
                col: !0,
                nowrap: !0,
                children: [c.length > 1 && u.jsx(_s, {
                    value: d,
                    onChange: p,
                    tabs: b
                }), u.jsx(K, {
                    className: `${Sv}__items`,
                    gap: "s",
                    col: !0,
                    full: !0,
                    nowrap: !0,
                    children: c.map((x, w) => u.jsxs(K, {
                        className: U(`${Sv}__item`),
                        gap: "s",
                        col: !0,
                        children: [u.jsx(xz, {
                            additionalSources: o,
                            statement: x,
                            onChange: j => v(w, j)
                        }), w < c.length - 1 && u.jsxs(K, {
                            justify: "center",
                            items: "center",
                            gap: "m",
                            children: [u.jsx("span", {
                                className: U(te.txtHighEmphasis, "gs-utl-text-sm gs-utl-font-bold"),
                                children: d.toUpperCase()
                            }), u.jsx(Xt, {
                                block: !0,
                                variant: "out-clear",
                                title: l("deleteCondition"),
                                onClick: () => m(w + 1),
                                icon: {icon: fe.delete, size: Ee.s}
                            })]
                        })]
                    }, `stmt-${w}`))
                }), !i && u.jsx(K, {
                    justify: "end",
                    children: u.jsx(at, {
                        variant: "pr",
                        onClick: g,
                        icon: {icon: fe.plus, size: Ee.s},
                        children: l("addCondition")
                    })
                })]
            })
        }), Sz = "gs-cmp-data-condition-picker", jz = xe(({component: e, onConfirm: t}) => {
            const {localData: n, updateLocalData: r, syncToComponent: o} = yv(e), i = Ke().tScoped("dataSources"),
                l = n.condition, c = g => r({condition: g}), d = () => {
                    o(), t == null || t({value: n})
                }, p = () => {
                    r({condition: dp(l)})
                };
            return u.jsxs(K, {
                className: Sz,
                items: "stretch",
                gap: "m",
                full: !0,
                col: !0,
                children: [u.jsx(rE, {
                    additionalSources: e.collectionsStateMap ?? {},
                    condition: l,
                    onUpdate: c,
                    skipAddCondition: !0
                }), u.jsxs(K, {
                    gap: "m",
                    justify: "end",
                    full: !0,
                    children: [u.jsx(at, {
                        variant: "out",
                        onClick: p,
                        icon: {icon: fe.plus, size: Ee.s},
                        children: i("addCondition")
                    }), u.jsx(at, {onClick: d, variant: "pr", size: "m", children: i("confirm")})]
                })]
            })
        }), Cz = "gs-data-condition-picker", Ez = xe(function ({className: t, component: n, onConfirm: r, ...o}) {
            return u.jsx(_r, {className: U(Cz, t), ...o, children: u.jsx(jz, {component: n, onConfirm: r})})
        }), Pz = "gs-cmp-data-collection-picker", _z = xe(({component: e, onConfirm: t}) => {
            const {localData: n, updateLocalData: r, syncToComponent: o} = yv(e), {
                    collectionId: i = "",
                    dataSource: l = {},
                    startIndex: c = 0,
                    endIndex: d = 10
                } = n, p = tE(l), g = d === Number.MAX_VALUE, m = Ke().tScoped("dataSources"), v = g ? "" : d, b = () => {
                    o(), t == null || t({value: n})
                }, x = _ => r({dataSource: {...l, path: _}}), w = _ => r({startIndex: _}), j = _ => r({endIndex: _}),
                C = _ => r({endIndex: _ ? Number.MAX_VALUE : 4});
            return u.jsxs(K, {
                className: Pz,
                gap: "s",
                col: !0,
                nowrap: !0,
                children: [u.jsxs(K, {
                    items: "end",
                    gap: "s",
                    nowrap: !0,
                    children: [u.jsx(jt, {
                        className: "gs-utl-flex-grow",
                        size: "s",
                        label: m("collectionId"),
                        value: i,
                        readOnly: !0,
                        disabled: !0
                    }), u.jsx(wj, {size: "s", value: i, block: !0})]
                }), u.jsx(xu, {label: m("variablePath"), value: p, onChange: x}), u.jsxs(K, {
                    items: "end",
                    gap: "s",
                    nowrap: !0,
                    children: [u.jsx(tt, {
                        size: "s",
                        className: "gs-utl-flex-grow",
                        label: m("collectionStartIndex"),
                        value: c == null ? void 0 : c.toString(),
                        onChange: w
                    }), u.jsx(tt, {
                        size: "s",
                        label: m("collectionEndIndex"),
                        placeholder: g ? "-" : "",
                        value: v == null ? void 0 : v.toString(),
                        onChange: j,
                        className: U("gs-utl-flex-grow", g && "gs-utl-opacity-50 gs-utl-pointer-events-none")
                    }), u.jsx(q, {children: u.jsx(Gc, {label: m("collectionUpToEndIndex"), value: g, onChange: C})})]
                }), u.jsx(K, {
                    full: !0,
                    justify: "end",
                    children: u.jsx(at, {onClick: b, variant: "pr", size: "m", children: m("confirm")})
                })]
            })
        }), kz = "gs-data-collection-picker", Tz = xe(function ({className: t, component: n, onConfirm: r, ...o}) {
            return u.jsx(_r, {className: U(kz, t), ...o, children: u.jsx(_z, {component: n, onConfirm: r})})
        }), Oz = "gs-code-field", Lz = xe(function (e) {
            const {editor: t} = Ae(), {isDarkTheme: n} = sr(), {
                    editorEvents: r,
                    onChange: o
                } = e, [i, l] = y.useState(() => e),
                c = p => ({value: p, editor: t, state: i, setState: g => l(m => ({...m, ...g}))}),
                d = p => o == null ? void 0 : o(c(p || ""));
            return ml({
                editor: t,
                editorEvents: r,
                localState: i,
                setLocalState: l
            }), u.jsx(Ss, {
                className: U(Oz, i.className),
                language: i.language,
                style: i.style,
                label: i.label,
                name: i.name,
                value: i.value,
                size: i.size,
                required: i.required,
                disabled: i.disabled,
                readOnly: i.readOnly,
                minHeight: i.minHeight,
                row: i.row,
                isDarkTheme: n,
                monacoOptions: e.monacoOptions,
                onChange: d
            })
        }), Mz = "gs-menu-list", Az = xe(function ({className: e, items: t, onItemClick: n, ...r}) {
            const {editor: o} = Ae(), [i, l] = y.useState(), c = d => {
                const {onClick: p} = d;
                if (p && o) return g => {
                    const m = {item: d, editor: o, ...g};
                    p(m), n == null || n(m)
                }
            };
            return u.jsx(_r, {
                className: U(Mz, te.bg, "gs-utl-flex gs-utl-flex-col", e), ...r,
                children: (t || []).map((d, p) => y.createElement(Tc, {
                    ...d,
                    label: d.layout ? Gn(d.layout) : d.label,
                    key: d.id ?? p,
                    className: d.className,
                    action: c(d),
                    onActive: () => l(d),
                    active: i === d,
                    items: d.items
                }))
            })
        }), fp = {type: "data-variable", path: "", defaultValue: ""}, oE = {
            type: "data-condition",
            condition: {logicalOperator: "and", statements: [{left: "", operator: "", right: ""}]},
            ifTrue: "",
            ifFalse: ""
        }, sE = "gs-cmp-dynamic-value-picker", Rz = xe(({value: e, onChange: t, onConfirm: n, additionalSources: r}) => {
            const [o, i] = y.useState(() => pf(e) ? e : fp), [l, c] = y.useState(o.type), d = Ke().tScoped("dataSources");
            y.useEffect(() => {
                const E = pf(e) ? e : fp;
                (E.type !== o.type || JSON.stringify(E) !== JSON.stringify(o)) && (i(E), c(E.type))
            }, [e]);
            const p = E => {
                    i(E), t == null || t({value: E})
                }, g = E => {
                    const k = E;
                    c(k);
                    const T = o.type === k ? o : k === "data-variable" ? fp : oE;
                    p(T)
                }, m = E => {
                    p({type: "data-variable", defaultValue: o.defaultValue, ...vv(E, r)})
                }, v = E => {
                    i(k => {
                        const T = {...k, defaultValue: E};
                        return t == null || t({value: T}), T
                    })
                }, b = E => {
                    p({...o, condition: E})
                }, x = (E, k) => {
                    p({...o, [E]: k})
                }, w = () => {
                    const E = o.condition;
                    b(dp(E))
                }, j = [{id: "data-variable", label: d("variable")}, {id: "data-condition", label: d("condition")}],
                C = (o == null ? void 0 : o.type) === "data-variable" ? o : fp,
                _ = (o == null ? void 0 : o.type) === "data-condition" ? o : oE;
            return u.jsxs(K, {
                className: sE,
                gap: "s",
                col: !0,
                nowrap: !0,
                children: [u.jsxs(K, {
                    className: sE,
                    gap: "m",
                    col: !0,
                    nowrap: !0,
                    full: !0,
                    children: [u.jsx(_s, {value: l, onChange: g, tabs: j}), u.jsx(q, {
                        grow: !0,
                        className: et.y,
                        style: {overflowY: "auto", overflowX: "hidden"},
                        children: l === "data-variable" ? u.jsxs(K, {
                            gap: "s",
                            col: !0,
                            nowrap: !0,
                            children: [u.jsx(xu, {
                                value: C.path,
                                label: d("variablePath"),
                                additionalSources: r,
                                defaultValue: C.defaultValue,
                                onChange: m
                            }), u.jsx(jt, {label: d("defaultValue"), value: C.defaultValue || "", onChange: v})]
                        }) : u.jsxs(K, {
                            gap: "m",
                            col: !0,
                            children: [u.jsx(rE, {
                                additionalSources: r,
                                condition: _.condition,
                                onUpdate: b,
                                skipAddCondition: !0
                            }), u.jsxs(K, {
                                gap: "s",
                                col: !0,
                                nowrap: !0,
                                children: [u.jsx(jt, {
                                    label: d("ifTrue"),
                                    value: _.ifTrue,
                                    onChange: E => x("ifTrue", E)
                                }), u.jsx(jt, {label: d("ifFalse"), value: _.ifFalse, onChange: E => x("ifFalse", E)})]
                            })]
                        })
                    }), l === "data-condition" && u.jsx(K, {
                        full: !0,
                        justify: "end",
                        className: et.x,
                        children: u.jsx(at, {
                            variant: "out",
                            onClick: w,
                            icon: {icon: fe.plus, size: Ee.s},
                            children: d("addCondition")
                        })
                    })]
                }), u.jsx(K, {
                    full: !0, justify: "end", className: et.y, children: u.jsx(at, {
                        onClick: () => {
                            n == null || n({value: o})
                        }, variant: "pr", size: "m", children: d("confirm")
                    })
                })]
            })
        }), Nz = "gs-data-value-picker", $z = xe(({
                                                      className: e,
                                                      value: t = {},
                                                      onChange: n,
                                                      onConfirm: r,
                                                      additionalSources: o = {},
                                                      ...i
                                                  }) => u.jsx(_r, {
            className: U(Nz, e), ...i,
            children: u.jsx(Rz, {
                value: t,
                onConfirm: l => r == null ? void 0 : r(l),
                onChange: l => n == null ? void 0 : n(l),
                additionalSources: o
            })
        })), Dz = {
            row: IF,
            column: rH,
            text: QF,
            tabs: ZF,
            button: Gd,
            buttonGroupField: hI,
            menuList: Az,
            inputField: sH,
            codeField: Lz,
            selectField: HF,
            selectFontField: zF,
            devices: oC,
            panelPages: DC,
            panelPageSettings: XH,
            panelLayers: _C,
            panelPagesLayers: rF,
            panelBlocks: _H,
            panelGlobalStyles: DH,
            panelSelectors: kF,
            panelStyles: RF,
            panelProperties: wF,
            panelSidebarTabs: MF,
            panelAssets: EH,
            panelTemplates: $F,
            sidebarRight: XF,
            sidebarLeft: KF,
            sidebarTop: sC,
            sidebarBottom: UF,
            canvas: bj,
            canvasSidebarTop: tH,
            virtualList: tz,
            dataPathField: lz,
            panelDataVariablePicker: fz,
            panelDataConditionPicker: Ez,
            panelDataCollectionPicker: Tz,
            panelDataValuePicker: $z
        }, Gn = e => {
            const t = Array.isArray(e) ? e : e ? [e] : [], n = g6();
            return t.filter(Boolean).map((r, o) => {
                const {id: i = "", type: l, ...c} = zt(r) ? {type: mv.text, content: r} : r || {}, d = Dz[l],
                    p = n.layoutChildren.get(i), g = i || o;
                return p ? u.jsx(Om, {id: i, ...p}, g) : l === mv.custom ? u.jsx(Om, {id: i, ...c}, g) : d ? u.jsx(d, {id: i, ...c}, g) : null
            })
        }, ml = e => {
            const {editorEvents: t, editor: n, localState: r, setLocalState: o} = e;
            y.useEffect(() => {
                if (!t || !n) return;
                const i = Object.keys(t).reduce((c, d) => (c[d] = (p = {}) => {
                    const g = t[d];
                    g({fromEvent: p, editor: n, state: r, setState: m => o(v => ({...v, ...m}))})
                }, c), {}), l = Object.keys(i);
                return l.forEach(c => n.on(c, i[c])), () => {
                    l.forEach(c => n.off(c, i[c]))
                }
            }, [n, r])
        }, iE = "gs-block-item", Iz = U("gs-utl-text-center gs-utl-w-full", nt.txtEllips),
        aE = xe(({block: e, className: t, itemLayout: n}) => {
            const {editor: r} = Ae(), o = Ke(), [, i] = y.useState(0), l = o.tScoped("blockManager.labels"),
                c = e.getId(), d = !!e.get("full"), p = e.get("onClick"), g = e.get("disable"), m = e.get("mediaReact"),
                v = e.getMedia(), b = e.get("attributes") || {}, x = l(c) || e.getLabel(),
                w = U(iE, `${iE}--${c}`, t, "gs-utl-py-2 gs-utl-px-2 gs-utl-transition-colors", ye.b, ye.rnd, te.br, d && "gs-utl-col-span-full", g ? nt.disabledM : U("gs-utl-cursor-pointer", te.hTAo, te.hBgH)),
                j = kn(b.class) ? b.class : U("gs-utl-block-media gs-utl-max-h-10 gs-utl-max-w-10 gs-utl-w-full");
            if (y.useEffect(() => {
                if (!r) return;
                const {Blocks: O} = r, A = O.events.update, $ = F => F === e && i(N => ++N);
                return r.on(A, $), () => {
                    r.off(A, $)
                }
            }, [e, r]), !r) return null;
            const {Blocks: C} = r, k = {
                className: w, ...!g && {
                    onDragStart: () => C.startDrag(e),
                    onDragEnd: () => C.endDrag(!1),
                    draggable: !0
                }, ...!!p && {onClick: () => p(e, r)}
            }, T = n == null ? void 0 : n({editor: r, block: e, attributes: k});
            return T && Gn(T) || u.jsxs(K, {
                items: "center",
                col: !0, ...k,
                children: [m || u.jsx("div", {
                    className: j,
                    dangerouslySetInnerHTML: {__html: v}
                }), u.jsx("div", {className: Iz, title: x, children: x})]
            })
        }), lE = pe("text-sm w-full", nt.txtEllips), Vz = xe(({symbol: e, className: t}) => {
            const n = Pr(), {Components: r} = n, o = Ke(), i = go(), l = o.tScoped("blockManager.symbols"), c = () => {
                    const {draggable: C, droppable: _, attributes: E, type: k, tagName: T} = e.attributes;
                    n.Canvas.startDrag({
                        content: () => r.addSymbol(e),
                        model: e,
                        dragDef: {type: k, tagName: T, draggable: C, droppable: _, attributes: E}
                    })
                }, d = () => {
                    n.Canvas.endDrag()
                }, p = e.getIcon(), g = e.getName(), m = r.getSymbolInfo(e).instances.length,
                v = pe("h-10 w-10 block-media", te.grouphTAo), b = pe("gjs-pt-1 gjs-mt-2", ye.bt, te.br),
                x = pe("cursor-pointer gjs-p-2 transition-colors group", ye.b, ye.rnd, te.br, te.hBgH, t), w = () => {
                    i.confirm({title: l("delete"), content: l("deleteConfirm"), onConfirm: () => e.remove()})
                }, j = C => {
                    e.set("custom-name", C)
                };
            return u.jsxs(K, {
                className: x,
                onDragStart: c,
                onDragEnd: d,
                items: "center",
                draggable: !0,
                col: !0,
                children: [u.jsx("div", {className: v, dangerouslySetInnerHTML: {__html: p}}), u.jsxs(K, {
                    items: "center",
                    justify: "between",
                    className: b,
                    space: "m",
                    full: !0,
                    children: [u.jsx(q, {
                        children: u.jsx(K, {
                            className: pe(lE, "gjs-mr-auto"),
                            children: u.jsx(mn, {
                                title: `${m} ${l("instancesProject")}`,
                                children: u.jsx(dn, {label: `${m}`, className: pe(te.bgH75)})
                            })
                        })
                    }), u.jsx(q, {
                        className: pe("truncate"),
                        grow: !0,
                        title: g,
                        children: u.jsx(YC, {activable: !0, value: g, className: lE, onChange: j})
                    }), u.jsx(q, {
                        className: pe(nt.hoverGroup),
                        children: u.jsx(K, {
                            justify: "end",
                            full: !0,
                            children: u.jsx(Xt, {
                                onClick: w,
                                title: l("delete"),
                                border: !1,
                                size: "",
                                block: !0,
                                children: u.jsx(be, {icon: fe.delete, size: Ee.s})
                            })
                        })
                    })]
                })]
            })
        }), ui = "gs-block-manager", cE = (e, t) => {
            const n = t == null ? void 0 : t.getId();
            return n && e.I18n.t(`blockManager.categories.${n}`) || (t == null ? void 0 : t.getLabel()) || ""
        }, uE = xe(function ({isOpen: t, className: n, hideCategories: r, itemLayout: o, ...i}) {
            var ue, me;
            const {editor: l} = Ae(),
                c = Ke(), [d, p] = y.useState(0), [g, m] = y.useState(au.REGULAR), [v, b] = y.useState(""), [x, w] = y.useState(() => (l == null ? void 0 : l.Components.getSymbols()) || []),
                j = g === au.SYMBOLS, C = y.useRef(null), _ = c.tScoped("blockManager");
            if (y.useEffect(() => {
                if (!l) return;
                const {Blocks: ae, Components: ie} = l, de = ae.events.custom, je = ie.events.symbol, he = () => {
                    w(ie.getSymbols()), p(Ie => ++Ie)
                };
                return l.on(je, he), l.on(de, he), () => {
                    l.off(je, he), l.off(de, he)
                }
            }, [l]), y.useEffect(() => {
                if (C.current && t) {
                    const ae = C.current.querySelector("input");
                    setTimeout(() => ae == null ? void 0 : ae.focus(), Zb)
                }
            }, [C.current, t]), !l) return null;
            const {Blocks: E} = l, k = ae => _(`labels.${ae.getId()}`) || ae.getLabel(),
                T = x.filter(ae => Ma(ae.getName(), v)), O = E.getAll().map(ae => ae),
                $ = (((ue = i.blocks) == null ? void 0 : ue.call(i, {blocks: O})) || O).filter(ae => {
                    const ie = cE(l, ae.category);
                    return !(v && !Ma(ie, v) && !Ma(k(ae), v))
                }), F = E.getBlocksByCategory($), N = r ? $ : (me = F.find(ae => !ae.category)) == null ? void 0 : me.items,
                z = r ? [] : F.filter(ae => ae.category), V = i.symbols !== !1, X = i.search !== !1, Z = !V && !X,
                R = _("search") || c.t("search"), B = U(ui, n, "gap-2"),
                Q = U(`${ui}__header`, "gs-utl-pt-2", et.xS, Z && "gs-utl-hidden"),
                H = U(`${ui}__content`, nt.scrollY, te.br, ye.bt),
                I = U(`${ui}__symbols`, "gs-utl-grid gs-utl-grid-cols-1 gs-utl-gap-2 gs-utl-p-2"),
                D = U(`${ui}__not-found`, "gs-utl-text-center gs-utl-p-4"),
                M = U(`${ui}__blocks`, "gs-utl-grid gs-utl-grid-cols-2 gs-utl-gap-2 gs-utl-p-2 gs-utl-text-sm"),
                W = U(`${ui}__no-category`, M, te.br, z.length && ye.bb), ce = `${ui}__category`,
                ne = [{id: au.REGULAR, label: _("types.regular")}, {id: au.SYMBOLS, label: _("types.symbols")}];
            return u.jsxs(K, {
                className: B,
                col: !0,
                full: !0,
                children: [u.jsxs(K, {
                    className: Q,
                    space: "s",
                    col: !0,
                    children: [V && u.jsx(_s, {tabs: ne, onChange: m, value: g, variant: "pills"}), X && u.jsx(jt, {
                        ref: C,
                        size: "s",
                        value: v,
                        onInput: b,
                        placeholder: R,
                        type: "search"
                    })]
                }), u.jsxs(q, {
                    className: H,
                    grow: !0,
                    children: [j && (T.length ? u.jsx(K, {
                        className: I,
                        children: T.map(ae => u.jsx(Vz, {symbol: ae}, `${d}_${ae.getId()}`))
                    }) : u.jsx(K, {
                        className: D,
                        justify: "center",
                        children: _("symbols.notFound")
                    })), !j && ($.length ? u.jsxs(u.Fragment, {
                        children: [!!(N != null && N.length) && u.jsx(K, {
                            className: W,
                            children: N == null ? void 0 : N.map(ae => u.jsx(aE, {block: ae, itemLayout: o}, ae.id))
                        }), z.map(({category: ae, items: ie}, de) => u.jsx(ta, {
                            sticky: !0,
                            className: je => mh.itemList({index: de, open: je, length: z.length}),
                            open: !!(ae != null && ae.get("open")),
                            onChange: ({open: je}) => ae == null ? void 0 : ae.set({open: je}),
                            handler: cE(l, ae),
                            handlerIcon: ae == null ? void 0 : ae.get("icon"),
                            classNameWrap: U(ce, `${ce}--${ae == null ? void 0 : ae.id}`),
                            children: u.jsx(K, {
                                className: M,
                                children: ie.map(je => u.jsx(aE, {block: je, itemLayout: o}, je.id))
                            })
                        }, ae == null ? void 0 : ae.id))]
                    }) : u.jsx(K, {className: D, justify: "center", children: _("notFound")}))]
                })]
            })
        }), Hz = {add: fe.plus}, dE = (e, t) => t || Hz[e];

    function jv({className: e, icon: t, title: n, onClose: r, actions: o = [], children: i}) {
        const {t: l} = Ke();
        return u.jsxs(K, {
            className: se("gjs-card-title", e),
            items: "center",
            children: [u.jsx(q, {className: se("truncate"), grow: !0, children: n}), i, u.jsxs(K, {
                space: "s",
                children: [!!o.length && u.jsx(K, {
                    space: "xs",
                    className: se("gjs-px-1"),
                    children: o.map(({id: c, icon: d, className: p, ...g}) => u.jsx(q, {
                        children: u.jsx(Xt, {
                            block: !0,
                            border: !1,
                            size: "xs",
                            icon: dE(c, d) ? {icon: dE(c, d), size: Ee.s} : void 0,
                            className: se(nt.click, p), ...g
                        })
                    }, c))
                }), (r || t) && u.jsx(Xt, {
                    title: l("close"),
                    onClick: r,
                    border: !1,
                    className: se(nt.click),
                    icon: {icon: fe.close, size: Ee.s},
                    size: "xs",
                    block: !0
                })]
            })]
        })
    }

    const fE = "0.22.10", Fz = "1.0.27", di = "https://cdn.jsdelivr.net/npm/",
        zz = `js/build/grapes.min.js`, Bz = `css/grapes.css`, Uz = !1,
        Ts = Fz, fi = `${di}@grapesjs/studio-sdk-plugins@${Ts}`, Jr = {category: "Extra", select: !0}, pE = [{
            id: "grapesjs-component-countdown",
            name: "Countdown",
            description: "Live countdown timer to highlight upcoming events, launches, or deadlines.",
            category: nr.components,
            src: `${di}grapesjs-component-countdown@1.0.1/dist/index.js`,
            image: "https://cdn.grapesjs.com/workspaces/clywyth4s0001a5x8dfysepz7/assets/b2b347be-144d-4860-8f1a-2d8678ab07c7__plugin-counter.png",
            version: "1.0.1",
            projectType: [Xe.web],
            options: {props: {emptyState: !0}}
        }, {
            id: "grapesjs-tabs",
            name: "Tabs",
            description: "Organize content into easy-to-navigate sections using tabs.",
            category: nr.components,
            src: `${di}grapesjs-tabs@1.0.18/dist/index.js`,
            image: "https://cdn.grapesjs.com/workspaces/clywyth4s0001a5x8dfysepz7/assets/e322063c-a8b4-46d4-a21e-20f885ab53df__plugin-tabs.png",
            version: "1.0.18",
            projectType: [Xe.web],
            options: {tabsBlock: Jr}
        }, {
            id: "grapesjs-custom-code",
            name: "Custom code",
            description: "Insert your own custom code directly into the page. Perfect for adding third-party widgets, advanced styling, or custom functionality.",
            category: nr.components,
            src: `${di}grapesjs-custom-code@1.0.2/dist/index.js`,
            image: "https://user-images.githubusercontent.com/11614725/43289377-15322c5e-912b-11e8-9a29-cc2dc45af48a.gif",
            version: "1.0.2",
            projectType: [Xe.web]
        }, {
            id: "grapesjs-tooltip",
            name: "Tooltip",
            description: "A simple, CSS-only, tooltip component. Great for adding helpful hints or extra info on hover.",
            src: `${di}grapesjs-tooltip@0.1.8/dist/index.js`,
            category: nr.components,
            image: "https://cdn.grapesjs.com/workspaces/clywyth4s0001a5x8dfysepz7/assets/53239882-2c3f-4480-84cb-16fb9dd3d713__plugin-tooltip.webp",
            version: "0.1.8",
            projectType: [Xe.web],
            options: {propsTooltip: {emptyState: {styleOut: "width: 80px;"}}}
        }, {
            id: "grapesjs-typed",
            name: "Typed",
            description: "A typewriter-style animation component powered by Typed.js. Ideal for dynamic hero headings and attention-grabbing text effects.",
            category: nr.components,
            src: `${di}grapesjs-typed@2.0.1/dist/index.js`,
            image: "https://user-images.githubusercontent.com/11614725/67621063-3f31c380-f80d-11e9-8d62-7f1da9f27111.png",
            version: "2.0.1",
            projectType: [Xe.web],
            options: {block: Jr}
        }, {
            id: "GrapesJsPlugins_tableComponent",
            name: "Table",
            description: "Add table component with additional functionalities.",
            category: nr.components,
            src: `${fi}/dist/tableComponent/index.umd.js`,
            image: "https://app.grapesjs.com/docs-sdk/assets/images/table-plugin-f8c7596df01f9e12fb5d94a9de4ee502.png",
            version: Ts,
            projectType: [Xe.web],
            options: {block: Jr}
        }, {
            id: "GrapesJsPlugins_listPagesComponent",
            name: "List Pages",
            description: "Add a list component that dynamically generates navigation links based on the pages in your project.",
            category: nr.components,
            src: `${fi}/dist/listPagesComponent/index.umd.js`,
            image: "https://app.grapesjs.com/docs-sdk/assets/images/list-pages-plugin-a315be106d0897f4167a6c93c71e7878.png",
            version: Ts,
            projectType: [Xe.web],
            options: {block: Jr}
        }, {
            id: "GrapesJsPlugins_fsLightboxComponent",
            name: "FsLightbox",
            description: "Image viewer plugin based on FsLightbox.",
            category: nr.components,
            src: `${fi}/dist/fsLightboxComponent/index.umd.js`,
            image: "https://app.grapesjs.com/docs-sdk/assets/images/fslightbox-plugin-5d9d81980202b475e60ccaa248036915.png",
            version: Ts,
            projectType: [Xe.web],
            options: {block: Jr}
        }, {
            id: "GrapesJsPlugins_lightGalleryComponent",
            name: "LightGallery",
            description: "Gallery component based on lightGallery.",
            category: nr.components,
            src: `${fi}/dist/lightGalleryComponent/index.umd.js`,
            image: "https://app.grapesjs.com/docs-sdk/assets/images/lightgallery-plugin-0ef8d47f0aaa2bbdd0c83cffb9087fa4.png",
            version: Ts,
            projectType: [Xe.web],
            options: {block: Jr}
        }, {
            id: "GrapesJsPlugins_swiperComponent",
            name: "Swiper (Slider)",
            description: "Slider component plugin based on Swiper.",
            category: nr.components,
            src: `${fi}/dist/swiperComponent/index.umd.js`,
            image: "https://app.grapesjs.com/docs-sdk/assets/images/swiper-plugin-ded7740b473376f249829eced9003fee.png",
            version: Ts,
            projectType: [Xe.web],
            options: {block: Jr}
        }, {
            id: "GrapesJsPlugins_iconifyComponent",
            name: "Iconify",
            description: "Add an icon component with the icon picker by levering the Iconify collections.",
            category: nr.components,
            src: `${fi}/dist/iconifyComponent/index.umd.js`,
            image: "https://app.grapesjs.com/docs-sdk/assets/images/iconify-plugin-265b0e0e9218b0d33744366e5a069bef.png",
            version: Ts,
            projectType: [Xe.web],
            options: {block: Jr}
        }, {
            id: "GrapesJsPlugins_accordionComponent",
            name: "Accordion",
            description: "Accordion component, allowing users to create collapsible content sections with smooth animations and keyboard navigation support.",
            category: nr.components,
            src: `${fi}/dist/accordionComponent/index.umd.js`,
            image: "https://app.grapesjs.com/docs-sdk/assets/images/accordion-plugin-09ee15747de2cbc119e7e9ca654abec6.webp",
            version: Ts,
            projectType: [Xe.web],
            options: {block: Jr, blockGroup: Jr}
        }, {
            id: "GrapesJsPlugins_animationComponent",
            name: "Animations",
            description: "Add scroll-triggered animation components with support for staggered grouping effects.",
            category: nr.components,
            src: `${fi}/dist/animationComponent/index.umd.js`,
            image: "https://app.grapesjs.com/docs-sdk/assets/images/animation-plugin-f099c7cb5c88ffd5ca7794cbfcd0d7af.webp",
            version: Ts,
            projectType: [Xe.web],
            options: {block: Jr, blockGroup: Jr}
        }], Wz = pE.reduce((e, t) => (e[t.id] = t, e), {}), Gz = () => new Promise(e => {
            setTimeout(() => e(pE), 100)
        }), gE = xe(function ({plugin: t, className: n, installed: r, onInstall: o, onSelect: i}) {
            const l = Ke(), c = x => l.t(`pluginManager.${x}`), d = r[t.id], p = () => i == null ? void 0 : i(t),
                g = () => o(t),
                m = U("gs-cmp-plugin-item gs-utl-overflow-hidden gs-utl-max-w-full gs-utl-group gs-utl-px-4 gs-utl-py-3", n),
                v = U("gs-utl-cursor-pointer gs-utl-font-bold", nt.txtEllips),
                b = U("gs-utl-max-w-full gs-utl-h-48 gs-utl-w-72 gs-utl-object-cover", te.br, ye.b, ye.rnd);
            return u.jsxs(tr, {
                className: m,
                padding: !1,
                classNameBody: "gs-utl-flex gs-utl-flex-col gs-utl-gap-2",
                children: [u.jsxs(K, {
                    items: "center",
                    gap: "s",
                    nowrap: !0,
                    children: [u.jsx(q, {className: v, onClick: p, children: t.name}), u.jsx(q, {
                        grow: !0,
                        children: u.jsx(dn, {
                            className: "gs-utl-opacity-90",
                            label: `v${t.version}`,
                            s: "s",
                            pill: !0,
                            border: !0
                        })
                    }), u.jsx(at, {
                        className: "gs-utl-text-sm",
                        size: "m2",
                        variant: "pr",
                        onClick: g,
                        children: c(d ? "uninstall" : "install")
                    })]
                }), u.jsxs(K, {
                    gap: "s",
                    nowrap: !0,
                    children: [u.jsx(q, {
                        grow: !0,
                        className: "gs-utl-text-sm",
                        children: t.description
                    }), t.image && u.jsx("img", {className: b, src: t.image, alt: t.name})]
                })]
            })
        }), hE = xe(function (t) {
            const {selectedId: n, loadPlugins: r, loadPluginsInstalled: o} = t, i = Ke(), [l] = If(), c = B1(),
                d = Ae(), [p, g] = y.useState(), [m, v] = y.useState(), [b, x] = y.useState(), [w, j] = y.useState("all"),
                C = w === "all" ? b : m, _ = i.tScoped("pluginManager"), {editor: E} = d, k = {editor: E},
                T = async () => (o ? await o(k) : await Af()).map(V => ({...Wz[V.id], ...V}));
            y.useEffect(() => {
                const V = setTimeout(async () => {
                    if (m || v(await T()), !b) {
                        const X = r ? await r(k) : await Gz();
                        x(X)
                    }
                });
                return () => clearTimeout(V)
            }, [m, b, E]), y.useEffect(() => {
                if (n && b && !c.selectedShown) {
                    const z = b.find(V => V.id === n);
                    z && g(z), c.setSelectedShown(!0)
                }
            }, [b]);
            const O = y.useMemo(() => [{id: "all", label: _("all")}, {
                    id: "installed",
                    label: _("installed") + (m != null && m.length ? ` (${m.length})` : "")
                }], [i, m == null ? void 0 : m.length]), A = y.useCallback(async z => {
                    const {onInstall: V, onUninstall: X} = t;
                    m != null && m.find(Z => Z.id === z.id) ? (await (X == null ? void 0 : X(z, k)), await XD(z, {
                        skipUpdateLocal: !!X,
                        installed: X ? m : void 0
                    })) : (await (V == null ? void 0 : V(z, k)), await YD(z, {
                        skipUpdateLocal: !!V,
                        installed: V ? m : void 0
                    })), v(await T())
                }, [m, E]),
                $ = y.useMemo(() => (m == null ? void 0 : m.reduce((z, V) => (z[V.id] = V.version, z), {})) || {}, [m]),
                F = !!(p || c.hasPending), N = async () => {
                    if (o) {
                        const z = await T();
                        c.setProjectPlugins(z, {clearPending: !0}), d.refreshStudio(), d.store.modalStore.close()
                    } else d.updateStudio()
                };
            return u.jsxs(K, {
                gap: "m",
                col: !0,
                full: !0,
                children: [F && u.jsxs(K, {
                    children: [!!p && u.jsx(at, {
                        onClick: () => g(void 0),
                        className: te.tAo,
                        border: !1,
                        children: u.jsxs(K, {
                            gap: "xs",
                            items: "center",
                            children: [u.jsx(be, {
                                icon: fe.chevronLeft,
                                size: Ee.s
                            }), u.jsx("div", {children: _("allPlugins")})]
                        })
                    }), c.hasPending && u.jsx(at, {
                        className: "gs-utl-text-sm gs-utl-ml-auto",
                        size: "m2",
                        variant: "out",
                        onClick: N,
                        children: _("updateStudio")
                    })]
                }), p ? u.jsx(q, {
                    grow: !0,
                    className: "gs-utl-w-full",
                    children: u.jsx(gE, {plugin: p, installed: $, onInstall: A, selected: !0})
                }) : u.jsxs(u.Fragment, {
                    children: [u.jsx(q, {
                        children: u.jsx(_s, {
                            tabs: O,
                            onChange: j,
                            value: w
                        })
                    }), u.jsx(q, {
                        grow: !0,
                        children: C ? C.length ? u.jsx(pu, {
                            data: C,
                            listClassName: "gs-utl-grid gs-utl-grid-cols-1 gs-utl-gap-2 gs-utl-pr-2",
                            itemContent: (z, V) => u.jsx(gE, {plugin: V, installed: $, onInstall: A, onSelect: g}, V.id)
                        }, l) : u.jsx(K, {justify: "center", children: i.t("notItemsFound")}) : u.jsx(lu, {})
                    })]
                })]
            })
        }), Kz = xe(function () {
            const {isOpen: t, toggleOpen: n} = tS(), {editor: r, sdkProps: o, sdkOptions: i, isProjectTypeEmail: l} = Ae(),
                c = go(), d = Ke(), p = o.children, g = d.tScoped("blockManager"),
                m = se("absolute left-0 top-0 h-full transition-transform z-10", !t && "-translate-x-full", ye.br, te.br, te.bg),
                v = () => {
                    c.open({fullH: !0, title: d.t("pluginManager.plugins"), content: () => u.jsx(hE, {})})
                }, b = y.useMemo(() => [!!i.pluginManager && !l && {
                    id: "add",
                    title: g("add"),
                    className: te.tAo,
                    onClick: v,
                    icon: fe.viewGridPlus
                }].filter(Boolean), [r]);
            return u.jsxs(K, {
                className: m,
                style: {width: 240},
                col: !0,
                nowrap: !0,
                children: [u.jsx(q, {
                    children: u.jsx(jv, {
                        title: g("blocks"),
                        onClose: n,
                        className: se(et.s),
                        actions: b
                    })
                }), u.jsxs(ea, {
                    children: [or(p, gC), u.jsx(q, {
                        className: se("overflow-hidden"),
                        grow: !0,
                        children: u.jsx(uE, {isOpen: t})
                    }), or(p, pC)]
                })]
            })
        }), Cv = "gs-canvas-spot-drag";

    function qz({spot: e, className: t}) {
        const n = Pr(), r = Ia(e.component), o = U(ye.b, r.border), {
            originComponent: i,
            matchedComponents: l,
            originMatchedDistances: c
        } = e.attributes;
        return u.jsxs("div", {
            className: t,
            children: [u.jsx(mE, {editor: n, componentEl: i, className: U(Cv, o)}), l.map(d => u.jsx(mE, {
                editor: n,
                componentEl: d,
                className: U(`${Cv}__matched`, o)
            }, d.id)), c.map((d, p) => u.jsx(Yz, {
                editor: n,
                originMatchedDistance: d,
                className: U(`${Cv}__distance`),
                componentColorClasses: r
            }, p))]
        })
    }

    function mE(e) {
        const {editor: t, componentEl: n, className: r} = e, o = t.Canvas.getCanvasView(), {
                x: i,
                y: l,
                width: c,
                height: d
            } = o.getElBoxRect(n), p = U(r, "gs-utl-absolute gs-utl-top-0 gs-utl-left-0"),
            g = {translate: `${i}px ${l}px`, width: `${c}px`, height: `${d}px`};
        return u.jsx("div", {className: p, style: g})
    }

    function Yz(e) {
        const {originMatchedDistance: t, editor: n, className: r, componentColorClasses: o} = e,
            l = n.Canvas.getCanvasView().clsUnscale || "", {axis: c, x: d, y: p, width: g, height: m} = t,
            v = c === "y", b = v ? g : m, x = {translate: `${d}px ${p}px`, width: `${g}px`, height: `${m}px`},
            w = `${r}__guides`, j = `${r}__guide-info ${r}__guide-info__${c} gs-utl-absolute`,
            C = U(`${r}__guide-info__line`, o.bg, v ? "gs-utl-w-full gs-utl-h-[1px]" : "gs-utl-h-full gs-utl-w-[1px]"),
            _ = U(`${r}__guide-info__content gs-utl-w-full gs-utl-h-full gs-utl-flex gs-utl-justify-center gs-utl-items-center`),
            E = U(`${r}__guide-info__badge gs-utl-shadow-md`, l, o.bg);
        return u.jsx("div", {
            className: w,
            children: u.jsx("div", {
                className: j,
                style: x,
                children: u.jsx("div", {
                    className: C,
                    children: u.jsx("div", {
                        className: _,
                        children: u.jsxs(dn, {className: E, s: "s", children: [Math.round(b), "px"]})
                    })
                })
            })
        })
    }

    const Xz = {pointerEvents: "all"};

    function vl({spot: e, children: t, style: n, spotStyles: r, ...o}) {
        const i = {...r || e.getStyle(), ...n};
        return u.jsx("div", {...o, style: i, children: u.jsx("div", {style: Xz, children: t})})
    }

    const yo = y.forwardRef(function ({children: t, className: n, position: r, out: o, ...i}, l) {
        var v;
        const {Canvas: c} = Pr(), d = ((v = c.getCanvasView()) == null ? void 0 : v.clsUnscale) || "", p = [], g = {};
        switch (r) {
            case"top-left":
                p.push("top-0", "left-0"), g.transformOrigin = "top left", o && (g.translate = "0 -100%", g.transformOrigin = "bottom left");
                break;
            case"top-center":
                p.push("top-0"), g.left = "50%", g.translate = "-50% 0", g.transformOrigin = "top center", o && (g.translate = "-50% -100%", g.transformOrigin = "bottom center");
                break;
            case"top-right":
                p.push("top-0", "right-0"), g.transformOrigin = "top right", o && (g.translate = "0 -100%", g.transformOrigin = "bottom right");
                break;
            case"center-left":
                p.push("left-0"), g.top = "50%", g.translate = "0 -50%", g.transformOrigin = "center left", o && (g.translate = "-100% -50%", g.transformOrigin = "center right");
                break;
            case"center-center":
                g.top = "50%", g.left = "50%", g.translate = "-50% -50%", g.transformOrigin = "center";
                break;
            case"center-right":
                p.push("right-0"), g.top = "50%", g.translate = "0 -50%", g.transformOrigin = "center right", o && (g.translate = "100% -50%", g.transformOrigin = "center left");
                break;
            case"bottom-left":
                p.push("left-0", "bottom-0"), g.transformOrigin = "bottom left", o && (g.translate = "0 100%", g.transformOrigin = "top left");
                break;
            case"bottom-center":
                p.push("bottom-0"), g.left = "50%", g.translate = "-50% 0", g.transformOrigin = "bottom center", o && (g.translate = "-50% 100%", g.transformOrigin = "top center");
                break;
            case"bottom-right":
                p.push("right-0", "bottom-0"), g.transformOrigin = "bottom right", o && (g.translate = "0 100%", g.transformOrigin = "top right");
                break
        }
        const m = {...g, ...i.style};
        return u.jsx("div", {
            ...i,
            className: U(d, pe("gs-utl-flex gs-utl-absolute", n, p.join(" "))),
            style: m,
            ref: l,
            children: t
        })
    });

    function vE({spot: e, className: t, badgeConfig: n}) {
        const r = Pr(), {Canvas: o} = r, i = (n == null ? void 0 : n.position) || "top-left", [l, c] = y.useState(i),
            d = e.component, p = e.getBoxRect(), g = o.getWorldRectToScreen(p), m = y.useRef(null),
            v = o.getElement().clientHeight;
        return yw(m, {
            zoomMultiplier: o.getZoomMultiplier(),
            boxRectScreen: g,
            vwHeight: v,
            setPos: c,
            initialPos: i
        }), !d || d.get("badgable") === !1 ? null : u.jsx(yo, {
            className: "gs-utl-pointer-events-none",
            ref: m,
            style: EE,
            position: l,
            out: !0,
            children: u.jsx(dn, {
                className: U(n == null ? void 0 : n.className, "gs-utl-shadow-md", t || Ia(d).bg),
                style: n == null ? void 0 : n.style,
                s: "s",
                children: u.jsxs(K, {
                    gap: "xs",
                    items: "center",
                    nowrap: !0,
                    children: [(n == null ? void 0 : n.icon) !== !1 && km(d), u.jsx("div", {
                        className: "gs-utl-whitespace-nowrap gs-utl-max-w-36 gs-utl-truncate",
                        children: d.getName()
                    })]
                })
            })
        })
    }

    function Zz({spot: e, className: t, spotConfig: n}) {
        const r = yE(n), o = U(n == null ? void 0 : n.className, ye.b, Ia(e.component).border, t);
        return u.jsx(vl, {
            spot: e,
            className: o,
            style: n == null ? void 0 : n.style,
            children: r && u.jsx(vE, {spot: e, badgeConfig: r})
        })
    }

    function yE(e) {
        const t = e == null ? void 0 : e.badge;
        return t === !1 ? !1 : t === !0 ? {} : t || {}
    }

    function Jz({spot: e, className: t, spotConfig: n}) {
        var Z;
        const r = Pr(), o = Ae(),
            i = y.useRef(null), [l] = y.useState(EE), [c, d] = y.useState([]), [p, g] = y.useState([]), [m, v] = y.useState("top-right"),
            b = e.component, x = e.getBoxRect(), {Canvas: w} = r, j = w.getWorldRectToScreen(x),
            C = e.getStyle({boxRect: x}), _ = r.getSelected() === b, E = w.getElement().clientHeight, k = ym();
        y.useEffect(() => {
            const R = async () => g(await eB(b, o)), B = async () => d(await k.getItemsForComponent(b)),
                H = setTimeout(() => {
                    R(), B()
                }, 10);
            return () => clearTimeout(H)
        }, [b]), yw(i, {zoomMultiplier: w.getZoomMultiplier(), boxRectScreen: j, vwHeight: E, setPos: v});
        const T = (R = {}) => {
                var M, W, ce;
                const B = (ce = (W = (M = r.getSelected()) == null ? void 0 : M.view) == null ? void 0 : W.el) == null ? void 0 : ce.getBoundingClientRect(),
                    Q = B ? B.left + B.width / 2 : 0, H = B ? B.top + B.height / 2 : 0,
                    I = {...R.event, clientX: Q, clientY: H};
                return {...R, event: I}
            }, O = (R, B) => {
                R === "tlb-move" && (B = T(B)), zt(R) ? r.runCommand(R, B) : R == null || R(r, "", B)
            }, A = R => {
                const B = R.currentTarget.getBoundingClientRect();
                k.show({items: c, x: B.x + B.width, y: B.y})
            }, $ = Ia(b), F = bE(n), N = U(n == null ? void 0 : n.className, "gs-utl-border-2", $.border, t),
            z = U(F && F.className, $.bg, "gs-utl-overflow-hidden gs-utl-shadow-md"), V = Qz(n), X = F !== !1;
        return u.jsxs(vl, {
            spot: e,
            spotStyles: C,
            style: n == null ? void 0 : n.style,
            className: N,
            children: [_ && X && u.jsx(yo, {
                ref: i,
                style: l,
                position: m,
                out: !0,
                children: u.jsx(dn, {
                    className: z,
                    style: F == null ? void 0 : F.style,
                    s: "s",
                    nopad: !0,
                    block: !0,
                    children: u.jsxs(K, {
                        gap: "x2s",
                        items: "center",
                        nowrap: !0,
                        children: [V && u.jsxs(K, {
                            className: U(V.className, "gs-utl-py-1 gs-utl-px-2"),
                            style: V.style,
                            gap: "xs",
                            items: "center",
                            nowrap: !0,
                            children: [V.icon !== !1 && km(b), u.jsx("div", {
                                className: U(nt.txtEllips, "gs-utl-max-w-36"),
                                children: b.getName()
                            })]
                        }), p.map(({label: R, command: B = ""}) => u.jsx(q, {
                            children: u.jsx(at, {
                                border: !1,
                                rounded: !1,
                                size: "s",
                                className: pe("block gs-utl-py-1.5 gs-utl-px-1.5", te.hBgDark),
                                onMouseDown: Q => O(B, {event: Q}),
                                children: R != null && R.startsWith("<svg") ? u.jsx(ph, {
                                    className: pe("w-4 fill-current"),
                                    svg: R
                                }) : R
                            })
                        }, R)), !!c.length && u.jsx(q, {
                            children: u.jsx(at, {
                                border: !1,
                                rounded: !1,
                                size: "s",
                                className: pe("block", te.hBgDark),
                                onClick: A,
                                children: u.jsx(be, {icon: fe.dotsVertical, size: Ee.s})
                            })
                        })]
                    })
                })
            }), (Z = n == null ? void 0 : n.items) == null ? void 0 : Z.map(({
                                                                                 id: R,
                                                                                 layout: B,
                                                                                 position: Q,
                                                                                 className: H,
                                                                                 style: I
                                                                             }, D) => u.jsx(yo, {
                position: Q,
                className: H,
                style: I,
                out: !0,
                children: Gn(B)
            }, R || D))]
        })
    }

    function bE(e) {
        return e && e.toolbar
    }

    function Qz(e) {
        const t = bE(e), n = t && t.badge;
        return n === !0 ? {} : n || !1
    }

    async function eB(e, t) {
        var g;
        if (!(e != null && e.em)) return [];
        const n = e.em.getEditor(), r = e.toolbar.filter(Boolean), o = e.get("toolbarItems"),
            i = await Ev(o, {items: r, component: e, editor: n}), l = {items: i, component: e, editor: n},
            c = await Ev(i, l), d = (g = t.sdkComponentsConfig) == null ? void 0 : g.toolbar;
        return await Ev(d, {...l, items: c})
    }

    const Ev = async (e, t) => St(e) ? (await e(t)).filter(Boolean) : t.items;
    var bo = (e => (e.PaddingTop = "padding-top", e.PaddingRight = "padding-right", e.PaddingBottom = "padding-bottom", e.PaddingLeft = "padding-left", e.MarginTop = "margin-top", e.MarginRight = "margin-right", e.MarginBottom = "margin-bottom", e.MarginLeft = "margin-left", e))(bo || {});
    const {
            PaddingTop: pp,
            PaddingRight: Pv,
            PaddingBottom: gp,
            PaddingLeft: _v,
            MarginTop: hp,
            MarginRight: kv,
            MarginBottom: mp,
            MarginLeft: Tv
        } = bo, tB = (e, t) => {
            const n = t != null && t.startsWith("p") ? "padding" : "margin";
            return l6(e, n, t)
        }, pi = (e, t, n = {}) => {
            const r = Pr(), o = qw(), [i, l] = y.useState(), c = g => {
                const v = r.Canvas.getFramesEl().classList, b = g ? "add" : "remove";
                v[b]("gs-utl-pointer-events-none"), v[b]("gs-utl-select-none")
            }, d = g => {
                var m, v;
                (m = n.setAltKey) == null || m.call(n, g.altKey), (v = n.setShiftKey) == null || v.call(n, g.shiftKey)
            };
            return y.useEffect(() => {
                var z;
                const g = [pp, gp, hp, mp].includes(t), m = document.body.classList, v = e.component.getEl(),
                    b = r.Styles.getSelected(), x = window.getComputedStyle(v),
                    w = g ? "!cursor-ns-resize" : "!cursor-ew-resize", j = r.Canvas.getZoomMultiplier(), C = {};
                let _ = parseFloat(x[t]) ?? 0, E, k = "", T = {};
                for (const V of Object.values(bo)) {
                    const X = V;
                    C[X] = x[X]
                }
                const O = (V, X) => {
                    const Z = t == null ? void 0 : t.startsWith("p"), {altKey: R, shiftKey: B} = X, Q = C, H = {
                        [pp]: B || t === gp && R ? V : Q[pp],
                        [Pv]: B || t === _v && R ? V : Q[Pv],
                        [gp]: B || t === pp && R ? V : Q[gp],
                        [_v]: B || t === Pv && R ? V : Q[_v]
                    }, I = {
                        [hp]: B || t === mp && R ? V : Q[hp],
                        [kv]: B || t === Tv && R ? V : Q[kv],
                        [mp]: B || t === hp && R ? V : Q[mp],
                        [Tv]: B || t === kv && R ? V : Q[Tv]
                    };
                    return H[t] = V, I[t] = V, Z ? H : I
                }, A = V => {
                    k && (E ? E.upValue(k, V) : b == null || b.addStyle(T, V))
                }, $ = V => {
                    if (!i || !b) return;
                    const X = g ? V.clientY - i.y : V.clientX - i.x, Z = Math.max(0, parseInt(`${_ + X * j}`));
                    k = `${Z}px`, T = O(k, V), A({partial: !0}), o.show(Z)
                }, F = () => {
                    !i || !b || (l(void 0), c(!1), o.hide(), A())
                }, N = V => {
                    d(V), T = O(k, V), A({partial: !0})
                };
                return i && (document.addEventListener("pointermove", $), document.addEventListener("pointerup", F), document.addEventListener("keydown", N), document.addEventListener("keyup", N), m.add(w), (z = n.onActive) == null || z.call(n, t), n.useStyleProperty && (E = tB(r, t), _ = (E == null ? void 0 : E.getValue()) ?? _)), () => {
                    var V;
                    document.removeEventListener("pointermove", $), document.removeEventListener("pointerup", F), document.removeEventListener("keydown", N), document.removeEventListener("keyup", N), m.remove(w), (V = n.onActive) == null || V.call(n, void 0)
                }
            }, [i]), [y.useCallback(g => {
                if (g.button !== 0) return;
                const {clientX: m, clientY: v} = g;
                l({x: m, y: v}), c(!0), d(g.nativeEvent)
            }, []), !!i]
        }, vp = "gs-utl-border-2 gs-utl-border-white !gs-utl-box-content", xE = "gs-utl-bg-[#7fc65e]",
        wE = "gs-utl-bg-[#ebae70]", SE = "gs-utl-h-5 gs-utl-w-1 gs-utl-mx-2 gs-utl-cursor-ew-resize",
        jE = "gs-utl-h-1 gs-utl-w-5 gs-utl-my-2 gs-utl-cursor-ns-resize",
        nB = y.memo(function ({spot: t, disabledHandler: n, useStyleProperty: r, onActive: o}) {
            const [i, l] = y.useState(!1), [c, d] = y.useState(!1), p = {
                    onActive: o,
                    setAltKey: l,
                    setShiftKey: d,
                    useStyleProperty: r
                }, [g, m] = pi(t, "padding-top", p), [v, b] = pi(t, "padding-right", p), [x, w] = pi(t, "padding-bottom", p), [j, C] = pi(t, "padding-left", p), [_, E] = pi(t, "margin-top", p), [k, T] = pi(t, "margin-right", p), [O, A] = pi(t, "margin-bottom", p), [$, F] = pi(t, "margin-left", p),
                N = pe(vp, xE, SE), z = pe(vp, xE, jE), V = pe(vp, wE, SE), X = pe(vp, wE, jE), Z = m || b || w || C,
                R = E || T || A || F, B = Z || R, Q = (ie, de) => {
                    let je = !1;
                    const he = Z && c, Ie = R && c;
                    switch (de) {
                        case"padding-top":
                            je = w && i || he;
                            break;
                        case"padding-right":
                            je = C && i || he;
                            break;
                        case"padding-bottom":
                            je = m && i || he;
                            break;
                        case"padding-left":
                            je = b && i || he;
                            break;
                        case"margin-top":
                            je = A && i || Ie;
                            break;
                        case"margin-right":
                            je = F && i || Ie;
                            break;
                        case"margin-bottom":
                            je = E && i || Ie;
                            break;
                        case"margin-left":
                            je = T && i || Ie;
                            break
                    }
                    return !B || ie || je
                }, H = !!(n != null && n.padding), I = !!(n != null && n.margin), D = !H && Q(m, "padding-top"),
                M = !H && Q(b, "padding-right"), W = !H && Q(w, "padding-bottom"), ce = !H && Q(C, "padding-left"),
                ne = !I && Q(E, "margin-top"), ue = !I && Q(T, "margin-right"), me = !I && Q(A, "margin-bottom"),
                ae = !I && Q(F, "margin-left");
            return u.jsxs(u.Fragment, {
                children: [D && u.jsx(yo, {
                    position: "top-center",
                    onPointerDown: g,
                    children: u.jsx(dn, {className: z, s: "s", pill: !0, block: !0, nopad: !0})
                }), M && u.jsx(yo, {
                    position: "center-right",
                    onPointerDown: v,
                    children: u.jsx(dn, {className: N, s: "s", pill: !0, block: !0, nopad: !0})
                }), W && u.jsx(yo, {
                    position: "bottom-center",
                    onPointerDown: x,
                    children: u.jsx(dn, {className: z, s: "s", pill: !0, block: !0, nopad: !0})
                }), ce && u.jsx(yo, {
                    position: "center-left",
                    onPointerDown: j,
                    children: u.jsx(dn, {className: N, s: "s", pill: !0, block: !0, nopad: !0})
                }), ne && u.jsx(yo, {
                    position: "top-center",
                    onPointerDown: _,
                    out: !0,
                    children: u.jsx(dn, {className: X, s: "s", pill: !0, block: !0, nopad: !0})
                }), ue && u.jsx(yo, {
                    position: "center-right",
                    onPointerDown: k,
                    out: !0,
                    children: u.jsx(dn, {className: V, s: "s", pill: !0, block: !0, nopad: !0})
                }), me && u.jsx(yo, {
                    position: "bottom-center",
                    onPointerDown: O,
                    out: !0,
                    children: u.jsx(dn, {className: X, s: "s", pill: !0, block: !0, nopad: !0})
                }), ae && u.jsx(yo, {
                    position: "center-left",
                    onPointerDown: $,
                    out: !0,
                    children: u.jsx(dn, {className: V, s: "s", pill: !0, block: !0, nopad: !0})
                })]
            })
        }), CE = (e, t) => {
            var n;
            return !!((n = Uw(e, t)) != null && n.isVisible())
        }, rB = (e = {}) => {
            const [t, n, r, o] = gS(e.padding || ""), [i, l, c, d] = gS(e.margin || "");
            return {
                paddingTop: e[bo.PaddingTop] || t,
                paddingRight: e[bo.PaddingRight] || n,
                paddingBottom: e[bo.PaddingBottom] || r,
                paddingLeft: e[bo.PaddingLeft] || o,
                marginTop: e[bo.MarginTop] || i,
                marginRight: e[bo.MarginTop] || l,
                marginBottom: e[bo.MarginTop] || c,
                marginLeft: e[bo.MarginTop] || d
            }
        };

    function oB({spot: e, className: t}) {
        const n = Pr(), {isProjectTypeEmail: r} = Ae(), [o, i] = y.useState(), [l, c] = y.useState({
                padding: !1,
                margin: !1
            }), {el: d, component: p} = e, g = e.getBoxRect(), m = n.Canvas.getZoomDecimal(), v = g.height * m,
            b = g.width * m, x = e.getStyle({boxRect: g}), w = n.getSelectedAll().includes(p),
            j = n.getSelected() === p, C = (o == null ? void 0 : o.startsWith("p")) ?? !1,
            _ = (o == null ? void 0 : o.startsWith("m")) ?? !1, E = rB(r ? p == null ? void 0 : p.getStyle() : {});
        if (y.useEffect(() => {
            w && c({padding: !CE(n, "padding"), margin: !CE(n, "margin")})
        }, [w]), e.type === "spacing" && w) return null;
        const k = {borderColor: "rgba(196, 222, 184, 0.5)", borderStyle: "solid"},
            T = {borderColor: "rgba(249, 204, 158, 0.5)", borderStyle: "solid", boxSizing: "content-box"},
            O = window.getComputedStyle(d);
        k.borderTopWidth = E.paddingTop || O.paddingTop, k.borderRightWidth = E.paddingRight || O.paddingRight, k.borderBottomWidth = E.paddingBottom || O.paddingBottom, k.borderLeftWidth = E.paddingLeft || O.paddingLeft, T.borderTopWidth = E.marginTop || O.marginTop, T.borderRightWidth = E.marginTop || O.marginRight, T.borderBottomWidth = E.marginTop || O.marginBottom, T.borderLeftWidth = E.marginTop || O.marginLeft;
        const A = {...x, ...k},
            $ = {...x, ...T, translate: `${g.x - parseFloat(O.marginLeft)}px ${g.y - parseFloat(O.marginTop)}px`};
        return u.jsxs(u.Fragment, {
            children: [(!w || C) && u.jsx(vl, {
                spot: e,
                spotStyles: A,
                className: pe(t)
            }), (!w || _) && u.jsx(vl, {
                spot: e,
                spotStyles: $,
                className: pe(t)
            }), j && (v > 60 && b > 60 || o) && u.jsx(vl, {
                spot: e,
                spotStyles: x,
                className: pe(t),
                children: u.jsx(nB, {spot: e, onActive: i, disabledHandler: l, useStyleProperty: r})
            })]
        })
    }

    function sB({spot: e, className: t, spotConfig: n}) {
        const r = yE(n),
            o = U(n == null ? void 0 : n.className, "gs-utl-border-2", te.cmpTargetBr, te.cmpTargetBgOpac, t);
        return u.jsx(vl, {
            spot: e,
            className: o,
            style: n == null ? void 0 : n.style,
            children: r && u.jsx(vE, {spot: e, className: te.cmpTargetBg, badgeConfig: r})
        })
    }

    async function iB(e, t) {
        var m;
        const n = e.component, r = n == null ? void 0 : n.em.getEditor();
        if (!n || !r) return {};
        const o = {}, i = Ia(n), l = {editor: r, component: n, spot: e, componentTheme: i, result: o},
            c = n.get("canvasSpots"), d = await (c == null ? void 0 : c(l)) || o,
            p = (m = t.sdkComponentsConfig) == null ? void 0 : m.canvasSpots;
        return await (p == null ? void 0 : p({...l, result: d})) || d
    }

    const EE = {padding: "9px 0"}, PE = "dragAbsolute";

    function aB({spot: e}) {
        const t = Pr(), [n, r] = y.useState(), {Canvas: o} = t, i = Ae(), l = t.getEditing(), {
            type: c,
            component: d
        } = e, p = c === "select", g = c === "spacing", m = c === "hover", v = c === "target", b = c === PE, x = [PE];
        return y.useEffect(() => {
            const w = `${t.Components.events.update}:status`, j = async () => r(await iB(e, i)), C = setTimeout(j);
            return t.on(w, j), () => {
                clearTimeout(C), t.off(w, j)
            }
        }, [d]), !n || !e.el || i.isInPreview || !o.hasCustomSpot(c) && !x.includes(c) || i.isSelectingTarget && !v || (m || g) && l && (d != null && d.isChildOf(l)) ? null : u.jsxs(u.Fragment, {
            children: [(g || p) && n.spacing !== !1 && u.jsx(oB, {
                spot: e,
                className: "gs-utl-z-0"
            }), v && n.target !== !1 && u.jsx(sB, {
                spot: e,
                spotConfig: n.target,
                className: "gs-utl-z-10"
            }), p && n.select !== !1 && u.jsx(Jz, {
                spot: e,
                spotConfig: n.select,
                className: "gs-utl-z-20"
            }), m && n.hover !== !1 && u.jsx(Zz, {
                spot: e,
                spotConfig: n.hover,
                className: "gs-utl-z-30"
            }), b && u.jsx(qz, {spot: e, className: "gs-utl-z-40"})]
        })
    }

    const _E = new WeakMap;

    function kE(e) {
        if (!e) return () => null;
        const t = _E.get(e);
        if (t) return t;
        const n = function ({children: o}) {
            return kg.createPortal(o, e)
        };
        return _E.set(e, n), n
    }

    const lB = y.memo(function ({children: t}) {
        const n = d1(), [r, o] = y.useState([]), [i, l] = y.useState({});
        y.useEffect(() => {
            if (!n) return;
            n.onReady(() => {
                const g = n.Canvas.getSpotsEl(), m = kE(g);
                l({Container: m})
            });
            const d = "canvas:spot", p = () => {
                const g = n.Canvas.getSpots();
                o(g)
            };
            return n.on(d, p), () => {
                n.off(d, p)
            }
        }, [n]);
        const {Container: c} = i;
        return n && c ? u.jsx(c, {children: t({spots: r})}) : null
    }), cB = xe(function () {
        const {isCanvasPanning: t} = Ae();
        return u.jsx(lB, {
            children: ({spots: n}) => u.jsx(zo, {
                show: !t, ...Jb,
                children: n.map(r => u.jsx(aB, {spot: r}, r.id))
            })
        })
    }), yl = "gs-layout-panel", uB = y.memo(xe(function ({className: t, layout: n, children: r}) {
        const o = Lm(), i = go(), [l, c] = y.useState(!1), [d, p] = y.useState(null), {
                id: g,
                header: m,
                layout: v,
                props: b,
                full: x = !0,
                style: w,
                toRemove: j,
                disablePropagation: C
            } = n, _ = () => {
                c(!1), setTimeout(() => o.remove(g, {force: !0}), 150)
            }, E = n.placer || {type: Xi.absolute, position: Yi.left}, k = E.type === Xi.absolute ? E : null,
            T = E.type === Xi.popover ? E : null, O = E.type === Xi.static ? E : null,
            A = E.type === Xi.dialog ? E : null, $ = (k == null ? void 0 : k.position) === Yi.left,
            F = (k == null ? void 0 : k.position) === Yi.right, N = (k == null ? void 0 : k.position) === Yi.top,
            z = (k == null ? void 0 : k.position) === Yi.bottom, V = O || A, X = zt(v) ? {type: v} : v, Z = !!k, {
                x: R,
                y: B
            } = T || {}, Q = (T == null ? void 0 : T.w) || (T == null ? void 0 : T.width),
            H = (T == null ? void 0 : T.h) || (T == null ? void 0 : T.height), I = T == null ? void 0 : T.target,
            D = y.useMemo(() => I && l ? I : {getBoundingClientRect: () => I ? I.getBoundingClientRect() : new DOMRect(R, B, Q, H)}, [R, B, Q, H, I, l]),
            M = Xa(D, d, {..._w, placement: "auto", ...T == null ? void 0 : T.options}),
            W = U(yl, te.br, te.bg, te.txt, "gs-utl-z-10", Z && "gs-utl-absolute gs-utl-transition", ($ || N) && "gs-utl-top-0 gs-utl-left-0", F && "gs-utl-top-0 gs-utl-right-0", z && "gs-utl-bottom-0 gs-utl-left-0", Z && x && ($ || F ? "gs-utl-h-full" : "gs-utl-w-full"), !l && Z ? "gs-utl-opacity-0" : "gs-utl-opacity-100", !l && $ && "-gs-utl-translate-x-full", !l && F && "gs-utl-translate-x-full", !l && N && "-gs-utl-translate-y-full", !l && z && "gs-utl-translate-y-full", T && ye.rnd, T && ye.b, n.className, t);
        y.useEffect(() => {
            const me = setTimeout(() => c(!0));
            return () => clearTimeout(me)
        }, []), y.useEffect(() => {
            j && _()
        }, [j]);
        const ce = {...w, width: (w == null ? void 0 : w.width) || ($ || F ? 240 : void 0)};
        vw({current: d}, {onTrigger: _, enabled: (T == null ? void 0 : T.closeOnClickAway) && l});
        const ne = me => {
            C && me.nativeEvent.stopImmediatePropagation()
        }, ue = u.jsxs(K, {
            className: W,
            style: ce,
            col: !0,
            nowrap: !0,
            onPointerDown: ne,
            onMouseDown: ne,
            children: [m !== !1 && u.jsx(q, {
                className: U(`${yl}__header`, m == null ? void 0 : m.className),
                style: m == null ? void 0 : m.style,
                children: u.jsx(jv, {
                    onClose: (m == null ? void 0 : m.close) !== !1 ? _ : void 0,
                    className: pe(et.s),
                    title: u.jsxs(K, {
                        className: `${yl}__title`,
                        space: "s",
                        items: "center",
                        children: [!!(m != null && m.icon) && u.jsx(be, {
                            icon: m.icon,
                            size: Ee.s
                        }), !!(m != null && m.label) && u.jsx(q, {grow: !0, children: m.label})]
                    })
                })
            }), u.jsx(q, {
                className: U(`${yl}__content`, "gs-utl-overflow-hidden gs-utl-flex gs-utl-flex-col"),
                grow: !0,
                children: v || g ? Gn({...b, id: g, ...X}) : r
            })]
        });
        return y.useEffect(() => {
            if (l) {
                if (O) {
                    const me = o.layoutsById.get(O.layoutId);
                    if (me) return me.setState({children: ue}), () => {
                        !n.placer.skipCleanup && me.setState({children: null})
                    }
                } else if (A) return i.open({
                    content: () => ue,
                    disablePropagation: C,
                    title: A.title,
                    size: A.size,
                    onClose: _
                }), () => {
                    i.close()
                }
            }
        }, [l]), V ? null : T ? u.jsx("div", {
            className: pe(yl, `${yl}-popover`, "gs-utl-z-20"),
            ref: p,
            style: M.styles.popper, ...M.attributes.popper,
            children: u.jsx(zo, {show: l, ...ac, unmount: !1, children: ue})
        }) : ue
    })), dB = xe(function ({className: t, ...n}) {
        const {layouts: r} = Lm();
        return u.jsx("div", {
            className: U("gs-layout-panel-container", t), ...n,
            children: r.map(o => u.jsx(uB, {layout: o}, o.id))
        })
    }), Os = "gs-cmp-modal";

    function TE({
                    open: e = !1,
                    title: t,
                    disablePropagation: n,
                    isDarkTheme: r,
                    description: o,
                    children: i,
                    onClose: l,
                    preventOverflow: c,
                    closable: d = !0,
                    fullH: p,
                    buttons: g = [],
                    size: m
                }) {
        const v = () => d && l(),
            b = U(Tb, `${Os} gs-utl-fixed gs-utl-z-20 gs-utl-inset-0 gs-utl-overflow-y-auto`, r && Am),
            x = U(`${Os}-wrapper gs-utl-relative gs-utl-flex gs-utl-justify-center gs-utl-min-h-screen`, p ? "gs-utl-items-stretch" : "gs-utl-items-center", c && "gs-utl-h-dvh"),
            w = U(`${Os}-container`, "gs-utl-relative gs-utl-w-full gs-utl-p-5 gs-utl-my-8 gs-utl-overflow-hidden gs-utl-shadow-xl gs-utl-rounded-xl gs-utl-flex gs-utl-flex-col", ye.b, te.br, te.bg, te.txt, m === "lg" ? "gs-utl-max-w-lg" : m === "l" ? "gs-utl-max-w-5xl" : m === "s" ? "gs-utl-max-w-sm" : "gs-utl-max-w-md"),
            j = U(`${Os}-overlay gs-utl-absolute gs-utl-inset-0 gs-utl-bg-black/50 gs-utl-transition-opacity`),
            C = U(`${Os}-close gs-utl-absolute gs-utl-top-0 gs-utl-right-0 gs-utl-m-3`),
            _ = U(`${Os}-title gs-utl-text-lg gs-utl-font-medium gs-utl-leading-6 gs-utl-m-0`),
            E = U(`${Os}-desc gs-utl-m-0`),
            k = U(`${Os}-content gs-utl-mt-4 gs-utl-h-full`, c && "gs-utl-overflow-hidden"),
            T = U(`${Os}-buttons gs-utl-mt-4`), O = A => {
                n && A.nativeEvent.stopImmediatePropagation()
            };
        return u.jsx(zo, {
            show: e,
            as: y.Fragment,
            children: u.jsx(vc, {
                onClose: v,
                className: b,
                onPointerDown: O,
                onMouseDown: O,
                children: u.jsxs("div", {
                    className: x,
                    children: [u.jsx(zo.Child, {
                        as: y.Fragment, ...ac,
                        children: u.jsx(vc.Overlay, {className: j})
                    }), u.jsx(zo.Child, {
                        as: y.Fragment, ...gh,
                        children: u.jsxs("div", {
                            className: w,
                            children: [d && u.jsx("div", {
                                className: C,
                                children: u.jsx(Xt, {
                                    block: !0,
                                    border: !1,
                                    onClick: v,
                                    children: u.jsx(be, {icon: fe.close, size: 1})
                                })
                            }), u.jsx(vc.Title, {
                                as: "h3",
                                className: _,
                                children: t
                            }), u.jsx(vc.Description, {className: E, children: o}), u.jsx("div", {
                                className: k,
                                children: i
                            }), g.length > 0 && u.jsx(K, {
                                className: T,
                                space: "m",
                                items: "center",
                                justify: "end",
                                children: g.map((A, $) => u.jsx(at, {...A}, $))
                            })]
                        })
                    }), u.jsx(vc, {
                        onClose: () => {
                        }, open: !1
                    })]
                })
            })
        })
    }

    const fB = xe(function () {
        const {isOpen: t, close: n, content: r, modalProps: o} = go(), {isDarkTheme: i} = sr();
        return u.jsx(TE, {open: t, onClose: n, isDarkTheme: i, ...o, children: St(r) ? r() : r})
    }), pB = "gs-panel-page-settings-cnt", gB = xe(function () {
        const t = Ke(), n = Ae(), {panelPageSettings: r} = n, o = t.tScoped("pageManager.settings"), {
                isOpen: i,
                page: l,
                width: c
            } = r,
            d = se(pB, "absolute left-0 top-0 h-full transition-transform z-10", !i && "-translate-x-full", ye.br, te.br, te.bg),
            p = se(et.s), g = () => n.setPanelPageSettings({isOpen: !1});
        return u.jsxs(K, {
            className: d,
            style: {width: c},
            col: !0,
            nowrap: !0,
            children: [u.jsx(q, {
                children: u.jsx(jv, {
                    title: o("title"),
                    onClose: g,
                    className: p
                })
            }), u.jsx(ea, {
                children: u.jsx(q, {
                    className: se("overflow-hidden"),
                    grow: !0,
                    children: r.isOpen && u.jsx(LC, {
                        page: l,
                        size: Kd.s,
                        classNameHeader: p,
                        classNameContent: p,
                        classNameFooter: p
                    })
                })
            })]
        })
    }), OE = "gs-cmp-custom-rte", hB = xe(function ({items: t}) {
        const n = r => r.nativeEvent.stopImmediatePropagation();
        return u.jsx(tr, {
            className: U(OE, "gs-utl-m-2"),
            size: "s",
            onPointerDown: n,
            onMouseDown: n,
            classNameBody: U(`${OE}__body`, "gs-utl-flex gs-utl-gap-1 gs-utl-items-center"),
            children: Gn(t)
        })
    });

    function mB({children: e}) {
        const t = d1(), [n, r] = y.useState({enabled: !1, actions: [], Container: () => null});
        y.useEffect(() => {
            if (!t) return;
            const d = t.RichTextEditor, p = d.events.custom, g = m => {
                let v;
                const b = d.customRte, x = b == null ? void 0 : b.toolbar, w = d.model.attributes.currentView;
                x && (w != null && w.model) && (v = x({
                    editor: t,
                    view: w,
                    component: w.model,
                    el: w.getChildrenContainer()
                }));
                const j = d.getAll().map(C => ({id: C.name, icon: C.icon, run: () => d.run(C), state: C.currentState}));
                r({customRte: b, customToolbar: v, enabled: m.enabled, Container: kE(m.container), actions: j})
            };
            return t.on(p, g), () => {
                t.off(p, g)
            }
        }, [t]);
        const {Container: o, customToolbar: i, customRte: l} = n, c = i ? u.jsx(hB, {items: i}) : null;
        return t && o ? u.jsx(o, {children: l ? c : e(n)}) : null
    }

    function vB() {
        return u.jsx(mB, {
            children: ({actions: e}) => u.jsx(K, {
                className: se(te.bg, ye.b, ye.rnd, te.br, "gjs-m-2"),
                nowrap: !0,
                children: e.map((t, n) => u.jsx(at, {
                    border: !1,
                    rounded: !1,
                    active: t.state === 1,
                    disabled: t.state === -1,
                    className: se("w-6", te.br, n !== 0 && ye.bl),
                    dangerouslySetInnerHTML: {__html: t.icon},
                    onClick: t.run
                }, t.id))
            })
        })
    }

    const yB = xe(e => {
        const {select: t, close: n, Container: r, open: o} = e, i = Ji(), {editor: l} = Ae();
        if (!l || !o) return u.jsx(r, {children: null});
        const {
            providers: c,
            onSelect: d,
            typeId: p,
            providerId: g,
            types: m,
            optionalType: v,
            optionalProvider: b,
            content: x
        } = l.Assets.__customData().options;
        return u.jsx(r, {
            children: u.jsx(iC, {
                panelId: i.mainPanelId,
                onSelect: d ?? (({asset: w}) => t(w)),
                close: n,
                types: m,
                providers: c,
                typeId: p,
                providerId: g,
                optionalType: v,
                optionalProvider: b,
                content: x
            })
        })
    }), bB = xe(function () {
        var C, _;
        const t = Ae(), n = Ji(), {
                projectType: r,
                editorKey: o,
                setEditor: i,
                sdkProps: l,
                sdkOptions: c,
                currentLayout: d
            } = t, {isDarkTheme: p} = sr(),
            g = !!((_ = (C = c.gjsOptions) == null ? void 0 : C.assetManager) != null && _.custom),
            m = B1(), [v, b] = y.useMemo(() => [dj(r, c), m.getPluginsToLoad(r, t)], [r, o]), x = E => {
                var k, T;
                i(E), n.onEditor(), (k = l.onEditor) == null || k.call(l, E), (T = c.onEditor) == null || T.call(c, E), E.on("destroy", () => {
                    var O;
                    i(), (O = c.onDestroy) == null || O.call(c, E), t.setIsReady(!1)
                })
            }, w = E => {
                var k, T;
                (k = l.onReady) == null || k.call(l, E), (T = c.onReady) == null || T.call(c, E), t.setIsReady(!0)
            }, j = (E, k) => {
                var T, O;
                (T = l.onUpdate) == null || T.call(l, E, k), (O = c.onUpdate) == null || O.call(c, E, k)
            };
        return u.jsxs(F9, {
            className: se("gs-editor-gjs h-full w-full", ye.b, te.br),
            grapesjs: c.gjsScript,
            grapesjsCss: c.gjsStyle,
            options: v,
            plugins: b,
            onEditor: x,
            onReady: w,
            onUpdate: j,
            children: [Gn(d), u.jsx(dB, {}), u.jsx(Kz, {}), u.jsx(gB, {}), !g && u.jsx(A9, {children: E => u.jsx(yB, {...E})}), u.jsx(z9, {
                children: ({
                               open: E,
                               title: k,
                               close: T,
                               content: O
                           }) => u.jsx(TE, {
                    open: E,
                    onClose: T,
                    title: u.jsx(u.Fragment, {children: k}),
                    isDarkTheme: p,
                    size: "l",
                    children: u.jsx(u.Fragment, {children: O})
                })
            }), u.jsx(cB, {}), u.jsx(vB, {}), u.jsx(fB, {})]
        }, o)
    }), xB = xe(function () {
        const t = Ae(), {updateAppShell: n} = sr(), {
            editor: r,
            editorKey: o,
            sdkLicenseError: i,
            sdkMisconfigurationError: l,
            isReady: c,
            licenseCheckStarted: d,
            rootElWidth: p
        } = t, g = go(), m = Ke(), v = B1();
        eS();
        const b = !!o && !!p;
        return y.useEffect(() => {
            n && document.querySelector("body").classList.add(...pe(te.bg, "overflow-hidden").split(" "))
        }, []), y.useEffect(() => {
            if (c && !d && !Jg()) {
            }
        }, [c, d]), y.useEffect(() => {
            l && console.error(l)
        }, [l]), y.useEffect(() => {
            if (!r) return;
            "launchQueue" in window && "LaunchParams" in window && window.launchQueue.setConsumer(async j => {
                if (!j.files.length) return;
                const E = await (await j.files[0].getFile()).text();
                t.loadProjectData(JSON.parse(E))
            });
            const {plg: x} = t.queryParams;
            x && !v.selectedShown && g.open({
                fullH: !0,
                title: m.t("pluginManager.plugins"),
                content: () => u.jsx(hE, {selectedId: x})
            });
            const w = xs(() => t.refreshEditorCanvas(), 100);
            return window.addEventListener("scroll", w, !0), () => window.removeEventListener("scroll", w, !0)
        }, [r]), y.useEffect(() => {
        }, []), u.jsxs(K, {
            className: pe("relative transition-colors h-full", te.bg, te.txt),
            justify: "center",
            items: "center",
            col: !0,
            children: [b && (i ? u.jsxs(K, {
                col: !0,
                justify: "center",
                items: "center",
                children: [u.jsx("div", {children: "SDK License Error"}), u.jsx("span", {
                    className: pe("text-sm"),
                    children: i
                })]
            }) : l ? u.jsx(K, {
                col: !0,
                justify: "center",
                items: "center",
                children: u.jsx("div", {children: "SDK Misconfiguration Error"})
            }) : u.jsx(bB, {})), u.jsx(zo, {
                show: !b,
                as: y.Fragment, ...ac,
                children: u.jsx(lu, {className: pe("z-10", te.bg), abs: !0})
            })]
        })
    });

    function wB({projectType: e, project: t}) {
        const n = SB({projectType: e}), r = {type: e, default: {pages: [n]}};
        return t ? (t.type = t.type ?? r.type, t.default = t.default ?? r.default, t) : r
    }

    function SB({projectType: e}) {
        const t = {name: "Web", component: jB}, n = {name: "Email", component: CB};
        switch (e) {
            case Xe.web:
                return t;
            case Xe.email:
                return n;
            default:
                return t
        }
    }

    const yp = "https://app.grapesjs.com/docs-sdk/configuration/projects#self-hosted-storage",
        bp = "https://app.grapesjs.com/docs-sdk/configuration/projects#setup",
        LE = "https://app.grapesjs.com/docs-sdk/img/grapesjs-logo-black.svg", jB = `<body>
    <header class="head">
      <img class="logo" src="${LE}" alt="GrapesJS Logo">
    </header>
    <div class="card">
        <h1 class="title">Welcome to GrapesJs!</h1>
        <p class="subtitle">You're currently viewing the default fallback project for web.</p>

        <p class="paragraph">
          This appears because no storage has been configured yet. To set up your own storage, follow the guide here:
          <br/>
          👉 <a class="link" href="${yp}" target="_blank">${yp}</a>
        </p>

        <p class="paragraph">
          Want to customize the fallback project? You can do so by setting options.project.default. Learn more here:
          <br/>
          👉 <a class="link" href="${bp}" target="_blank">${bp}</a>
        </p>

        <footer class="footer">Happy building! 🚀</footer>
    </div>
    <style>
      body {
        background-color: #e7e7e7;
        font-family: Arial, sans-serif;
      }
      .head {
        padding: 50px 50px 35px;
      }
      .logo {
        max-width: 250px;
        display: block;
        margin: 0 auto;
      }
      .card {
        max-width: 600px;
        padding: 40px 45px;
        background-color: white;
        border-radius: 15px;
        margin: 0 auto;
        color: #333333;
        font-size: 16px;
      }
      .title {
        color: #af4e8a;
        font-size: 24px;
        font-weight: bold;
        margin: 0;
        text-align: center;
      }
      .subtitle {
        text-align: center;
        margin: 0;
        padding: 25px 0;
      }
      .paragraph {
        line-height: 1.5;
        margin-bottom: 40px;
      }
      .link {
        color:#af4e8a;
        text-decoration:none;
        font-size:13px;
      }
      .footer {
        margin-top: 30px;
        text-align: center;
      }
  </style>
</body>`, CB = `<mjml>
  <mj-body background-color="#E7E7E7">
    <mj-section full-width="full-width" padding="50px 50px 35px 50px">
      <mj-column width="100%">
        <mj-image src="${LE}" width="250px" padding="0px" />
      </mj-column>
    </mj-section>
    <mj-section padding="0px">
      <mj-column background-color="white" border-radius="15px" padding="40px 20px">
        <mj-text color="#af4e8a" font-size="24px" font-weight="bold" align="center">
          Welcome to GrapesJs!
        </mj-text>
        <mj-text font-size="16px" color="#333333" line-height="1.5" align="center" padding="10px 25px 25px 25px">
          You're currently viewing the default fallback project for emails.
        </mj-text>
        <mj-text font-size="16px" color="#333333" line-height="1.5" padding="10px 25px 30px 25px">
          This appears because no storage has been configured yet. To set up your own storage, follow the guide here:
          <br/>
          👉 <a href="${yp}" style="color:#af4e8a;text-decoration:none;font-size:13px;">
            ${yp}
          </a>
        </mj-text>
        <mj-text font-size="16px" color="#333333" line-height="1.5">
          Want to customize the fallback project? You can do so by setting options.project.default. Learn more here:
          <br/>
          👉 <a id="iu9rf-2" href="${bp}" style="color:#af4e8a;text-decoration:none;font-size:13px;">
            ${bp}
          </a>
        </mj-text>
        <mj-text font-size="16px" color="#333333" align="center" padding="30px 25px 10px 25px">Happy building! 🚀
        </mj-text>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>`, Ov = {
            licenseKey: "",
            settingsMenu: {about: !1, embed: !1, openProject: !1, saveProject: !1, loadProject: !1, installApp: !1}
        }, ME = y.forwardRef(function (t, n) {
            var g;
            const {options: r = Ov} = t, o = {theme: r.theme}, i = r.localStorage, l = i ? iS(i, o) : o,
                c = (l == null ? void 0 : l.lastProjectType) || ((g = r.project) == null ? void 0 : g.type) || Xe.web,
                d = wB({projectType: c, project: r.project}), p = {
                    localSettingsStore: {...l, key: i, updateAppShell: r.updateAppShell, rootEl: r.root},
                    appEditorStore: {
                        isDev: Uz,
                        isStage: !!r.stg,
                        licenseKey: r.licenseKey,
                        projectType: c,
                        sdkProps: {...t, options: {...Ov, gjsScript: zz, gjsStyle: Bz, ...r, project: d}}
                    }
                };
            return u.jsx(JD, {initialState: p, children: u.jsx(pI, {ref: n, children: u.jsx(xB, {})})})
        }), EB = e => {
            const t = new Nf({});
            return t.pluginStore.getPluginsToLoad(e, t.appEditorStore)
        }, PB = async e => {
            var v;
            const t = [], {gjsScript: n, project: r} = e, {plugins: o, ...i} = e;
            if (!n || !n.init) throw new Error("The 'gjsScript' option is missing or invalid. Make sure to provide a valid GrapesJS constructor.");
            const l = (r == null ? void 0 : r.type) || Xe.web,
                c = e.projectData || ((v = e.storage) == null ? void 0 : v.project) || (r == null ? void 0 : r.default) || {},
                d = new Nf({}), p = dj(l, i), m = d.pluginStore.getPluginsToLoad(l, d.appEditorStore).filter(b => {
                    if (St(b)) return !0;
                    t.push(b)
                });
            if (t.length) throw new Error(`Headless editor plugins must be functions. Invalid plugins detected: ${JSON.stringify(t)}`);
            return n.init({headless: !0, noticeOnUnload: !1, storageManager: !1, ...p, projectData: c, plugins: m})
        }, MW = "", AW = "", RW = "", _B = ME, kB = e => PB(e), AE = async e => {
            const {root: t} = e, n = zt(t), r = n ? document.querySelector(t) : t;
            if (!r) return console.error(`The 'root' element not found! ${t ? n ? `Looks like you used a selector that doesn't exist: "${t}"` : "" : "Ensure to provide 'root' as an option."}`);
            e.root = r, kg.render(u.jsx(ee.StrictMode, {children: u.jsx(ME, {options: e})}), r)
        };
    At.AssetStorageType = Xd, At.AssetType = Qs, At.BuiltInActionButtons = Wr, At.ComponentContextMenuItem = bs, At.ComponentContextMenuSource = Wd, At.DataComponentTypes = $n, At.GlobalStyleFieldType = Tw, At.IconNames = fe, At.LayoutPlacers = Xi, At.LayoutPosition = Yi, At.ProjectStorageType = Zd, At.ProjectType = Xe, At.StudioCanvasSpotType = pw, At.StudioCommands = _e, At.StudioEditor = _B, At.StudioEvents = Jn, At.ThemeValue = Gr, At.ToastVariant = Nn, At.createEditor = AE, At.createStudioHeadlessEditor = kB, At.default = AE, At.getStudioPlugins = EB, Object.defineProperties(At, {
        __esModule: {value: !0},
        [Symbol.toStringTag]: {value: "Module"}
    })
});