import * as gr from "react"; import Zt, { createContext as On, useContext as bt, useDebugValue as tO, useLayoutEffect as Ff, useEffect as Wt, useMemo as Mr, PureComponent as rO, useState as En, useRef as $e, forwardRef as kg, createElement as si, Fragment as jf, useCallback as Ze, useInsertionEffect as Jb, useId as go, cloneElement as mo, Children as Vf, isValidElement as zf, lazy as Zb, memo as Ig } from "react"; import { unstable_batchedUpdates as nO, createPortal as $b } from "react-dom"; function iO(t, e) { for (var r = 0; r < e.length; r++) { const n = e[r]; if (typeof n != "string" && !Array.isArray(n)) { for (const i in n) if (i !== "default" && !(i in t)) { const a = Object.getOwnPropertyDescriptor(n, i); a && Object.defineProperty(t, i, a.get ? a : { enumerable: !0, get: () => n[i] }); } } } return Object.freeze(Object.defineProperty(t, Symbol.toStringTag, { value: "Module" })); } var Dr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function Qz(t) { return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; } var he = {}, aO = { get exports() { return he; }, set exports(t) { he = t; } }, Jo = {}; /** * @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 Z0; function sO() { if (Z0) return Jo; Z0 = 1; var t = Zt, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 }; function s(u, c, f) { var h, d = {}, g = null, v = null; f !== void 0 && (g = "" + f), c.key !== void 0 && (g = "" + c.key), c.ref !== void 0 && (v = c.ref); for (h in c) n.call(c, h) && !a.hasOwnProperty(h) && (d[h] = c[h]); if (u && u.defaultProps) for (h in c = u.defaultProps, c) d[h] === void 0 && (d[h] = c[h]); return { $$typeof: e, type: u, key: g, ref: v, props: d, _owner: i.current }; } return Jo.Fragment = r, Jo.jsx = s, Jo.jsxs = s, Jo; } var Zo = {}; /** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var $0; function oO() { return $0 || ($0 = 1, process.env.NODE_ENV !== "production" && function() { var t = Zt, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), u = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), m = Symbol.iterator, b = "@@iterator"; function S(L) { if (L === null || typeof L != "object") return null; var oe = m && L[m] || L[b]; return typeof oe == "function" ? oe : null; } var x = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function w(L) { { for (var oe = arguments.length, pe = new Array(oe > 1 ? oe - 1 : 0), Pe = 1; Pe < oe; Pe++) pe[Pe - 1] = arguments[Pe]; _("error", L, pe); } } function _(L, oe, pe) { { var Pe = x.ReactDebugCurrentFrame, Xe = Pe.getStackAddendum(); Xe !== "" && (oe += "%s", pe = pe.concat([Xe])); var Ue = pe.map(function(We) { return String(We); }); Ue.unshift("Warning: " + oe), Function.prototype.apply.call(console[L], console, Ue); } } var P = !1, E = !1, k = !1, D = !1, V = !1, H; H = Symbol.for("react.module.reference"); function W(L) { return !!(typeof L == "string" || typeof L == "function" || L === n || L === a || V || L === i || L === f || L === h || D || L === v || P || E || k || typeof L == "object" && L !== null && (L.$$typeof === g || L.$$typeof === d || L.$$typeof === s || L.$$typeof === u || L.$$typeof === c || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used // with. L.$$typeof === H || L.getModuleId !== void 0)); } function K(L, oe, pe) { var Pe = L.displayName; if (Pe) return Pe; var Xe = oe.displayName || oe.name || ""; return Xe !== "" ? pe + "(" + Xe + ")" : pe; } function ie(L) { return L.displayName || "Context"; } function F(L) { if (L == null) return null; if (typeof L.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof L == "function") return L.displayName || L.name || null; if (typeof L == "string") return L; switch (L) { case n: return "Fragment"; case r: return "Portal"; case a: return "Profiler"; case i: return "StrictMode"; case f: return "Suspense"; case h: return "SuspenseList"; } if (typeof L == "object") switch (L.$$typeof) { case u: var oe = L; return ie(oe) + ".Consumer"; case s: var pe = L; return ie(pe._context) + ".Provider"; case c: return K(L, L.render, "ForwardRef"); case d: var Pe = L.displayName || null; return Pe !== null ? Pe : F(L.type) || "Memo"; case g: { var Xe = L, Ue = Xe._payload, We = Xe._init; try { return F(We(Ue)); } catch { return null; } } } return null; } var O = Object.assign, N = 0, j, J, te, ee, ae, le, Ce; function we() { } we.__reactDisabledLog = !0; function Re() { { if (N === 0) { j = console.log, J = console.info, te = console.warn, ee = console.error, ae = console.group, le = console.groupCollapsed, Ce = console.groupEnd; var L = { configurable: !0, enumerable: !0, value: we, writable: !0 }; Object.defineProperties(console, { info: L, log: L, warn: L, error: L, group: L, groupCollapsed: L, groupEnd: L }); } N++; } } function ke() { { if (N--, N === 0) { var L = { configurable: !0, enumerable: !0, writable: !0 }; Object.defineProperties(console, { log: O({}, L, { value: j }), info: O({}, L, { value: J }), warn: O({}, L, { value: te }), error: O({}, L, { value: ee }), group: O({}, L, { value: ae }), groupCollapsed: O({}, L, { value: le }), groupEnd: O({}, L, { value: Ce }) }); } N < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } var ve = x.ReactCurrentDispatcher, ot; function Fe(L, oe, pe) { { if (ot === void 0) try { throw Error(); } catch (Xe) { var Pe = Xe.stack.trim().match(/\n( *(at )?)/); ot = Pe && Pe[1] || ""; } return ` ` + ot + L; } } var qe = !1, St; { var et = typeof WeakMap == "function" ? WeakMap : Map; St = new et(); } function Z(L, oe) { if (!L || qe) return ""; { var pe = St.get(L); if (pe !== void 0) return pe; } var Pe; qe = !0; var Xe = Error.prepareStackTrace; Error.prepareStackTrace = void 0; var Ue; Ue = ve.current, ve.current = null, Re(); try { if (oe) { var We = function() { throw Error(); }; if (Object.defineProperty(We.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(We, []); } catch (tr) { Pe = tr; } Reflect.construct(L, [], We); } else { try { We.call(); } catch (tr) { Pe = tr; } L.call(We.prototype); } } else { try { throw Error(); } catch (tr) { Pe = tr; } L(); } } catch (tr) { if (tr && Pe && typeof tr.stack == "string") { for (var Ne = tr.stack.split(` `), er = Pe.stack.split(` `), Ot = Ne.length - 1, kt = er.length - 1; Ot >= 1 && kt >= 0 && Ne[Ot] !== er[kt]; ) kt--; for (; Ot >= 1 && kt >= 0; Ot--, kt--) if (Ne[Ot] !== er[kt]) { if (Ot !== 1 || kt !== 1) do if (Ot--, kt--, kt < 0 || Ne[Ot] !== er[kt]) { var br = ` ` + Ne[Ot].replace(" at new ", " at "); return L.displayName && br.includes("") && (br = br.replace("", L.displayName)), typeof L == "function" && St.set(L, br), br; } while (Ot >= 1 && kt >= 0); break; } } } finally { qe = !1, ve.current = Ue, ke(), Error.prepareStackTrace = Xe; } var Pr = L ? L.displayName || L.name : "", ds = Pr ? Fe(Pr) : ""; return typeof L == "function" && St.set(L, ds), ds; } function mt(L, oe, pe) { return Z(L, !1); } function fe(L) { var oe = L.prototype; return !!(oe && oe.isReactComponent); } function xe(L, oe, pe) { if (L == null) return ""; if (typeof L == "function") return Z(L, fe(L)); if (typeof L == "string") return Fe(L); switch (L) { case f: return Fe("Suspense"); case h: return Fe("SuspenseList"); } if (typeof L == "object") switch (L.$$typeof) { case c: return mt(L.render); case d: return xe(L.type, oe, pe); case g: { var Pe = L, Xe = Pe._payload, Ue = Pe._init; try { return xe(Ue(Xe), oe, pe); } catch { } } } return ""; } var ut = Object.prototype.hasOwnProperty, je = {}, jt = x.ReactDebugCurrentFrame; function cr(L) { if (L) { var oe = L._owner, pe = xe(L.type, L._source, oe ? oe.type : null); jt.setExtraStackFrame(pe); } else jt.setExtraStackFrame(null); } function Et(L, oe, pe, Pe, Xe) { { var Ue = Function.call.bind(ut); for (var We in L) if (Ue(L, We)) { var Ne = void 0; try { if (typeof L[We] != "function") { var er = Error((Pe || "React class") + ": " + pe + " type `" + We + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof L[We] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); throw er.name = "Invariant Violation", er; } Ne = L[We](oe, We, Pe, pe, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); } catch (Ot) { Ne = Ot; } Ne && !(Ne instanceof Error) && (cr(Xe), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", Pe || "React class", pe, We, typeof Ne), cr(null)), Ne instanceof Error && !(Ne.message in je) && (je[Ne.message] = !0, cr(Xe), w("Failed %s type: %s", pe, Ne.message), cr(null)); } } } var Tt = Array.isArray; function Ut(L) { return Tt(L); } function At(L) { { var oe = typeof Symbol == "function" && Symbol.toStringTag, pe = oe && L[Symbol.toStringTag] || L.constructor.name || "Object"; return pe; } } function Hr(L) { try { return vr(L), !1; } catch { return !0; } } function vr(L) { return "" + L; } function un(L) { if (Hr(L)) return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", At(L)), vr(L); } var $t = x.ReactCurrentOwner, yr = { key: !0, ref: !0, __self: !0, __source: !0 }, mi, yi, qn; qn = {}; function Wi(L) { if (ut.call(L, "ref")) { var oe = Object.getOwnPropertyDescriptor(L, "ref").get; if (oe && oe.isReactWarning) return !1; } return L.ref !== void 0; } function Ui(L) { if (ut.call(L, "key")) { var oe = Object.getOwnPropertyDescriptor(L, "key").get; if (oe && oe.isReactWarning) return !1; } return L.key !== void 0; } function Pa(L, oe) { if (typeof L.ref == "string" && $t.current && oe && $t.current.stateNode !== oe) { var pe = F($t.current.type); qn[pe] || (w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', F($t.current.type), L.ref), qn[pe] = !0); } } function Ea(L, oe) { { var pe = function() { mi || (mi = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", oe)); }; pe.isReactWarning = !0, Object.defineProperty(L, "key", { get: pe, configurable: !0 }); } } function Yr(L, oe) { { var pe = function() { yi || (yi = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", oe)); }; pe.isReactWarning = !0, Object.defineProperty(L, "ref", { get: pe, configurable: !0 }); } } var Kn = function(L, oe, pe, Pe, Xe, Ue, We) { var Ne = { // This tag allows us to uniquely identify this as a React Element $$typeof: e, // Built-in properties that belong on the element type: L, key: oe, ref: pe, props: We, // Record the component responsible for creating this element. _owner: Ue }; return Ne._store = {}, Object.defineProperty(Ne._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(Ne, "_self", { configurable: !1, enumerable: !1, writable: !1, value: Pe }), Object.defineProperty(Ne, "_source", { configurable: !1, enumerable: !1, writable: !1, value: Xe }), Object.freeze && (Object.freeze(Ne.props), Object.freeze(Ne)), Ne; }; function xo(L, oe, pe, Pe, Xe) { { var Ue, We = {}, Ne = null, er = null; pe !== void 0 && (un(pe), Ne = "" + pe), Ui(oe) && (un(oe.key), Ne = "" + oe.key), Wi(oe) && (er = oe.ref, Pa(oe, Xe)); for (Ue in oe) ut.call(oe, Ue) && !yr.hasOwnProperty(Ue) && (We[Ue] = oe[Ue]); if (L && L.defaultProps) { var Ot = L.defaultProps; for (Ue in Ot) We[Ue] === void 0 && (We[Ue] = Ot[Ue]); } if (Ne || er) { var kt = typeof L == "function" ? L.displayName || L.name || "Unknown" : L; Ne && Ea(We, kt), er && Yr(We, kt); } return Kn(L, Ne, er, Xe, Pe, $t.current, We); } } var Hi = x.ReactCurrentOwner, os = x.ReactDebugCurrentFrame; function ln(L) { if (L) { var oe = L._owner, pe = xe(L.type, L._source, oe ? oe.type : null); os.setExtraStackFrame(pe); } else os.setExtraStackFrame(null); } var cn; cn = !1; function Ta(L) { return typeof L == "object" && L !== null && L.$$typeof === e; } function fn() { { if (Hi.current) { var L = F(Hi.current.type); if (L) return ` Check the render method of \`` + L + "`."; } return ""; } } function Co(L) { { if (L !== void 0) { var oe = L.fileName.replace(/^.*[\\\/]/, ""), pe = L.lineNumber; return ` Check your code at ` + oe + ":" + pe + "."; } return ""; } } var us = {}; function ls(L) { { var oe = fn(); if (!oe) { var pe = typeof L == "string" ? L : L.displayName || L.name; pe && (oe = ` Check the top-level render call using <` + pe + ">."); } return oe; } } function cs(L, oe) { { if (!L._store || L._store.validated || L.key != null) return; L._store.validated = !0; var pe = ls(oe); if (us[pe]) return; us[pe] = !0; var Pe = ""; L && L._owner && L._owner !== Hi.current && (Pe = " It was passed a child from " + F(L._owner.type) + "."), ln(L), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', pe, Pe), ln(null); } } function fs(L, oe) { { if (typeof L != "object") return; if (Ut(L)) for (var pe = 0; pe < L.length; pe++) { var Pe = L[pe]; Ta(Pe) && cs(Pe, oe); } else if (Ta(L)) L._store && (L._store.validated = !0); else if (L) { var Xe = S(L); if (typeof Xe == "function" && Xe !== L.entries) for (var Ue = Xe.call(L), We; !(We = Ue.next()).done; ) Ta(We.value) && cs(We.value, oe); } } } function qr(L) { { var oe = L.type; if (oe == null || typeof oe == "string") return; var pe; if (typeof oe == "function") pe = oe.propTypes; else if (typeof oe == "object" && (oe.$$typeof === c || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. oe.$$typeof === d)) pe = oe.propTypes; else return; if (pe) { var Pe = F(oe); Et(pe, L.props, "prop", Pe, L); } else if (oe.PropTypes !== void 0 && !cn) { cn = !0; var Xe = F(oe); w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Xe || "Unknown"); } typeof oe.getDefaultProps == "function" && !oe.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } function Aa(L) { { for (var oe = Object.keys(L.props), pe = 0; pe < oe.length; pe++) { var Pe = oe[pe]; if (Pe !== "children" && Pe !== "key") { ln(L), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", Pe), ln(null); break; } } L.ref !== null && (ln(L), w("Invalid attribute `ref` supplied to `React.Fragment`."), ln(null)); } } function hs(L, oe, pe, Pe, Xe, Ue) { { var We = W(L); if (!We) { var Ne = ""; (L === void 0 || typeof L == "object" && L !== null && Object.keys(L).length === 0) && (Ne += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); var er = Co(Xe); er ? Ne += er : Ne += fn(); var Ot; L === null ? Ot = "null" : Ut(L) ? Ot = "array" : L !== void 0 && L.$$typeof === e ? (Ot = "<" + (F(L.type) || "Unknown") + " />", Ne = " Did you accidentally export a JSX literal instead of a component?") : Ot = typeof L, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Ot, Ne); } var kt = xo(L, oe, pe, Xe, Ue); if (kt == null) return kt; if (We) { var br = oe.children; if (br !== void 0) if (Pe) if (Ut(br)) { for (var Pr = 0; Pr < br.length; Pr++) fs(br[Pr], L); Object.freeze && Object.freeze(br); } else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); else fs(br, L); } return L === n ? Aa(kt) : qr(kt), kt; } } function Oa(L, oe, pe) { return hs(L, oe, pe, !0); } function _o(L, oe, pe) { return hs(L, oe, pe, !1); } var Po = _o, Xn = Oa; Zo.Fragment = n, Zo.jsx = Po, Zo.jsxs = Xn; }()), Zo; } (function(t) { process.env.NODE_ENV === "production" ? t.exports = sO() : t.exports = oO(); })(aO); var cf = {}, uO = { get exports() { return cf; }, set exports(t) { cf = t; } }, Od = {}; /** * @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 ey; function lO() { if (ey) return Od; ey = 1; var t = Zt; function e(d, g) { return d === g && (d !== 0 || 1 / d === 1 / g) || d !== d && g !== g; } var r = typeof Object.is == "function" ? Object.is : e, n = t.useState, i = t.useEffect, a = t.useLayoutEffect, s = t.useDebugValue; function u(d, g) { var v = g(), m = n({ inst: { value: v, getSnapshot: g } }), b = m[0].inst, S = m[1]; return a(function() { b.value = v, b.getSnapshot = g, c(b) && S({ inst: b }); }, [d, v, g]), i(function() { return c(b) && S({ inst: b }), d(function() { c(b) && S({ inst: b }); }); }, [d]), s(v), v; } function c(d) { var g = d.getSnapshot; d = d.value; try { var v = g(); return !r(d, v); } catch { return !0; } } function f(d, g) { return g(); } var h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? f : u; return Od.useSyncExternalStore = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : h, Od; } var Rd = {}; /** * @license React * use-sync-external-store-shim.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ty; function cO() { return ty || (ty = 1, process.env.NODE_ENV !== "production" && function() { typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); var t = Zt, e = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function r(_) { { for (var P = arguments.length, E = new Array(P > 1 ? P - 1 : 0), k = 1; k < P; k++) E[k - 1] = arguments[k]; n("error", _, E); } } function n(_, P, E) { { var k = e.ReactDebugCurrentFrame, D = k.getStackAddendum(); D !== "" && (P += "%s", E = E.concat([D])); var V = E.map(function(H) { return String(H); }); V.unshift("Warning: " + P), Function.prototype.apply.call(console[_], console, V); } } function i(_, P) { return _ === P && (_ !== 0 || 1 / _ === 1 / P) || _ !== _ && P !== P; } var a = typeof Object.is == "function" ? Object.is : i, s = t.useState, u = t.useEffect, c = t.useLayoutEffect, f = t.useDebugValue, h = !1, d = !1; function g(_, P, E) { h || t.startTransition !== void 0 && (h = !0, r("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.")); var k = P(); if (!d) { var D = P(); a(k, D) || (r("The result of getSnapshot should be cached to avoid an infinite loop"), d = !0); } var V = s({ inst: { value: k, getSnapshot: P } }), H = V[0].inst, W = V[1]; return c(function() { H.value = k, H.getSnapshot = P, v(H) && W({ inst: H }); }, [_, k, P]), u(function() { v(H) && W({ inst: H }); var K = function() { v(H) && W({ inst: H }); }; return _(K); }, [_]), f(k), k; } function v(_) { var P = _.getSnapshot, E = _.value; try { var k = P(); return !a(E, k); } catch { return !0; } } function m(_, P, E) { return P(); } var b = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", S = !b, x = S ? m : g, w = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : x; Rd.useSyncExternalStore = w, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); }()), Rd; } (function(t) { process.env.NODE_ENV === "production" ? t.exports = lO() : t.exports = cO(); })(uO); var bp = {}, fO = { get exports() { return bp; }, set exports(t) { bp = t; } }, kd = {}; /** * @license React * use-sync-external-store-shim/with-selector.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 ry; function hO() { if (ry) return kd; ry = 1; var t = Zt, e = cf; function r(f, h) { return f === h && (f !== 0 || 1 / f === 1 / h) || f !== f && h !== h; } var n = typeof Object.is == "function" ? Object.is : r, i = e.useSyncExternalStore, a = t.useRef, s = t.useEffect, u = t.useMemo, c = t.useDebugValue; return kd.useSyncExternalStoreWithSelector = function(f, h, d, g, v) { var m = a(null); if (m.current === null) { var b = { hasValue: !1, value: null }; m.current = b; } else b = m.current; m = u(function() { function x(k) { if (!w) { if (w = !0, _ = k, k = g(k), v !== void 0 && b.hasValue) { var D = b.value; if (v(D, k)) return P = D; } return P = k; } if (D = P, n(_, k)) return D; var V = g(k); return v !== void 0 && v(D, V) ? D : (_ = k, P = V); } var w = !1, _, P, E = d === void 0 ? null : d; return [function() { return x(h()); }, E === null ? void 0 : function() { return x(E()); }]; }, [h, d, g, v]); var S = i(f, m[0], m[1]); return s(function() { b.hasValue = !0, b.value = S; }, [S]), c(S), S; }, kd; } var Id = {}; /** * @license React * use-sync-external-store-shim/with-selector.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ny; function dO() { return ny || (ny = 1, process.env.NODE_ENV !== "production" && function() { typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); var t = Zt, e = cf; function r(h, d) { return h === d && (h !== 0 || 1 / h === 1 / d) || h !== h && d !== d; } var n = typeof Object.is == "function" ? Object.is : r, i = e.useSyncExternalStore, a = t.useRef, s = t.useEffect, u = t.useMemo, c = t.useDebugValue; function f(h, d, g, v, m) { var b = a(null), S; b.current === null ? (S = { hasValue: !1, value: null }, b.current = S) : S = b.current; var x = u(function() { var E = !1, k, D, V = function(ie) { if (!E) { E = !0, k = ie; var F = v(ie); if (m !== void 0 && S.hasValue) { var O = S.value; if (m(O, F)) return D = O, O; } return D = F, F; } var N = k, j = D; if (n(N, ie)) return j; var J = v(ie); return m !== void 0 && m(j, J) ? j : (k = ie, D = J, J); }, H = g === void 0 ? null : g, W = function() { return V(d()); }, K = H === null ? void 0 : function() { return V(H()); }; return [W, K]; }, [d, g, v, m]), w = x[0], _ = x[1], P = i(h, w, _); return s(function() { S.hasValue = !0, S.value = P; }, [P]), c(P), P; } Id.useSyncExternalStoreWithSelector = f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); }()), Id; } (function(t) { process.env.NODE_ENV === "production" ? t.exports = hO() : t.exports = dO(); })(fO); function pO(t) { t(); } let eS = pO; const gO = (t) => eS = t, mO = () => eS, Fi = /* @__PURE__ */ On(null); process.env.NODE_ENV !== "production" && (Fi.displayName = "ReactRedux"); function tS() { const t = bt(Fi); if (process.env.NODE_ENV !== "production" && !t) throw new Error("could not find react-redux context value; please ensure the component is wrapped in a "); return t; } const vO = () => { throw new Error("uSES not initialized!"); }; let rS = vO; const yO = (t) => { rS = t; }, bO = (t, e) => t === e; function SO(t = Fi) { const e = t === Fi ? tS : () => bt(t); return function(n, i = bO) { if (process.env.NODE_ENV !== "production") { if (!n) throw new Error("You must pass a selector to useSelector"); if (typeof n != "function") throw new Error("You must pass a function as a selector to useSelector"); if (typeof i != "function") throw new Error("You must pass a function as an equality function to useSelector"); } const { store: a, subscription: s, getServerState: u } = e(), c = rS(s.addNestedSub, a.getState, u || a.getState, n, i); return tO(c), c; }; } const wO = /* @__PURE__ */ SO(); function ff() { return ff = Object.assign ? Object.assign.bind() : function(t) { for (var e = 1; e < arguments.length; e++) { var r = arguments[e]; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (t[n] = r[n]); } return t; }, ff.apply(this, arguments); } var Sp = {}, xO = { get exports() { return Sp; }, set exports(t) { Sp = t; } }, ct = {}; /** @license React v16.13.1 * react-is.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 iy; function CO() { if (iy) return ct; iy = 1; var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, n = t ? Symbol.for("react.fragment") : 60107, i = t ? Symbol.for("react.strict_mode") : 60108, a = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, u = t ? Symbol.for("react.context") : 60110, c = t ? Symbol.for("react.async_mode") : 60111, f = t ? Symbol.for("react.concurrent_mode") : 60111, h = t ? Symbol.for("react.forward_ref") : 60112, d = t ? Symbol.for("react.suspense") : 60113, g = t ? Symbol.for("react.suspense_list") : 60120, v = t ? Symbol.for("react.memo") : 60115, m = t ? Symbol.for("react.lazy") : 60116, b = t ? Symbol.for("react.block") : 60121, S = t ? Symbol.for("react.fundamental") : 60117, x = t ? Symbol.for("react.responder") : 60118, w = t ? Symbol.for("react.scope") : 60119; function _(E) { if (typeof E == "object" && E !== null) { var k = E.$$typeof; switch (k) { case e: switch (E = E.type, E) { case c: case f: case n: case a: case i: case d: return E; default: switch (E = E && E.$$typeof, E) { case u: case h: case m: case v: case s: return E; default: return k; } } case r: return k; } } } function P(E) { return _(E) === f; } return ct.AsyncMode = c, ct.ConcurrentMode = f, ct.ContextConsumer = u, ct.ContextProvider = s, ct.Element = e, ct.ForwardRef = h, ct.Fragment = n, ct.Lazy = m, ct.Memo = v, ct.Portal = r, ct.Profiler = a, ct.StrictMode = i, ct.Suspense = d, ct.isAsyncMode = function(E) { return P(E) || _(E) === c; }, ct.isConcurrentMode = P, ct.isContextConsumer = function(E) { return _(E) === u; }, ct.isContextProvider = function(E) { return _(E) === s; }, ct.isElement = function(E) { return typeof E == "object" && E !== null && E.$$typeof === e; }, ct.isForwardRef = function(E) { return _(E) === h; }, ct.isFragment = function(E) { return _(E) === n; }, ct.isLazy = function(E) { return _(E) === m; }, ct.isMemo = function(E) { return _(E) === v; }, ct.isPortal = function(E) { return _(E) === r; }, ct.isProfiler = function(E) { return _(E) === a; }, ct.isStrictMode = function(E) { return _(E) === i; }, ct.isSuspense = function(E) { return _(E) === d; }, ct.isValidElementType = function(E) { return typeof E == "string" || typeof E == "function" || E === n || E === f || E === a || E === i || E === d || E === g || typeof E == "object" && E !== null && (E.$$typeof === m || E.$$typeof === v || E.$$typeof === s || E.$$typeof === u || E.$$typeof === h || E.$$typeof === S || E.$$typeof === x || E.$$typeof === w || E.$$typeof === b); }, ct.typeOf = _, ct; } var ft = {}; /** @license React v16.13.1 * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ay; function _O() { return ay || (ay = 1, process.env.NODE_ENV !== "production" && function() { var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, n = t ? Symbol.for("react.fragment") : 60107, i = t ? Symbol.for("react.strict_mode") : 60108, a = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, u = t ? Symbol.for("react.context") : 60110, c = t ? Symbol.for("react.async_mode") : 60111, f = t ? Symbol.for("react.concurrent_mode") : 60111, h = t ? Symbol.for("react.forward_ref") : 60112, d = t ? Symbol.for("react.suspense") : 60113, g = t ? Symbol.for("react.suspense_list") : 60120, v = t ? Symbol.for("react.memo") : 60115, m = t ? Symbol.for("react.lazy") : 60116, b = t ? Symbol.for("react.block") : 60121, S = t ? Symbol.for("react.fundamental") : 60117, x = t ? Symbol.for("react.responder") : 60118, w = t ? Symbol.for("react.scope") : 60119; function _(Z) { return typeof Z == "string" || typeof Z == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. Z === n || Z === f || Z === a || Z === i || Z === d || Z === g || typeof Z == "object" && Z !== null && (Z.$$typeof === m || Z.$$typeof === v || Z.$$typeof === s || Z.$$typeof === u || Z.$$typeof === h || Z.$$typeof === S || Z.$$typeof === x || Z.$$typeof === w || Z.$$typeof === b); } function P(Z) { if (typeof Z == "object" && Z !== null) { var mt = Z.$$typeof; switch (mt) { case e: var fe = Z.type; switch (fe) { case c: case f: case n: case a: case i: case d: return fe; default: var xe = fe && fe.$$typeof; switch (xe) { case u: case h: case m: case v: case s: return xe; default: return mt; } } case r: return mt; } } } var E = c, k = f, D = u, V = s, H = e, W = h, K = n, ie = m, F = v, O = r, N = a, j = i, J = d, te = !1; function ee(Z) { return te || (te = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), ae(Z) || P(Z) === c; } function ae(Z) { return P(Z) === f; } function le(Z) { return P(Z) === u; } function Ce(Z) { return P(Z) === s; } function we(Z) { return typeof Z == "object" && Z !== null && Z.$$typeof === e; } function Re(Z) { return P(Z) === h; } function ke(Z) { return P(Z) === n; } function ve(Z) { return P(Z) === m; } function ot(Z) { return P(Z) === v; } function Fe(Z) { return P(Z) === r; } function qe(Z) { return P(Z) === a; } function St(Z) { return P(Z) === i; } function et(Z) { return P(Z) === d; } ft.AsyncMode = E, ft.ConcurrentMode = k, ft.ContextConsumer = D, ft.ContextProvider = V, ft.Element = H, ft.ForwardRef = W, ft.Fragment = K, ft.Lazy = ie, ft.Memo = F, ft.Portal = O, ft.Profiler = N, ft.StrictMode = j, ft.Suspense = J, ft.isAsyncMode = ee, ft.isConcurrentMode = ae, ft.isContextConsumer = le, ft.isContextProvider = Ce, ft.isElement = we, ft.isForwardRef = Re, ft.isFragment = ke, ft.isLazy = ve, ft.isMemo = ot, ft.isPortal = Fe, ft.isProfiler = qe, ft.isStrictMode = St, ft.isSuspense = et, ft.isValidElementType = _, ft.typeOf = P; }()), ft; } (function(t) { process.env.NODE_ENV === "production" ? t.exports = CO() : t.exports = _O(); })(xO); var nS = Sp, PO = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, EO = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, iS = {}; iS[nS.ForwardRef] = PO; iS[nS.Memo] = EO; var sy = {}, TO = { get exports() { return sy; }, set exports(t) { sy = t; } }, ht = {}; /** * @license React * react-is.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 oy; function AO() { if (oy) return ht; oy = 1; var t = Symbol.for("react.element"), e = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), s = Symbol.for("react.context"), u = Symbol.for("react.server_context"), c = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), m; m = Symbol.for("react.module.reference"); function b(S) { if (typeof S == "object" && S !== null) { var x = S.$$typeof; switch (x) { case t: switch (S = S.type, S) { case r: case i: case n: case f: case h: return S; default: switch (S = S && S.$$typeof, S) { case u: case s: case c: case g: case d: case a: return S; default: return x; } } case e: return x; } } } return ht.ContextConsumer = s, ht.ContextProvider = a, ht.Element = t, ht.ForwardRef = c, ht.Fragment = r, ht.Lazy = g, ht.Memo = d, ht.Portal = e, ht.Profiler = i, ht.StrictMode = n, ht.Suspense = f, ht.SuspenseList = h, ht.isAsyncMode = function() { return !1; }, ht.isConcurrentMode = function() { return !1; }, ht.isContextConsumer = function(S) { return b(S) === s; }, ht.isContextProvider = function(S) { return b(S) === a; }, ht.isElement = function(S) { return typeof S == "object" && S !== null && S.$$typeof === t; }, ht.isForwardRef = function(S) { return b(S) === c; }, ht.isFragment = function(S) { return b(S) === r; }, ht.isLazy = function(S) { return b(S) === g; }, ht.isMemo = function(S) { return b(S) === d; }, ht.isPortal = function(S) { return b(S) === e; }, ht.isProfiler = function(S) { return b(S) === i; }, ht.isStrictMode = function(S) { return b(S) === n; }, ht.isSuspense = function(S) { return b(S) === f; }, ht.isSuspenseList = function(S) { return b(S) === h; }, ht.isValidElementType = function(S) { return typeof S == "string" || typeof S == "function" || S === r || S === i || S === n || S === f || S === h || S === v || typeof S == "object" && S !== null && (S.$$typeof === g || S.$$typeof === d || S.$$typeof === a || S.$$typeof === s || S.$$typeof === c || S.$$typeof === m || S.getModuleId !== void 0); }, ht.typeOf = b, ht; } var dt = {}; /** * @license React * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var uy; function OO() { return uy || (uy = 1, process.env.NODE_ENV !== "production" && function() { var t = Symbol.for("react.element"), e = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), s = Symbol.for("react.context"), u = Symbol.for("react.server_context"), c = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), m = !1, b = !1, S = !1, x = !1, w = !1, _; _ = Symbol.for("react.module.reference"); function P(fe) { return !!(typeof fe == "string" || typeof fe == "function" || fe === r || fe === i || w || fe === n || fe === f || fe === h || x || fe === v || m || b || S || typeof fe == "object" && fe !== null && (fe.$$typeof === g || fe.$$typeof === d || fe.$$typeof === a || fe.$$typeof === s || fe.$$typeof === c || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used // with. fe.$$typeof === _ || fe.getModuleId !== void 0)); } function E(fe) { if (typeof fe == "object" && fe !== null) { var xe = fe.$$typeof; switch (xe) { case t: var ut = fe.type; switch (ut) { case r: case i: case n: case f: case h: return ut; default: var je = ut && ut.$$typeof; switch (je) { case u: case s: case c: case g: case d: case a: return je; default: return xe; } } case e: return xe; } } } var k = s, D = a, V = t, H = c, W = r, K = g, ie = d, F = e, O = i, N = n, j = f, J = h, te = !1, ee = !1; function ae(fe) { return te || (te = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1; } function le(fe) { return ee || (ee = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1; } function Ce(fe) { return E(fe) === s; } function we(fe) { return E(fe) === a; } function Re(fe) { return typeof fe == "object" && fe !== null && fe.$$typeof === t; } function ke(fe) { return E(fe) === c; } function ve(fe) { return E(fe) === r; } function ot(fe) { return E(fe) === g; } function Fe(fe) { return E(fe) === d; } function qe(fe) { return E(fe) === e; } function St(fe) { return E(fe) === i; } function et(fe) { return E(fe) === n; } function Z(fe) { return E(fe) === f; } function mt(fe) { return E(fe) === h; } dt.ContextConsumer = k, dt.ContextProvider = D, dt.Element = V, dt.ForwardRef = H, dt.Fragment = W, dt.Lazy = K, dt.Memo = ie, dt.Portal = F, dt.Profiler = O, dt.StrictMode = N, dt.Suspense = j, dt.SuspenseList = J, dt.isAsyncMode = ae, dt.isConcurrentMode = le, dt.isContextConsumer = Ce, dt.isContextProvider = we, dt.isElement = Re, dt.isForwardRef = ke, dt.isFragment = ve, dt.isLazy = ot, dt.isMemo = Fe, dt.isPortal = qe, dt.isProfiler = St, dt.isStrictMode = et, dt.isSuspense = Z, dt.isSuspenseList = mt, dt.isValidElementType = P, dt.typeOf = E; }()), dt; } (function(t) { process.env.NODE_ENV === "production" ? t.exports = AO() : t.exports = OO(); })(TO); function RO() { const t = mO(); let e = null, r = null; return { clear() { e = null, r = null; }, notify() { t(() => { let n = e; for (; n; ) n.callback(), n = n.next; }); }, get() { let n = [], i = e; for (; i; ) n.push(i), i = i.next; return n; }, subscribe(n) { let i = !0, a = r = { callback: n, next: null, prev: r }; return a.prev ? a.prev.next = a : e = a, function() { !i || e === null || (i = !1, a.next ? a.next.prev = a.prev : r = a.prev, a.prev ? a.prev.next = a.next : e = a.next); }; } }; } const ly = { notify() { }, get: () => [] }; function kO(t, e) { let r, n = ly; function i(d) { return c(), n.subscribe(d); } function a() { n.notify(); } function s() { h.onStateChange && h.onStateChange(); } function u() { return Boolean(r); } function c() { r || (r = e ? e.addNestedSub(s) : t.subscribe(s), n = RO()); } function f() { r && (r(), r = void 0, n.clear(), n = ly); } const h = { addNestedSub: i, notifyNestedSubs: a, handleChangeWrapper: s, isSubscribed: u, trySubscribe: c, tryUnsubscribe: f, getListeners: () => n }; return h; } const IO = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", DO = IO ? Ff : Wt; function MO({ store: t, context: e, children: r, serverState: n }) { const i = Mr(() => { const u = kO(t); return { store: t, subscription: u, getServerState: n ? () => n : void 0 }; }, [t, n]), a = Mr(() => t.getState(), [t]); DO(() => { const { subscription: u } = i; return u.onStateChange = u.notifyNestedSubs, u.trySubscribe(), a !== t.getState() && u.notifyNestedSubs(), () => { u.tryUnsubscribe(), u.onStateChange = void 0; }; }, [i, a]); const s = e || Fi; return /* @__PURE__ */ Zt.createElement(s.Provider, { value: i }, r); } function aS(t = Fi) { const e = ( // @ts-ignore t === Fi ? tS : () => bt(t) ); return function() { const { store: n } = e(); return n; }; } const LO = /* @__PURE__ */ aS(); function NO(t = Fi) { const e = ( // @ts-ignore t === Fi ? LO : aS(t) ); return function() { return e().dispatch; }; } const BO = /* @__PURE__ */ NO(); yO(bp.useSyncExternalStoreWithSelector); gO(nO); function Uc(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Uc = function(r) { return typeof r; } : Uc = function(r) { return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r; }, Uc(t); } function FO(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function cy(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n); } } function jO(t, e, r) { return e && cy(t.prototype, e), r && cy(t, r), t; } function VO(t, e) { return e && (Uc(e) === "object" || typeof e == "function") ? e : Hc(t); } function wp(t) { return wp = Object.setPrototypeOf ? Object.getPrototypeOf : function(r) { return r.__proto__ || Object.getPrototypeOf(r); }, wp(t); } function Hc(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function zO(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), e && xp(t, e); } function xp(t, e) { return xp = Object.setPrototypeOf || function(n, i) { return n.__proto__ = i, n; }, xp(t, e); } function Yc(t, e, r) { return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t; } var sS = /* @__PURE__ */ function(t) { zO(e, t); function e() { var r, n; FO(this, e); for (var i = arguments.length, a = new Array(i), s = 0; s < i; s++) a[s] = arguments[s]; return n = VO(this, (r = wp(e)).call.apply(r, [this].concat(a))), Yc(Hc(n), "state", { bootstrapped: !1 }), Yc(Hc(n), "_unsubscribe", void 0), Yc(Hc(n), "handlePersistorState", function() { var u = n.props.persistor, c = u.getState(), f = c.bootstrapped; f && (n.props.onBeforeLift ? Promise.resolve(n.props.onBeforeLift()).finally(function() { return n.setState({ bootstrapped: !0 }); }) : n.setState({ bootstrapped: !0 }), n._unsubscribe && n._unsubscribe()); }), n; } return jO(e, [{ key: "componentDidMount", value: function() { this._unsubscribe = this.props.persistor.subscribe(this.handlePersistorState), this.handlePersistorState(); } }, { key: "componentWillUnmount", value: function() { this._unsubscribe && this._unsubscribe(); } }, { key: "render", value: function() { return process.env.NODE_ENV !== "production" && typeof this.props.children == "function" && this.props.loading && console.error("redux-persist: PersistGate expects either a function child or loading prop, but not both. The loading prop will be ignored."), typeof this.props.children == "function" ? this.props.children(this.state.bootstrapped) : this.state.bootstrapped ? this.props.children : this.props.loading; } }]), e; }(rO); Yc(sS, "defaultProps", { children: null, loading: null }); function lr(t) { for (var e = arguments.length, r = Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++) r[n - 1] = arguments[n]; if (process.env.NODE_ENV !== "production") { var i = QO[t], a = i ? typeof i == "function" ? i.apply(null, r) : i : "unknown error nr: " + t; throw Error("[Immer] " + a); } throw Error("[Immer] minified error nr: " + t + (r.length ? " " + r.map(function(s) { return "'" + s + "'"; }).join(",") : "") + ". Find the full error at: https://bit.ly/3cXEKWf"); } function pa(t) { return !!t && !!t[Dt]; } function ji(t) { var e; return !!t && (function(r) { if (!r || typeof r != "object") return !1; var n = Object.getPrototypeOf(r); if (n === null) return !0; var i = Object.hasOwnProperty.call(n, "constructor") && n.constructor; return i === Object || typeof i == "function" && Function.toString.call(i) === JO; }(t) || Array.isArray(t) || !!t[vy] || !!(!((e = t.constructor) === null || e === void 0) && e[vy]) || Dg(t) || Mg(t)); } function Qa(t, e, r) { r === void 0 && (r = !1), vo(t) === 0 ? (r ? Object.keys : $s)(t).forEach(function(n) { r && typeof n == "symbol" || e(n, t[n], t); }) : t.forEach(function(n, i) { return e(i, n, t); }); } function vo(t) { var e = t[Dt]; return e ? e.i > 3 ? e.i - 4 : e.i : Array.isArray(t) ? 1 : Dg(t) ? 2 : Mg(t) ? 3 : 0; } function Zs(t, e) { return vo(t) === 2 ? t.has(e) : Object.prototype.hasOwnProperty.call(t, e); } function GO(t, e) { return vo(t) === 2 ? t.get(e) : t[e]; } function oS(t, e, r) { var n = vo(t); n === 2 ? t.set(e, r) : n === 3 ? t.add(r) : t[e] = r; } function uS(t, e) { return t === e ? t !== 0 || 1 / t == 1 / e : t != t && e != e; } function Dg(t) { return KO && t instanceof Map; } function Mg(t) { return XO && t instanceof Set; } function aa(t) { return t.o || t.t; } function Lg(t) { if (Array.isArray(t)) return Array.prototype.slice.call(t); var e = cS(t); delete e[Dt]; for (var r = $s(e), n = 0; n < r.length; n++) { var i = r[n], a = e[i]; a.writable === !1 && (a.writable = !0, a.configurable = !0), (a.get || a.set) && (e[i] = { configurable: !0, writable: !0, enumerable: a.enumerable, value: t[i] }); } return Object.create(Object.getPrototypeOf(t), e); } function Ng(t, e) { return e === void 0 && (e = !1), Bg(t) || pa(t) || !ji(t) || (vo(t) > 1 && (t.set = t.add = t.clear = t.delete = WO), Object.freeze(t), e && Qa(t, function(r, n) { return Ng(n, !0); }, !0)), t; } function WO() { lr(2); } function Bg(t) { return t == null || typeof t != "object" || Object.isFrozen(t); } function oi(t) { var e = Ep[t]; return e || lr(18, t), e; } function UO(t, e) { Ep[t] || (Ep[t] = e); } function Cp() { return process.env.NODE_ENV === "production" || io || lr(0), io; } function Dd(t, e) { e && (oi("Patches"), t.u = [], t.s = [], t.v = e); } function hf(t) { _p(t), t.p.forEach(HO), t.p = null; } function _p(t) { t === io && (io = t.l); } function fy(t) { return io = { p: [], l: io, h: t, m: !0, _: 0 }; } function HO(t) { var e = t[Dt]; e.i === 0 || e.i === 1 ? e.j() : e.O = !0; } function Md(t, e) { e._ = e.p.length; var r = e.p[0], n = t !== void 0 && t !== r; return e.h.g || oi("ES5").S(e, t, n), n ? (r[Dt].P && (hf(e), lr(4)), ji(t) && (t = df(e, t), e.l || pf(e, t)), e.u && oi("Patches").M(r[Dt].t, t, e.u, e.s)) : t = df(e, r, []), hf(e), e.u && e.v(e.u, e.s), t !== lS ? t : void 0; } function df(t, e, r) { if (Bg(e)) return e; var n = e[Dt]; if (!n) return Qa(e, function(u, c) { return hy(t, n, e, u, c, r); }, !0), e; if (n.A !== t) return e; if (!n.P) return pf(t, n.t, !0), n.t; if (!n.I) { n.I = !0, n.A._--; var i = n.i === 4 || n.i === 5 ? n.o = Lg(n.k) : n.o, a = i, s = !1; n.i === 3 && (a = new Set(i), i.clear(), s = !0), Qa(a, function(u, c) { return hy(t, n, i, u, c, r, s); }), pf(t, i, !1), r && t.u && oi("Patches").N(n, r, t.u, t.s); } return n.o; } function hy(t, e, r, n, i, a, s) { if (process.env.NODE_ENV !== "production" && i === r && lr(5), pa(i)) { var u = df(t, i, a && e && e.i !== 3 && !Zs(e.R, n) ? a.concat(n) : void 0); if (oS(r, n, u), !pa(u)) return; t.m = !1; } else s && r.add(i); if (ji(i) && !Bg(i)) { if (!t.h.D && t._ < 1) return; df(t, i), e && e.A.l || pf(t, i); } } function pf(t, e, r) { r === void 0 && (r = !1), !t.l && t.h.D && t.m && Ng(e, r); } function Ld(t, e) { var r = t[Dt]; return (r ? aa(r) : t)[e]; } function dy(t, e) { if (e in t) for (var r = Object.getPrototypeOf(t); r; ) { var n = Object.getOwnPropertyDescriptor(r, e); if (n) return n; r = Object.getPrototypeOf(r); } } function oa(t) { t.P || (t.P = !0, t.l && oa(t.l)); } function Nd(t) { t.o || (t.o = Lg(t.t)); } function Pp(t, e, r) { var n = Dg(e) ? oi("MapSet").F(e, r) : Mg(e) ? oi("MapSet").T(e, r) : t.g ? function(i, a) { var s = Array.isArray(i), u = { i: s ? 1 : 0, A: a ? a.A : Cp(), P: !1, I: !1, R: {}, l: a, t: i, k: null, o: null, j: null, C: !1 }, c = u, f = Bu; s && (c = [u], f = pu); var h = Proxy.revocable(c, f), d = h.revoke, g = h.proxy; return u.k = g, u.j = d, g; }(e, r) : oi("ES5").J(e, r); return (r ? r.A : Cp()).p.push(n), n; } function YO(t) { return pa(t) || lr(22, t), function e(r) { if (!ji(r)) return r; var n, i = r[Dt], a = vo(r); if (i) { if (!i.P && (i.i < 4 || !oi("ES5").K(i))) return i.t; i.I = !0, n = py(r, a), i.I = !1; } else n = py(r, a); return Qa(n, function(s, u) { i && GO(i.t, s) === u || oS(n, s, e(u)); }), a === 3 ? new Set(n) : n; }(t); } function py(t, e) { switch (e) { case 2: return new Map(t); case 3: return Array.from(t); } return Lg(t); } function qO() { function t(s, u) { var c = a[s]; return c ? c.enumerable = u : a[s] = c = { configurable: !0, enumerable: u, get: function() { var f = this[Dt]; return process.env.NODE_ENV !== "production" && i(f), Bu.get(f, s); }, set: function(f) { var h = this[Dt]; process.env.NODE_ENV !== "production" && i(h), Bu.set(h, s, f); } }, c; } function e(s) { for (var u = s.length - 1; u >= 0; u--) { var c = s[u][Dt]; if (!c.P) switch (c.i) { case 5: n(c) && oa(c); break; case 4: r(c) && oa(c); } } } function r(s) { for (var u = s.t, c = s.k, f = $s(c), h = f.length - 1; h >= 0; h--) { var d = f[h]; if (d !== Dt) { var g = u[d]; if (g === void 0 && !Zs(u, d)) return !0; var v = c[d], m = v && v[Dt]; if (m ? m.t !== g : !uS(v, g)) return !0; } } var b = !!u[Dt]; return f.length !== $s(u).length + (b ? 0 : 1); } function n(s) { var u = s.k; if (u.length !== s.t.length) return !0; var c = Object.getOwnPropertyDescriptor(u, u.length - 1); if (c && !c.get) return !0; for (var f = 0; f < u.length; f++) if (!u.hasOwnProperty(f)) return !0; return !1; } function i(s) { s.O && lr(3, JSON.stringify(aa(s))); } var a = {}; UO("ES5", { J: function(s, u) { var c = Array.isArray(s), f = function(d, g) { if (d) { for (var v = Array(g.length), m = 0; m < g.length; m++) Object.defineProperty(v, "" + m, t(m, !0)); return v; } var b = cS(g); delete b[Dt]; for (var S = $s(b), x = 0; x < S.length; x++) { var w = S[x]; b[w] = t(w, d || !!b[w].enumerable); } return Object.create(Object.getPrototypeOf(g), b); }(c, s), h = { i: c ? 5 : 4, A: u ? u.A : Cp(), P: !1, I: !1, R: {}, l: u, t: s, k: f, o: null, O: !1, C: !1 }; return Object.defineProperty(f, Dt, { value: h, writable: !0 }), f; }, S: function(s, u, c) { c ? pa(u) && u[Dt].A === s && e(s.p) : (s.u && function f(h) { if (h && typeof h == "object") { var d = h[Dt]; if (d) { var g = d.t, v = d.k, m = d.R, b = d.i; if (b === 4) Qa(v, function(P) { P !== Dt && (g[P] !== void 0 || Zs(g, P) ? m[P] || f(v[P]) : (m[P] = !0, oa(d))); }), Qa(g, function(P) { v[P] !== void 0 || Zs(v, P) || (m[P] = !1, oa(d)); }); else if (b === 5) { if (n(d) && (oa(d), m.length = !0), v.length < g.length) for (var S = v.length; S < g.length; S++) m[S] = !1; else for (var x = g.length; x < v.length; x++) m[x] = !0; for (var w = Math.min(v.length, g.length), _ = 0; _ < w; _++) v.hasOwnProperty(_) || (m[_] = !0), m[_] === void 0 && f(v[_]); } } } }(s.p[0]), e(s.p)); }, K: function(s) { return s.i === 4 ? r(s) : n(s); } }); } var gy, io, Fg = typeof Symbol < "u" && typeof Symbol("x") == "symbol", KO = typeof Map < "u", XO = typeof Set < "u", my = typeof Proxy < "u" && Proxy.revocable !== void 0 && typeof Reflect < "u", lS = Fg ? Symbol.for("immer-nothing") : ((gy = {})["immer-nothing"] = !0, gy), vy = Fg ? Symbol.for("immer-draftable") : "__$immer_draftable", Dt = Fg ? Symbol.for("immer-state") : "__$immer_state", QO = { 0: "Illegal state", 1: "Immer drafts cannot have computed properties", 2: "This object has been frozen and should not be mutated", 3: function(t) { return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + t; }, 4: "An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.", 5: "Immer forbids circular references", 6: "The first or second argument to `produce` must be a function", 7: "The third argument to `produce` must be a function or undefined", 8: "First argument to `createDraft` must be a plain object, an array, or an immerable object", 9: "First argument to `finishDraft` must be a draft returned by `createDraft`", 10: "The given draft is already finalized", 11: "Object.defineProperty() cannot be used on an Immer draft", 12: "Object.setPrototypeOf() cannot be used on an Immer draft", 13: "Immer only supports deleting array indices", 14: "Immer only supports setting array indices and the 'length' property", 15: function(t) { return "Cannot apply patch, path doesn't resolve: " + t; }, 16: 'Sets cannot have "replace" patches.', 17: function(t) { return "Unsupported patch operation: " + t; }, 18: function(t) { return "The plugin for '" + t + "' has not been loaded into Immer. To enable the plugin, import and call `enable" + t + "()` when initializing your application."; }, 20: "Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available", 21: function(t) { return "produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '" + t + "'"; }, 22: function(t) { return "'current' expects a draft, got: " + t; }, 23: function(t) { return "'original' expects a draft, got: " + t; }, 24: "Patching reserved attributes like __proto__, prototype and constructor is not allowed" }, JO = "" + Object.prototype.constructor, $s = typeof Reflect < "u" && Reflect.ownKeys ? Reflect.ownKeys : Object.getOwnPropertySymbols !== void 0 ? function(t) { return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)); } : Object.getOwnPropertyNames, cS = Object.getOwnPropertyDescriptors || function(t) { var e = {}; return $s(t).forEach(function(r) { e[r] = Object.getOwnPropertyDescriptor(t, r); }), e; }, Ep = {}, Bu = { get: function(t, e) { if (e === Dt) return t; var r = aa(t); if (!Zs(r, e)) return function(i, a, s) { var u, c = dy(a, s); return c ? "value" in c ? c.value : (u = c.get) === null || u === void 0 ? void 0 : u.call(i.k) : void 0; }(t, r, e); var n = r[e]; return t.I || !ji(n) ? n : n === Ld(t.t, e) ? (Nd(t), t.o[e] = Pp(t.A.h, n, t)) : n; }, has: function(t, e) { return e in aa(t); }, ownKeys: function(t) { return Reflect.ownKeys(aa(t)); }, set: function(t, e, r) { var n = dy(aa(t), e); if (n != null && n.set) return n.set.call(t.k, r), !0; if (!t.P) { var i = Ld(aa(t), e), a = i == null ? void 0 : i[Dt]; if (a && a.t === r) return t.o[e] = r, t.R[e] = !1, !0; if (uS(r, i) && (r !== void 0 || Zs(t.t, e))) return !0; Nd(t), oa(t); } return t.o[e] === r && (r !== void 0 || e in t.o) || Number.isNaN(r) && Number.isNaN(t.o[e]) || (t.o[e] = r, t.R[e] = !0), !0; }, deleteProperty: function(t, e) { return Ld(t.t, e) !== void 0 || e in t.t ? (t.R[e] = !1, Nd(t), oa(t)) : delete t.R[e], t.o && delete t.o[e], !0; }, getOwnPropertyDescriptor: function(t, e) { var r = aa(t), n = Reflect.getOwnPropertyDescriptor(r, e); return n && { writable: !0, configurable: t.i !== 1 || e !== "length", enumerable: n.enumerable, value: r[e] }; }, defineProperty: function() { lr(11); }, getPrototypeOf: function(t) { return Object.getPrototypeOf(t.t); }, setPrototypeOf: function() { lr(12); } }, pu = {}; Qa(Bu, function(t, e) { pu[t] = function() { return arguments[0] = arguments[0][0], e.apply(this, arguments); }; }), pu.deleteProperty = function(t, e) { return process.env.NODE_ENV !== "production" && isNaN(parseInt(e)) && lr(13), pu.set.call(this, t, e, void 0); }, pu.set = function(t, e, r) { return process.env.NODE_ENV !== "production" && e !== "length" && isNaN(parseInt(e)) && lr(14), Bu.set.call(this, t[0], e, r, t[0]); }; var ZO = function() { function t(r) { var n = this; this.g = my, this.D = !0, this.produce = function(i, a, s) { if (typeof i == "function" && typeof a != "function") { var u = a; a = i; var c = n; return function(b) { var S = this; b === void 0 && (b = u); for (var x = arguments.length, w = Array(x > 1 ? x - 1 : 0), _ = 1; _ < x; _++) w[_ - 1] = arguments[_]; return c.produce(b, function(P) { var E; return (E = a).call.apply(E, [S, P].concat(w)); }); }; } var f; if (typeof a != "function" && lr(6), s !== void 0 && typeof s != "function" && lr(7), ji(i)) { var h = fy(n), d = Pp(n, i, void 0), g = !0; try { f = a(d), g = !1; } finally { g ? hf(h) : _p(h); } return typeof Promise < "u" && f instanceof Promise ? f.then(function(b) { return Dd(h, s), Md(b, h); }, function(b) { throw hf(h), b; }) : (Dd(h, s), Md(f, h)); } if (!i || typeof i != "object") { if ((f = a(i)) === void 0 && (f = i), f === lS && (f = void 0), n.D && Ng(f, !0), s) { var v = [], m = []; oi("Patches").M(i, f, v, m), s(v, m); } return f; } lr(21, i); }, this.produceWithPatches = function(i, a) { if (typeof i == "function") return function(f) { for (var h = arguments.length, d = Array(h > 1 ? h - 1 : 0), g = 1; g < h; g++) d[g - 1] = arguments[g]; return n.produceWithPatches(f, function(v) { return i.apply(void 0, [v].concat(d)); }); }; var s, u, c = n.produce(i, a, function(f, h) { s = f, u = h; }); return typeof Promise < "u" && c instanceof Promise ? c.then(function(f) { return [f, s, u]; }) : [c, s, u]; }, typeof (r == null ? void 0 : r.useProxies) == "boolean" && this.setUseProxies(r.useProxies), typeof (r == null ? void 0 : r.autoFreeze) == "boolean" && this.setAutoFreeze(r.autoFreeze); } var e = t.prototype; return e.createDraft = function(r) { ji(r) || lr(8), pa(r) && (r = YO(r)); var n = fy(this), i = Pp(this, r, void 0); return i[Dt].C = !0, _p(n), i; }, e.finishDraft = function(r, n) { var i = r && r[Dt]; process.env.NODE_ENV !== "production" && (i && i.C || lr(9), i.I && lr(10)); var a = i.A; return Dd(a, n), Md(void 0, a); }, e.setAutoFreeze = function(r) { this.D = r; }, e.setUseProxies = function(r) { r && !my && lr(20), this.g = r; }, e.applyPatches = function(r, n) { var i; for (i = n.length - 1; i >= 0; i--) { var a = n[i]; if (a.path.length === 0 && a.op === "replace") { r = a.value; break; } } i > -1 && (n = n.slice(i + 1)); var s = oi("Patches").$; return pa(r) ? s(r, n) : this.produce(r, function(u) { return s(u, n); }); }, t; }(), sn = new ZO(), fS = sn.produce; sn.produceWithPatches.bind(sn); sn.setAutoFreeze.bind(sn); sn.setUseProxies.bind(sn); sn.applyPatches.bind(sn); sn.createDraft.bind(sn); sn.finishDraft.bind(sn); function Cn(t) { return Cn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Cn(t); } function $O(t, e) { if (Cn(t) !== "object" || t === null) return t; var r = t[Symbol.toPrimitive]; if (r !== void 0) { var n = r.call(t, e || "default"); if (Cn(n) !== "object") return n; throw new TypeError("@@toPrimitive must return a primitive value."); } return (e === "string" ? String : Number)(t); } function hS(t) { var e = $O(t, "string"); return Cn(e) === "symbol" ? e : String(e); } function Hn(t, e, r) { return e = hS(e), e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t; } function yy(t, e) { var r = Object.keys(t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(t); e && (n = n.filter(function(i) { return Object.getOwnPropertyDescriptor(t, i).enumerable; })), r.push.apply(r, n); } return r; } function by(t) { for (var e = 1; e < arguments.length; e++) { var r = arguments[e] != null ? arguments[e] : {}; e % 2 ? yy(Object(r), !0).forEach(function(n) { Hn(t, n, r[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : yy(Object(r)).forEach(function(n) { Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n)); }); } return t; } function Cr(t) { return "Minified Redux error #" + t + "; visit https://redux.js.org/Errors?code=" + t + " for the full message or use the non-minified dev environment for full errors. "; } var Sy = function() { return typeof Symbol == "function" && Symbol.observable || "@@observable"; }(), Bd = function() { return Math.random().toString(36).substring(7).split("").join("."); }, Ka = { INIT: "@@redux/INIT" + Bd(), REPLACE: "@@redux/REPLACE" + Bd(), PROBE_UNKNOWN_ACTION: function() { return "@@redux/PROBE_UNKNOWN_ACTION" + Bd(); } }; function dS(t) { if (typeof t != "object" || t === null) return !1; for (var e = t; Object.getPrototypeOf(e) !== null; ) e = Object.getPrototypeOf(e); return Object.getPrototypeOf(t) === e; } function e5(t) { if (t === void 0) return "undefined"; if (t === null) return "null"; var e = typeof t; switch (e) { case "boolean": case "string": case "number": case "symbol": case "function": return e; } if (Array.isArray(t)) return "array"; if (n5(t)) return "date"; if (r5(t)) return "error"; var r = t5(t); switch (r) { case "Symbol": case "Promise": case "WeakMap": case "WeakSet": case "Map": case "Set": return r; } return e.slice(8, -1).toLowerCase().replace(/\s/g, ""); } function t5(t) { return typeof t.constructor == "function" ? t.constructor.name : null; } function r5(t) { return t instanceof Error || typeof t.message == "string" && t.constructor && typeof t.constructor.stackTraceLimit == "number"; } function n5(t) { return t instanceof Date ? !0 : typeof t.toDateString == "function" && typeof t.getDate == "function" && typeof t.setDate == "function"; } function Wa(t) { var e = typeof t; return process.env.NODE_ENV !== "production" && (e = e5(t)), e; } function jg(t, e, r) { var n; if (typeof e == "function" && typeof r == "function" || typeof r == "function" && typeof arguments[3] == "function") throw new Error(process.env.NODE_ENV === "production" ? Cr(0) : "It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example."); if (typeof e == "function" && typeof r > "u" && (r = e, e = void 0), typeof r < "u") { if (typeof r != "function") throw new Error(process.env.NODE_ENV === "production" ? Cr(1) : "Expected the enhancer to be a function. Instead, received: '" + Wa(r) + "'"); return r(jg)(t, e); } if (typeof t != "function") throw new Error(process.env.NODE_ENV === "production" ? Cr(2) : "Expected the root reducer to be a function. Instead, received: '" + Wa(t) + "'"); var i = t, a = e, s = [], u = s, c = !1; function f() { u === s && (u = s.slice()); } function h() { if (c) throw new Error(process.env.NODE_ENV === "production" ? Cr(3) : "You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store."); return a; } function d(b) { if (typeof b != "function") throw new Error(process.env.NODE_ENV === "production" ? Cr(4) : "Expected the listener to be a function. Instead, received: '" + Wa(b) + "'"); if (c) throw new Error(process.env.NODE_ENV === "production" ? Cr(5) : "You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details."); var S = !0; return f(), u.push(b), function() { if (S) { if (c) throw new Error(process.env.NODE_ENV === "production" ? Cr(6) : "You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details."); S = !1, f(); var w = u.indexOf(b); u.splice(w, 1), s = null; } }; } function g(b) { if (!dS(b)) throw new Error(process.env.NODE_ENV === "production" ? Cr(7) : "Actions must be plain objects. Instead, the actual type was: '" + Wa(b) + "'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples."); if (typeof b.type > "u") throw new Error(process.env.NODE_ENV === "production" ? Cr(8) : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.'); if (c) throw new Error(process.env.NODE_ENV === "production" ? Cr(9) : "Reducers may not dispatch actions."); try { c = !0, a = i(a, b); } finally { c = !1; } for (var S = s = u, x = 0; x < S.length; x++) { var w = S[x]; w(); } return b; } function v(b) { if (typeof b != "function") throw new Error(process.env.NODE_ENV === "production" ? Cr(10) : "Expected the nextReducer to be a function. Instead, received: '" + Wa(b)); i = b, g({ type: Ka.REPLACE }); } function m() { var b, S = d; return b = { /** * The minimal observable subscription method. * @param {Object} observer Any object that can be used as an observer. * The observer object should have a `next` method. * @returns {subscription} An object with an `unsubscribe` method that can * be used to unsubscribe the observable from the store, and prevent further * emission of values from the observable. */ subscribe: function(w) { if (typeof w != "object" || w === null) throw new Error(process.env.NODE_ENV === "production" ? Cr(11) : "Expected the observer to be an object. Instead, received: '" + Wa(w) + "'"); function _() { w.next && w.next(h()); } _(); var P = S(_); return { unsubscribe: P }; } }, b[Sy] = function() { return this; }, b; } return g({ type: Ka.INIT }), n = { dispatch: g, subscribe: d, getState: h, replaceReducer: v }, n[Sy] = m, n; } function wy(t) { typeof console < "u" && typeof console.error == "function" && console.error(t); try { throw new Error(t); } catch { } } function i5(t, e, r, n) { var i = Object.keys(e), a = r && r.type === Ka.INIT ? "preloadedState argument passed to createStore" : "previous state received by the reducer"; if (i.length === 0) return "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers."; if (!dS(t)) return "The " + a + ' has unexpected type of "' + Wa(t) + '". Expected argument to be an object with the following ' + ('keys: "' + i.join('", "') + '"'); var s = Object.keys(t).filter(function(u) { return !e.hasOwnProperty(u) && !n[u]; }); if (s.forEach(function(u) { n[u] = !0; }), !(r && r.type === Ka.REPLACE) && s.length > 0) return "Unexpected " + (s.length > 1 ? "keys" : "key") + " " + ('"' + s.join('", "') + '" found in ' + a + ". ") + "Expected to find one of the known reducer keys instead: " + ('"' + i.join('", "') + '". Unexpected keys will be ignored.'); } function a5(t) { Object.keys(t).forEach(function(e) { var r = t[e], n = r(void 0, { type: Ka.INIT }); if (typeof n > "u") throw new Error(process.env.NODE_ENV === "production" ? Cr(12) : 'The slice reducer for key "' + e + `" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`); if (typeof r(void 0, { type: Ka.PROBE_UNKNOWN_ACTION() }) > "u") throw new Error(process.env.NODE_ENV === "production" ? Cr(13) : 'The slice reducer for key "' + e + '" returned undefined when probed with a random type. ' + ("Don't try to handle '" + Ka.INIT + `' or other actions in "redux/*" `) + "namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null."); }); } function pS(t) { for (var e = Object.keys(t), r = {}, n = 0; n < e.length; n++) { var i = e[n]; process.env.NODE_ENV !== "production" && typeof t[i] > "u" && wy('No reducer provided for key "' + i + '"'), typeof t[i] == "function" && (r[i] = t[i]); } var a = Object.keys(r), s; process.env.NODE_ENV !== "production" && (s = {}); var u; try { a5(r); } catch (c) { u = c; } return function(f, h) { if (f === void 0 && (f = {}), u) throw u; if (process.env.NODE_ENV !== "production") { var d = i5(f, r, h, s); d && wy(d); } for (var g = !1, v = {}, m = 0; m < a.length; m++) { var b = a[m], S = r[b], x = f[b], w = S(x, h); if (typeof w > "u") { var _ = h && h.type; throw new Error(process.env.NODE_ENV === "production" ? Cr(14) : "When called with an action of type " + (_ ? '"' + String(_) + '"' : "(unknown type)") + ', the slice reducer for key "' + b + '" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'); } v[b] = w, g = g || w !== x; } return g = g || a.length !== Object.keys(f).length, g ? v : f; }; } function gf() { for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++) e[r] = arguments[r]; return e.length === 0 ? function(n) { return n; } : e.length === 1 ? e[0] : e.reduce(function(n, i) { return function() { return n(i.apply(void 0, arguments)); }; }); } function s5() { for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++) e[r] = arguments[r]; return function(n) { return function() { var i = n.apply(void 0, arguments), a = function() { throw new Error(process.env.NODE_ENV === "production" ? Cr(15) : "Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch."); }, s = { getState: i.getState, dispatch: function() { return a.apply(void 0, arguments); } }, u = e.map(function(c) { return c(s); }); return a = gf.apply(void 0, u)(i.dispatch), by(by({}, i), {}, { dispatch: a }); }; }; } function gS(t) { var e = function(n) { var i = n.dispatch, a = n.getState; return function(s) { return function(u) { return typeof u == "function" ? u(i, a, t) : s(u); }; }; }; return e; } var mS = gS(); mS.withExtraArgument = gS; const xy = mS; var o5 = globalThis && globalThis.__extends || function() { var t = function(e, r) { return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, t(e, r); }; return function(e, r) { if (typeof r != "function" && r !== null) throw new TypeError("Class extends value " + String(r) + " is not a constructor or null"); t(e, r); function n() { this.constructor = e; } e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype, new n()); }; }(), u5 = globalThis && globalThis.__generator || function(t, e) { var r = { label: 0, sent: function() { if (a[0] & 1) throw a[1]; return a[1]; }, trys: [], ops: [] }, n, i, a, s; return s = { next: u(0), throw: u(1), return: u(2) }, typeof Symbol == "function" && (s[Symbol.iterator] = function() { return this; }), s; function u(f) { return function(h) { return c([f, h]); }; } function c(f) { if (n) throw new TypeError("Generator is already executing."); for (; r; ) try { if (n = 1, i && (a = f[0] & 2 ? i.return : f[0] ? i.throw || ((a = i.return) && a.call(i), 0) : i.next) && !(a = a.call(i, f[1])).done) return a; switch (i = 0, a && (f = [f[0] & 2, a.value]), f[0]) { case 0: case 1: a = f; break; case 4: return r.label++, { value: f[1], done: !1 }; case 5: r.label++, i = f[1], f = [0]; continue; case 7: f = r.ops.pop(), r.trys.pop(); continue; default: if (a = r.trys, !(a = a.length > 0 && a[a.length - 1]) && (f[0] === 6 || f[0] === 2)) { r = 0; continue; } if (f[0] === 3 && (!a || f[1] > a[0] && f[1] < a[3])) { r.label = f[1]; break; } if (f[0] === 6 && r.label < a[1]) { r.label = a[1], a = f; break; } if (a && r.label < a[2]) { r.label = a[2], r.ops.push(f); break; } a[2] && r.ops.pop(), r.trys.pop(); continue; } f = e.call(t, r); } catch (h) { f = [6, h], i = 0; } finally { n = a = 0; } if (f[0] & 5) throw f[1]; return { value: f[0] ? f[1] : void 0, done: !0 }; } }, mf = globalThis && globalThis.__spreadArray || function(t, e) { for (var r = 0, n = e.length, i = t.length; r < n; r++, i++) t[i] = e[r]; return t; }, l5 = Object.defineProperty, c5 = Object.defineProperties, f5 = Object.getOwnPropertyDescriptors, Cy = Object.getOwnPropertySymbols, h5 = Object.prototype.hasOwnProperty, d5 = Object.prototype.propertyIsEnumerable, _y = function(t, e, r) { return e in t ? l5(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r; }, ca = function(t, e) { for (var r in e || (e = {})) h5.call(e, r) && _y(t, r, e[r]); if (Cy) for (var n = 0, i = Cy(e); n < i.length; n++) { var r = i[n]; d5.call(e, r) && _y(t, r, e[r]); } return t; }, Fd = function(t, e) { return c5(t, f5(e)); }, p5 = function(t, e, r) { return new Promise(function(n, i) { var a = function(c) { try { u(r.next(c)); } catch (f) { i(f); } }, s = function(c) { try { u(r.throw(c)); } catch (f) { i(f); } }, u = function(c) { return c.done ? n(c.value) : Promise.resolve(c.value).then(a, s); }; u((r = r.apply(t, e)).next()); }); }, g5 = typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function() { if (arguments.length !== 0) return typeof arguments[0] == "object" ? gf : gf.apply(null, arguments); }; function vS(t) { if (typeof t != "object" || t === null) return !1; var e = Object.getPrototypeOf(t); if (e === null) return !0; for (var r = e; Object.getPrototypeOf(r) !== null; ) r = Object.getPrototypeOf(r); return e === r; } function yS(t, e) { var r = 0; return { measureTime: function(n) { var i = Date.now(); try { return n(); } finally { var a = Date.now(); r += a - i; } }, warnIfExceeded: function() { r > t && console.warn(e + " took " + r + "ms, which is more than the warning threshold of " + t + `ms. If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions. It is disabled in production builds, so you don't need to worry about that.`); } }; } var m5 = ( /** @class */ function(t) { o5(e, t); function e() { for (var r = [], n = 0; n < arguments.length; n++) r[n] = arguments[n]; var i = t.apply(this, r) || this; return Object.setPrototypeOf(i, e.prototype), i; } return Object.defineProperty(e, Symbol.species, { get: function() { return e; }, enumerable: !1, configurable: !0 }), e.prototype.concat = function() { for (var r = [], n = 0; n < arguments.length; n++) r[n] = arguments[n]; return t.prototype.concat.apply(this, r); }, e.prototype.prepend = function() { for (var r = [], n = 0; n < arguments.length; n++) r[n] = arguments[n]; return r.length === 1 && Array.isArray(r[0]) ? new (e.bind.apply(e, mf([void 0], r[0].concat(this))))() : new (e.bind.apply(e, mf([void 0], r.concat(this))))(); }, e; }(Array) ); function Tp(t) { return ji(t) ? fS(t, function() { }) : t; } var v5 = process.env.NODE_ENV === "production", Py = "Invariant failed"; function Ey(t, e) { if (!t) throw v5 ? new Error(Py) : new Error(Py + ": " + (e || "")); } function y5(t, e, r, n) { return JSON.stringify(t, b5(e, n), r); } function b5(t, e) { var r = [], n = []; return e || (e = function(i, a) { return r[0] === a ? "[Circular ~]" : "[Circular ~." + n.slice(0, r.indexOf(a)).join(".") + "]"; }), function(i, a) { if (r.length > 0) { var s = r.indexOf(this); ~s ? r.splice(s + 1) : r.push(this), ~s ? n.splice(s, 1 / 0, i) : n.push(i), ~r.indexOf(a) && (a = e.call(this, i, a)); } else r.push(a); return t == null ? a : t.call(this, i, a); }; } function S5(t) { return typeof t != "object" || t == null || Object.isFrozen(t); } function w5(t, e, r) { var n = bS(t, e, r); return { detectMutations: function() { return SS(t, e, n, r); } }; } function bS(t, e, r, n) { e === void 0 && (e = []), n === void 0 && (n = ""); var i = { value: r }; if (!t(r)) { i.children = {}; for (var a in r) { var s = n ? n + "." + a : a; e.length && e.indexOf(s) !== -1 || (i.children[a] = bS(t, e, r[a], s)); } } return i; } function SS(t, e, r, n, i, a) { e === void 0 && (e = []), i === void 0 && (i = !1), a === void 0 && (a = ""); var s = r ? r.value : void 0, u = s === n; if (i && !u && !Number.isNaN(n)) return { wasMutated: !0, path: a }; if (t(s) || t(n)) return { wasMutated: !1 }; var c = {}; for (var f in r.children) c[f] = !0; for (var f in n) c[f] = !0; var h = e.length > 0, d = function(v) { var m = a ? a + "." + v : v; if (h) { var b = e.some(function(x) { return x instanceof RegExp ? x.test(m) : m === x; }); if (b) return "continue"; } var S = SS(t, e, r.children[v], n[v], u, m); if (S.wasMutated) return { value: S }; }; for (var f in c) { var g = d(f); if (typeof g == "object") return g.value; } return { wasMutated: !1 }; } function x5(t) { if (t === void 0 && (t = {}), process.env.NODE_ENV === "production") return function() { return function(c) { return function(f) { return c(f); }; }; }; var e = t.isImmutable, r = e === void 0 ? S5 : e, n = t.ignoredPaths, i = t.warnAfter, a = i === void 0 ? 32 : i, s = t.ignore; n = n || s; var u = w5.bind(null, r, n); return function(c) { var f = c.getState, h = f(), d = u(h), g; return function(v) { return function(m) { var b = yS(a, "ImmutableStateInvariantMiddleware"); b.measureTime(function() { h = f(), g = d.detectMutations(), d = u(h), Ey(!g.wasMutated, "A state mutation was detected between dispatches, in the path '" + (g.path || "") + "'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)"); }); var S = v(m); return b.measureTime(function() { h = f(), g = d.detectMutations(), d = u(h), g.wasMutated && Ey(!g.wasMutated, "A state mutation was detected inside a dispatch, in the path: " + (g.path || "") + ". Take a look at the reducer(s) handling the action " + y5(m) + ". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)"); }), b.warnIfExceeded(), S; }; }; }; } function wS(t) { var e = typeof t; return t == null || e === "string" || e === "boolean" || e === "number" || Array.isArray(t) || vS(t); } function Ap(t, e, r, n, i, a) { e === void 0 && (e = ""), r === void 0 && (r = wS), i === void 0 && (i = []); var s; if (!r(t)) return { keyPath: e || "", value: t }; if (typeof t != "object" || t === null || a != null && a.has(t)) return !1; for (var u = n != null ? n(t) : Object.entries(t), c = i.length > 0, f = function(S, x) { var w = e ? e + "." + S : S; if (c) { var _ = i.some(function(P) { return P instanceof RegExp ? P.test(w) : w === P; }); if (_) return "continue"; } if (!r(x)) return { value: { keyPath: w, value: x } }; if (typeof x == "object" && (s = Ap(x, w, r, n, i, a), s)) return { value: s }; }, h = 0, d = u; h < d.length; h++) { var g = d[h], v = g[0], m = g[1], b = f(v, m); if (typeof b == "object") return b.value; } return a && xS(t) && a.add(t), !1; } function xS(t) { if (!Object.isFrozen(t)) return !1; for (var e = 0, r = Object.values(t); e < r.length; e++) { var n = r[e]; if (!(typeof n != "object" || n === null) && !xS(n)) return !1; } return !0; } function C5(t) { if (t === void 0 && (t = {}), process.env.NODE_ENV === "production") return function() { return function(_) { return function(P) { return _(P); }; }; }; var e = t.isSerializable, r = e === void 0 ? wS : e, n = t.getEntries, i = t.ignoredActions, a = i === void 0 ? [] : i, s = t.ignoredActionPaths, u = s === void 0 ? ["meta.arg", "meta.baseQueryMeta"] : s, c = t.ignoredPaths, f = c === void 0 ? [] : c, h = t.warnAfter, d = h === void 0 ? 32 : h, g = t.ignoreState, v = g === void 0 ? !1 : g, m = t.ignoreActions, b = m === void 0 ? !1 : m, S = t.disableCache, x = S === void 0 ? !1 : S, w = !x && WeakSet ? /* @__PURE__ */ new WeakSet() : void 0; return function(_) { return function(P) { return function(E) { var k = P(E), D = yS(d, "SerializableStateInvariantMiddleware"); return !b && !(a.length && a.indexOf(E.type) !== -1) && D.measureTime(function() { var V = Ap(E, "", r, n, u, w); if (V) { var H = V.keyPath, W = V.value; console.error("A non-serializable value was detected in an action, in the path: `" + H + "`. Value:", W, ` Take a look at the logic that dispatched this action: `, E, ` (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`, ` (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`); } }), v || (D.measureTime(function() { var V = _.getState(), H = Ap(V, "", r, n, f, w); if (H) { var W = H.keyPath, K = H.value; console.error("A non-serializable value was detected in the state, in the path: `" + W + "`. Value:", K, ` Take a look at the reducer(s) handling this action type: ` + E.type + `. (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`); } }), D.warnIfExceeded()), k; }; }; }; } function jd(t) { return typeof t == "boolean"; } function _5() { return function(e) { return P5(e); }; } function P5(t) { t === void 0 && (t = {}); var e = t.thunk, r = e === void 0 ? !0 : e, n = t.immutableCheck, i = n === void 0 ? !0 : n, a = t.serializableCheck, s = a === void 0 ? !0 : a, u = new m5(); if (r && (jd(r) ? u.push(xy) : u.push(xy.withExtraArgument(r.extraArgument))), process.env.NODE_ENV !== "production") { if (i) { var c = {}; jd(i) || (c = i), u.unshift(x5(c)); } if (s) { var f = {}; jd(s) || (f = s), u.push(C5(f)); } } return u; } var Vd = process.env.NODE_ENV === "production"; function E5(t) { var e = _5(), r = t || {}, n = r.reducer, i = n === void 0 ? void 0 : n, a = r.middleware, s = a === void 0 ? e() : a, u = r.devTools, c = u === void 0 ? !0 : u, f = r.preloadedState, h = f === void 0 ? void 0 : f, d = r.enhancers, g = d === void 0 ? void 0 : d, v; if (typeof i == "function") v = i; else if (vS(i)) v = pS(i); else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers'); var m = s; if (typeof m == "function" && (m = m(e), !Vd && !Array.isArray(m))) throw new Error("when using a middleware builder function, an array of middleware must be returned"); if (!Vd && m.some(function(_) { return typeof _ != "function"; })) throw new Error("each middleware provided to configureStore must be a function"); var b = s5.apply(void 0, m), S = gf; c && (S = g5(ca({ trace: !Vd }, typeof c == "object" && c))); var x = [b]; Array.isArray(g) ? x = mf([b], g) : typeof g == "function" && (x = g(x)); var w = S.apply(void 0, x); return jg(v, h, w); } function Mt(t, e) { function r() { for (var n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i]; if (e) { var a = e.apply(void 0, n); if (!a) throw new Error("prepareAction did not return an object"); return ca(ca({ type: t, payload: a.payload }, "meta" in a && { meta: a.meta }), "error" in a && { error: a.error }); } return { type: t, payload: n[0] }; } return r.toString = function() { return "" + t; }, r.type = t, r.match = function(n) { return n.type === t; }, r; } function CS(t) { var e = {}, r = [], n, i = { addCase: function(a, s) { if (process.env.NODE_ENV !== "production") { if (r.length > 0) throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`"); if (n) throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`"); } var u = typeof a == "string" ? a : a.type; if (u in e) throw new Error("addCase cannot be called with two reducers for the same action type"); return e[u] = s, i; }, addMatcher: function(a, s) { if (process.env.NODE_ENV !== "production" && n) throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`"); return r.push({ matcher: a, reducer: s }), i; }, addDefaultCase: function(a) { if (process.env.NODE_ENV !== "production" && n) throw new Error("`builder.addDefaultCase` can only be called once"); return n = a, i; } }; return t(i), [e, r, n]; } function T5(t) { return typeof t == "function"; } var Ty = !1; function A5(t, e, r, n) { r === void 0 && (r = []), process.env.NODE_ENV !== "production" && typeof e == "object" && (Ty || (Ty = !0, console.warn("The object notation for `createReducer` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer"))); var i = typeof e == "function" ? CS(e) : [e, r, n], a = i[0], s = i[1], u = i[2], c; if (T5(t)) c = function() { return Tp(t()); }; else { var f = Tp(t); c = function() { return f; }; } function h(d, g) { d === void 0 && (d = c()); var v = mf([ a[g.type] ], s.filter(function(m) { var b = m.matcher; return b(g); }).map(function(m) { var b = m.reducer; return b; })); return v.filter(function(m) { return !!m; }).length === 0 && (v = [u]), v.reduce(function(m, b) { if (b) if (pa(m)) { var S = m, x = b(S, g); return x === void 0 ? m : x; } else { if (ji(m)) return fS(m, function(w) { return b(w, g); }); var x = b(m, g); if (x === void 0) { if (m === null) return m; throw Error("A case reducer on a non-draftable value must not return undefined"); } return x; } return m; }, d); } return h.getInitialState = c, h; } var Ay = !1; function O5(t, e) { return t + "/" + e; } function $a(t) { var e = t.name; if (!e) throw new Error("`name` is a required option for createSlice"); typeof process < "u" && process.env.NODE_ENV === "development" && t.initialState === void 0 && console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`"); var r = typeof t.initialState == "function" ? t.initialState : Tp(t.initialState), n = t.reducers || {}, i = Object.keys(n), a = {}, s = {}, u = {}; i.forEach(function(h) { var d = n[h], g = O5(e, h), v, m; "reducer" in d ? (v = d.reducer, m = d.prepare) : v = d, a[h] = v, s[g] = v, u[h] = m ? Mt(g, m) : Mt(g); }); function c() { process.env.NODE_ENV !== "production" && typeof t.extraReducers == "object" && (Ay || (Ay = !0, console.warn("The object notation for `createSlice.extraReducers` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice"))); var h = typeof t.extraReducers == "function" ? CS(t.extraReducers) : [t.extraReducers], d = h[0], g = d === void 0 ? {} : d, v = h[1], m = v === void 0 ? [] : v, b = h[2], S = b === void 0 ? void 0 : b, x = ca(ca({}, g), s); return A5(r, function(w) { for (var _ in x) w.addCase(_, x[_]); for (var P = 0, E = m; P < E.length; P++) { var k = E[P]; w.addMatcher(k.matcher, k.reducer); } S && w.addDefaultCase(S); }); } var f; return { name: e, reducer: function(h, d) { return f || (f = c()), f(h, d); }, actions: u, caseReducers: a, getInitialState: function() { return f || (f = c()), f.getInitialState(); } }; } var R5 = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW", k5 = function(t) { t === void 0 && (t = 21); for (var e = "", r = t; r--; ) e += R5[Math.random() * 64 | 0]; return e; }, I5 = [ "name", "message", "stack", "code" ], zd = ( /** @class */ function() { function t(e, r) { this.payload = e, this.meta = r; } return t; }() ), Oy = ( /** @class */ function() { function t(e, r) { this.payload = e, this.meta = r; } return t; }() ), D5 = function(t) { if (typeof t == "object" && t !== null) { for (var e = {}, r = 0, n = I5; r < n.length; r++) { var i = n[r]; typeof t[i] == "string" && (e[i] = t[i]); } return e; } return { message: String(t) }; }; (function() { function t(e, r, n) { var i = Mt(e + "/fulfilled", function(h, d, g, v) { return { payload: h, meta: Fd(ca({}, v || {}), { arg: g, requestId: d, requestStatus: "fulfilled" }) }; }), a = Mt(e + "/pending", function(h, d, g) { return { payload: void 0, meta: Fd(ca({}, g || {}), { arg: d, requestId: h, requestStatus: "pending" }) }; }), s = Mt(e + "/rejected", function(h, d, g, v, m) { return { payload: v, error: (n && n.serializeError || D5)(h || "Rejected"), meta: Fd(ca({}, m || {}), { arg: g, requestId: d, rejectedWithValue: !!v, requestStatus: "rejected", aborted: (h == null ? void 0 : h.name) === "AbortError", condition: (h == null ? void 0 : h.name) === "ConditionError" }) }; }), u = !1, c = typeof AbortController < "u" ? AbortController : ( /** @class */ function() { function h() { this.signal = { aborted: !1, addEventListener: function() { }, dispatchEvent: function() { return !1; }, onabort: function() { }, removeEventListener: function() { }, reason: void 0, throwIfAborted: function() { } }; } return h.prototype.abort = function() { process.env.NODE_ENV !== "production" && (u || (u = !0, console.info("This platform does not implement AbortController. \nIf you want to use the AbortController to react to `abort` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'."))); }, h; }() ); function f(h) { return function(d, g, v) { var m = n != null && n.idGenerator ? n.idGenerator(h) : k5(), b = new c(), S; function x(_) { S = _, b.abort(); } var w = function() { return p5(this, null, function() { var _, P, E, k, D, V, H; return u5(this, function(W) { switch (W.label) { case 0: return W.trys.push([0, 4, , 5]), k = (_ = n == null ? void 0 : n.condition) == null ? void 0 : _.call(n, h, { getState: g, extra: v }), L5(k) ? [4, k] : [3, 2]; case 1: k = W.sent(), W.label = 2; case 2: if (k === !1 || b.signal.aborted) throw { name: "ConditionError", message: "Aborted due to condition callback returning false." }; return D = new Promise(function(K, ie) { return b.signal.addEventListener("abort", function() { return ie({ name: "AbortError", message: S || "Aborted" }); }); }), d(a(m, h, (P = n == null ? void 0 : n.getPendingMeta) == null ? void 0 : P.call(n, { requestId: m, arg: h }, { getState: g, extra: v }))), [4, Promise.race([ D, Promise.resolve(r(h, { dispatch: d, getState: g, extra: v, requestId: m, signal: b.signal, abort: x, rejectWithValue: function(K, ie) { return new zd(K, ie); }, fulfillWithValue: function(K, ie) { return new Oy(K, ie); } })).then(function(K) { if (K instanceof zd) throw K; return K instanceof Oy ? i(K.payload, m, h, K.meta) : i(K, m, h); }) ])]; case 3: return E = W.sent(), [3, 5]; case 4: return V = W.sent(), E = V instanceof zd ? s(null, m, h, V.payload, V.meta) : s(V, m, h), [3, 5]; case 5: return H = n && !n.dispatchConditionRejection && s.match(E) && E.meta.condition, H || d(E), [2, E]; } }); }); }(); return Object.assign(w, { abort: x, requestId: m, arg: h, unwrap: function() { return w.then(M5); } }); }; } return Object.assign(f, { pending: a, rejected: s, fulfilled: i, typePrefix: e }); } return t.withTypes = function() { return t; }, t; })(); function M5(t) { if (t.meta && t.meta.rejectedWithValue) throw t.payload; if (t.error) throw t.error; return t.payload; } function L5(t) { return t !== null && typeof t == "object" && typeof t.then == "function"; } var Vg = "listenerMiddleware"; Mt(Vg + "/add"); Mt(Vg + "/removeAll"); Mt(Vg + "/remove"); var Ry; typeof queueMicrotask == "function" && queueMicrotask.bind(typeof window < "u" ? window : typeof global < "u" ? global : globalThis); qO(); var zg = "persist:", _S = "persist/FLUSH", Gg = "persist/REHYDRATE", PS = "persist/PAUSE", ES = "persist/PERSIST", TS = "persist/PURGE", AS = "persist/REGISTER", N5 = -1; function Cu(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Cu = function(r) { return typeof r; } : Cu = function(r) { return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r; }, Cu(t); } function ky(t, e) { var r = Object.keys(t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(t); e && (n = n.filter(function(i) { return Object.getOwnPropertyDescriptor(t, i).enumerable; })), r.push.apply(r, n); } return r; } function B5(t) { for (var e = 1; e < arguments.length; e++) { var r = arguments[e] != null ? arguments[e] : {}; e % 2 ? ky(r, !0).forEach(function(n) { F5(t, n, r[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : ky(r).forEach(function(n) { Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n)); }); } return t; } function F5(t, e, r) { return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t; } function j5(t, e, r, n) { var i = n.debug, a = B5({}, r); return t && Cu(t) === "object" && Object.keys(t).forEach(function(s) { if (s !== "_persist") { if (e[s] !== r[s]) { process.env.NODE_ENV !== "production" && i && console.log("redux-persist/stateReconciler: sub state for key `%s` modified, skipping.", s); return; } a[s] = t[s]; } }), process.env.NODE_ENV !== "production" && i && t && Cu(t) === "object" && console.log("redux-persist/stateReconciler: rehydrated keys '".concat(Object.keys(t).join(", "), "'")), a; } function V5(t) { var e = t.blacklist || null, r = t.whitelist || null, n = t.transforms || [], i = t.throttle || 0, a = t.debounce || 0, s = "".concat(t.keyPrefix !== void 0 ? t.keyPrefix : zg).concat(t.key), u = t.storage, c; t.serialize === !1 ? c = function(D) { return D; } : typeof t.serialize == "function" ? c = t.serialize : c = z5; var f = t.writeFailHandler || null, h = {}, d = {}, g = [], v = null, m = null; let b = 0; function S(k) { clearTimeout(b), b = setTimeout(() => { Object.keys(k).forEach(function(D) { _(D) && h[D] !== k[D] && g.indexOf(D) === -1 && g.push(D); }), Object.keys(h).forEach(function(D) { k[D] === void 0 && _(D) && g.indexOf(D) === -1 && h[D] !== void 0 && g.push(D); }), v === null && (v = setInterval(x, i)), h = k; }, a); } function x() { if (g.length === 0) { v && clearInterval(v), v = null; return; } var k = g.shift(), D = n.reduce(function(V, H) { return H.in(V, k, h); }, h[k]); if (D !== void 0) try { d[k] = c(D); } catch (V) { console.error("redux-persist/createPersistoid: error serializing state", V); } else delete d[k]; g.length === 0 && w(); } function w() { Object.keys(d).forEach(function(k) { h[k] === void 0 && delete d[k]; }), m = u.setItem(s, c(d)).catch(P); } function _(k) { return !(r && r.indexOf(k) === -1 && k !== "_persist" || e && e.indexOf(k) !== -1); } function P(k) { f && f(k), k && process.env.NODE_ENV !== "production" && console.error("Error storing data", k); } var E = function() { for (; g.length !== 0; ) x(); return m || Promise.resolve(); }; return { update: S, flush: E }; } function z5(t) { return JSON.stringify(t); } function G5(t) { var e = t.transforms || [], r = "".concat(t.keyPrefix !== void 0 ? t.keyPrefix : zg).concat(t.key), n = t.storage, i = t.debug, a; return t.deserialize === !1 ? a = function(u) { return u; } : typeof t.deserialize == "function" ? a = t.deserialize : a = W5, n.getItem(r).then(function(s) { if (s) try { var u = {}, c = a(s); return Object.keys(c).forEach(function(f) { u[f] = e.reduceRight(function(h, d) { return d.out(h, f, c); }, a(c[f])); }), u; } catch (f) { throw process.env.NODE_ENV !== "production" && i && console.log("redux-persist/getStoredState: Error restoring data ".concat(s), f), f; } else return; }); } function W5(t) { return JSON.parse(t); } function U5(t) { var e = t.storage, r = "".concat(t.keyPrefix !== void 0 ? t.keyPrefix : zg).concat(t.key); return e.removeItem(r, H5); } function H5(t) { t && process.env.NODE_ENV !== "production" && console.error("redux-persist/purgeStoredState: Error purging data stored state", t); } function Iy(t, e) { var r = Object.keys(t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(t); e && (n = n.filter(function(i) { return Object.getOwnPropertyDescriptor(t, i).enumerable; })), r.push.apply(r, n); } return r; } function Oi(t) { for (var e = 1; e < arguments.length; e++) { var r = arguments[e] != null ? arguments[e] : {}; e % 2 ? Iy(r, !0).forEach(function(n) { Y5(t, n, r[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Iy(r).forEach(function(n) { Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n)); }); } return t; } function Y5(t, e, r) { return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t; } function q5(t, e) { if (t == null) return {}; var r = K5(t, e), n, i; if (Object.getOwnPropertySymbols) { var a = Object.getOwnPropertySymbols(t); for (i = 0; i < a.length; i++) n = a[i], !(e.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(t, n) && (r[n] = t[n]); } return r; } function K5(t, e) { if (t == null) return {}; var r = {}, n = Object.keys(t), i, a; for (a = 0; a < n.length; a++) i = n[a], !(e.indexOf(i) >= 0) && (r[i] = t[i]); return r; } var X5 = 5e3; function Q5(t, e) { if (process.env.NODE_ENV !== "production") { if (!t) throw new Error("config is required for persistReducer"); if (!t.key) throw new Error("key is required in persistor config"); if (!t.storage) throw new Error("redux-persist: config.storage is required. Try using one of the provided storage engines `import storage from 'redux-persist/lib/storage'`"); } var r = t.version !== void 0 ? t.version : N5; t.debug; var n = t.stateReconciler === void 0 ? j5 : t.stateReconciler, i = t.getStoredState || G5, a = t.timeout !== void 0 ? t.timeout : X5, s = null, u = !1, c = !0, f = function(d) { return d._persist.rehydrated && s && !c && s.update(d), d; }; return function(h, d) { var g = h || {}, v = g._persist, m = q5(g, ["_persist"]), b = m; if (d.type === ES) { var S = !1, x = function(V, H) { process.env.NODE_ENV !== "production" && S && console.error('redux-persist: rehydrate for "'.concat(t.key, '" called after timeout.'), V, H), S || (d.rehydrate(t.key, V, H), S = !0); }; if (a && setTimeout(function() { !S && x(void 0, new Error('redux-persist: persist timed out for persist key "'.concat(t.key, '"'))); }, a), c = !1, s || (s = V5(t)), v) return Oi({}, e(b, d), { _persist: v }); if (typeof d.rehydrate != "function" || typeof d.register != "function") throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution."); return d.register(t.key), i(t).then(function(D) { var V = t.migrate || function(H, W) { return Promise.resolve(H); }; V(D, r).then(function(H) { x(H); }, function(H) { process.env.NODE_ENV !== "production" && H && console.error("redux-persist: migration error", H), x(void 0, H); }); }, function(D) { x(void 0, D); }), Oi({}, e(b, d), { _persist: { version: r, rehydrated: !1 } }); } else { if (d.type === TS) return u = !0, d.result(U5(t)), Oi({}, e(b, d), { _persist: v }); if (d.type === _S) return d.result(s && s.flush()), Oi({}, e(b, d), { _persist: v }); if (d.type === PS) c = !0; else if (d.type === Gg) { if (u) return Oi({}, b, { _persist: Oi({}, v, { rehydrated: !0 }) // @NOTE if key does not match, will continue to default else below }); if (d.key === t.key) { var w = e(b, d), _ = d.payload, P = n !== !1 && _ !== void 0 ? n(_, h, w, t) : w, E = Oi({}, P, { _persist: Oi({}, v, { rehydrated: !0 }) }); return f(E); } } } if (!v) return e(h, d); var k = e(b, d); return k === b ? h : f(Oi({}, k, { _persist: v })); }; } function Dy(t) { return $5(t) || Z5(t) || J5(); } function J5() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function Z5(t) { if (Symbol.iterator in Object(t) || Object.prototype.toString.call(t) === "[object Arguments]") return Array.from(t); } function $5(t) { if (Array.isArray(t)) { for (var e = 0, r = new Array(t.length); e < t.length; e++) r[e] = t[e]; return r; } } function My(t, e) { var r = Object.keys(t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(t); e && (n = n.filter(function(i) { return Object.getOwnPropertyDescriptor(t, i).enumerable; })), r.push.apply(r, n); } return r; } function Op(t) { for (var e = 1; e < arguments.length; e++) { var r = arguments[e] != null ? arguments[e] : {}; e % 2 ? My(r, !0).forEach(function(n) { e6(t, n, r[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : My(r).forEach(function(n) { Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n)); }); } return t; } function e6(t, e, r) { return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t; } var OS = { registry: [], bootstrapped: !1 }, t6 = function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : OS, r = arguments.length > 1 ? arguments[1] : void 0; switch (r.type) { case AS: return Op({}, e, { registry: [].concat(Dy(e.registry), [r.key]) }); case Gg: var n = e.registry.indexOf(r.key), i = Dy(e.registry); return i.splice(n, 1), Op({}, e, { registry: i, bootstrapped: i.length === 0 }); default: return e; } }; function r6(t, e, r) { if (process.env.NODE_ENV !== "production") { var n = e || {}, i = ["blacklist", "whitelist", "transforms", "storage", "keyPrefix", "migrate"]; i.forEach(function(h) { n[h] && console.error('redux-persist: invalid option passed to persistStore: "'.concat(h, '". You may be incorrectly passing persistConfig into persistStore, whereas it should be passed into persistReducer.')); }); } var a = r || !1, s = jg(t6, OS, e && e.enhancer ? e.enhancer : void 0), u = function(d) { s.dispatch({ type: AS, key: d }); }, c = function(d, g, v) { var m = { type: Gg, payload: g, err: v, key: d // dispatch to `store` to rehydrate and `persistor` to track result }; t.dispatch(m), s.dispatch(m), a && f.getState().bootstrapped && (a(), a = !1); }, f = Op({}, s, { purge: function() { var d = []; return t.dispatch({ type: TS, result: function(v) { d.push(v); } }), Promise.all(d); }, flush: function() { var d = []; return t.dispatch({ type: _S, result: function(v) { d.push(v); } }), Promise.all(d); }, pause: function() { t.dispatch({ type: PS }); }, persist: function() { t.dispatch({ type: ES, register: u, rehydrate: c }); } }); return e && e.manualPersist || f.persist(), f; } var Wg = {}, Ug = {}; Ug.__esModule = !0; Ug.default = a6; function qc(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? qc = function(r) { return typeof r; } : qc = function(r) { return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r; }, qc(t); } function Gd() { } var n6 = { getItem: Gd, setItem: Gd, removeItem: Gd }; function i6(t) { if ((typeof self > "u" ? "undefined" : qc(self)) !== "object" || !(t in self)) return !1; try { var e = self[t], r = "redux-persist ".concat(t, " test"); e.setItem(r, "test"), e.getItem(r), e.removeItem(r); } catch { return process.env.NODE_ENV !== "production" && console.warn("redux-persist ".concat(t, " test failed, persistence will be disabled.")), !1; } return !0; } function a6(t) { var e = "".concat(t, "Storage"); return i6(e) ? self[e] : (process.env.NODE_ENV !== "production" && console.error("redux-persist failed to create sync storage. falling back to noop storage."), n6); } Wg.__esModule = !0; Wg.default = u6; var s6 = o6(Ug); function o6(t) { return t && t.__esModule ? t : { default: t }; } function u6(t) { var e = (0, s6.default)(t); return { getItem: function(n) { return new Promise(function(i, a) { i(e.getItem(n)); }); }, setItem: function(n, i) { return new Promise(function(a, s) { a(e.setItem(n, i)); }); }, removeItem: function(n) { return new Promise(function(i, a) { i(e.removeItem(n)); }); } }; } var RS = void 0, l6 = c6(Wg); function c6(t) { return t && t.__esModule ? t : { default: t }; } var f6 = (0, l6.default)("local"); RS = f6; var kS = {}, IS = {}, Ja = {}; Object.defineProperty(Ja, "__esModule", { value: !0 }); Ja.PLACEHOLDER_UNDEFINED = Ja.PACKAGE_NAME = void 0; Ja.PACKAGE_NAME = "redux-deep-persist"; Ja.PLACEHOLDER_UNDEFINED = "@@placeholder/undefined"; var Hg = {}; (function(t) { Object.defineProperty(t, "__esModule", { value: !0 }), t.ConfigType = void 0, function(e) { e[e.WHITELIST = 0] = "WHITELIST", e[e.BLACKLIST = 1] = "BLACKLIST"; }(t.ConfigType || (t.ConfigType = {})); })(Hg); (function(t) { Object.defineProperty(t, "__esModule", { value: !0 }), t.getRootKeysGroup = t.throwError = t.configValidator = t.transformsValidator = t.singleTransformValidator = t.findDuplicatesAndSubsets = t.unique = t.preserveUndefined = t.mergeDeep = t.dissocPath = t.assocPath = t.path = t.difference = t.cloneDeep = t._cloneDeep = t.getCircularPath = t.isEmpty = t.isDate = t.isString = t.isIntegerString = t.isPlainObject = t.isArray = t.isLength = t.isObjectLike = void 0; const e = Ja, r = Hg, n = function(F) { return typeof F == "object" && F !== null; }; t.isObjectLike = n; const i = function(F) { return typeof F == "number" && F > -1 && F % 1 == 0 && F <= Number.MAX_SAFE_INTEGER; }; t.isLength = i, t.isArray = Array.isArray || function(F) { return (0, t.isLength)(F && F.length) && Object.prototype.toString.call(F) === "[object Array]"; }; const a = function(F) { return !!F && typeof F == "object" && !(0, t.isArray)(F); }; t.isPlainObject = a; const s = function(F) { return String(~~F) === F && Number(F) >= 0; }; t.isIntegerString = s; const u = function(F) { return Object.prototype.toString.call(F) === "[object String]"; }; t.isString = u; const c = function(F) { return Object.prototype.toString.call(F) === "[object Date]"; }; t.isDate = c; const f = function(F) { return Object.keys(F).length === 0; }; t.isEmpty = f; const h = Object.prototype.hasOwnProperty, d = function(F, O, N) { N || (N = /* @__PURE__ */ new Set([F])), O || (O = ""); for (const j in F) { const J = O ? `${O}.${j}` : j, te = F[j]; if ((0, t.isObjectLike)(te)) return N.has(te) ? `${O}.${j}:` : (N.add(te), (0, t.getCircularPath)(te, J, N)); } return null; }; t.getCircularPath = d; const g = function(F) { if (!(0, t.isObjectLike)(F)) return F; if ((0, t.isDate)(F)) return new Date(+F); const O = (0, t.isArray)(F) ? [] : {}; for (const N in F) { const j = F[N]; O[N] = (0, t._cloneDeep)(j); } return O; }; t._cloneDeep = g; const v = function(F) { const O = (0, t.getCircularPath)(F); if (O) throw new Error(`${e.PACKAGE_NAME}: circular dependency detected under the path '${O}' of object you're trying to persist: ${F}`); return (0, t._cloneDeep)(F); }; t.cloneDeep = v; const m = function(F, O) { if (F === O) return {}; if (!(0, t.isObjectLike)(F) || !(0, t.isObjectLike)(O)) return O; const N = (0, t.cloneDeep)(F), j = (0, t.cloneDeep)(O), J = Object.keys(N).reduce((ee, ae) => (h.call(j, ae) || (ee[ae] = void 0), ee), {}); if ((0, t.isDate)(N) || (0, t.isDate)(j)) return N.valueOf() === j.valueOf() ? {} : j; const te = Object.keys(j).reduce((ee, ae) => { if (!h.call(N, ae)) return ee[ae] = j[ae], ee; const le = (0, t.difference)(N[ae], j[ae]); return (0, t.isObjectLike)(le) && (0, t.isEmpty)(le) && !(0, t.isDate)(le) ? (0, t.isArray)(N) && !(0, t.isArray)(j) || !(0, t.isArray)(N) && (0, t.isArray)(j) ? j : ee : (ee[ae] = le, ee); }, J); return delete te._persist, te; }; t.difference = m; const b = function(F, O) { return O.reduce((N, j) => { if (N) { const J = parseInt(j, 10), te = (0, t.isIntegerString)(j) && J < 0 ? N.length + J : j; return (0, t.isString)(N) ? N.charAt(te) : N[te]; } }, F); }; t.path = b; const S = function(F, O) { return [...F].reverse().reduce((J, te, ee) => { const ae = (0, t.isIntegerString)(te) ? [] : {}; return ae[te] = ee === 0 ? O : J, ae; }, {}); }; t.assocPath = S; const x = function(F, O) { const N = (0, t.cloneDeep)(F); return O.reduce((j, J, te) => (te === O.length - 1 && j && (0, t.isObjectLike)(j) && delete j[J], j && j[J]), N), N; }; t.dissocPath = x; const w = function(F, O, ...N) { if (!N || !N.length) return O; const j = N.shift(), { preservePlaceholder: J, preserveUndefined: te } = F; if ((0, t.isObjectLike)(O) && (0, t.isObjectLike)(j)) for (const ee in j) if ((0, t.isObjectLike)(j[ee]) && (0, t.isObjectLike)(O[ee])) O[ee] || (O[ee] = {}), w(F, O[ee], j[ee]); else if ((0, t.isArray)(O)) { let ae = j[ee]; const le = J ? e.PLACEHOLDER_UNDEFINED : void 0; te || (ae = typeof ae < "u" ? ae : O[parseInt(ee, 10)]), ae = ae !== e.PLACEHOLDER_UNDEFINED ? ae : le, O[parseInt(ee, 10)] = ae; } else { const ae = j[ee] !== e.PLACEHOLDER_UNDEFINED ? j[ee] : void 0; O[ee] = ae; } return w(F, O, ...N); }, _ = function(F, O, N) { return w({ preservePlaceholder: N == null ? void 0 : N.preservePlaceholder, preserveUndefined: N == null ? void 0 : N.preserveUndefined }, (0, t.cloneDeep)(F), (0, t.cloneDeep)(O)); }; t.mergeDeep = _; const P = function(F, O = [], N, j, J) { if (!(0, t.isObjectLike)(F)) return F; for (const te in F) { const ee = F[te], ae = (0, t.isArray)(F), le = j ? j + "." + te : te; ee === null && (N === r.ConfigType.WHITELIST && O.indexOf(le) === -1 || N === r.ConfigType.BLACKLIST && O.indexOf(le) !== -1) && ae && (F[parseInt(te, 10)] = void 0), ee === void 0 && J && N === r.ConfigType.BLACKLIST && O.indexOf(le) === -1 && ae && (F[parseInt(te, 10)] = e.PLACEHOLDER_UNDEFINED), P(ee, O, N, le, J); } }, E = function(F, O, N, j) { const J = (0, t.cloneDeep)(F); return P(J, O, N, "", j), J; }; t.preserveUndefined = E; const k = function(F, O, N) { return N.indexOf(F) === O; }; t.unique = k; const D = function(F) { return F.reduce((O, N) => { const j = F.filter((Ce) => Ce === N), J = F.filter((Ce) => (N + ".").indexOf(Ce + ".") === 0), { duplicates: te, subsets: ee } = O, ae = j.length > 1 && te.indexOf(N) === -1, le = J.length > 1; return { duplicates: [...te, ...ae ? j : []], subsets: [...ee, ...le ? J : []].filter(t.unique).sort() }; }, { duplicates: [], subsets: [] }); }; t.findDuplicatesAndSubsets = D; const V = function(F, O, N) { const j = N === r.ConfigType.WHITELIST ? "whitelist" : "blacklist", J = `${e.PACKAGE_NAME}: incorrect ${j} configuration.`, te = `Check your create${N === r.ConfigType.WHITELIST ? "White" : "Black"}list arguments. `; if (!(0, t.isString)(O) || O.length < 1) throw new Error(`${J} Name (key) of reducer is required. ${te}`); if (!F || !F.length) return; const { duplicates: ee, subsets: ae } = (0, t.findDuplicatesAndSubsets)(F); if (ee.length > 1) throw new Error(`${J} Duplicated paths. ${JSON.stringify(ee)} ${te}`); if (ae.length > 1) throw new Error(`${J} You are trying to persist an entire property and also some of its subset. ${JSON.stringify(ae)} ${te}`); }; t.singleTransformValidator = V; const H = function(F) { if (!(0, t.isArray)(F)) return; const O = (F == null ? void 0 : F.map((N) => N.deepPersistKey).filter((N) => N)) || []; if (O.length) { const N = O.filter((j, J) => O.indexOf(j) !== J); if (N.length) throw new Error(`${e.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. Duplicates: ${JSON.stringify(N)}`); } }; t.transformsValidator = H; const W = function({ whitelist: F, blacklist: O }) { if (F && F.length && O && O.length) throw new Error(`${e.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`); if (F) { const { duplicates: N, subsets: j } = (0, t.findDuplicatesAndSubsets)(F); (0, t.throwError)({ duplicates: N, subsets: j }, "whitelist"); } if (O) { const { duplicates: N, subsets: j } = (0, t.findDuplicatesAndSubsets)(O); (0, t.throwError)({ duplicates: N, subsets: j }, "blacklist"); } }; t.configValidator = W; const K = function({ duplicates: F, subsets: O }, N) { if (F.length) throw new Error(`${e.PACKAGE_NAME}: duplicates of paths found in your ${N}. ${JSON.stringify(F)}`); if (O.length) throw new Error(`${e.PACKAGE_NAME}: subsets of some parent keys found in your ${N}. You must decide if you want to persist an entire path or its specific subset. ${JSON.stringify(O)}`); }; t.throwError = K; const ie = function(F) { return (0, t.isArray)(F) ? F.filter(t.unique).reduce((O, N) => { const j = N.split("."), J = j[0], te = j.slice(1).join(".") || void 0, ee = O.filter((le) => Object.keys(le)[0] === J)[0], ae = ee ? Object.values(ee)[0] : void 0; return ee || O.push({ [J]: te ? [te] : void 0 }), ee && !ae && te && (ee[J] = [te]), ee && ae && te && ae.push(te), O; }, []) : []; }; t.getRootKeysGroup = ie; })(IS); (function(t) { var e = Dr && Dr.__rest || function(d, g) { var v = {}; for (var m in d) Object.prototype.hasOwnProperty.call(d, m) && g.indexOf(m) < 0 && (v[m] = d[m]); if (d != null && typeof Object.getOwnPropertySymbols == "function") for (var b = 0, m = Object.getOwnPropertySymbols(d); b < m.length; b++) g.indexOf(m[b]) < 0 && Object.prototype.propertyIsEnumerable.call(d, m[b]) && (v[m[b]] = d[m[b]]); return v; }; Object.defineProperty(t, "__esModule", { value: !0 }), t.getPersistConfig = t.getTransforms = t.createBlacklist = t.createWhitelist = t.autoMergeDeep = void 0; const r = IS, n = Ja, i = Hg, a = function(d, g, v = {}) { const m = v.whitelist || null, b = v.blacklist || null; function S(x) { return !!(m && m.indexOf(x) === -1 || b && b.indexOf(x) !== -1); } return { in: (x, w, _) => !S(w) && d ? d(x, w, _) : x, out: (x, w, _) => !S(w) && g ? g(x, w, _) : x, deepPersistKey: m && m[0] }; }, s = (d, g, v, { debug: m, whitelist: b, blacklist: S, transforms: x }) => { if (b || S) throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms."); (0, r.transformsValidator)(x); const w = (0, r.cloneDeep)(v); let _ = d; if (_ && (0, r.isObjectLike)(_)) { const P = (0, r.difference)(g, v); (0, r.isEmpty)(P) || (_ = (0, r.mergeDeep)(d, P, { preserveUndefined: !0 }), m && console.log(`${n.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(P)}`)), Object.keys(_).forEach((E) => { if (E !== "_persist") { if ((0, r.isObjectLike)(w[E])) { w[E] = (0, r.mergeDeep)(w[E], _[E]); return; } w[E] = _[E]; } }); } return m && _ && (0, r.isObjectLike)(_) && console.log(`${n.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(_)}`), w; }; t.autoMergeDeep = s; const u = (d, g) => ((0, r.singleTransformValidator)(g, d, i.ConfigType.WHITELIST), a((v) => { if (!g || !g.length) return v; let m = null, b; return g.forEach((S) => { const x = S.split("."); b = (0, r.path)(v, x), typeof b > "u" && (0, r.isIntegerString)(x[x.length - 1]) && (b = n.PLACEHOLDER_UNDEFINED); const w = (0, r.assocPath)(x, b), _ = (0, r.isArray)(w) ? [] : {}; m = (0, r.mergeDeep)(m || _, w, { preservePlaceholder: !0 }); }), m || v; }, (v) => (0, r.preserveUndefined)(v, g, i.ConfigType.WHITELIST), { whitelist: [d] })); t.createWhitelist = u; const c = (d, g) => ((0, r.singleTransformValidator)(g, d, i.ConfigType.BLACKLIST), a((v) => { if (!g || !g.length) return; const m = (0, r.preserveUndefined)(v, g, i.ConfigType.BLACKLIST, !0); return g.map((S) => S.split(".")).reduce((S, x) => (0, r.dissocPath)(S, x), m); }, (v) => (0, r.preserveUndefined)(v, g, i.ConfigType.BLACKLIST), { whitelist: [d] })); t.createBlacklist = c; const f = function(d, g) { return g.map((v) => { const m = Object.keys(v)[0], b = v[m]; return d === i.ConfigType.WHITELIST ? (0, t.createWhitelist)(m, b) : (0, t.createBlacklist)(m, b); }); }; t.getTransforms = f; const h = (d) => { var { key: g, whitelist: v, blacklist: m, storage: b, transforms: S, rootReducer: x } = d, w = e(d, ["key", "whitelist", "blacklist", "storage", "transforms", "rootReducer"]); (0, r.configValidator)({ whitelist: v, blacklist: m }); const _ = (0, r.getRootKeysGroup)(v), P = (0, r.getRootKeysGroup)(m), E = Object.keys(x(void 0, { type: "" })), k = _.map((ie) => Object.keys(ie)[0]), D = P.map((ie) => Object.keys(ie)[0]), V = E.filter((ie) => k.indexOf(ie) === -1 && D.indexOf(ie) === -1), H = (0, t.getTransforms)(i.ConfigType.WHITELIST, _), W = (0, t.getTransforms)(i.ConfigType.BLACKLIST, P), K = (0, r.isArray)(v) ? V.map((ie) => (0, t.createBlacklist)(ie)) : []; return Object.assign(Object.assign({}, w), { key: g, storage: b, transforms: [ ...H, ...W, ...K, ...S || [] ], stateReconciler: t.autoMergeDeep }); }; t.getPersistConfig = h; })(kS); const vc = (t, e) => Math.floor(t / e) * e, ua = (t, e) => Math.round(t / e) * e; var zt = {}, h6 = { get exports() { return zt; }, set exports(t) { zt = t; } }; /** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ (function(t, e) { (function() { var r, n = "4.17.21", i = 200, a = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", s = "Expected a function", u = "Invalid `variable` option passed into `_.template`", c = "__lodash_hash_undefined__", f = 500, h = "__lodash_placeholder__", d = 1, g = 2, v = 4, m = 1, b = 2, S = 1, x = 2, w = 4, _ = 8, P = 16, E = 32, k = 64, D = 128, V = 256, H = 512, W = 30, K = "...", ie = 800, F = 16, O = 1, N = 2, j = 3, J = 1 / 0, te = 9007199254740991, ee = 17976931348623157e292, ae = 0 / 0, le = 4294967295, Ce = le - 1, we = le >>> 1, Re = [ ["ary", D], ["bind", S], ["bindKey", x], ["curry", _], ["curryRight", P], ["flip", H], ["partial", E], ["partialRight", k], ["rearg", V] ], ke = "[object Arguments]", ve = "[object Array]", ot = "[object AsyncFunction]", Fe = "[object Boolean]", qe = "[object Date]", St = "[object DOMException]", et = "[object Error]", Z = "[object Function]", mt = "[object GeneratorFunction]", fe = "[object Map]", xe = "[object Number]", ut = "[object Null]", je = "[object Object]", jt = "[object Promise]", cr = "[object Proxy]", Et = "[object RegExp]", Tt = "[object Set]", Ut = "[object String]", At = "[object Symbol]", Hr = "[object Undefined]", vr = "[object WeakMap]", un = "[object WeakSet]", $t = "[object ArrayBuffer]", yr = "[object DataView]", mi = "[object Float32Array]", yi = "[object Float64Array]", qn = "[object Int8Array]", Wi = "[object Int16Array]", Ui = "[object Int32Array]", Pa = "[object Uint8Array]", Ea = "[object Uint8ClampedArray]", Yr = "[object Uint16Array]", Kn = "[object Uint32Array]", xo = /\b__p \+= '';/g, Hi = /\b(__p \+=) '' \+/g, os = /(__e\(.*?\)|\b__t\)) \+\n'';/g, ln = /&(?:amp|lt|gt|quot|#39);/g, cn = /[&<>"']/g, Ta = RegExp(ln.source), fn = RegExp(cn.source), Co = /<%-([\s\S]+?)%>/g, us = /<%([\s\S]+?)%>/g, ls = /<%=([\s\S]+?)%>/g, cs = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, fs = /^\w*$/, qr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Aa = /[\\^$.*+?()[\]{}|]/g, hs = RegExp(Aa.source), Oa = /^\s+/, _o = /\s/, Po = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Xn = /\{\n\/\* \[wrapped with (.+)\] \*/, L = /,? & /, oe = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, pe = /[()=,{}\[\]\/\s]/, Pe = /\\(\\)?/g, Xe = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, Ue = /\w*$/, We = /^[-+]0x[0-9a-f]+$/i, Ne = /^0b[01]+$/i, er = /^\[object .+?Constructor\]$/, Ot = /^0o[0-7]+$/i, kt = /^(?:0|[1-9]\d*)$/, br = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Pr = /($^)/, ds = /['\n\r\u2028\u2029\\]/g, tr = "\\ud800-\\udfff", Eo = "\\u0300-\\u036f", mh = "\\ufe20-\\ufe2f", ps = "\\u20d0-\\u20ff", To = Eo + mh + ps, fl = "\\u2700-\\u27bf", hl = "a-z\\xdf-\\xf6\\xf8-\\xff", vh = "\\xac\\xb1\\xd7\\xf7", dl = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", yh = "\\u2000-\\u206f", bh = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", pl = "A-Z\\xc0-\\xd6\\xd8-\\xde", gl = "\\ufe0e\\ufe0f", ml = vh + dl + yh + bh, Ao = "['’]", Sh = "[" + tr + "]", vl = "[" + ml + "]", gs = "[" + To + "]", yl = "\\d+", ms = "[" + fl + "]", vs = "[" + hl + "]", bl = "[^" + tr + ml + yl + fl + hl + pl + "]", Oo = "\\ud83c[\\udffb-\\udfff]", Sl = "(?:" + gs + "|" + Oo + ")", wl = "[^" + tr + "]", Ro = "(?:\\ud83c[\\udde6-\\uddff]){2}", ko = "[\\ud800-\\udbff][\\udc00-\\udfff]", bi = "[" + pl + "]", xl = "\\u200d", Cl = "(?:" + vs + "|" + bl + ")", wh = "(?:" + bi + "|" + bl + ")", ys = "(?:" + Ao + "(?:d|ll|m|re|s|t|ve))?", _l = "(?:" + Ao + "(?:D|LL|M|RE|S|T|VE))?", Pl = Sl + "?", El = "[" + gl + "]?", bs = "(?:" + xl + "(?:" + [wl, Ro, ko].join("|") + ")" + El + Pl + ")*", Io = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Do = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Ss = El + Pl + bs, xh = "(?:" + [ms, Ro, ko].join("|") + ")" + Ss, Tl = "(?:" + [wl + gs + "?", gs, Ro, ko, Sh].join("|") + ")", Mo = RegExp(Ao, "g"), Al = RegExp(gs, "g"), Dn = RegExp(Oo + "(?=" + Oo + ")|" + Tl + Ss, "g"), Ra = RegExp([ bi + "?" + vs + "+" + ys + "(?=" + [vl, bi, "$"].join("|") + ")", wh + "+" + _l + "(?=" + [vl, bi + Cl, "$"].join("|") + ")", bi + "?" + Cl + "+" + ys, bi + "+" + _l, Do, Io, yl, xh ].join("|"), "g"), Ch = RegExp("[" + xl + tr + To + gl + "]"), Ol = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, _h = [ "Array", "Buffer", "DataView", "Date", "Error", "Float32Array", "Float64Array", "Function", "Int8Array", "Int16Array", "Int32Array", "Map", "Math", "Object", "Promise", "RegExp", "Set", "String", "Symbol", "TypeError", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "WeakMap", "_", "clearTimeout", "isFinite", "parseInt", "setTimeout" ], Rl = -1, Ct = {}; Ct[mi] = Ct[yi] = Ct[qn] = Ct[Wi] = Ct[Ui] = Ct[Pa] = Ct[Ea] = Ct[Yr] = Ct[Kn] = !0, Ct[ke] = Ct[ve] = Ct[$t] = Ct[Fe] = Ct[yr] = Ct[qe] = Ct[et] = Ct[Z] = Ct[fe] = Ct[xe] = Ct[je] = Ct[Et] = Ct[Tt] = Ct[Ut] = Ct[vr] = !1; var wt = {}; wt[ke] = wt[ve] = wt[$t] = wt[yr] = wt[Fe] = wt[qe] = wt[mi] = wt[yi] = wt[qn] = wt[Wi] = wt[Ui] = wt[fe] = wt[xe] = wt[je] = wt[Et] = wt[Tt] = wt[Ut] = wt[At] = wt[Pa] = wt[Ea] = wt[Yr] = wt[Kn] = !0, wt[et] = wt[Z] = wt[vr] = !1; var kl = { // Latin-1 Supplement block. À: "A", Á: "A", Â: "A", Ã: "A", Ä: "A", Å: "A", à: "a", á: "a", â: "a", ã: "a", ä: "a", å: "a", Ç: "C", ç: "c", Ð: "D", ð: "d", È: "E", É: "E", Ê: "E", Ë: "E", è: "e", é: "e", ê: "e", ë: "e", Ì: "I", Í: "I", Î: "I", Ï: "I", ì: "i", í: "i", î: "i", ï: "i", Ñ: "N", ñ: "n", Ò: "O", Ó: "O", Ô: "O", Õ: "O", Ö: "O", Ø: "O", ò: "o", ó: "o", ô: "o", õ: "o", ö: "o", ø: "o", Ù: "U", Ú: "U", Û: "U", Ü: "U", ù: "u", ú: "u", û: "u", ü: "u", Ý: "Y", ý: "y", ÿ: "y", Æ: "Ae", æ: "ae", Þ: "Th", þ: "th", ß: "ss", // Latin Extended-A block. Ā: "A", Ă: "A", Ą: "A", ā: "a", ă: "a", ą: "a", Ć: "C", Ĉ: "C", Ċ: "C", Č: "C", ć: "c", ĉ: "c", ċ: "c", č: "c", Ď: "D", Đ: "D", ď: "d", đ: "d", Ē: "E", Ĕ: "E", Ė: "E", Ę: "E", Ě: "E", ē: "e", ĕ: "e", ė: "e", ę: "e", ě: "e", Ĝ: "G", Ğ: "G", Ġ: "G", Ģ: "G", ĝ: "g", ğ: "g", ġ: "g", ģ: "g", Ĥ: "H", Ħ: "H", ĥ: "h", ħ: "h", Ĩ: "I", Ī: "I", Ĭ: "I", Į: "I", İ: "I", ĩ: "i", ī: "i", ĭ: "i", į: "i", ı: "i", Ĵ: "J", ĵ: "j", Ķ: "K", ķ: "k", ĸ: "k", Ĺ: "L", Ļ: "L", Ľ: "L", Ŀ: "L", Ł: "L", ĺ: "l", ļ: "l", ľ: "l", ŀ: "l", ł: "l", Ń: "N", Ņ: "N", Ň: "N", Ŋ: "N", ń: "n", ņ: "n", ň: "n", ŋ: "n", Ō: "O", Ŏ: "O", Ő: "O", ō: "o", ŏ: "o", ő: "o", Ŕ: "R", Ŗ: "R", Ř: "R", ŕ: "r", ŗ: "r", ř: "r", Ś: "S", Ŝ: "S", Ş: "S", Š: "S", ś: "s", ŝ: "s", ş: "s", š: "s", Ţ: "T", Ť: "T", Ŧ: "T", ţ: "t", ť: "t", ŧ: "t", Ũ: "U", Ū: "U", Ŭ: "U", Ů: "U", Ű: "U", Ų: "U", ũ: "u", ū: "u", ŭ: "u", ů: "u", ű: "u", ų: "u", Ŵ: "W", ŵ: "w", Ŷ: "Y", ŷ: "y", Ÿ: "Y", Ź: "Z", Ż: "Z", Ž: "Z", ź: "z", ż: "z", ž: "z", IJ: "IJ", ij: "ij", Œ: "Oe", œ: "oe", ʼn: "'n", ſ: "s" }, Ph = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, R = { "&": "&", "<": "<", ">": ">", """: '"', "'": "'" }, z = { "\\": "\\", "'": "'", "\n": "n", "\r": "r", "\u2028": "u2028", "\u2029": "u2029" }, X = parseFloat, me = parseInt, He = typeof Dr == "object" && Dr && Dr.Object === Object && Dr, vt = typeof self == "object" && self && self.Object === Object && self, Me = He || vt || Function("return this")(), Ve = e && !e.nodeType && e, rt = Ve && !0 && t && !t.nodeType && t, Er = rt && rt.exports === Ve, fr = Er && He.process, ar = function() { try { var U = rt && rt.require && rt.require("util").types; return U || fr && fr.binding && fr.binding("util"); } catch { } }(), ws = ar && ar.isArrayBuffer, xs = ar && ar.isDate, Lo = ar && ar.isMap, Qm = ar && ar.isRegExp, Jm = ar && ar.isSet, Zm = ar && ar.isTypedArray; function Kr(U, $, Q) { switch (Q.length) { case 0: return U.call($); case 1: return U.call($, Q[0]); case 2: return U.call($, Q[0], Q[1]); case 3: return U.call($, Q[0], Q[1], Q[2]); } return U.apply($, Q); } function _C(U, $, Q, ye) { for (var Ie = -1, it = U == null ? 0 : U.length; ++Ie < it; ) { var rr = U[Ie]; $(ye, rr, Q(rr), U); } return ye; } function hn(U, $) { for (var Q = -1, ye = U == null ? 0 : U.length; ++Q < ye && $(U[Q], Q, U) !== !1; ) ; return U; } function PC(U, $) { for (var Q = U == null ? 0 : U.length; Q-- && $(U[Q], Q, U) !== !1; ) ; return U; } function $m(U, $) { for (var Q = -1, ye = U == null ? 0 : U.length; ++Q < ye; ) if (!$(U[Q], Q, U)) return !1; return !0; } function Yi(U, $) { for (var Q = -1, ye = U == null ? 0 : U.length, Ie = 0, it = []; ++Q < ye; ) { var rr = U[Q]; $(rr, Q, U) && (it[Ie++] = rr); } return it; } function Il(U, $) { var Q = U == null ? 0 : U.length; return !!Q && Cs(U, $, 0) > -1; } function Eh(U, $, Q) { for (var ye = -1, Ie = U == null ? 0 : U.length; ++ye < Ie; ) if (Q($, U[ye])) return !0; return !1; } function It(U, $) { for (var Q = -1, ye = U == null ? 0 : U.length, Ie = Array(ye); ++Q < ye; ) Ie[Q] = $(U[Q], Q, U); return Ie; } function qi(U, $) { for (var Q = -1, ye = $.length, Ie = U.length; ++Q < ye; ) U[Ie + Q] = $[Q]; return U; } function Th(U, $, Q, ye) { var Ie = -1, it = U == null ? 0 : U.length; for (ye && it && (Q = U[++Ie]); ++Ie < it; ) Q = $(Q, U[Ie], Ie, U); return Q; } function EC(U, $, Q, ye) { var Ie = U == null ? 0 : U.length; for (ye && Ie && (Q = U[--Ie]); Ie--; ) Q = $(Q, U[Ie], Ie, U); return Q; } function Ah(U, $) { for (var Q = -1, ye = U == null ? 0 : U.length; ++Q < ye; ) if ($(U[Q], Q, U)) return !0; return !1; } var TC = Oh("length"); function AC(U) { return U.split(""); } function OC(U) { return U.match(oe) || []; } function ev(U, $, Q) { var ye; return Q(U, function(Ie, it, rr) { if ($(Ie, it, rr)) return ye = it, !1; }), ye; } function Dl(U, $, Q, ye) { for (var Ie = U.length, it = Q + (ye ? 1 : -1); ye ? it-- : ++it < Ie; ) if ($(U[it], it, U)) return it; return -1; } function Cs(U, $, Q) { return $ === $ ? zC(U, $, Q) : Dl(U, tv, Q); } function RC(U, $, Q, ye) { for (var Ie = Q - 1, it = U.length; ++Ie < it; ) if (ye(U[Ie], $)) return Ie; return -1; } function tv(U) { return U !== U; } function rv(U, $) { var Q = U == null ? 0 : U.length; return Q ? kh(U, $) / Q : ae; } function Oh(U) { return function($) { return $ == null ? r : $[U]; }; } function Rh(U) { return function($) { return U == null ? r : U[$]; }; } function nv(U, $, Q, ye, Ie) { return Ie(U, function(it, rr, _t) { Q = ye ? (ye = !1, it) : $(Q, it, rr, _t); }), Q; } function kC(U, $) { var Q = U.length; for (U.sort($); Q--; ) U[Q] = U[Q].value; return U; } function kh(U, $) { for (var Q, ye = -1, Ie = U.length; ++ye < Ie; ) { var it = $(U[ye]); it !== r && (Q = Q === r ? it : Q + it); } return Q; } function Ih(U, $) { for (var Q = -1, ye = Array(U); ++Q < U; ) ye[Q] = $(Q); return ye; } function IC(U, $) { return It($, function(Q) { return [Q, U[Q]]; }); } function iv(U) { return U && U.slice(0, uv(U) + 1).replace(Oa, ""); } function Xr(U) { return function($) { return U($); }; } function Dh(U, $) { return It($, function(Q) { return U[Q]; }); } function No(U, $) { return U.has($); } function av(U, $) { for (var Q = -1, ye = U.length; ++Q < ye && Cs($, U[Q], 0) > -1; ) ; return Q; } function sv(U, $) { for (var Q = U.length; Q-- && Cs($, U[Q], 0) > -1; ) ; return Q; } function DC(U, $) { for (var Q = U.length, ye = 0; Q--; ) U[Q] === $ && ++ye; return ye; } var MC = Rh(kl), LC = Rh(Ph); function NC(U) { return "\\" + z[U]; } function BC(U, $) { return U == null ? r : U[$]; } function _s(U) { return Ch.test(U); } function FC(U) { return Ol.test(U); } function jC(U) { for (var $, Q = []; !($ = U.next()).done; ) Q.push($.value); return Q; } function Mh(U) { var $ = -1, Q = Array(U.size); return U.forEach(function(ye, Ie) { Q[++$] = [Ie, ye]; }), Q; } function ov(U, $) { return function(Q) { return U($(Q)); }; } function Ki(U, $) { for (var Q = -1, ye = U.length, Ie = 0, it = []; ++Q < ye; ) { var rr = U[Q]; (rr === $ || rr === h) && (U[Q] = h, it[Ie++] = Q); } return it; } function Ml(U) { var $ = -1, Q = Array(U.size); return U.forEach(function(ye) { Q[++$] = ye; }), Q; } function VC(U) { var $ = -1, Q = Array(U.size); return U.forEach(function(ye) { Q[++$] = [ye, ye]; }), Q; } function zC(U, $, Q) { for (var ye = Q - 1, Ie = U.length; ++ye < Ie; ) if (U[ye] === $) return ye; return -1; } function GC(U, $, Q) { for (var ye = Q + 1; ye--; ) if (U[ye] === $) return ye; return ye; } function Ps(U) { return _s(U) ? UC(U) : TC(U); } function Mn(U) { return _s(U) ? HC(U) : AC(U); } function uv(U) { for (var $ = U.length; $-- && _o.test(U.charAt($)); ) ; return $; } var WC = Rh(R); function UC(U) { for (var $ = Dn.lastIndex = 0; Dn.test(U); ) ++$; return $; } function HC(U) { return U.match(Dn) || []; } function YC(U) { return U.match(Ra) || []; } var qC = function U($) { $ = $ == null ? Me : Es.defaults(Me.Object(), $, Es.pick(Me, _h)); var Q = $.Array, ye = $.Date, Ie = $.Error, it = $.Function, rr = $.Math, _t = $.Object, Lh = $.RegExp, KC = $.String, dn = $.TypeError, Ll = Q.prototype, XC = it.prototype, Ts = _t.prototype, Nl = $["__core-js_shared__"], Bl = XC.toString, yt = Ts.hasOwnProperty, QC = 0, lv = function() { var o = /[^.]+$/.exec(Nl && Nl.keys && Nl.keys.IE_PROTO || ""); return o ? "Symbol(src)_1." + o : ""; }(), Fl = Ts.toString, JC = Bl.call(_t), ZC = Me._, $C = Lh( "^" + Bl.call(yt).replace(Aa, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ), jl = Er ? $.Buffer : r, Xi = $.Symbol, Vl = $.Uint8Array, cv = jl ? jl.allocUnsafe : r, zl = ov(_t.getPrototypeOf, _t), fv = _t.create, hv = Ts.propertyIsEnumerable, Gl = Ll.splice, dv = Xi ? Xi.isConcatSpreadable : r, Bo = Xi ? Xi.iterator : r, ka = Xi ? Xi.toStringTag : r, Wl = function() { try { var o = Na(_t, "defineProperty"); return o({}, "", {}), o; } catch { } }(), e4 = $.clearTimeout !== Me.clearTimeout && $.clearTimeout, t4 = ye && ye.now !== Me.Date.now && ye.now, r4 = $.setTimeout !== Me.setTimeout && $.setTimeout, Ul = rr.ceil, Hl = rr.floor, Nh = _t.getOwnPropertySymbols, n4 = jl ? jl.isBuffer : r, pv = $.isFinite, i4 = Ll.join, a4 = ov(_t.keys, _t), nr = rr.max, Sr = rr.min, s4 = ye.now, o4 = $.parseInt, gv = rr.random, u4 = Ll.reverse, Bh = Na($, "DataView"), Fo = Na($, "Map"), Fh = Na($, "Promise"), As = Na($, "Set"), jo = Na($, "WeakMap"), Vo = Na(_t, "create"), Yl = jo && new jo(), Os = {}, l4 = Ba(Bh), c4 = Ba(Fo), f4 = Ba(Fh), h4 = Ba(As), d4 = Ba(jo), ql = Xi ? Xi.prototype : r, zo = ql ? ql.valueOf : r, mv = ql ? ql.toString : r; function T(o) { if (Vt(o) && !De(o) && !(o instanceof Ke)) { if (o instanceof pn) return o; if (yt.call(o, "__wrapped__")) return v0(o); } return new pn(o); } var Rs = function() { function o() { } return function(l) { if (!Lt(l)) return {}; if (fv) return fv(l); o.prototype = l; var p = new o(); return o.prototype = r, p; }; }(); function Kl() { } function pn(o, l) { this.__wrapped__ = o, this.__actions__ = [], this.__chain__ = !!l, this.__index__ = 0, this.__values__ = r; } T.templateSettings = { /** * Used to detect `data` property values to be HTML-escaped. * * @memberOf _.templateSettings * @type {RegExp} */ escape: Co, /** * Used to detect code to be evaluated. * * @memberOf _.templateSettings * @type {RegExp} */ evaluate: us, /** * Used to detect `data` property values to inject. * * @memberOf _.templateSettings * @type {RegExp} */ interpolate: ls, /** * Used to reference the data object in the template text. * * @memberOf _.templateSettings * @type {string} */ variable: "", /** * Used to import variables into the compiled template. * * @memberOf _.templateSettings * @type {Object} */ imports: { /** * A reference to the `lodash` function. * * @memberOf _.templateSettings.imports * @type {Function} */ _: T } }, T.prototype = Kl.prototype, T.prototype.constructor = T, pn.prototype = Rs(Kl.prototype), pn.prototype.constructor = pn; function Ke(o) { this.__wrapped__ = o, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = le, this.__views__ = []; } function p4() { var o = new Ke(this.__wrapped__); return o.__actions__ = Lr(this.__actions__), o.__dir__ = this.__dir__, o.__filtered__ = this.__filtered__, o.__iteratees__ = Lr(this.__iteratees__), o.__takeCount__ = this.__takeCount__, o.__views__ = Lr(this.__views__), o; } function g4() { if (this.__filtered__) { var o = new Ke(this); o.__dir__ = -1, o.__filtered__ = !0; } else o = this.clone(), o.__dir__ *= -1; return o; } function m4() { var o = this.__wrapped__.value(), l = this.__dir__, p = De(o), y = l < 0, C = p ? o.length : 0, A = A_(0, C, this.__views__), I = A.start, B = A.end, Y = B - I, re = y ? B : I - 1, ne = this.__iteratees__, se = ne.length, ge = 0, Se = Sr(Y, this.__takeCount__); if (!p || !y && C == Y && Se == Y) return Vv(o, this.__actions__); var Ee = []; e: for (; Y-- && ge < Se; ) { re += l; for (var Be = -1, Te = o[re]; ++Be < se; ) { var Ye = ne[Be], Qe = Ye.iteratee, Zr = Ye.type, Or = Qe(Te); if (Zr == N) Te = Or; else if (!Or) { if (Zr == O) continue e; break e; } } Ee[ge++] = Te; } return Ee; } Ke.prototype = Rs(Kl.prototype), Ke.prototype.constructor = Ke; function Ia(o) { var l = -1, p = o == null ? 0 : o.length; for (this.clear(); ++l < p; ) { var y = o[l]; this.set(y[0], y[1]); } } function v4() { this.__data__ = Vo ? Vo(null) : {}, this.size = 0; } function y4(o) { var l = this.has(o) && delete this.__data__[o]; return this.size -= l ? 1 : 0, l; } function b4(o) { var l = this.__data__; if (Vo) { var p = l[o]; return p === c ? r : p; } return yt.call(l, o) ? l[o] : r; } function S4(o) { var l = this.__data__; return Vo ? l[o] !== r : yt.call(l, o); } function w4(o, l) { var p = this.__data__; return this.size += this.has(o) ? 0 : 1, p[o] = Vo && l === r ? c : l, this; } Ia.prototype.clear = v4, Ia.prototype.delete = y4, Ia.prototype.get = b4, Ia.prototype.has = S4, Ia.prototype.set = w4; function Si(o) { var l = -1, p = o == null ? 0 : o.length; for (this.clear(); ++l < p; ) { var y = o[l]; this.set(y[0], y[1]); } } function x4() { this.__data__ = [], this.size = 0; } function C4(o) { var l = this.__data__, p = Xl(l, o); if (p < 0) return !1; var y = l.length - 1; return p == y ? l.pop() : Gl.call(l, p, 1), --this.size, !0; } function _4(o) { var l = this.__data__, p = Xl(l, o); return p < 0 ? r : l[p][1]; } function P4(o) { return Xl(this.__data__, o) > -1; } function E4(o, l) { var p = this.__data__, y = Xl(p, o); return y < 0 ? (++this.size, p.push([o, l])) : p[y][1] = l, this; } Si.prototype.clear = x4, Si.prototype.delete = C4, Si.prototype.get = _4, Si.prototype.has = P4, Si.prototype.set = E4; function wi(o) { var l = -1, p = o == null ? 0 : o.length; for (this.clear(); ++l < p; ) { var y = o[l]; this.set(y[0], y[1]); } } function T4() { this.size = 0, this.__data__ = { hash: new Ia(), map: new (Fo || Si)(), string: new Ia() }; } function A4(o) { var l = oc(this, o).delete(o); return this.size -= l ? 1 : 0, l; } function O4(o) { return oc(this, o).get(o); } function R4(o) { return oc(this, o).has(o); } function k4(o, l) { var p = oc(this, o), y = p.size; return p.set(o, l), this.size += p.size == y ? 0 : 1, this; } wi.prototype.clear = T4, wi.prototype.delete = A4, wi.prototype.get = O4, wi.prototype.has = R4, wi.prototype.set = k4; function Da(o) { var l = -1, p = o == null ? 0 : o.length; for (this.__data__ = new wi(); ++l < p; ) this.add(o[l]); } function I4(o) { return this.__data__.set(o, c), this; } function D4(o) { return this.__data__.has(o); } Da.prototype.add = Da.prototype.push = I4, Da.prototype.has = D4; function Ln(o) { var l = this.__data__ = new Si(o); this.size = l.size; } function M4() { this.__data__ = new Si(), this.size = 0; } function L4(o) { var l = this.__data__, p = l.delete(o); return this.size = l.size, p; } function N4(o) { return this.__data__.get(o); } function B4(o) { return this.__data__.has(o); } function F4(o, l) { var p = this.__data__; if (p instanceof Si) { var y = p.__data__; if (!Fo || y.length < i - 1) return y.push([o, l]), this.size = ++p.size, this; p = this.__data__ = new wi(y); } return p.set(o, l), this.size = p.size, this; } Ln.prototype.clear = M4, Ln.prototype.delete = L4, Ln.prototype.get = N4, Ln.prototype.has = B4, Ln.prototype.set = F4; function vv(o, l) { var p = De(o), y = !p && Fa(o), C = !p && !y && ea(o), A = !p && !y && !C && Ms(o), I = p || y || C || A, B = I ? Ih(o.length, KC) : [], Y = B.length; for (var re in o) (l || yt.call(o, re)) && !(I && // Safari 9 has enumerable `arguments.length` in strict mode. (re == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. C && (re == "offset" || re == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. A && (re == "buffer" || re == "byteLength" || re == "byteOffset") || // Skip index properties. Pi(re, Y))) && B.push(re); return B; } function yv(o) { var l = o.length; return l ? o[Xh(0, l - 1)] : r; } function j4(o, l) { return uc(Lr(o), Ma(l, 0, o.length)); } function V4(o) { return uc(Lr(o)); } function jh(o, l, p) { (p !== r && !Nn(o[l], p) || p === r && !(l in o)) && xi(o, l, p); } function Go(o, l, p) { var y = o[l]; (!(yt.call(o, l) && Nn(y, p)) || p === r && !(l in o)) && xi(o, l, p); } function Xl(o, l) { for (var p = o.length; p--; ) if (Nn(o[p][0], l)) return p; return -1; } function z4(o, l, p, y) { return Qi(o, function(C, A, I) { l(y, C, p(C), I); }), y; } function bv(o, l) { return o && Jn(l, sr(l), o); } function G4(o, l) { return o && Jn(l, Br(l), o); } function xi(o, l, p) { l == "__proto__" && Wl ? Wl(o, l, { configurable: !0, enumerable: !0, value: p, writable: !0 }) : o[l] = p; } function Vh(o, l) { for (var p = -1, y = l.length, C = Q(y), A = o == null; ++p < y; ) C[p] = A ? r : Sd(o, l[p]); return C; } function Ma(o, l, p) { return o === o && (p !== r && (o = o <= p ? o : p), l !== r && (o = o >= l ? o : l)), o; } function gn(o, l, p, y, C, A) { var I, B = l & d, Y = l & g, re = l & v; if (p && (I = C ? p(o, y, C, A) : p(o)), I !== r) return I; if (!Lt(o)) return o; var ne = De(o); if (ne) { if (I = R_(o), !B) return Lr(o, I); } else { var se = wr(o), ge = se == Z || se == mt; if (ea(o)) return Wv(o, B); if (se == je || se == ke || ge && !C) { if (I = Y || ge ? {} : u0(o), !B) return Y ? b_(o, G4(I, o)) : y_(o, bv(I, o)); } else { if (!wt[se]) return C ? o : {}; I = k_(o, se, B); } } A || (A = new Ln()); var Se = A.get(o); if (Se) return Se; A.set(o, I), B0(o) ? o.forEach(function(Te) { I.add(gn(Te, l, p, Te, o, A)); }) : L0(o) && o.forEach(function(Te, Ye) { I.set(Ye, gn(Te, l, p, Ye, o, A)); }); var Ee = re ? Y ? sd : ad : Y ? Br : sr, Be = ne ? r : Ee(o); return hn(Be || o, function(Te, Ye) { Be && (Ye = Te, Te = o[Ye]), Go(I, Ye, gn(Te, l, p, Ye, o, A)); }), I; } function W4(o) { var l = sr(o); return function(p) { return Sv(p, o, l); }; } function Sv(o, l, p) { var y = p.length; if (o == null) return !y; for (o = _t(o); y--; ) { var C = p[y], A = l[C], I = o[C]; if (I === r && !(C in o) || !A(I)) return !1; } return !0; } function wv(o, l, p) { if (typeof o != "function") throw new dn(s); return Xo(function() { o.apply(r, p); }, l); } function Wo(o, l, p, y) { var C = -1, A = Il, I = !0, B = o.length, Y = [], re = l.length; if (!B) return Y; p && (l = It(l, Xr(p))), y ? (A = Eh, I = !1) : l.length >= i && (A = No, I = !1, l = new Da(l)); e: for (; ++C < B; ) { var ne = o[C], se = p == null ? ne : p(ne); if (ne = y || ne !== 0 ? ne : 0, I && se === se) { for (var ge = re; ge--; ) if (l[ge] === se) continue e; Y.push(ne); } else A(l, se, y) || Y.push(ne); } return Y; } var Qi = Kv(Qn), xv = Kv(Gh, !0); function U4(o, l) { var p = !0; return Qi(o, function(y, C, A) { return p = !!l(y, C, A), p; }), p; } function Ql(o, l, p) { for (var y = -1, C = o.length; ++y < C; ) { var A = o[y], I = l(A); if (I != null && (B === r ? I === I && !Jr(I) : p(I, B))) var B = I, Y = A; } return Y; } function H4(o, l, p, y) { var C = o.length; for (p = Le(p), p < 0 && (p = -p > C ? 0 : C + p), y = y === r || y > C ? C : Le(y), y < 0 && (y += C), y = p > y ? 0 : j0(y); p < y; ) o[p++] = l; return o; } function Cv(o, l) { var p = []; return Qi(o, function(y, C, A) { l(y, C, A) && p.push(y); }), p; } function hr(o, l, p, y, C) { var A = -1, I = o.length; for (p || (p = D_), C || (C = []); ++A < I; ) { var B = o[A]; l > 0 && p(B) ? l > 1 ? hr(B, l - 1, p, y, C) : qi(C, B) : y || (C[C.length] = B); } return C; } var zh = Xv(), _v = Xv(!0); function Qn(o, l) { return o && zh(o, l, sr); } function Gh(o, l) { return o && _v(o, l, sr); } function Jl(o, l) { return Yi(l, function(p) { return Ei(o[p]); }); } function La(o, l) { l = Zi(l, o); for (var p = 0, y = l.length; o != null && p < y; ) o = o[Zn(l[p++])]; return p && p == y ? o : r; } function Pv(o, l, p) { var y = l(o); return De(o) ? y : qi(y, p(o)); } function Tr(o) { return o == null ? o === r ? Hr : ut : ka && ka in _t(o) ? T_(o) : V_(o); } function Wh(o, l) { return o > l; } function Y4(o, l) { return o != null && yt.call(o, l); } function q4(o, l) { return o != null && l in _t(o); } function K4(o, l, p) { return o >= Sr(l, p) && o < nr(l, p); } function Uh(o, l, p) { for (var y = p ? Eh : Il, C = o[0].length, A = o.length, I = A, B = Q(A), Y = 1 / 0, re = []; I--; ) { var ne = o[I]; I && l && (ne = It(ne, Xr(l))), Y = Sr(ne.length, Y), B[I] = !p && (l || C >= 120 && ne.length >= 120) ? new Da(I && ne) : r; } ne = o[0]; var se = -1, ge = B[0]; e: for (; ++se < C && re.length < Y; ) { var Se = ne[se], Ee = l ? l(Se) : Se; if (Se = p || Se !== 0 ? Se : 0, !(ge ? No(ge, Ee) : y(re, Ee, p))) { for (I = A; --I; ) { var Be = B[I]; if (!(Be ? No(Be, Ee) : y(o[I], Ee, p))) continue e; } ge && ge.push(Ee), re.push(Se); } } return re; } function X4(o, l, p, y) { return Qn(o, function(C, A, I) { l(y, p(C), A, I); }), y; } function Uo(o, l, p) { l = Zi(l, o), o = h0(o, l); var y = o == null ? o : o[Zn(vn(l))]; return y == null ? r : Kr(y, o, p); } function Ev(o) { return Vt(o) && Tr(o) == ke; } function Q4(o) { return Vt(o) && Tr(o) == $t; } function J4(o) { return Vt(o) && Tr(o) == qe; } function Ho(o, l, p, y, C) { return o === l ? !0 : o == null || l == null || !Vt(o) && !Vt(l) ? o !== o && l !== l : Z4(o, l, p, y, Ho, C); } function Z4(o, l, p, y, C, A) { var I = De(o), B = De(l), Y = I ? ve : wr(o), re = B ? ve : wr(l); Y = Y == ke ? je : Y, re = re == ke ? je : re; var ne = Y == je, se = re == je, ge = Y == re; if (ge && ea(o)) { if (!ea(l)) return !1; I = !0, ne = !1; } if (ge && !ne) return A || (A = new Ln()), I || Ms(o) ? a0(o, l, p, y, C, A) : P_(o, l, Y, p, y, C, A); if (!(p & m)) { var Se = ne && yt.call(o, "__wrapped__"), Ee = se && yt.call(l, "__wrapped__"); if (Se || Ee) { var Be = Se ? o.value() : o, Te = Ee ? l.value() : l; return A || (A = new Ln()), C(Be, Te, p, y, A); } } return ge ? (A || (A = new Ln()), E_(o, l, p, y, C, A)) : !1; } function $4(o) { return Vt(o) && wr(o) == fe; } function Hh(o, l, p, y) { var C = p.length, A = C, I = !y; if (o == null) return !A; for (o = _t(o); C--; ) { var B = p[C]; if (I && B[2] ? B[1] !== o[B[0]] : !(B[0] in o)) return !1; } for (; ++C < A; ) { B = p[C]; var Y = B[0], re = o[Y], ne = B[1]; if (I && B[2]) { if (re === r && !(Y in o)) return !1; } else { var se = new Ln(); if (y) var ge = y(re, ne, Y, o, l, se); if (!(ge === r ? Ho(ne, re, m | b, y, se) : ge)) return !1; } } return !0; } function Tv(o) { if (!Lt(o) || L_(o)) return !1; var l = Ei(o) ? $C : er; return l.test(Ba(o)); } function e_(o) { return Vt(o) && Tr(o) == Et; } function t_(o) { return Vt(o) && wr(o) == Tt; } function r_(o) { return Vt(o) && pc(o.length) && !!Ct[Tr(o)]; } function Av(o) { return typeof o == "function" ? o : o == null ? Fr : typeof o == "object" ? De(o) ? kv(o[0], o[1]) : Rv(o) : Q0(o); } function Yh(o) { if (!Ko(o)) return a4(o); var l = []; for (var p in _t(o)) yt.call(o, p) && p != "constructor" && l.push(p); return l; } function n_(o) { if (!Lt(o)) return j_(o); var l = Ko(o), p = []; for (var y in o) y == "constructor" && (l || !yt.call(o, y)) || p.push(y); return p; } function qh(o, l) { return o < l; } function Ov(o, l) { var p = -1, y = Nr(o) ? Q(o.length) : []; return Qi(o, function(C, A, I) { y[++p] = l(C, A, I); }), y; } function Rv(o) { var l = ud(o); return l.length == 1 && l[0][2] ? c0(l[0][0], l[0][1]) : function(p) { return p === o || Hh(p, o, l); }; } function kv(o, l) { return cd(o) && l0(l) ? c0(Zn(o), l) : function(p) { var y = Sd(p, o); return y === r && y === l ? wd(p, o) : Ho(l, y, m | b); }; } function Zl(o, l, p, y, C) { o !== l && zh(l, function(A, I) { if (C || (C = new Ln()), Lt(A)) i_(o, l, I, p, Zl, y, C); else { var B = y ? y(hd(o, I), A, I + "", o, l, C) : r; B === r && (B = A), jh(o, I, B); } }, Br); } function i_(o, l, p, y, C, A, I) { var B = hd(o, p), Y = hd(l, p), re = I.get(Y); if (re) { jh(o, p, re); return; } var ne = A ? A(B, Y, p + "", o, l, I) : r, se = ne === r; if (se) { var ge = De(Y), Se = !ge && ea(Y), Ee = !ge && !Se && Ms(Y); ne = Y, ge || Se || Ee ? De(B) ? ne = B : Ht(B) ? ne = Lr(B) : Se ? (se = !1, ne = Wv(Y, !0)) : Ee ? (se = !1, ne = Uv(Y, !0)) : ne = [] : Qo(Y) || Fa(Y) ? (ne = B, Fa(B) ? ne = V0(B) : (!Lt(B) || Ei(B)) && (ne = u0(Y))) : se = !1; } se && (I.set(Y, ne), C(ne, Y, y, A, I), I.delete(Y)), jh(o, p, ne); } function Iv(o, l) { var p = o.length; if (p) return l += l < 0 ? p : 0, Pi(l, p) ? o[l] : r; } function Dv(o, l, p) { l.length ? l = It(l, function(A) { return De(A) ? function(I) { return La(I, A.length === 1 ? A[0] : A); } : A; }) : l = [Fr]; var y = -1; l = It(l, Xr(_e())); var C = Ov(o, function(A, I, B) { var Y = It(l, function(re) { return re(A); }); return { criteria: Y, index: ++y, value: A }; }); return kC(C, function(A, I) { return v_(A, I, p); }); } function a_(o, l) { return Mv(o, l, function(p, y) { return wd(o, y); }); } function Mv(o, l, p) { for (var y = -1, C = l.length, A = {}; ++y < C; ) { var I = l[y], B = La(o, I); p(B, I) && Yo(A, Zi(I, o), B); } return A; } function s_(o) { return function(l) { return La(l, o); }; } function Kh(o, l, p, y) { var C = y ? RC : Cs, A = -1, I = l.length, B = o; for (o === l && (l = Lr(l)), p && (B = It(o, Xr(p))); ++A < I; ) for (var Y = 0, re = l[A], ne = p ? p(re) : re; (Y = C(B, ne, Y, y)) > -1; ) B !== o && Gl.call(B, Y, 1), Gl.call(o, Y, 1); return o; } function Lv(o, l) { for (var p = o ? l.length : 0, y = p - 1; p--; ) { var C = l[p]; if (p == y || C !== A) { var A = C; Pi(C) ? Gl.call(o, C, 1) : Zh(o, C); } } return o; } function Xh(o, l) { return o + Hl(gv() * (l - o + 1)); } function o_(o, l, p, y) { for (var C = -1, A = nr(Ul((l - o) / (p || 1)), 0), I = Q(A); A--; ) I[y ? A : ++C] = o, o += p; return I; } function Qh(o, l) { var p = ""; if (!o || l < 1 || l > te) return p; do l % 2 && (p += o), l = Hl(l / 2), l && (o += o); while (l); return p; } function ze(o, l) { return dd(f0(o, l, Fr), o + ""); } function u_(o) { return yv(Ls(o)); } function l_(o, l) { var p = Ls(o); return uc(p, Ma(l, 0, p.length)); } function Yo(o, l, p, y) { if (!Lt(o)) return o; l = Zi(l, o); for (var C = -1, A = l.length, I = A - 1, B = o; B != null && ++C < A; ) { var Y = Zn(l[C]), re = p; if (Y === "__proto__" || Y === "constructor" || Y === "prototype") return o; if (C != I) { var ne = B[Y]; re = y ? y(ne, Y, B) : r, re === r && (re = Lt(ne) ? ne : Pi(l[C + 1]) ? [] : {}); } Go(B, Y, re), B = B[Y]; } return o; } var Nv = Yl ? function(o, l) { return Yl.set(o, l), o; } : Fr, c_ = Wl ? function(o, l) { return Wl(o, "toString", { configurable: !0, enumerable: !1, value: Cd(l), writable: !0 }); } : Fr; function f_(o) { return uc(Ls(o)); } function mn(o, l, p) { var y = -1, C = o.length; l < 0 && (l = -l > C ? 0 : C + l), p = p > C ? C : p, p < 0 && (p += C), C = l > p ? 0 : p - l >>> 0, l >>>= 0; for (var A = Q(C); ++y < C; ) A[y] = o[y + l]; return A; } function h_(o, l) { var p; return Qi(o, function(y, C, A) { return p = l(y, C, A), !p; }), !!p; } function $l(o, l, p) { var y = 0, C = o == null ? y : o.length; if (typeof l == "number" && l === l && C <= we) { for (; y < C; ) { var A = y + C >>> 1, I = o[A]; I !== null && !Jr(I) && (p ? I <= l : I < l) ? y = A + 1 : C = A; } return C; } return Jh(o, l, Fr, p); } function Jh(o, l, p, y) { var C = 0, A = o == null ? 0 : o.length; if (A === 0) return 0; l = p(l); for (var I = l !== l, B = l === null, Y = Jr(l), re = l === r; C < A; ) { var ne = Hl((C + A) / 2), se = p(o[ne]), ge = se !== r, Se = se === null, Ee = se === se, Be = Jr(se); if (I) var Te = y || Ee; else re ? Te = Ee && (y || ge) : B ? Te = Ee && ge && (y || !Se) : Y ? Te = Ee && ge && !Se && (y || !Be) : Se || Be ? Te = !1 : Te = y ? se <= l : se < l; Te ? C = ne + 1 : A = ne; } return Sr(A, Ce); } function Bv(o, l) { for (var p = -1, y = o.length, C = 0, A = []; ++p < y; ) { var I = o[p], B = l ? l(I) : I; if (!p || !Nn(B, Y)) { var Y = B; A[C++] = I === 0 ? 0 : I; } } return A; } function Fv(o) { return typeof o == "number" ? o : Jr(o) ? ae : +o; } function Qr(o) { if (typeof o == "string") return o; if (De(o)) return It(o, Qr) + ""; if (Jr(o)) return mv ? mv.call(o) : ""; var l = o + ""; return l == "0" && 1 / o == -J ? "-0" : l; } function Ji(o, l, p) { var y = -1, C = Il, A = o.length, I = !0, B = [], Y = B; if (p) I = !1, C = Eh; else if (A >= i) { var re = l ? null : C_(o); if (re) return Ml(re); I = !1, C = No, Y = new Da(); } else Y = l ? [] : B; e: for (; ++y < A; ) { var ne = o[y], se = l ? l(ne) : ne; if (ne = p || ne !== 0 ? ne : 0, I && se === se) { for (var ge = Y.length; ge--; ) if (Y[ge] === se) continue e; l && Y.push(se), B.push(ne); } else C(Y, se, p) || (Y !== B && Y.push(se), B.push(ne)); } return B; } function Zh(o, l) { return l = Zi(l, o), o = h0(o, l), o == null || delete o[Zn(vn(l))]; } function jv(o, l, p, y) { return Yo(o, l, p(La(o, l)), y); } function ec(o, l, p, y) { for (var C = o.length, A = y ? C : -1; (y ? A-- : ++A < C) && l(o[A], A, o); ) ; return p ? mn(o, y ? 0 : A, y ? A + 1 : C) : mn(o, y ? A + 1 : 0, y ? C : A); } function Vv(o, l) { var p = o; return p instanceof Ke && (p = p.value()), Th(l, function(y, C) { return C.func.apply(C.thisArg, qi([y], C.args)); }, p); } function $h(o, l, p) { var y = o.length; if (y < 2) return y ? Ji(o[0]) : []; for (var C = -1, A = Q(y); ++C < y; ) for (var I = o[C], B = -1; ++B < y; ) B != C && (A[C] = Wo(A[C] || I, o[B], l, p)); return Ji(hr(A, 1), l, p); } function zv(o, l, p) { for (var y = -1, C = o.length, A = l.length, I = {}; ++y < C; ) { var B = y < A ? l[y] : r; p(I, o[y], B); } return I; } function ed(o) { return Ht(o) ? o : []; } function td(o) { return typeof o == "function" ? o : Fr; } function Zi(o, l) { return De(o) ? o : cd(o, l) ? [o] : m0(lt(o)); } var d_ = ze; function $i(o, l, p) { var y = o.length; return p = p === r ? y : p, !l && p >= y ? o : mn(o, l, p); } var Gv = e4 || function(o) { return Me.clearTimeout(o); }; function Wv(o, l) { if (l) return o.slice(); var p = o.length, y = cv ? cv(p) : new o.constructor(p); return o.copy(y), y; } function rd(o) { var l = new o.constructor(o.byteLength); return new Vl(l).set(new Vl(o)), l; } function p_(o, l) { var p = l ? rd(o.buffer) : o.buffer; return new o.constructor(p, o.byteOffset, o.byteLength); } function g_(o) { var l = new o.constructor(o.source, Ue.exec(o)); return l.lastIndex = o.lastIndex, l; } function m_(o) { return zo ? _t(zo.call(o)) : {}; } function Uv(o, l) { var p = l ? rd(o.buffer) : o.buffer; return new o.constructor(p, o.byteOffset, o.length); } function Hv(o, l) { if (o !== l) { var p = o !== r, y = o === null, C = o === o, A = Jr(o), I = l !== r, B = l === null, Y = l === l, re = Jr(l); if (!B && !re && !A && o > l || A && I && Y && !B && !re || y && I && Y || !p && Y || !C) return 1; if (!y && !A && !re && o < l || re && p && C && !y && !A || B && p && C || !I && C || !Y) return -1; } return 0; } function v_(o, l, p) { for (var y = -1, C = o.criteria, A = l.criteria, I = C.length, B = p.length; ++y < I; ) { var Y = Hv(C[y], A[y]); if (Y) { if (y >= B) return Y; var re = p[y]; return Y * (re == "desc" ? -1 : 1); } } return o.index - l.index; } function Yv(o, l, p, y) { for (var C = -1, A = o.length, I = p.length, B = -1, Y = l.length, re = nr(A - I, 0), ne = Q(Y + re), se = !y; ++B < Y; ) ne[B] = l[B]; for (; ++C < I; ) (se || C < A) && (ne[p[C]] = o[C]); for (; re--; ) ne[B++] = o[C++]; return ne; } function qv(o, l, p, y) { for (var C = -1, A = o.length, I = -1, B = p.length, Y = -1, re = l.length, ne = nr(A - B, 0), se = Q(ne + re), ge = !y; ++C < ne; ) se[C] = o[C]; for (var Se = C; ++Y < re; ) se[Se + Y] = l[Y]; for (; ++I < B; ) (ge || C < A) && (se[Se + p[I]] = o[C++]); return se; } function Lr(o, l) { var p = -1, y = o.length; for (l || (l = Q(y)); ++p < y; ) l[p] = o[p]; return l; } function Jn(o, l, p, y) { var C = !p; p || (p = {}); for (var A = -1, I = l.length; ++A < I; ) { var B = l[A], Y = y ? y(p[B], o[B], B, p, o) : r; Y === r && (Y = o[B]), C ? xi(p, B, Y) : Go(p, B, Y); } return p; } function y_(o, l) { return Jn(o, ld(o), l); } function b_(o, l) { return Jn(o, s0(o), l); } function tc(o, l) { return function(p, y) { var C = De(p) ? _C : z4, A = l ? l() : {}; return C(p, o, _e(y, 2), A); }; } function ks(o) { return ze(function(l, p) { var y = -1, C = p.length, A = C > 1 ? p[C - 1] : r, I = C > 2 ? p[2] : r; for (A = o.length > 3 && typeof A == "function" ? (C--, A) : r, I && Ar(p[0], p[1], I) && (A = C < 3 ? r : A, C = 1), l = _t(l); ++y < C; ) { var B = p[y]; B && o(l, B, y, A); } return l; }); } function Kv(o, l) { return function(p, y) { if (p == null) return p; if (!Nr(p)) return o(p, y); for (var C = p.length, A = l ? C : -1, I = _t(p); (l ? A-- : ++A < C) && y(I[A], A, I) !== !1; ) ; return p; }; } function Xv(o) { return function(l, p, y) { for (var C = -1, A = _t(l), I = y(l), B = I.length; B--; ) { var Y = I[o ? B : ++C]; if (p(A[Y], Y, A) === !1) break; } return l; }; } function S_(o, l, p) { var y = l & S, C = qo(o); function A() { var I = this && this !== Me && this instanceof A ? C : o; return I.apply(y ? p : this, arguments); } return A; } function Qv(o) { return function(l) { l = lt(l); var p = _s(l) ? Mn(l) : r, y = p ? p[0] : l.charAt(0), C = p ? $i(p, 1).join("") : l.slice(1); return y[o]() + C; }; } function Is(o) { return function(l) { return Th(K0(q0(l).replace(Mo, "")), o, ""); }; } function qo(o) { return function() { var l = arguments; switch (l.length) { case 0: return new o(); case 1: return new o(l[0]); case 2: return new o(l[0], l[1]); case 3: return new o(l[0], l[1], l[2]); case 4: return new o(l[0], l[1], l[2], l[3]); case 5: return new o(l[0], l[1], l[2], l[3], l[4]); case 6: return new o(l[0], l[1], l[2], l[3], l[4], l[5]); case 7: return new o(l[0], l[1], l[2], l[3], l[4], l[5], l[6]); } var p = Rs(o.prototype), y = o.apply(p, l); return Lt(y) ? y : p; }; } function w_(o, l, p) { var y = qo(o); function C() { for (var A = arguments.length, I = Q(A), B = A, Y = Ds(C); B--; ) I[B] = arguments[B]; var re = A < 3 && I[0] !== Y && I[A - 1] !== Y ? [] : Ki(I, Y); if (A -= re.length, A < p) return t0( o, l, rc, C.placeholder, r, I, re, r, r, p - A ); var ne = this && this !== Me && this instanceof C ? y : o; return Kr(ne, this, I); } return C; } function Jv(o) { return function(l, p, y) { var C = _t(l); if (!Nr(l)) { var A = _e(p, 3); l = sr(l), p = function(B) { return A(C[B], B, C); }; } var I = o(l, p, y); return I > -1 ? C[A ? l[I] : I] : r; }; } function Zv(o) { return _i(function(l) { var p = l.length, y = p, C = pn.prototype.thru; for (o && l.reverse(); y--; ) { var A = l[y]; if (typeof A != "function") throw new dn(s); if (C && !I && sc(A) == "wrapper") var I = new pn([], !0); } for (y = I ? y : p; ++y < p; ) { A = l[y]; var B = sc(A), Y = B == "wrapper" ? od(A) : r; Y && fd(Y[0]) && Y[1] == (D | _ | E | V) && !Y[4].length && Y[9] == 1 ? I = I[sc(Y[0])].apply(I, Y[3]) : I = A.length == 1 && fd(A) ? I[B]() : I.thru(A); } return function() { var re = arguments, ne = re[0]; if (I && re.length == 1 && De(ne)) return I.plant(ne).value(); for (var se = 0, ge = p ? l[se].apply(this, re) : ne; ++se < p; ) ge = l[se].call(this, ge); return ge; }; }); } function rc(o, l, p, y, C, A, I, B, Y, re) { var ne = l & D, se = l & S, ge = l & x, Se = l & (_ | P), Ee = l & H, Be = ge ? r : qo(o); function Te() { for (var Ye = arguments.length, Qe = Q(Ye), Zr = Ye; Zr--; ) Qe[Zr] = arguments[Zr]; if (Se) var Or = Ds(Te), $r = DC(Qe, Or); if (y && (Qe = Yv(Qe, y, C, Se)), A && (Qe = qv(Qe, A, I, Se)), Ye -= $r, Se && Ye < re) { var Yt = Ki(Qe, Or); return t0( o, l, rc, Te.placeholder, p, Qe, Yt, B, Y, re - Ye ); } var Bn = se ? p : this, Ai = ge ? Bn[o] : o; return Ye = Qe.length, B ? Qe = z_(Qe, B) : Ee && Ye > 1 && Qe.reverse(), ne && Y < Ye && (Qe.length = Y), this && this !== Me && this instanceof Te && (Ai = Be || qo(Ai)), Ai.apply(Bn, Qe); } return Te; } function $v(o, l) { return function(p, y) { return X4(p, o, l(y), {}); }; } function nc(o, l) { return function(p, y) { var C; if (p === r && y === r) return l; if (p !== r && (C = p), y !== r) { if (C === r) return y; typeof p == "string" || typeof y == "string" ? (p = Qr(p), y = Qr(y)) : (p = Fv(p), y = Fv(y)), C = o(p, y); } return C; }; } function nd(o) { return _i(function(l) { return l = It(l, Xr(_e())), ze(function(p) { var y = this; return o(l, function(C) { return Kr(C, y, p); }); }); }); } function ic(o, l) { l = l === r ? " " : Qr(l); var p = l.length; if (p < 2) return p ? Qh(l, o) : l; var y = Qh(l, Ul(o / Ps(l))); return _s(l) ? $i(Mn(y), 0, o).join("") : y.slice(0, o); } function x_(o, l, p, y) { var C = l & S, A = qo(o); function I() { for (var B = -1, Y = arguments.length, re = -1, ne = y.length, se = Q(ne + Y), ge = this && this !== Me && this instanceof I ? A : o; ++re < ne; ) se[re] = y[re]; for (; Y--; ) se[re++] = arguments[++B]; return Kr(ge, C ? p : this, se); } return I; } function e0(o) { return function(l, p, y) { return y && typeof y != "number" && Ar(l, p, y) && (p = y = r), l = Ti(l), p === r ? (p = l, l = 0) : p = Ti(p), y = y === r ? l < p ? 1 : -1 : Ti(y), o_(l, p, y, o); }; } function ac(o) { return function(l, p) { return typeof l == "string" && typeof p == "string" || (l = yn(l), p = yn(p)), o(l, p); }; } function t0(o, l, p, y, C, A, I, B, Y, re) { var ne = l & _, se = ne ? I : r, ge = ne ? r : I, Se = ne ? A : r, Ee = ne ? r : A; l |= ne ? E : k, l &= ~(ne ? k : E), l & w || (l &= ~(S | x)); var Be = [ o, l, C, Se, se, Ee, ge, B, Y, re ], Te = p.apply(r, Be); return fd(o) && d0(Te, Be), Te.placeholder = y, p0(Te, o, l); } function id(o) { var l = rr[o]; return function(p, y) { if (p = yn(p), y = y == null ? 0 : Sr(Le(y), 292), y && pv(p)) { var C = (lt(p) + "e").split("e"), A = l(C[0] + "e" + (+C[1] + y)); return C = (lt(A) + "e").split("e"), +(C[0] + "e" + (+C[1] - y)); } return l(p); }; } var C_ = As && 1 / Ml(new As([, -0]))[1] == J ? function(o) { return new As(o); } : Ed; function r0(o) { return function(l) { var p = wr(l); return p == fe ? Mh(l) : p == Tt ? VC(l) : IC(l, o(l)); }; } function Ci(o, l, p, y, C, A, I, B) { var Y = l & x; if (!Y && typeof o != "function") throw new dn(s); var re = y ? y.length : 0; if (re || (l &= ~(E | k), y = C = r), I = I === r ? I : nr(Le(I), 0), B = B === r ? B : Le(B), re -= C ? C.length : 0, l & k) { var ne = y, se = C; y = C = r; } var ge = Y ? r : od(o), Se = [ o, l, p, y, C, ne, se, A, I, B ]; if (ge && F_(Se, ge), o = Se[0], l = Se[1], p = Se[2], y = Se[3], C = Se[4], B = Se[9] = Se[9] === r ? Y ? 0 : o.length : nr(Se[9] - re, 0), !B && l & (_ | P) && (l &= ~(_ | P)), !l || l == S) var Ee = S_(o, l, p); else l == _ || l == P ? Ee = w_(o, l, B) : (l == E || l == (S | E)) && !C.length ? Ee = x_(o, l, p, y) : Ee = rc.apply(r, Se); var Be = ge ? Nv : d0; return p0(Be(Ee, Se), o, l); } function n0(o, l, p, y) { return o === r || Nn(o, Ts[p]) && !yt.call(y, p) ? l : o; } function i0(o, l, p, y, C, A) { return Lt(o) && Lt(l) && (A.set(l, o), Zl(o, l, r, i0, A), A.delete(l)), o; } function __(o) { return Qo(o) ? r : o; } function a0(o, l, p, y, C, A) { var I = p & m, B = o.length, Y = l.length; if (B != Y && !(I && Y > B)) return !1; var re = A.get(o), ne = A.get(l); if (re && ne) return re == l && ne == o; var se = -1, ge = !0, Se = p & b ? new Da() : r; for (A.set(o, l), A.set(l, o); ++se < B; ) { var Ee = o[se], Be = l[se]; if (y) var Te = I ? y(Be, Ee, se, l, o, A) : y(Ee, Be, se, o, l, A); if (Te !== r) { if (Te) continue; ge = !1; break; } if (Se) { if (!Ah(l, function(Ye, Qe) { if (!No(Se, Qe) && (Ee === Ye || C(Ee, Ye, p, y, A))) return Se.push(Qe); })) { ge = !1; break; } } else if (!(Ee === Be || C(Ee, Be, p, y, A))) { ge = !1; break; } } return A.delete(o), A.delete(l), ge; } function P_(o, l, p, y, C, A, I) { switch (p) { case yr: if (o.byteLength != l.byteLength || o.byteOffset != l.byteOffset) return !1; o = o.buffer, l = l.buffer; case $t: return !(o.byteLength != l.byteLength || !A(new Vl(o), new Vl(l))); case Fe: case qe: case xe: return Nn(+o, +l); case et: return o.name == l.name && o.message == l.message; case Et: case Ut: return o == l + ""; case fe: var B = Mh; case Tt: var Y = y & m; if (B || (B = Ml), o.size != l.size && !Y) return !1; var re = I.get(o); if (re) return re == l; y |= b, I.set(o, l); var ne = a0(B(o), B(l), y, C, A, I); return I.delete(o), ne; case At: if (zo) return zo.call(o) == zo.call(l); } return !1; } function E_(o, l, p, y, C, A) { var I = p & m, B = ad(o), Y = B.length, re = ad(l), ne = re.length; if (Y != ne && !I) return !1; for (var se = Y; se--; ) { var ge = B[se]; if (!(I ? ge in l : yt.call(l, ge))) return !1; } var Se = A.get(o), Ee = A.get(l); if (Se && Ee) return Se == l && Ee == o; var Be = !0; A.set(o, l), A.set(l, o); for (var Te = I; ++se < Y; ) { ge = B[se]; var Ye = o[ge], Qe = l[ge]; if (y) var Zr = I ? y(Qe, Ye, ge, l, o, A) : y(Ye, Qe, ge, o, l, A); if (!(Zr === r ? Ye === Qe || C(Ye, Qe, p, y, A) : Zr)) { Be = !1; break; } Te || (Te = ge == "constructor"); } if (Be && !Te) { var Or = o.constructor, $r = l.constructor; Or != $r && "constructor" in o && "constructor" in l && !(typeof Or == "function" && Or instanceof Or && typeof $r == "function" && $r instanceof $r) && (Be = !1); } return A.delete(o), A.delete(l), Be; } function _i(o) { return dd(f0(o, r, S0), o + ""); } function ad(o) { return Pv(o, sr, ld); } function sd(o) { return Pv(o, Br, s0); } var od = Yl ? function(o) { return Yl.get(o); } : Ed; function sc(o) { for (var l = o.name + "", p = Os[l], y = yt.call(Os, l) ? p.length : 0; y--; ) { var C = p[y], A = C.func; if (A == null || A == o) return C.name; } return l; } function Ds(o) { var l = yt.call(T, "placeholder") ? T : o; return l.placeholder; } function _e() { var o = T.iteratee || _d; return o = o === _d ? Av : o, arguments.length ? o(arguments[0], arguments[1]) : o; } function oc(o, l) { var p = o.__data__; return M_(l) ? p[typeof l == "string" ? "string" : "hash"] : p.map; } function ud(o) { for (var l = sr(o), p = l.length; p--; ) { var y = l[p], C = o[y]; l[p] = [y, C, l0(C)]; } return l; } function Na(o, l) { var p = BC(o, l); return Tv(p) ? p : r; } function T_(o) { var l = yt.call(o, ka), p = o[ka]; try { o[ka] = r; var y = !0; } catch { } var C = Fl.call(o); return y && (l ? o[ka] = p : delete o[ka]), C; } var ld = Nh ? function(o) { return o == null ? [] : (o = _t(o), Yi(Nh(o), function(l) { return hv.call(o, l); })); } : Td, s0 = Nh ? function(o) { for (var l = []; o; ) qi(l, ld(o)), o = zl(o); return l; } : Td, wr = Tr; (Bh && wr(new Bh(new ArrayBuffer(1))) != yr || Fo && wr(new Fo()) != fe || Fh && wr(Fh.resolve()) != jt || As && wr(new As()) != Tt || jo && wr(new jo()) != vr) && (wr = function(o) { var l = Tr(o), p = l == je ? o.constructor : r, y = p ? Ba(p) : ""; if (y) switch (y) { case l4: return yr; case c4: return fe; case f4: return jt; case h4: return Tt; case d4: return vr; } return l; }); function A_(o, l, p) { for (var y = -1, C = p.length; ++y < C; ) { var A = p[y], I = A.size; switch (A.type) { case "drop": o += I; break; case "dropRight": l -= I; break; case "take": l = Sr(l, o + I); break; case "takeRight": o = nr(o, l - I); break; } } return { start: o, end: l }; } function O_(o) { var l = o.match(Xn); return l ? l[1].split(L) : []; } function o0(o, l, p) { l = Zi(l, o); for (var y = -1, C = l.length, A = !1; ++y < C; ) { var I = Zn(l[y]); if (!(A = o != null && p(o, I))) break; o = o[I]; } return A || ++y != C ? A : (C = o == null ? 0 : o.length, !!C && pc(C) && Pi(I, C) && (De(o) || Fa(o))); } function R_(o) { var l = o.length, p = new o.constructor(l); return l && typeof o[0] == "string" && yt.call(o, "index") && (p.index = o.index, p.input = o.input), p; } function u0(o) { return typeof o.constructor == "function" && !Ko(o) ? Rs(zl(o)) : {}; } function k_(o, l, p) { var y = o.constructor; switch (l) { case $t: return rd(o); case Fe: case qe: return new y(+o); case yr: return p_(o, p); case mi: case yi: case qn: case Wi: case Ui: case Pa: case Ea: case Yr: case Kn: return Uv(o, p); case fe: return new y(); case xe: case Ut: return new y(o); case Et: return g_(o); case Tt: return new y(); case At: return m_(o); } } function I_(o, l) { var p = l.length; if (!p) return o; var y = p - 1; return l[y] = (p > 1 ? "& " : "") + l[y], l = l.join(p > 2 ? ", " : " "), o.replace(Po, `{ /* [wrapped with ` + l + `] */ `); } function D_(o) { return De(o) || Fa(o) || !!(dv && o && o[dv]); } function Pi(o, l) { var p = typeof o; return l = l ?? te, !!l && (p == "number" || p != "symbol" && kt.test(o)) && o > -1 && o % 1 == 0 && o < l; } function Ar(o, l, p) { if (!Lt(p)) return !1; var y = typeof l; return (y == "number" ? Nr(p) && Pi(l, p.length) : y == "string" && l in p) ? Nn(p[l], o) : !1; } function cd(o, l) { if (De(o)) return !1; var p = typeof o; return p == "number" || p == "symbol" || p == "boolean" || o == null || Jr(o) ? !0 : fs.test(o) || !cs.test(o) || l != null && o in _t(l); } function M_(o) { var l = typeof o; return l == "string" || l == "number" || l == "symbol" || l == "boolean" ? o !== "__proto__" : o === null; } function fd(o) { var l = sc(o), p = T[l]; if (typeof p != "function" || !(l in Ke.prototype)) return !1; if (o === p) return !0; var y = od(p); return !!y && o === y[0]; } function L_(o) { return !!lv && lv in o; } var N_ = Nl ? Ei : Ad; function Ko(o) { var l = o && o.constructor, p = typeof l == "function" && l.prototype || Ts; return o === p; } function l0(o) { return o === o && !Lt(o); } function c0(o, l) { return function(p) { return p == null ? !1 : p[o] === l && (l !== r || o in _t(p)); }; } function B_(o) { var l = hc(o, function(y) { return p.size === f && p.clear(), y; }), p = l.cache; return l; } function F_(o, l) { var p = o[1], y = l[1], C = p | y, A = C < (S | x | D), I = y == D && p == _ || y == D && p == V && o[7].length <= l[8] || y == (D | V) && l[7].length <= l[8] && p == _; if (!(A || I)) return o; y & S && (o[2] = l[2], C |= p & S ? 0 : w); var B = l[3]; if (B) { var Y = o[3]; o[3] = Y ? Yv(Y, B, l[4]) : B, o[4] = Y ? Ki(o[3], h) : l[4]; } return B = l[5], B && (Y = o[5], o[5] = Y ? qv(Y, B, l[6]) : B, o[6] = Y ? Ki(o[5], h) : l[6]), B = l[7], B && (o[7] = B), y & D && (o[8] = o[8] == null ? l[8] : Sr(o[8], l[8])), o[9] == null && (o[9] = l[9]), o[0] = l[0], o[1] = C, o; } function j_(o) { var l = []; if (o != null) for (var p in _t(o)) l.push(p); return l; } function V_(o) { return Fl.call(o); } function f0(o, l, p) { return l = nr(l === r ? o.length - 1 : l, 0), function() { for (var y = arguments, C = -1, A = nr(y.length - l, 0), I = Q(A); ++C < A; ) I[C] = y[l + C]; C = -1; for (var B = Q(l + 1); ++C < l; ) B[C] = y[C]; return B[l] = p(I), Kr(o, this, B); }; } function h0(o, l) { return l.length < 2 ? o : La(o, mn(l, 0, -1)); } function z_(o, l) { for (var p = o.length, y = Sr(l.length, p), C = Lr(o); y--; ) { var A = l[y]; o[y] = Pi(A, p) ? C[A] : r; } return o; } function hd(o, l) { if (!(l === "constructor" && typeof o[l] == "function") && l != "__proto__") return o[l]; } var d0 = g0(Nv), Xo = r4 || function(o, l) { return Me.setTimeout(o, l); }, dd = g0(c_); function p0(o, l, p) { var y = l + ""; return dd(o, I_(y, G_(O_(y), p))); } function g0(o) { var l = 0, p = 0; return function() { var y = s4(), C = F - (y - p); if (p = y, C > 0) { if (++l >= ie) return arguments[0]; } else l = 0; return o.apply(r, arguments); }; } function uc(o, l) { var p = -1, y = o.length, C = y - 1; for (l = l === r ? y : l; ++p < l; ) { var A = Xh(p, C), I = o[A]; o[A] = o[p], o[p] = I; } return o.length = l, o; } var m0 = B_(function(o) { var l = []; return o.charCodeAt(0) === 46 && l.push(""), o.replace(qr, function(p, y, C, A) { l.push(C ? A.replace(Pe, "$1") : y || p); }), l; }); function Zn(o) { if (typeof o == "string" || Jr(o)) return o; var l = o + ""; return l == "0" && 1 / o == -J ? "-0" : l; } function Ba(o) { if (o != null) { try { return Bl.call(o); } catch { } try { return o + ""; } catch { } } return ""; } function G_(o, l) { return hn(Re, function(p) { var y = "_." + p[0]; l & p[1] && !Il(o, y) && o.push(y); }), o.sort(); } function v0(o) { if (o instanceof Ke) return o.clone(); var l = new pn(o.__wrapped__, o.__chain__); return l.__actions__ = Lr(o.__actions__), l.__index__ = o.__index__, l.__values__ = o.__values__, l; } function W_(o, l, p) { (p ? Ar(o, l, p) : l === r) ? l = 1 : l = nr(Le(l), 0); var y = o == null ? 0 : o.length; if (!y || l < 1) return []; for (var C = 0, A = 0, I = Q(Ul(y / l)); C < y; ) I[A++] = mn(o, C, C += l); return I; } function U_(o) { for (var l = -1, p = o == null ? 0 : o.length, y = 0, C = []; ++l < p; ) { var A = o[l]; A && (C[y++] = A); } return C; } function H_() { var o = arguments.length; if (!o) return []; for (var l = Q(o - 1), p = arguments[0], y = o; y--; ) l[y - 1] = arguments[y]; return qi(De(p) ? Lr(p) : [p], hr(l, 1)); } var Y_ = ze(function(o, l) { return Ht(o) ? Wo(o, hr(l, 1, Ht, !0)) : []; }), q_ = ze(function(o, l) { var p = vn(l); return Ht(p) && (p = r), Ht(o) ? Wo(o, hr(l, 1, Ht, !0), _e(p, 2)) : []; }), K_ = ze(function(o, l) { var p = vn(l); return Ht(p) && (p = r), Ht(o) ? Wo(o, hr(l, 1, Ht, !0), r, p) : []; }); function X_(o, l, p) { var y = o == null ? 0 : o.length; return y ? (l = p || l === r ? 1 : Le(l), mn(o, l < 0 ? 0 : l, y)) : []; } function Q_(o, l, p) { var y = o == null ? 0 : o.length; return y ? (l = p || l === r ? 1 : Le(l), l = y - l, mn(o, 0, l < 0 ? 0 : l)) : []; } function J_(o, l) { return o && o.length ? ec(o, _e(l, 3), !0, !0) : []; } function Z_(o, l) { return o && o.length ? ec(o, _e(l, 3), !0) : []; } function $_(o, l, p, y) { var C = o == null ? 0 : o.length; return C ? (p && typeof p != "number" && Ar(o, l, p) && (p = 0, y = C), H4(o, l, p, y)) : []; } function y0(o, l, p) { var y = o == null ? 0 : o.length; if (!y) return -1; var C = p == null ? 0 : Le(p); return C < 0 && (C = nr(y + C, 0)), Dl(o, _e(l, 3), C); } function b0(o, l, p) { var y = o == null ? 0 : o.length; if (!y) return -1; var C = y - 1; return p !== r && (C = Le(p), C = p < 0 ? nr(y + C, 0) : Sr(C, y - 1)), Dl(o, _e(l, 3), C, !0); } function S0(o) { var l = o == null ? 0 : o.length; return l ? hr(o, 1) : []; } function eP(o) { var l = o == null ? 0 : o.length; return l ? hr(o, J) : []; } function tP(o, l) { var p = o == null ? 0 : o.length; return p ? (l = l === r ? 1 : Le(l), hr(o, l)) : []; } function rP(o) { for (var l = -1, p = o == null ? 0 : o.length, y = {}; ++l < p; ) { var C = o[l]; y[C[0]] = C[1]; } return y; } function w0(o) { return o && o.length ? o[0] : r; } function nP(o, l, p) { var y = o == null ? 0 : o.length; if (!y) return -1; var C = p == null ? 0 : Le(p); return C < 0 && (C = nr(y + C, 0)), Cs(o, l, C); } function iP(o) { var l = o == null ? 0 : o.length; return l ? mn(o, 0, -1) : []; } var aP = ze(function(o) { var l = It(o, ed); return l.length && l[0] === o[0] ? Uh(l) : []; }), sP = ze(function(o) { var l = vn(o), p = It(o, ed); return l === vn(p) ? l = r : p.pop(), p.length && p[0] === o[0] ? Uh(p, _e(l, 2)) : []; }), oP = ze(function(o) { var l = vn(o), p = It(o, ed); return l = typeof l == "function" ? l : r, l && p.pop(), p.length && p[0] === o[0] ? Uh(p, r, l) : []; }); function uP(o, l) { return o == null ? "" : i4.call(o, l); } function vn(o) { var l = o == null ? 0 : o.length; return l ? o[l - 1] : r; } function lP(o, l, p) { var y = o == null ? 0 : o.length; if (!y) return -1; var C = y; return p !== r && (C = Le(p), C = C < 0 ? nr(y + C, 0) : Sr(C, y - 1)), l === l ? GC(o, l, C) : Dl(o, tv, C, !0); } function cP(o, l) { return o && o.length ? Iv(o, Le(l)) : r; } var fP = ze(x0); function x0(o, l) { return o && o.length && l && l.length ? Kh(o, l) : o; } function hP(o, l, p) { return o && o.length && l && l.length ? Kh(o, l, _e(p, 2)) : o; } function dP(o, l, p) { return o && o.length && l && l.length ? Kh(o, l, r, p) : o; } var pP = _i(function(o, l) { var p = o == null ? 0 : o.length, y = Vh(o, l); return Lv(o, It(l, function(C) { return Pi(C, p) ? +C : C; }).sort(Hv)), y; }); function gP(o, l) { var p = []; if (!(o && o.length)) return p; var y = -1, C = [], A = o.length; for (l = _e(l, 3); ++y < A; ) { var I = o[y]; l(I, y, o) && (p.push(I), C.push(y)); } return Lv(o, C), p; } function pd(o) { return o == null ? o : u4.call(o); } function mP(o, l, p) { var y = o == null ? 0 : o.length; return y ? (p && typeof p != "number" && Ar(o, l, p) ? (l = 0, p = y) : (l = l == null ? 0 : Le(l), p = p === r ? y : Le(p)), mn(o, l, p)) : []; } function vP(o, l) { return $l(o, l); } function yP(o, l, p) { return Jh(o, l, _e(p, 2)); } function bP(o, l) { var p = o == null ? 0 : o.length; if (p) { var y = $l(o, l); if (y < p && Nn(o[y], l)) return y; } return -1; } function SP(o, l) { return $l(o, l, !0); } function wP(o, l, p) { return Jh(o, l, _e(p, 2), !0); } function xP(o, l) { var p = o == null ? 0 : o.length; if (p) { var y = $l(o, l, !0) - 1; if (Nn(o[y], l)) return y; } return -1; } function CP(o) { return o && o.length ? Bv(o) : []; } function _P(o, l) { return o && o.length ? Bv(o, _e(l, 2)) : []; } function PP(o) { var l = o == null ? 0 : o.length; return l ? mn(o, 1, l) : []; } function EP(o, l, p) { return o && o.length ? (l = p || l === r ? 1 : Le(l), mn(o, 0, l < 0 ? 0 : l)) : []; } function TP(o, l, p) { var y = o == null ? 0 : o.length; return y ? (l = p || l === r ? 1 : Le(l), l = y - l, mn(o, l < 0 ? 0 : l, y)) : []; } function AP(o, l) { return o && o.length ? ec(o, _e(l, 3), !1, !0) : []; } function OP(o, l) { return o && o.length ? ec(o, _e(l, 3)) : []; } var RP = ze(function(o) { return Ji(hr(o, 1, Ht, !0)); }), kP = ze(function(o) { var l = vn(o); return Ht(l) && (l = r), Ji(hr(o, 1, Ht, !0), _e(l, 2)); }), IP = ze(function(o) { var l = vn(o); return l = typeof l == "function" ? l : r, Ji(hr(o, 1, Ht, !0), r, l); }); function DP(o) { return o && o.length ? Ji(o) : []; } function MP(o, l) { return o && o.length ? Ji(o, _e(l, 2)) : []; } function LP(o, l) { return l = typeof l == "function" ? l : r, o && o.length ? Ji(o, r, l) : []; } function gd(o) { if (!(o && o.length)) return []; var l = 0; return o = Yi(o, function(p) { if (Ht(p)) return l = nr(p.length, l), !0; }), Ih(l, function(p) { return It(o, Oh(p)); }); } function C0(o, l) { if (!(o && o.length)) return []; var p = gd(o); return l == null ? p : It(p, function(y) { return Kr(l, r, y); }); } var NP = ze(function(o, l) { return Ht(o) ? Wo(o, l) : []; }), BP = ze(function(o) { return $h(Yi(o, Ht)); }), FP = ze(function(o) { var l = vn(o); return Ht(l) && (l = r), $h(Yi(o, Ht), _e(l, 2)); }), jP = ze(function(o) { var l = vn(o); return l = typeof l == "function" ? l : r, $h(Yi(o, Ht), r, l); }), VP = ze(gd); function zP(o, l) { return zv(o || [], l || [], Go); } function GP(o, l) { return zv(o || [], l || [], Yo); } var WP = ze(function(o) { var l = o.length, p = l > 1 ? o[l - 1] : r; return p = typeof p == "function" ? (o.pop(), p) : r, C0(o, p); }); function _0(o) { var l = T(o); return l.__chain__ = !0, l; } function UP(o, l) { return l(o), o; } function lc(o, l) { return l(o); } var HP = _i(function(o) { var l = o.length, p = l ? o[0] : 0, y = this.__wrapped__, C = function(A) { return Vh(A, o); }; return l > 1 || this.__actions__.length || !(y instanceof Ke) || !Pi(p) ? this.thru(C) : (y = y.slice(p, +p + (l ? 1 : 0)), y.__actions__.push({ func: lc, args: [C], thisArg: r }), new pn(y, this.__chain__).thru(function(A) { return l && !A.length && A.push(r), A; })); }); function YP() { return _0(this); } function qP() { return new pn(this.value(), this.__chain__); } function KP() { this.__values__ === r && (this.__values__ = F0(this.value())); var o = this.__index__ >= this.__values__.length, l = o ? r : this.__values__[this.__index__++]; return { done: o, value: l }; } function XP() { return this; } function QP(o) { for (var l, p = this; p instanceof Kl; ) { var y = v0(p); y.__index__ = 0, y.__values__ = r, l ? C.__wrapped__ = y : l = y; var C = y; p = p.__wrapped__; } return C.__wrapped__ = o, l; } function JP() { var o = this.__wrapped__; if (o instanceof Ke) { var l = o; return this.__actions__.length && (l = new Ke(this)), l = l.reverse(), l.__actions__.push({ func: lc, args: [pd], thisArg: r }), new pn(l, this.__chain__); } return this.thru(pd); } function ZP() { return Vv(this.__wrapped__, this.__actions__); } var $P = tc(function(o, l, p) { yt.call(o, p) ? ++o[p] : xi(o, p, 1); }); function eE(o, l, p) { var y = De(o) ? $m : U4; return p && Ar(o, l, p) && (l = r), y(o, _e(l, 3)); } function tE(o, l) { var p = De(o) ? Yi : Cv; return p(o, _e(l, 3)); } var rE = Jv(y0), nE = Jv(b0); function iE(o, l) { return hr(cc(o, l), 1); } function aE(o, l) { return hr(cc(o, l), J); } function sE(o, l, p) { return p = p === r ? 1 : Le(p), hr(cc(o, l), p); } function P0(o, l) { var p = De(o) ? hn : Qi; return p(o, _e(l, 3)); } function E0(o, l) { var p = De(o) ? PC : xv; return p(o, _e(l, 3)); } var oE = tc(function(o, l, p) { yt.call(o, p) ? o[p].push(l) : xi(o, p, [l]); }); function uE(o, l, p, y) { o = Nr(o) ? o : Ls(o), p = p && !y ? Le(p) : 0; var C = o.length; return p < 0 && (p = nr(C + p, 0)), gc(o) ? p <= C && o.indexOf(l, p) > -1 : !!C && Cs(o, l, p) > -1; } var lE = ze(function(o, l, p) { var y = -1, C = typeof l == "function", A = Nr(o) ? Q(o.length) : []; return Qi(o, function(I) { A[++y] = C ? Kr(l, I, p) : Uo(I, l, p); }), A; }), cE = tc(function(o, l, p) { xi(o, p, l); }); function cc(o, l) { var p = De(o) ? It : Ov; return p(o, _e(l, 3)); } function fE(o, l, p, y) { return o == null ? [] : (De(l) || (l = l == null ? [] : [l]), p = y ? r : p, De(p) || (p = p == null ? [] : [p]), Dv(o, l, p)); } var hE = tc(function(o, l, p) { o[p ? 0 : 1].push(l); }, function() { return [[], []]; }); function dE(o, l, p) { var y = De(o) ? Th : nv, C = arguments.length < 3; return y(o, _e(l, 4), p, C, Qi); } function pE(o, l, p) { var y = De(o) ? EC : nv, C = arguments.length < 3; return y(o, _e(l, 4), p, C, xv); } function gE(o, l) { var p = De(o) ? Yi : Cv; return p(o, dc(_e(l, 3))); } function mE(o) { var l = De(o) ? yv : u_; return l(o); } function vE(o, l, p) { (p ? Ar(o, l, p) : l === r) ? l = 1 : l = Le(l); var y = De(o) ? j4 : l_; return y(o, l); } function yE(o) { var l = De(o) ? V4 : f_; return l(o); } function bE(o) { if (o == null) return 0; if (Nr(o)) return gc(o) ? Ps(o) : o.length; var l = wr(o); return l == fe || l == Tt ? o.size : Yh(o).length; } function SE(o, l, p) { var y = De(o) ? Ah : h_; return p && Ar(o, l, p) && (l = r), y(o, _e(l, 3)); } var wE = ze(function(o, l) { if (o == null) return []; var p = l.length; return p > 1 && Ar(o, l[0], l[1]) ? l = [] : p > 2 && Ar(l[0], l[1], l[2]) && (l = [l[0]]), Dv(o, hr(l, 1), []); }), fc = t4 || function() { return Me.Date.now(); }; function xE(o, l) { if (typeof l != "function") throw new dn(s); return o = Le(o), function() { if (--o < 1) return l.apply(this, arguments); }; } function T0(o, l, p) { return l = p ? r : l, l = o && l == null ? o.length : l, Ci(o, D, r, r, r, r, l); } function A0(o, l) { var p; if (typeof l != "function") throw new dn(s); return o = Le(o), function() { return --o > 0 && (p = l.apply(this, arguments)), o <= 1 && (l = r), p; }; } var md = ze(function(o, l, p) { var y = S; if (p.length) { var C = Ki(p, Ds(md)); y |= E; } return Ci(o, y, l, p, C); }), O0 = ze(function(o, l, p) { var y = S | x; if (p.length) { var C = Ki(p, Ds(O0)); y |= E; } return Ci(l, y, o, p, C); }); function R0(o, l, p) { l = p ? r : l; var y = Ci(o, _, r, r, r, r, r, l); return y.placeholder = R0.placeholder, y; } function k0(o, l, p) { l = p ? r : l; var y = Ci(o, P, r, r, r, r, r, l); return y.placeholder = k0.placeholder, y; } function I0(o, l, p) { var y, C, A, I, B, Y, re = 0, ne = !1, se = !1, ge = !0; if (typeof o != "function") throw new dn(s); l = yn(l) || 0, Lt(p) && (ne = !!p.leading, se = "maxWait" in p, A = se ? nr(yn(p.maxWait) || 0, l) : A, ge = "trailing" in p ? !!p.trailing : ge); function Se(Yt) { var Bn = y, Ai = C; return y = C = r, re = Yt, I = o.apply(Ai, Bn), I; } function Ee(Yt) { return re = Yt, B = Xo(Ye, l), ne ? Se(Yt) : I; } function Be(Yt) { var Bn = Yt - Y, Ai = Yt - re, J0 = l - Bn; return se ? Sr(J0, A - Ai) : J0; } function Te(Yt) { var Bn = Yt - Y, Ai = Yt - re; return Y === r || Bn >= l || Bn < 0 || se && Ai >= A; } function Ye() { var Yt = fc(); if (Te(Yt)) return Qe(Yt); B = Xo(Ye, Be(Yt)); } function Qe(Yt) { return B = r, ge && y ? Se(Yt) : (y = C = r, I); } function Zr() { B !== r && Gv(B), re = 0, y = Y = C = B = r; } function Or() { return B === r ? I : Qe(fc()); } function $r() { var Yt = fc(), Bn = Te(Yt); if (y = arguments, C = this, Y = Yt, Bn) { if (B === r) return Ee(Y); if (se) return Gv(B), B = Xo(Ye, l), Se(Y); } return B === r && (B = Xo(Ye, l)), I; } return $r.cancel = Zr, $r.flush = Or, $r; } var CE = ze(function(o, l) { return wv(o, 1, l); }), _E = ze(function(o, l, p) { return wv(o, yn(l) || 0, p); }); function PE(o) { return Ci(o, H); } function hc(o, l) { if (typeof o != "function" || l != null && typeof l != "function") throw new dn(s); var p = function() { var y = arguments, C = l ? l.apply(this, y) : y[0], A = p.cache; if (A.has(C)) return A.get(C); var I = o.apply(this, y); return p.cache = A.set(C, I) || A, I; }; return p.cache = new (hc.Cache || wi)(), p; } hc.Cache = wi; function dc(o) { if (typeof o != "function") throw new dn(s); return function() { var l = arguments; switch (l.length) { case 0: return !o.call(this); case 1: return !o.call(this, l[0]); case 2: return !o.call(this, l[0], l[1]); case 3: return !o.call(this, l[0], l[1], l[2]); } return !o.apply(this, l); }; } function EE(o) { return A0(2, o); } var TE = d_(function(o, l) { l = l.length == 1 && De(l[0]) ? It(l[0], Xr(_e())) : It(hr(l, 1), Xr(_e())); var p = l.length; return ze(function(y) { for (var C = -1, A = Sr(y.length, p); ++C < A; ) y[C] = l[C].call(this, y[C]); return Kr(o, this, y); }); }), vd = ze(function(o, l) { var p = Ki(l, Ds(vd)); return Ci(o, E, r, l, p); }), D0 = ze(function(o, l) { var p = Ki(l, Ds(D0)); return Ci(o, k, r, l, p); }), AE = _i(function(o, l) { return Ci(o, V, r, r, r, l); }); function OE(o, l) { if (typeof o != "function") throw new dn(s); return l = l === r ? l : Le(l), ze(o, l); } function RE(o, l) { if (typeof o != "function") throw new dn(s); return l = l == null ? 0 : nr(Le(l), 0), ze(function(p) { var y = p[l], C = $i(p, 0, l); return y && qi(C, y), Kr(o, this, C); }); } function kE(o, l, p) { var y = !0, C = !0; if (typeof o != "function") throw new dn(s); return Lt(p) && (y = "leading" in p ? !!p.leading : y, C = "trailing" in p ? !!p.trailing : C), I0(o, l, { leading: y, maxWait: l, trailing: C }); } function IE(o) { return T0(o, 1); } function DE(o, l) { return vd(td(l), o); } function ME() { if (!arguments.length) return []; var o = arguments[0]; return De(o) ? o : [o]; } function LE(o) { return gn(o, v); } function NE(o, l) { return l = typeof l == "function" ? l : r, gn(o, v, l); } function BE(o) { return gn(o, d | v); } function FE(o, l) { return l = typeof l == "function" ? l : r, gn(o, d | v, l); } function jE(o, l) { return l == null || Sv(o, l, sr(l)); } function Nn(o, l) { return o === l || o !== o && l !== l; } var VE = ac(Wh), zE = ac(function(o, l) { return o >= l; }), Fa = Ev(function() { return arguments; }()) ? Ev : function(o) { return Vt(o) && yt.call(o, "callee") && !hv.call(o, "callee"); }, De = Q.isArray, GE = ws ? Xr(ws) : Q4; function Nr(o) { return o != null && pc(o.length) && !Ei(o); } function Ht(o) { return Vt(o) && Nr(o); } function WE(o) { return o === !0 || o === !1 || Vt(o) && Tr(o) == Fe; } var ea = n4 || Ad, UE = xs ? Xr(xs) : J4; function HE(o) { return Vt(o) && o.nodeType === 1 && !Qo(o); } function YE(o) { if (o == null) return !0; if (Nr(o) && (De(o) || typeof o == "string" || typeof o.splice == "function" || ea(o) || Ms(o) || Fa(o))) return !o.length; var l = wr(o); if (l == fe || l == Tt) return !o.size; if (Ko(o)) return !Yh(o).length; for (var p in o) if (yt.call(o, p)) return !1; return !0; } function qE(o, l) { return Ho(o, l); } function KE(o, l, p) { p = typeof p == "function" ? p : r; var y = p ? p(o, l) : r; return y === r ? Ho(o, l, r, p) : !!y; } function yd(o) { if (!Vt(o)) return !1; var l = Tr(o); return l == et || l == St || typeof o.message == "string" && typeof o.name == "string" && !Qo(o); } function XE(o) { return typeof o == "number" && pv(o); } function Ei(o) { if (!Lt(o)) return !1; var l = Tr(o); return l == Z || l == mt || l == ot || l == cr; } function M0(o) { return typeof o == "number" && o == Le(o); } function pc(o) { return typeof o == "number" && o > -1 && o % 1 == 0 && o <= te; } function Lt(o) { var l = typeof o; return o != null && (l == "object" || l == "function"); } function Vt(o) { return o != null && typeof o == "object"; } var L0 = Lo ? Xr(Lo) : $4; function QE(o, l) { return o === l || Hh(o, l, ud(l)); } function JE(o, l, p) { return p = typeof p == "function" ? p : r, Hh(o, l, ud(l), p); } function ZE(o) { return N0(o) && o != +o; } function $E(o) { if (N_(o)) throw new Ie(a); return Tv(o); } function eT(o) { return o === null; } function tT(o) { return o == null; } function N0(o) { return typeof o == "number" || Vt(o) && Tr(o) == xe; } function Qo(o) { if (!Vt(o) || Tr(o) != je) return !1; var l = zl(o); if (l === null) return !0; var p = yt.call(l, "constructor") && l.constructor; return typeof p == "function" && p instanceof p && Bl.call(p) == JC; } var bd = Qm ? Xr(Qm) : e_; function rT(o) { return M0(o) && o >= -te && o <= te; } var B0 = Jm ? Xr(Jm) : t_; function gc(o) { return typeof o == "string" || !De(o) && Vt(o) && Tr(o) == Ut; } function Jr(o) { return typeof o == "symbol" || Vt(o) && Tr(o) == At; } var Ms = Zm ? Xr(Zm) : r_; function nT(o) { return o === r; } function iT(o) { return Vt(o) && wr(o) == vr; } function aT(o) { return Vt(o) && Tr(o) == un; } var sT = ac(qh), oT = ac(function(o, l) { return o <= l; }); function F0(o) { if (!o) return []; if (Nr(o)) return gc(o) ? Mn(o) : Lr(o); if (Bo && o[Bo]) return jC(o[Bo]()); var l = wr(o), p = l == fe ? Mh : l == Tt ? Ml : Ls; return p(o); } function Ti(o) { if (!o) return o === 0 ? o : 0; if (o = yn(o), o === J || o === -J) { var l = o < 0 ? -1 : 1; return l * ee; } return o === o ? o : 0; } function Le(o) { var l = Ti(o), p = l % 1; return l === l ? p ? l - p : l : 0; } function j0(o) { return o ? Ma(Le(o), 0, le) : 0; } function yn(o) { if (typeof o == "number") return o; if (Jr(o)) return ae; if (Lt(o)) { var l = typeof o.valueOf == "function" ? o.valueOf() : o; o = Lt(l) ? l + "" : l; } if (typeof o != "string") return o === 0 ? o : +o; o = iv(o); var p = Ne.test(o); return p || Ot.test(o) ? me(o.slice(2), p ? 2 : 8) : We.test(o) ? ae : +o; } function V0(o) { return Jn(o, Br(o)); } function uT(o) { return o ? Ma(Le(o), -te, te) : o === 0 ? o : 0; } function lt(o) { return o == null ? "" : Qr(o); } var lT = ks(function(o, l) { if (Ko(l) || Nr(l)) { Jn(l, sr(l), o); return; } for (var p in l) yt.call(l, p) && Go(o, p, l[p]); }), z0 = ks(function(o, l) { Jn(l, Br(l), o); }), mc = ks(function(o, l, p, y) { Jn(l, Br(l), o, y); }), cT = ks(function(o, l, p, y) { Jn(l, sr(l), o, y); }), fT = _i(Vh); function hT(o, l) { var p = Rs(o); return l == null ? p : bv(p, l); } var dT = ze(function(o, l) { o = _t(o); var p = -1, y = l.length, C = y > 2 ? l[2] : r; for (C && Ar(l[0], l[1], C) && (y = 1); ++p < y; ) for (var A = l[p], I = Br(A), B = -1, Y = I.length; ++B < Y; ) { var re = I[B], ne = o[re]; (ne === r || Nn(ne, Ts[re]) && !yt.call(o, re)) && (o[re] = A[re]); } return o; }), pT = ze(function(o) { return o.push(r, i0), Kr(G0, r, o); }); function gT(o, l) { return ev(o, _e(l, 3), Qn); } function mT(o, l) { return ev(o, _e(l, 3), Gh); } function vT(o, l) { return o == null ? o : zh(o, _e(l, 3), Br); } function yT(o, l) { return o == null ? o : _v(o, _e(l, 3), Br); } function bT(o, l) { return o && Qn(o, _e(l, 3)); } function ST(o, l) { return o && Gh(o, _e(l, 3)); } function wT(o) { return o == null ? [] : Jl(o, sr(o)); } function xT(o) { return o == null ? [] : Jl(o, Br(o)); } function Sd(o, l, p) { var y = o == null ? r : La(o, l); return y === r ? p : y; } function CT(o, l) { return o != null && o0(o, l, Y4); } function wd(o, l) { return o != null && o0(o, l, q4); } var _T = $v(function(o, l, p) { l != null && typeof l.toString != "function" && (l = Fl.call(l)), o[l] = p; }, Cd(Fr)), PT = $v(function(o, l, p) { l != null && typeof l.toString != "function" && (l = Fl.call(l)), yt.call(o, l) ? o[l].push(p) : o[l] = [p]; }, _e), ET = ze(Uo); function sr(o) { return Nr(o) ? vv(o) : Yh(o); } function Br(o) { return Nr(o) ? vv(o, !0) : n_(o); } function TT(o, l) { var p = {}; return l = _e(l, 3), Qn(o, function(y, C, A) { xi(p, l(y, C, A), y); }), p; } function AT(o, l) { var p = {}; return l = _e(l, 3), Qn(o, function(y, C, A) { xi(p, C, l(y, C, A)); }), p; } var OT = ks(function(o, l, p) { Zl(o, l, p); }), G0 = ks(function(o, l, p, y) { Zl(o, l, p, y); }), RT = _i(function(o, l) { var p = {}; if (o == null) return p; var y = !1; l = It(l, function(A) { return A = Zi(A, o), y || (y = A.length > 1), A; }), Jn(o, sd(o), p), y && (p = gn(p, d | g | v, __)); for (var C = l.length; C--; ) Zh(p, l[C]); return p; }); function kT(o, l) { return W0(o, dc(_e(l))); } var IT = _i(function(o, l) { return o == null ? {} : a_(o, l); }); function W0(o, l) { if (o == null) return {}; var p = It(sd(o), function(y) { return [y]; }); return l = _e(l), Mv(o, p, function(y, C) { return l(y, C[0]); }); } function DT(o, l, p) { l = Zi(l, o); var y = -1, C = l.length; for (C || (C = 1, o = r); ++y < C; ) { var A = o == null ? r : o[Zn(l[y])]; A === r && (y = C, A = p), o = Ei(A) ? A.call(o) : A; } return o; } function MT(o, l, p) { return o == null ? o : Yo(o, l, p); } function LT(o, l, p, y) { return y = typeof y == "function" ? y : r, o == null ? o : Yo(o, l, p, y); } var U0 = r0(sr), H0 = r0(Br); function NT(o, l, p) { var y = De(o), C = y || ea(o) || Ms(o); if (l = _e(l, 4), p == null) { var A = o && o.constructor; C ? p = y ? new A() : [] : Lt(o) ? p = Ei(A) ? Rs(zl(o)) : {} : p = {}; } return (C ? hn : Qn)(o, function(I, B, Y) { return l(p, I, B, Y); }), p; } function BT(o, l) { return o == null ? !0 : Zh(o, l); } function FT(o, l, p) { return o == null ? o : jv(o, l, td(p)); } function jT(o, l, p, y) { return y = typeof y == "function" ? y : r, o == null ? o : jv(o, l, td(p), y); } function Ls(o) { return o == null ? [] : Dh(o, sr(o)); } function VT(o) { return o == null ? [] : Dh(o, Br(o)); } function zT(o, l, p) { return p === r && (p = l, l = r), p !== r && (p = yn(p), p = p === p ? p : 0), l !== r && (l = yn(l), l = l === l ? l : 0), Ma(yn(o), l, p); } function GT(o, l, p) { return l = Ti(l), p === r ? (p = l, l = 0) : p = Ti(p), o = yn(o), K4(o, l, p); } function WT(o, l, p) { if (p && typeof p != "boolean" && Ar(o, l, p) && (l = p = r), p === r && (typeof l == "boolean" ? (p = l, l = r) : typeof o == "boolean" && (p = o, o = r)), o === r && l === r ? (o = 0, l = 1) : (o = Ti(o), l === r ? (l = o, o = 0) : l = Ti(l)), o > l) { var y = o; o = l, l = y; } if (p || o % 1 || l % 1) { var C = gv(); return Sr(o + C * (l - o + X("1e-" + ((C + "").length - 1))), l); } return Xh(o, l); } var UT = Is(function(o, l, p) { return l = l.toLowerCase(), o + (p ? Y0(l) : l); }); function Y0(o) { return xd(lt(o).toLowerCase()); } function q0(o) { return o = lt(o), o && o.replace(br, MC).replace(Al, ""); } function HT(o, l, p) { o = lt(o), l = Qr(l); var y = o.length; p = p === r ? y : Ma(Le(p), 0, y); var C = p; return p -= l.length, p >= 0 && o.slice(p, C) == l; } function YT(o) { return o = lt(o), o && fn.test(o) ? o.replace(cn, LC) : o; } function qT(o) { return o = lt(o), o && hs.test(o) ? o.replace(Aa, "\\$&") : o; } var KT = Is(function(o, l, p) { return o + (p ? "-" : "") + l.toLowerCase(); }), XT = Is(function(o, l, p) { return o + (p ? " " : "") + l.toLowerCase(); }), QT = Qv("toLowerCase"); function JT(o, l, p) { o = lt(o), l = Le(l); var y = l ? Ps(o) : 0; if (!l || y >= l) return o; var C = (l - y) / 2; return ic(Hl(C), p) + o + ic(Ul(C), p); } function ZT(o, l, p) { o = lt(o), l = Le(l); var y = l ? Ps(o) : 0; return l && y < l ? o + ic(l - y, p) : o; } function $T(o, l, p) { o = lt(o), l = Le(l); var y = l ? Ps(o) : 0; return l && y < l ? ic(l - y, p) + o : o; } function eA(o, l, p) { return p || l == null ? l = 0 : l && (l = +l), o4(lt(o).replace(Oa, ""), l || 0); } function tA(o, l, p) { return (p ? Ar(o, l, p) : l === r) ? l = 1 : l = Le(l), Qh(lt(o), l); } function rA() { var o = arguments, l = lt(o[0]); return o.length < 3 ? l : l.replace(o[1], o[2]); } var nA = Is(function(o, l, p) { return o + (p ? "_" : "") + l.toLowerCase(); }); function iA(o, l, p) { return p && typeof p != "number" && Ar(o, l, p) && (l = p = r), p = p === r ? le : p >>> 0, p ? (o = lt(o), o && (typeof l == "string" || l != null && !bd(l)) && (l = Qr(l), !l && _s(o)) ? $i(Mn(o), 0, p) : o.split(l, p)) : []; } var aA = Is(function(o, l, p) { return o + (p ? " " : "") + xd(l); }); function sA(o, l, p) { return o = lt(o), p = p == null ? 0 : Ma(Le(p), 0, o.length), l = Qr(l), o.slice(p, p + l.length) == l; } function oA(o, l, p) { var y = T.templateSettings; p && Ar(o, l, p) && (l = r), o = lt(o), l = mc({}, l, y, n0); var C = mc({}, l.imports, y.imports, n0), A = sr(C), I = Dh(C, A), B, Y, re = 0, ne = l.interpolate || Pr, se = "__p += '", ge = Lh( (l.escape || Pr).source + "|" + ne.source + "|" + (ne === ls ? Xe : Pr).source + "|" + (l.evaluate || Pr).source + "|$", "g" ), Se = "//# sourceURL=" + (yt.call(l, "sourceURL") ? (l.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++Rl + "]") + ` `; o.replace(ge, function(Te, Ye, Qe, Zr, Or, $r) { return Qe || (Qe = Zr), se += o.slice(re, $r).replace(ds, NC), Ye && (B = !0, se += `' + __e(` + Ye + `) + '`), Or && (Y = !0, se += `'; ` + Or + `; __p += '`), Qe && (se += `' + ((__t = (` + Qe + `)) == null ? '' : __t) + '`), re = $r + Te.length, Te; }), se += `'; `; var Ee = yt.call(l, "variable") && l.variable; if (!Ee) se = `with (obj) { ` + se + ` } `; else if (pe.test(Ee)) throw new Ie(u); se = (Y ? se.replace(xo, "") : se).replace(Hi, "$1").replace(os, "$1;"), se = "function(" + (Ee || "obj") + `) { ` + (Ee ? "" : `obj || (obj = {}); `) + "var __t, __p = ''" + (B ? ", __e = _.escape" : "") + (Y ? `, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } ` : `; `) + se + `return __p }`; var Be = X0(function() { return it(A, Se + "return " + se).apply(r, I); }); if (Be.source = se, yd(Be)) throw Be; return Be; } function uA(o) { return lt(o).toLowerCase(); } function lA(o) { return lt(o).toUpperCase(); } function cA(o, l, p) { if (o = lt(o), o && (p || l === r)) return iv(o); if (!o || !(l = Qr(l))) return o; var y = Mn(o), C = Mn(l), A = av(y, C), I = sv(y, C) + 1; return $i(y, A, I).join(""); } function fA(o, l, p) { if (o = lt(o), o && (p || l === r)) return o.slice(0, uv(o) + 1); if (!o || !(l = Qr(l))) return o; var y = Mn(o), C = sv(y, Mn(l)) + 1; return $i(y, 0, C).join(""); } function hA(o, l, p) { if (o = lt(o), o && (p || l === r)) return o.replace(Oa, ""); if (!o || !(l = Qr(l))) return o; var y = Mn(o), C = av(y, Mn(l)); return $i(y, C).join(""); } function dA(o, l) { var p = W, y = K; if (Lt(l)) { var C = "separator" in l ? l.separator : C; p = "length" in l ? Le(l.length) : p, y = "omission" in l ? Qr(l.omission) : y; } o = lt(o); var A = o.length; if (_s(o)) { var I = Mn(o); A = I.length; } if (p >= A) return o; var B = p - Ps(y); if (B < 1) return y; var Y = I ? $i(I, 0, B).join("") : o.slice(0, B); if (C === r) return Y + y; if (I && (B += Y.length - B), bd(C)) { if (o.slice(B).search(C)) { var re, ne = Y; for (C.global || (C = Lh(C.source, lt(Ue.exec(C)) + "g")), C.lastIndex = 0; re = C.exec(ne); ) var se = re.index; Y = Y.slice(0, se === r ? B : se); } } else if (o.indexOf(Qr(C), B) != B) { var ge = Y.lastIndexOf(C); ge > -1 && (Y = Y.slice(0, ge)); } return Y + y; } function pA(o) { return o = lt(o), o && Ta.test(o) ? o.replace(ln, WC) : o; } var gA = Is(function(o, l, p) { return o + (p ? " " : "") + l.toUpperCase(); }), xd = Qv("toUpperCase"); function K0(o, l, p) { return o = lt(o), l = p ? r : l, l === r ? FC(o) ? YC(o) : OC(o) : o.match(l) || []; } var X0 = ze(function(o, l) { try { return Kr(o, r, l); } catch (p) { return yd(p) ? p : new Ie(p); } }), mA = _i(function(o, l) { return hn(l, function(p) { p = Zn(p), xi(o, p, md(o[p], o)); }), o; }); function vA(o) { var l = o == null ? 0 : o.length, p = _e(); return o = l ? It(o, function(y) { if (typeof y[1] != "function") throw new dn(s); return [p(y[0]), y[1]]; }) : [], ze(function(y) { for (var C = -1; ++C < l; ) { var A = o[C]; if (Kr(A[0], this, y)) return Kr(A[1], this, y); } }); } function yA(o) { return W4(gn(o, d)); } function Cd(o) { return function() { return o; }; } function bA(o, l) { return o == null || o !== o ? l : o; } var SA = Zv(), wA = Zv(!0); function Fr(o) { return o; } function _d(o) { return Av(typeof o == "function" ? o : gn(o, d)); } function xA(o) { return Rv(gn(o, d)); } function CA(o, l) { return kv(o, gn(l, d)); } var _A = ze(function(o, l) { return function(p) { return Uo(p, o, l); }; }), PA = ze(function(o, l) { return function(p) { return Uo(o, p, l); }; }); function Pd(o, l, p) { var y = sr(l), C = Jl(l, y); p == null && !(Lt(l) && (C.length || !y.length)) && (p = l, l = o, o = this, C = Jl(l, sr(l))); var A = !(Lt(p) && "chain" in p) || !!p.chain, I = Ei(o); return hn(C, function(B) { var Y = l[B]; o[B] = Y, I && (o.prototype[B] = function() { var re = this.__chain__; if (A || re) { var ne = o(this.__wrapped__), se = ne.__actions__ = Lr(this.__actions__); return se.push({ func: Y, args: arguments, thisArg: o }), ne.__chain__ = re, ne; } return Y.apply(o, qi([this.value()], arguments)); }); }), o; } function EA() { return Me._ === this && (Me._ = ZC), this; } function Ed() { } function TA(o) { return o = Le(o), ze(function(l) { return Iv(l, o); }); } var AA = nd(It), OA = nd($m), RA = nd(Ah); function Q0(o) { return cd(o) ? Oh(Zn(o)) : s_(o); } function kA(o) { return function(l) { return o == null ? r : La(o, l); }; } var IA = e0(), DA = e0(!0); function Td() { return []; } function Ad() { return !1; } function MA() { return {}; } function LA() { return ""; } function NA() { return !0; } function BA(o, l) { if (o = Le(o), o < 1 || o > te) return []; var p = le, y = Sr(o, le); l = _e(l), o -= le; for (var C = Ih(y, l); ++p < o; ) l(p); return C; } function FA(o) { return De(o) ? It(o, Zn) : Jr(o) ? [o] : Lr(m0(lt(o))); } function jA(o) { var l = ++QC; return lt(o) + l; } var VA = nc(function(o, l) { return o + l; }, 0), zA = id("ceil"), GA = nc(function(o, l) { return o / l; }, 1), WA = id("floor"); function UA(o) { return o && o.length ? Ql(o, Fr, Wh) : r; } function HA(o, l) { return o && o.length ? Ql(o, _e(l, 2), Wh) : r; } function YA(o) { return rv(o, Fr); } function qA(o, l) { return rv(o, _e(l, 2)); } function KA(o) { return o && o.length ? Ql(o, Fr, qh) : r; } function XA(o, l) { return o && o.length ? Ql(o, _e(l, 2), qh) : r; } var QA = nc(function(o, l) { return o * l; }, 1), JA = id("round"), ZA = nc(function(o, l) { return o - l; }, 0); function $A(o) { return o && o.length ? kh(o, Fr) : 0; } function eO(o, l) { return o && o.length ? kh(o, _e(l, 2)) : 0; } return T.after = xE, T.ary = T0, T.assign = lT, T.assignIn = z0, T.assignInWith = mc, T.assignWith = cT, T.at = fT, T.before = A0, T.bind = md, T.bindAll = mA, T.bindKey = O0, T.castArray = ME, T.chain = _0, T.chunk = W_, T.compact = U_, T.concat = H_, T.cond = vA, T.conforms = yA, T.constant = Cd, T.countBy = $P, T.create = hT, T.curry = R0, T.curryRight = k0, T.debounce = I0, T.defaults = dT, T.defaultsDeep = pT, T.defer = CE, T.delay = _E, T.difference = Y_, T.differenceBy = q_, T.differenceWith = K_, T.drop = X_, T.dropRight = Q_, T.dropRightWhile = J_, T.dropWhile = Z_, T.fill = $_, T.filter = tE, T.flatMap = iE, T.flatMapDeep = aE, T.flatMapDepth = sE, T.flatten = S0, T.flattenDeep = eP, T.flattenDepth = tP, T.flip = PE, T.flow = SA, T.flowRight = wA, T.fromPairs = rP, T.functions = wT, T.functionsIn = xT, T.groupBy = oE, T.initial = iP, T.intersection = aP, T.intersectionBy = sP, T.intersectionWith = oP, T.invert = _T, T.invertBy = PT, T.invokeMap = lE, T.iteratee = _d, T.keyBy = cE, T.keys = sr, T.keysIn = Br, T.map = cc, T.mapKeys = TT, T.mapValues = AT, T.matches = xA, T.matchesProperty = CA, T.memoize = hc, T.merge = OT, T.mergeWith = G0, T.method = _A, T.methodOf = PA, T.mixin = Pd, T.negate = dc, T.nthArg = TA, T.omit = RT, T.omitBy = kT, T.once = EE, T.orderBy = fE, T.over = AA, T.overArgs = TE, T.overEvery = OA, T.overSome = RA, T.partial = vd, T.partialRight = D0, T.partition = hE, T.pick = IT, T.pickBy = W0, T.property = Q0, T.propertyOf = kA, T.pull = fP, T.pullAll = x0, T.pullAllBy = hP, T.pullAllWith = dP, T.pullAt = pP, T.range = IA, T.rangeRight = DA, T.rearg = AE, T.reject = gE, T.remove = gP, T.rest = OE, T.reverse = pd, T.sampleSize = vE, T.set = MT, T.setWith = LT, T.shuffle = yE, T.slice = mP, T.sortBy = wE, T.sortedUniq = CP, T.sortedUniqBy = _P, T.split = iA, T.spread = RE, T.tail = PP, T.take = EP, T.takeRight = TP, T.takeRightWhile = AP, T.takeWhile = OP, T.tap = UP, T.throttle = kE, T.thru = lc, T.toArray = F0, T.toPairs = U0, T.toPairsIn = H0, T.toPath = FA, T.toPlainObject = V0, T.transform = NT, T.unary = IE, T.union = RP, T.unionBy = kP, T.unionWith = IP, T.uniq = DP, T.uniqBy = MP, T.uniqWith = LP, T.unset = BT, T.unzip = gd, T.unzipWith = C0, T.update = FT, T.updateWith = jT, T.values = Ls, T.valuesIn = VT, T.without = NP, T.words = K0, T.wrap = DE, T.xor = BP, T.xorBy = FP, T.xorWith = jP, T.zip = VP, T.zipObject = zP, T.zipObjectDeep = GP, T.zipWith = WP, T.entries = U0, T.entriesIn = H0, T.extend = z0, T.extendWith = mc, Pd(T, T), T.add = VA, T.attempt = X0, T.camelCase = UT, T.capitalize = Y0, T.ceil = zA, T.clamp = zT, T.clone = LE, T.cloneDeep = BE, T.cloneDeepWith = FE, T.cloneWith = NE, T.conformsTo = jE, T.deburr = q0, T.defaultTo = bA, T.divide = GA, T.endsWith = HT, T.eq = Nn, T.escape = YT, T.escapeRegExp = qT, T.every = eE, T.find = rE, T.findIndex = y0, T.findKey = gT, T.findLast = nE, T.findLastIndex = b0, T.findLastKey = mT, T.floor = WA, T.forEach = P0, T.forEachRight = E0, T.forIn = vT, T.forInRight = yT, T.forOwn = bT, T.forOwnRight = ST, T.get = Sd, T.gt = VE, T.gte = zE, T.has = CT, T.hasIn = wd, T.head = w0, T.identity = Fr, T.includes = uE, T.indexOf = nP, T.inRange = GT, T.invoke = ET, T.isArguments = Fa, T.isArray = De, T.isArrayBuffer = GE, T.isArrayLike = Nr, T.isArrayLikeObject = Ht, T.isBoolean = WE, T.isBuffer = ea, T.isDate = UE, T.isElement = HE, T.isEmpty = YE, T.isEqual = qE, T.isEqualWith = KE, T.isError = yd, T.isFinite = XE, T.isFunction = Ei, T.isInteger = M0, T.isLength = pc, T.isMap = L0, T.isMatch = QE, T.isMatchWith = JE, T.isNaN = ZE, T.isNative = $E, T.isNil = tT, T.isNull = eT, T.isNumber = N0, T.isObject = Lt, T.isObjectLike = Vt, T.isPlainObject = Qo, T.isRegExp = bd, T.isSafeInteger = rT, T.isSet = B0, T.isString = gc, T.isSymbol = Jr, T.isTypedArray = Ms, T.isUndefined = nT, T.isWeakMap = iT, T.isWeakSet = aT, T.join = uP, T.kebabCase = KT, T.last = vn, T.lastIndexOf = lP, T.lowerCase = XT, T.lowerFirst = QT, T.lt = sT, T.lte = oT, T.max = UA, T.maxBy = HA, T.mean = YA, T.meanBy = qA, T.min = KA, T.minBy = XA, T.stubArray = Td, T.stubFalse = Ad, T.stubObject = MA, T.stubString = LA, T.stubTrue = NA, T.multiply = QA, T.nth = cP, T.noConflict = EA, T.noop = Ed, T.now = fc, T.pad = JT, T.padEnd = ZT, T.padStart = $T, T.parseInt = eA, T.random = WT, T.reduce = dE, T.reduceRight = pE, T.repeat = tA, T.replace = rA, T.result = DT, T.round = JA, T.runInContext = U, T.sample = mE, T.size = bE, T.snakeCase = nA, T.some = SE, T.sortedIndex = vP, T.sortedIndexBy = yP, T.sortedIndexOf = bP, T.sortedLastIndex = SP, T.sortedLastIndexBy = wP, T.sortedLastIndexOf = xP, T.startCase = aA, T.startsWith = sA, T.subtract = ZA, T.sum = $A, T.sumBy = eO, T.template = oA, T.times = BA, T.toFinite = Ti, T.toInteger = Le, T.toLength = j0, T.toLower = uA, T.toNumber = yn, T.toSafeInteger = uT, T.toString = lt, T.toUpper = lA, T.trim = cA, T.trimEnd = fA, T.trimStart = hA, T.truncate = dA, T.unescape = pA, T.uniqueId = jA, T.upperCase = gA, T.upperFirst = xd, T.each = P0, T.eachRight = E0, T.first = w0, Pd(T, function() { var o = {}; return Qn(T, function(l, p) { yt.call(T.prototype, p) || (o[p] = l); }), o; }(), { chain: !1 }), T.VERSION = n, hn(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(o) { T[o].placeholder = T; }), hn(["drop", "take"], function(o, l) { Ke.prototype[o] = function(p) { p = p === r ? 1 : nr(Le(p), 0); var y = this.__filtered__ && !l ? new Ke(this) : this.clone(); return y.__filtered__ ? y.__takeCount__ = Sr(p, y.__takeCount__) : y.__views__.push({ size: Sr(p, le), type: o + (y.__dir__ < 0 ? "Right" : "") }), y; }, Ke.prototype[o + "Right"] = function(p) { return this.reverse()[o](p).reverse(); }; }), hn(["filter", "map", "takeWhile"], function(o, l) { var p = l + 1, y = p == O || p == j; Ke.prototype[o] = function(C) { var A = this.clone(); return A.__iteratees__.push({ iteratee: _e(C, 3), type: p }), A.__filtered__ = A.__filtered__ || y, A; }; }), hn(["head", "last"], function(o, l) { var p = "take" + (l ? "Right" : ""); Ke.prototype[o] = function() { return this[p](1).value()[0]; }; }), hn(["initial", "tail"], function(o, l) { var p = "drop" + (l ? "" : "Right"); Ke.prototype[o] = function() { return this.__filtered__ ? new Ke(this) : this[p](1); }; }), Ke.prototype.compact = function() { return this.filter(Fr); }, Ke.prototype.find = function(o) { return this.filter(o).head(); }, Ke.prototype.findLast = function(o) { return this.reverse().find(o); }, Ke.prototype.invokeMap = ze(function(o, l) { return typeof o == "function" ? new Ke(this) : this.map(function(p) { return Uo(p, o, l); }); }), Ke.prototype.reject = function(o) { return this.filter(dc(_e(o))); }, Ke.prototype.slice = function(o, l) { o = Le(o); var p = this; return p.__filtered__ && (o > 0 || l < 0) ? new Ke(p) : (o < 0 ? p = p.takeRight(-o) : o && (p = p.drop(o)), l !== r && (l = Le(l), p = l < 0 ? p.dropRight(-l) : p.take(l - o)), p); }, Ke.prototype.takeRightWhile = function(o) { return this.reverse().takeWhile(o).reverse(); }, Ke.prototype.toArray = function() { return this.take(le); }, Qn(Ke.prototype, function(o, l) { var p = /^(?:filter|find|map|reject)|While$/.test(l), y = /^(?:head|last)$/.test(l), C = T[y ? "take" + (l == "last" ? "Right" : "") : l], A = y || /^find/.test(l); C && (T.prototype[l] = function() { var I = this.__wrapped__, B = y ? [1] : arguments, Y = I instanceof Ke, re = B[0], ne = Y || De(I), se = function(Ye) { var Qe = C.apply(T, qi([Ye], B)); return y && ge ? Qe[0] : Qe; }; ne && p && typeof re == "function" && re.length != 1 && (Y = ne = !1); var ge = this.__chain__, Se = !!this.__actions__.length, Ee = A && !ge, Be = Y && !Se; if (!A && ne) { I = Be ? I : new Ke(this); var Te = o.apply(I, B); return Te.__actions__.push({ func: lc, args: [se], thisArg: r }), new pn(Te, ge); } return Ee && Be ? o.apply(this, B) : (Te = this.thru(se), Ee ? y ? Te.value()[0] : Te.value() : Te); }); }), hn(["pop", "push", "shift", "sort", "splice", "unshift"], function(o) { var l = Ll[o], p = /^(?:push|sort|unshift)$/.test(o) ? "tap" : "thru", y = /^(?:pop|shift)$/.test(o); T.prototype[o] = function() { var C = arguments; if (y && !this.__chain__) { var A = this.value(); return l.apply(De(A) ? A : [], C); } return this[p](function(I) { return l.apply(De(I) ? I : [], C); }); }; }), Qn(Ke.prototype, function(o, l) { var p = T[l]; if (p) { var y = p.name + ""; yt.call(Os, y) || (Os[y] = []), Os[y].push({ name: l, func: p }); } }), Os[rc(r, x).name] = [{ name: "wrapper", func: r }], Ke.prototype.clone = p4, Ke.prototype.reverse = g4, Ke.prototype.value = m4, T.prototype.at = HP, T.prototype.chain = YP, T.prototype.commit = qP, T.prototype.next = KP, T.prototype.plant = QP, T.prototype.reverse = JP, T.prototype.toJSON = T.prototype.valueOf = T.prototype.value = ZP, T.prototype.first = T.prototype.head, Bo && (T.prototype[Bo] = XP), T; }, Es = qC(); rt ? ((rt.exports = Es)._ = Es, Ve._ = Es) : Me._ = Es; }).call(Dr); })(h6, zt); const Ns = (t, e, r, n, i, a, s) => { const u = t / 2 - (r + i / 2) * s, c = e / 2 - (n + a / 2) * s; return { x: u, y: c }; }, Bs = (t, e, r, n, i = 0.95) => { const a = t * i / r, s = e * i / n; return Math.min(1, Math.min(a, s)); }, Jz = 0.999, Zz = 0.1, $z = 20, $o = 0.95, eG = 30, tG = 10, Ly = (t) => ({ x: Math.floor(t.x), y: Math.floor(t.y) }), ja = (t) => { const { width: e, height: r } = t, n = { width: e, height: r }, i = 512 * 512, a = e / r; let s = e * r, u = 448; for (; s < i; ) if (u += 64, e === r) { n.width = 512, n.height = 512; break; } else a > 1 ? (n.width = u, n.height = ua( u / a, 64 )) : a < 1 && (n.height = u, n.width = ua( u * a, 64 )), s = n.width * n.height; return n; }, d6 = (t) => ({ width: ua(t.width, 64), height: ua(t.height, 64) }), rG = [ { key: "Base", value: "base" }, { key: "Mask", value: "mask" } ], nG = [ { key: "Auto", value: "auto" }, { key: "Manual", value: "manual" }, { key: "None", value: "none" } ], DS = (t) => t.kind === "line" && t.layer === "mask", iG = (t) => t.kind === "line" && t.layer === "base", Ny = (t) => t.kind === "image" && t.layer === "base", aG = (t) => t.kind === "fillRect" && t.layer === "base", sG = (t) => t.kind === "eraseRect" && t.layer === "base", p6 = (t) => t.kind === "line", gu = { objects: [], stagingArea: { images: [], selectedImageIndex: -1 } }, g6 = { boundingBoxCoordinates: { x: 0, y: 0 }, boundingBoxDimensions: { width: 512, height: 512 }, boundingBoxPreviewFill: { r: 0, g: 0, b: 0, a: 0.5 }, boundingBoxScaleMethod: "auto", brushColor: { r: 90, g: 90, b: 255, a: 1 }, brushSize: 50, canvasContainerDimensions: { width: 0, height: 0 }, colorPickerColor: { r: 90, g: 90, b: 255, a: 1 }, cursorPosition: null, doesCanvasNeedScaling: !1, futureLayerStates: [], isCanvasInitialized: !1, isDrawing: !1, isMaskEnabled: !0, isMouseOverBoundingBox: !1, isMoveBoundingBoxKeyHeld: !1, isMoveStageKeyHeld: !1, isMovingBoundingBox: !1, isMovingStage: !1, isTransformingBoundingBox: !1, layer: "base", layerState: gu, maskColor: { r: 255, g: 90, b: 90, a: 1 }, maxHistory: 128, minimumStageScale: 1, pastLayerStates: [], scaledBoundingBoxDimensions: { width: 512, height: 512 }, shouldAutoSave: !1, shouldCropToBoundingBoxOnSave: !1, shouldDarkenOutsideBoundingBox: !1, shouldLockBoundingBox: !1, shouldPreserveMaskedArea: !1, shouldRestrictStrokesToBox: !0, shouldShowBoundingBox: !0, shouldShowBrush: !0, shouldShowBrushPreview: !1, shouldShowCanvasDebugInfo: !1, shouldShowCheckboardTransparency: !1, shouldShowGrid: !0, shouldShowIntermediates: !0, shouldShowStagingImage: !0, shouldShowStagingOutline: !0, shouldSnapToGrid: !0, stageCoordinates: { x: 0, y: 0 }, stageDimensions: { width: 0, height: 0 }, stageScale: 1, tool: "brush" }, MS = $a({ name: "canvas", initialState: g6, reducers: { setTool: (t, e) => { const r = e.payload; t.tool = e.payload, r !== "move" && (t.isTransformingBoundingBox = !1, t.isMouseOverBoundingBox = !1, t.isMovingBoundingBox = !1, t.isMovingStage = !1); }, setLayer: (t, e) => { t.layer = e.payload; }, toggleTool: (t) => { const e = t.tool; e !== "move" && (t.tool = e === "brush" ? "eraser" : "brush"); }, setMaskColor: (t, e) => { t.maskColor = e.payload; }, setBrushColor: (t, e) => { t.brushColor = e.payload; }, setBrushSize: (t, e) => { t.brushSize = e.payload; }, clearMask: (t) => { t.pastLayerStates.push(zt.cloneDeep(t.layerState)), t.layerState.objects = t.layerState.objects.filter( (e) => !DS(e) ), t.futureLayerStates = [], t.shouldPreserveMaskedArea = !1; }, toggleShouldInvertMask: (t) => { t.shouldPreserveMaskedArea = !t.shouldPreserveMaskedArea; }, toggleShouldShowMask: (t) => { t.isMaskEnabled = !t.isMaskEnabled; }, setShouldPreserveMaskedArea: (t, e) => { t.shouldPreserveMaskedArea = e.payload; }, setIsMaskEnabled: (t, e) => { t.isMaskEnabled = e.payload, t.layer = e.payload ? "mask" : "base"; }, setShouldShowCheckboardTransparency: (t, e) => { t.shouldShowCheckboardTransparency = e.payload; }, setShouldShowBrushPreview: (t, e) => { t.shouldShowBrushPreview = e.payload; }, setShouldShowBrush: (t, e) => { t.shouldShowBrush = e.payload; }, setCursorPosition: (t, e) => { t.cursorPosition = e.payload; }, setInitialCanvasImage: (t, e) => { const r = e.payload, { stageDimensions: n } = t, i = { width: vc(zt.clamp(r.width, 64, 512), 64), height: vc(zt.clamp(r.height, 64, 512), 64) }, a = { x: ua( r.width / 2 - i.width / 2, 64 ), y: ua( r.height / 2 - i.height / 2, 64 ) }; if (t.boundingBoxScaleMethod === "auto") { const c = ja( i ); t.scaledBoundingBoxDimensions = c; } t.boundingBoxDimensions = i, t.boundingBoxCoordinates = a, t.pastLayerStates.push(zt.cloneDeep(t.layerState)), t.layerState = { ...gu, objects: [ { kind: "image", layer: "base", x: 0, y: 0, width: r.width, height: r.height, image: r } ] }, t.futureLayerStates = [], t.isCanvasInitialized = !1; const s = Bs( n.width, n.height, r.width, r.height, $o ), u = Ns( n.width, n.height, 0, 0, r.width, r.height, s ); t.stageScale = s, t.stageCoordinates = u, t.doesCanvasNeedScaling = !0; }, setBoundingBoxDimensions: (t, e) => { const r = d6(e.payload); if (t.boundingBoxDimensions = r, t.boundingBoxScaleMethod === "auto") { const n = ja(r); t.scaledBoundingBoxDimensions = n; } }, setBoundingBoxCoordinates: (t, e) => { t.boundingBoxCoordinates = Ly(e.payload); }, setStageCoordinates: (t, e) => { t.stageCoordinates = e.payload; }, setBoundingBoxPreviewFill: (t, e) => { t.boundingBoxPreviewFill = e.payload; }, setDoesCanvasNeedScaling: (t, e) => { t.doesCanvasNeedScaling = e.payload; }, setStageScale: (t, e) => { t.stageScale = e.payload; }, setShouldDarkenOutsideBoundingBox: (t, e) => { t.shouldDarkenOutsideBoundingBox = e.payload; }, setIsDrawing: (t, e) => { t.isDrawing = e.payload; }, clearCanvasHistory: (t) => { t.pastLayerStates = [], t.futureLayerStates = []; }, setShouldLockBoundingBox: (t, e) => { t.shouldLockBoundingBox = e.payload; }, toggleShouldLockBoundingBox: (t) => { t.shouldLockBoundingBox = !t.shouldLockBoundingBox; }, setShouldShowBoundingBox: (t, e) => { t.shouldShowBoundingBox = e.payload; }, setIsTransformingBoundingBox: (t, e) => { t.isTransformingBoundingBox = e.payload; }, setIsMovingBoundingBox: (t, e) => { t.isMovingBoundingBox = e.payload; }, setIsMouseOverBoundingBox: (t, e) => { t.isMouseOverBoundingBox = e.payload; }, setIsMoveBoundingBoxKeyHeld: (t, e) => { t.isMoveBoundingBoxKeyHeld = e.payload; }, setIsMoveStageKeyHeld: (t, e) => { t.isMoveStageKeyHeld = e.payload; }, addImageToStagingArea: (t, e) => { const { boundingBox: r, image: n } = e.payload; !r || !n || (t.pastLayerStates.push(zt.cloneDeep(t.layerState)), t.pastLayerStates.length > t.maxHistory && t.pastLayerStates.shift(), t.layerState.stagingArea.images.push({ kind: "image", layer: "base", ...r, image: n }), t.layerState.stagingArea.selectedImageIndex = t.layerState.stagingArea.images.length - 1, t.futureLayerStates = []); }, discardStagedImages: (t) => { t.pastLayerStates.push(zt.cloneDeep(t.layerState)), t.pastLayerStates.length > t.maxHistory && t.pastLayerStates.shift(), t.layerState.stagingArea = { ...gu.stagingArea }, t.futureLayerStates = [], t.shouldShowStagingOutline = !0, t.shouldShowStagingOutline = !0; }, addFillRect: (t) => { const { boundingBoxCoordinates: e, boundingBoxDimensions: r, brushColor: n } = t; t.pastLayerStates.push(zt.cloneDeep(t.layerState)), t.pastLayerStates.length > t.maxHistory && t.pastLayerStates.shift(), t.layerState.objects.push({ kind: "fillRect", layer: "base", ...e, ...r, color: n }), t.futureLayerStates = []; }, addEraseRect: (t) => { const { boundingBoxCoordinates: e, boundingBoxDimensions: r } = t; t.pastLayerStates.push(zt.cloneDeep(t.layerState)), t.pastLayerStates.length > t.maxHistory && t.pastLayerStates.shift(), t.layerState.objects.push({ kind: "eraseRect", layer: "base", ...e, ...r }), t.futureLayerStates = []; }, addLine: (t, e) => { const { tool: r, layer: n, brushColor: i, brushSize: a, shouldRestrictStrokesToBox: s } = t; if (r === "move" || r === "colorPicker") return; const u = a / 2, c = n === "base" && r === "brush" ? { color: i } : {}; t.pastLayerStates.push(zt.cloneDeep(t.layerState)), t.pastLayerStates.length > t.maxHistory && t.pastLayerStates.shift(); const f = { kind: "line", layer: n, tool: r, strokeWidth: u, points: e.payload, ...c }; s && (f.clip = { ...t.boundingBoxCoordinates, ...t.boundingBoxDimensions }), t.layerState.objects.push(f), t.futureLayerStates = []; }, addPointToCurrentLine: (t, e) => { const r = t.layerState.objects.findLast(p6); r && r.points.push(...e.payload); }, undo: (t) => { const e = t.pastLayerStates.pop(); e && (t.futureLayerStates.unshift(zt.cloneDeep(t.layerState)), t.futureLayerStates.length > t.maxHistory && t.futureLayerStates.pop(), t.layerState = e); }, redo: (t) => { const e = t.futureLayerStates.shift(); e && (t.pastLayerStates.push(zt.cloneDeep(t.layerState)), t.pastLayerStates.length > t.maxHistory && t.pastLayerStates.shift(), t.layerState = e); }, setShouldShowGrid: (t, e) => { t.shouldShowGrid = e.payload; }, setIsMovingStage: (t, e) => { t.isMovingStage = e.payload; }, setShouldSnapToGrid: (t, e) => { t.shouldSnapToGrid = e.payload; }, setShouldAutoSave: (t, e) => { t.shouldAutoSave = e.payload; }, setShouldShowIntermediates: (t, e) => { t.shouldShowIntermediates = e.payload; }, resetCanvas: (t) => { t.pastLayerStates.push(zt.cloneDeep(t.layerState)), t.layerState = gu, t.futureLayerStates = []; }, setCanvasContainerDimensions: (t, e) => { t.canvasContainerDimensions = e.payload; }, resizeAndScaleCanvas: (t) => { const { width: e, height: r } = t.canvasContainerDimensions, n = t.layerState.objects.find(Ny), i = { width: Math.floor(e), height: Math.floor(r) }; if (!n) { const h = Bs( i.width, i.height, 512, 512, $o ), d = Ns( i.width, i.height, 0, 0, 512, 512, h ), g = { width: 512, height: 512 }; if (t.stageScale = h, t.stageCoordinates = d, t.stageDimensions = i, t.boundingBoxCoordinates = { x: 0, y: 0 }, t.boundingBoxDimensions = g, t.boundingBoxScaleMethod === "auto") { const v = ja( g ); t.scaledBoundingBoxDimensions = v; } return; } const { width: a, height: s } = n, c = Bs( e, r, a, s, 0.95 ), f = Ns( i.width, i.height, 0, 0, a, s, c ); t.minimumStageScale = c, t.stageScale = c, t.stageCoordinates = Ly(f), t.stageDimensions = i, t.isCanvasInitialized = !0; }, resizeCanvas: (t) => { const { width: e, height: r } = t.canvasContainerDimensions, n = { width: Math.floor(e), height: Math.floor(r) }; if (t.stageDimensions = n, !t.layerState.objects.find(Ny)) { const i = Bs( n.width, n.height, 512, 512, $o ), a = Ns( n.width, n.height, 0, 0, 512, 512, i ), s = { width: 512, height: 512 }; if (t.stageScale = i, t.stageCoordinates = a, t.boundingBoxCoordinates = { x: 0, y: 0 }, t.boundingBoxDimensions = s, t.boundingBoxScaleMethod === "auto") { const u = ja( s ); t.scaledBoundingBoxDimensions = u; } } }, resetCanvasView: (t, e) => { const { contentRect: r, shouldScaleTo1: n } = e.payload, { stageDimensions: { width: i, height: a } } = t, { x: s, y: u, width: c, height: f } = r; if (c !== 0 && f !== 0) { const h = n ? 1 : Bs( i, a, c, f, $o ), d = Ns( i, a, s, u, c, f, h ); t.stageScale = h, t.stageCoordinates = d; } else { const h = Bs( i, a, 512, 512, $o ), d = Ns( i, a, 0, 0, 512, 512, h ), g = { width: 512, height: 512 }; if (t.stageScale = h, t.stageCoordinates = d, t.boundingBoxCoordinates = { x: 0, y: 0 }, t.boundingBoxDimensions = g, t.boundingBoxScaleMethod === "auto") { const v = ja( g ); t.scaledBoundingBoxDimensions = v; } } }, nextStagingAreaImage: (t) => { const e = t.layerState.stagingArea.selectedImageIndex, r = t.layerState.stagingArea.images.length; t.layerState.stagingArea.selectedImageIndex = Math.min( e + 1, r - 1 ); }, prevStagingAreaImage: (t) => { const e = t.layerState.stagingArea.selectedImageIndex; t.layerState.stagingArea.selectedImageIndex = Math.max( e - 1, 0 ); }, commitStagingAreaImage: (t) => { const { images: e, selectedImageIndex: r } = t.layerState.stagingArea; t.pastLayerStates.push(zt.cloneDeep(t.layerState)), t.pastLayerStates.length > t.maxHistory && t.pastLayerStates.shift(), t.layerState.objects.push({ ...e[r] }), t.layerState.stagingArea = { ...gu.stagingArea }, t.futureLayerStates = [], t.shouldShowStagingOutline = !0, t.shouldShowStagingImage = !0; }, fitBoundingBoxToStage: (t) => { const { boundingBoxDimensions: e, boundingBoxCoordinates: r, stageDimensions: n, stageScale: i } = t, a = n.width / i, s = n.height / i; if (r.x < 0 || r.x + e.width > a || r.y < 0 || r.y + e.height > s) { const u = { width: vc(zt.clamp(a, 64, 512), 64), height: vc(zt.clamp(s, 64, 512), 64) }, c = { x: ua( a / 2 - u.width / 2, 64 ), y: ua( s / 2 - u.height / 2, 64 ) }; if (t.boundingBoxDimensions = u, t.boundingBoxCoordinates = c, t.boundingBoxScaleMethod === "auto") { const f = ja( u ); t.scaledBoundingBoxDimensions = f; } } }, setBoundingBoxScaleMethod: (t, e) => { if (t.boundingBoxScaleMethod = e.payload, e.payload === "auto") { const r = ja( t.boundingBoxDimensions ); t.scaledBoundingBoxDimensions = r; } }, setScaledBoundingBoxDimensions: (t, e) => { t.scaledBoundingBoxDimensions = e.payload; }, setShouldShowStagingImage: (t, e) => { t.shouldShowStagingImage = e.payload; }, setShouldShowStagingOutline: (t, e) => { t.shouldShowStagingOutline = e.payload; }, setShouldShowCanvasDebugInfo: (t, e) => { t.shouldShowCanvasDebugInfo = e.payload; }, setShouldRestrictStrokesToBox: (t, e) => { t.shouldRestrictStrokesToBox = e.payload; }, setShouldCropToBoundingBoxOnSave: (t, e) => { t.shouldCropToBoundingBoxOnSave = e.payload; }, setColorPickerColor: (t, e) => { t.colorPickerColor = e.payload; }, commitColorPickerColor: (t) => { t.brushColor = { ...t.colorPickerColor, a: t.brushColor.a }, t.tool = "brush"; }, setMergedCanvas: (t, e) => { t.pastLayerStates.push(zt.cloneDeep(t.layerState)), t.futureLayerStates = [], t.layerState.objects = [e.payload]; }, resetCanvasInteractionState: (t) => { t.cursorPosition = null, t.isDrawing = !1, t.isMouseOverBoundingBox = !1, t.isMoveBoundingBoxKeyHeld = !1, t.isMoveStageKeyHeld = !1, t.isMovingBoundingBox = !1, t.isMovingStage = !1, t.isTransformingBoundingBox = !1; }, mouseLeftCanvas: (t) => { t.cursorPosition = null, t.isDrawing = !1, t.isMouseOverBoundingBox = !1, t.isMovingBoundingBox = !1, t.isTransformingBoundingBox = !1; } } }), { addEraseRect: oG, addFillRect: uG, addImageToStagingArea: m6, addLine: lG, addPointToCurrentLine: cG, clearCanvasHistory: fG, clearMask: hG, commitColorPickerColor: dG, commitStagingAreaImage: pG, discardStagedImages: gG, fitBoundingBoxToStage: mG, mouseLeftCanvas: vG, nextStagingAreaImage: yG, prevStagingAreaImage: bG, redo: SG, resetCanvas: wG, resetCanvasInteractionState: xG, resetCanvasView: CG, resizeAndScaleCanvas: _G, resizeCanvas: PG, setBoundingBoxCoordinates: EG, setBoundingBoxDimensions: TG, setBoundingBoxPreviewFill: AG, setBoundingBoxScaleMethod: OG, setBrushColor: RG, setBrushSize: kG, setCanvasContainerDimensions: IG, setColorPickerColor: DG, setCursorPosition: MG, setDoesCanvasNeedScaling: LG, setInitialCanvasImage: NG, setIsDrawing: BG, setIsMaskEnabled: FG, setIsMouseOverBoundingBox: jG, setIsMoveBoundingBoxKeyHeld: VG, setIsMoveStageKeyHeld: zG, setIsMovingBoundingBox: GG, setIsMovingStage: WG, setIsTransformingBoundingBox: UG, setLayer: HG, setMaskColor: YG, setMergedCanvas: qG, setShouldAutoSave: KG, setShouldCropToBoundingBoxOnSave: XG, setShouldDarkenOutsideBoundingBox: QG, setShouldLockBoundingBox: JG, setShouldPreserveMaskedArea: ZG, setShouldShowBoundingBox: $G, setShouldShowBrush: eW, setShouldShowBrushPreview: tW, setShouldShowCanvasDebugInfo: rW, setShouldShowCheckboardTransparency: nW, setShouldShowGrid: iW, setShouldShowIntermediates: aW, setShouldShowStagingImage: sW, setShouldShowStagingOutline: oW, setShouldSnapToGrid: uW, setStageCoordinates: lW, setStageScale: cW, setTool: fW, toggleShouldLockBoundingBox: hW, toggleTool: dW, undo: pW, setScaledBoundingBoxDimensions: gW, setShouldRestrictStrokesToBox: mW } = MS.actions, v6 = MS.reducer, y6 = { currentImageUuid: "", galleryImageMinimumWidth: 64, galleryImageObjectFit: "cover", shouldAutoSwitchToNewImages: !0, currentCategory: "result", categories: { user: { images: [], latest_mtime: void 0, earliest_mtime: void 0, areMoreImagesAvailable: !0 }, result: { images: [], latest_mtime: void 0, earliest_mtime: void 0, areMoreImagesAvailable: !0 } }, galleryWidth: 300, shouldUseSingleGalleryColumn: !1 }, LS = $a({ name: "gallery", initialState: y6, reducers: { setCurrentImage: (t, e) => { t.currentImage = e.payload, t.currentImageUuid = e.payload.uuid; }, removeImage: (t, e) => { const { uuid: r, category: n } = e.payload, i = t.categories[n].images, a = i.filter((s) => s.uuid !== r); if (r === t.currentImageUuid) { const s = i.findIndex( (c) => c.uuid === r ), u = zt.clamp( s, 0, a.length - 1 ); t.currentImage = a.length ? a[u] : void 0, t.currentImageUuid = a.length ? a[u].uuid : ""; } t.categories[n].images = a; }, addImage: (t, e) => { const { image: r, category: n } = e.payload, { uuid: i, url: a, mtime: s } = r, u = t.categories[n]; u.images.find((c) => c.url === a && c.mtime === s) || (u.images.unshift(r), t.shouldAutoSwitchToNewImages && (t.currentImageUuid = i, t.currentImage = r, t.currentCategory = n), t.intermediateImage = void 0, u.latest_mtime = s); }, setIntermediateImage: (t, e) => { t.intermediateImage = e.payload; }, clearIntermediateImage: (t) => { t.intermediateImage = void 0; }, selectNextImage: (t) => { const { currentImage: e } = t; if (!e) return; const r = t.categories[e.category].images; if (e) { const n = r.findIndex( (i) => i.uuid === e.uuid ); if (n < r.length - 1) { const i = r[n + 1]; t.currentImage = i, t.currentImageUuid = i.uuid; } } }, selectPrevImage: (t) => { const { currentImage: e } = t; if (!e) return; const r = t.categories[e.category].images; if (e) { const n = r.findIndex( (i) => i.uuid === e.uuid ); if (n > 0) { const i = r[n - 1]; t.currentImage = i, t.currentImageUuid = i.uuid; } } }, addGalleryImages: (t, e) => { const { images: r, areMoreImagesAvailable: n, category: i } = e.payload, a = t.categories[i].images; if (r.length > 0) { const s = r.filter( (u) => !a.find( (c) => c.url === u.url && c.mtime === u.mtime ) ); if (t.categories[i].images = a.concat(s).sort((u, c) => c.mtime - u.mtime), !t.currentImage) { const u = r[0]; t.currentImage = u, t.currentImageUuid = u.uuid; } t.categories[i].latest_mtime = r[0].mtime, t.categories[i].earliest_mtime = r[r.length - 1].mtime; } n !== void 0 && (t.categories[i].areMoreImagesAvailable = n); }, setGalleryImageMinimumWidth: (t, e) => { t.galleryImageMinimumWidth = e.payload; }, setGalleryImageObjectFit: (t, e) => { t.galleryImageObjectFit = e.payload; }, setShouldAutoSwitchToNewImages: (t, e) => { t.shouldAutoSwitchToNewImages = e.payload; }, setCurrentCategory: (t, e) => { t.currentCategory = e.payload; }, setGalleryWidth: (t, e) => { t.galleryWidth = e.payload; }, setShouldUseSingleGalleryColumn: (t, e) => { t.shouldUseSingleGalleryColumn = e.payload; } } }), { addImage: yc, clearIntermediateImage: Wd, removeImage: NS, setCurrentImage: vW, addGalleryImages: b6, setIntermediateImage: S6, selectNextImage: yW, selectPrevImage: bW, setGalleryImageMinimumWidth: SW, setGalleryImageObjectFit: wW, setShouldAutoSwitchToNewImages: xW, setCurrentCategory: CW, setGalleryWidth: _W, setShouldUseSingleGalleryColumn: PW } = LS.actions, w6 = LS.reducer, x6 = { isLightboxOpen: !1 }, C6 = x6, BS = $a({ name: "lightbox", initialState: C6, reducers: { setIsLightboxOpen: (t, e) => { t.isLightboxOpen = e.payload; } } }), { setIsLightboxOpen: EW } = BS.actions, _6 = BS.reducer, Kc = (t) => typeof t == "string" ? t : t.length === 1 ? t[0].prompt : t.map( (e) => `${e.prompt}:${e.weight}` ).join(" "); function P6(t) { let e = typeof t == "string" ? t : Kc(t), r = ""; const n = new RegExp(/\[([^\][]*)]/, "gi"), i = [...e.matchAll(n)].map( (a) => a[1] ); return i.length && (r = i.join(" "), i.forEach((a) => { e = e.replace(`[${a}]`, "").replaceAll("[]", "").trim(); })), [e, r]; } const E6 = (t) => { const n = t.split(",").map((i) => i.split(":")).map((i) => ({ seed: Number(i[0]), weight: Number(i[1]) })); return T6(n) ? n : !1; }, T6 = (t) => Boolean(typeof t == "string" ? E6(t) : t.length && !t.some((e) => { const { seed: r, weight: n } = e, i = !isNaN(parseInt(r.toString(), 10)), a = !isNaN(parseInt(n.toString(), 10)) && n >= 0 && n <= 1; return !(i && a); })), By = (t) => t.reduce((e, r, n, i) => { const { seed: a, weight: s } = r; return e += `${a}:${s}`, n !== i.length - 1 && (e += ","), e; }, ""), A6 = (t) => t.split(",").map((n) => n.split(":")).map( (n) => [parseInt(n[0], 10), parseFloat(n[1])] ), FS = { cfgScale: 7.5, height: 512, img2imgStrength: 0.75, infillMethod: "patchmatch", iterations: 1, maskPath: "", perlin: 0, prompt: "", negativePrompt: "", sampler: "k_lms", seamBlur: 16, seamless: !1, seamSize: 96, seamSteps: 30, seamStrength: 0.7, seed: 0, seedWeights: "", shouldFitToWidthHeight: !0, shouldGenerateVariations: !1, shouldRandomizeSeed: !0, steps: 50, threshold: 0, tileSize: 32, variationAmount: 0.1, width: 512, shouldUseSymmetry: !1, horizontalSymmetrySteps: 0, verticalSymmetrySteps: 0 }, O6 = FS, jS = $a({ name: "generation", initialState: O6, reducers: { setPrompt: (t, e) => { const r = e.payload; typeof r == "string" ? t.prompt = r : t.prompt = Kc(r); }, setNegativePrompt: (t, e) => { const r = e.payload; typeof r == "string" ? t.negativePrompt = r : t.negativePrompt = Kc(r); }, setIterations: (t, e) => { t.iterations = e.payload; }, setSteps: (t, e) => { t.steps = e.payload; }, clampSymmetrySteps: (t) => { t.horizontalSymmetrySteps = zt.clamp( t.horizontalSymmetrySteps, 0, t.steps ), t.verticalSymmetrySteps = zt.clamp( t.verticalSymmetrySteps, 0, t.steps ); }, setCfgScale: (t, e) => { t.cfgScale = e.payload; }, setThreshold: (t, e) => { t.threshold = e.payload; }, setPerlin: (t, e) => { t.perlin = e.payload; }, setHeight: (t, e) => { t.height = e.payload; }, setWidth: (t, e) => { t.width = e.payload; }, setSampler: (t, e) => { t.sampler = e.payload; }, setSeed: (t, e) => { t.seed = e.payload, t.shouldRandomizeSeed = !1; }, setImg2imgStrength: (t, e) => { t.img2imgStrength = e.payload; }, setMaskPath: (t, e) => { t.maskPath = e.payload; }, setSeamless: (t, e) => { t.seamless = e.payload; }, setShouldFitToWidthHeight: (t, e) => { t.shouldFitToWidthHeight = e.payload; }, resetSeed: (t) => { t.seed = -1; }, setParameter: (t, e) => { const { key: r, value: n } = e.payload, i = { ...t, [r]: n }; return r === "seed" && (i.shouldRandomizeSeed = !1), i; }, setShouldGenerateVariations: (t, e) => { t.shouldGenerateVariations = e.payload; }, setVariationAmount: (t, e) => { t.variationAmount = e.payload; }, setSeedWeights: (t, e) => { t.seedWeights = e.payload, t.shouldGenerateVariations = !0, t.variationAmount = 0; }, setAllTextToImageParameters: (t, e) => { const { sampler: r, prompt: n, seed: i, variations: a, steps: s, cfg_scale: u, threshold: c, perlin: f, seamless: h, _hires_fix: d, width: g, height: v } = e.payload.image; a && a.length > 0 ? (t.seedWeights = By(a), t.shouldGenerateVariations = !0, t.variationAmount = 0) : t.shouldGenerateVariations = !1, i && (t.seed = i, t.shouldRandomizeSeed = !1), n && (t.prompt = Kc(n)), r && (t.sampler = r), s && (t.steps = s), u && (t.cfgScale = u), typeof c > "u" ? t.threshold = 0 : t.threshold = c, typeof f > "u" ? t.perlin = 0 : t.perlin = f, typeof h == "boolean" && (t.seamless = h), g && (t.width = g), v && (t.height = v); }, setAllImageToImageParameters: (t, e) => { const { type: r, strength: n, fit: i, init_image_path: a, mask_image_path: s } = e.payload.image; r === "img2img" && (a && (t.initialImage = a), s && (t.maskPath = s), n && (t.img2imgStrength = n), typeof i == "boolean" && (t.shouldFitToWidthHeight = i)); }, setAllParameters: (t, e) => { const { type: r, sampler: n, prompt: i, seed: a, variations: s, steps: u, cfg_scale: c, threshold: f, perlin: h, seamless: d, _hires_fix: g, width: v, height: m, strength: b, fit: S, init_image_path: x, mask_image_path: w } = e.payload.image; if (r === "img2img" && (x && (t.initialImage = x), w && (t.maskPath = w), b && (t.img2imgStrength = b), typeof S == "boolean" && (t.shouldFitToWidthHeight = S)), s && s.length > 0 ? (t.seedWeights = By(s), t.shouldGenerateVariations = !0, t.variationAmount = 0) : t.shouldGenerateVariations = !1, a && (t.seed = a, t.shouldRandomizeSeed = !1), i) { const [_, P] = P6(i); _ && (t.prompt = _), P ? t.negativePrompt = P : t.negativePrompt = ""; } n && (t.sampler = n), u && (t.steps = u), c && (t.cfgScale = c), typeof f > "u" ? t.threshold = 0 : t.threshold = f, typeof h > "u" ? t.perlin = 0 : t.perlin = h, typeof d == "boolean" && (t.seamless = d), v && (t.width = v), m && (t.height = m); }, resetParametersState: (t) => ({ ...t, ...FS }), setShouldRandomizeSeed: (t, e) => { t.shouldRandomizeSeed = e.payload; }, setInitialImage: (t, e) => { t.initialImage = e.payload; }, clearInitialImage: (t) => { t.initialImage = void 0; }, setSeamSize: (t, e) => { t.seamSize = e.payload; }, setSeamBlur: (t, e) => { t.seamBlur = e.payload; }, setSeamStrength: (t, e) => { t.seamStrength = e.payload; }, setSeamSteps: (t, e) => { t.seamSteps = e.payload; }, setTileSize: (t, e) => { t.tileSize = e.payload; }, setInfillMethod: (t, e) => { t.infillMethod = e.payload; }, setShouldUseSymmetry: (t, e) => { t.shouldUseSymmetry = e.payload; }, setHorizontalSymmetrySteps: (t, e) => { t.horizontalSymmetrySteps = e.payload; }, setVerticalSymmetrySteps: (t, e) => { t.verticalSymmetrySteps = e.payload; } } }), { clampSymmetrySteps: TW, clearInitialImage: R6, resetParametersState: AW, resetSeed: OW, setAllImageToImageParameters: RW, setAllParameters: kW, setAllTextToImageParameters: IW, setCfgScale: DW, setHeight: MW, setImg2imgStrength: LW, setInfillMethod: k6, setInitialImage: I6, setIterations: NW, setMaskPath: D6, setParameter: BW, setPerlin: FW, setPrompt: jW, setNegativePrompt: VW, setSampler: zW, setSeamBlur: GW, setSeamless: WW, setSeamSize: UW, setSeamSteps: HW, setSeamStrength: YW, setSeed: qW, setSeedWeights: KW, setShouldFitToWidthHeight: XW, setShouldGenerateVariations: QW, setShouldRandomizeSeed: JW, setSteps: ZW, setThreshold: $W, setTileSize: eU, setVariationAmount: tU, setWidth: rU, setShouldUseSymmetry: nU, setHorizontalSymmetrySteps: iU, setVerticalSymmetrySteps: aU } = jS.actions, M6 = jS.reducer, VS = { codeformerFidelity: 0.75, facetoolStrength: 0.75, facetoolType: "gfpgan", hiresFix: !1, hiresStrength: 0.75, shouldLoopback: !1, shouldRunESRGAN: !1, shouldRunFacetool: !1, upscalingLevel: 4, upscalingDenoising: 0.75, upscalingStrength: 0.75 }, L6 = VS, zS = $a({ name: "postprocessing", initialState: L6, reducers: { setFacetoolStrength: (t, e) => { t.facetoolStrength = e.payload; }, setCodeformerFidelity: (t, e) => { t.codeformerFidelity = e.payload; }, setUpscalingLevel: (t, e) => { t.upscalingLevel = e.payload; }, setUpscalingDenoising: (t, e) => { t.upscalingDenoising = e.payload; }, setUpscalingStrength: (t, e) => { t.upscalingStrength = e.payload; }, setHiresFix: (t, e) => { t.hiresFix = e.payload; }, setHiresStrength: (t, e) => { t.hiresStrength = e.payload; }, resetPostprocessingState: (t) => ({ ...t, ...VS }), setShouldRunFacetool: (t, e) => { t.shouldRunFacetool = e.payload; }, setFacetoolType: (t, e) => { t.facetoolType = e.payload; }, setShouldRunESRGAN: (t, e) => { t.shouldRunESRGAN = e.payload; }, setShouldLoopback: (t, e) => { t.shouldLoopback = e.payload; } } }), { resetPostprocessingState: sU, setCodeformerFidelity: oU, setFacetoolStrength: uU, setFacetoolType: lU, setHiresFix: cU, setHiresStrength: fU, setShouldLoopback: hU, setShouldRunESRGAN: dU, setShouldRunFacetool: pU, setUpscalingLevel: gU, setUpscalingDenoising: mU, setUpscalingStrength: vU } = zS.actions, N6 = zS.reducer; function Rn(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Fy(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, hS(n.key), n); } } function kn(t, e, r) { return e && Fy(t.prototype, e), r && Fy(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t; } function fa(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function Rp(t, e) { return Rp = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) { return n.__proto__ = i, n; }, Rp(t, e); } function Gf(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && Rp(t, e); } function $u(t, e) { if (e && (Cn(e) === "object" || typeof e == "function")) return e; if (e !== void 0) throw new TypeError("Derived constructors may only return object or undefined"); return fa(t); } function fi(t) { return fi = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) { return r.__proto__ || Object.getPrototypeOf(r); }, fi(t); } function GS(t) { if (Array.isArray(t)) return t; } function B6(t) { if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t); } function jy(t, e) { (e == null || e > t.length) && (e = t.length); for (var r = 0, n = new Array(e); r < e; r++) n[r] = t[r]; return n; } function WS(t, e) { if (t) { if (typeof t == "string") return jy(t, e); var r = Object.prototype.toString.call(t).slice(8, -1); if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set") return Array.from(t); if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return jy(t, e); } } function US() { 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 F6(t) { return GS(t) || B6(t) || WS(t) || US(); } function Vy(t, e) { var r = Object.keys(t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(t); e && (n = n.filter(function(i) { return Object.getOwnPropertyDescriptor(t, i).enumerable; })), r.push.apply(r, n); } return r; } function zy(t) { for (var e = 1; e < arguments.length; e++) { var r = arguments[e] != null ? arguments[e] : {}; e % 2 ? Vy(Object(r), !0).forEach(function(n) { Hn(t, n, r[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Vy(Object(r)).forEach(function(n) { Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n)); }); } return t; } var j6 = { type: "logger", log: function(e) { this.output("log", e); }, warn: function(e) { this.output("warn", e); }, error: function(e) { this.output("error", e); }, output: function(e, r) { console && console[e] && console[e].apply(console, r); } }, V6 = function() { function t(e) { var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; Rn(this, t), this.init(e, r); } return kn(t, [{ key: "init", value: function(r) { var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; this.prefix = n.prefix || "i18next:", this.logger = r || j6, this.options = n, this.debug = n.debug; } }, { key: "setDebug", value: function(r) { this.debug = r; } }, { key: "log", value: function() { for (var r = arguments.length, n = new Array(r), i = 0; i < r; i++) n[i] = arguments[i]; return this.forward(n, "log", "", !0); } }, { key: "warn", value: function() { for (var r = arguments.length, n = new Array(r), i = 0; i < r; i++) n[i] = arguments[i]; return this.forward(n, "warn", "", !0); } }, { key: "error", value: function() { for (var r = arguments.length, n = new Array(r), i = 0; i < r; i++) n[i] = arguments[i]; return this.forward(n, "error", ""); } }, { key: "deprecate", value: function() { for (var r = arguments.length, n = new Array(r), i = 0; i < r; i++) n[i] = arguments[i]; return this.forward(n, "warn", "WARNING DEPRECATED: ", !0); } }, { key: "forward", value: function(r, n, i, a) { return a && !this.debug ? null : (typeof r[0] == "string" && (r[0] = "".concat(i).concat(this.prefix, " ").concat(r[0])), this.logger[n](r)); } }, { key: "create", value: function(r) { return new t(this.logger, zy(zy({}, { prefix: "".concat(this.prefix, ":").concat(r, ":") }), this.options)); } }, { key: "clone", value: function(r) { return r = r || this.options, r.prefix = r.prefix || this.prefix, new t(this.logger, r); } }]), t; }(), ii = new V6(), ga = function() { function t() { Rn(this, t), this.observers = {}; } return kn(t, [{ key: "on", value: function(r, n) { var i = this; return r.split(" ").forEach(function(a) { i.observers[a] = i.observers[a] || [], i.observers[a].push(n); }), this; } }, { key: "off", value: function(r, n) { if (this.observers[r]) { if (!n) { delete this.observers[r]; return; } this.observers[r] = this.observers[r].filter(function(i) { return i !== n; }); } } }, { key: "emit", value: function(r) { for (var n = arguments.length, i = new Array(n > 1 ? n - 1 : 0), a = 1; a < n; a++) i[a - 1] = arguments[a]; if (this.observers[r]) { var s = [].concat(this.observers[r]); s.forEach(function(c) { c.apply(void 0, i); }); } if (this.observers["*"]) { var u = [].concat(this.observers["*"]); u.forEach(function(c) { c.apply(c, [r].concat(i)); }); } } }]), t; }(); function eu() { var t, e, r = new Promise(function(n, i) { t = n, e = i; }); return r.resolve = t, r.reject = e, r; } function Gy(t) { return t == null ? "" : "" + t; } function z6(t, e, r) { t.forEach(function(n) { e[n] && (r[n] = e[n]); }); } function Yg(t, e, r) { function n(u) { return u && u.indexOf("###") > -1 ? u.replace(/###/g, ".") : u; } function i() { return !t || typeof t == "string"; } for (var a = typeof e != "string" ? [].concat(e) : e.split("."); a.length > 1; ) { if (i()) return {}; var s = n(a.shift()); !t[s] && r && (t[s] = new r()), Object.prototype.hasOwnProperty.call(t, s) ? t = t[s] : t = {}; } return i() ? {} : { obj: t, k: n(a.shift()) }; } function Wy(t, e, r) { var n = Yg(t, e, Object), i = n.obj, a = n.k; i[a] = r; } function G6(t, e, r, n) { var i = Yg(t, e, Object), a = i.obj, s = i.k; a[s] = a[s] || [], n && (a[s] = a[s].concat(r)), n || a[s].push(r); } function vf(t, e) { var r = Yg(t, e), n = r.obj, i = r.k; if (n) return n[i]; } function Uy(t, e, r) { var n = vf(t, r); return n !== void 0 ? n : vf(e, r); } function HS(t, e, r) { for (var n in e) n !== "__proto__" && n !== "constructor" && (n in t ? typeof t[n] == "string" || t[n] instanceof String || typeof e[n] == "string" || e[n] instanceof String ? r && (t[n] = e[n]) : HS(t[n], e[n], r) : t[n] = e[n]); return t; } function Fs(t) { return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); } var W6 = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/" }; function U6(t) { return typeof t == "string" ? t.replace(/[&<>"'\/]/g, function(e) { return W6[e]; }) : t; } var Wf = typeof window < "u" && window.navigator && typeof window.navigator.userAgentData > "u" && window.navigator.userAgent && window.navigator.userAgent.indexOf("MSIE") > -1, H6 = [" ", ",", "?", "!", ";"]; function Y6(t, e, r) { e = e || "", r = r || ""; var n = H6.filter(function(u) { return e.indexOf(u) < 0 && r.indexOf(u) < 0; }); if (n.length === 0) return !0; var i = new RegExp("(".concat(n.map(function(u) { return u === "?" ? "\\?" : u; }).join("|"), ")")), a = !i.test(t); if (!a) { var s = t.indexOf(r); s > 0 && !i.test(t.substring(0, s)) && (a = !0); } return a; } function Hy(t, e) { var r = Object.keys(t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(t); e && (n = n.filter(function(i) { return Object.getOwnPropertyDescriptor(t, i).enumerable; })), r.push.apply(r, n); } return r; } function bc(t) { for (var e = 1; e < arguments.length; e++) { var r = arguments[e] != null ? arguments[e] : {}; e % 2 ? Hy(Object(r), !0).forEach(function(n) { Hn(t, n, r[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Hy(Object(r)).forEach(function(n) { Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n)); }); } return t; } function q6(t) { var e = K6(); return function() { var n = fi(t), i; if (e) { var a = fi(this).constructor; i = Reflect.construct(n, arguments, a); } else i = n.apply(this, arguments); return $u(this, i); }; } function K6() { if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { })), !0; } catch { return !1; } } function YS(t, e) { var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "."; if (t) { if (t[e]) return t[e]; for (var n = e.split(r), i = t, a = 0; a < n.length; ++a) { if (!i || typeof i[n[a]] == "string" && a + 1 < n.length) return; if (i[n[a]] === void 0) { for (var s = 2, u = n.slice(a, a + s).join(r), c = i[u]; c === void 0 && n.length > a + s; ) s++, u = n.slice(a, a + s).join(r), c = i[u]; if (c === void 0) return; if (c === null) return null; if (e.endsWith(u)) { if (typeof c == "string") return c; if (u && typeof c[u] == "string") return c[u]; } var f = n.slice(a + s).join(r); return f ? YS(c, f, r) : void 0; } i = i[n[a]]; } return i; } } var X6 = function(t) { Gf(r, t); var e = q6(r); function r(n) { var i, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { ns: ["translation"], defaultNS: "translation" }; return Rn(this, r), i = e.call(this), Wf && ga.call(fa(i)), i.data = n || {}, i.options = a, i.options.keySeparator === void 0 && (i.options.keySeparator = "."), i.options.ignoreJSONStructure === void 0 && (i.options.ignoreJSONStructure = !0), i; } return kn(r, [{ key: "addNamespaces", value: function(i) { this.options.ns.indexOf(i) < 0 && this.options.ns.push(i); } }, { key: "removeNamespaces", value: function(i) { var a = this.options.ns.indexOf(i); a > -1 && this.options.ns.splice(a, 1); } }, { key: "getResource", value: function(i, a, s) { var u = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, c = u.keySeparator !== void 0 ? u.keySeparator : this.options.keySeparator, f = u.ignoreJSONStructure !== void 0 ? u.ignoreJSONStructure : this.options.ignoreJSONStructure, h = [i, a]; s && typeof s != "string" && (h = h.concat(s)), s && typeof s == "string" && (h = h.concat(c ? s.split(c) : s)), i.indexOf(".") > -1 && (h = i.split(".")); var d = vf(this.data, h); return d || !f || typeof s != "string" ? d : YS(this.data && this.data[i] && this.data[i][a], s, c); } }, { key: "addResource", value: function(i, a, s, u) { var c = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : { silent: !1 }, f = this.options.keySeparator; f === void 0 && (f = "."); var h = [i, a]; s && (h = h.concat(f ? s.split(f) : s)), i.indexOf(".") > -1 && (h = i.split("."), u = a, a = h[1]), this.addNamespaces(a), Wy(this.data, h, u), c.silent || this.emit("added", i, a, s, u); } }, { key: "addResources", value: function(i, a, s) { var u = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : { silent: !1 }; for (var c in s) (typeof s[c] == "string" || Object.prototype.toString.apply(s[c]) === "[object Array]") && this.addResource(i, a, c, s[c], { silent: !0 }); u.silent || this.emit("added", i, a, s); } }, { key: "addResourceBundle", value: function(i, a, s, u, c) { var f = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : { silent: !1 }, h = [i, a]; i.indexOf(".") > -1 && (h = i.split("."), u = s, s = a, a = h[1]), this.addNamespaces(a); var d = vf(this.data, h) || {}; u ? HS(d, s, c) : d = bc(bc({}, d), s), Wy(this.data, h, d), f.silent || this.emit("added", i, a, s); } }, { key: "removeResourceBundle", value: function(i, a) { this.hasResourceBundle(i, a) && delete this.data[i][a], this.removeNamespaces(a), this.emit("removed", i, a); } }, { key: "hasResourceBundle", value: function(i, a) { return this.getResource(i, a) !== void 0; } }, { key: "getResourceBundle", value: function(i, a) { return a || (a = this.options.defaultNS), this.options.compatibilityAPI === "v1" ? bc(bc({}, {}), this.getResource(i, a)) : this.getResource(i, a); } }, { key: "getDataByLanguage", value: function(i) { return this.data[i]; } }, { key: "hasLanguageSomeTranslations", value: function(i) { var a = this.getDataByLanguage(i), s = a && Object.keys(a) || []; return !!s.find(function(u) { return a[u] && Object.keys(a[u]).length > 0; }); } }, { key: "toJSON", value: function() { return this.data; } }]), r; }(ga), qS = { processors: {}, addPostProcessor: function(e) { this.processors[e.name] = e; }, handle: function(e, r, n, i, a) { var s = this; return e.forEach(function(u) { s.processors[u] && (r = s.processors[u].process(r, n, i, a)); }), r; } }; function Yy(t, e) { var r = Object.keys(t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(t); e && (n = n.filter(function(i) { return Object.getOwnPropertyDescriptor(t, i).enumerable; })), r.push.apply(r, n); } return r; } function Rr(t) { for (var e = 1; e < arguments.length; e++) { var r = arguments[e] != null ? arguments[e] : {}; e % 2 ? Yy(Object(r), !0).forEach(function(n) { Hn(t, n, r[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Yy(Object(r)).forEach(function(n) { Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n)); }); } return t; } function Q6(t) { var e = J6(); return function() { var n = fi(t), i; if (e) { var a = fi(this).constructor; i = Reflect.construct(n, arguments, a); } else i = n.apply(this, arguments); return $u(this, i); }; } function J6() { if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { })), !0; } catch { return !1; } } var qy = {}, Ky = function(t) { Gf(r, t); var e = Q6(r); function r(n) { var i, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; return Rn(this, r), i = e.call(this), Wf && ga.call(fa(i)), z6(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], n, fa(i)), i.options = a, i.options.keySeparator === void 0 && (i.options.keySeparator = "."), i.logger = ii.create("translator"), i; } return kn(r, [{ key: "changeLanguage", value: function(i) { i && (this.language = i); } }, { key: "exists", value: function(i) { var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { interpolation: {} }; if (i == null) return !1; var s = this.resolve(i, a); return s && s.res !== void 0; } }, { key: "extractFromKey", value: function(i, a) { var s = a.nsSeparator !== void 0 ? a.nsSeparator : this.options.nsSeparator; s === void 0 && (s = ":"); var u = a.keySeparator !== void 0 ? a.keySeparator : this.options.keySeparator, c = a.ns || this.options.defaultNS || [], f = s && i.indexOf(s) > -1, h = !this.options.userDefinedKeySeparator && !a.keySeparator && !this.options.userDefinedNsSeparator && !a.nsSeparator && !Y6(i, s, u); if (f && !h) { var d = i.match(this.interpolator.nestingRegexp); if (d && d.length > 0) return { key: i, namespaces: c }; var g = i.split(s); (s !== u || s === u && this.options.ns.indexOf(g[0]) > -1) && (c = g.shift()), i = g.join(u); } return typeof c == "string" && (c = [c]), { key: i, namespaces: c }; } }, { key: "translate", value: function(i, a, s) { var u = this; if (Cn(a) !== "object" && this.options.overloadTranslationOptionHandler && (a = this.options.overloadTranslationOptionHandler(arguments)), a || (a = {}), i == null) return ""; Array.isArray(i) || (i = [String(i)]); var c = a.returnDetails !== void 0 ? a.returnDetails : this.options.returnDetails, f = a.keySeparator !== void 0 ? a.keySeparator : this.options.keySeparator, h = this.extractFromKey(i[i.length - 1], a), d = h.key, g = h.namespaces, v = g[g.length - 1], m = a.lng || this.language, b = a.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode; if (m && m.toLowerCase() === "cimode") { if (b) { var S = a.nsSeparator || this.options.nsSeparator; return c ? { res: "".concat(v).concat(S).concat(d), usedKey: d, exactUsedKey: d, usedLng: m, usedNS: v } : "".concat(v).concat(S).concat(d); } return c ? { res: d, usedKey: d, exactUsedKey: d, usedLng: m, usedNS: v } : d; } var x = this.resolve(i, a), w = x && x.res, _ = x && x.usedKey || d, P = x && x.exactUsedKey || d, E = Object.prototype.toString.apply(w), k = ["[object Number]", "[object Function]", "[object RegExp]"], D = a.joinArrays !== void 0 ? a.joinArrays : this.options.joinArrays, V = !this.i18nFormat || this.i18nFormat.handleAsObject, H = typeof w != "string" && typeof w != "boolean" && typeof w != "number"; if (V && w && H && k.indexOf(E) < 0 && !(typeof D == "string" && E === "[object Array]")) { if (!a.returnObjects && !this.options.returnObjects) { this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!"); var W = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(_, w, Rr(Rr({}, a), {}, { ns: g })) : "key '".concat(d, " (").concat(this.language, ")' returned an object instead of string."); return c ? (x.res = W, x) : W; } if (f) { var K = E === "[object Array]", ie = K ? [] : {}, F = K ? P : _; for (var O in w) if (Object.prototype.hasOwnProperty.call(w, O)) { var N = "".concat(F).concat(f).concat(O); ie[O] = this.translate(N, Rr(Rr({}, a), { joinArrays: !1, ns: g })), ie[O] === N && (ie[O] = w[O]); } w = ie; } } else if (V && typeof D == "string" && E === "[object Array]") w = w.join(D), w && (w = this.extendTranslation(w, i, a, s)); else { var j = !1, J = !1, te = a.count !== void 0 && typeof a.count != "string", ee = r.hasDefaultValue(a), ae = te ? this.pluralResolver.getSuffix(m, a.count, a) : "", le = a["defaultValue".concat(ae)] || a.defaultValue; !this.isValidLookup(w) && ee && (j = !0, w = le), this.isValidLookup(w) || (J = !0, w = d); var Ce = a.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey, we = Ce && J ? void 0 : w, Re = ee && le !== w && this.options.updateMissing; if (J || j || Re) { if (this.logger.log(Re ? "updateKey" : "missingKey", m, v, d, Re ? le : w), f) { var ke = this.resolve(d, Rr(Rr({}, a), {}, { keySeparator: !1 })); ke && ke.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format."); } var ve = [], ot = this.languageUtils.getFallbackCodes(this.options.fallbackLng, a.lng || this.language); if (this.options.saveMissingTo === "fallback" && ot && ot[0]) for (var Fe = 0; Fe < ot.length; Fe++) ve.push(ot[Fe]); else this.options.saveMissingTo === "all" ? ve = this.languageUtils.toResolveHierarchy(a.lng || this.language) : ve.push(a.lng || this.language); var qe = function(et, Z, mt) { var fe = ee && mt !== w ? mt : we; u.options.missingKeyHandler ? u.options.missingKeyHandler(et, v, Z, fe, Re, a) : u.backendConnector && u.backendConnector.saveMissing && u.backendConnector.saveMissing(et, v, Z, fe, Re, a), u.emit("missingKey", et, v, Z, w); }; this.options.saveMissing && (this.options.saveMissingPlurals && te ? ve.forEach(function(St) { u.pluralResolver.getSuffixes(St, a).forEach(function(et) { qe([St], d + et, a["defaultValue".concat(et)] || le); }); }) : qe(ve, d, le)); } w = this.extendTranslation(w, i, a, x, s), J && w === d && this.options.appendNamespaceToMissingKey && (w = "".concat(v, ":").concat(d)), (J || j) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? w = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? "".concat(v, ":").concat(d) : d, j ? w : void 0) : w = this.options.parseMissingKeyHandler(w)); } return c ? (x.res = w, x) : w; } }, { key: "extendTranslation", value: function(i, a, s, u, c) { var f = this; if (this.i18nFormat && this.i18nFormat.parse) i = this.i18nFormat.parse(i, Rr(Rr({}, this.options.interpolation.defaultVariables), s), u.usedLng, u.usedNS, u.usedKey, { resolved: u }); else if (!s.skipInterpolation) { s.interpolation && this.interpolator.init(Rr(Rr({}, s), { interpolation: Rr(Rr({}, this.options.interpolation), s.interpolation) })); var h = typeof i == "string" && (s && s.interpolation && s.interpolation.skipOnVariables !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables), d; if (h) { var g = i.match(this.interpolator.nestingRegexp); d = g && g.length; } var v = s.replace && typeof s.replace != "string" ? s.replace : s; if (this.options.interpolation.defaultVariables && (v = Rr(Rr({}, this.options.interpolation.defaultVariables), v)), i = this.interpolator.interpolate(i, v, s.lng || this.language, s), h) { var m = i.match(this.interpolator.nestingRegexp), b = m && m.length; d < b && (s.nest = !1); } s.nest !== !1 && (i = this.interpolator.nest(i, function() { for (var w = arguments.length, _ = new Array(w), P = 0; P < w; P++) _[P] = arguments[P]; return c && c[0] === _[0] && !s.context ? (f.logger.warn("It seems you are nesting recursively key: ".concat(_[0], " in key: ").concat(a[0])), null) : f.translate.apply(f, _.concat([a])); }, s)), s.interpolation && this.interpolator.reset(); } var S = s.postProcess || this.options.postProcess, x = typeof S == "string" ? [S] : S; return i != null && x && x.length && s.applyPostProcessor !== !1 && (i = qS.handle(x, i, a, this.options && this.options.postProcessPassResolved ? Rr({ i18nResolved: u }, s) : s, this)), i; } }, { key: "resolve", value: function(i) { var a = this, s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u, c, f, h, d; return typeof i == "string" && (i = [i]), i.forEach(function(g) { if (!a.isValidLookup(u)) { var v = a.extractFromKey(g, s), m = v.key; c = m; var b = v.namespaces; a.options.fallbackNS && (b = b.concat(a.options.fallbackNS)); var S = s.count !== void 0 && typeof s.count != "string", x = S && !s.ordinal && s.count === 0 && a.pluralResolver.shouldUseIntlApi(), w = s.context !== void 0 && (typeof s.context == "string" || typeof s.context == "number") && s.context !== "", _ = s.lngs ? s.lngs : a.languageUtils.toResolveHierarchy(s.lng || a.language, s.fallbackLng); b.forEach(function(P) { a.isValidLookup(u) || (d = P, !qy["".concat(_[0], "-").concat(P)] && a.utils && a.utils.hasLoadedNamespace && !a.utils.hasLoadedNamespace(d) && (qy["".concat(_[0], "-").concat(P)] = !0, a.logger.warn('key "'.concat(c, '" for languages "').concat(_.join(", "), `" won't get resolved as namespace "`).concat(d, '" was not yet loaded'), "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), _.forEach(function(E) { if (!a.isValidLookup(u)) { h = E; var k = [m]; if (a.i18nFormat && a.i18nFormat.addLookupKeys) a.i18nFormat.addLookupKeys(k, m, E, P, s); else { var D; S && (D = a.pluralResolver.getSuffix(E, s.count, s)); var V = "".concat(a.options.pluralSeparator, "zero"); if (S && (k.push(m + D), x && k.push(m + V)), w) { var H = "".concat(m).concat(a.options.contextSeparator).concat(s.context); k.push(H), S && (k.push(H + D), x && k.push(H + V)); } } for (var W; W = k.pop(); ) a.isValidLookup(u) || (f = W, u = a.getResource(E, P, W, s)); } })); }); } }), { res: u, usedKey: c, exactUsedKey: f, usedLng: h, usedNS: d }; } }, { key: "isValidLookup", value: function(i) { return i !== void 0 && !(!this.options.returnNull && i === null) && !(!this.options.returnEmptyString && i === ""); } }, { key: "getResource", value: function(i, a, s) { var u = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(i, a, s, u) : this.resourceStore.getResource(i, a, s, u); } }], [{ key: "hasDefaultValue", value: function(i) { var a = "defaultValue"; for (var s in i) if (Object.prototype.hasOwnProperty.call(i, s) && a === s.substring(0, a.length) && i[s] !== void 0) return !0; return !1; } }]), r; }(ga); function Ud(t) { return t.charAt(0).toUpperCase() + t.slice(1); } var Xy = function() { function t(e) { Rn(this, t), this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = ii.create("languageUtils"); } return kn(t, [{ key: "getScriptPartFromCode", value: function(r) { if (!r || r.indexOf("-") < 0) return null; var n = r.split("-"); return n.length === 2 || (n.pop(), n[n.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(n.join("-")); } }, { key: "getLanguagePartFromCode", value: function(r) { if (!r || r.indexOf("-") < 0) return r; var n = r.split("-"); return this.formatLanguageCode(n[0]); } }, { key: "formatLanguageCode", value: function(r) { if (typeof r == "string" && r.indexOf("-") > -1) { var n = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"], i = r.split("-"); return this.options.lowerCaseLng ? i = i.map(function(a) { return a.toLowerCase(); }) : i.length === 2 ? (i[0] = i[0].toLowerCase(), i[1] = i[1].toUpperCase(), n.indexOf(i[1].toLowerCase()) > -1 && (i[1] = Ud(i[1].toLowerCase()))) : i.length === 3 && (i[0] = i[0].toLowerCase(), i[1].length === 2 && (i[1] = i[1].toUpperCase()), i[0] !== "sgn" && i[2].length === 2 && (i[2] = i[2].toUpperCase()), n.indexOf(i[1].toLowerCase()) > -1 && (i[1] = Ud(i[1].toLowerCase())), n.indexOf(i[2].toLowerCase()) > -1 && (i[2] = Ud(i[2].toLowerCase()))), i.join("-"); } return this.options.cleanCode || this.options.lowerCaseLng ? r.toLowerCase() : r; } }, { key: "isSupportedCode", value: function(r) { return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (r = this.getLanguagePartFromCode(r)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(r) > -1; } }, { key: "getBestMatchFromCodes", value: function(r) { var n = this; if (!r) return null; var i; return r.forEach(function(a) { if (!i) { var s = n.formatLanguageCode(a); (!n.options.supportedLngs || n.isSupportedCode(s)) && (i = s); } }), !i && this.options.supportedLngs && r.forEach(function(a) { if (!i) { var s = n.getLanguagePartFromCode(a); if (n.isSupportedCode(s)) return i = s; i = n.options.supportedLngs.find(function(u) { if (u.indexOf(s) === 0) return u; }); } }), i || (i = this.getFallbackCodes(this.options.fallbackLng)[0]), i; } }, { key: "getFallbackCodes", value: function(r, n) { if (!r) return []; if (typeof r == "function" && (r = r(n)), typeof r == "string" && (r = [r]), Object.prototype.toString.apply(r) === "[object Array]") return r; if (!n) return r.default || []; var i = r[n]; return i || (i = r[this.getScriptPartFromCode(n)]), i || (i = r[this.formatLanguageCode(n)]), i || (i = r[this.getLanguagePartFromCode(n)]), i || (i = r.default), i || []; } }, { key: "toResolveHierarchy", value: function(r, n) { var i = this, a = this.getFallbackCodes(n || this.options.fallbackLng || [], r), s = [], u = function(f) { f && (i.isSupportedCode(f) ? s.push(f) : i.logger.warn("rejecting language code not found in supportedLngs: ".concat(f))); }; return typeof r == "string" && r.indexOf("-") > -1 ? (this.options.load !== "languageOnly" && u(this.formatLanguageCode(r)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && u(this.getScriptPartFromCode(r)), this.options.load !== "currentOnly" && u(this.getLanguagePartFromCode(r))) : typeof r == "string" && u(this.formatLanguageCode(r)), a.forEach(function(c) { s.indexOf(c) < 0 && u(i.formatLanguageCode(c)); }), s; } }]), t; }(), Z6 = [{ lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"], nr: [1, 2], fc: 1 }, { lngs: ["af", "an", "ast", "az", "bg", "bn", "ca", "da", "de", "dev", "el", "en", "eo", "es", "et", "eu", "fi", "fo", "fur", "fy", "gl", "gu", "ha", "hi", "hu", "hy", "ia", "it", "kk", "kn", "ku", "lb", "mai", "ml", "mn", "mr", "nah", "nap", "nb", "ne", "nl", "nn", "no", "nso", "pa", "pap", "pms", "ps", "pt-PT", "rm", "sco", "se", "si", "so", "son", "sq", "sv", "sw", "ta", "te", "tk", "ur", "yo"], nr: [1, 2], fc: 2 }, { lngs: ["ay", "bo", "cgg", "fa", "ht", "id", "ja", "jbo", "ka", "km", "ko", "ky", "lo", "ms", "sah", "su", "th", "tt", "ug", "vi", "wo", "zh"], nr: [1], fc: 3 }, { lngs: ["be", "bs", "cnr", "dz", "hr", "ru", "sr", "uk"], nr: [1, 2, 5], fc: 4 }, { lngs: ["ar"], nr: [0, 1, 2, 3, 11, 100], fc: 5 }, { lngs: ["cs", "sk"], nr: [1, 2, 5], fc: 6 }, { lngs: ["csb", "pl"], nr: [1, 2, 5], fc: 7 }, { lngs: ["cy"], nr: [1, 2, 3, 8], fc: 8 }, { lngs: ["fr"], nr: [1, 2], fc: 9 }, { lngs: ["ga"], nr: [1, 2, 3, 7, 11], fc: 10 }, { lngs: ["gd"], nr: [1, 2, 3, 20], fc: 11 }, { lngs: ["is"], nr: [1, 2], fc: 12 }, { lngs: ["jv"], nr: [0, 1], fc: 13 }, { lngs: ["kw"], nr: [1, 2, 3, 4], fc: 14 }, { lngs: ["lt"], nr: [1, 2, 10], fc: 15 }, { lngs: ["lv"], nr: [1, 2, 0], fc: 16 }, { lngs: ["mk"], nr: [1, 2], fc: 17 }, { lngs: ["mnk"], nr: [0, 1, 2], fc: 18 }, { lngs: ["mt"], nr: [1, 2, 11, 20], fc: 19 }, { lngs: ["or"], nr: [2, 1], fc: 2 }, { lngs: ["ro"], nr: [1, 2, 20], fc: 20 }, { lngs: ["sl"], nr: [5, 1, 2, 3], fc: 21 }, { lngs: ["he", "iw"], nr: [1, 2, 20, 21], fc: 22 }], $6 = { 1: function(e) { return Number(e > 1); }, 2: function(e) { return Number(e != 1); }, 3: function(e) { return 0; }, 4: function(e) { return Number(e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2); }, 5: function(e) { return Number(e == 0 ? 0 : e == 1 ? 1 : e == 2 ? 2 : e % 100 >= 3 && e % 100 <= 10 ? 3 : e % 100 >= 11 ? 4 : 5); }, 6: function(e) { return Number(e == 1 ? 0 : e >= 2 && e <= 4 ? 1 : 2); }, 7: function(e) { return Number(e == 1 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2); }, 8: function(e) { return Number(e == 1 ? 0 : e == 2 ? 1 : e != 8 && e != 11 ? 2 : 3); }, 9: function(e) { return Number(e >= 2); }, 10: function(e) { return Number(e == 1 ? 0 : e == 2 ? 1 : e < 7 ? 2 : e < 11 ? 3 : 4); }, 11: function(e) { return Number(e == 1 || e == 11 ? 0 : e == 2 || e == 12 ? 1 : e > 2 && e < 20 ? 2 : 3); }, 12: function(e) { return Number(e % 10 != 1 || e % 100 == 11); }, 13: function(e) { return Number(e !== 0); }, 14: function(e) { return Number(e == 1 ? 0 : e == 2 ? 1 : e == 3 ? 2 : 3); }, 15: function(e) { return Number(e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2); }, 16: function(e) { return Number(e % 10 == 1 && e % 100 != 11 ? 0 : e !== 0 ? 1 : 2); }, 17: function(e) { return Number(e == 1 || e % 10 == 1 && e % 100 != 11 ? 0 : 1); }, 18: function(e) { return Number(e == 0 ? 0 : e == 1 ? 1 : 2); }, 19: function(e) { return Number(e == 1 ? 0 : e == 0 || e % 100 > 1 && e % 100 < 11 ? 1 : e % 100 > 10 && e % 100 < 20 ? 2 : 3); }, 20: function(e) { return Number(e == 1 ? 0 : e == 0 || e % 100 > 0 && e % 100 < 20 ? 1 : 2); }, 21: function(e) { return Number(e % 100 == 1 ? 1 : e % 100 == 2 ? 2 : e % 100 == 3 || e % 100 == 4 ? 3 : 0); }, 22: function(e) { return Number(e == 1 ? 0 : e == 2 ? 1 : (e < 0 || e > 10) && e % 10 == 0 ? 2 : 3); } }, eR = ["v1", "v2", "v3"], Qy = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 }; function tR() { var t = {}; return Z6.forEach(function(e) { e.lngs.forEach(function(r) { t[r] = { numbers: e.nr, plurals: $6[e.fc] }; }); }), t; } var rR = function() { function t(e) { var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; Rn(this, t), this.languageUtils = e, this.options = r, this.logger = ii.create("pluralResolver"), (!this.options.compatibilityJSON || this.options.compatibilityJSON === "v4") && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = tR(); } return kn(t, [{ key: "addRule", value: function(r, n) { this.rules[r] = n; } }, { key: "getRule", value: function(r) { var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; if (this.shouldUseIntlApi()) try { return new Intl.PluralRules(r, { type: n.ordinal ? "ordinal" : "cardinal" }); } catch { return; } return this.rules[r] || this.rules[this.languageUtils.getLanguagePartFromCode(r)]; } }, { key: "needsPlural", value: function(r) { var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = this.getRule(r, n); return this.shouldUseIntlApi() ? i && i.resolvedOptions().pluralCategories.length > 1 : i && i.numbers.length > 1; } }, { key: "getPluralFormsOfKey", value: function(r, n) { var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; return this.getSuffixes(r, i).map(function(a) { return "".concat(n).concat(a); }); } }, { key: "getSuffixes", value: function(r) { var n = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = this.getRule(r, i); return a ? this.shouldUseIntlApi() ? a.resolvedOptions().pluralCategories.sort(function(s, u) { return Qy[s] - Qy[u]; }).map(function(s) { return "".concat(n.options.prepend).concat(s); }) : a.numbers.map(function(s) { return n.getSuffix(r, s, i); }) : []; } }, { key: "getSuffix", value: function(r, n) { var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, a = this.getRule(r, i); return a ? this.shouldUseIntlApi() ? "".concat(this.options.prepend).concat(a.select(n)) : this.getSuffixRetroCompatible(a, n) : (this.logger.warn("no plural rule found for: ".concat(r)), ""); } }, { key: "getSuffixRetroCompatible", value: function(r, n) { var i = this, a = r.noAbs ? r.plurals(n) : r.plurals(Math.abs(n)), s = r.numbers[a]; this.options.simplifyPluralSuffix && r.numbers.length === 2 && r.numbers[0] === 1 && (s === 2 ? s = "plural" : s === 1 && (s = "")); var u = function() { return i.options.prepend && s.toString() ? i.options.prepend + s.toString() : s.toString(); }; return this.options.compatibilityJSON === "v1" ? s === 1 ? "" : typeof s == "number" ? "_plural_".concat(s.toString()) : u() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && r.numbers.length === 2 && r.numbers[0] === 1 ? u() : this.options.prepend && a.toString() ? this.options.prepend + a.toString() : a.toString(); } }, { key: "shouldUseIntlApi", value: function() { return !eR.includes(this.options.compatibilityJSON); } }]), t; }(); function Jy(t, e) { var r = Object.keys(t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(t); e && (n = n.filter(function(i) { return Object.getOwnPropertyDescriptor(t, i).enumerable; })), r.push.apply(r, n); } return r; } function Fn(t) { for (var e = 1; e < arguments.length; e++) { var r = arguments[e] != null ? arguments[e] : {}; e % 2 ? Jy(Object(r), !0).forEach(function(n) { Hn(t, n, r[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Jy(Object(r)).forEach(function(n) { Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n)); }); } return t; } var nR = function() { function t() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; Rn(this, t), this.logger = ii.create("interpolator"), this.options = e, this.format = e.interpolation && e.interpolation.format || function(r) { return r; }, this.init(e); } return kn(t, [{ key: "init", value: function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; r.interpolation || (r.interpolation = { escapeValue: !0 }); var n = r.interpolation; this.escape = n.escape !== void 0 ? n.escape : U6, this.escapeValue = n.escapeValue !== void 0 ? n.escapeValue : !0, this.useRawValueToEscape = n.useRawValueToEscape !== void 0 ? n.useRawValueToEscape : !1, this.prefix = n.prefix ? Fs(n.prefix) : n.prefixEscaped || "{{", this.suffix = n.suffix ? Fs(n.suffix) : n.suffixEscaped || "}}", this.formatSeparator = n.formatSeparator ? n.formatSeparator : n.formatSeparator || ",", this.unescapePrefix = n.unescapeSuffix ? "" : n.unescapePrefix || "-", this.unescapeSuffix = this.unescapePrefix ? "" : n.unescapeSuffix || "", this.nestingPrefix = n.nestingPrefix ? Fs(n.nestingPrefix) : n.nestingPrefixEscaped || Fs("$t("), this.nestingSuffix = n.nestingSuffix ? Fs(n.nestingSuffix) : n.nestingSuffixEscaped || Fs(")"), this.nestingOptionsSeparator = n.nestingOptionsSeparator ? n.nestingOptionsSeparator : n.nestingOptionsSeparator || ",", this.maxReplaces = n.maxReplaces ? n.maxReplaces : 1e3, this.alwaysFormat = n.alwaysFormat !== void 0 ? n.alwaysFormat : !1, this.resetRegExp(); } }, { key: "reset", value: function() { this.options && this.init(this.options); } }, { key: "resetRegExp", value: function() { var r = "".concat(this.prefix, "(.+?)").concat(this.suffix); this.regexp = new RegExp(r, "g"); var n = "".concat(this.prefix).concat(this.unescapePrefix, "(.+?)").concat(this.unescapeSuffix).concat(this.suffix); this.regexpUnescape = new RegExp(n, "g"); var i = "".concat(this.nestingPrefix, "(.+?)").concat(this.nestingSuffix); this.nestingRegexp = new RegExp(i, "g"); } }, { key: "interpolate", value: function(r, n, i, a) { var s = this, u, c, f, h = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}; function d(S) { return S.replace(/\$/g, "$$$$"); } var g = function(x) { if (x.indexOf(s.formatSeparator) < 0) { var w = Uy(n, h, x); return s.alwaysFormat ? s.format(w, void 0, i, Fn(Fn(Fn({}, a), n), {}, { interpolationkey: x })) : w; } var _ = x.split(s.formatSeparator), P = _.shift().trim(), E = _.join(s.formatSeparator).trim(); return s.format(Uy(n, h, P), E, i, Fn(Fn(Fn({}, a), n), {}, { interpolationkey: P })); }; this.resetRegExp(); var v = a && a.missingInterpolationHandler || this.options.missingInterpolationHandler, m = a && a.interpolation && a.interpolation.skipOnVariables !== void 0 ? a.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables, b = [{ regex: this.regexpUnescape, safeValue: function(x) { return d(x); } }, { regex: this.regexp, safeValue: function(x) { return s.escapeValue ? d(s.escape(x)) : d(x); } }]; return b.forEach(function(S) { for (f = 0; u = S.regex.exec(r); ) { var x = u[1].trim(); if (c = g(x), c === void 0) if (typeof v == "function") { var w = v(r, u, a); c = typeof w == "string" ? w : ""; } else if (a && Object.prototype.hasOwnProperty.call(a, x)) c = ""; else if (m) { c = u[0]; continue; } else s.logger.warn("missed to pass in variable ".concat(x, " for interpolating ").concat(r)), c = ""; else typeof c != "string" && !s.useRawValueToEscape && (c = Gy(c)); var _ = S.safeValue(c); if (r = r.replace(u[0], _), m ? (S.regex.lastIndex += c.length, S.regex.lastIndex -= u[0].length) : S.regex.lastIndex = 0, f++, f >= s.maxReplaces) break; } }), r; } }, { key: "nest", value: function(r, n) { var i = this, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s, u, c; function f(v, m) { var b = this.nestingOptionsSeparator; if (v.indexOf(b) < 0) return v; var S = v.split(new RegExp("".concat(b, "[ ]*{"))), x = "{".concat(S[1]); v = S[0], x = this.interpolate(x, c); var w = x.match(/'/g), _ = x.match(/"/g); (w && w.length % 2 === 0 && !_ || _.length % 2 !== 0) && (x = x.replace(/'/g, '"')); try { c = JSON.parse(x), m && (c = Fn(Fn({}, m), c)); } catch (P) { return this.logger.warn("failed parsing options string in nesting for key ".concat(v), P), "".concat(v).concat(b).concat(x); } return delete c.defaultValue, v; } for (; s = this.nestingRegexp.exec(r); ) { var h = []; c = Fn({}, a), c = c.replace && typeof c.replace != "string" ? c.replace : c, c.applyPostProcessor = !1, delete c.defaultValue; var d = !1; if (s[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(s[1])) { var g = s[1].split(this.formatSeparator).map(function(v) { return v.trim(); }); s[1] = g.shift(), h = g, d = !0; } if (u = n(f.call(this, s[1].trim(), c), c), u && s[0] === r && typeof u != "string") return u; typeof u != "string" && (u = Gy(u)), u || (this.logger.warn("missed to resolve ".concat(s[1], " for nesting ").concat(r)), u = ""), d && (u = h.reduce(function(v, m) { return i.format(v, m, a.lng, Fn(Fn({}, a), {}, { interpolationkey: s[1].trim() })); }, u.trim())), r = r.replace(s[0], u), this.regexp.lastIndex = 0; } return r; } }]), t; }(); function Zy(t, e) { var r = Object.keys(t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(t); e && (n = n.filter(function(i) { return Object.getOwnPropertyDescriptor(t, i).enumerable; })), r.push.apply(r, n); } return r; } function Ri(t) { for (var e = 1; e < arguments.length; e++) { var r = arguments[e] != null ? arguments[e] : {}; e % 2 ? Zy(Object(r), !0).forEach(function(n) { Hn(t, n, r[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Zy(Object(r)).forEach(function(n) { Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n)); }); } return t; } function iR(t) { var e = t.toLowerCase().trim(), r = {}; if (t.indexOf("(") > -1) { var n = t.split("("); e = n[0].toLowerCase().trim(); var i = n[1].substring(0, n[1].length - 1); if (e === "currency" && i.indexOf(":") < 0) r.currency || (r.currency = i.trim()); else if (e === "relativetime" && i.indexOf(":") < 0) r.range || (r.range = i.trim()); else { var a = i.split(";"); a.forEach(function(s) { if (s) { var u = s.split(":"), c = F6(u), f = c[0], h = c.slice(1), d = h.join(":").trim().replace(/^'+|'+$/g, ""); r[f.trim()] || (r[f.trim()] = d), d === "false" && (r[f.trim()] = !1), d === "true" && (r[f.trim()] = !0), isNaN(d) || (r[f.trim()] = parseInt(d, 10)); } }); } } return { formatName: e, formatOptions: r }; } function js(t) { var e = {}; return function(n, i, a) { var s = i + JSON.stringify(a), u = e[s]; return u || (u = t(i, a), e[s] = u), u(n); }; } var aR = function() { function t() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; Rn(this, t), this.logger = ii.create("formatter"), this.options = e, this.formats = { number: js(function(r, n) { var i = new Intl.NumberFormat(r, Ri({}, n)); return function(a) { return i.format(a); }; }), currency: js(function(r, n) { var i = new Intl.NumberFormat(r, Ri(Ri({}, n), {}, { style: "currency" })); return function(a) { return i.format(a); }; }), datetime: js(function(r, n) { var i = new Intl.DateTimeFormat(r, Ri({}, n)); return function(a) { return i.format(a); }; }), relativetime: js(function(r, n) { var i = new Intl.RelativeTimeFormat(r, Ri({}, n)); return function(a) { return i.format(a, n.range || "day"); }; }), list: js(function(r, n) { var i = new Intl.ListFormat(r, Ri({}, n)); return function(a) { return i.format(a); }; }) }, this.init(e); } return kn(t, [{ key: "init", value: function(r) { var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { interpolation: {} }, i = n.interpolation; this.formatSeparator = i.formatSeparator ? i.formatSeparator : i.formatSeparator || ","; } }, { key: "add", value: function(r, n) { this.formats[r.toLowerCase().trim()] = n; } }, { key: "addCached", value: function(r, n) { this.formats[r.toLowerCase().trim()] = js(n); } }, { key: "format", value: function(r, n, i) { var a = this, s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, u = n.split(this.formatSeparator), c = u.reduce(function(f, h) { var d = iR(h), g = d.formatName, v = d.formatOptions; if (a.formats[g]) { var m = f; try { var b = s && s.formatParams && s.formatParams[s.interpolationkey] || {}, S = b.locale || b.lng || s.locale || s.lng || i; m = a.formats[g](f, S, Ri(Ri(Ri({}, v), s), b)); } catch (x) { a.logger.warn(x); } return m; } else a.logger.warn("there was no format function for ".concat(g)); return f; }, r); return c; } }]), t; }(); function $y(t, e) { var r = Object.keys(t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(t); e && (n = n.filter(function(i) { return Object.getOwnPropertyDescriptor(t, i).enumerable; })), r.push.apply(r, n); } return r; } function e1(t) { for (var e = 1; e < arguments.length; e++) { var r = arguments[e] != null ? arguments[e] : {}; e % 2 ? $y(Object(r), !0).forEach(function(n) { Hn(t, n, r[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : $y(Object(r)).forEach(function(n) { Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n)); }); } return t; } function sR(t) { var e = oR(); return function() { var n = fi(t), i; if (e) { var a = fi(this).constructor; i = Reflect.construct(n, arguments, a); } else i = n.apply(this, arguments); return $u(this, i); }; } function oR() { if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { })), !0; } catch { return !1; } } function uR(t, e) { t.pending[e] !== void 0 && (delete t.pending[e], t.pendingCount--); } var lR = function(t) { Gf(r, t); var e = sR(r); function r(n, i, a) { var s, u = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; return Rn(this, r), s = e.call(this), Wf && ga.call(fa(s)), s.backend = n, s.store = i, s.services = a, s.languageUtils = a.languageUtils, s.options = u, s.logger = ii.create("backendConnector"), s.waitingReads = [], s.maxParallelReads = u.maxParallelReads || 10, s.readingCalls = 0, s.maxRetries = u.maxRetries >= 0 ? u.maxRetries : 5, s.retryTimeout = u.retryTimeout >= 1 ? u.retryTimeout : 350, s.state = {}, s.queue = [], s.backend && s.backend.init && s.backend.init(a, u.backend, u), s; } return kn(r, [{ key: "queueLoad", value: function(i, a, s, u) { var c = this, f = {}, h = {}, d = {}, g = {}; return i.forEach(function(v) { var m = !0; a.forEach(function(b) { var S = "".concat(v, "|").concat(b); !s.reload && c.store.hasResourceBundle(v, b) ? c.state[S] = 2 : c.state[S] < 0 || (c.state[S] === 1 ? h[S] === void 0 && (h[S] = !0) : (c.state[S] = 1, m = !1, h[S] === void 0 && (h[S] = !0), f[S] === void 0 && (f[S] = !0), g[b] === void 0 && (g[b] = !0))); }), m || (d[v] = !0); }), (Object.keys(f).length || Object.keys(h).length) && this.queue.push({ pending: h, pendingCount: Object.keys(h).length, loaded: {}, errors: [], callback: u }), { toLoad: Object.keys(f), pending: Object.keys(h), toLoadLanguages: Object.keys(d), toLoadNamespaces: Object.keys(g) }; } }, { key: "loaded", value: function(i, a, s) { var u = i.split("|"), c = u[0], f = u[1]; a && this.emit("failedLoading", c, f, a), s && this.store.addResourceBundle(c, f, s), this.state[i] = a ? -1 : 2; var h = {}; this.queue.forEach(function(d) { G6(d.loaded, [c], f), uR(d, i), a && d.errors.push(a), d.pendingCount === 0 && !d.done && (Object.keys(d.loaded).forEach(function(g) { h[g] || (h[g] = {}); var v = d.loaded[g]; v.length && v.forEach(function(m) { h[g][m] === void 0 && (h[g][m] = !0); }); }), d.done = !0, d.errors.length ? d.callback(d.errors) : d.callback()); }), this.emit("loaded", h), this.queue = this.queue.filter(function(d) { return !d.done; }); } }, { key: "read", value: function(i, a, s) { var u = this, c = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, f = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, h = arguments.length > 5 ? arguments[5] : void 0; if (!i.length) return h(null, {}); if (this.readingCalls >= this.maxParallelReads) { this.waitingReads.push({ lng: i, ns: a, fcName: s, tried: c, wait: f, callback: h }); return; } this.readingCalls++; var d = function(b, S) { if (u.readingCalls--, u.waitingReads.length > 0) { var x = u.waitingReads.shift(); u.read(x.lng, x.ns, x.fcName, x.tried, x.wait, x.callback); } if (b && S && c < u.maxRetries) { setTimeout(function() { u.read.call(u, i, a, s, c + 1, f * 2, h); }, f); return; } h(b, S); }, g = this.backend[s].bind(this.backend); if (g.length === 2) { try { var v = g(i, a); v && typeof v.then == "function" ? v.then(function(m) { return d(null, m); }).catch(d) : d(null, v); } catch (m) { d(m); } return; } return g(i, a, d); } }, { key: "prepareLoading", value: function(i, a) { var s = this, u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, c = arguments.length > 3 ? arguments[3] : void 0; if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), c && c(); typeof i == "string" && (i = this.languageUtils.toResolveHierarchy(i)), typeof a == "string" && (a = [a]); var f = this.queueLoad(i, a, u, c); if (!f.toLoad.length) return f.pending.length || c(), null; f.toLoad.forEach(function(h) { s.loadOne(h); }); } }, { key: "load", value: function(i, a, s) { this.prepareLoading(i, a, {}, s); } }, { key: "reload", value: function(i, a, s) { this.prepareLoading(i, a, { reload: !0 }, s); } }, { key: "loadOne", value: function(i) { var a = this, s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", u = i.split("|"), c = u[0], f = u[1]; this.read(c, f, "read", void 0, void 0, function(h, d) { h && a.logger.warn("".concat(s, "loading namespace ").concat(f, " for language ").concat(c, " failed"), h), !h && d && a.logger.log("".concat(s, "loaded namespace ").concat(f, " for language ").concat(c), d), a.loaded(i, h, d); }); } }, { key: "saveMissing", value: function(i, a, s, u, c) { var f = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {}, h = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : function() { }; if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(a)) { this.logger.warn('did not save key "'.concat(s, '" as the namespace "').concat(a, '" was not yet loaded'), "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"); return; } if (!(s == null || s === "")) { if (this.backend && this.backend.create) { var d = e1(e1({}, f), {}, { isUpdate: c }), g = this.backend.create.bind(this.backend); if (g.length < 6) try { var v; g.length === 5 ? v = g(i, a, s, u, d) : v = g(i, a, s, u), v && typeof v.then == "function" ? v.then(function(m) { return h(null, m); }).catch(h) : h(null, v); } catch (m) { h(m); } else g(i, a, s, u, h, d); } !i || !i[0] || this.store.addResource(i[0], a, s, u); } } }]), r; }(ga); function t1() { return { debug: !1, initImmediate: !0, ns: ["translation"], defaultNS: ["translation"], fallbackLng: ["dev"], fallbackNS: !1, supportedLngs: !1, nonExplicitSupportedLngs: !1, load: "all", preload: !1, simplifyPluralSuffix: !0, keySeparator: ".", nsSeparator: ":", pluralSeparator: "_", contextSeparator: "_", partialBundledLanguages: !1, saveMissing: !1, updateMissing: !1, saveMissingTo: "fallback", saveMissingPlurals: !0, missingKeyHandler: !1, missingInterpolationHandler: !1, postProcess: !1, postProcessPassResolved: !1, returnNull: !0, returnEmptyString: !0, returnObjects: !1, joinArrays: !1, returnedObjectHandler: !1, parseMissingKeyHandler: !1, appendNamespaceToMissingKey: !1, appendNamespaceToCIMode: !1, overloadTranslationOptionHandler: function(e) { var r = {}; if (Cn(e[1]) === "object" && (r = e[1]), typeof e[1] == "string" && (r.defaultValue = e[1]), typeof e[2] == "string" && (r.tDescription = e[2]), Cn(e[2]) === "object" || Cn(e[3]) === "object") { var n = e[3] || e[2]; Object.keys(n).forEach(function(i) { r[i] = n[i]; }); } return r; }, interpolation: { escapeValue: !0, format: function(e, r, n, i) { return e; }, prefix: "{{", suffix: "}}", formatSeparator: ",", unescapePrefix: "-", nestingPrefix: "$t(", nestingSuffix: ")", nestingOptionsSeparator: ",", maxReplaces: 1e3, skipOnVariables: !0 } }; } function r1(t) { return typeof t.ns == "string" && (t.ns = [t.ns]), typeof t.fallbackLng == "string" && (t.fallbackLng = [t.fallbackLng]), typeof t.fallbackNS == "string" && (t.fallbackNS = [t.fallbackNS]), t.supportedLngs && t.supportedLngs.indexOf("cimode") < 0 && (t.supportedLngs = t.supportedLngs.concat(["cimode"])), t; } function n1(t, e) { var r = Object.keys(t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(t); e && (n = n.filter(function(i) { return Object.getOwnPropertyDescriptor(t, i).enumerable; })), r.push.apply(r, n); } return r; } function $n(t) { for (var e = 1; e < arguments.length; e++) { var r = arguments[e] != null ? arguments[e] : {}; e % 2 ? n1(Object(r), !0).forEach(function(n) { Hn(t, n, r[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : n1(Object(r)).forEach(function(n) { Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n)); }); } return t; } function cR(t) { var e = fR(); return function() { var n = fi(t), i; if (e) { var a = fi(this).constructor; i = Reflect.construct(n, arguments, a); } else i = n.apply(this, arguments); return $u(this, i); }; } function fR() { if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { })), !0; } catch { return !1; } } function Sc() { } function hR(t) { var e = Object.getOwnPropertyNames(Object.getPrototypeOf(t)); e.forEach(function(r) { typeof t[r] == "function" && (t[r] = t[r].bind(t)); }); } var yf = function(t) { Gf(r, t); var e = cR(r); function r() { var n, i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = arguments.length > 1 ? arguments[1] : void 0; if (Rn(this, r), n = e.call(this), Wf && ga.call(fa(n)), n.options = r1(i), n.services = {}, n.logger = ii, n.modules = { external: [] }, hR(fa(n)), a && !n.isInitialized && !i.isClone) { if (!n.options.initImmediate) return n.init(i, a), $u(n, fa(n)); setTimeout(function() { n.init(i, a); }, 0); } return n; } return kn(r, [{ key: "init", value: function() { var i = this, a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, s = arguments.length > 1 ? arguments[1] : void 0; typeof a == "function" && (s = a, a = {}), !a.defaultNS && a.defaultNS !== !1 && a.ns && (typeof a.ns == "string" ? a.defaultNS = a.ns : a.ns.indexOf("translation") < 0 && (a.defaultNS = a.ns[0])); var u = t1(); this.options = $n($n($n({}, u), this.options), r1(a)), this.options.compatibilityAPI !== "v1" && (this.options.interpolation = $n($n({}, u.interpolation), this.options.interpolation)), a.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = a.keySeparator), a.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = a.nsSeparator); function c(x) { return x ? typeof x == "function" ? new x() : x : null; } if (!this.options.isClone) { this.modules.logger ? ii.init(c(this.modules.logger), this.options) : ii.init(null, this.options); var f; this.modules.formatter ? f = this.modules.formatter : typeof Intl < "u" && (f = aR); var h = new Xy(this.options); this.store = new X6(this.options.resources, this.options); var d = this.services; d.logger = ii, d.resourceStore = this.store, d.languageUtils = h, d.pluralResolver = new rR(h, { prepend: this.options.pluralSeparator, compatibilityJSON: this.options.compatibilityJSON, simplifyPluralSuffix: this.options.simplifyPluralSuffix }), f && (!this.options.interpolation.format || this.options.interpolation.format === u.interpolation.format) && (d.formatter = c(f), d.formatter.init(d, this.options), this.options.interpolation.format = d.formatter.format.bind(d.formatter)), d.interpolator = new nR(this.options), d.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, d.backendConnector = new lR(c(this.modules.backend), d.resourceStore, d, this.options), d.backendConnector.on("*", function(x) { for (var w = arguments.length, _ = new Array(w > 1 ? w - 1 : 0), P = 1; P < w; P++) _[P - 1] = arguments[P]; i.emit.apply(i, [x].concat(_)); }), this.modules.languageDetector && (d.languageDetector = c(this.modules.languageDetector), d.languageDetector.init && d.languageDetector.init(d, this.options.detection, this.options)), this.modules.i18nFormat && (d.i18nFormat = c(this.modules.i18nFormat), d.i18nFormat.init && d.i18nFormat.init(this)), this.translator = new Ky(this.services, this.options), this.translator.on("*", function(x) { for (var w = arguments.length, _ = new Array(w > 1 ? w - 1 : 0), P = 1; P < w; P++) _[P - 1] = arguments[P]; i.emit.apply(i, [x].concat(_)); }), this.modules.external.forEach(function(x) { x.init && x.init(i); }); } if (this.format = this.options.interpolation.format, s || (s = Sc), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) { var g = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng); g.length > 0 && g[0] !== "dev" && (this.options.lng = g[0]); } !this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"); var v = ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"]; v.forEach(function(x) { i[x] = function() { var w; return (w = i.store)[x].apply(w, arguments); }; }); var m = ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"]; m.forEach(function(x) { i[x] = function() { var w; return (w = i.store)[x].apply(w, arguments), i; }; }); var b = eu(), S = function() { var w = function(P, E) { i.isInitialized && !i.initializedStoreOnce && i.logger.warn("init: i18next is already initialized. You should call init just once!"), i.isInitialized = !0, i.options.isClone || i.logger.log("initialized", i.options), i.emit("initialized", i.options), b.resolve(E), s(P, E); }; if (i.languages && i.options.compatibilityAPI !== "v1" && !i.isInitialized) return w(null, i.t.bind(i)); i.changeLanguage(i.options.lng, w); }; return this.options.resources || !this.options.initImmediate ? S() : setTimeout(S, 0), b; } }, { key: "loadResources", value: function(i) { var a = this, s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Sc, u = s, c = typeof i == "string" ? i : this.language; if (typeof i == "function" && (u = i), !this.options.resources || this.options.partialBundledLanguages) { if (c && c.toLowerCase() === "cimode") return u(); var f = [], h = function(v) { if (v) { var m = a.services.languageUtils.toResolveHierarchy(v); m.forEach(function(b) { f.indexOf(b) < 0 && f.push(b); }); } }; if (c) h(c); else { var d = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng); d.forEach(function(g) { return h(g); }); } this.options.preload && this.options.preload.forEach(function(g) { return h(g); }), this.services.backendConnector.load(f, this.options.ns, function(g) { !g && !a.resolvedLanguage && a.language && a.setResolvedLanguage(a.language), u(g); }); } else u(null); } }, { key: "reloadResources", value: function(i, a, s) { var u = eu(); return i || (i = this.languages), a || (a = this.options.ns), s || (s = Sc), this.services.backendConnector.reload(i, a, function(c) { u.resolve(), s(c); }), u; } }, { key: "use", value: function(i) { if (!i) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()"); if (!i.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()"); return i.type === "backend" && (this.modules.backend = i), (i.type === "logger" || i.log && i.warn && i.error) && (this.modules.logger = i), i.type === "languageDetector" && (this.modules.languageDetector = i), i.type === "i18nFormat" && (this.modules.i18nFormat = i), i.type === "postProcessor" && qS.addPostProcessor(i), i.type === "formatter" && (this.modules.formatter = i), i.type === "3rdParty" && this.modules.external.push(i), this; } }, { key: "setResolvedLanguage", value: function(i) { if (!(!i || !this.languages) && !(["cimode", "dev"].indexOf(i) > -1)) for (var a = 0; a < this.languages.length; a++) { var s = this.languages[a]; if (!(["cimode", "dev"].indexOf(s) > -1) && this.store.hasLanguageSomeTranslations(s)) { this.resolvedLanguage = s; break; } } } }, { key: "changeLanguage", value: function(i, a) { var s = this; this.isLanguageChangingTo = i; var u = eu(); this.emit("languageChanging", i); var c = function(g) { s.language = g, s.languages = s.services.languageUtils.toResolveHierarchy(g), s.resolvedLanguage = void 0, s.setResolvedLanguage(g); }, f = function(g, v) { v ? (c(v), s.translator.changeLanguage(v), s.isLanguageChangingTo = void 0, s.emit("languageChanged", v), s.logger.log("languageChanged", v)) : s.isLanguageChangingTo = void 0, u.resolve(function() { return s.t.apply(s, arguments); }), a && a(g, function() { return s.t.apply(s, arguments); }); }, h = function(g) { !i && !g && s.services.languageDetector && (g = []); var v = typeof g == "string" ? g : s.services.languageUtils.getBestMatchFromCodes(g); v && (s.language || c(v), s.translator.language || s.translator.changeLanguage(v), s.services.languageDetector && s.services.languageDetector.cacheUserLanguage && s.services.languageDetector.cacheUserLanguage(v)), s.loadResources(v, function(m) { f(m, v); }); }; return !i && this.services.languageDetector && !this.services.languageDetector.async ? h(this.services.languageDetector.detect()) : !i && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(h) : this.services.languageDetector.detect(h) : h(i), u; } }, { key: "getFixedT", value: function(i, a, s) { var u = this, c = function f(h, d) { var g; if (Cn(d) !== "object") { for (var v = arguments.length, m = new Array(v > 2 ? v - 2 : 0), b = 2; b < v; b++) m[b - 2] = arguments[b]; g = u.options.overloadTranslationOptionHandler([h, d].concat(m)); } else g = $n({}, d); g.lng = g.lng || f.lng, g.lngs = g.lngs || f.lngs, g.ns = g.ns || f.ns, g.keyPrefix = g.keyPrefix || s || f.keyPrefix; var S = u.options.keySeparator || ".", x; return g.keyPrefix && Array.isArray(h) ? x = h.map(function(w) { return "".concat(g.keyPrefix).concat(S).concat(w); }) : x = g.keyPrefix ? "".concat(g.keyPrefix).concat(S).concat(h) : h, u.t(x, g); }; return typeof i == "string" ? c.lng = i : c.lngs = i, c.ns = a, c.keyPrefix = s, c; } }, { key: "t", value: function() { var i; return this.translator && (i = this.translator).translate.apply(i, arguments); } }, { key: "exists", value: function() { var i; return this.translator && (i = this.translator).exists.apply(i, arguments); } }, { key: "setDefaultNamespace", value: function(i) { this.options.defaultNS = i; } }, { key: "hasLoadedNamespace", value: function(i) { var a = this, s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; if (!this.isInitialized) return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1; if (!this.languages || !this.languages.length) return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1; var u = this.resolvedLanguage || this.languages[0], c = this.options ? this.options.fallbackLng : !1, f = this.languages[this.languages.length - 1]; if (u.toLowerCase() === "cimode") return !0; var h = function(v, m) { var b = a.services.backendConnector.state["".concat(v, "|").concat(m)]; return b === -1 || b === 2; }; if (s.precheck) { var d = s.precheck(this, h); if (d !== void 0) return d; } return !!(this.hasResourceBundle(u, i) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || h(u, i) && (!c || h(f, i))); } }, { key: "loadNamespaces", value: function(i, a) { var s = this, u = eu(); return this.options.ns ? (typeof i == "string" && (i = [i]), i.forEach(function(c) { s.options.ns.indexOf(c) < 0 && s.options.ns.push(c); }), this.loadResources(function(c) { u.resolve(), a && a(c); }), u) : (a && a(), Promise.resolve()); } }, { key: "loadLanguages", value: function(i, a) { var s = eu(); typeof i == "string" && (i = [i]); var u = this.options.preload || [], c = i.filter(function(f) { return u.indexOf(f) < 0; }); return c.length ? (this.options.preload = u.concat(c), this.loadResources(function(f) { s.resolve(), a && a(f); }), s) : (a && a(), Promise.resolve()); } }, { key: "dir", value: function(i) { if (i || (i = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language)), !i) return "rtl"; var a = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], s = this.services && this.services.languageUtils || new Xy(t1()); return a.indexOf(s.getLanguagePartFromCode(i)) > -1 || i.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr"; } }, { key: "cloneInstance", value: function() { var i = this, a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Sc, u = $n($n($n({}, this.options), a), { isClone: !0 }), c = new r(u); (a.debug !== void 0 || a.prefix !== void 0) && (c.logger = c.logger.clone(a)); var f = ["store", "services", "language"]; return f.forEach(function(h) { c[h] = i[h]; }), c.services = $n({}, this.services), c.services.utils = { hasLoadedNamespace: c.hasLoadedNamespace.bind(c) }, c.translator = new Ky(c.services, c.options), c.translator.on("*", function(h) { for (var d = arguments.length, g = new Array(d > 1 ? d - 1 : 0), v = 1; v < d; v++) g[v - 1] = arguments[v]; c.emit.apply(c, [h].concat(g)); }), c.init(u, s), c.translator.options = c.options, c.translator.backendConnector.services.utils = { hasLoadedNamespace: c.hasLoadedNamespace.bind(c) }, c; } }, { key: "toJSON", value: function() { return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage }; } }]), r; }(ga); Hn(yf, "createInstance", function() { var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = arguments.length > 1 ? arguments[1] : void 0; return new yf(t, e); }); var Ge = yf.createInstance(); Ge.createInstance = yf.createInstance; Ge.createInstance; Ge.dir; Ge.init; Ge.loadResources; Ge.reloadResources; Ge.use; Ge.changeLanguage; Ge.getFixedT; Ge.t; Ge.exists; Ge.setDefaultNamespace; Ge.hasLoadedNamespace; Ge.loadNamespaces; Ge.loadLanguages; var KS = [], dR = KS.forEach, pR = KS.slice; function gR(t) { return dR.call(pR.call(arguments, 1), function(e) { if (e) for (var r in e) t[r] === void 0 && (t[r] = e[r]); }), t; } var i1 = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, mR = function(e, r, n) { var i = n || {}; i.path = i.path || "/"; var a = encodeURIComponent(r), s = "".concat(e, "=").concat(a); if (i.maxAge > 0) { var u = i.maxAge - 0; if (Number.isNaN(u)) throw new Error("maxAge should be a Number"); s += "; Max-Age=".concat(Math.floor(u)); } if (i.domain) { if (!i1.test(i.domain)) throw new TypeError("option domain is invalid"); s += "; Domain=".concat(i.domain); } if (i.path) { if (!i1.test(i.path)) throw new TypeError("option path is invalid"); s += "; Path=".concat(i.path); } if (i.expires) { if (typeof i.expires.toUTCString != "function") throw new TypeError("option expires is invalid"); s += "; Expires=".concat(i.expires.toUTCString()); } if (i.httpOnly && (s += "; HttpOnly"), i.secure && (s += "; Secure"), i.sameSite) { var c = typeof i.sameSite == "string" ? i.sameSite.toLowerCase() : i.sameSite; switch (c) { case !0: s += "; SameSite=Strict"; break; case "lax": s += "; SameSite=Lax"; break; case "strict": s += "; SameSite=Strict"; break; case "none": s += "; SameSite=None"; break; default: throw new TypeError("option sameSite is invalid"); } } return s; }, a1 = { create: function(e, r, n, i) { var a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : { path: "/", sameSite: "strict" }; n && (a.expires = new Date(), a.expires.setTime(a.expires.getTime() + n * 60 * 1e3)), i && (a.domain = i), document.cookie = mR(e, encodeURIComponent(r), a); }, read: function(e) { for (var r = "".concat(e, "="), n = document.cookie.split(";"), i = 0; i < n.length; i++) { for (var a = n[i]; a.charAt(0) === " "; ) a = a.substring(1, a.length); if (a.indexOf(r) === 0) return a.substring(r.length, a.length); } return null; }, remove: function(e) { this.create(e, "", -1); } }, vR = { name: "cookie", lookup: function(e) { var r; if (e.lookupCookie && typeof document < "u") { var n = a1.read(e.lookupCookie); n && (r = n); } return r; }, cacheUserLanguage: function(e, r) { r.lookupCookie && typeof document < "u" && a1.create(r.lookupCookie, e, r.cookieMinutes, r.cookieDomain, r.cookieOptions); } }, yR = { name: "querystring", lookup: function(e) { var r; if (typeof window < "u") { var n = window.location.search; !window.location.search && window.location.hash && window.location.hash.indexOf("?") > -1 && (n = window.location.hash.substring(window.location.hash.indexOf("?"))); for (var i = n.substring(1), a = i.split("&"), s = 0; s < a.length; s++) { var u = a[s].indexOf("="); if (u > 0) { var c = a[s].substring(0, u); c === e.lookupQuerystring && (r = a[s].substring(u + 1)); } } } return r; } }, tu = null, s1 = function() { if (tu !== null) return tu; try { tu = window !== "undefined" && window.localStorage !== null; var e = "i18next.translate.boo"; window.localStorage.setItem(e, "foo"), window.localStorage.removeItem(e); } catch { tu = !1; } return tu; }, bR = { name: "localStorage", lookup: function(e) { var r; if (e.lookupLocalStorage && s1()) { var n = window.localStorage.getItem(e.lookupLocalStorage); n && (r = n); } return r; }, cacheUserLanguage: function(e, r) { r.lookupLocalStorage && s1() && window.localStorage.setItem(r.lookupLocalStorage, e); } }, ru = null, o1 = function() { if (ru !== null) return ru; try { ru = window !== "undefined" && window.sessionStorage !== null; var e = "i18next.translate.boo"; window.sessionStorage.setItem(e, "foo"), window.sessionStorage.removeItem(e); } catch { ru = !1; } return ru; }, SR = { name: "sessionStorage", lookup: function(e) { var r; if (e.lookupSessionStorage && o1()) { var n = window.sessionStorage.getItem(e.lookupSessionStorage); n && (r = n); } return r; }, cacheUserLanguage: function(e, r) { r.lookupSessionStorage && o1() && window.sessionStorage.setItem(r.lookupSessionStorage, e); } }, wR = { name: "navigator", lookup: function(e) { var r = []; if (typeof navigator < "u") { if (navigator.languages) for (var n = 0; n < navigator.languages.length; n++) r.push(navigator.languages[n]); navigator.userLanguage && r.push(navigator.userLanguage), navigator.language && r.push(navigator.language); } return r.length > 0 ? r : void 0; } }, xR = { name: "htmlTag", lookup: function(e) { var r, n = e.htmlTag || (typeof document < "u" ? document.documentElement : null); return n && typeof n.getAttribute == "function" && (r = n.getAttribute("lang")), r; } }, CR = { name: "path", lookup: function(e) { var r; if (typeof window < "u") { var n = window.location.pathname.match(/\/([a-zA-Z-]*)/g); if (n instanceof Array) if (typeof e.lookupFromPathIndex == "number") { if (typeof n[e.lookupFromPathIndex] != "string") return; r = n[e.lookupFromPathIndex].replace("/", ""); } else r = n[0].replace("/", ""); } return r; } }, _R = { name: "subdomain", lookup: function(e) { var r = typeof e.lookupFromSubdomainIndex == "number" ? e.lookupFromSubdomainIndex + 1 : 1, n = typeof window < "u" && window.location && window.location.hostname && window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i); if (n) return n[r]; } }; function PR() { return { order: ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"], lookupQuerystring: "lng", lookupCookie: "i18next", lookupLocalStorage: "i18nextLng", lookupSessionStorage: "i18nextLng", // cache user language caches: ["localStorage"], excludeCacheFor: ["cimode"] // cookieMinutes: 10, // cookieDomain: 'myDomain' }; } var XS = /* @__PURE__ */ function() { function t(e) { var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; Rn(this, t), this.type = "languageDetector", this.detectors = {}, this.init(e, r); } return kn(t, [{ key: "init", value: function(r) { var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; this.services = r, this.options = gR(n, this.options || {}, PR()), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = i, this.addDetector(vR), this.addDetector(yR), this.addDetector(bR), this.addDetector(SR), this.addDetector(wR), this.addDetector(xR), this.addDetector(CR), this.addDetector(_R); } }, { key: "addDetector", value: function(r) { this.detectors[r.name] = r; } }, { key: "detect", value: function(r) { var n = this; r || (r = this.options.order); var i = []; return r.forEach(function(a) { if (n.detectors[a]) { var s = n.detectors[a].lookup(n.options); s && typeof s == "string" && (s = [s]), s && (i = i.concat(s)); } }), this.services.languageUtils.getBestMatchFromCodes ? i : i.length > 0 ? i[0] : null; } }, { key: "cacheUserLanguage", value: function(r, n) { var i = this; n || (n = this.options.caches), n && (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(r) > -1 || n.forEach(function(a) { i.detectors[a] && i.detectors[a].cacheUserLanguage(r, i.options); })); } }]), t; }(); XS.type = "languageDetector"; function kp(t) { return kp = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, kp(t); } var QS = [], ER = QS.forEach, TR = QS.slice; function Ip(t) { return ER.call(TR.call(arguments, 1), function(e) { if (e) for (var r in e) t[r] === void 0 && (t[r] = e[r]); }), t; } function JS() { return typeof XMLHttpRequest == "function" || (typeof XMLHttpRequest > "u" ? "undefined" : kp(XMLHttpRequest)) === "object"; } function AR(t) { return !!t && typeof t.then == "function"; } function OR(t) { return AR(t) ? t : Promise.resolve(t); } function RR(t) { throw new Error('Could not dynamically require "' + t + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); } var Fu = {}, kR = { get exports() { return Fu; }, set exports(t) { Fu = t; } }, _u = {}, IR = { get exports() { return _u; }, set exports(t) { _u = t; } }, u1; function DR() { return u1 || (u1 = 1, function(t, e) { var r = typeof self < "u" ? self : Dr, n = function() { function a() { this.fetch = !1, this.DOMException = r.DOMException; } return a.prototype = r, new a(); }(); (function(a) { (function(s) { var u = { searchParams: "URLSearchParams" in a, iterable: "Symbol" in a && "iterator" in Symbol, blob: "FileReader" in a && "Blob" in a && function() { try { return new Blob(), !0; } catch { return !1; } }(), formData: "FormData" in a, arrayBuffer: "ArrayBuffer" in a }; function c(O) { return O && DataView.prototype.isPrototypeOf(O); } if (u.arrayBuffer) var f = [ "[object Int8Array]", "[object Uint8Array]", "[object Uint8ClampedArray]", "[object Int16Array]", "[object Uint16Array]", "[object Int32Array]", "[object Uint32Array]", "[object Float32Array]", "[object Float64Array]" ], h = ArrayBuffer.isView || function(O) { return O && f.indexOf(Object.prototype.toString.call(O)) > -1; }; function d(O) { if (typeof O != "string" && (O = String(O)), /[^a-z0-9\-#$%&'*+.^_`|~]/i.test(O)) throw new TypeError("Invalid character in header field name"); return O.toLowerCase(); } function g(O) { return typeof O != "string" && (O = String(O)), O; } function v(O) { var N = { next: function() { var j = O.shift(); return { done: j === void 0, value: j }; } }; return u.iterable && (N[Symbol.iterator] = function() { return N; }), N; } function m(O) { this.map = {}, O instanceof m ? O.forEach(function(N, j) { this.append(j, N); }, this) : Array.isArray(O) ? O.forEach(function(N) { this.append(N[0], N[1]); }, this) : O && Object.getOwnPropertyNames(O).forEach(function(N) { this.append(N, O[N]); }, this); } m.prototype.append = function(O, N) { O = d(O), N = g(N); var j = this.map[O]; this.map[O] = j ? j + ", " + N : N; }, m.prototype.delete = function(O) { delete this.map[d(O)]; }, m.prototype.get = function(O) { return O = d(O), this.has(O) ? this.map[O] : null; }, m.prototype.has = function(O) { return this.map.hasOwnProperty(d(O)); }, m.prototype.set = function(O, N) { this.map[d(O)] = g(N); }, m.prototype.forEach = function(O, N) { for (var j in this.map) this.map.hasOwnProperty(j) && O.call(N, this.map[j], j, this); }, m.prototype.keys = function() { var O = []; return this.forEach(function(N, j) { O.push(j); }), v(O); }, m.prototype.values = function() { var O = []; return this.forEach(function(N) { O.push(N); }), v(O); }, m.prototype.entries = function() { var O = []; return this.forEach(function(N, j) { O.push([j, N]); }), v(O); }, u.iterable && (m.prototype[Symbol.iterator] = m.prototype.entries); function b(O) { if (O.bodyUsed) return Promise.reject(new TypeError("Already read")); O.bodyUsed = !0; } function S(O) { return new Promise(function(N, j) { O.onload = function() { N(O.result); }, O.onerror = function() { j(O.error); }; }); } function x(O) { var N = new FileReader(), j = S(N); return N.readAsArrayBuffer(O), j; } function w(O) { var N = new FileReader(), j = S(N); return N.readAsText(O), j; } function _(O) { for (var N = new Uint8Array(O), j = new Array(N.length), J = 0; J < N.length; J++) j[J] = String.fromCharCode(N[J]); return j.join(""); } function P(O) { if (O.slice) return O.slice(0); var N = new Uint8Array(O.byteLength); return N.set(new Uint8Array(O)), N.buffer; } function E() { return this.bodyUsed = !1, this._initBody = function(O) { this._bodyInit = O, O ? typeof O == "string" ? this._bodyText = O : u.blob && Blob.prototype.isPrototypeOf(O) ? this._bodyBlob = O : u.formData && FormData.prototype.isPrototypeOf(O) ? this._bodyFormData = O : u.searchParams && URLSearchParams.prototype.isPrototypeOf(O) ? this._bodyText = O.toString() : u.arrayBuffer && u.blob && c(O) ? (this._bodyArrayBuffer = P(O.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : u.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(O) || h(O)) ? this._bodyArrayBuffer = P(O) : this._bodyText = O = Object.prototype.toString.call(O) : this._bodyText = "", this.headers.get("content-type") || (typeof O == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : u.searchParams && URLSearchParams.prototype.isPrototypeOf(O) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8")); }, u.blob && (this.blob = function() { var O = b(this); if (O) return O; if (this._bodyBlob) return Promise.resolve(this._bodyBlob); if (this._bodyArrayBuffer) return Promise.resolve(new Blob([this._bodyArrayBuffer])); if (this._bodyFormData) throw new Error("could not read FormData body as blob"); return Promise.resolve(new Blob([this._bodyText])); }, this.arrayBuffer = function() { return this._bodyArrayBuffer ? b(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(x); }), this.text = function() { var O = b(this); if (O) return O; if (this._bodyBlob) return w(this._bodyBlob); if (this._bodyArrayBuffer) return Promise.resolve(_(this._bodyArrayBuffer)); if (this._bodyFormData) throw new Error("could not read FormData body as text"); return Promise.resolve(this._bodyText); }, u.formData && (this.formData = function() { return this.text().then(H); }), this.json = function() { return this.text().then(JSON.parse); }, this; } var k = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"]; function D(O) { var N = O.toUpperCase(); return k.indexOf(N) > -1 ? N : O; } function V(O, N) { N = N || {}; var j = N.body; if (O instanceof V) { if (O.bodyUsed) throw new TypeError("Already read"); this.url = O.url, this.credentials = O.credentials, N.headers || (this.headers = new m(O.headers)), this.method = O.method, this.mode = O.mode, this.signal = O.signal, !j && O._bodyInit != null && (j = O._bodyInit, O.bodyUsed = !0); } else this.url = String(O); if (this.credentials = N.credentials || this.credentials || "same-origin", (N.headers || !this.headers) && (this.headers = new m(N.headers)), this.method = D(N.method || this.method || "GET"), this.mode = N.mode || this.mode || null, this.signal = N.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && j) throw new TypeError("Body not allowed for GET or HEAD requests"); this._initBody(j); } V.prototype.clone = function() { return new V(this, { body: this._bodyInit }); }; function H(O) { var N = new FormData(); return O.trim().split("&").forEach(function(j) { if (j) { var J = j.split("="), te = J.shift().replace(/\+/g, " "), ee = J.join("=").replace(/\+/g, " "); N.append(decodeURIComponent(te), decodeURIComponent(ee)); } }), N; } function W(O) { var N = new m(), j = O.replace(/\r?\n[\t ]+/g, " "); return j.split(/\r?\n/).forEach(function(J) { var te = J.split(":"), ee = te.shift().trim(); if (ee) { var ae = te.join(":").trim(); N.append(ee, ae); } }), N; } E.call(V.prototype); function K(O, N) { N || (N = {}), this.type = "default", this.status = N.status === void 0 ? 200 : N.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in N ? N.statusText : "OK", this.headers = new m(N.headers), this.url = N.url || "", this._initBody(O); } E.call(K.prototype), K.prototype.clone = function() { return new K(this._bodyInit, { status: this.status, statusText: this.statusText, headers: new m(this.headers), url: this.url }); }, K.error = function() { var O = new K(null, { status: 0, statusText: "" }); return O.type = "error", O; }; var ie = [301, 302, 303, 307, 308]; K.redirect = function(O, N) { if (ie.indexOf(N) === -1) throw new RangeError("Invalid status code"); return new K(null, { status: N, headers: { location: O } }); }, s.DOMException = a.DOMException; try { new s.DOMException(); } catch { s.DOMException = function(N, j) { this.message = N, this.name = j; var J = Error(N); this.stack = J.stack; }, s.DOMException.prototype = Object.create(Error.prototype), s.DOMException.prototype.constructor = s.DOMException; } function F(O, N) { return new Promise(function(j, J) { var te = new V(O, N); if (te.signal && te.signal.aborted) return J(new s.DOMException("Aborted", "AbortError")); var ee = new XMLHttpRequest(); function ae() { ee.abort(); } ee.onload = function() { var le = { status: ee.status, statusText: ee.statusText, headers: W(ee.getAllResponseHeaders() || "") }; le.url = "responseURL" in ee ? ee.responseURL : le.headers.get("X-Request-URL"); var Ce = "response" in ee ? ee.response : ee.responseText; j(new K(Ce, le)); }, ee.onerror = function() { J(new TypeError("Network request failed")); }, ee.ontimeout = function() { J(new TypeError("Network request failed")); }, ee.onabort = function() { J(new s.DOMException("Aborted", "AbortError")); }, ee.open(te.method, te.url, !0), te.credentials === "include" ? ee.withCredentials = !0 : te.credentials === "omit" && (ee.withCredentials = !1), "responseType" in ee && u.blob && (ee.responseType = "blob"), te.headers.forEach(function(le, Ce) { ee.setRequestHeader(Ce, le); }), te.signal && (te.signal.addEventListener("abort", ae), ee.onreadystatechange = function() { ee.readyState === 4 && te.signal.removeEventListener("abort", ae); }), ee.send(typeof te._bodyInit > "u" ? null : te._bodyInit); }); } return F.polyfill = !0, a.fetch || (a.fetch = F, a.Headers = m, a.Request = V, a.Response = K), s.Headers = m, s.Request = V, s.Response = K, s.fetch = F, Object.defineProperty(s, "__esModule", { value: !0 }), s; })({}); })(n), n.fetch.ponyfill = !0, delete n.fetch.polyfill; var i = n; e = i.fetch, e.default = i.fetch, e.fetch = i.fetch, e.Headers = i.Headers, e.Request = i.Request, e.Response = i.Response, t.exports = e; }(IR, _u)), _u; } (function(t, e) { var r; if (typeof fetch == "function" && (typeof Dr < "u" && Dr.fetch ? r = Dr.fetch : typeof window < "u" && window.fetch ? r = window.fetch : r = fetch), typeof RR < "u" && (typeof window > "u" || typeof window.document > "u")) { var n = r || DR(); n.default && (n = n.default), e.default = n, t.exports = e.default; } })(kR, Fu); const ZS = Fu, l1 = /* @__PURE__ */ iO({ __proto__: null, default: ZS }, [Fu]); function bf(t) { return bf = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, bf(t); } var Li; typeof fetch == "function" && (typeof global < "u" && global.fetch ? Li = global.fetch : typeof window < "u" && window.fetch ? Li = window.fetch : Li = fetch); var ju; JS() && (typeof global < "u" && global.XMLHttpRequest ? ju = global.XMLHttpRequest : typeof window < "u" && window.XMLHttpRequest && (ju = window.XMLHttpRequest)); var Sf; typeof ActiveXObject == "function" && (typeof global < "u" && global.ActiveXObject ? Sf = global.ActiveXObject : typeof window < "u" && window.ActiveXObject && (Sf = window.ActiveXObject)); !Li && l1 && !ju && !Sf && (Li = ZS || l1); typeof Li != "function" && (Li = void 0); var Dp = function(e, r) { if (r && bf(r) === "object") { var n = ""; for (var i in r) n += "&" + encodeURIComponent(i) + "=" + encodeURIComponent(r[i]); if (!n) return e; e = e + (e.indexOf("?") !== -1 ? "&" : "?") + n.slice(1); } return e; }, c1 = function(e, r, n) { Li(e, r).then(function(i) { if (!i.ok) return n(i.statusText || "Error", { status: i.status }); i.text().then(function(a) { n(null, { status: i.status, data: a }); }).catch(n); }).catch(n); }, f1 = !1, MR = function(e, r, n, i) { e.queryStringParams && (r = Dp(r, e.queryStringParams)); var a = Ip({}, typeof e.customHeaders == "function" ? e.customHeaders() : e.customHeaders); n && (a["Content-Type"] = "application/json"); var s = typeof e.requestOptions == "function" ? e.requestOptions(n) : e.requestOptions, u = Ip({ method: n ? "POST" : "GET", body: n ? e.stringify(n) : void 0, headers: a }, f1 ? {} : s); try { c1(r, u, i); } catch (c) { if (!s || Object.keys(s).length === 0 || !c.message || c.message.indexOf("not implemented") < 0) return i(c); try { Object.keys(s).forEach(function(f) { delete u[f]; }), c1(r, u, i), f1 = !0; } catch (f) { i(f); } } }, LR = function(e, r, n, i) { n && bf(n) === "object" && (n = Dp("", n).slice(1)), e.queryStringParams && (r = Dp(r, e.queryStringParams)); try { var a; ju ? a = new ju() : a = new Sf("MSXML2.XMLHTTP.3.0"), a.open(n ? "POST" : "GET", r, 1), e.crossDomain || a.setRequestHeader("X-Requested-With", "XMLHttpRequest"), a.withCredentials = !!e.withCredentials, n && a.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), a.overrideMimeType && a.overrideMimeType("application/json"); var s = e.customHeaders; if (s = typeof s == "function" ? s() : s, s) for (var u in s) a.setRequestHeader(u, s[u]); a.onreadystatechange = function() { a.readyState > 3 && i(a.status >= 400 ? a.statusText : null, { status: a.status, data: a.responseText }); }, a.send(n); } catch (c) { console && console.log(c); } }, NR = function(e, r, n, i) { if (typeof n == "function" && (i = n, n = void 0), i = i || function() { }, Li && r.indexOf("file:") !== 0) return MR(e, r, n, i); if (JS() || typeof ActiveXObject == "function") return LR(e, r, n, i); i(new Error("No fetch and no xhr implementation found!")); }; function Vu(t) { return Vu = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Vu(t); } function BR(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function h1(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, $S(n.key), n); } } function FR(t, e, r) { return e && h1(t.prototype, e), r && h1(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t; } function jR(t, e, r) { return e = $S(e), e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t; } function $S(t) { var e = VR(t, "string"); return Vu(e) === "symbol" ? e : String(e); } function VR(t, e) { if (Vu(t) !== "object" || t === null) return t; var r = t[Symbol.toPrimitive]; if (r !== void 0) { var n = r.call(t, e || "default"); if (Vu(n) !== "object") return n; throw new TypeError("@@toPrimitive must return a primitive value."); } return (e === "string" ? String : Number)(t); } var zR = function() { return { loadPath: "/locales/{{lng}}/{{ns}}.json", addPath: "/locales/add/{{lng}}/{{ns}}", allowMultiLoading: !1, parse: function(r) { return JSON.parse(r); }, stringify: JSON.stringify, parsePayload: function(r, n, i) { return jR({}, n, i || ""); }, request: NR, reloadInterval: typeof window < "u" ? !1 : 60 * 60 * 1e3, customHeaders: {}, queryStringParams: {}, crossDomain: !1, withCredentials: !1, overrideMimeType: !1, requestOptions: { mode: "cors", credentials: "same-origin", cache: "default" } }; }, ew = function() { function t(e) { var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; BR(this, t), this.services = e, this.options = r, this.allOptions = n, this.type = "backend", this.init(e, r, n); } return FR(t, [{ key: "init", value: function(r) { var n = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; this.services = r, this.options = Ip(i, this.options || {}, zR()), this.allOptions = a, this.services && this.options.reloadInterval && setInterval(function() { return n.reload(); }, this.options.reloadInterval); } }, { key: "readMulti", value: function(r, n, i) { this._readAny(r, r, n, n, i); } }, { key: "read", value: function(r, n, i) { this._readAny([r], r, [n], n, i); } }, { key: "_readAny", value: function(r, n, i, a, s) { var u = this, c = this.options.loadPath; typeof this.options.loadPath == "function" && (c = this.options.loadPath(r, i)), c = OR(c), c.then(function(f) { if (!f) return s(null, {}); var h = u.services.interpolator.interpolate(f, { lng: r.join("+"), ns: i.join("+") }); u.loadUrl(h, s, n, a); }); } }, { key: "loadUrl", value: function(r, n, i, a) { var s = this; this.options.request(this.options, r, void 0, function(u, c) { if (c && (c.status >= 500 && c.status < 600 || !c.status)) return n("failed loading " + r + "; status code: " + c.status, !0); if (c && c.status >= 400 && c.status < 500) return n("failed loading " + r + "; status code: " + c.status, !1); if (!c && u && u.message && u.message.indexOf("Failed to fetch") > -1) return n("failed loading " + r + ": " + u.message, !0); if (u) return n(u, !1); var f, h; try { typeof c.data == "string" ? f = s.options.parse(c.data, i, a) : f = c.data; } catch { h = "failed parsing " + r + " to json"; } if (h) return n(h, !1); n(null, f); }); } }, { key: "create", value: function(r, n, i, a, s) { var u = this; if (this.options.addPath) { typeof r == "string" && (r = [r]); var c = this.options.parsePayload(n, i, a), f = 0, h = [], d = []; r.forEach(function(g) { var v = u.options.addPath; typeof u.options.addPath == "function" && (v = u.options.addPath(g, n)); var m = u.services.interpolator.interpolate(v, { lng: g, ns: n }); u.options.request(u.options, m, c, function(b, S) { f += 1, h.push(b), d.push(S), f === r.length && typeof s == "function" && s(h, d); }); }); } } }, { key: "reload", value: function() { var r = this, n = this.services, i = n.backendConnector, a = n.languageUtils, s = n.logger, u = i.language; if (!(u && u.toLowerCase() === "cimode")) { var c = [], f = function(d) { var g = a.toResolveHierarchy(d); g.forEach(function(v) { c.indexOf(v) < 0 && c.push(v); }); }; f(u), this.allOptions.preload && this.allOptions.preload.forEach(function(h) { return f(h); }), c.forEach(function(h) { r.allOptions.ns.forEach(function(d) { i.read(h, d, "read", null, null, function(g, v) { g && s.warn("loading namespace ".concat(d, " for language ").concat(h, " failed"), g), !g && v && s.log("loaded namespace ".concat(d, " for language ").concat(h), v), i.loaded("".concat(h, "|").concat(d), g, v); }); }); }); } } }]), t; }(); ew.type = "backend"; function GR() { if (console && console.warn) { for (var t, e = arguments.length, r = new Array(e), n = 0; n < e; n++) r[n] = arguments[n]; typeof r[0] == "string" && (r[0] = "react-i18next:: ".concat(r[0])), (t = console).warn.apply(t, r); } } var d1 = {}; function Mp() { for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++) e[r] = arguments[r]; typeof e[0] == "string" && d1[e[0]] || (typeof e[0] == "string" && (d1[e[0]] = new Date()), GR.apply(void 0, e)); } function p1(t, e, r) { t.loadNamespaces(e, function() { if (t.isInitialized) r(); else { var n = function i() { setTimeout(function() { t.off("initialized", i); }, 0), r(); }; t.on("initialized", n); } }); } function WR(t, e) { var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = e.languages[0], i = e.options ? e.options.fallbackLng : !1, a = e.languages[e.languages.length - 1]; if (n.toLowerCase() === "cimode") return !0; var s = function(c, f) { var h = e.services.backendConnector.state["".concat(c, "|").concat(f)]; return h === -1 || h === 2; }; return r.bindI18n && r.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !s(e.isLanguageChangingTo, t) ? !1 : !!(e.hasResourceBundle(n, t) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || s(n, t) && (!i || s(a, t))); } function UR(t, e) { var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; if (!e.languages || !e.languages.length) return Mp("i18n.languages were undefined or empty", e.languages), !0; var n = e.options.ignoreJSONStructure !== void 0; return n ? e.hasLoadedNamespace(t, { precheck: function(a, s) { if (r.bindI18n && r.bindI18n.indexOf("languageChanging") > -1 && a.services.backendConnector.backend && a.isLanguageChangingTo && !s(a.isLanguageChangingTo, t)) return !1; } }) : WR(t, e, r); } var HR = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, YR = { "&": "&", "&": "&", "<": "<", "<": "<", ">": ">", ">": ">", "'": "'", "'": "'", """: '"', """: '"', " ": " ", " ": " ", "©": "©", "©": "©", "®": "®", "®": "®", "…": "…", "…": "…", "/": "/", "/": "/" }, qR = function(e) { return YR[e]; }, KR = function(e) { return e.replace(HR, qR); }; function g1(t, e) { var r = Object.keys(t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(t); e && (n = n.filter(function(i) { return Object.getOwnPropertyDescriptor(t, i).enumerable; })), r.push.apply(r, n); } return r; } function m1(t) { for (var e = 1; e < arguments.length; e++) { var r = arguments[e] != null ? arguments[e] : {}; e % 2 ? g1(Object(r), !0).forEach(function(n) { Hn(t, n, r[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : g1(Object(r)).forEach(function(n) { Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n)); }); } return t; } var Lp = { bindI18n: "languageChanged", bindI18nStore: "", transEmptyNodeValue: "", transSupportBasicHtmlNodes: !0, transWrapTextNodes: "", transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"], useSuspense: !0, unescape: KR }; function XR() { var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; Lp = m1(m1({}, Lp), t); } function QR() { return Lp; } var tw; function JR(t) { tw = t; } function ZR() { return tw; } var $R = { type: "3rdParty", init: function(e) { XR(e.options.react), JR(e); } }, ek = On(), tk = function() { function t() { Rn(this, t), this.usedNamespaces = {}; } return kn(t, [{ key: "addUsedNamespaces", value: function(r) { var n = this; r.forEach(function(i) { n.usedNamespaces[i] || (n.usedNamespaces[i] = !0); }); } }, { key: "getUsedNamespaces", value: function() { return Object.keys(this.usedNamespaces); } }]), t; }(); function rk(t, e) { var r = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"]; if (r != null) { var n, i, a, s, u = [], c = !0, f = !1; try { if (a = (r = r.call(t)).next, e === 0) { if (Object(r) !== r) return; c = !1; } else for (; !(c = (n = a.call(r)).done) && (u.push(n.value), u.length !== e); c = !0) ; } catch (h) { f = !0, i = h; } finally { try { if (!c && r.return != null && (s = r.return(), Object(s) !== s)) return; } finally { if (f) throw i; } } return u; } } function nk(t, e) { return GS(t) || rk(t, e) || WS(t, e) || US(); } function v1(t, e) { var r = Object.keys(t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(t); e && (n = n.filter(function(i) { return Object.getOwnPropertyDescriptor(t, i).enumerable; })), r.push.apply(r, n); } return r; } function Hd(t) { for (var e = 1; e < arguments.length; e++) { var r = arguments[e] != null ? arguments[e] : {}; e % 2 ? v1(Object(r), !0).forEach(function(n) { Hn(t, n, r[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : v1(Object(r)).forEach(function(n) { Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n)); }); } return t; } var ik = function(e, r) { var n = $e(); return Wt(function() { n.current = r ? n.current : e; }, [e, r]), n.current; }; function rw(t) { var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = e.i18n, n = bt(ek) || {}, i = n.i18n, a = n.defaultNS, s = r || i || ZR(); if (s && !s.reportNamespaces && (s.reportNamespaces = new tk()), !s) { Mp("You will need to pass in an i18next instance by using initReactI18next"); var u = function(H, W) { return typeof W == "string" ? W : W && Cn(W) === "object" && typeof W.defaultValue == "string" ? W.defaultValue : Array.isArray(H) ? H[H.length - 1] : H; }, c = [u, {}, !1]; return c.t = u, c.i18n = {}, c.ready = !1, c; } s.options.react && s.options.react.wait !== void 0 && Mp("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour."); var f = Hd(Hd(Hd({}, QR()), s.options.react), e), h = f.useSuspense, d = f.keyPrefix, g = t || a || s.options && s.options.defaultNS; g = typeof g == "string" ? [g] : g || ["translation"], s.reportNamespaces.addUsedNamespaces && s.reportNamespaces.addUsedNamespaces(g); var v = (s.isInitialized || s.initializedStoreOnce) && g.every(function(V) { return UR(V, s, f); }); function m() { return s.getFixedT(null, f.nsMode === "fallback" ? g : g[0], d); } var b = En(m), S = nk(b, 2), x = S[0], w = S[1], _ = g.join(), P = ik(_), E = $e(!0); Wt(function() { var V = f.bindI18n, H = f.bindI18nStore; E.current = !0, !v && !h && p1(s, g, function() { E.current && w(m); }), v && P && P !== _ && E.current && w(m); function W() { E.current && w(m); } return V && s && s.on(V, W), H && s && s.store.on(H, W), function() { E.current = !1, V && s && V.split(" ").forEach(function(K) { return s.off(K, W); }), H && s && H.split(" ").forEach(function(K) { return s.store.off(K, W); }); }; }, [s, _]); var k = $e(!0); Wt(function() { E.current && !k.current && w(m), k.current = !1; }, [s, d]); var D = [x, s, v]; if (D.t = x, D.i18n = s, D.ready = v, v || !v && !h) return D; throw new Promise(function(V) { p1(s, g, function() { V(); }); }); } Ge.use(ew).use(XS).use($R).init({ fallbackLng: "en", debug: !1, backend: { loadPath: "/locales/{{lng}}.json" }, interpolation: { escapeValue: !1 }, returnNull: !1 }); const ak = { isConnected: !1, isProcessing: !1, log: [], shouldShowLogViewer: !1, shouldDisplayInProgressType: "latents", shouldDisplayGuides: !0, isGFPGANAvailable: !0, isESRGANAvailable: !0, socketId: "", shouldConfirmOnDelete: !0, openAccordions: [0], currentStep: 0, totalSteps: 0, currentIteration: 0, totalIterations: 0, currentStatus: Ge.isInitialized ? Ge.t("common.statusDisconnected") : "Disconnected", currentStatusHasSteps: !1, model: "", model_id: "", model_hash: "", app_id: "", app_version: "", model_list: {}, infill_methods: [], hasError: !1, wasErrorSeen: !0, isCancelable: !0, saveIntermediatesInterval: 5, enableImageDebugging: !1, toastQueue: [], searchFolder: null, foundModels: null, openModel: null, cancelOptions: { cancelType: "immediate", cancelAfter: null } }, nw = $a({ name: "system", initialState: ak, reducers: { setShouldDisplayInProgressType: (t, e) => { t.shouldDisplayInProgressType = e.payload; }, setIsProcessing: (t, e) => { t.isProcessing = e.payload; }, setCurrentStatus: (t, e) => { t.currentStatus = e.payload; }, setSystemStatus: (t, e) => ({ ...t, ...e.payload }), errorOccurred: (t) => { t.hasError = !0, t.isProcessing = !1, t.isCancelable = !0, t.currentStep = 0, t.totalSteps = 0, t.currentIteration = 0, t.totalIterations = 0, t.currentStatusHasSteps = !1, t.currentStatus = Ge.t("common.statusError"), t.wasErrorSeen = !1; }, errorSeen: (t) => { t.hasError = !1, t.wasErrorSeen = !0, t.currentStatus = t.isConnected ? Ge.t("common.statusConnected") : Ge.t("common.statusDisconnected"); }, addLogEntry: (t, e) => { const { timestamp: r, message: n, level: i } = e.payload, s = { timestamp: r, message: n, level: i || "info" }; t.log.push(s); }, setShouldShowLogViewer: (t, e) => { t.shouldShowLogViewer = e.payload; }, setIsConnected: (t, e) => { t.isConnected = e.payload, t.isProcessing = !1, t.isCancelable = !0, t.currentStep = 0, t.totalSteps = 0, t.currentIteration = 0, t.totalIterations = 0, t.currentStatusHasSteps = !1, t.hasError = !1; }, setSocketId: (t, e) => { t.socketId = e.payload; }, setShouldConfirmOnDelete: (t, e) => { t.shouldConfirmOnDelete = e.payload; }, setOpenAccordions: (t, e) => { t.openAccordions = e.payload; }, setSystemConfig: (t, e) => ({ ...t, ...e.payload }), setShouldDisplayGuides: (t, e) => { t.shouldDisplayGuides = e.payload; }, processingCanceled: (t) => { t.isProcessing = !1, t.isCancelable = !0, t.currentStep = 0, t.totalSteps = 0, t.currentIteration = 0, t.totalIterations = 0, t.currentStatusHasSteps = !1, t.currentStatus = Ge.t("common.statusProcessingCanceled"); }, generationRequested: (t) => { t.isProcessing = !0, t.isCancelable = !0, t.currentStep = 0, t.totalSteps = 0, t.currentIteration = 0, t.totalIterations = 0, t.currentStatusHasSteps = !1, t.currentStatus = Ge.t("common.statusPreparing"); }, setModelList: (t, e) => { t.model_list = e.payload; }, setIsCancelable: (t, e) => { t.isCancelable = e.payload; }, modelChangeRequested: (t) => { t.currentStatus = Ge.t("common.statusLoadingModel"), t.isCancelable = !1, t.isProcessing = !0, t.currentStatusHasSteps = !1; }, modelConvertRequested: (t) => { t.currentStatus = Ge.t("common.statusConvertingModel"), t.isCancelable = !1, t.isProcessing = !0, t.currentStatusHasSteps = !1; }, modelMergingRequested: (t) => { t.currentStatus = Ge.t("common.statusMergingModels"), t.isCancelable = !1, t.isProcessing = !0, t.currentStatusHasSteps = !1; }, setSaveIntermediatesInterval: (t, e) => { t.saveIntermediatesInterval = e.payload; }, setEnableImageDebugging: (t, e) => { t.enableImageDebugging = e.payload; }, addToast: (t, e) => { t.toastQueue.push(e.payload); }, clearToastQueue: (t) => { t.toastQueue = []; }, setProcessingIndeterminateTask: (t, e) => { t.isProcessing = !0, t.currentStatus = e.payload, t.currentStatusHasSteps = !1; }, setSearchFolder: (t, e) => { t.searchFolder = e.payload; }, setFoundModels: (t, e) => { t.foundModels = e.payload; }, setOpenModel: (t, e) => { t.openModel = e.payload; }, setCancelType: (t, e) => { t.cancelOptions.cancelType = e.payload; }, setCancelAfter: (t, e) => { t.cancelOptions.cancelAfter = e.payload; } } }), { setShouldDisplayInProgressType: yU, setIsProcessing: ri, addLogEntry: or, setShouldShowLogViewer: bU, setIsConnected: y1, setSocketId: SU, setShouldConfirmOnDelete: wU, setOpenAccordions: xU, setSystemStatus: sk, setCurrentStatus: Vs, setSystemConfig: ok, setShouldDisplayGuides: CU, processingCanceled: uk, errorOccurred: b1, errorSeen: _U, setModelList: zs, setIsCancelable: wc, modelChangeRequested: lk, modelConvertRequested: ck, modelMergingRequested: fk, setSaveIntermediatesInterval: PU, setEnableImageDebugging: EU, generationRequested: hk, addToast: nu, clearToastQueue: TU, setProcessingIndeterminateTask: AU, setSearchFolder: dk, setFoundModels: pk, setOpenModel: OU, setCancelType: RU, setCancelAfter: kU } = nw.actions, gk = nw.reducer, iw = [ "txt2img", "img2img", "unifiedCanvas", "nodes", "postprocessing", "training" ], mk = { activeTab: 0, currentTheme: "dark", parametersPanelScrollPosition: 0, shouldPinParametersPanel: !0, shouldShowParametersPanel: !0, shouldShowImageDetails: !1, shouldUseCanvasBetaLayout: !1, shouldShowExistingModelsInSearch: !1, shouldUseSliders: !1, addNewModelUIOption: null, shouldPinGallery: !0, shouldShowGallery: !0 }, vk = mk, aw = $a({ name: "ui", initialState: vk, reducers: { setActiveTab: (t, e) => { typeof e.payload == "number" ? t.activeTab = e.payload : t.activeTab = iw.indexOf(e.payload); }, setCurrentTheme: (t, e) => { t.currentTheme = e.payload; }, setParametersPanelScrollPosition: (t, e) => { t.parametersPanelScrollPosition = e.payload; }, setShouldPinParametersPanel: (t, e) => { t.shouldPinParametersPanel = e.payload, t.shouldShowParametersPanel = !0; }, setShouldShowParametersPanel: (t, e) => { t.shouldShowParametersPanel = e.payload; }, setShouldShowImageDetails: (t, e) => { t.shouldShowImageDetails = e.payload; }, setShouldUseCanvasBetaLayout: (t, e) => { t.shouldUseCanvasBetaLayout = e.payload; }, setShouldShowExistingModelsInSearch: (t, e) => { t.shouldShowExistingModelsInSearch = e.payload; }, setShouldUseSliders: (t, e) => { t.shouldUseSliders = e.payload; }, setAddNewModelUIOption: (t, e) => { t.addNewModelUIOption = e.payload; }, setShouldPinGallery: (t, e) => { t.shouldPinGallery = e.payload; }, setShouldShowGallery: (t, e) => { t.shouldShowGallery = e.payload; }, togglePinGalleryPanel: (t) => { t.shouldPinGallery = !t.shouldPinGallery; }, togglePinParametersPanel: (t) => { t.shouldPinParametersPanel = !t.shouldPinParametersPanel; }, toggleParametersPanel: (t) => { t.shouldShowParametersPanel = !t.shouldShowParametersPanel; }, toggleGalleryPanel: (t) => { t.shouldShowGallery = !t.shouldShowGallery; }, togglePanels: (t) => { t.shouldShowGallery || t.shouldShowParametersPanel ? (t.shouldShowGallery = !1, t.shouldShowParametersPanel = !1) : (t.shouldShowGallery = !0, t.shouldShowParametersPanel = !0); } } }), { setActiveTab: IU, setCurrentTheme: yk, setParametersPanelScrollPosition: DU, setShouldPinParametersPanel: MU, setShouldShowParametersPanel: LU, setShouldShowImageDetails: NU, setShouldUseCanvasBetaLayout: BU, setShouldShowExistingModelsInSearch: FU, setShouldUseSliders: jU, setAddNewModelUIOption: VU, setShouldPinGallery: zU, setShouldShowGallery: GU, togglePanels: WU, togglePinGalleryPanel: UU, togglePinParametersPanel: HU, toggleParametersPanel: YU, toggleGalleryPanel: qU } = aw.actions, bk = aw.reducer, hi = /* @__PURE__ */ Object.create(null); hi.open = "0"; hi.close = "1"; hi.ping = "2"; hi.pong = "3"; hi.message = "4"; hi.upgrade = "5"; hi.noop = "6"; const Xc = /* @__PURE__ */ Object.create(null); Object.keys(hi).forEach((t) => { Xc[hi[t]] = t; }); const Sk = { type: "error", data: "parser error" }, wk = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", xk = typeof ArrayBuffer == "function", Ck = (t) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(t) : t && t.buffer instanceof ArrayBuffer, sw = ({ type: t, data: e }, r, n) => wk && e instanceof Blob ? r ? n(e) : S1(e, n) : xk && (e instanceof ArrayBuffer || Ck(e)) ? r ? n(e) : S1(new Blob([e]), n) : n(hi[t] + (e || "")), S1 = (t, e) => { const r = new FileReader(); return r.onload = function() { const n = r.result.split(",")[1]; e("b" + (n || "")); }, r.readAsDataURL(t); }, w1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", mu = typeof Uint8Array > "u" ? [] : new Uint8Array(256); for (let t = 0; t < w1.length; t++) mu[w1.charCodeAt(t)] = t; const _k = (t) => { let e = t.length * 0.75, r = t.length, n, i = 0, a, s, u, c; t[t.length - 1] === "=" && (e--, t[t.length - 2] === "=" && e--); const f = new ArrayBuffer(e), h = new Uint8Array(f); for (n = 0; n < r; n += 4) a = mu[t.charCodeAt(n)], s = mu[t.charCodeAt(n + 1)], u = mu[t.charCodeAt(n + 2)], c = mu[t.charCodeAt(n + 3)], h[i++] = a << 2 | s >> 4, h[i++] = (s & 15) << 4 | u >> 2, h[i++] = (u & 3) << 6 | c & 63; return f; }, Pk = typeof ArrayBuffer == "function", ow = (t, e) => { if (typeof t != "string") return { type: "message", data: uw(t, e) }; const r = t.charAt(0); return r === "b" ? { type: "message", data: Ek(t.substring(1), e) } : Xc[r] ? t.length > 1 ? { type: Xc[r], data: t.substring(1) } : { type: Xc[r] } : Sk; }, Ek = (t, e) => { if (Pk) { const r = _k(t); return uw(r, e); } else return { base64: !0, data: t }; }, uw = (t, e) => { switch (e) { case "blob": return t instanceof ArrayBuffer ? new Blob([t]) : t; case "arraybuffer": default: return t; } }, lw = String.fromCharCode(30), Tk = (t, e) => { const r = t.length, n = new Array(r); let i = 0; t.forEach((a, s) => { sw(a, !1, (u) => { n[s] = u, ++i === r && e(n.join(lw)); }); }); }, Ak = (t, e) => { const r = t.split(lw), n = []; for (let i = 0; i < r.length; i++) { const a = ow(r[i], e); if (n.push(a), a.type === "error") break; } return n; }, cw = 4; function Jt(t) { if (t) return Ok(t); } function Ok(t) { for (var e in Jt.prototype) t[e] = Jt.prototype[e]; return t; } Jt.prototype.on = Jt.prototype.addEventListener = function(t, e) { return this._callbacks = this._callbacks || {}, (this._callbacks["$" + t] = this._callbacks["$" + t] || []).push(e), this; }; Jt.prototype.once = function(t, e) { function r() { this.off(t, r), e.apply(this, arguments); } return r.fn = e, this.on(t, r), this; }; Jt.prototype.off = Jt.prototype.removeListener = Jt.prototype.removeAllListeners = Jt.prototype.removeEventListener = function(t, e) { if (this._callbacks = this._callbacks || {}, arguments.length == 0) return this._callbacks = {}, this; var r = this._callbacks["$" + t]; if (!r) return this; if (arguments.length == 1) return delete this._callbacks["$" + t], this; for (var n, i = 0; i < r.length; i++) if (n = r[i], n === e || n.fn === e) { r.splice(i, 1); break; } return r.length === 0 && delete this._callbacks["$" + t], this; }; Jt.prototype.emit = function(t) { this._callbacks = this._callbacks || {}; for (var e = new Array(arguments.length - 1), r = this._callbacks["$" + t], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n]; if (r) { r = r.slice(0); for (var n = 0, i = r.length; n < i; ++n) r[n].apply(this, e); } return this; }; Jt.prototype.emitReserved = Jt.prototype.emit; Jt.prototype.listeners = function(t) { return this._callbacks = this._callbacks || {}, this._callbacks["$" + t] || []; }; Jt.prototype.hasListeners = function(t) { return !!this.listeners(t).length; }; const wn = (() => typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")())(); function fw(t, ...e) { return e.reduce((r, n) => (t.hasOwnProperty(n) && (r[n] = t[n]), r), {}); } const Rk = wn.setTimeout, kk = wn.clearTimeout; function Uf(t, e) { e.useNativeTimers ? (t.setTimeoutFn = Rk.bind(wn), t.clearTimeoutFn = kk.bind(wn)) : (t.setTimeoutFn = wn.setTimeout.bind(wn), t.clearTimeoutFn = wn.clearTimeout.bind(wn)); } const Ik = 1.33; function Dk(t) { return typeof t == "string" ? Mk(t) : Math.ceil((t.byteLength || t.size) * Ik); } function Mk(t) { let e = 0, r = 0; for (let n = 0, i = t.length; n < i; n++) e = t.charCodeAt(n), e < 128 ? r += 1 : e < 2048 ? r += 2 : e < 55296 || e >= 57344 ? r += 3 : (n++, r += 4); return r; } class Lk extends Error { constructor(e, r, n) { super(e), this.description = r, this.context = n, this.type = "TransportError"; } } class hw extends Jt { /** * Transport abstract constructor. * * @param {Object} opts - options * @protected */ constructor(e) { super(), this.writable = !1, Uf(this, e), this.opts = e, this.query = e.query, this.socket = e.socket; } /** * Emits an error. * * @param {String} reason * @param description * @param context - the error context * @return {Transport} for chaining * @protected */ onError(e, r, n) { return super.emitReserved("error", new Lk(e, r, n)), this; } /** * Opens the transport. */ open() { return this.readyState = "opening", this.doOpen(), this; } /** * Closes the transport. */ close() { return (this.readyState === "opening" || this.readyState === "open") && (this.doClose(), this.onClose()), this; } /** * Sends multiple packets. * * @param {Array} packets */ send(e) { this.readyState === "open" && this.write(e); } /** * Called upon open * * @protected */ onOpen() { this.readyState = "open", this.writable = !0, super.emitReserved("open"); } /** * Called with data. * * @param {String} data * @protected */ onData(e) { const r = ow(e, this.socket.binaryType); this.onPacket(r); } /** * Called with a decoded packet. * * @protected */ onPacket(e) { super.emitReserved("packet", e); } /** * Called upon close. * * @protected */ onClose(e) { this.readyState = "closed", super.emitReserved("close", e); } /** * Pauses the transport, in order not to lose packets during an upgrade. * * @param onPause */ pause(e) { } } const dw = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""), Np = 64, Nk = {}; let x1 = 0, xc = 0, C1; function _1(t) { let e = ""; do e = dw[t % Np] + e, t = Math.floor(t / Np); while (t > 0); return e; } function pw() { const t = _1(+new Date()); return t !== C1 ? (x1 = 0, C1 = t) : t + "." + _1(x1++); } for (; xc < Np; xc++) Nk[dw[xc]] = xc; function gw(t) { let e = ""; for (let r in t) t.hasOwnProperty(r) && (e.length && (e += "&"), e += encodeURIComponent(r) + "=" + encodeURIComponent(t[r])); return e; } function Bk(t) { let e = {}, r = t.split("&"); for (let n = 0, i = r.length; n < i; n++) { let a = r[n].split("="); e[decodeURIComponent(a[0])] = decodeURIComponent(a[1]); } return e; } let mw = !1; try { mw = typeof XMLHttpRequest < "u" && "withCredentials" in new XMLHttpRequest(); } catch { } const Fk = mw; function vw(t) { const e = t.xdomain; try { if (typeof XMLHttpRequest < "u" && (!e || Fk)) return new XMLHttpRequest(); } catch { } if (!e) try { return new wn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP"); } catch { } } function jk() { } const Vk = function() { return new vw({ xdomain: !1 }).responseType != null; }(); class zk extends hw { /** * XHR Polling constructor. * * @param {Object} opts * @package */ constructor(e) { if (super(e), this.polling = !1, typeof location < "u") { const n = location.protocol === "https:"; let i = location.port; i || (i = n ? "443" : "80"), this.xd = typeof location < "u" && e.hostname !== location.hostname || i !== e.port, this.xs = e.secure !== n; } const r = e && e.forceBase64; this.supportsBinary = Vk && !r; } get name() { return "polling"; } /** * Opens the socket (triggers polling). We write a PING message to determine * when the transport is open. * * @protected */ doOpen() { this.poll(); } /** * Pauses polling. * * @param {Function} onPause - callback upon buffers are flushed and transport is paused * @package */ pause(e) { this.readyState = "pausing"; const r = () => { this.readyState = "paused", e(); }; if (this.polling || !this.writable) { let n = 0; this.polling && (n++, this.once("pollComplete", function() { --n || r(); })), this.writable || (n++, this.once("drain", function() { --n || r(); })); } else r(); } /** * Starts polling cycle. * * @private */ poll() { this.polling = !0, this.doPoll(), this.emitReserved("poll"); } /** * Overloads onData to detect payloads. * * @protected */ onData(e) { const r = (n) => { if (this.readyState === "opening" && n.type === "open" && this.onOpen(), n.type === "close") return this.onClose({ description: "transport closed by the server" }), !1; this.onPacket(n); }; Ak(e, this.socket.binaryType).forEach(r), this.readyState !== "closed" && (this.polling = !1, this.emitReserved("pollComplete"), this.readyState === "open" && this.poll()); } /** * For polling, send a close packet. * * @protected */ doClose() { const e = () => { this.write([{ type: "close" }]); }; this.readyState === "open" ? e() : this.once("open", e); } /** * Writes a packets payload. * * @param {Array} packets - data packets * @protected */ write(e) { this.writable = !1, Tk(e, (r) => { this.doWrite(r, () => { this.writable = !0, this.emitReserved("drain"); }); }); } /** * Generates uri for connection. * * @private */ uri() { let e = this.query || {}; const r = this.opts.secure ? "https" : "http"; let n = ""; this.opts.timestampRequests !== !1 && (e[this.opts.timestampParam] = pw()), !this.supportsBinary && !e.sid && (e.b64 = 1), this.opts.port && (r === "https" && Number(this.opts.port) !== 443 || r === "http" && Number(this.opts.port) !== 80) && (n = ":" + this.opts.port); const i = gw(e), a = this.opts.hostname.indexOf(":") !== -1; return r + "://" + (a ? "[" + this.opts.hostname + "]" : this.opts.hostname) + n + this.opts.path + (i.length ? "?" + i : ""); } /** * Creates a request. * * @param {String} method * @private */ request(e = {}) { return Object.assign(e, { xd: this.xd, xs: this.xs }, this.opts), new ui(this.uri(), e); } /** * Sends data. * * @param {String} data to send. * @param {Function} called upon flush. * @private */ doWrite(e, r) { const n = this.request({ method: "POST", data: e }); n.on("success", r), n.on("error", (i, a) => { this.onError("xhr post error", i, a); }); } /** * Starts a poll cycle. * * @private */ doPoll() { const e = this.request(); e.on("data", this.onData.bind(this)), e.on("error", (r, n) => { this.onError("xhr poll error", r, n); }), this.pollXhr = e; } } class ui extends Jt { /** * Request constructor * * @param {Object} options * @package */ constructor(e, r) { super(), Uf(this, r), this.opts = r, this.method = r.method || "GET", this.uri = e, this.async = r.async !== !1, this.data = r.data !== void 0 ? r.data : null, this.create(); } /** * Creates the XHR object and sends the request. * * @private */ create() { const e = fw(this.opts, "agent", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "autoUnref"); e.xdomain = !!this.opts.xd, e.xscheme = !!this.opts.xs; const r = this.xhr = new vw(e); try { r.open(this.method, this.uri, this.async); try { if (this.opts.extraHeaders) { r.setDisableHeaderCheck && r.setDisableHeaderCheck(!0); for (let n in this.opts.extraHeaders) this.opts.extraHeaders.hasOwnProperty(n) && r.setRequestHeader(n, this.opts.extraHeaders[n]); } } catch { } if (this.method === "POST") try { r.setRequestHeader("Content-type", "text/plain;charset=UTF-8"); } catch { } try { r.setRequestHeader("Accept", "*/*"); } catch { } "withCredentials" in r && (r.withCredentials = this.opts.withCredentials), this.opts.requestTimeout && (r.timeout = this.opts.requestTimeout), r.onreadystatechange = () => { r.readyState === 4 && (r.status === 200 || r.status === 1223 ? this.onLoad() : this.setTimeoutFn(() => { this.onError(typeof r.status == "number" ? r.status : 0); }, 0)); }, r.send(this.data); } catch (n) { this.setTimeoutFn(() => { this.onError(n); }, 0); return; } typeof document < "u" && (this.index = ui.requestsCount++, ui.requests[this.index] = this); } /** * Called upon error. * * @private */ onError(e) { this.emitReserved("error", e, this.xhr), this.cleanup(!0); } /** * Cleans up house. * * @private */ cleanup(e) { if (!(typeof this.xhr > "u" || this.xhr === null)) { if (this.xhr.onreadystatechange = jk, e) try { this.xhr.abort(); } catch { } typeof document < "u" && delete ui.requests[this.index], this.xhr = null; } } /** * Called upon load. * * @private */ onLoad() { const e = this.xhr.responseText; e !== null && (this.emitReserved("data", e), this.emitReserved("success"), this.cleanup()); } /** * Aborts the request. * * @package */ abort() { this.cleanup(); } } ui.requestsCount = 0; ui.requests = {}; if (typeof document < "u") { if (typeof attachEvent == "function") attachEvent("onunload", P1); else if (typeof addEventListener == "function") { const t = "onpagehide" in wn ? "pagehide" : "unload"; addEventListener(t, P1, !1); } } function P1() { for (let t in ui.requests) ui.requests.hasOwnProperty(t) && ui.requests[t].abort(); } const yw = (() => typeof Promise == "function" && typeof Promise.resolve == "function" ? (e) => Promise.resolve().then(e) : (e, r) => r(e, 0))(), Cc = wn.WebSocket || wn.MozWebSocket, E1 = !0, Gk = "arraybuffer", T1 = typeof navigator < "u" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative"; class Wk extends hw { /** * WebSocket transport constructor. * * @param {Object} opts - connection options * @protected */ constructor(e) { super(e), this.supportsBinary = !e.forceBase64; } get name() { return "websocket"; } doOpen() { if (!this.check()) return; const e = this.uri(), r = this.opts.protocols, n = T1 ? {} : fw(this.opts, "agent", "perMessageDeflate", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "localAddress", "protocolVersion", "origin", "maxPayload", "family", "checkServerIdentity"); this.opts.extraHeaders && (n.headers = this.opts.extraHeaders); try { this.ws = E1 && !T1 ? r ? new Cc(e, r) : new Cc(e) : new Cc(e, r, n); } catch (i) { return this.emitReserved("error", i); } this.ws.binaryType = this.socket.binaryType || Gk, this.addEventListeners(); } /** * Adds event listeners to the socket * * @private */ addEventListeners() { this.ws.onopen = () => { this.opts.autoUnref && this.ws._socket.unref(), this.onOpen(); }, this.ws.onclose = (e) => this.onClose({ description: "websocket connection closed", context: e }), this.ws.onmessage = (e) => this.onData(e.data), this.ws.onerror = (e) => this.onError("websocket error", e); } write(e) { this.writable = !1; for (let r = 0; r < e.length; r++) { const n = e[r], i = r === e.length - 1; sw(n, this.supportsBinary, (a) => { const s = {}; try { E1 && this.ws.send(a); } catch { } i && yw(() => { this.writable = !0, this.emitReserved("drain"); }, this.setTimeoutFn); }); } } doClose() { typeof this.ws < "u" && (this.ws.close(), this.ws = null); } /** * Generates uri for connection. * * @private */ uri() { let e = this.query || {}; const r = this.opts.secure ? "wss" : "ws"; let n = ""; this.opts.port && (r === "wss" && Number(this.opts.port) !== 443 || r === "ws" && Number(this.opts.port) !== 80) && (n = ":" + this.opts.port), this.opts.timestampRequests && (e[this.opts.timestampParam] = pw()), this.supportsBinary || (e.b64 = 1); const i = gw(e), a = this.opts.hostname.indexOf(":") !== -1; return r + "://" + (a ? "[" + this.opts.hostname + "]" : this.opts.hostname) + n + this.opts.path + (i.length ? "?" + i : ""); } /** * Feature detection for WebSocket. * * @return {Boolean} whether this transport is available. * @private */ check() { return !!Cc; } } const Uk = { websocket: Wk, polling: zk }, Hk = /^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, Yk = [ "source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor" ]; function Bp(t) { const e = t, r = t.indexOf("["), n = t.indexOf("]"); r != -1 && n != -1 && (t = t.substring(0, r) + t.substring(r, n).replace(/:/g, ";") + t.substring(n, t.length)); let i = Hk.exec(t || ""), a = {}, s = 14; for (; s--; ) a[Yk[s]] = i[s] || ""; return r != -1 && n != -1 && (a.source = e, a.host = a.host.substring(1, a.host.length - 1).replace(/;/g, ":"), a.authority = a.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), a.ipv6uri = !0), a.pathNames = qk(a, a.path), a.queryKey = Kk(a, a.query), a; } function qk(t, e) { const r = /\/{2,9}/g, n = e.replace(r, "/").split("/"); return (e.slice(0, 1) == "/" || e.length === 0) && n.splice(0, 1), e.slice(-1) == "/" && n.splice(n.length - 1, 1), n; } function Kk(t, e) { const r = {}; return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function(n, i, a) { i && (r[i] = a); }), r; } let bw = class Ys extends Jt { /** * Socket constructor. * * @param {String|Object} uri - uri or options * @param {Object} opts - options */ constructor(e, r = {}) { super(), this.writeBuffer = [], e && typeof e == "object" && (r = e, e = null), e ? (e = Bp(e), r.hostname = e.host, r.secure = e.protocol === "https" || e.protocol === "wss", r.port = e.port, e.query && (r.query = e.query)) : r.host && (r.hostname = Bp(r.host).host), Uf(this, r), this.secure = r.secure != null ? r.secure : typeof location < "u" && location.protocol === "https:", r.hostname && !r.port && (r.port = this.secure ? "443" : "80"), this.hostname = r.hostname || (typeof location < "u" ? location.hostname : "localhost"), this.port = r.port || (typeof location < "u" && location.port ? location.port : this.secure ? "443" : "80"), this.transports = r.transports || ["polling", "websocket"], this.writeBuffer = [], this.prevBufferLen = 0, this.opts = Object.assign({ path: "/engine.io", agent: !1, withCredentials: !1, upgrade: !0, timestampParam: "t", rememberUpgrade: !1, addTrailingSlash: !0, rejectUnauthorized: !0, perMessageDeflate: { threshold: 1024 }, transportOptions: {}, closeOnBeforeunload: !0 }, r), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query = Bk(this.opts.query)), this.id = null, this.upgrades = null, this.pingInterval = null, this.pingTimeout = null, this.pingTimeoutTimer = null, typeof addEventListener == "function" && (this.opts.closeOnBeforeunload && (this.beforeunloadEventListener = () => { this.transport && (this.transport.removeAllListeners(), this.transport.close()); }, addEventListener("beforeunload", this.beforeunloadEventListener, !1)), this.hostname !== "localhost" && (this.offlineEventListener = () => { this.onClose("transport close", { description: "network connection lost" }); }, addEventListener("offline", this.offlineEventListener, !1))), this.open(); } /** * Creates transport of the given type. * * @param {String} name - transport name * @return {Transport} * @private */ createTransport(e) { const r = Object.assign({}, this.opts.query); r.EIO = cw, r.transport = e, this.id && (r.sid = this.id); const n = Object.assign({}, this.opts.transportOptions[e], this.opts, { query: r, socket: this, hostname: this.hostname, secure: this.secure, port: this.port }); return new Uk[e](n); } /** * Initializes transport to use and starts probe. * * @private */ open() { let e; if (this.opts.rememberUpgrade && Ys.priorWebsocketSuccess && this.transports.indexOf("websocket") !== -1) e = "websocket"; else if (this.transports.length === 0) { this.setTimeoutFn(() => { this.emitReserved("error", "No transports available"); }, 0); return; } else e = this.transports[0]; this.readyState = "opening"; try { e = this.createTransport(e); } catch { this.transports.shift(), this.open(); return; } e.open(), this.setTransport(e); } /** * Sets the current transport. Disables the existing one (if any). * * @private */ setTransport(e) { this.transport && this.transport.removeAllListeners(), this.transport = e, e.on("drain", this.onDrain.bind(this)).on("packet", this.onPacket.bind(this)).on("error", this.onError.bind(this)).on("close", (r) => this.onClose("transport close", r)); } /** * Probes a transport. * * @param {String} name - transport name * @private */ probe(e) { let r = this.createTransport(e), n = !1; Ys.priorWebsocketSuccess = !1; const i = () => { n || (r.send([{ type: "ping", data: "probe" }]), r.once("packet", (d) => { if (!n) if (d.type === "pong" && d.data === "probe") { if (this.upgrading = !0, this.emitReserved("upgrading", r), !r) return; Ys.priorWebsocketSuccess = r.name === "websocket", this.transport.pause(() => { n || this.readyState !== "closed" && (h(), this.setTransport(r), r.send([{ type: "upgrade" }]), this.emitReserved("upgrade", r), r = null, this.upgrading = !1, this.flush()); }); } else { const g = new Error("probe error"); g.transport = r.name, this.emitReserved("upgradeError", g); } })); }; function a() { n || (n = !0, h(), r.close(), r = null); } const s = (d) => { const g = new Error("probe error: " + d); g.transport = r.name, a(), this.emitReserved("upgradeError", g); }; function u() { s("transport closed"); } function c() { s("socket closed"); } function f(d) { r && d.name !== r.name && a(); } const h = () => { r.removeListener("open", i), r.removeListener("error", s), r.removeListener("close", u), this.off("close", c), this.off("upgrading", f); }; r.once("open", i), r.once("error", s), r.once("close", u), this.once("close", c), this.once("upgrading", f), r.open(); } /** * Called when connection is deemed open. * * @private */ onOpen() { if (this.readyState = "open", Ys.priorWebsocketSuccess = this.transport.name === "websocket", this.emitReserved("open"), this.flush(), this.readyState === "open" && this.opts.upgrade) { let e = 0; const r = this.upgrades.length; for (; e < r; e++) this.probe(this.upgrades[e]); } } /** * Handles a packet. * * @private */ onPacket(e) { if (this.readyState === "opening" || this.readyState === "open" || this.readyState === "closing") switch (this.emitReserved("packet", e), this.emitReserved("heartbeat"), e.type) { case "open": this.onHandshake(JSON.parse(e.data)); break; case "ping": this.resetPingTimeout(), this.sendPacket("pong"), this.emitReserved("ping"), this.emitReserved("pong"); break; case "error": const r = new Error("server error"); r.code = e.data, this.onError(r); break; case "message": this.emitReserved("data", e.data), this.emitReserved("message", e.data); break; } } /** * Called upon handshake completion. * * @param {Object} data - handshake obj * @private */ onHandshake(e) { this.emitReserved("handshake", e), this.id = e.sid, this.transport.query.sid = e.sid, this.upgrades = this.filterUpgrades(e.upgrades), this.pingInterval = e.pingInterval, this.pingTimeout = e.pingTimeout, this.maxPayload = e.maxPayload, this.onOpen(), this.readyState !== "closed" && this.resetPingTimeout(); } /** * Sets and resets ping timeout timer based on server pings. * * @private */ resetPingTimeout() { this.clearTimeoutFn(this.pingTimeoutTimer), this.pingTimeoutTimer = this.setTimeoutFn(() => { this.onClose("ping timeout"); }, this.pingInterval + this.pingTimeout), this.opts.autoUnref && this.pingTimeoutTimer.unref(); } /** * Called on `drain` event * * @private */ onDrain() { this.writeBuffer.splice(0, this.prevBufferLen), this.prevBufferLen = 0, this.writeBuffer.length === 0 ? this.emitReserved("drain") : this.flush(); } /** * Flush write buffers. * * @private */ flush() { if (this.readyState !== "closed" && this.transport.writable && !this.upgrading && this.writeBuffer.length) { const e = this.getWritablePackets(); this.transport.send(e), this.prevBufferLen = e.length, this.emitReserved("flush"); } } /** * Ensure the encoded size of the writeBuffer is below the maxPayload value sent by the server (only for HTTP * long-polling) * * @private */ getWritablePackets() { if (!(this.maxPayload && this.transport.name === "polling" && this.writeBuffer.length > 1)) return this.writeBuffer; let r = 1; for (let n = 0; n < this.writeBuffer.length; n++) { const i = this.writeBuffer[n].data; if (i && (r += Dk(i)), n > 0 && r > this.maxPayload) return this.writeBuffer.slice(0, n); r += 2; } return this.writeBuffer; } /** * Sends a message. * * @param {String} msg - message. * @param {Object} options. * @param {Function} callback function. * @return {Socket} for chaining. */ write(e, r, n) { return this.sendPacket("message", e, r, n), this; } send(e, r, n) { return this.sendPacket("message", e, r, n), this; } /** * Sends a packet. * * @param {String} type: packet type. * @param {String} data. * @param {Object} options. * @param {Function} fn - callback function. * @private */ sendPacket(e, r, n, i) { if (typeof r == "function" && (i = r, r = void 0), typeof n == "function" && (i = n, n = null), this.readyState === "closing" || this.readyState === "closed") return; n = n || {}, n.compress = n.compress !== !1; const a = { type: e, data: r, options: n }; this.emitReserved("packetCreate", a), this.writeBuffer.push(a), i && this.once("flush", i), this.flush(); } /** * Closes the connection. */ close() { const e = () => { this.onClose("forced close"), this.transport.close(); }, r = () => { this.off("upgrade", r), this.off("upgradeError", r), e(); }, n = () => { this.once("upgrade", r), this.once("upgradeError", r); }; return (this.readyState === "opening" || this.readyState === "open") && (this.readyState = "closing", this.writeBuffer.length ? this.once("drain", () => { this.upgrading ? n() : e(); }) : this.upgrading ? n() : e()), this; } /** * Called upon transport error * * @private */ onError(e) { Ys.priorWebsocketSuccess = !1, this.emitReserved("error", e), this.onClose("transport error", e); } /** * Called upon transport close. * * @private */ onClose(e, r) { (this.readyState === "opening" || this.readyState === "open" || this.readyState === "closing") && (this.clearTimeoutFn(this.pingTimeoutTimer), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), typeof removeEventListener == "function" && (removeEventListener("beforeunload", this.beforeunloadEventListener, !1), removeEventListener("offline", this.offlineEventListener, !1)), this.readyState = "closed", this.id = null, this.emitReserved("close", e, r), this.writeBuffer = [], this.prevBufferLen = 0); } /** * Filters upgrades, returning only those matching client transports. * * @param {Array} upgrades - server upgrades * @private */ filterUpgrades(e) { const r = []; let n = 0; const i = e.length; for (; n < i; n++) ~this.transports.indexOf(e[n]) && r.push(e[n]); return r; } }; bw.protocol = cw; function Xk(t, e = "", r) { let n = t; r = r || typeof location < "u" && location, t == null && (t = r.protocol + "//" + r.host), typeof t == "string" && (t.charAt(0) === "/" && (t.charAt(1) === "/" ? t = r.protocol + t : t = r.host + t), /^(https?|wss?):\/\//.test(t) || (typeof r < "u" ? t = r.protocol + "//" + t : t = "https://" + t), n = Bp(t)), n.port || (/^(http|ws)$/.test(n.protocol) ? n.port = "80" : /^(http|ws)s$/.test(n.protocol) && (n.port = "443")), n.path = n.path || "/"; const a = n.host.indexOf(":") !== -1 ? "[" + n.host + "]" : n.host; return n.id = n.protocol + "://" + a + ":" + n.port + e, n.href = n.protocol + "://" + a + (r && r.port === n.port ? "" : ":" + n.port), n; } const Qk = typeof ArrayBuffer == "function", Jk = (t) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(t) : t.buffer instanceof ArrayBuffer, Sw = Object.prototype.toString, Zk = typeof Blob == "function" || typeof Blob < "u" && Sw.call(Blob) === "[object BlobConstructor]", $k = typeof File == "function" || typeof File < "u" && Sw.call(File) === "[object FileConstructor]"; function qg(t) { return Qk && (t instanceof ArrayBuffer || Jk(t)) || Zk && t instanceof Blob || $k && t instanceof File; } function Qc(t, e) { if (!t || typeof t != "object") return !1; if (Array.isArray(t)) { for (let r = 0, n = t.length; r < n; r++) if (Qc(t[r])) return !0; return !1; } if (qg(t)) return !0; if (t.toJSON && typeof t.toJSON == "function" && arguments.length === 1) return Qc(t.toJSON(), !0); for (const r in t) if (Object.prototype.hasOwnProperty.call(t, r) && Qc(t[r])) return !0; return !1; } function eI(t) { const e = [], r = t.data, n = t; return n.data = Fp(r, e), n.attachments = e.length, { packet: n, buffers: e }; } function Fp(t, e) { if (!t) return t; if (qg(t)) { const r = { _placeholder: !0, num: e.length }; return e.push(t), r; } else if (Array.isArray(t)) { const r = new Array(t.length); for (let n = 0; n < t.length; n++) r[n] = Fp(t[n], e); return r; } else if (typeof t == "object" && !(t instanceof Date)) { const r = {}; for (const n in t) Object.prototype.hasOwnProperty.call(t, n) && (r[n] = Fp(t[n], e)); return r; } return t; } function tI(t, e) { return t.data = jp(t.data, e), delete t.attachments, t; } function jp(t, e) { if (!t) return t; if (t && t._placeholder === !0) { if (typeof t.num == "number" && t.num >= 0 && t.num < e.length) return e[t.num]; throw new Error("illegal attachments"); } else if (Array.isArray(t)) for (let r = 0; r < t.length; r++) t[r] = jp(t[r], e); else if (typeof t == "object") for (const r in t) Object.prototype.hasOwnProperty.call(t, r) && (t[r] = jp(t[r], e)); return t; } const rI = 5; var Je; (function(t) { t[t.CONNECT = 0] = "CONNECT", t[t.DISCONNECT = 1] = "DISCONNECT", t[t.EVENT = 2] = "EVENT", t[t.ACK = 3] = "ACK", t[t.CONNECT_ERROR = 4] = "CONNECT_ERROR", t[t.BINARY_EVENT = 5] = "BINARY_EVENT", t[t.BINARY_ACK = 6] = "BINARY_ACK"; })(Je || (Je = {})); class nI { /** * Encoder constructor * * @param {function} replacer - custom replacer to pass down to JSON.parse */ constructor(e) { this.replacer = e; } /** * Encode a packet as a single string if non-binary, or as a * buffer sequence, depending on packet type. * * @param {Object} obj - packet object */ encode(e) { return (e.type === Je.EVENT || e.type === Je.ACK) && Qc(e) ? this.encodeAsBinary({ type: e.type === Je.EVENT ? Je.BINARY_EVENT : Je.BINARY_ACK, nsp: e.nsp, data: e.data, id: e.id }) : [this.encodeAsString(e)]; } /** * Encode packet as string. */ encodeAsString(e) { let r = "" + e.type; return (e.type === Je.BINARY_EVENT || e.type === Je.BINARY_ACK) && (r += e.attachments + "-"), e.nsp && e.nsp !== "/" && (r += e.nsp + ","), e.id != null && (r += e.id), e.data != null && (r += JSON.stringify(e.data, this.replacer)), r; } /** * Encode packet as 'buffer sequence' by removing blobs, and * deconstructing packet into object with placeholders and * a list of buffers. */ encodeAsBinary(e) { const r = eI(e), n = this.encodeAsString(r.packet), i = r.buffers; return i.unshift(n), i; } } class Kg extends Jt { /** * Decoder constructor * * @param {function} reviver - custom reviver to pass down to JSON.stringify */ constructor(e) { super(), this.reviver = e; } /** * Decodes an encoded packet string into packet JSON. * * @param {String} obj - encoded packet */ add(e) { let r; if (typeof e == "string") { if (this.reconstructor) throw new Error("got plaintext data when reconstructing a packet"); r = this.decodeString(e); const n = r.type === Je.BINARY_EVENT; n || r.type === Je.BINARY_ACK ? (r.type = n ? Je.EVENT : Je.ACK, this.reconstructor = new iI(r), r.attachments === 0 && super.emitReserved("decoded", r)) : super.emitReserved("decoded", r); } else if (qg(e) || e.base64) if (this.reconstructor) r = this.reconstructor.takeBinaryData(e), r && (this.reconstructor = null, super.emitReserved("decoded", r)); else throw new Error("got binary data when not reconstructing a packet"); else throw new Error("Unknown type: " + e); } /** * Decode a packet String (JSON data) * * @param {String} str * @return {Object} packet */ decodeString(e) { let r = 0; const n = { type: Number(e.charAt(0)) }; if (Je[n.type] === void 0) throw new Error("unknown packet type " + n.type); if (n.type === Je.BINARY_EVENT || n.type === Je.BINARY_ACK) { const a = r + 1; for (; e.charAt(++r) !== "-" && r != e.length; ) ; const s = e.substring(a, r); if (s != Number(s) || e.charAt(r) !== "-") throw new Error("Illegal attachments"); n.attachments = Number(s); } if (e.charAt(r + 1) === "/") { const a = r + 1; for (; ++r && !(e.charAt(r) === "," || r === e.length); ) ; n.nsp = e.substring(a, r); } else n.nsp = "/"; const i = e.charAt(r + 1); if (i !== "" && Number(i) == i) { const a = r + 1; for (; ++r; ) { const s = e.charAt(r); if (s == null || Number(s) != s) { --r; break; } if (r === e.length) break; } n.id = Number(e.substring(a, r + 1)); } if (e.charAt(++r)) { const a = this.tryParse(e.substr(r)); if (Kg.isPayloadValid(n.type, a)) n.data = a; else throw new Error("invalid payload"); } return n; } tryParse(e) { try { return JSON.parse(e, this.reviver); } catch { return !1; } } static isPayloadValid(e, r) { switch (e) { case Je.CONNECT: return typeof r == "object"; case Je.DISCONNECT: return r === void 0; case Je.CONNECT_ERROR: return typeof r == "string" || typeof r == "object"; case Je.EVENT: case Je.BINARY_EVENT: return Array.isArray(r) && r.length > 0; case Je.ACK: case Je.BINARY_ACK: return Array.isArray(r); } } /** * Deallocates a parser's resources */ destroy() { this.reconstructor && (this.reconstructor.finishedReconstruction(), this.reconstructor = null); } } class iI { constructor(e) { this.packet = e, this.buffers = [], this.reconPack = e; } /** * Method to be called when binary data received from connection * after a BINARY_EVENT packet. * * @param {Buffer | ArrayBuffer} binData - the raw binary data received * @return {null | Object} returns null if more binary data is expected or * a reconstructed packet object if all buffers have been received. */ takeBinaryData(e) { if (this.buffers.push(e), this.buffers.length === this.reconPack.attachments) { const r = tI(this.reconPack, this.buffers); return this.finishedReconstruction(), r; } return null; } /** * Cleans up binary packet reconstruction variables. */ finishedReconstruction() { this.reconPack = null, this.buffers = []; } } const aI = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Decoder: Kg, Encoder: nI, get PacketType() { return Je; }, protocol: rI }, Symbol.toStringTag, { value: "Module" })); function Vn(t, e, r) { return t.on(e, r), function() { t.off(e, r); }; } const sI = Object.freeze({ connect: 1, connect_error: 1, disconnect: 1, disconnecting: 1, // EventEmitter reserved events: https://nodejs.org/api/events.html#events_event_newlistener newListener: 1, removeListener: 1 }); class ww extends Jt { /** * `Socket` constructor. */ constructor(e, r, n) { super(), this.connected = !1, this.recovered = !1, this.receiveBuffer = [], this.sendBuffer = [], this._queue = [], this._queueSeq = 0, this.ids = 0, this.acks = {}, this.flags = {}, this.io = e, this.nsp = r, n && n.auth && (this.auth = n.auth), this._opts = Object.assign({}, n), this.io._autoConnect && this.open(); } /** * Whether the socket is currently disconnected * * @example * const socket = io(); * * socket.on("connect", () => { * console.log(socket.disconnected); // false * }); * * socket.on("disconnect", () => { * console.log(socket.disconnected); // true * }); */ get disconnected() { return !this.connected; } /** * Subscribe to open, close and packet events * * @private */ subEvents() { if (this.subs) return; const e = this.io; this.subs = [ Vn(e, "open", this.onopen.bind(this)), Vn(e, "packet", this.onpacket.bind(this)), Vn(e, "error", this.onerror.bind(this)), Vn(e, "close", this.onclose.bind(this)) ]; } /** * Whether the Socket will try to reconnect when its Manager connects or reconnects. * * @example * const socket = io(); * * console.log(socket.active); // true * * socket.on("disconnect", (reason) => { * if (reason === "io server disconnect") { * // the disconnection was initiated by the server, you need to manually reconnect * console.log(socket.active); // false * } * // else the socket will automatically try to reconnect * console.log(socket.active); // true * }); */ get active() { return !!this.subs; } /** * "Opens" the socket. * * @example * const socket = io({ * autoConnect: false * }); * * socket.connect(); */ connect() { return this.connected ? this : (this.subEvents(), this.io._reconnecting || this.io.open(), this.io._readyState === "open" && this.onopen(), this); } /** * Alias for {@link connect()}. */ open() { return this.connect(); } /** * Sends a `message` event. * * This method mimics the WebSocket.send() method. * * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send * * @example * socket.send("hello"); * * // this is equivalent to * socket.emit("message", "hello"); * * @return self */ send(...e) { return e.unshift("message"), this.emit.apply(this, e), this; } /** * Override `emit`. * If the event is in `events`, it's emitted normally. * * @example * socket.emit("hello", "world"); * * // all serializable datastructures are supported (no need to call JSON.stringify) * socket.emit("hello", 1, "2", { 3: ["4"], 5: Uint8Array.from([6]) }); * * // with an acknowledgement from the server * socket.emit("hello", "world", (val) => { * // ... * }); * * @return self */ emit(e, ...r) { if (sI.hasOwnProperty(e)) throw new Error('"' + e.toString() + '" is a reserved event name'); if (r.unshift(e), this._opts.retries && !this.flags.fromQueue && !this.flags.volatile) return this._addToQueue(r), this; const n = { type: Je.EVENT, data: r }; if (n.options = {}, n.options.compress = this.flags.compress !== !1, typeof r[r.length - 1] == "function") { const s = this.ids++, u = r.pop(); this._registerAckCallback(s, u), n.id = s; } const i = this.io.engine && this.io.engine.transport && this.io.engine.transport.writable; return this.flags.volatile && (!i || !this.connected) || (this.connected ? (this.notifyOutgoingListeners(n), this.packet(n)) : this.sendBuffer.push(n)), this.flags = {}, this; } /** * @private */ _registerAckCallback(e, r) { var n; const i = (n = this.flags.timeout) !== null && n !== void 0 ? n : this._opts.ackTimeout; if (i === void 0) { this.acks[e] = r; return; } const a = this.io.setTimeoutFn(() => { delete this.acks[e]; for (let s = 0; s < this.sendBuffer.length; s++) this.sendBuffer[s].id === e && this.sendBuffer.splice(s, 1); r.call(this, new Error("operation has timed out")); }, i); this.acks[e] = (...s) => { this.io.clearTimeoutFn(a), r.apply(this, [null, ...s]); }; } /** * Emits an event and waits for an acknowledgement * * @example * // without timeout * const response = await socket.emitWithAck("hello", "world"); * * // with a specific timeout * try { * const response = await socket.timeout(1000).emitWithAck("hello", "world"); * } catch (err) { * // the server did not acknowledge the event in the given delay * } * * @return a Promise that will be fulfilled when the server acknowledges the event */ emitWithAck(e, ...r) { const n = this.flags.timeout !== void 0 || this._opts.ackTimeout !== void 0; return new Promise((i, a) => { r.push((s, u) => n ? s ? a(s) : i(u) : i(s)), this.emit(e, ...r); }); } /** * Add the packet to the queue. * @param args * @private */ _addToQueue(e) { let r; typeof e[e.length - 1] == "function" && (r = e.pop()); const n = { id: this._queueSeq++, tryCount: 0, pending: !1, args: e, flags: Object.assign({ fromQueue: !0 }, this.flags) }; e.push((i, ...a) => n !== this._queue[0] ? void 0 : (i !== null ? n.tryCount > this._opts.retries && (this._queue.shift(), r && r(i)) : (this._queue.shift(), r && r(null, ...a)), n.pending = !1, this._drainQueue())), this._queue.push(n), this._drainQueue(); } /** * Send the first packet of the queue, and wait for an acknowledgement from the server. * @param force - whether to resend a packet that has not been acknowledged yet * * @private */ _drainQueue(e = !1) { if (!this.connected || this._queue.length === 0) return; const r = this._queue[0]; r.pending && !e || (r.pending = !0, r.tryCount++, this.flags = r.flags, this.emit.apply(this, r.args)); } /** * Sends a packet. * * @param packet * @private */ packet(e) { e.nsp = this.nsp, this.io._packet(e); } /** * Called upon engine `open`. * * @private */ onopen() { typeof this.auth == "function" ? this.auth((e) => { this._sendConnectPacket(e); }) : this._sendConnectPacket(this.auth); } /** * Sends a CONNECT packet to initiate the Socket.IO session. * * @param data * @private */ _sendConnectPacket(e) { this.packet({ type: Je.CONNECT, data: this._pid ? Object.assign({ pid: this._pid, offset: this._lastOffset }, e) : e }); } /** * Called upon engine or manager `error`. * * @param err * @private */ onerror(e) { this.connected || this.emitReserved("connect_error", e); } /** * Called upon engine `close`. * * @param reason * @param description * @private */ onclose(e, r) { this.connected = !1, delete this.id, this.emitReserved("disconnect", e, r); } /** * Called with socket packet. * * @param packet * @private */ onpacket(e) { if (e.nsp === this.nsp) switch (e.type) { case Je.CONNECT: e.data && e.data.sid ? this.onconnect(e.data.sid, e.data.pid) : this.emitReserved("connect_error", new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)")); break; case Je.EVENT: case Je.BINARY_EVENT: this.onevent(e); break; case Je.ACK: case Je.BINARY_ACK: this.onack(e); break; case Je.DISCONNECT: this.ondisconnect(); break; case Je.CONNECT_ERROR: this.destroy(); const n = new Error(e.data.message); n.data = e.data.data, this.emitReserved("connect_error", n); break; } } /** * Called upon a server event. * * @param packet * @private */ onevent(e) { const r = e.data || []; e.id != null && r.push(this.ack(e.id)), this.connected ? this.emitEvent(r) : this.receiveBuffer.push(Object.freeze(r)); } emitEvent(e) { if (this._anyListeners && this._anyListeners.length) { const r = this._anyListeners.slice(); for (const n of r) n.apply(this, e); } super.emit.apply(this, e), this._pid && e.length && typeof e[e.length - 1] == "string" && (this._lastOffset = e[e.length - 1]); } /** * Produces an ack callback to emit with an event. * * @private */ ack(e) { const r = this; let n = !1; return function(...i) { n || (n = !0, r.packet({ type: Je.ACK, id: e, data: i })); }; } /** * Called upon a server acknowlegement. * * @param packet * @private */ onack(e) { const r = this.acks[e.id]; typeof r == "function" && (r.apply(this, e.data), delete this.acks[e.id]); } /** * Called upon server connect. * * @private */ onconnect(e, r) { this.id = e, this.recovered = r && this._pid === r, this._pid = r, this.connected = !0, this.emitBuffered(), this.emitReserved("connect"), this._drainQueue(!0); } /** * Emit buffered events (received and emitted). * * @private */ emitBuffered() { this.receiveBuffer.forEach((e) => this.emitEvent(e)), this.receiveBuffer = [], this.sendBuffer.forEach((e) => { this.notifyOutgoingListeners(e), this.packet(e); }), this.sendBuffer = []; } /** * Called upon server disconnect. * * @private */ ondisconnect() { this.destroy(), this.onclose("io server disconnect"); } /** * Called upon forced client/server side disconnections, * this method ensures the manager stops tracking us and * that reconnections don't get triggered for this. * * @private */ destroy() { this.subs && (this.subs.forEach((e) => e()), this.subs = void 0), this.io._destroy(this); } /** * Disconnects the socket manually. In that case, the socket will not try to reconnect. * * If this is the last active Socket instance of the {@link Manager}, the low-level connection will be closed. * * @example * const socket = io(); * * socket.on("disconnect", (reason) => { * // console.log(reason); prints "io client disconnect" * }); * * socket.disconnect(); * * @return self */ disconnect() { return this.connected && this.packet({ type: Je.DISCONNECT }), this.destroy(), this.connected && this.onclose("io client disconnect"), this; } /** * Alias for {@link disconnect()}. * * @return self */ close() { return this.disconnect(); } /** * Sets the compress flag. * * @example * socket.compress(false).emit("hello"); * * @param compress - if `true`, compresses the sending data * @return self */ compress(e) { return this.flags.compress = e, this; } /** * Sets a modifier for a subsequent event emission that the event message will be dropped when this socket is not * ready to send messages. * * @example * socket.volatile.emit("hello"); // the server may or may not receive it * * @returns self */ get volatile() { return this.flags.volatile = !0, this; } /** * Sets a modifier for a subsequent event emission that the callback will be called with an error when the * given number of milliseconds have elapsed without an acknowledgement from the server: * * @example * socket.timeout(5000).emit("my-event", (err) => { * if (err) { * // the server did not acknowledge the event in the given delay * } * }); * * @returns self */ timeout(e) { return this.flags.timeout = e, this; } /** * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the * callback. * * @example * socket.onAny((event, ...args) => { * console.log(`got ${event}`); * }); * * @param listener */ onAny(e) { return this._anyListeners = this._anyListeners || [], this._anyListeners.push(e), this; } /** * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the * callback. The listener is added to the beginning of the listeners array. * * @example * socket.prependAny((event, ...args) => { * console.log(`got event ${event}`); * }); * * @param listener */ prependAny(e) { return this._anyListeners = this._anyListeners || [], this._anyListeners.unshift(e), this; } /** * Removes the listener that will be fired when any event is emitted. * * @example * const catchAllListener = (event, ...args) => { * console.log(`got event ${event}`); * } * * socket.onAny(catchAllListener); * * // remove a specific listener * socket.offAny(catchAllListener); * * // or remove all listeners * socket.offAny(); * * @param listener */ offAny(e) { if (!this._anyListeners) return this; if (e) { const r = this._anyListeners; for (let n = 0; n < r.length; n++) if (e === r[n]) return r.splice(n, 1), this; } else this._anyListeners = []; return this; } /** * Returns an array of listeners that are listening for any event that is specified. This array can be manipulated, * e.g. to remove listeners. */ listenersAny() { return this._anyListeners || []; } /** * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the * callback. * * Note: acknowledgements sent to the server are not included. * * @example * socket.onAnyOutgoing((event, ...args) => { * console.log(`sent event ${event}`); * }); * * @param listener */ onAnyOutgoing(e) { return this._anyOutgoingListeners = this._anyOutgoingListeners || [], this._anyOutgoingListeners.push(e), this; } /** * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the * callback. The listener is added to the beginning of the listeners array. * * Note: acknowledgements sent to the server are not included. * * @example * socket.prependAnyOutgoing((event, ...args) => { * console.log(`sent event ${event}`); * }); * * @param listener */ prependAnyOutgoing(e) { return this._anyOutgoingListeners = this._anyOutgoingListeners || [], this._anyOutgoingListeners.unshift(e), this; } /** * Removes the listener that will be fired when any event is emitted. * * @example * const catchAllListener = (event, ...args) => { * console.log(`sent event ${event}`); * } * * socket.onAnyOutgoing(catchAllListener); * * // remove a specific listener * socket.offAnyOutgoing(catchAllListener); * * // or remove all listeners * socket.offAnyOutgoing(); * * @param [listener] - the catch-all listener (optional) */ offAnyOutgoing(e) { if (!this._anyOutgoingListeners) return this; if (e) { const r = this._anyOutgoingListeners; for (let n = 0; n < r.length; n++) if (e === r[n]) return r.splice(n, 1), this; } else this._anyOutgoingListeners = []; return this; } /** * Returns an array of listeners that are listening for any event that is specified. This array can be manipulated, * e.g. to remove listeners. */ listenersAnyOutgoing() { return this._anyOutgoingListeners || []; } /** * Notify the listeners for each packet sent * * @param packet * * @private */ notifyOutgoingListeners(e) { if (this._anyOutgoingListeners && this._anyOutgoingListeners.length) { const r = this._anyOutgoingListeners.slice(); for (const n of r) n.apply(this, e.data); } } } function yo(t) { t = t || {}, this.ms = t.min || 100, this.max = t.max || 1e4, this.factor = t.factor || 2, this.jitter = t.jitter > 0 && t.jitter <= 1 ? t.jitter : 0, this.attempts = 0; } yo.prototype.duration = function() { var t = this.ms * Math.pow(this.factor, this.attempts++); if (this.jitter) { var e = Math.random(), r = Math.floor(e * this.jitter * t); t = Math.floor(e * 10) & 1 ? t + r : t - r; } return Math.min(t, this.max) | 0; }; yo.prototype.reset = function() { this.attempts = 0; }; yo.prototype.setMin = function(t) { this.ms = t; }; yo.prototype.setMax = function(t) { this.max = t; }; yo.prototype.setJitter = function(t) { this.jitter = t; }; class Vp extends Jt { constructor(e, r) { var n; super(), this.nsps = {}, this.subs = [], e && typeof e == "object" && (r = e, e = void 0), r = r || {}, r.path = r.path || "/socket.io", this.opts = r, Uf(this, r), this.reconnection(r.reconnection !== !1), this.reconnectionAttempts(r.reconnectionAttempts || 1 / 0), this.reconnectionDelay(r.reconnectionDelay || 1e3), this.reconnectionDelayMax(r.reconnectionDelayMax || 5e3), this.randomizationFactor((n = r.randomizationFactor) !== null && n !== void 0 ? n : 0.5), this.backoff = new yo({ min: this.reconnectionDelay(), max: this.reconnectionDelayMax(), jitter: this.randomizationFactor() }), this.timeout(r.timeout == null ? 2e4 : r.timeout), this._readyState = "closed", this.uri = e; const i = r.parser || aI; this.encoder = new i.Encoder(), this.decoder = new i.Decoder(), this._autoConnect = r.autoConnect !== !1, this._autoConnect && this.open(); } reconnection(e) { return arguments.length ? (this._reconnection = !!e, this) : this._reconnection; } reconnectionAttempts(e) { return e === void 0 ? this._reconnectionAttempts : (this._reconnectionAttempts = e, this); } reconnectionDelay(e) { var r; return e === void 0 ? this._reconnectionDelay : (this._reconnectionDelay = e, (r = this.backoff) === null || r === void 0 || r.setMin(e), this); } randomizationFactor(e) { var r; return e === void 0 ? this._randomizationFactor : (this._randomizationFactor = e, (r = this.backoff) === null || r === void 0 || r.setJitter(e), this); } reconnectionDelayMax(e) { var r; return e === void 0 ? this._reconnectionDelayMax : (this._reconnectionDelayMax = e, (r = this.backoff) === null || r === void 0 || r.setMax(e), this); } timeout(e) { return arguments.length ? (this._timeout = e, this) : this._timeout; } /** * Starts trying to reconnect if reconnection is enabled and we have not * started reconnecting yet * * @private */ maybeReconnectOnOpen() { !this._reconnecting && this._reconnection && this.backoff.attempts === 0 && this.reconnect(); } /** * Sets the current transport `socket`. * * @param {Function} fn - optional, callback * @return self * @public */ open(e) { if (~this._readyState.indexOf("open")) return this; this.engine = new bw(this.uri, this.opts); const r = this.engine, n = this; this._readyState = "opening", this.skipReconnect = !1; const i = Vn(r, "open", function() { n.onopen(), e && e(); }), a = Vn(r, "error", (s) => { n.cleanup(), n._readyState = "closed", this.emitReserved("error", s), e ? e(s) : n.maybeReconnectOnOpen(); }); if (this._timeout !== !1) { const s = this._timeout; s === 0 && i(); const u = this.setTimeoutFn(() => { i(), r.close(), r.emit("error", new Error("timeout")); }, s); this.opts.autoUnref && u.unref(), this.subs.push(function() { clearTimeout(u); }); } return this.subs.push(i), this.subs.push(a), this; } /** * Alias for open() * * @return self * @public */ connect(e) { return this.open(e); } /** * Called upon transport open. * * @private */ onopen() { this.cleanup(), this._readyState = "open", this.emitReserved("open"); const e = this.engine; this.subs.push(Vn(e, "ping", this.onping.bind(this)), Vn(e, "data", this.ondata.bind(this)), Vn(e, "error", this.onerror.bind(this)), Vn(e, "close", this.onclose.bind(this)), Vn(this.decoder, "decoded", this.ondecoded.bind(this))); } /** * Called upon a ping. * * @private */ onping() { this.emitReserved("ping"); } /** * Called with data. * * @private */ ondata(e) { try { this.decoder.add(e); } catch (r) { this.onclose("parse error", r); } } /** * Called when parser fully decodes a packet. * * @private */ ondecoded(e) { yw(() => { this.emitReserved("packet", e); }, this.setTimeoutFn); } /** * Called upon socket error. * * @private */ onerror(e) { this.emitReserved("error", e); } /** * Creates a new socket for the given `nsp`. * * @return {Socket} * @public */ socket(e, r) { let n = this.nsps[e]; return n ? this._autoConnect && !n.active && n.connect() : (n = new ww(this, e, r), this.nsps[e] = n), n; } /** * Called upon a socket close. * * @param socket * @private */ _destroy(e) { const r = Object.keys(this.nsps); for (const n of r) if (this.nsps[n].active) return; this._close(); } /** * Writes a packet. * * @param packet * @private */ _packet(e) { const r = this.encoder.encode(e); for (let n = 0; n < r.length; n++) this.engine.write(r[n], e.options); } /** * Clean up transport subscriptions and packet buffer. * * @private */ cleanup() { this.subs.forEach((e) => e()), this.subs.length = 0, this.decoder.destroy(); } /** * Close the current socket. * * @private */ _close() { this.skipReconnect = !0, this._reconnecting = !1, this.onclose("forced close"), this.engine && this.engine.close(); } /** * Alias for close() * * @private */ disconnect() { return this._close(); } /** * Called upon engine close. * * @private */ onclose(e, r) { this.cleanup(), this.backoff.reset(), this._readyState = "closed", this.emitReserved("close", e, r), this._reconnection && !this.skipReconnect && this.reconnect(); } /** * Attempt a reconnection. * * @private */ reconnect() { if (this._reconnecting || this.skipReconnect) return this; const e = this; if (this.backoff.attempts >= this._reconnectionAttempts) this.backoff.reset(), this.emitReserved("reconnect_failed"), this._reconnecting = !1; else { const r = this.backoff.duration(); this._reconnecting = !0; const n = this.setTimeoutFn(() => { e.skipReconnect || (this.emitReserved("reconnect_attempt", e.backoff.attempts), !e.skipReconnect && e.open((i) => { i ? (e._reconnecting = !1, e.reconnect(), this.emitReserved("reconnect_error", i)) : e.onreconnect(); })); }, r); this.opts.autoUnref && n.unref(), this.subs.push(function() { clearTimeout(n); }); } } /** * Called upon successful reconnect. * * @private */ onreconnect() { const e = this.backoff.attempts; this._reconnecting = !1, this.backoff.reset(), this.emitReserved("reconnect", e); } } const iu = {}; function Jc(t, e) { typeof t == "object" && (e = t, t = void 0), e = e || {}; const r = Xk(t, e.path || "/socket.io"), n = r.source, i = r.id, a = r.path, s = iu[i] && a in iu[i].nsps, u = e.forceNew || e["force new connection"] || e.multiplex === !1 || s; let c; return u ? c = new Vp(n, e) : (iu[i] || (iu[i] = new Vp(n, e)), c = iu[i]), r.query && !e.query && (e.query = r.queryKey), c.socket(r.path, e); } Object.assign(Jc, { Manager: Vp, Socket: ww, io: Jc, connect: Jc }); const KU = [ "ddim", "plms", "k_lms", "k_dpm_2", "k_dpm_2_a", "k_dpmpp_2", "k_dpmpp_2_a", "k_euler", "k_euler_a", "k_heun" ], XU = [ "ddim", "plms", "k_lms", "dpmpp_2", "k_dpm_2", "k_dpm_2_a", "k_dpmpp_2", "k_euler", "k_euler_a", "k_heun" ], QU = [ 64, 128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024, 1088, 1152, 1216, 1280, 1344, 1408, 1472, 1536, 1600, 1664, 1728, 1792, 1856, 1920, 1984, 2048 ], JU = [ 64, 128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024, 1088, 1152, 1216, 1280, 1344, 1408, 1472, 1536, 1600, 1664, 1728, 1792, 1856, 1920, 1984, 2048 ], ZU = [ { key: "2x", value: 2 }, { key: "4x", value: 4 } ], oI = 0, uI = 4294967295, $U = ["gfpgan", "codeformer"], eH = [ { key: "None", value: "none" }, { key: "Fast", value: "latents" }, { key: "Accurate", value: "full-res" } ]; var lI = Math.PI / 180; function cI() { return typeof window < "u" && ({}.toString.call(window) === "[object Window]" || {}.toString.call(window) === "[object global]"); } const eo = typeof global < "u" ? global : typeof window < "u" ? window : typeof WorkerGlobalScope < "u" ? self : {}, be = { _global: eo, version: "8.4.2", isBrowser: cI(), isUnminified: /param/.test(function(t) { }.toString()), dblClickWindow: 400, getAngle(t) { return be.angleDeg ? t * lI : t; }, enableTrace: !1, pointerEventsEnabled: !0, autoDrawEnabled: !0, hitOnDragEnabled: !1, capturePointerEventsEnabled: !1, _mouseListenClick: !1, _touchListenClick: !1, _pointerListenClick: !1, _mouseInDblClickWindow: !1, _touchInDblClickWindow: !1, _pointerInDblClickWindow: !1, _mouseDblClickPointerId: null, _touchDblClickPointerId: null, _pointerDblClickPointerId: null, pixelRatio: typeof window < "u" && window.devicePixelRatio || 1, dragDistance: 3, angleDeg: !0, showWarnings: !0, dragButtons: [0, 1], isDragging() { return be.DD.isDragging; }, isDragReady() { return !!be.DD.node; }, releaseCanvasOnDestroy: !0, document: eo.document, _injectGlobal(t) { eo.Konva = t; } }, Ft = (t) => { be[t.prototype.getClassName()] = t; }; be._injectGlobal(be); class tn { constructor(e = [1, 0, 0, 1, 0, 0]) { this.dirty = !1, this.m = e && e.slice() || [1, 0, 0, 1, 0, 0]; } reset() { this.m[0] = 1, this.m[1] = 0, this.m[2] = 0, this.m[3] = 1, this.m[4] = 0, this.m[5] = 0; } copy() { return new tn(this.m); } copyInto(e) { e.m[0] = this.m[0], e.m[1] = this.m[1], e.m[2] = this.m[2], e.m[3] = this.m[3], e.m[4] = this.m[4], e.m[5] = this.m[5]; } point(e) { var r = this.m; return { x: r[0] * e.x + r[2] * e.y + r[4], y: r[1] * e.x + r[3] * e.y + r[5] }; } translate(e, r) { return this.m[4] += this.m[0] * e + this.m[2] * r, this.m[5] += this.m[1] * e + this.m[3] * r, this; } scale(e, r) { return this.m[0] *= e, this.m[1] *= e, this.m[2] *= r, this.m[3] *= r, this; } rotate(e) { var r = Math.cos(e), n = Math.sin(e), i = this.m[0] * r + this.m[2] * n, a = this.m[1] * r + this.m[3] * n, s = this.m[0] * -n + this.m[2] * r, u = this.m[1] * -n + this.m[3] * r; return this.m[0] = i, this.m[1] = a, this.m[2] = s, this.m[3] = u, this; } getTranslation() { return { x: this.m[4], y: this.m[5] }; } skew(e, r) { var n = this.m[0] + this.m[2] * r, i = this.m[1] + this.m[3] * r, a = this.m[2] + this.m[0] * e, s = this.m[3] + this.m[1] * e; return this.m[0] = n, this.m[1] = i, this.m[2] = a, this.m[3] = s, this; } multiply(e) { var r = this.m[0] * e.m[0] + this.m[2] * e.m[1], n = this.m[1] * e.m[0] + this.m[3] * e.m[1], i = this.m[0] * e.m[2] + this.m[2] * e.m[3], a = this.m[1] * e.m[2] + this.m[3] * e.m[3], s = this.m[0] * e.m[4] + this.m[2] * e.m[5] + this.m[4], u = this.m[1] * e.m[4] + this.m[3] * e.m[5] + this.m[5]; return this.m[0] = r, this.m[1] = n, this.m[2] = i, this.m[3] = a, this.m[4] = s, this.m[5] = u, this; } invert() { var e = 1 / (this.m[0] * this.m[3] - this.m[1] * this.m[2]), r = this.m[3] * e, n = -this.m[1] * e, i = -this.m[2] * e, a = this.m[0] * e, s = e * (this.m[2] * this.m[5] - this.m[3] * this.m[4]), u = e * (this.m[1] * this.m[4] - this.m[0] * this.m[5]); return this.m[0] = r, this.m[1] = n, this.m[2] = i, this.m[3] = a, this.m[4] = s, this.m[5] = u, this; } getMatrix() { return this.m; } decompose() { var e = this.m[0], r = this.m[1], n = this.m[2], i = this.m[3], a = this.m[4], s = this.m[5], u = e * i - r * n; let c = { x: a, y: s, rotation: 0, scaleX: 0, scaleY: 0, skewX: 0, skewY: 0 }; if (e != 0 || r != 0) { var f = Math.sqrt(e * e + r * r); c.rotation = r > 0 ? Math.acos(e / f) : -Math.acos(e / f), c.scaleX = f, c.scaleY = u / f, c.skewX = (e * n + r * i) / u, c.skewY = 0; } else if (n != 0 || i != 0) { var h = Math.sqrt(n * n + i * i); c.rotation = Math.PI / 2 - (i > 0 ? Math.acos(-n / h) : -Math.acos(n / h)), c.scaleX = u / h, c.scaleY = h, c.skewX = 0, c.skewY = (e * n + r * i) / u; } return c.rotation = q._getRotation(c.rotation), c; } } var fI = "[object Array]", hI = "[object Number]", dI = "[object String]", pI = "[object Boolean]", gI = Math.PI / 180, mI = 180 / Math.PI, Yd = "#", vI = "", yI = "0", bI = "Konva warning: ", A1 = "Konva error: ", SI = "rgb(", qd = { aliceblue: [240, 248, 255], antiquewhite: [250, 235, 215], aqua: [0, 255, 255], aquamarine: [127, 255, 212], azure: [240, 255, 255], beige: [245, 245, 220], bisque: [255, 228, 196], black: [0, 0, 0], blanchedalmond: [255, 235, 205], blue: [0, 0, 255], blueviolet: [138, 43, 226], brown: [165, 42, 42], burlywood: [222, 184, 135], cadetblue: [95, 158, 160], chartreuse: [127, 255, 0], chocolate: [210, 105, 30], coral: [255, 127, 80], cornflowerblue: [100, 149, 237], cornsilk: [255, 248, 220], crimson: [220, 20, 60], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgoldenrod: [184, 132, 11], darkgray: [169, 169, 169], darkgreen: [0, 100, 0], darkgrey: [169, 169, 169], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkseagreen: [143, 188, 143], darkslateblue: [72, 61, 139], darkslategray: [47, 79, 79], darkslategrey: [47, 79, 79], darkturquoise: [0, 206, 209], darkviolet: [148, 0, 211], deeppink: [255, 20, 147], deepskyblue: [0, 191, 255], dimgray: [105, 105, 105], dimgrey: [105, 105, 105], dodgerblue: [30, 144, 255], firebrick: [178, 34, 34], floralwhite: [255, 255, 240], forestgreen: [34, 139, 34], fuchsia: [255, 0, 255], gainsboro: [220, 220, 220], ghostwhite: [248, 248, 255], gold: [255, 215, 0], goldenrod: [218, 165, 32], gray: [128, 128, 128], green: [0, 128, 0], greenyellow: [173, 255, 47], grey: [128, 128, 128], honeydew: [240, 255, 240], hotpink: [255, 105, 180], indianred: [205, 92, 92], indigo: [75, 0, 130], ivory: [255, 255, 240], khaki: [240, 230, 140], lavender: [230, 230, 250], lavenderblush: [255, 240, 245], lawngreen: [124, 252, 0], lemonchiffon: [255, 250, 205], lightblue: [173, 216, 230], lightcoral: [240, 128, 128], lightcyan: [224, 255, 255], lightgoldenrodyellow: [250, 250, 210], lightgray: [211, 211, 211], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightsalmon: [255, 160, 122], lightseagreen: [32, 178, 170], lightskyblue: [135, 206, 250], lightslategray: [119, 136, 153], lightslategrey: [119, 136, 153], lightsteelblue: [176, 196, 222], lightyellow: [255, 255, 224], lime: [0, 255, 0], limegreen: [50, 205, 50], linen: [250, 240, 230], magenta: [255, 0, 255], maroon: [128, 0, 0], mediumaquamarine: [102, 205, 170], mediumblue: [0, 0, 205], mediumorchid: [186, 85, 211], mediumpurple: [147, 112, 219], mediumseagreen: [60, 179, 113], mediumslateblue: [123, 104, 238], mediumspringgreen: [0, 250, 154], mediumturquoise: [72, 209, 204], mediumvioletred: [199, 21, 133], midnightblue: [25, 25, 112], mintcream: [245, 255, 250], mistyrose: [255, 228, 225], moccasin: [255, 228, 181], navajowhite: [255, 222, 173], navy: [0, 0, 128], oldlace: [253, 245, 230], olive: [128, 128, 0], olivedrab: [107, 142, 35], orange: [255, 165, 0], orangered: [255, 69, 0], orchid: [218, 112, 214], palegoldenrod: [238, 232, 170], palegreen: [152, 251, 152], paleturquoise: [175, 238, 238], palevioletred: [219, 112, 147], papayawhip: [255, 239, 213], peachpuff: [255, 218, 185], peru: [205, 133, 63], pink: [255, 192, 203], plum: [221, 160, 203], powderblue: [176, 224, 230], purple: [128, 0, 128], rebeccapurple: [102, 51, 153], red: [255, 0, 0], rosybrown: [188, 143, 143], royalblue: [65, 105, 225], saddlebrown: [139, 69, 19], salmon: [250, 128, 114], sandybrown: [244, 164, 96], seagreen: [46, 139, 87], seashell: [255, 245, 238], sienna: [160, 82, 45], silver: [192, 192, 192], skyblue: [135, 206, 235], slateblue: [106, 90, 205], slategray: [119, 128, 144], slategrey: [119, 128, 144], snow: [255, 255, 250], springgreen: [0, 255, 127], steelblue: [70, 130, 180], tan: [210, 180, 140], teal: [0, 128, 128], thistle: [216, 191, 216], transparent: [255, 255, 255, 0], tomato: [255, 99, 71], turquoise: [64, 224, 208], violet: [238, 130, 238], wheat: [245, 222, 179], white: [255, 255, 255], whitesmoke: [245, 245, 245], yellow: [255, 255, 0], yellowgreen: [154, 205, 5] }, wI = /rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/, _c = []; const xI = typeof requestAnimationFrame < "u" && requestAnimationFrame || function(t) { setTimeout(t, 60); }, q = { _isElement(t) { return !!(t && t.nodeType == 1); }, _isFunction(t) { return !!(t && t.constructor && t.call && t.apply); }, _isPlainObject(t) { return !!t && t.constructor === Object; }, _isArray(t) { return Object.prototype.toString.call(t) === fI; }, _isNumber(t) { return Object.prototype.toString.call(t) === hI && !isNaN(t) && isFinite(t); }, _isString(t) { return Object.prototype.toString.call(t) === dI; }, _isBoolean(t) { return Object.prototype.toString.call(t) === pI; }, isObject(t) { return t instanceof Object; }, isValidSelector(t) { if (typeof t != "string") return !1; var e = t[0]; return e === "#" || e === "." || e === e.toUpperCase(); }, _sign(t) { return t === 0 || t > 0 ? 1 : -1; }, requestAnimFrame(t) { _c.push(t), _c.length === 1 && xI(function() { const e = _c; _c = [], e.forEach(function(r) { r(); }); }); }, createCanvasElement() { var t = document.createElement("canvas"); try { t.style = t.style || {}; } catch { } return t; }, createImageElement() { return document.createElement("img"); }, _isInDocument(t) { for (; t = t.parentNode; ) if (t == document) return !0; return !1; }, _urlToImage(t, e) { var r = q.createImageElement(); r.onload = function() { e(r); }, r.src = t; }, _rgbToHex(t, e, r) { return ((1 << 24) + (t << 16) + (e << 8) + r).toString(16).slice(1); }, _hexToRgb(t) { t = t.replace(Yd, vI); var e = parseInt(t, 16); return { r: e >> 16 & 255, g: e >> 8 & 255, b: e & 255 }; }, getRandomColor() { for (var t = (Math.random() * 16777215 << 0).toString(16); t.length < 6; ) t = yI + t; return Yd + t; }, getRGB(t) { var e; return t in qd ? (e = qd[t], { r: e[0], g: e[1], b: e[2] }) : t[0] === Yd ? this._hexToRgb(t.substring(1)) : t.substr(0, 4) === SI ? (e = wI.exec(t.replace(/ /g, "")), { r: parseInt(e[1], 10), g: parseInt(e[2], 10), b: parseInt(e[3], 10) }) : { r: 0, g: 0, b: 0 }; }, colorToRGBA(t) { return t = t || "black", q._namedColorToRBA(t) || q._hex3ColorToRGBA(t) || q._hex4ColorToRGBA(t) || q._hex6ColorToRGBA(t) || q._hex8ColorToRGBA(t) || q._rgbColorToRGBA(t) || q._rgbaColorToRGBA(t) || q._hslColorToRGBA(t); }, _namedColorToRBA(t) { var e = qd[t.toLowerCase()]; return e ? { r: e[0], g: e[1], b: e[2], a: 1 } : null; }, _rgbColorToRGBA(t) { if (t.indexOf("rgb(") === 0) { t = t.match(/rgb\(([^)]+)\)/)[1]; var e = t.split(/ *, */).map(Number); return { r: e[0], g: e[1], b: e[2], a: 1 }; } }, _rgbaColorToRGBA(t) { if (t.indexOf("rgba(") === 0) { t = t.match(/rgba\(([^)]+)\)/)[1]; var e = t.split(/ *, */).map((r, n) => r.slice(-1) === "%" ? n === 3 ? parseInt(r) / 100 : parseInt(r) / 100 * 255 : Number(r)); return { r: e[0], g: e[1], b: e[2], a: e[3] }; } }, _hex8ColorToRGBA(t) { if (t[0] === "#" && t.length === 9) return { r: parseInt(t.slice(1, 3), 16), g: parseInt(t.slice(3, 5), 16), b: parseInt(t.slice(5, 7), 16), a: parseInt(t.slice(7, 9), 16) / 255 }; }, _hex6ColorToRGBA(t) { if (t[0] === "#" && t.length === 7) return { r: parseInt(t.slice(1, 3), 16), g: parseInt(t.slice(3, 5), 16), b: parseInt(t.slice(5, 7), 16), a: 1 }; }, _hex4ColorToRGBA(t) { if (t[0] === "#" && t.length === 5) return { r: parseInt(t[1] + t[1], 16), g: parseInt(t[2] + t[2], 16), b: parseInt(t[3] + t[3], 16), a: parseInt(t[4] + t[4], 16) / 255 }; }, _hex3ColorToRGBA(t) { if (t[0] === "#" && t.length === 4) return { r: parseInt(t[1] + t[1], 16), g: parseInt(t[2] + t[2], 16), b: parseInt(t[3] + t[3], 16), a: 1 }; }, _hslColorToRGBA(t) { if (/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(t)) { const [e, ...r] = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t), n = Number(r[0]) / 360, i = Number(r[1]) / 100, a = Number(r[2]) / 100; let s, u, c; if (i === 0) return c = a * 255, { r: Math.round(c), g: Math.round(c), b: Math.round(c), a: 1 }; a < 0.5 ? s = a * (1 + i) : s = a + i - a * i; const f = 2 * a - s, h = [0, 0, 0]; for (let d = 0; d < 3; d++) u = n + 1 / 3 * -(d - 1), u < 0 && u++, u > 1 && u--, 6 * u < 1 ? c = f + (s - f) * 6 * u : 2 * u < 1 ? c = s : 3 * u < 2 ? c = f + (s - f) * (2 / 3 - u) * 6 : c = f, h[d] = c * 255; return { r: Math.round(h[0]), g: Math.round(h[1]), b: Math.round(h[2]), a: 1 }; } }, haveIntersection(t, e) { return !(e.x > t.x + t.width || e.x + e.width < t.x || e.y > t.y + t.height || e.y + e.height < t.y); }, cloneObject(t) { var e = {}; for (var r in t) this._isPlainObject(t[r]) ? e[r] = this.cloneObject(t[r]) : this._isArray(t[r]) ? e[r] = this.cloneArray(t[r]) : e[r] = t[r]; return e; }, cloneArray(t) { return t.slice(0); }, degToRad(t) { return t * gI; }, radToDeg(t) { return t * mI; }, _degToRad(t) { return q.warn("Util._degToRad is removed. Please use public Util.degToRad instead."), q.degToRad(t); }, _radToDeg(t) { return q.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."), q.radToDeg(t); }, _getRotation(t) { return be.angleDeg ? q.radToDeg(t) : t; }, _capitalize(t) { return t.charAt(0).toUpperCase() + t.slice(1); }, throw(t) { throw new Error(A1 + t); }, error(t) { console.error(A1 + t); }, warn(t) { be.showWarnings && console.warn(bI + t); }, each(t, e) { for (var r in t) e(r, t[r]); }, _inRange(t, e, r) { return e <= t && t < r; }, _getProjectionToSegment(t, e, r, n, i, a) { var s, u, c, f = (t - r) * (t - r) + (e - n) * (e - n); if (f == 0) s = t, u = e, c = (i - r) * (i - r) + (a - n) * (a - n); else { var h = ((i - t) * (r - t) + (a - e) * (n - e)) / f; h < 0 ? (s = t, u = e, c = (t - i) * (t - i) + (e - a) * (e - a)) : h > 1 ? (s = r, u = n, c = (r - i) * (r - i) + (n - a) * (n - a)) : (s = t + h * (r - t), u = e + h * (n - e), c = (s - i) * (s - i) + (u - a) * (u - a)); } return [s, u, c]; }, _getProjectionToLine(t, e, r) { var n = q.cloneObject(t), i = Number.MAX_VALUE; return e.forEach(function(a, s) { if (!(!r && s === e.length - 1)) { var u = e[(s + 1) % e.length], c = q._getProjectionToSegment(a.x, a.y, u.x, u.y, t.x, t.y), f = c[0], h = c[1], d = c[2]; d < i && (n.x = f, n.y = h, i = d); } }), n; }, _prepareArrayForTween(t, e, r) { var n, i = [], a = []; if (t.length > e.length) { var s = e; e = t, t = s; } for (n = 0; n < t.length; n += 2) i.push({ x: t[n], y: t[n + 1] }); for (n = 0; n < e.length; n += 2) a.push({ x: e[n], y: e[n + 1] }); var u = []; return a.forEach(function(c) { var f = q._getProjectionToLine(c, i, r); u.push(f.x), u.push(f.y); }), u; }, _prepareToStringify(t) { var e; t.visitedByCircularReferenceRemoval = !0; for (var r in t) if (t.hasOwnProperty(r) && t[r] && typeof t[r] == "object") { if (e = Object.getOwnPropertyDescriptor(t, r), t[r].visitedByCircularReferenceRemoval || q._isElement(t[r])) if (e.configurable) delete t[r]; else return null; else if (q._prepareToStringify(t[r]) === null) if (e.configurable) delete t[r]; else return null; } return delete t.visitedByCircularReferenceRemoval, t; }, _assign(t, e) { for (var r in e) t[r] = e[r]; return t; }, _getFirstPointerId(t) { return t.touches ? t.changedTouches[0].identifier : t.pointerId || 999; }, releaseCanvas(...t) { be.releaseCanvasOnDestroy && t.forEach((e) => { e.width = 0, e.height = 0; }); }, drawRoundedRectPath(t, e, r, n) { let i = 0, a = 0, s = 0, u = 0; typeof n == "number" ? i = a = s = u = Math.min(n, e / 2, r / 2) : (i = Math.min(n[0] || 0, e / 2, r / 2), a = Math.min(n[1] || 0, e / 2, r / 2), u = Math.min(n[2] || 0, e / 2, r / 2), s = Math.min(n[3] || 0, e / 2, r / 2)), t.moveTo(i, 0), t.lineTo(e - a, 0), t.arc(e - a, a, a, Math.PI * 3 / 2, 0, !1), t.lineTo(e, r - u), t.arc(e - u, r - u, u, 0, Math.PI / 2, !1), t.lineTo(s, r), t.arc(s, r - s, s, Math.PI / 2, Math.PI, !1), t.lineTo(0, i), t.arc(i, i, i, Math.PI, Math.PI * 3 / 2, !1); } }; function ba(t) { return q._isString(t) ? '"' + t + '"' : Object.prototype.toString.call(t) === "[object Number]" || q._isBoolean(t) ? t : Object.prototype.toString.call(t); } function xw(t) { return t > 255 ? 255 : t < 0 ? 0 : Math.round(t); } function ce() { if (be.isUnminified) return function(t, e) { return q._isNumber(t) || q.warn(ba(t) + ' is a not valid value for "' + e + '" attribute. The value should be a number.'), t; }; } function Xg(t) { if (be.isUnminified) return function(e, r) { let n = q._isNumber(e), i = q._isArray(e) && e.length == t; return !n && !i && q.warn(ba(e) + ' is a not valid value for "' + r + '" attribute. The value should be a number or Array(' + t + ")"), e; }; } function Qg() { if (be.isUnminified) return function(t, e) { var r = q._isNumber(t), n = t === "auto"; return r || n || q.warn(ba(t) + ' is a not valid value for "' + e + '" attribute. The value should be a number or "auto".'), t; }; } function bo() { if (be.isUnminified) return function(t, e) { return q._isString(t) || q.warn(ba(t) + ' is a not valid value for "' + e + '" attribute. The value should be a string.'), t; }; } function Cw() { if (be.isUnminified) return function(t, e) { const r = q._isString(t), n = Object.prototype.toString.call(t) === "[object CanvasGradient]" || t && t.addColorStop; return r || n || q.warn(ba(t) + ' is a not valid value for "' + e + '" attribute. The value should be a string or a native gradient.'), t; }; } function CI() { if (be.isUnminified) return function(t, e) { const r = Int8Array ? Object.getPrototypeOf(Int8Array) : null; return r && t instanceof r || (q._isArray(t) ? t.forEach(function(n) { q._isNumber(n) || q.warn('"' + e + '" attribute has non numeric element ' + n + ". Make sure that all elements are numbers."); }) : q.warn(ba(t) + ' is a not valid value for "' + e + '" attribute. The value should be a array of numbers.')), t; }; } function Yn() { if (be.isUnminified) return function(t, e) { var r = t === !0 || t === !1; return r || q.warn(ba(t) + ' is a not valid value for "' + e + '" attribute. The value should be a boolean.'), t; }; } function _I(t) { if (be.isUnminified) return function(e, r) { return e == null || q.isObject(e) || q.warn(ba(e) + ' is a not valid value for "' + r + '" attribute. The value should be an object with properties ' + t), e; }; } var au = "get", su = "set"; const M = { addGetterSetter(t, e, r, n, i) { M.addGetter(t, e, r), M.addSetter(t, e, n, i), M.addOverloadedGetterSetter(t, e); }, addGetter(t, e, r) { var n = au + q._capitalize(e); t.prototype[n] = t.prototype[n] || function() { var i = this.attrs[e]; return i === void 0 ? r : i; }; }, addSetter(t, e, r, n) { var i = su + q._capitalize(e); t.prototype[i] || M.overWriteSetter(t, e, r, n); }, overWriteSetter(t, e, r, n) { var i = su + q._capitalize(e); t.prototype[i] = function(a) { return r && a !== void 0 && a !== null && (a = r.call(this, a, e)), this._setAttr(e, a), n && n.call(this), this; }; }, addComponentsGetterSetter(t, e, r, n, i) { var a = r.length, s = q._capitalize, u = au + s(e), c = su + s(e), f, h; t.prototype[u] = function() { var g = {}; for (f = 0; f < a; f++) h = r[f], g[h] = this.getAttr(e + s(h)); return g; }; var d = _I(r); t.prototype[c] = function(g) { var v = this.attrs[e], m; n && (g = n.call(this, g)), d && d.call(this, g, e); for (m in g) g.hasOwnProperty(m) && this._setAttr(e + s(m), g[m]); return g || r.forEach((b) => { this._setAttr(e + s(b), void 0); }), this._fireChangeEvent(e, v, g), i && i.call(this), this; }, M.addOverloadedGetterSetter(t, e); }, addOverloadedGetterSetter(t, e) { var r = q._capitalize(e), n = su + r, i = au + r; t.prototype[e] = function() { return arguments.length ? (this[n](arguments[0]), this) : this[i](); }; }, addDeprecatedGetterSetter(t, e, r, n) { q.error("Adding deprecated " + e); var i = au + q._capitalize(e), a = e + " property is deprecated and will be removed soon. Look at Konva change log for more information."; t.prototype[i] = function() { q.error(a); var s = this.attrs[e]; return s === void 0 ? r : s; }, M.addSetter(t, e, n, function() { q.error(a); }), M.addOverloadedGetterSetter(t, e); }, backCompat(t, e) { q.each(e, function(r, n) { var i = t.prototype[n], a = au + q._capitalize(r), s = su + q._capitalize(r); function u() { i.apply(this, arguments), q.error('"' + r + '" method is deprecated and will be removed soon. Use ""' + n + '" instead.'); } t.prototype[r] = u, t.prototype[a] = u, t.prototype[s] = u; }); }, afterSetFilter() { this._filterUpToDate = !1; } }; function PI(t) { var e = [], r = t.length, n = q, i, a; for (i = 0; i < r; i++) a = t[i], n._isNumber(a) ? a = Math.round(a * 1e3) / 1e3 : n._isString(a) || (a = a + ""), e.push(a); return e; } var O1 = ",", EI = "(", TI = ")", AI = "([", OI = "])", RI = ";", kI = "()", II = "=", R1 = [ "arc", "arcTo", "beginPath", "bezierCurveTo", "clearRect", "clip", "closePath", "createLinearGradient", "createPattern", "createRadialGradient", "drawImage", "ellipse", "fill", "fillText", "getImageData", "createImageData", "lineTo", "moveTo", "putImageData", "quadraticCurveTo", "rect", "restore", "rotate", "save", "scale", "setLineDash", "setTransform", "stroke", "strokeText", "transform", "translate" ], DI = [ "fillStyle", "strokeStyle", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY", "lineCap", "lineDashOffset", "lineJoin", "lineWidth", "miterLimit", "font", "textAlign", "textBaseline", "globalAlpha", "globalCompositeOperation", "imageSmoothingEnabled" ]; const MI = 100; class Hf { constructor(e) { this.canvas = e, be.enableTrace && (this.traceArr = [], this._enableTrace()); } fillShape(e) { e.fillEnabled() && this._fill(e); } _fill(e) { } strokeShape(e) { e.hasStroke() && this._stroke(e); } _stroke(e) { } fillStrokeShape(e) { e.attrs.fillAfterStrokeEnabled ? (this.strokeShape(e), this.fillShape(e)) : (this.fillShape(e), this.strokeShape(e)); } getTrace(e, r) { var n = this.traceArr, i = n.length, a = "", s, u, c, f; for (s = 0; s < i; s++) u = n[s], c = u.method, c ? (f = u.args, a += c, e ? a += kI : q._isArray(f[0]) ? a += AI + f.join(O1) + OI : (r && (f = f.map((h) => typeof h == "number" ? Math.floor(h) : h)), a += EI + f.join(O1) + TI)) : (a += u.property, e || (a += II + u.val)), a += RI; return a; } clearTrace() { this.traceArr = []; } _trace(e) { var r = this.traceArr, n; r.push(e), n = r.length, n >= MI && r.shift(); } reset() { var e = this.getCanvas().getPixelRatio(); this.setTransform(1 * e, 0, 0, 1 * e, 0, 0); } getCanvas() { return this.canvas; } clear(e) { var r = this.getCanvas(); e ? this.clearRect(e.x || 0, e.y || 0, e.width || 0, e.height || 0) : this.clearRect(0, 0, r.getWidth() / r.pixelRatio, r.getHeight() / r.pixelRatio); } _applyLineCap(e) { var r = e.getLineCap(); r && this.setAttr("lineCap", r); } _applyOpacity(e) { var r = e.getAbsoluteOpacity(); r !== 1 && this.setAttr("globalAlpha", r); } _applyLineJoin(e) { var r = e.attrs.lineJoin; r && this.setAttr("lineJoin", r); } setAttr(e, r) { this._context[e] = r; } arc(e, r, n, i, a, s) { this._context.arc(e, r, n, i, a, s); } arcTo(e, r, n, i, a) { this._context.arcTo(e, r, n, i, a); } beginPath() { this._context.beginPath(); } bezierCurveTo(e, r, n, i, a, s) { this._context.bezierCurveTo(e, r, n, i, a, s); } clearRect(e, r, n, i) { this._context.clearRect(e, r, n, i); } clip() { this._context.clip(); } closePath() { this._context.closePath(); } createImageData(e, r) { var n = arguments; if (n.length === 2) return this._context.createImageData(e, r); if (n.length === 1) return this._context.createImageData(e); } createLinearGradient(e, r, n, i) { return this._context.createLinearGradient(e, r, n, i); } createPattern(e, r) { return this._context.createPattern(e, r); } createRadialGradient(e, r, n, i, a, s) { return this._context.createRadialGradient(e, r, n, i, a, s); } drawImage(e, r, n, i, a, s, u, c, f) { var h = arguments, d = this._context; h.length === 3 ? d.drawImage(e, r, n) : h.length === 5 ? d.drawImage(e, r, n, i, a) : h.length === 9 && d.drawImage(e, r, n, i, a, s, u, c, f); } ellipse(e, r, n, i, a, s, u, c) { this._context.ellipse(e, r, n, i, a, s, u, c); } isPointInPath(e, r, n, i) { return n ? this._context.isPointInPath(n, e, r, i) : this._context.isPointInPath(e, r, i); } fill(e) { e ? this._context.fill(e) : this._context.fill(); } fillRect(e, r, n, i) { this._context.fillRect(e, r, n, i); } strokeRect(e, r, n, i) { this._context.strokeRect(e, r, n, i); } fillText(e, r, n, i) { i ? this._context.fillText(e, r, n, i) : this._context.fillText(e, r, n); } measureText(e) { return this._context.measureText(e); } getImageData(e, r, n, i) { return this._context.getImageData(e, r, n, i); } lineTo(e, r) { this._context.lineTo(e, r); } moveTo(e, r) { this._context.moveTo(e, r); } rect(e, r, n, i) { this._context.rect(e, r, n, i); } putImageData(e, r, n) { this._context.putImageData(e, r, n); } quadraticCurveTo(e, r, n, i) { this._context.quadraticCurveTo(e, r, n, i); } restore() { this._context.restore(); } rotate(e) { this._context.rotate(e); } save() { this._context.save(); } scale(e, r) { this._context.scale(e, r); } setLineDash(e) { this._context.setLineDash ? this._context.setLineDash(e) : "mozDash" in this._context ? this._context.mozDash = e : "webkitLineDash" in this._context && (this._context.webkitLineDash = e); } getLineDash() { return this._context.getLineDash(); } setTransform(e, r, n, i, a, s) { this._context.setTransform(e, r, n, i, a, s); } stroke(e) { e ? this._context.stroke(e) : this._context.stroke(); } strokeText(e, r, n, i) { this._context.strokeText(e, r, n, i); } transform(e, r, n, i, a, s) { this._context.transform(e, r, n, i, a, s); } translate(e, r) { this._context.translate(e, r); } _enableTrace() { var e = this, r = R1.length, n = this.setAttr, i, a, s = function(u) { var c = e[u], f; e[u] = function() { return a = PI(Array.prototype.slice.call(arguments, 0)), f = c.apply(e, arguments), e._trace({ method: u, args: a }), f; }; }; for (i = 0; i < r; i++) s(R1[i]); e.setAttr = function() { n.apply(e, arguments); var u = arguments[0], c = arguments[1]; (u === "shadowOffsetX" || u === "shadowOffsetY" || u === "shadowBlur") && (c = c / this.canvas.getPixelRatio()), e._trace({ property: u, val: c }); }; } _applyGlobalCompositeOperation(e) { const r = e.attrs.globalCompositeOperation; var n = !r || r === "source-over"; n || this.setAttr("globalCompositeOperation", r); } } DI.forEach(function(t) { Object.defineProperty(Hf.prototype, t, { get() { return this._context[t]; }, set(e) { this._context[t] = e; } }); }); class LI extends Hf { constructor(e) { super(e), this._context = e._canvas.getContext("2d"); } _fillColor(e) { var r = e.fill(); this.setAttr("fillStyle", r), e._fillFunc(this); } _fillPattern(e) { this.setAttr("fillStyle", e._getFillPattern()), e._fillFunc(this); } _fillLinearGradient(e) { var r = e._getLinearGradient(); r && (this.setAttr("fillStyle", r), e._fillFunc(this)); } _fillRadialGradient(e) { var r = e._getRadialGradient(); r && (this.setAttr("fillStyle", r), e._fillFunc(this)); } _fill(e) { var r = e.fill(), n = e.getFillPriority(); if (r && n === "color") { this._fillColor(e); return; } var i = e.getFillPatternImage(); if (i && n === "pattern") { this._fillPattern(e); return; } var a = e.getFillLinearGradientColorStops(); if (a && n === "linear-gradient") { this._fillLinearGradient(e); return; } var s = e.getFillRadialGradientColorStops(); if (s && n === "radial-gradient") { this._fillRadialGradient(e); return; } r ? this._fillColor(e) : i ? this._fillPattern(e) : a ? this._fillLinearGradient(e) : s && this._fillRadialGradient(e); } _strokeLinearGradient(e) { var r = e.getStrokeLinearGradientStartPoint(), n = e.getStrokeLinearGradientEndPoint(), i = e.getStrokeLinearGradientColorStops(), a = this.createLinearGradient(r.x, r.y, n.x, n.y); if (i) { for (var s = 0; s < i.length; s += 2) a.addColorStop(i[s], i[s + 1]); this.setAttr("strokeStyle", a); } } _stroke(e) { var r = e.dash(), n = e.getStrokeScaleEnabled(); if (e.hasStroke()) { if (!n) { this.save(); var i = this.getCanvas().getPixelRatio(); this.setTransform(i, 0, 0, i, 0, 0); } this._applyLineCap(e), r && e.dashEnabled() && (this.setLineDash(r), this.setAttr("lineDashOffset", e.dashOffset())), this.setAttr("lineWidth", e.strokeWidth()), e.getShadowForStrokeEnabled() || this.setAttr("shadowColor", "rgba(0,0,0,0)"); var a = e.getStrokeLinearGradientColorStops(); a ? this._strokeLinearGradient(e) : this.setAttr("strokeStyle", e.stroke()), e._strokeFunc(this), n || this.restore(); } } _applyShadow(e) { var r, n, i, a = (r = e.getShadowRGBA()) !== null && r !== void 0 ? r : "black", s = (n = e.getShadowBlur()) !== null && n !== void 0 ? n : 5, u = (i = e.getShadowOffset()) !== null && i !== void 0 ? i : { x: 0, y: 0 }, c = e.getAbsoluteScale(), f = this.canvas.getPixelRatio(), h = c.x * f, d = c.y * f; this.setAttr("shadowColor", a), this.setAttr("shadowBlur", s * Math.min(Math.abs(h), Math.abs(d))), this.setAttr("shadowOffsetX", u.x * h), this.setAttr("shadowOffsetY", u.y * d); } } class NI extends Hf { constructor(e) { super(e), this._context = e._canvas.getContext("2d", { willReadFrequently: !0 }); } _fill(e) { this.save(), this.setAttr("fillStyle", e.colorKey), e._fillFuncHit(this), this.restore(); } strokeShape(e) { e.hasHitStroke() && this._stroke(e); } _stroke(e) { if (e.hasHitStroke()) { var r = e.getStrokeScaleEnabled(); if (!r) { this.save(); var n = this.getCanvas().getPixelRatio(); this.setTransform(n, 0, 0, n, 0, 0); } this._applyLineCap(e); var i = e.hitStrokeWidth(), a = i === "auto" ? e.strokeWidth() : i; this.setAttr("lineWidth", a), this.setAttr("strokeStyle", e.colorKey), e._strokeFuncHit(this), r || this.restore(); } } } var Pc; function BI() { if (Pc) return Pc; var t = q.createCanvasElement(), e = t.getContext("2d"); return Pc = function() { var r = be._global.devicePixelRatio || 1, n = e.webkitBackingStorePixelRatio || e.mozBackingStorePixelRatio || e.msBackingStorePixelRatio || e.oBackingStorePixelRatio || e.backingStorePixelRatio || 1; return r / n; }(), q.releaseCanvas(t), Pc; } class Yf { constructor(e) { this.pixelRatio = 1, this.width = 0, this.height = 0, this.isCache = !1; var r = e || {}, n = r.pixelRatio || be.pixelRatio || BI(); this.pixelRatio = n, this._canvas = q.createCanvasElement(), this._canvas.style.padding = "0", this._canvas.style.margin = "0", this._canvas.style.border = "0", this._canvas.style.background = "transparent", this._canvas.style.position = "absolute", this._canvas.style.top = "0", this._canvas.style.left = "0"; } getContext() { return this.context; } getPixelRatio() { return this.pixelRatio; } setPixelRatio(e) { var r = this.pixelRatio; this.pixelRatio = e, this.setSize(this.getWidth() / r, this.getHeight() / r); } setWidth(e) { this.width = this._canvas.width = e * this.pixelRatio, this._canvas.style.width = e + "px"; var r = this.pixelRatio, n = this.getContext()._context; n.scale(r, r); } setHeight(e) { this.height = this._canvas.height = e * this.pixelRatio, this._canvas.style.height = e + "px"; var r = this.pixelRatio, n = this.getContext()._context; n.scale(r, r); } getWidth() { return this.width; } getHeight() { return this.height; } setSize(e, r) { this.setWidth(e || 0), this.setHeight(r || 0); } toDataURL(e, r) { try { return this._canvas.toDataURL(e, r); } catch { try { return this._canvas.toDataURL(); } catch (i) { return q.error("Unable to get data URL. " + i.message + " For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."), ""; } } } } M.addGetterSetter(Yf, "pixelRatio", void 0, ce()); class to extends Yf { constructor(e = { width: 0, height: 0 }) { super(e), this.context = new LI(this), this.setSize(e.width, e.height); } } class Jg extends Yf { constructor(e = { width: 0, height: 0 }) { super(e), this.hitCanvas = !0, this.context = new NI(this), this.setSize(e.width, e.height); } } const nt = { get isDragging() { var t = !1; return nt._dragElements.forEach((e) => { e.dragStatus === "dragging" && (t = !0); }), t; }, justDragged: !1, get node() { var t; return nt._dragElements.forEach((e) => { t = e.node; }), t; }, _dragElements: /* @__PURE__ */ new Map(), _drag(t) { const e = []; nt._dragElements.forEach((r, n) => { const { node: i } = r, a = i.getStage(); a.setPointersPositions(t), r.pointerId === void 0 && (r.pointerId = q._getFirstPointerId(t)); const s = a._changedPointerPositions.find((f) => f.id === r.pointerId); if (s) { if (r.dragStatus !== "dragging") { var u = i.dragDistance(), c = Math.max(Math.abs(s.x - r.startPointerPos.x), Math.abs(s.y - r.startPointerPos.y)); if (c < u || (i.startDrag({ evt: t }), !i.isDragging())) return; } i._setDragPosition(t, r), e.push(i); } }), e.forEach((r) => { r.fire("dragmove", { type: "dragmove", target: r, evt: t }, !0); }); }, _endDragBefore(t) { const e = []; nt._dragElements.forEach((r) => { const { node: n } = r, i = n.getStage(); if (t && i.setPointersPositions(t), !i._changedPointerPositions.find((u) => u.id === r.pointerId)) return; (r.dragStatus === "dragging" || r.dragStatus === "stopped") && (nt.justDragged = !0, be._mouseListenClick = !1, be._touchListenClick = !1, be._pointerListenClick = !1, r.dragStatus = "stopped"); const s = r.node.getLayer() || r.node instanceof be.Stage && r.node; s && e.indexOf(s) === -1 && e.push(s); }), e.forEach((r) => { r.draw(); }); }, _endDragAfter(t) { nt._dragElements.forEach((e, r) => { e.dragStatus === "stopped" && e.node.fire("dragend", { type: "dragend", target: e.node, evt: t }, !0), e.dragStatus !== "dragging" && nt._dragElements.delete(r); }); } }; be.isBrowser && (window.addEventListener("mouseup", nt._endDragBefore, !0), window.addEventListener("touchend", nt._endDragBefore, !0), window.addEventListener("mousemove", nt._drag), window.addEventListener("touchmove", nt._drag), window.addEventListener("mouseup", nt._endDragAfter, !1), window.addEventListener("touchend", nt._endDragAfter, !1)); var Zc = "absoluteOpacity", Ec = "allEventListeners", Ii = "absoluteTransform", k1 = "absoluteScale", Va = "canvas", FI = "Change", jI = "children", VI = "konva", zp = "listening", I1 = "mouseenter", D1 = "mouseleave", M1 = "set", L1 = "Shape", $c = " ", N1 = "stage", na = "transform", zI = "Stage", Gp = "visible", GI = [ "xChange.konva", "yChange.konva", "scaleXChange.konva", "scaleYChange.konva", "skewXChange.konva", "skewYChange.konva", "rotationChange.konva", "offsetXChange.konva", "offsetYChange.konva", "transformsEnabledChange.konva" ].join($c); let WI = 1, de = class Wp { constructor(e) { this._id = WI++, this.eventListeners = {}, this.attrs = {}, this.index = 0, this._allEventListeners = null, this.parent = null, this._cache = /* @__PURE__ */ new Map(), this._attachedDepsListeners = /* @__PURE__ */ new Map(), this._lastPos = null, this._batchingTransformChange = !1, this._needClearTransformCache = !1, this._filterUpToDate = !1, this._isUnderCache = !1, this._dragEventId = null, this._shouldFireChangeEvents = !1, this.setAttrs(e), this._shouldFireChangeEvents = !0; } hasChildren() { return !1; } _clearCache(e) { (e === na || e === Ii) && this._cache.get(e) ? this._cache.get(e).dirty = !0 : e ? this._cache.delete(e) : this._cache.clear(); } _getCache(e, r) { var n = this._cache.get(e), i = e === na || e === Ii, a = n === void 0 || i && n.dirty === !0; return a && (n = r.call(this), this._cache.set(e, n)), n; } _calculate(e, r, n) { if (!this._attachedDepsListeners.get(e)) { const i = r.map((a) => a + "Change.konva").join($c); this.on(i, () => { this._clearCache(e); }), this._attachedDepsListeners.set(e, !0); } return this._getCache(e, n); } _getCanvasCache() { return this._cache.get(Va); } _clearSelfAndDescendantCache(e) { this._clearCache(e), e === Ii && this.fire("absoluteTransformChange"); } clearCache() { if (this._cache.has(Va)) { const { scene: e, filter: r, hit: n } = this._cache.get(Va); q.releaseCanvas(e, r, n), this._cache.delete(Va); } return this._clearSelfAndDescendantCache(), this._requestDraw(), this; } cache(e) { var r = e || {}, n = {}; (r.x === void 0 || r.y === void 0 || r.width === void 0 || r.height === void 0) && (n = this.getClientRect({ skipTransform: !0, relativeTo: this.getParent() })); var i = Math.ceil(r.width || n.width), a = Math.ceil(r.height || n.height), s = r.pixelRatio, u = r.x === void 0 ? Math.floor(n.x) : r.x, c = r.y === void 0 ? Math.floor(n.y) : r.y, f = r.offset || 0, h = r.drawBorder || !1, d = r.hitCanvasPixelRatio || 1; if (!i || !a) { q.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped."); return; } i += f * 2 + 1, a += f * 2 + 1, u -= f, c -= f; var g = new to({ pixelRatio: s, width: i, height: a }), v = new to({ pixelRatio: s, width: 0, height: 0 }), m = new Jg({ pixelRatio: d, width: i, height: a }), b = g.getContext(), S = m.getContext(); return m.isCache = !0, g.isCache = !0, this._cache.delete(Va), this._filterUpToDate = !1, r.imageSmoothingEnabled === !1 && (g.getContext()._context.imageSmoothingEnabled = !1, v.getContext()._context.imageSmoothingEnabled = !1), b.save(), S.save(), b.translate(-u, -c), S.translate(-u, -c), this._isUnderCache = !0, this._clearSelfAndDescendantCache(Zc), this._clearSelfAndDescendantCache(k1), this.drawScene(g, this), this.drawHit(m, this), this._isUnderCache = !1, b.restore(), S.restore(), h && (b.save(), b.beginPath(), b.rect(0, 0, i, a), b.closePath(), b.setAttr("strokeStyle", "red"), b.setAttr("lineWidth", 5), b.stroke(), b.restore()), this._cache.set(Va, { scene: g, filter: v, hit: m, x: u, y: c }), this._requestDraw(), this; } isCached() { return this._cache.has(Va); } getClientRect(e) { throw new Error('abstract "getClientRect" method call'); } _transformedRect(e, r) { var n = [ { x: e.x, y: e.y }, { x: e.x + e.width, y: e.y }, { x: e.x + e.width, y: e.y + e.height }, { x: e.x, y: e.y + e.height } ], i, a, s, u, c = this.getAbsoluteTransform(r); return n.forEach(function(f) { var h = c.point(f); i === void 0 && (i = s = h.x, a = u = h.y), i = Math.min(i, h.x), a = Math.min(a, h.y), s = Math.max(s, h.x), u = Math.max(u, h.y); }), { x: i, y: a, width: s - i, height: u - a }; } _drawCachedSceneCanvas(e) { e.save(), e._applyOpacity(this), e._applyGlobalCompositeOperation(this); const r = this._getCanvasCache(); e.translate(r.x, r.y); var n = this._getCachedSceneCanvas(), i = n.pixelRatio; e.drawImage(n._canvas, 0, 0, n.width / i, n.height / i), e.restore(); } _drawCachedHitCanvas(e) { var r = this._getCanvasCache(), n = r.hit; e.save(), e.translate(r.x, r.y), e.drawImage(n._canvas, 0, 0, n.width / n.pixelRatio, n.height / n.pixelRatio), e.restore(); } _getCachedSceneCanvas() { var e = this.filters(), r = this._getCanvasCache(), n = r.scene, i = r.filter, a = i.getContext(), s, u, c, f; if (e) { if (!this._filterUpToDate) { var h = n.pixelRatio; i.setSize(n.width / n.pixelRatio, n.height / n.pixelRatio); try { for (s = e.length, a.clear(), a.drawImage(n._canvas, 0, 0, n.getWidth() / h, n.getHeight() / h), u = a.getImageData(0, 0, i.getWidth(), i.getHeight()), c = 0; c < s; c++) { if (f = e[c], typeof f != "function") { q.error("Filter should be type of function, but got " + typeof f + " instead. Please check correct filters"); continue; } f.call(this, u), a.putImageData(u, 0, 0); } } catch (d) { q.error("Unable to apply filter. " + d.message + " This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html."); } this._filterUpToDate = !0; } return i; } return n; } on(e, r) { if (this._cache && this._cache.delete(Ec), arguments.length === 3) return this._delegate.apply(this, arguments); var n = e.split($c), i = n.length, a, s, u, c, f; for (a = 0; a < i; a++) s = n[a], u = s.split("."), c = u[0], f = u[1] || "", this.eventListeners[c] || (this.eventListeners[c] = []), this.eventListeners[c].push({ name: f, handler: r }); return this; } off(e, r) { var n = (e || "").split($c), i = n.length, a, s, u, c, f, h; if (this._cache && this._cache.delete(Ec), !e) for (s in this.eventListeners) this._off(s); for (a = 0; a < i; a++) if (u = n[a], c = u.split("."), f = c[0], h = c[1], f) this.eventListeners[f] && this._off(f, h, r); else for (s in this.eventListeners) this._off(s, h, r); return this; } dispatchEvent(e) { var r = { target: this, type: e.type, evt: e }; return this.fire(e.type, r), this; } addEventListener(e, r) { return this.on(e, function(n) { r.call(this, n.evt); }), this; } removeEventListener(e) { return this.off(e), this; } _delegate(e, r, n) { var i = this; this.on(e, function(a) { for (var s = a.target.findAncestors(r, !0, i), u = 0; u < s.length; u++) a = q.cloneObject(a), a.currentTarget = s[u], n.call(s[u], a); }); } remove() { return this.isDragging() && this.stopDrag(), nt._dragElements.delete(this._id), this._remove(), this; } _clearCaches() { this._clearSelfAndDescendantCache(Ii), this._clearSelfAndDescendantCache(Zc), this._clearSelfAndDescendantCache(k1), this._clearSelfAndDescendantCache(N1), this._clearSelfAndDescendantCache(Gp), this._clearSelfAndDescendantCache(zp); } _remove() { this._clearCaches(); var e = this.getParent(); e && e.children && (e.children.splice(this.index, 1), e._setChildrenIndices(), this.parent = null); } destroy() { return this.remove(), this.clearCache(), this; } getAttr(e) { var r = "get" + q._capitalize(e); return q._isFunction(this[r]) ? this[r]() : this.attrs[e]; } getAncestors() { for (var e = this.getParent(), r = []; e; ) r.push(e), e = e.getParent(); return r; } getAttrs() { return this.attrs || {}; } setAttrs(e) { return this._batchTransformChanges(() => { var r, n; if (!e) return this; for (r in e) r !== jI && (n = M1 + q._capitalize(r), q._isFunction(this[n]) ? this[n](e[r]) : this._setAttr(r, e[r])); }), this; } isListening() { return this._getCache(zp, this._isListening); } _isListening(e) { if (!this.listening()) return !1; const n = this.getParent(); return n && n !== e && this !== e ? n._isListening(e) : !0; } isVisible() { return this._getCache(Gp, this._isVisible); } _isVisible(e) { if (!this.visible()) return !1; const n = this.getParent(); return n && n !== e && this !== e ? n._isVisible(e) : !0; } shouldDrawHit(e, r = !1) { if (e) return this._isVisible(e) && this._isListening(e); var n = this.getLayer(), i = !1; nt._dragElements.forEach((s) => { s.dragStatus === "dragging" && (s.node.nodeType === "Stage" || s.node.getLayer() === n) && (i = !0); }); var a = !r && !be.hitOnDragEnabled && i; return this.isListening() && this.isVisible() && !a; } show() { return this.visible(!0), this; } hide() { return this.visible(!1), this; } getZIndex() { return this.index || 0; } getAbsoluteZIndex() { var e = this.getDepth(), r = this, n = 0, i, a, s, u; function c(f) { for (i = [], a = f.length, s = 0; s < a; s++) u = f[s], n++, u.nodeType !== L1 && (i = i.concat(u.getChildren().slice())), u._id === r._id && (s = a); i.length > 0 && i[0].getDepth() <= e && c(i); } return r.nodeType !== zI && c(r.getStage().getChildren()), n; } getDepth() { for (var e = 0, r = this.parent; r; ) e++, r = r.parent; return e; } _batchTransformChanges(e) { this._batchingTransformChange = !0, e(), this._batchingTransformChange = !1, this._needClearTransformCache && (this._clearCache(na), this._clearSelfAndDescendantCache(Ii)), this._needClearTransformCache = !1; } setPosition(e) { return this._batchTransformChanges(() => { this.x(e.x), this.y(e.y); }), this; } getPosition() { return { x: this.x(), y: this.y() }; } getRelativePointerPosition() { if (!this.getStage()) return null; var e = this.getStage().getPointerPosition(); if (!e) return null; var r = this.getAbsoluteTransform().copy(); return r.invert(), r.point(e); } getAbsolutePosition(e) { let r = !1, n = this.parent; for (; n; ) { if (n.isCached()) { r = !0; break; } n = n.parent; } r && !e && (e = !0); var i = this.getAbsoluteTransform(e).getMatrix(), a = new tn(), s = this.offset(); return a.m = i.slice(), a.translate(s.x, s.y), a.getTranslation(); } setAbsolutePosition(e) { var r = this._clearTransform(); this.attrs.x = r.x, this.attrs.y = r.y, delete r.x, delete r.y, this._clearCache(na); var n = this._getAbsoluteTransform().copy(); return n.invert(), n.translate(e.x, e.y), e = { x: this.attrs.x + n.getTranslation().x, y: this.attrs.y + n.getTranslation().y }, this._setTransform(r), this.setPosition({ x: e.x, y: e.y }), this._clearCache(na), this._clearSelfAndDescendantCache(Ii), this; } _setTransform(e) { var r; for (r in e) this.attrs[r] = e[r]; } _clearTransform() { var e = { x: this.x(), y: this.y(), rotation: this.rotation(), scaleX: this.scaleX(), scaleY: this.scaleY(), offsetX: this.offsetX(), offsetY: this.offsetY(), skewX: this.skewX(), skewY: this.skewY() }; return this.attrs.x = 0, this.attrs.y = 0, this.attrs.rotation = 0, this.attrs.scaleX = 1, this.attrs.scaleY = 1, this.attrs.offsetX = 0, this.attrs.offsetY = 0, this.attrs.skewX = 0, this.attrs.skewY = 0, e; } move(e) { var r = e.x, n = e.y, i = this.x(), a = this.y(); return r !== void 0 && (i += r), n !== void 0 && (a += n), this.setPosition({ x: i, y: a }), this; } _eachAncestorReverse(e, r) { var n = [], i = this.getParent(), a, s; if (!(r && r._id === this._id)) { for (n.unshift(this); i && (!r || i._id !== r._id); ) n.unshift(i), i = i.parent; for (a = n.length, s = 0; s < a; s++) e(n[s]); } } rotate(e) { return this.rotation(this.rotation() + e), this; } moveToTop() { if (!this.parent) return q.warn("Node has no parent. moveToTop function is ignored."), !1; var e = this.index, r = this.parent.getChildren().length; return e < r - 1 ? (this.parent.children.splice(e, 1), this.parent.children.push(this), this.parent._setChildrenIndices(), !0) : !1; } moveUp() { if (!this.parent) return q.warn("Node has no parent. moveUp function is ignored."), !1; var e = this.index, r = this.parent.getChildren().length; return e < r - 1 ? (this.parent.children.splice(e, 1), this.parent.children.splice(e + 1, 0, this), this.parent._setChildrenIndices(), !0) : !1; } moveDown() { if (!this.parent) return q.warn("Node has no parent. moveDown function is ignored."), !1; var e = this.index; return e > 0 ? (this.parent.children.splice(e, 1), this.parent.children.splice(e - 1, 0, this), this.parent._setChildrenIndices(), !0) : !1; } moveToBottom() { if (!this.parent) return q.warn("Node has no parent. moveToBottom function is ignored."), !1; var e = this.index; return e > 0 ? (this.parent.children.splice(e, 1), this.parent.children.unshift(this), this.parent._setChildrenIndices(), !0) : !1; } setZIndex(e) { if (!this.parent) return q.warn("Node has no parent. zIndex parameter is ignored."), this; (e < 0 || e >= this.parent.children.length) && q.warn("Unexpected value " + e + " for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to " + (this.parent.children.length - 1) + "."); var r = this.index; return this.parent.children.splice(r, 1), this.parent.children.splice(e, 0, this), this.parent._setChildrenIndices(), this; } getAbsoluteOpacity() { return this._getCache(Zc, this._getAbsoluteOpacity); } _getAbsoluteOpacity() { var e = this.opacity(), r = this.getParent(); return r && !r._isUnderCache && (e *= r.getAbsoluteOpacity()), e; } moveTo(e) { return this.getParent() !== e && (this._remove(), e.add(this)), this; } toObject() { var e = {}, r = this.getAttrs(), n, i, a, s, u; e.attrs = {}; for (n in r) i = r[n], u = q.isObject(i) && !q._isPlainObject(i) && !q._isArray(i), !u && (a = typeof this[n] == "function" && this[n], delete r[n], s = a ? a.call(this) : null, r[n] = i, s !== i && (e.attrs[n] = i)); return e.className = this.getClassName(), q._prepareToStringify(e); } toJSON() { return JSON.stringify(this.toObject()); } getParent() { return this.parent; } findAncestors(e, r, n) { var i = []; r && this._isMatch(e) && i.push(this); for (var a = this.parent; a; ) { if (a === n) return i; a._isMatch(e) && i.push(a), a = a.parent; } return i; } isAncestorOf(e) { return !1; } findAncestor(e, r, n) { return this.findAncestors(e, r, n)[0]; } _isMatch(e) { if (!e) return !1; if (typeof e == "function") return e(this); var r = e.replace(/ /g, "").split(","), n = r.length, i, a; for (i = 0; i < n; i++) if (a = r[i], q.isValidSelector(a) || (q.warn('Selector "' + a + '" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'), q.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'), q.warn("Konva is awesome, right?")), a.charAt(0) === "#") { if (this.id() === a.slice(1)) return !0; } else if (a.charAt(0) === ".") { if (this.hasName(a.slice(1))) return !0; } else if (this.className === a || this.nodeType === a) return !0; return !1; } getLayer() { var e = this.getParent(); return e ? e.getLayer() : null; } getStage() { return this._getCache(N1, this._getStage); } _getStage() { var e = this.getParent(); if (e) return e.getStage(); } fire(e, r = {}, n) { return r.target = r.target || this, n ? this._fireAndBubble(e, r) : this._fire(e, r), this; } getAbsoluteTransform(e) { return e ? this._getAbsoluteTransform(e) : this._getCache(Ii, this._getAbsoluteTransform); } _getAbsoluteTransform(e) { var r; if (e) return r = new tn(), this._eachAncestorReverse(function(i) { var a = i.transformsEnabled(); a === "all" ? r.multiply(i.getTransform()) : a === "position" && r.translate(i.x() - i.offsetX(), i.y() - i.offsetY()); }, e), r; r = this._cache.get(Ii) || new tn(), this.parent ? this.parent.getAbsoluteTransform().copyInto(r) : r.reset(); var n = this.transformsEnabled(); if (n === "all") r.multiply(this.getTransform()); else if (n === "position") { const i = this.attrs.x || 0, a = this.attrs.y || 0, s = this.attrs.offsetX || 0, u = this.attrs.offsetY || 0; r.translate(i - s, a - u); } return r.dirty = !1, r; } getAbsoluteScale(e) { for (var r = this; r; ) r._isUnderCache && (e = r), r = r.getParent(); const i = this.getAbsoluteTransform(e).decompose(); return { x: i.scaleX, y: i.scaleY }; } getAbsoluteRotation() { return this.getAbsoluteTransform().decompose().rotation; } getTransform() { return this._getCache(na, this._getTransform); } _getTransform() { var e, r, n = this._cache.get(na) || new tn(); n.reset(); var i = this.x(), a = this.y(), s = be.getAngle(this.rotation()), u = (e = this.attrs.scaleX) !== null && e !== void 0 ? e : 1, c = (r = this.attrs.scaleY) !== null && r !== void 0 ? r : 1, f = this.attrs.skewX || 0, h = this.attrs.skewY || 0, d = this.attrs.offsetX || 0, g = this.attrs.offsetY || 0; return (i !== 0 || a !== 0) && n.translate(i, a), s !== 0 && n.rotate(s), (f !== 0 || h !== 0) && n.skew(f, h), (u !== 1 || c !== 1) && n.scale(u, c), (d !== 0 || g !== 0) && n.translate(-1 * d, -1 * g), n.dirty = !1, n; } clone(e) { var r = q.cloneObject(this.attrs), n, i, a, s, u; for (n in e) r[n] = e[n]; var c = new this.constructor(r); for (n in this.eventListeners) for (i = this.eventListeners[n], a = i.length, s = 0; s < a; s++) u = i[s], u.name.indexOf(VI) < 0 && (c.eventListeners[n] || (c.eventListeners[n] = []), c.eventListeners[n].push(u)); return c; } _toKonvaCanvas(e) { e = e || {}; var r = this.getClientRect(), n = this.getStage(), i = e.x !== void 0 ? e.x : Math.floor(r.x), a = e.y !== void 0 ? e.y : Math.floor(r.y), s = e.pixelRatio || 1, u = new to({ width: e.width || Math.ceil(r.width) || (n ? n.width() : 0), height: e.height || Math.ceil(r.height) || (n ? n.height() : 0), pixelRatio: s }), c = u.getContext(); return e.imageSmoothingEnabled === !1 && (c._context.imageSmoothingEnabled = !1), c.save(), (i || a) && c.translate(-1 * i, -1 * a), this.drawScene(u), c.restore(), u; } toCanvas(e) { return this._toKonvaCanvas(e)._canvas; } toDataURL(e) { e = e || {}; var r = e.mimeType || null, n = e.quality || null, i = this._toKonvaCanvas(e).toDataURL(r, n); return e.callback && e.callback(i), i; } toImage(e) { return new Promise((r, n) => { try { const i = e == null ? void 0 : e.callback; i && delete e.callback, q._urlToImage(this.toDataURL(e), function(a) { r(a), i == null || i(a); }); } catch (i) { n(i); } }); } toBlob(e) { return new Promise((r, n) => { try { const i = e == null ? void 0 : e.callback; i && delete e.callback, this.toCanvas(e).toBlob((a) => { r(a), i == null || i(a); }); } catch (i) { n(i); } }); } setSize(e) { return this.width(e.width), this.height(e.height), this; } getSize() { return { width: this.width(), height: this.height() }; } getClassName() { return this.className || this.nodeType; } getType() { return this.nodeType; } getDragDistance() { return this.attrs.dragDistance !== void 0 ? this.attrs.dragDistance : this.parent ? this.parent.getDragDistance() : be.dragDistance; } _off(e, r, n) { var i = this.eventListeners[e], a, s, u; for (a = 0; a < i.length; a++) if (s = i[a].name, u = i[a].handler, (s !== "konva" || r === "konva") && (!r || s === r) && (!n || n === u)) { if (i.splice(a, 1), i.length === 0) { delete this.eventListeners[e]; break; } a--; } } _fireChangeEvent(e, r, n) { this._fire(e + FI, { oldVal: r, newVal: n }); } addName(e) { if (!this.hasName(e)) { var r = this.name(), n = r ? r + " " + e : e; this.name(n); } return this; } hasName(e) { if (!e) return !1; const r = this.name(); if (!r) return !1; var n = (r || "").split(/\s/g); return n.indexOf(e) !== -1; } removeName(e) { var r = (this.name() || "").split(/\s/g), n = r.indexOf(e); return n !== -1 && (r.splice(n, 1), this.name(r.join(" "))), this; } setAttr(e, r) { var n = this[M1 + q._capitalize(e)]; return q._isFunction(n) ? n.call(this, r) : this._setAttr(e, r), this; } _requestDraw() { if (be.autoDrawEnabled) { const e = this.getLayer() || this.getStage(); e == null || e.batchDraw(); } } _setAttr(e, r) { var n = this.attrs[e]; n === r && !q.isObject(r) || (r == null ? delete this.attrs[e] : this.attrs[e] = r, this._shouldFireChangeEvents && this._fireChangeEvent(e, n, r), this._requestDraw()); } _setComponentAttr(e, r, n) { var i; n !== void 0 && (i = this.attrs[e], i || (this.attrs[e] = this.getAttr(e)), this.attrs[e][r] = n, this._fireChangeEvent(e, i, n)); } _fireAndBubble(e, r, n) { r && this.nodeType === L1 && (r.target = this); var i = (e === I1 || e === D1) && (n && (this === n || this.isAncestorOf && this.isAncestorOf(n)) || this.nodeType === "Stage" && !n); if (!i) { this._fire(e, r); var a = (e === I1 || e === D1) && n && n.isAncestorOf && n.isAncestorOf(this) && !n.isAncestorOf(this.parent); (r && !r.cancelBubble || !r) && this.parent && this.parent.isListening() && !a && (n && n.parent ? this._fireAndBubble.call(this.parent, e, r, n) : this._fireAndBubble.call(this.parent, e, r)); } } _getProtoListeners(e) { let r = this._cache.get(Ec); if (!r) { r = {}; let i = Object.getPrototypeOf(this); for (; i; ) { if (!i.eventListeners) { i = Object.getPrototypeOf(i); continue; } for (var n in i.eventListeners) { const a = i.eventListeners[n], s = r[n] || []; r[n] = a.concat(s); } i = Object.getPrototypeOf(i); } this._cache.set(Ec, r); } return r[e]; } _fire(e, r) { r = r || {}, r.currentTarget = this, r.type = e; const n = this._getProtoListeners(e); if (n) for (var i = 0; i < n.length; i++) n[i].handler.call(this, r); const a = this.eventListeners[e]; if (a) for (var i = 0; i < a.length; i++) a[i].handler.call(this, r); } draw() { return this.drawScene(), this.drawHit(), this; } _createDragElement(e) { var r = e ? e.pointerId : void 0, n = this.getStage(), i = this.getAbsolutePosition(), a = n._getPointerById(r) || n._changedPointerPositions[0] || i; nt._dragElements.set(this._id, { node: this, startPointerPos: a, offset: { x: a.x - i.x, y: a.y - i.y }, dragStatus: "ready", pointerId: r }); } startDrag(e, r = !0) { nt._dragElements.has(this._id) || this._createDragElement(e); const n = nt._dragElements.get(this._id); n.dragStatus = "dragging", this.fire("dragstart", { type: "dragstart", target: this, evt: e && e.evt }, r); } _setDragPosition(e, r) { const n = this.getStage()._getPointerById(r.pointerId); if (n) { var i = { x: n.x - r.offset.x, y: n.y - r.offset.y }, a = this.dragBoundFunc(); if (a !== void 0) { const s = a.call(this, i, e); s ? i = s : q.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc."); } (!this._lastPos || this._lastPos.x !== i.x || this._lastPos.y !== i.y) && (this.setAbsolutePosition(i), this._requestDraw()), this._lastPos = i; } } stopDrag(e) { const r = nt._dragElements.get(this._id); r && (r.dragStatus = "stopped"), nt._endDragBefore(e), nt._endDragAfter(e); } setDraggable(e) { this._setAttr("draggable", e), this._dragChange(); } isDragging() { const e = nt._dragElements.get(this._id); return e ? e.dragStatus === "dragging" : !1; } _listenDrag() { this._dragCleanup(), this.on("mousedown.konva touchstart.konva", function(e) { var r = e.evt.button !== void 0, n = !r || be.dragButtons.indexOf(e.evt.button) >= 0; if (n && !this.isDragging()) { var i = !1; nt._dragElements.forEach((a) => { this.isAncestorOf(a.node) && (i = !0); }), i || this._createDragElement(e); } }); } _dragChange() { if (this.attrs.draggable) this._listenDrag(); else { this._dragCleanup(); var e = this.getStage(); if (!e) return; const r = nt._dragElements.get(this._id), n = r && r.dragStatus === "dragging", i = r && r.dragStatus === "ready"; n ? this.stopDrag() : i && nt._dragElements.delete(this._id); } } _dragCleanup() { this.off("mousedown.konva"), this.off("touchstart.konva"); } isClientRectOnScreen(e = { x: 0, y: 0 }) { const r = this.getStage(); if (!r) return !1; const n = { x: -e.x, y: -e.y, width: r.width() + 2 * e.x, height: r.height() + 2 * e.y }; return q.haveIntersection(n, this.getClientRect()); } static create(e, r) { return q._isString(e) && (e = JSON.parse(e)), this._createNode(e, r); } static _createNode(e, r) { var n = Wp.prototype.getClassName.call(e), i = e.children, a, s, u; r && (e.attrs.container = r), be[n] || (q.warn('Can not find a node with class name "' + n + '". Fallback to "Shape".'), n = "Shape"); const c = be[n]; if (a = new c(e.attrs), i) for (s = i.length, u = 0; u < s; u++) a.add(Wp._createNode(i[u])); return a; } }; de.prototype.nodeType = "Node"; de.prototype._attrsAffectingSize = []; de.prototype.eventListeners = {}; de.prototype.on.call(de.prototype, GI, function() { if (this._batchingTransformChange) { this._needClearTransformCache = !0; return; } this._clearCache(na), this._clearSelfAndDescendantCache(Ii); }); de.prototype.on.call(de.prototype, "visibleChange.konva", function() { this._clearSelfAndDescendantCache(Gp); }); de.prototype.on.call(de.prototype, "listeningChange.konva", function() { this._clearSelfAndDescendantCache(zp); }); de.prototype.on.call(de.prototype, "opacityChange.konva", function() { this._clearSelfAndDescendantCache(Zc); }); const Pt = M.addGetterSetter; Pt(de, "zIndex"); Pt(de, "absolutePosition"); Pt(de, "position"); Pt(de, "x", 0, ce()); Pt(de, "y", 0, ce()); Pt(de, "globalCompositeOperation", "source-over", bo()); Pt(de, "opacity", 1, ce()); Pt(de, "name", "", bo()); Pt(de, "id", "", bo()); Pt(de, "rotation", 0, ce()); M.addComponentsGetterSetter(de, "scale", ["x", "y"]); Pt(de, "scaleX", 1, ce()); Pt(de, "scaleY", 1, ce()); M.addComponentsGetterSetter(de, "skew", ["x", "y"]); Pt(de, "skewX", 0, ce()); Pt(de, "skewY", 0, ce()); M.addComponentsGetterSetter(de, "offset", ["x", "y"]); Pt(de, "offsetX", 0, ce()); Pt(de, "offsetY", 0, ce()); Pt(de, "dragDistance", null, ce()); Pt(de, "width", 0, ce()); Pt(de, "height", 0, ce()); Pt(de, "listening", !0, Yn()); Pt(de, "preventDefault", !0, Yn()); Pt(de, "filters", null, function(t) { return this._filterUpToDate = !1, t; }); Pt(de, "visible", !0, Yn()); Pt(de, "transformsEnabled", "all", bo()); Pt(de, "size"); Pt(de, "dragBoundFunc"); Pt(de, "draggable", !1, Yn()); M.backCompat(de, { rotateDeg: "rotate", setRotationDeg: "setRotation", getRotationDeg: "getRotation" }); let rn = class extends de { constructor() { super(...arguments), this.children = []; } getChildren(e) { if (!e) return this.children || []; const r = this.children || []; var n = []; return r.forEach(function(i) { e(i) && n.push(i); }), n; } hasChildren() { return this.getChildren().length > 0; } removeChildren() { return this.getChildren().forEach((e) => { e.parent = null, e.index = 0, e.remove(); }), this.children = [], this._requestDraw(), this; } destroyChildren() { return this.getChildren().forEach((e) => { e.parent = null, e.index = 0, e.destroy(); }), this.children = [], this._requestDraw(), this; } add(...e) { if (e.length === 0) return this; if (e.length > 1) { for (var r = 0; r < e.length; r++) this.add(e[r]); return this; } const n = e[0]; return n.getParent() ? (n.moveTo(this), this) : (this._validateAdd(n), n.index = this.getChildren().length, n.parent = this, n._clearCaches(), this.getChildren().push(n), this._fire("add", { child: n }), this._requestDraw(), this); } destroy() { return this.hasChildren() && this.destroyChildren(), super.destroy(), this; } find(e) { return this._generalFind(e, !1); } findOne(e) { var r = this._generalFind(e, !0); return r.length > 0 ? r[0] : void 0; } _generalFind(e, r) { var n = []; return this._descendants((i) => { const a = i._isMatch(e); return a && n.push(i), !!(a && r); }), n; } _descendants(e) { let r = !1; const n = this.getChildren(); for (const i of n) { if (r = e(i), r) return !0; if (i.hasChildren() && (r = i._descendants(e), r)) return !0; } return !1; } toObject() { var e = de.prototype.toObject.call(this); return e.children = [], this.getChildren().forEach((r) => { e.children.push(r.toObject()); }), e; } isAncestorOf(e) { for (var r = e.getParent(); r; ) { if (r._id === this._id) return !0; r = r.getParent(); } return !1; } clone(e) { var r = de.prototype.clone.call(this, e); return this.getChildren().forEach(function(n) { r.add(n.clone()); }), r; } getAllIntersections(e) { var r = []; return this.find("Shape").forEach(function(n) { n.isVisible() && n.intersects(e) && r.push(n); }), r; } _clearSelfAndDescendantCache(e) { var r; super._clearSelfAndDescendantCache(e), !this.isCached() && ((r = this.children) === null || r === void 0 || r.forEach(function(n) { n._clearSelfAndDescendantCache(e); })); } _setChildrenIndices() { var e; (e = this.children) === null || e === void 0 || e.forEach(function(r, n) { r.index = n; }), this._requestDraw(); } drawScene(e, r) { var n = this.getLayer(), i = e || n && n.getCanvas(), a = i && i.getContext(), s = this._getCanvasCache(), u = s && s.scene, c = i && i.isCache; if (!this.isVisible() && !c) return this; if (u) { a.save(); var f = this.getAbsoluteTransform(r).getMatrix(); a.transform(f[0], f[1], f[2], f[3], f[4], f[5]), this._drawCachedSceneCanvas(a), a.restore(); } else this._drawChildren("drawScene", i, r); return this; } drawHit(e, r) { if (!this.shouldDrawHit(r)) return this; var n = this.getLayer(), i = e || n && n.hitCanvas, a = i && i.getContext(), s = this._getCanvasCache(), u = s && s.hit; if (u) { a.save(); var c = this.getAbsoluteTransform(r).getMatrix(); a.transform(c[0], c[1], c[2], c[3], c[4], c[5]), this._drawCachedHitCanvas(a), a.restore(); } else this._drawChildren("drawHit", i, r); return this; } _drawChildren(e, r, n) { var i, a = r && r.getContext(), s = this.clipWidth(), u = this.clipHeight(), c = this.clipFunc(), f = s && u || c; const h = n === this; if (f) { a.save(); var d = this.getAbsoluteTransform(n), g = d.getMatrix(); if (a.transform(g[0], g[1], g[2], g[3], g[4], g[5]), a.beginPath(), c) c.call(this, a, this); else { var v = this.clipX(), m = this.clipY(); a.rect(v, m, s, u); } a.clip(), g = d.copy().invert().getMatrix(), a.transform(g[0], g[1], g[2], g[3], g[4], g[5]); } var b = !h && this.globalCompositeOperation() !== "source-over" && e === "drawScene"; b && (a.save(), a._applyGlobalCompositeOperation(this)), (i = this.children) === null || i === void 0 || i.forEach(function(S) { S[e](r, n); }), b && a.restore(), f && a.restore(); } getClientRect(e) { var r; e = e || {}; var n = e.skipTransform, i = e.relativeTo, a, s, u, c, f = { x: 1 / 0, y: 1 / 0, width: 0, height: 0 }, h = this; (r = this.children) === null || r === void 0 || r.forEach(function(b) { if (b.visible()) { var S = b.getClientRect({ relativeTo: h, skipShadow: e.skipShadow, skipStroke: e.skipStroke }); S.width === 0 && S.height === 0 || (a === void 0 ? (a = S.x, s = S.y, u = S.x + S.width, c = S.y + S.height) : (a = Math.min(a, S.x), s = Math.min(s, S.y), u = Math.max(u, S.x + S.width), c = Math.max(c, S.y + S.height))); } }); for (var d = this.find("Shape"), g = !1, v = 0; v < d.length; v++) { var m = d[v]; if (m._isVisible(this)) { g = !0; break; } } return g && a !== void 0 ? f = { x: a, y: s, width: u - a, height: c - s } : f = { x: 0, y: 0, width: 0, height: 0 }, n ? f : this._transformedRect(f, i); } }; M.addComponentsGetterSetter(rn, "clip", [ "x", "y", "width", "height" ]); M.addGetterSetter(rn, "clipX", void 0, ce()); M.addGetterSetter(rn, "clipY", void 0, ce()); M.addGetterSetter(rn, "clipWidth", void 0, ce()); M.addGetterSetter(rn, "clipHeight", void 0, ce()); M.addGetterSetter(rn, "clipFunc"); const zu = /* @__PURE__ */ new Map(), _w = be._global.PointerEvent !== void 0; function Kd(t) { return zu.get(t); } function Zg(t) { return { evt: t, pointerId: t.pointerId }; } function Pw(t, e) { return zu.get(t) === e; } function Ew(t, e) { Pu(t), e.getStage() && (zu.set(t, e), _w && e._fire("gotpointercapture", Zg(new PointerEvent("gotpointercapture")))); } function Pu(t, e) { const r = zu.get(t); if (!r) return; const n = r.getStage(); n && n.content, zu.delete(t), _w && r._fire("lostpointercapture", Zg(new PointerEvent("lostpointercapture"))); } var UI = "Stage", HI = "string", B1 = "px", YI = "mouseout", Tw = "mouseleave", Aw = "mouseover", Ow = "mouseenter", Rw = "mousemove", kw = "mousedown", Iw = "mouseup", vu = "pointermove", yu = "pointerdown", Ks = "pointerup", bu = "pointercancel", qI = "lostpointercapture", Tc = "pointerout", Ac = "pointerleave", Oc = "pointerover", Rc = "pointerenter", Up = "contextmenu", Dw = "touchstart", Mw = "touchend", Lw = "touchmove", Nw = "touchcancel", Hp = "wheel", KI = 5, XI = [ [Ow, "_pointerenter"], [kw, "_pointerdown"], [Rw, "_pointermove"], [Iw, "_pointerup"], [Tw, "_pointerleave"], [Dw, "_pointerdown"], [Lw, "_pointermove"], [Mw, "_pointerup"], [Nw, "_pointercancel"], [Aw, "_pointerover"], [Hp, "_wheel"], [Up, "_contextmenu"], [yu, "_pointerdown"], [vu, "_pointermove"], [Ks, "_pointerup"], [bu, "_pointercancel"], [qI, "_lostpointercapture"] ]; const Xd = { mouse: { [Tc]: YI, [Ac]: Tw, [Oc]: Aw, [Rc]: Ow, [vu]: Rw, [yu]: kw, [Ks]: Iw, [bu]: "mousecancel", pointerclick: "click", pointerdblclick: "dblclick" }, touch: { [Tc]: "touchout", [Ac]: "touchleave", [Oc]: "touchover", [Rc]: "touchenter", [vu]: Lw, [yu]: Dw, [Ks]: Mw, [bu]: Nw, pointerclick: "tap", pointerdblclick: "dbltap" }, pointer: { [Tc]: Tc, [Ac]: Ac, [Oc]: Oc, [Rc]: Rc, [vu]: vu, [yu]: yu, [Ks]: Ks, [bu]: bu, pointerclick: "pointerclick", pointerdblclick: "pointerdblclick" } }, Su = (t) => t.indexOf("pointer") >= 0 ? "pointer" : t.indexOf("touch") >= 0 ? "touch" : "mouse", Gs = (t) => { const e = Su(t); if (e === "pointer") return be.pointerEventsEnabled && Xd.pointer; if (e === "touch") return Xd.touch; if (e === "mouse") return Xd.mouse; }; function F1(t = {}) { return (t.clipFunc || t.clipWidth || t.clipHeight) && q.warn("Stage does not support clipping. Please use clip for Layers or Groups."), t; } const QI = "Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);", ef = []; class qf extends rn { constructor(e) { super(F1(e)), this._pointerPositions = [], this._changedPointerPositions = [], this._buildDOM(), this._bindContentEvents(), ef.push(this), this.on("widthChange.konva heightChange.konva", this._resizeDOM), this.on("visibleChange.konva", this._checkVisibility), this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva", () => { F1(this.attrs); }), this._checkVisibility(); } _validateAdd(e) { const r = e.getType() === "Layer", n = e.getType() === "FastLayer"; r || n || q.throw("You may only add layers to the stage."); } _checkVisibility() { if (!this.content) return; const e = this.visible() ? "" : "none"; this.content.style.display = e; } setContainer(e) { if (typeof e === HI) { if (e.charAt(0) === ".") { var r = e.slice(1); e = document.getElementsByClassName(r)[0]; } else { var n; e.charAt(0) !== "#" ? n = e : n = e.slice(1), e = document.getElementById(n); } if (!e) throw "Can not find container in document with id " + n; } return this._setAttr("container", e), this.content && (this.content.parentElement && this.content.parentElement.removeChild(this.content), e.appendChild(this.content)), this; } shouldDrawHit() { return !0; } clear() { var e = this.children, r = e.length, n; for (n = 0; n < r; n++) e[n].clear(); return this; } clone(e) { return e || (e = {}), e.container = typeof document < "u" && document.createElement("div"), rn.prototype.clone.call(this, e); } destroy() { super.destroy(); var e = this.content; e && q._isInDocument(e) && this.container().removeChild(e); var r = ef.indexOf(this); return r > -1 && ef.splice(r, 1), q.releaseCanvas(this.bufferCanvas._canvas, this.bufferHitCanvas._canvas), this; } getPointerPosition() { const e = this._pointerPositions[0] || this._changedPointerPositions[0]; return e ? { x: e.x, y: e.y } : (q.warn(QI), null); } _getPointerById(e) { return this._pointerPositions.find((r) => r.id === e); } getPointersPositions() { return this._pointerPositions; } getStage() { return this; } getContent() { return this.content; } _toKonvaCanvas(e) { e = e || {}, e.x = e.x || 0, e.y = e.y || 0, e.width = e.width || this.width(), e.height = e.height || this.height(); var r = new to({ width: e.width, height: e.height, pixelRatio: e.pixelRatio || 1 }), n = r.getContext()._context, i = this.children; return (e.x || e.y) && n.translate(-1 * e.x, -1 * e.y), i.forEach(function(a) { if (a.isVisible()) { var s = a._toKonvaCanvas(e); n.drawImage(s._canvas, e.x, e.y, s.getWidth() / s.getPixelRatio(), s.getHeight() / s.getPixelRatio()); } }), r; } getIntersection(e) { if (!e) return null; var r = this.children, n = r.length, i = n - 1, a; for (a = i; a >= 0; a--) { const s = r[a].getIntersection(e); if (s) return s; } return null; } _resizeDOM() { var e = this.width(), r = this.height(); this.content && (this.content.style.width = e + B1, this.content.style.height = r + B1), this.bufferCanvas.setSize(e, r), this.bufferHitCanvas.setSize(e, r), this.children.forEach((n) => { n.setSize({ width: e, height: r }), n.draw(); }); } add(e, ...r) { if (arguments.length > 1) { for (var n = 0; n < arguments.length; n++) this.add(arguments[n]); return this; } super.add(e); var i = this.children.length; return i > KI && q.warn("The stage has " + i + " layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."), e.setSize({ width: this.width(), height: this.height() }), e.draw(), be.isBrowser && this.content.appendChild(e.canvas._canvas), this; } getParent() { return null; } getLayer() { return null; } hasPointerCapture(e) { return Pw(e, this); } setPointerCapture(e) { Ew(e, this); } releaseCapture(e) { Pu(e); } getLayers() { return this.children; } _bindContentEvents() { be.isBrowser && XI.forEach(([e, r]) => { this.content.addEventListener(e, (n) => { this[r](n); }, { passive: !1 }); }); } _pointerenter(e) { this.setPointersPositions(e); const r = Gs(e.type); this._fire(r.pointerenter, { evt: e, target: this, currentTarget: this }); } _pointerover(e) { this.setPointersPositions(e); const r = Gs(e.type); this._fire(r.pointerover, { evt: e, target: this, currentTarget: this }); } _getTargetShape(e) { let r = this[e + "targetShape"]; return r && !r.getStage() && (r = null), r; } _pointerleave(e) { const r = Gs(e.type), n = Su(e.type); if (r) { this.setPointersPositions(e); var i = this._getTargetShape(n), a = !nt.isDragging || be.hitOnDragEnabled; i && a ? (i._fireAndBubble(r.pointerout, { evt: e }), i._fireAndBubble(r.pointerleave, { evt: e }), this._fire(r.pointerleave, { evt: e, target: this, currentTarget: this }), this[n + "targetShape"] = null) : a && (this._fire(r.pointerleave, { evt: e, target: this, currentTarget: this }), this._fire(r.pointerout, { evt: e, target: this, currentTarget: this })), this.pointerPos = void 0, this._pointerPositions = []; } } _pointerdown(e) { const r = Gs(e.type), n = Su(e.type); if (r) { this.setPointersPositions(e); var i = !1; this._changedPointerPositions.forEach((a) => { var s = this.getIntersection(a); if (nt.justDragged = !1, be["_" + n + "ListenClick"] = !0, !(s && s.isListening())) return; be.capturePointerEventsEnabled && s.setPointerCapture(a.id), this[n + "ClickStartShape"] = s, s._fireAndBubble(r.pointerdown, { evt: e, pointerId: a.id }), i = !0; const c = e.type.indexOf("touch") >= 0; s.preventDefault() && e.cancelable && c && e.preventDefault(); }), i || this._fire(r.pointerdown, { evt: e, target: this, currentTarget: this, pointerId: this._pointerPositions[0].id }); } } _pointermove(e) { const r = Gs(e.type), n = Su(e.type); if (!r) return; nt.isDragging && nt.node.preventDefault() && e.cancelable && e.preventDefault(), this.setPointersPositions(e); var i = !nt.isDragging || be.hitOnDragEnabled; if (!i) return; var a = {}; let s = !1; var u = this._getTargetShape(n); this._changedPointerPositions.forEach((c) => { const f = Kd(c.id) || this.getIntersection(c), h = c.id, d = { evt: e, pointerId: h }; var g = u !== f; if (g && u && (u._fireAndBubble(r.pointerout, Object.assign({}, d), f), u._fireAndBubble(r.pointerleave, Object.assign({}, d), f)), f) { if (a[f._id]) return; a[f._id] = !0; } f && f.isListening() ? (s = !0, g && (f._fireAndBubble(r.pointerover, Object.assign({}, d), u), f._fireAndBubble(r.pointerenter, Object.assign({}, d), u), this[n + "targetShape"] = f), f._fireAndBubble(r.pointermove, Object.assign({}, d))) : u && (this._fire(r.pointerover, { evt: e, target: this, currentTarget: this, pointerId: h }), this[n + "targetShape"] = null); }), s || this._fire(r.pointermove, { evt: e, target: this, currentTarget: this, pointerId: this._changedPointerPositions[0].id }); } _pointerup(e) { const r = Gs(e.type), n = Su(e.type); if (!r) return; this.setPointersPositions(e); const i = this[n + "ClickStartShape"], a = this[n + "ClickEndShape"]; var s = {}; let u = !1; this._changedPointerPositions.forEach((c) => { const f = Kd(c.id) || this.getIntersection(c); if (f) { if (f.releaseCapture(c.id), s[f._id]) return; s[f._id] = !0; } const h = c.id, d = { evt: e, pointerId: h }; let g = !1; be["_" + n + "InDblClickWindow"] ? (g = !0, clearTimeout(this[n + "DblTimeout"])) : nt.justDragged || (be["_" + n + "InDblClickWindow"] = !0, clearTimeout(this[n + "DblTimeout"])), this[n + "DblTimeout"] = setTimeout(function() { be["_" + n + "InDblClickWindow"] = !1; }, be.dblClickWindow), f && f.isListening() ? (u = !0, this[n + "ClickEndShape"] = f, f._fireAndBubble(r.pointerup, Object.assign({}, d)), be["_" + n + "ListenClick"] && i && i === f && (f._fireAndBubble(r.pointerclick, Object.assign({}, d)), g && a && a === f && f._fireAndBubble(r.pointerdblclick, Object.assign({}, d)))) : (this[n + "ClickEndShape"] = null, be["_" + n + "ListenClick"] && this._fire(r.pointerclick, { evt: e, target: this, currentTarget: this, pointerId: h }), g && this._fire(r.pointerdblclick, { evt: e, target: this, currentTarget: this, pointerId: h })); }), u || this._fire(r.pointerup, { evt: e, target: this, currentTarget: this, pointerId: this._changedPointerPositions[0].id }), be["_" + n + "ListenClick"] = !1, e.cancelable && n !== "touch" && e.preventDefault(); } _contextmenu(e) { this.setPointersPositions(e); var r = this.getIntersection(this.getPointerPosition()); r && r.isListening() ? r._fireAndBubble(Up, { evt: e }) : this._fire(Up, { evt: e, target: this, currentTarget: this }); } _wheel(e) { this.setPointersPositions(e); var r = this.getIntersection(this.getPointerPosition()); r && r.isListening() ? r._fireAndBubble(Hp, { evt: e }) : this._fire(Hp, { evt: e, target: this, currentTarget: this }); } _pointercancel(e) { this.setPointersPositions(e); const r = Kd(e.pointerId) || this.getIntersection(this.getPointerPosition()); r && r._fireAndBubble(Ks, Zg(e)), Pu(e.pointerId); } _lostpointercapture(e) { Pu(e.pointerId); } setPointersPositions(e) { var r = this._getContentPosition(), n = null, i = null; e = e || window.event, e.touches !== void 0 ? (this._pointerPositions = [], this._changedPointerPositions = [], Array.prototype.forEach.call(e.touches, (a) => { this._pointerPositions.push({ id: a.identifier, x: (a.clientX - r.left) / r.scaleX, y: (a.clientY - r.top) / r.scaleY }); }), Array.prototype.forEach.call(e.changedTouches || e.touches, (a) => { this._changedPointerPositions.push({ id: a.identifier, x: (a.clientX - r.left) / r.scaleX, y: (a.clientY - r.top) / r.scaleY }); })) : (n = (e.clientX - r.left) / r.scaleX, i = (e.clientY - r.top) / r.scaleY, this.pointerPos = { x: n, y: i }, this._pointerPositions = [{ x: n, y: i, id: q._getFirstPointerId(e) }], this._changedPointerPositions = [ { x: n, y: i, id: q._getFirstPointerId(e) } ]); } _setPointerPosition(e) { q.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'), this.setPointersPositions(e); } _getContentPosition() { if (!this.content || !this.content.getBoundingClientRect) return { top: 0, left: 0, scaleX: 1, scaleY: 1 }; var e = this.content.getBoundingClientRect(); return { top: e.top, left: e.left, scaleX: e.width / this.content.clientWidth || 1, scaleY: e.height / this.content.clientHeight || 1 }; } _buildDOM() { if (this.bufferCanvas = new to({ width: this.width(), height: this.height() }), this.bufferHitCanvas = new Jg({ pixelRatio: 1, width: this.width(), height: this.height() }), !!be.isBrowser) { var e = this.container(); if (!e) throw "Stage has no container. A container is required."; e.innerHTML = "", this.content = document.createElement("div"), this.content.style.position = "relative", this.content.style.userSelect = "none", this.content.className = "konvajs-content", this.content.setAttribute("role", "presentation"), e.appendChild(this.content), this._resizeDOM(); } } cache() { return q.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."), this; } clearCache() { return this; } batchDraw() { return this.getChildren().forEach(function(e) { e.batchDraw(); }), this; } } qf.prototype.nodeType = UI; Ft(qf); M.addGetterSetter(qf, "container"); var Bw = "hasShadow", Fw = "shadowRGBA", jw = "patternImage", Vw = "linearGradient", zw = "radialGradient"; let kc; function Qd() { return kc || (kc = q.createCanvasElement().getContext("2d"), kc); } const Eu = {}; function JI(t) { t.fill(); } function ZI(t) { t.stroke(); } function $I(t) { t.fill(); } function eD(t) { t.stroke(); } function tD() { this._clearCache(Bw); } function rD() { this._clearCache(Fw); } function nD() { this._clearCache(jw); } function iD() { this._clearCache(Vw); } function aD() { this._clearCache(zw); } class ue extends de { constructor(e) { super(e); let r; for (; r = q.getRandomColor(), !(r && !(r in Eu)); ) ; this.colorKey = r, Eu[r] = this; } getContext() { return q.warn("shape.getContext() method is deprecated. Please do not use it."), this.getLayer().getContext(); } getCanvas() { return q.warn("shape.getCanvas() method is deprecated. Please do not use it."), this.getLayer().getCanvas(); } getSceneFunc() { return this.attrs.sceneFunc || this._sceneFunc; } getHitFunc() { return this.attrs.hitFunc || this._hitFunc; } hasShadow() { return this._getCache(Bw, this._hasShadow); } _hasShadow() { return this.shadowEnabled() && this.shadowOpacity() !== 0 && !!(this.shadowColor() || this.shadowBlur() || this.shadowOffsetX() || this.shadowOffsetY()); } _getFillPattern() { return this._getCache(jw, this.__getFillPattern); } __getFillPattern() { if (this.fillPatternImage()) { var e = Qd(); const r = e.createPattern(this.fillPatternImage(), this.fillPatternRepeat() || "repeat"); if (r && r.setTransform) { const n = new tn(); n.translate(this.fillPatternX(), this.fillPatternY()), n.rotate(be.getAngle(this.fillPatternRotation())), n.scale(this.fillPatternScaleX(), this.fillPatternScaleY()), n.translate(-1 * this.fillPatternOffsetX(), -1 * this.fillPatternOffsetY()); const i = n.getMatrix(), a = typeof DOMMatrix > "u" ? { a: i[0], b: i[1], c: i[2], d: i[3], e: i[4], f: i[5] } : new DOMMatrix(i); r.setTransform(a); } return r; } } _getLinearGradient() { return this._getCache(Vw, this.__getLinearGradient); } __getLinearGradient() { var e = this.fillLinearGradientColorStops(); if (e) { for (var r = Qd(), n = this.fillLinearGradientStartPoint(), i = this.fillLinearGradientEndPoint(), a = r.createLinearGradient(n.x, n.y, i.x, i.y), s = 0; s < e.length; s += 2) a.addColorStop(e[s], e[s + 1]); return a; } } _getRadialGradient() { return this._getCache(zw, this.__getRadialGradient); } __getRadialGradient() { var e = this.fillRadialGradientColorStops(); if (e) { for (var r = Qd(), n = this.fillRadialGradientStartPoint(), i = this.fillRadialGradientEndPoint(), a = r.createRadialGradient(n.x, n.y, this.fillRadialGradientStartRadius(), i.x, i.y, this.fillRadialGradientEndRadius()), s = 0; s < e.length; s += 2) a.addColorStop(e[s], e[s + 1]); return a; } } getShadowRGBA() { return this._getCache(Fw, this._getShadowRGBA); } _getShadowRGBA() { if (this.hasShadow()) { var e = q.colorToRGBA(this.shadowColor()); if (e) return "rgba(" + e.r + "," + e.g + "," + e.b + "," + e.a * (this.shadowOpacity() || 1) + ")"; } } hasFill() { return this._calculate("hasFill", [ "fillEnabled", "fill", "fillPatternImage", "fillLinearGradientColorStops", "fillRadialGradientColorStops" ], () => this.fillEnabled() && !!(this.fill() || this.fillPatternImage() || this.fillLinearGradientColorStops() || this.fillRadialGradientColorStops())); } hasStroke() { return this._calculate("hasStroke", [ "strokeEnabled", "strokeWidth", "stroke", "strokeLinearGradientColorStops" ], () => this.strokeEnabled() && this.strokeWidth() && !!(this.stroke() || this.strokeLinearGradientColorStops())); } hasHitStroke() { const e = this.hitStrokeWidth(); return e === "auto" ? this.hasStroke() : this.strokeEnabled() && !!e; } intersects(e) { var r = this.getStage(), n = r.bufferHitCanvas, i; return n.getContext().clear(), this.drawHit(n, null, !0), i = n.context.getImageData(Math.round(e.x), Math.round(e.y), 1, 1).data, i[3] > 0; } destroy() { return de.prototype.destroy.call(this), delete Eu[this.colorKey], delete this.colorKey, this; } _useBufferCanvas(e) { var r; if (!this.getStage() || !((r = this.attrs.perfectDrawEnabled) !== null && r !== void 0 ? r : !0)) return !1; const i = e || this.hasFill(), a = this.hasStroke(), s = this.getAbsoluteOpacity() !== 1; if (i && a && s) return !0; const u = this.hasShadow(), c = this.shadowForStrokeEnabled(); return !!(i && a && u && c); } setStrokeHitEnabled(e) { q.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."), e ? this.hitStrokeWidth("auto") : this.hitStrokeWidth(0); } getStrokeHitEnabled() { return this.hitStrokeWidth() !== 0; } getSelfRect() { var e = this.size(); return { x: this._centroid ? -e.width / 2 : 0, y: this._centroid ? -e.height / 2 : 0, width: e.width, height: e.height }; } getClientRect(e = {}) { const r = e.skipTransform, n = e.relativeTo, i = this.getSelfRect(), s = !e.skipStroke && this.hasStroke() && this.strokeWidth() || 0, u = i.width + s, c = i.height + s, f = !e.skipShadow && this.hasShadow(), h = f ? this.shadowOffsetX() : 0, d = f ? this.shadowOffsetY() : 0, g = u + Math.abs(h), v = c + Math.abs(d), m = f && this.shadowBlur() || 0, b = g + m * 2, S = v + m * 2, x = { width: b, height: S, x: -(s / 2 + m) + Math.min(h, 0) + i.x, y: -(s / 2 + m) + Math.min(d, 0) + i.y }; return r ? x : this._transformedRect(x, n); } drawScene(e, r) { var n = this.getLayer(), i = e || n.getCanvas(), a = i.getContext(), s = this._getCanvasCache(), u = this.getSceneFunc(), c = this.hasShadow(), f, h, d, g = i.isCache, v = r === this; if (!this.isVisible() && !v) return this; if (s) { a.save(); var m = this.getAbsoluteTransform(r).getMatrix(); return a.transform(m[0], m[1], m[2], m[3], m[4], m[5]), this._drawCachedSceneCanvas(a), a.restore(), this; } if (!u) return this; if (a.save(), this._useBufferCanvas() && !g) { f = this.getStage(), h = f.bufferCanvas, d = h.getContext(), d.clear(), d.save(), d._applyLineJoin(this); var b = this.getAbsoluteTransform(r).getMatrix(); d.transform(b[0], b[1], b[2], b[3], b[4], b[5]), u.call(this, d, this), d.restore(); var S = h.pixelRatio; c && a._applyShadow(this), a._applyOpacity(this), a._applyGlobalCompositeOperation(this), a.drawImage(h._canvas, 0, 0, h.width / S, h.height / S); } else { if (a._applyLineJoin(this), !v) { var b = this.getAbsoluteTransform(r).getMatrix(); a.transform(b[0], b[1], b[2], b[3], b[4], b[5]), a._applyOpacity(this), a._applyGlobalCompositeOperation(this); } c && a._applyShadow(this), u.call(this, a, this); } return a.restore(), this; } drawHit(e, r, n = !1) { if (!this.shouldDrawHit(r, n)) return this; var i = this.getLayer(), a = e || i.hitCanvas, s = a && a.getContext(), u = this.hitFunc() || this.sceneFunc(), c = this._getCanvasCache(), f = c && c.hit; if (this.colorKey || q.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"), f) { s.save(); var h = this.getAbsoluteTransform(r).getMatrix(); return s.transform(h[0], h[1], h[2], h[3], h[4], h[5]), this._drawCachedHitCanvas(s), s.restore(), this; } if (!u) return this; if (s.save(), s._applyLineJoin(this), !(this === r)) { var g = this.getAbsoluteTransform(r).getMatrix(); s.transform(g[0], g[1], g[2], g[3], g[4], g[5]); } return u.call(this, s, this), s.restore(), this; } drawHitFromCache(e = 0) { var r = this._getCanvasCache(), n = this._getCachedSceneCanvas(), i = r.hit, a = i.getContext(), s = i.getWidth(), u = i.getHeight(), c, f, h, d, g, v; a.clear(), a.drawImage(n._canvas, 0, 0, s, u); try { for (c = a.getImageData(0, 0, s, u), f = c.data, h = f.length, d = q._hexToRgb(this.colorKey), g = 0; g < h; g += 4) v = f[g + 3], v > e ? (f[g] = d.r, f[g + 1] = d.g, f[g + 2] = d.b, f[g + 3] = 255) : f[g + 3] = 0; a.putImageData(c, 0, 0); } catch (m) { q.error("Unable to draw hit graph from cached scene canvas. " + m.message); } return this; } hasPointerCapture(e) { return Pw(e, this); } setPointerCapture(e) { Ew(e, this); } releaseCapture(e) { Pu(e); } } ue.prototype._fillFunc = JI; ue.prototype._strokeFunc = ZI; ue.prototype._fillFuncHit = $I; ue.prototype._strokeFuncHit = eD; ue.prototype._centroid = !1; ue.prototype.nodeType = "Shape"; Ft(ue); ue.prototype.eventListeners = {}; ue.prototype.on.call(ue.prototype, "shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva", tD); ue.prototype.on.call(ue.prototype, "shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva", rD); ue.prototype.on.call(ue.prototype, "fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva", nD); ue.prototype.on.call(ue.prototype, "fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva", iD); ue.prototype.on.call(ue.prototype, "fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva", aD); M.addGetterSetter(ue, "stroke", void 0, Cw()); M.addGetterSetter(ue, "strokeWidth", 2, ce()); M.addGetterSetter(ue, "fillAfterStrokeEnabled", !1); M.addGetterSetter(ue, "hitStrokeWidth", "auto", Qg()); M.addGetterSetter(ue, "strokeHitEnabled", !0, Yn()); M.addGetterSetter(ue, "perfectDrawEnabled", !0, Yn()); M.addGetterSetter(ue, "shadowForStrokeEnabled", !0, Yn()); M.addGetterSetter(ue, "lineJoin"); M.addGetterSetter(ue, "lineCap"); M.addGetterSetter(ue, "sceneFunc"); M.addGetterSetter(ue, "hitFunc"); M.addGetterSetter(ue, "dash"); M.addGetterSetter(ue, "dashOffset", 0, ce()); M.addGetterSetter(ue, "shadowColor", void 0, bo()); M.addGetterSetter(ue, "shadowBlur", 0, ce()); M.addGetterSetter(ue, "shadowOpacity", 1, ce()); M.addComponentsGetterSetter(ue, "shadowOffset", ["x", "y"]); M.addGetterSetter(ue, "shadowOffsetX", 0, ce()); M.addGetterSetter(ue, "shadowOffsetY", 0, ce()); M.addGetterSetter(ue, "fillPatternImage"); M.addGetterSetter(ue, "fill", void 0, Cw()); M.addGetterSetter(ue, "fillPatternX", 0, ce()); M.addGetterSetter(ue, "fillPatternY", 0, ce()); M.addGetterSetter(ue, "fillLinearGradientColorStops"); M.addGetterSetter(ue, "strokeLinearGradientColorStops"); M.addGetterSetter(ue, "fillRadialGradientStartRadius", 0); M.addGetterSetter(ue, "fillRadialGradientEndRadius", 0); M.addGetterSetter(ue, "fillRadialGradientColorStops"); M.addGetterSetter(ue, "fillPatternRepeat", "repeat"); M.addGetterSetter(ue, "fillEnabled", !0); M.addGetterSetter(ue, "strokeEnabled", !0); M.addGetterSetter(ue, "shadowEnabled", !0); M.addGetterSetter(ue, "dashEnabled", !0); M.addGetterSetter(ue, "strokeScaleEnabled", !0); M.addGetterSetter(ue, "fillPriority", "color"); M.addComponentsGetterSetter(ue, "fillPatternOffset", ["x", "y"]); M.addGetterSetter(ue, "fillPatternOffsetX", 0, ce()); M.addGetterSetter(ue, "fillPatternOffsetY", 0, ce()); M.addComponentsGetterSetter(ue, "fillPatternScale", ["x", "y"]); M.addGetterSetter(ue, "fillPatternScaleX", 1, ce()); M.addGetterSetter(ue, "fillPatternScaleY", 1, ce()); M.addComponentsGetterSetter(ue, "fillLinearGradientStartPoint", [ "x", "y" ]); M.addComponentsGetterSetter(ue, "strokeLinearGradientStartPoint", [ "x", "y" ]); M.addGetterSetter(ue, "fillLinearGradientStartPointX", 0); M.addGetterSetter(ue, "strokeLinearGradientStartPointX", 0); M.addGetterSetter(ue, "fillLinearGradientStartPointY", 0); M.addGetterSetter(ue, "strokeLinearGradientStartPointY", 0); M.addComponentsGetterSetter(ue, "fillLinearGradientEndPoint", [ "x", "y" ]); M.addComponentsGetterSetter(ue, "strokeLinearGradientEndPoint", [ "x", "y" ]); M.addGetterSetter(ue, "fillLinearGradientEndPointX", 0); M.addGetterSetter(ue, "strokeLinearGradientEndPointX", 0); M.addGetterSetter(ue, "fillLinearGradientEndPointY", 0); M.addGetterSetter(ue, "strokeLinearGradientEndPointY", 0); M.addComponentsGetterSetter(ue, "fillRadialGradientStartPoint", [ "x", "y" ]); M.addGetterSetter(ue, "fillRadialGradientStartPointX", 0); M.addGetterSetter(ue, "fillRadialGradientStartPointY", 0); M.addComponentsGetterSetter(ue, "fillRadialGradientEndPoint", [ "x", "y" ]); M.addGetterSetter(ue, "fillRadialGradientEndPointX", 0); M.addGetterSetter(ue, "fillRadialGradientEndPointY", 0); M.addGetterSetter(ue, "fillPatternRotation", 0); M.backCompat(ue, { dashArray: "dash", getDashArray: "getDash", setDashArray: "getDash", drawFunc: "sceneFunc", getDrawFunc: "getSceneFunc", setDrawFunc: "setSceneFunc", drawHitFunc: "hitFunc", getDrawHitFunc: "getHitFunc", setDrawHitFunc: "setHitFunc" }); var sD = "#", oD = "beforeDraw", uD = "draw", Gw = [ { x: 0, y: 0 }, { x: -1, y: -1 }, { x: 1, y: -1 }, { x: 1, y: 1 }, { x: -1, y: 1 } ], lD = Gw.length; class es extends rn { constructor(e) { super(e), this.canvas = new to(), this.hitCanvas = new Jg({ pixelRatio: 1 }), this._waitingForDraw = !1, this.on("visibleChange.konva", this._checkVisibility), this._checkVisibility(), this.on("imageSmoothingEnabledChange.konva", this._setSmoothEnabled), this._setSmoothEnabled(); } createPNGStream() { return this.canvas._canvas.createPNGStream(); } getCanvas() { return this.canvas; } getNativeCanvasElement() { return this.canvas._canvas; } getHitCanvas() { return this.hitCanvas; } getContext() { return this.getCanvas().getContext(); } clear(e) { return this.getContext().clear(e), this.getHitCanvas().getContext().clear(e), this; } setZIndex(e) { super.setZIndex(e); var r = this.getStage(); return r && r.content && (r.content.removeChild(this.getNativeCanvasElement()), e < r.children.length - 1 ? r.content.insertBefore(this.getNativeCanvasElement(), r.children[e + 1].getCanvas()._canvas) : r.content.appendChild(this.getNativeCanvasElement())), this; } moveToTop() { de.prototype.moveToTop.call(this); var e = this.getStage(); return e && e.content && (e.content.removeChild(this.getNativeCanvasElement()), e.content.appendChild(this.getNativeCanvasElement())), !0; } moveUp() { var e = de.prototype.moveUp.call(this); if (!e) return !1; var r = this.getStage(); return !r || !r.content ? !1 : (r.content.removeChild(this.getNativeCanvasElement()), this.index < r.children.length - 1 ? r.content.insertBefore(this.getNativeCanvasElement(), r.children[this.index + 1].getCanvas()._canvas) : r.content.appendChild(this.getNativeCanvasElement()), !0); } moveDown() { if (de.prototype.moveDown.call(this)) { var e = this.getStage(); if (e) { var r = e.children; e.content && (e.content.removeChild(this.getNativeCanvasElement()), e.content.insertBefore(this.getNativeCanvasElement(), r[this.index + 1].getCanvas()._canvas)); } return !0; } return !1; } moveToBottom() { if (de.prototype.moveToBottom.call(this)) { var e = this.getStage(); if (e) { var r = e.children; e.content && (e.content.removeChild(this.getNativeCanvasElement()), e.content.insertBefore(this.getNativeCanvasElement(), r[1].getCanvas()._canvas)); } return !0; } return !1; } getLayer() { return this; } remove() { var e = this.getNativeCanvasElement(); return de.prototype.remove.call(this), e && e.parentNode && q._isInDocument(e) && e.parentNode.removeChild(e), this; } getStage() { return this.parent; } setSize({ width: e, height: r }) { return this.canvas.setSize(e, r), this.hitCanvas.setSize(e, r), this._setSmoothEnabled(), this; } _validateAdd(e) { var r = e.getType(); r !== "Group" && r !== "Shape" && q.throw("You may only add groups and shapes to a layer."); } _toKonvaCanvas(e) { return e = e || {}, e.width = e.width || this.getWidth(), e.height = e.height || this.getHeight(), e.x = e.x !== void 0 ? e.x : this.x(), e.y = e.y !== void 0 ? e.y : this.y(), de.prototype._toKonvaCanvas.call(this, e); } _checkVisibility() { this.visible() ? this.canvas._canvas.style.display = "block" : this.canvas._canvas.style.display = "none"; } _setSmoothEnabled() { this.getContext()._context.imageSmoothingEnabled = this.imageSmoothingEnabled(); } getWidth() { if (this.parent) return this.parent.width(); } setWidth() { q.warn('Can not change width of layer. Use "stage.width(value)" function instead.'); } getHeight() { if (this.parent) return this.parent.height(); } setHeight() { q.warn('Can not change height of layer. Use "stage.height(value)" function instead.'); } batchDraw() { return this._waitingForDraw || (this._waitingForDraw = !0, q.requestAnimFrame(() => { this.draw(), this._waitingForDraw = !1; })), this; } getIntersection(e) { if (!this.isListening() || !this.isVisible()) return null; for (var r = 1, n = !1; ; ) { for (let i = 0; i < lD; i++) { const a = Gw[i], s = this._getIntersection({ x: e.x + a.x * r, y: e.y + a.y * r }), u = s.shape; if (u) return u; if (n = !!s.antialiased, !s.antialiased) break; } if (n) r += 1; else return null; } } _getIntersection(e) { const r = this.hitCanvas.pixelRatio, n = this.hitCanvas.context.getImageData(Math.round(e.x * r), Math.round(e.y * r), 1, 1).data, i = n[3]; if (i === 255) { const a = q._rgbToHex(n[0], n[1], n[2]), s = Eu[sD + a]; return s ? { shape: s } : { antialiased: !0 }; } else if (i > 0) return { antialiased: !0 }; return {}; } drawScene(e, r) { var n = this.getLayer(), i = e || n && n.getCanvas(); return this._fire(oD, { node: this }), this.clearBeforeDraw() && i.getContext().clear(), rn.prototype.drawScene.call(this, i, r), this._fire(uD, { node: this }), this; } drawHit(e, r) { var n = this.getLayer(), i = e || n && n.hitCanvas; return n && n.clearBeforeDraw() && n.getHitCanvas().getContext().clear(), rn.prototype.drawHit.call(this, i, r), this; } enableHitGraph() { return this.hitGraphEnabled(!0), this; } disableHitGraph() { return this.hitGraphEnabled(!1), this; } setHitGraphEnabled(e) { q.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."), this.listening(e); } getHitGraphEnabled(e) { return q.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."), this.listening(); } toggleHitCanvas() { if (!(!this.parent || !this.parent.content)) { var e = this.parent, r = !!this.hitCanvas._canvas.parentNode; r ? e.content.removeChild(this.hitCanvas._canvas) : e.content.appendChild(this.hitCanvas._canvas); } } destroy() { return q.releaseCanvas(this.getNativeCanvasElement(), this.getHitCanvas()._canvas), super.destroy(); } } es.prototype.nodeType = "Layer"; Ft(es); M.addGetterSetter(es, "imageSmoothingEnabled", !0); M.addGetterSetter(es, "clearBeforeDraw", !0); M.addGetterSetter(es, "hitGraphEnabled", !0, Yn()); class $g extends es { constructor(e) { super(e), this.listening(!1), q.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.'); } } $g.prototype.nodeType = "FastLayer"; Ft($g); class ao extends rn { _validateAdd(e) { var r = e.getType(); r !== "Group" && r !== "Shape" && q.throw("You may only add groups and shapes to groups."); } } ao.prototype.nodeType = "Group"; Ft(ao); var Jd = function() { return eo.performance && eo.performance.now ? function() { return eo.performance.now(); } : function() { return new Date().getTime(); }; }(); class xn { constructor(e, r) { this.id = xn.animIdCounter++, this.frame = { time: 0, timeDiff: 0, lastTime: Jd(), frameRate: 0 }, this.func = e, this.setLayers(r); } setLayers(e) { var r = []; return e ? e.length > 0 ? r = e : r = [e] : r = [], this.layers = r, this; } getLayers() { return this.layers; } addLayer(e) { var r = this.layers, n = r.length, i; for (i = 0; i < n; i++) if (r[i]._id === e._id) return !1; return this.layers.push(e), !0; } isRunning() { var e = xn, r = e.animations, n = r.length, i; for (i = 0; i < n; i++) if (r[i].id === this.id) return !0; return !1; } start() { return this.stop(), this.frame.timeDiff = 0, this.frame.lastTime = Jd(), xn._addAnimation(this), this; } stop() { return xn._removeAnimation(this), this; } _updateFrameObject(e) { this.frame.timeDiff = e - this.frame.lastTime, this.frame.lastTime = e, this.frame.time += this.frame.timeDiff, this.frame.frameRate = 1e3 / this.frame.timeDiff; } static _addAnimation(e) { this.animations.push(e), this._handleAnimation(); } static _removeAnimation(e) { var r = e.id, n = this.animations, i = n.length, a; for (a = 0; a < i; a++) if (n[a].id === r) { this.animations.splice(a, 1); break; } } static _runFrames() { var e = {}, r = this.animations, n, i, a, s, u, c, f, h, d; for (s = 0; s < r.length; s++) if (n = r[s], i = n.layers, a = n.func, n._updateFrameObject(Jd()), c = i.length, a ? d = a.call(n, n.frame) !== !1 : d = !0, !!d) for (u = 0; u < c; u++) f = i[u], f._id !== void 0 && (e[f._id] = f); for (h in e) e.hasOwnProperty(h) && e[h].batchDraw(); } static _animationLoop() { var e = xn; e.animations.length ? (e._runFrames(), q.requestAnimFrame(e._animationLoop)) : e.animRunning = !1; } static _handleAnimation() { this.animRunning || (this.animRunning = !0, q.requestAnimFrame(this._animationLoop)); } } xn.animations = []; xn.animIdCounter = 0; xn.animRunning = !1; var cD = { node: 1, duration: 1, easing: 1, onFinish: 1, yoyo: 1 }, fD = 1, j1 = 2, V1 = 3, hD = 0, z1 = ["fill", "stroke", "shadowColor"]; class dD { constructor(e, r, n, i, a, s, u) { this.prop = e, this.propFunc = r, this.begin = i, this._pos = i, this.duration = s, this._change = 0, this.prevPos = 0, this.yoyo = u, this._time = 0, this._position = 0, this._startTime = 0, this._finish = 0, this.func = n, this._change = a - this.begin, this.pause(); } fire(e) { var r = this[e]; r && r(); } setTime(e) { e > this.duration ? this.yoyo ? (this._time = this.duration, this.reverse()) : this.finish() : e < 0 ? this.yoyo ? (this._time = 0, this.play()) : this.reset() : (this._time = e, this.update()); } getTime() { return this._time; } setPosition(e) { this.prevPos = this._pos, this.propFunc(e), this._pos = e; } getPosition(e) { return e === void 0 && (e = this._time), this.func(e, this.begin, this._change, this.duration); } play() { this.state = j1, this._startTime = this.getTimer() - this._time, this.onEnterFrame(), this.fire("onPlay"); } reverse() { this.state = V1, this._time = this.duration - this._time, this._startTime = this.getTimer() - this._time, this.onEnterFrame(), this.fire("onReverse"); } seek(e) { this.pause(), this._time = e, this.update(), this.fire("onSeek"); } reset() { this.pause(), this._time = 0, this.update(), this.fire("onReset"); } finish() { this.pause(), this._time = this.duration, this.update(), this.fire("onFinish"); } update() { this.setPosition(this.getPosition(this._time)), this.fire("onUpdate"); } onEnterFrame() { var e = this.getTimer() - this._startTime; this.state === j1 ? this.setTime(e) : this.state === V1 && this.setTime(this.duration - e); } pause() { this.state = fD, this.fire("onPause"); } getTimer() { return new Date().getTime(); } } class qt { constructor(e) { var r = this, n = e.node, i = n._id, a, s = e.easing || Tu.Linear, u = !!e.yoyo, c; typeof e.duration > "u" ? a = 0.3 : e.duration === 0 ? a = 1e-3 : a = e.duration, this.node = n, this._id = hD++; var f = n.getLayer() || (n instanceof be.Stage ? n.getLayers() : null); f || q.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."), this.anim = new xn(function() { r.tween.onEnterFrame(); }, f), this.tween = new dD(c, function(h) { r._tweenFunc(h); }, s, 0, 1, a * 1e3, u), this._addListeners(), qt.attrs[i] || (qt.attrs[i] = {}), qt.attrs[i][this._id] || (qt.attrs[i][this._id] = {}), qt.tweens[i] || (qt.tweens[i] = {}); for (c in e) cD[c] === void 0 && this._addAttr(c, e[c]); this.reset(), this.onFinish = e.onFinish, this.onReset = e.onReset, this.onUpdate = e.onUpdate; } _addAttr(e, r) { var n = this.node, i = n._id, a, s, u, c, f, h, d, g; if (u = qt.tweens[i][e], u && delete qt.attrs[i][u][e], a = n.getAttr(e), q._isArray(r)) if (s = [], f = Math.max(r.length, a.length), e === "points" && r.length !== a.length && (r.length > a.length ? (d = a, a = q._prepareArrayForTween(a, r, n.closed())) : (h = r, r = q._prepareArrayForTween(r, a, n.closed()))), e.indexOf("fill") === 0) for (c = 0; c < f; c++) if (c % 2 === 0) s.push(r[c] - a[c]); else { var v = q.colorToRGBA(a[c]); g = q.colorToRGBA(r[c]), a[c] = v, s.push({ r: g.r - v.r, g: g.g - v.g, b: g.b - v.b, a: g.a - v.a }); } else for (c = 0; c < f; c++) s.push(r[c] - a[c]); else z1.indexOf(e) !== -1 ? (a = q.colorToRGBA(a), g = q.colorToRGBA(r), s = { r: g.r - a.r, g: g.g - a.g, b: g.b - a.b, a: g.a - a.a }) : s = r - a; qt.attrs[i][this._id][e] = { start: a, diff: s, end: r, trueEnd: h, trueStart: d }, qt.tweens[i][e] = this._id; } _tweenFunc(e) { var r = this.node, n = qt.attrs[r._id][this._id], i, a, s, u, c, f, h, d; for (i in n) { if (a = n[i], s = a.start, u = a.diff, d = a.end, q._isArray(s)) if (c = [], h = Math.max(s.length, d.length), i.indexOf("fill") === 0) for (f = 0; f < h; f++) f % 2 === 0 ? c.push((s[f] || 0) + u[f] * e) : c.push("rgba(" + Math.round(s[f].r + u[f].r * e) + "," + Math.round(s[f].g + u[f].g * e) + "," + Math.round(s[f].b + u[f].b * e) + "," + (s[f].a + u[f].a * e) + ")"); else for (f = 0; f < h; f++) c.push((s[f] || 0) + u[f] * e); else z1.indexOf(i) !== -1 ? c = "rgba(" + Math.round(s.r + u.r * e) + "," + Math.round(s.g + u.g * e) + "," + Math.round(s.b + u.b * e) + "," + (s.a + u.a * e) + ")" : c = s + u * e; r.setAttr(i, c); } } _addListeners() { this.tween.onPlay = () => { this.anim.start(); }, this.tween.onReverse = () => { this.anim.start(); }, this.tween.onPause = () => { this.anim.stop(); }, this.tween.onFinish = () => { var e = this.node, r = qt.attrs[e._id][this._id]; r.points && r.points.trueEnd && e.setAttr("points", r.points.trueEnd), this.onFinish && this.onFinish.call(this); }, this.tween.onReset = () => { var e = this.node, r = qt.attrs[e._id][this._id]; r.points && r.points.trueStart && e.points(r.points.trueStart), this.onReset && this.onReset(); }, this.tween.onUpdate = () => { this.onUpdate && this.onUpdate.call(this); }; } play() { return this.tween.play(), this; } reverse() { return this.tween.reverse(), this; } reset() { return this.tween.reset(), this; } seek(e) { return this.tween.seek(e * 1e3), this; } pause() { return this.tween.pause(), this; } finish() { return this.tween.finish(), this; } destroy() { var e = this.node._id, r = this._id, n = qt.tweens[e], i; this.pause(); for (i in n) delete qt.tweens[e][i]; delete qt.attrs[e][r]; } } qt.attrs = {}; qt.tweens = {}; de.prototype.to = function(t) { var e = t.onFinish; t.node = this, t.onFinish = function() { this.destroy(), e && e(); }; var r = new qt(t); r.play(); }; const Tu = { BackEaseIn(t, e, r, n) { var i = 1.70158; return r * (t /= n) * t * ((i + 1) * t - i) + e; }, BackEaseOut(t, e, r, n) { var i = 1.70158; return r * ((t = t / n - 1) * t * ((i + 1) * t + i) + 1) + e; }, BackEaseInOut(t, e, r, n) { var i = 1.70158; return (t /= n / 2) < 1 ? r / 2 * (t * t * (((i *= 1.525) + 1) * t - i)) + e : r / 2 * ((t -= 2) * t * (((i *= 1.525) + 1) * t + i) + 2) + e; }, ElasticEaseIn(t, e, r, n, i, a) { var s = 0; return t === 0 ? e : (t /= n) === 1 ? e + r : (a || (a = n * 0.3), !i || i < Math.abs(r) ? (i = r, s = a / 4) : s = a / (2 * Math.PI) * Math.asin(r / i), -(i * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * n - s) * (2 * Math.PI) / a)) + e); }, ElasticEaseOut(t, e, r, n, i, a) { var s = 0; return t === 0 ? e : (t /= n) === 1 ? e + r : (a || (a = n * 0.3), !i || i < Math.abs(r) ? (i = r, s = a / 4) : s = a / (2 * Math.PI) * Math.asin(r / i), i * Math.pow(2, -10 * t) * Math.sin((t * n - s) * (2 * Math.PI) / a) + r + e); }, ElasticEaseInOut(t, e, r, n, i, a) { var s = 0; return t === 0 ? e : (t /= n / 2) === 2 ? e + r : (a || (a = n * (0.3 * 1.5)), !i || i < Math.abs(r) ? (i = r, s = a / 4) : s = a / (2 * Math.PI) * Math.asin(r / i), t < 1 ? -0.5 * (i * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * n - s) * (2 * Math.PI) / a)) + e : i * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * n - s) * (2 * Math.PI) / a) * 0.5 + r + e); }, BounceEaseOut(t, e, r, n) { return (t /= n) < 1 / 2.75 ? r * (7.5625 * t * t) + e : t < 2 / 2.75 ? r * (7.5625 * (t -= 1.5 / 2.75) * t + 0.75) + e : t < 2.5 / 2.75 ? r * (7.5625 * (t -= 2.25 / 2.75) * t + 0.9375) + e : r * (7.5625 * (t -= 2.625 / 2.75) * t + 0.984375) + e; }, BounceEaseIn(t, e, r, n) { return r - Tu.BounceEaseOut(n - t, 0, r, n) + e; }, BounceEaseInOut(t, e, r, n) { return t < n / 2 ? Tu.BounceEaseIn(t * 2, 0, r, n) * 0.5 + e : Tu.BounceEaseOut(t * 2 - n, 0, r, n) * 0.5 + r * 0.5 + e; }, EaseIn(t, e, r, n) { return r * (t /= n) * t + e; }, EaseOut(t, e, r, n) { return -r * (t /= n) * (t - 2) + e; }, EaseInOut(t, e, r, n) { return (t /= n / 2) < 1 ? r / 2 * t * t + e : -r / 2 * (--t * (t - 2) - 1) + e; }, StrongEaseIn(t, e, r, n) { return r * (t /= n) * t * t * t * t + e; }, StrongEaseOut(t, e, r, n) { return r * ((t = t / n - 1) * t * t * t * t + 1) + e; }, StrongEaseInOut(t, e, r, n) { return (t /= n / 2) < 1 ? r / 2 * t * t * t * t * t + e : r / 2 * ((t -= 2) * t * t * t * t + 2) + e; }, Linear(t, e, r, n) { return r * t / n + e; } }, G1 = q._assign(be, { Util: q, Transform: tn, Node: de, Container: rn, Stage: qf, stages: ef, Layer: es, FastLayer: $g, Group: ao, DD: nt, Shape: ue, shapes: Eu, Animation: xn, Tween: qt, Easings: Tu, Context: Hf, Canvas: Yf }); class Vi extends ue { _sceneFunc(e) { var r = be.getAngle(this.angle()), n = this.clockwise(); e.beginPath(), e.arc(0, 0, this.outerRadius(), 0, r, n), e.arc(0, 0, this.innerRadius(), r, 0, !n), e.closePath(), e.fillStrokeShape(this); } getWidth() { return this.outerRadius() * 2; } getHeight() { return this.outerRadius() * 2; } setWidth(e) { this.outerRadius(e / 2); } setHeight(e) { this.outerRadius(e / 2); } getSelfRect() { const e = this.innerRadius(), r = this.outerRadius(), n = this.clockwise(), i = be.getAngle(n ? 360 - this.angle() : this.angle()), a = Math.cos(Math.min(i, Math.PI)), s = 1, u = Math.sin(Math.min(Math.max(Math.PI, i), 3 * Math.PI / 2)), c = Math.sin(Math.min(i, Math.PI / 2)), f = a * (a > 0 ? e : r), h = s * r, d = u * (u > 0 ? e : r), g = c * (c > 0 ? r : e); return { x: f, y: n ? -1 * g : d, width: h - f, height: g - d }; } } Vi.prototype._centroid = !0; Vi.prototype.className = "Arc"; Vi.prototype._attrsAffectingSize = ["innerRadius", "outerRadius"]; Ft(Vi); M.addGetterSetter(Vi, "innerRadius", 0, ce()); M.addGetterSetter(Vi, "outerRadius", 0, ce()); M.addGetterSetter(Vi, "angle", 0, ce()); M.addGetterSetter(Vi, "clockwise", !1, Yn()); function Yp(t, e, r, n, i, a, s) { var u = Math.sqrt(Math.pow(r - t, 2) + Math.pow(n - e, 2)), c = Math.sqrt(Math.pow(i - r, 2) + Math.pow(a - n, 2)), f = s * u / (u + c), h = s * c / (u + c), d = r - f * (i - t), g = n - f * (a - e), v = r + h * (i - t), m = n + h * (a - e); return [d, g, v, m]; } function W1(t, e) { var r = t.length, n = [], i, a; for (i = 2; i < r - 2; i += 2) a = Yp(t[i - 2], t[i - 1], t[i], t[i + 1], t[i + 2], t[i + 3], e), !isNaN(a[0]) && (n.push(a[0]), n.push(a[1]), n.push(t[i]), n.push(t[i + 1]), n.push(a[2]), n.push(a[3])); return n; } class zi extends ue { constructor(e) { super(e), this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva", function() { this._clearCache("tensionPoints"); }); } _sceneFunc(e) { var r = this.points(), n = r.length, i = this.tension(), a = this.closed(), s = this.bezier(), u, c, f; if (n) { if (e.beginPath(), e.moveTo(r[0], r[1]), i !== 0 && n > 4) { for (u = this.getTensionPoints(), c = u.length, f = a ? 0 : 4, a || e.quadraticCurveTo(u[0], u[1], u[2], u[3]); f < c - 2; ) e.bezierCurveTo(u[f++], u[f++], u[f++], u[f++], u[f++], u[f++]); a || e.quadraticCurveTo(u[c - 2], u[c - 1], r[n - 2], r[n - 1]); } else if (s) for (f = 2; f < n; ) e.bezierCurveTo(r[f++], r[f++], r[f++], r[f++], r[f++], r[f++]); else for (f = 2; f < n; f += 2) e.lineTo(r[f], r[f + 1]); a ? (e.closePath(), e.fillStrokeShape(this)) : e.strokeShape(this); } } getTensionPoints() { return this._getCache("tensionPoints", this._getTensionPoints); } _getTensionPoints() { return this.closed() ? this._getTensionPointsClosed() : W1(this.points(), this.tension()); } _getTensionPointsClosed() { var e = this.points(), r = e.length, n = this.tension(), i = Yp(e[r - 2], e[r - 1], e[0], e[1], e[2], e[3], n), a = Yp(e[r - 4], e[r - 3], e[r - 2], e[r - 1], e[0], e[1], n), s = W1(e, n), u = [i[2], i[3]].concat(s).concat([ a[0], a[1], e[r - 2], e[r - 1], a[2], a[3], i[0], i[1], e[0], e[1] ]); return u; } getWidth() { return this.getSelfRect().width; } getHeight() { return this.getSelfRect().height; } getSelfRect() { var e = this.points(); if (e.length < 4) return { x: e[0] || 0, y: e[1] || 0, width: 0, height: 0 }; this.tension() !== 0 ? e = [ e[0], e[1], ...this._getTensionPoints(), e[e.length - 2], e[e.length - 1] ] : e = this.points(); for (var r = e[0], n = e[0], i = e[1], a = e[1], s, u, c = 0; c < e.length / 2; c++) s = e[c * 2], u = e[c * 2 + 1], r = Math.min(r, s), n = Math.max(n, s), i = Math.min(i, u), a = Math.max(a, u); return { x: r, y: i, width: n - r, height: a - i }; } } zi.prototype.className = "Line"; zi.prototype._attrsAffectingSize = ["points", "bezier", "tension"]; Ft(zi); M.addGetterSetter(zi, "closed", !1); M.addGetterSetter(zi, "bezier", !1); M.addGetterSetter(zi, "tension", 0, ce()); M.addGetterSetter(zi, "points", [], CI()); class xt extends ue { constructor(e) { super(e), this.dataArray = [], this.pathLength = 0, this.dataArray = xt.parsePathData(this.data()), this.pathLength = 0; for (var r = 0; r < this.dataArray.length; ++r) this.pathLength += this.dataArray[r].pathLength; this.on("dataChange.konva", function() { this.dataArray = xt.parsePathData(this.data()), this.pathLength = 0; for (var n = 0; n < this.dataArray.length; ++n) this.pathLength += this.dataArray[n].pathLength; }); } _sceneFunc(e) { var r = this.dataArray; e.beginPath(); for (var n = !1, i = 0; i < r.length; i++) { var a = r[i].command, s = r[i].points; switch (a) { case "L": e.lineTo(s[0], s[1]); break; case "M": e.moveTo(s[0], s[1]); break; case "C": e.bezierCurveTo(s[0], s[1], s[2], s[3], s[4], s[5]); break; case "Q": e.quadraticCurveTo(s[0], s[1], s[2], s[3]); break; case "A": var u = s[0], c = s[1], f = s[2], h = s[3], d = s[4], g = s[5], v = s[6], m = s[7], b = f > h ? f : h, S = f > h ? 1 : f / h, x = f > h ? h / f : 1; e.translate(u, c), e.rotate(v), e.scale(S, x), e.arc(0, 0, b, d, d + g, 1 - m), e.scale(1 / S, 1 / x), e.rotate(-v), e.translate(-u, -c); break; case "z": n = !0, e.closePath(); break; } } !n && !this.hasFill() ? e.strokeShape(this) : e.fillStrokeShape(this); } getSelfRect() { var e = []; this.dataArray.forEach(function(f) { if (f.command === "A") { var h = f.points[4], d = f.points[5], g = f.points[4] + d, v = Math.PI / 180; if (Math.abs(h - g) < v && (v = Math.abs(h - g)), d < 0) for (let m = h - v; m > g; m -= v) { const b = xt.getPointOnEllipticalArc(f.points[0], f.points[1], f.points[2], f.points[3], m, 0); e.push(b.x, b.y); } else for (let m = h + v; m < g; m += v) { const b = xt.getPointOnEllipticalArc(f.points[0], f.points[1], f.points[2], f.points[3], m, 0); e.push(b.x, b.y); } } else if (f.command === "C") for (let m = 0; m <= 1; m += 0.01) { const b = xt.getPointOnCubicBezier(m, f.start.x, f.start.y, f.points[0], f.points[1], f.points[2], f.points[3], f.points[4], f.points[5]); e.push(b.x, b.y); } else e = e.concat(f.points); }); for (var r = e[0], n = e[0], i = e[1], a = e[1], s, u, c = 0; c < e.length / 2; c++) s = e[c * 2], u = e[c * 2 + 1], isNaN(s) || (r = Math.min(r, s), n = Math.max(n, s)), isNaN(u) || (i = Math.min(i, u), a = Math.max(a, u)); return { x: r, y: i, width: n - r, height: a - i }; } getLength() { return this.pathLength; } getPointAtLength(e) { var r, n = 0, i = this.dataArray.length; if (!i) return null; for (; n < i && e > this.dataArray[n].pathLength; ) e -= this.dataArray[n].pathLength, ++n; if (n === i) return r = this.dataArray[n - 1].points.slice(-2), { x: r[0], y: r[1] }; if (e < 0.01) return r = this.dataArray[n].points.slice(0, 2), { x: r[0], y: r[1] }; var a = this.dataArray[n], s = a.points; switch (a.command) { case "L": return xt.getPointOnLine(e, a.start.x, a.start.y, s[0], s[1]); case "C": return xt.getPointOnCubicBezier(e / a.pathLength, a.start.x, a.start.y, s[0], s[1], s[2], s[3], s[4], s[5]); case "Q": return xt.getPointOnQuadraticBezier(e / a.pathLength, a.start.x, a.start.y, s[0], s[1], s[2], s[3]); case "A": var u = s[0], c = s[1], f = s[2], h = s[3], d = s[4], g = s[5], v = s[6]; return d += g * e / a.pathLength, xt.getPointOnEllipticalArc(u, c, f, h, d, v); } return null; } static getLineLength(e, r, n, i) { return Math.sqrt((n - e) * (n - e) + (i - r) * (i - r)); } static getPointOnLine(e, r, n, i, a, s, u) { s === void 0 && (s = r), u === void 0 && (u = n); var c = (a - n) / (i - r + 1e-8), f = Math.sqrt(e * e / (1 + c * c)); i < r && (f *= -1); var h = c * f, d; if (i === r) d = { x: s, y: u + h }; else if ((u - n) / (s - r + 1e-8) === c) d = { x: s + f, y: u + h }; else { var g, v, m = this.getLineLength(r, n, i, a), b = (s - r) * (i - r) + (u - n) * (a - n); b = b / (m * m), g = r + b * (i - r), v = n + b * (a - n); var S = this.getLineLength(s, u, g, v), x = Math.sqrt(e * e - S * S); f = Math.sqrt(x * x / (1 + c * c)), i < r && (f *= -1), h = c * f, d = { x: g + f, y: v + h }; } return d; } static getPointOnCubicBezier(e, r, n, i, a, s, u, c, f) { function h(S) { return S * S * S; } function d(S) { return 3 * S * S * (1 - S); } function g(S) { return 3 * S * (1 - S) * (1 - S); } function v(S) { return (1 - S) * (1 - S) * (1 - S); } var m = c * h(e) + s * d(e) + i * g(e) + r * v(e), b = f * h(e) + u * d(e) + a * g(e) + n * v(e); return { x: m, y: b }; } static getPointOnQuadraticBezier(e, r, n, i, a, s, u) { function c(v) { return v * v; } function f(v) { return 2 * v * (1 - v); } function h(v) { return (1 - v) * (1 - v); } var d = s * c(e) + i * f(e) + r * h(e), g = u * c(e) + a * f(e) + n * h(e); return { x: d, y: g }; } static getPointOnEllipticalArc(e, r, n, i, a, s) { var u = Math.cos(s), c = Math.sin(s), f = { x: n * Math.cos(a), y: i * Math.sin(a) }; return { x: e + (f.x * u - f.y * c), y: r + (f.x * c + f.y * u) }; } static parsePathData(e) { if (!e) return []; var r = e, n = [ "m", "M", "l", "L", "v", "V", "h", "H", "z", "Z", "c", "C", "q", "Q", "t", "T", "s", "S", "a", "A" ]; r = r.replace(new RegExp(" ", "g"), ","); for (var i = 0; i < n.length; i++) r = r.replace(new RegExp(n[i], "g"), "|" + n[i]); var a = r.split("|"), s = [], u = [], c = 0, f = 0, h = /([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi, d; for (i = 1; i < a.length; i++) { var g = a[i], v = g.charAt(0); for (g = g.slice(1), u.length = 0; d = h.exec(g); ) u.push(d[0]); for (var m = [], b = 0, S = u.length; b < S; b++) { if (u[b] === "00") { m.push(0, 0); continue; } var x = parseFloat(u[b]); isNaN(x) ? m.push(0) : m.push(x); } for (; m.length > 0 && !isNaN(m[0]); ) { var w = null, _ = [], P = c, E = f, k, D, V, H, W, K, ie, F, O, N; switch (v) { case "l": c += m.shift(), f += m.shift(), w = "L", _.push(c, f); break; case "L": c = m.shift(), f = m.shift(), _.push(c, f); break; case "m": var j = m.shift(), J = m.shift(); if (c += j, f += J, w = "M", s.length > 2 && s[s.length - 1].command === "z") { for (var te = s.length - 2; te >= 0; te--) if (s[te].command === "M") { c = s[te].points[0] + j, f = s[te].points[1] + J; break; } } _.push(c, f), v = "l"; break; case "M": c = m.shift(), f = m.shift(), w = "M", _.push(c, f), v = "L"; break; case "h": c += m.shift(), w = "L", _.push(c, f); break; case "H": c = m.shift(), w = "L", _.push(c, f); break; case "v": f += m.shift(), w = "L", _.push(c, f); break; case "V": f = m.shift(), w = "L", _.push(c, f); break; case "C": _.push(m.shift(), m.shift(), m.shift(), m.shift()), c = m.shift(), f = m.shift(), _.push(c, f); break; case "c": _.push(c + m.shift(), f + m.shift(), c + m.shift(), f + m.shift()), c += m.shift(), f += m.shift(), w = "C", _.push(c, f); break; case "S": D = c, V = f, k = s[s.length - 1], k.command === "C" && (D = c + (c - k.points[2]), V = f + (f - k.points[3])), _.push(D, V, m.shift(), m.shift()), c = m.shift(), f = m.shift(), w = "C", _.push(c, f); break; case "s": D = c, V = f, k = s[s.length - 1], k.command === "C" && (D = c + (c - k.points[2]), V = f + (f - k.points[3])), _.push(D, V, c + m.shift(), f + m.shift()), c += m.shift(), f += m.shift(), w = "C", _.push(c, f); break; case "Q": _.push(m.shift(), m.shift()), c = m.shift(), f = m.shift(), _.push(c, f); break; case "q": _.push(c + m.shift(), f + m.shift()), c += m.shift(), f += m.shift(), w = "Q", _.push(c, f); break; case "T": D = c, V = f, k = s[s.length - 1], k.command === "Q" && (D = c + (c - k.points[0]), V = f + (f - k.points[1])), c = m.shift(), f = m.shift(), w = "Q", _.push(D, V, c, f); break; case "t": D = c, V = f, k = s[s.length - 1], k.command === "Q" && (D = c + (c - k.points[0]), V = f + (f - k.points[1])), c += m.shift(), f += m.shift(), w = "Q", _.push(D, V, c, f); break; case "A": H = m.shift(), W = m.shift(), K = m.shift(), ie = m.shift(), F = m.shift(), O = c, N = f, c = m.shift(), f = m.shift(), w = "A", _ = this.convertEndpointToCenterParameterization(O, N, c, f, ie, F, H, W, K); break; case "a": H = m.shift(), W = m.shift(), K = m.shift(), ie = m.shift(), F = m.shift(), O = c, N = f, c += m.shift(), f += m.shift(), w = "A", _ = this.convertEndpointToCenterParameterization(O, N, c, f, ie, F, H, W, K); break; } s.push({ command: w || v, points: _, start: { x: P, y: E }, pathLength: this.calcLength(P, E, w || v, _) }); } (v === "z" || v === "Z") && s.push({ command: "z", points: [], start: void 0, pathLength: 0 }); } return s; } static calcLength(e, r, n, i) { var a, s, u, c, f = xt; switch (n) { case "L": return f.getLineLength(e, r, i[0], i[1]); case "C": for (a = 0, s = f.getPointOnCubicBezier(0, e, r, i[0], i[1], i[2], i[3], i[4], i[5]), c = 0.01; c <= 1; c += 0.01) u = f.getPointOnCubicBezier(c, e, r, i[0], i[1], i[2], i[3], i[4], i[5]), a += f.getLineLength(s.x, s.y, u.x, u.y), s = u; return a; case "Q": for (a = 0, s = f.getPointOnQuadraticBezier(0, e, r, i[0], i[1], i[2], i[3]), c = 0.01; c <= 1; c += 0.01) u = f.getPointOnQuadraticBezier(c, e, r, i[0], i[1], i[2], i[3]), a += f.getLineLength(s.x, s.y, u.x, u.y), s = u; return a; case "A": a = 0; var h = i[4], d = i[5], g = i[4] + d, v = Math.PI / 180; if (Math.abs(h - g) < v && (v = Math.abs(h - g)), s = f.getPointOnEllipticalArc(i[0], i[1], i[2], i[3], h, 0), d < 0) for (c = h - v; c > g; c -= v) u = f.getPointOnEllipticalArc(i[0], i[1], i[2], i[3], c, 0), a += f.getLineLength(s.x, s.y, u.x, u.y), s = u; else for (c = h + v; c < g; c += v) u = f.getPointOnEllipticalArc(i[0], i[1], i[2], i[3], c, 0), a += f.getLineLength(s.x, s.y, u.x, u.y), s = u; return u = f.getPointOnEllipticalArc(i[0], i[1], i[2], i[3], g, 0), a += f.getLineLength(s.x, s.y, u.x, u.y), a; } return 0; } static convertEndpointToCenterParameterization(e, r, n, i, a, s, u, c, f) { var h = f * (Math.PI / 180), d = Math.cos(h) * (e - n) / 2 + Math.sin(h) * (r - i) / 2, g = -1 * Math.sin(h) * (e - n) / 2 + Math.cos(h) * (r - i) / 2, v = d * d / (u * u) + g * g / (c * c); v > 1 && (u *= Math.sqrt(v), c *= Math.sqrt(v)); var m = Math.sqrt((u * u * (c * c) - u * u * (g * g) - c * c * (d * d)) / (u * u * (g * g) + c * c * (d * d))); a === s && (m *= -1), isNaN(m) && (m = 0); var b = m * u * g / c, S = m * -c * d / u, x = (e + n) / 2 + Math.cos(h) * b - Math.sin(h) * S, w = (r + i) / 2 + Math.sin(h) * b + Math.cos(h) * S, _ = function(W) { return Math.sqrt(W[0] * W[0] + W[1] * W[1]); }, P = function(W, K) { return (W[0] * K[0] + W[1] * K[1]) / (_(W) * _(K)); }, E = function(W, K) { return (W[0] * K[1] < W[1] * K[0] ? -1 : 1) * Math.acos(P(W, K)); }, k = E([1, 0], [(d - b) / u, (g - S) / c]), D = [(d - b) / u, (g - S) / c], V = [(-1 * d - b) / u, (-1 * g - S) / c], H = E(D, V); return P(D, V) <= -1 && (H = Math.PI), P(D, V) >= 1 && (H = 0), s === 0 && H > 0 && (H = H - 2 * Math.PI), s === 1 && H < 0 && (H = H + 2 * Math.PI), [x, w, u, c, k, H, h, s]; } } xt.prototype.className = "Path"; xt.prototype._attrsAffectingSize = ["data"]; Ft(xt); M.addGetterSetter(xt, "data"); class ts extends zi { _sceneFunc(e) { super._sceneFunc(e); var r = Math.PI * 2, n = this.points(), i = n, a = this.tension() !== 0 && n.length > 4; a && (i = this.getTensionPoints()); var s = this.pointerLength(), u = n.length, c, f; if (a) { const g = [ i[i.length - 4], i[i.length - 3], i[i.length - 2], i[i.length - 1], n[u - 2], n[u - 1] ], v = xt.calcLength(i[i.length - 4], i[i.length - 3], "C", g), m = xt.getPointOnQuadraticBezier(Math.min(1, 1 - s / v), g[0], g[1], g[2], g[3], g[4], g[5]); c = n[u - 2] - m.x, f = n[u - 1] - m.y; } else c = n[u - 2] - n[u - 4], f = n[u - 1] - n[u - 3]; var h = (Math.atan2(f, c) + r) % r, d = this.pointerWidth(); this.pointerAtEnding() && (e.save(), e.beginPath(), e.translate(n[u - 2], n[u - 1]), e.rotate(h), e.moveTo(0, 0), e.lineTo(-s, d / 2), e.lineTo(-s, -d / 2), e.closePath(), e.restore(), this.__fillStroke(e)), this.pointerAtBeginning() && (e.save(), e.beginPath(), e.translate(n[0], n[1]), a ? (c = (i[0] + i[2]) / 2 - n[0], f = (i[1] + i[3]) / 2 - n[1]) : (c = n[2] - n[0], f = n[3] - n[1]), e.rotate((Math.atan2(-f, -c) + r) % r), e.moveTo(0, 0), e.lineTo(-s, d / 2), e.lineTo(-s, -d / 2), e.closePath(), e.restore(), this.__fillStroke(e)); } __fillStroke(e) { var r = this.dashEnabled(); r && (this.attrs.dashEnabled = !1, e.setLineDash([])), e.fillStrokeShape(this), r && (this.attrs.dashEnabled = !0); } getSelfRect() { const e = super.getSelfRect(), r = this.pointerWidth() / 2; return { x: e.x - r, y: e.y - r, width: e.width + r * 2, height: e.height + r * 2 }; } } ts.prototype.className = "Arrow"; Ft(ts); M.addGetterSetter(ts, "pointerLength", 10, ce()); M.addGetterSetter(ts, "pointerWidth", 10, ce()); M.addGetterSetter(ts, "pointerAtBeginning", !1); M.addGetterSetter(ts, "pointerAtEnding", !0); class So extends ue { _sceneFunc(e) { e.beginPath(), e.arc(0, 0, this.attrs.radius || 0, 0, Math.PI * 2, !1), e.closePath(), e.fillStrokeShape(this); } getWidth() { return this.radius() * 2; } getHeight() { return this.radius() * 2; } setWidth(e) { this.radius() !== e / 2 && this.radius(e / 2); } setHeight(e) { this.radius() !== e / 2 && this.radius(e / 2); } } So.prototype._centroid = !0; So.prototype.className = "Circle"; So.prototype._attrsAffectingSize = ["radius"]; Ft(So); M.addGetterSetter(So, "radius", 0, ce()); class Sa extends ue { _sceneFunc(e) { var r = this.radiusX(), n = this.radiusY(); e.beginPath(), e.save(), r !== n && e.scale(1, n / r), e.arc(0, 0, r, 0, Math.PI * 2, !1), e.restore(), e.closePath(), e.fillStrokeShape(this); } getWidth() { return this.radiusX() * 2; } getHeight() { return this.radiusY() * 2; } setWidth(e) { this.radiusX(e / 2); } setHeight(e) { this.radiusY(e / 2); } } Sa.prototype.className = "Ellipse"; Sa.prototype._centroid = !0; Sa.prototype._attrsAffectingSize = ["radiusX", "radiusY"]; Ft(Sa); M.addComponentsGetterSetter(Sa, "radius", ["x", "y"]); M.addGetterSetter(Sa, "radiusX", 0, ce()); M.addGetterSetter(Sa, "radiusY", 0, ce()); let pi = class Ww extends ue { constructor(e) { super(e), this.on("imageChange.konva", () => { this._setImageLoad(); }), this._setImageLoad(); } _setImageLoad() { const e = this.image(); e && e.complete || e && e.readyState === 4 || e && e.addEventListener && e.addEventListener("load", () => { this._requestDraw(); }); } _useBufferCanvas() { return super._useBufferCanvas(!0); } _sceneFunc(e) { const r = this.getWidth(), n = this.getHeight(), i = this.cornerRadius(), a = this.attrs.image; let s; if (a) { const u = this.attrs.cropWidth, c = this.attrs.cropHeight; u && c ? s = [ a, this.cropX(), this.cropY(), u, c, 0, 0, r, n ] : s = [a, 0, 0, r, n]; } (this.hasFill() || this.hasStroke() || i) && (e.beginPath(), i ? q.drawRoundedRectPath(e, r, n, i) : e.rect(0, 0, r, n), e.closePath(), e.fillStrokeShape(this)), a && (i && e.clip(), e.drawImage.apply(e, s)); } _hitFunc(e) { var r = this.width(), n = this.height(), i = this.cornerRadius(); e.beginPath(), i ? q.drawRoundedRectPath(e, r, n, i) : e.rect(0, 0, r, n), e.closePath(), e.fillStrokeShape(this); } getWidth() { var e, r; return (e = this.attrs.width) !== null && e !== void 0 ? e : (r = this.image()) === null || r === void 0 ? void 0 : r.width; } getHeight() { var e, r; return (e = this.attrs.height) !== null && e !== void 0 ? e : (r = this.image()) === null || r === void 0 ? void 0 : r.height; } static fromURL(e, r, n = null) { var i = q.createImageElement(); i.onload = function() { var a = new Ww({ image: i }); r(a); }, i.onerror = n, i.crossOrigin = "Anonymous", i.src = e; } }; pi.prototype.className = "Image"; Ft(pi); M.addGetterSetter(pi, "cornerRadius", 0, Xg(4)); M.addGetterSetter(pi, "image"); M.addComponentsGetterSetter(pi, "crop", ["x", "y", "width", "height"]); M.addGetterSetter(pi, "cropX", 0, ce()); M.addGetterSetter(pi, "cropY", 0, ce()); M.addGetterSetter(pi, "cropWidth", 0, ce()); M.addGetterSetter(pi, "cropHeight", 0, ce()); var Uw = [ "fontFamily", "fontSize", "fontStyle", "padding", "lineHeight", "text", "width", "height", "pointerDirection", "pointerWidth", "pointerHeight" ], pD = "Change.konva", gD = "none", qp = "up", Kp = "right", Xp = "down", Qp = "left", mD = Uw.length; class em extends ao { constructor(e) { super(e), this.on("add.konva", function(r) { this._addListeners(r.child), this._sync(); }); } getText() { return this.find("Text")[0]; } getTag() { return this.find("Tag")[0]; } _addListeners(e) { var r = this, n, i = function() { r._sync(); }; for (n = 0; n < mD; n++) e.on(Uw[n] + pD, i); } getWidth() { return this.getText().width(); } getHeight() { return this.getText().height(); } _sync() { var e = this.getText(), r = this.getTag(), n, i, a, s, u, c, f; if (e && r) { switch (n = e.width(), i = e.height(), a = r.pointerDirection(), s = r.pointerWidth(), f = r.pointerHeight(), u = 0, c = 0, a) { case qp: u = n / 2, c = -1 * f; break; case Kp: u = n + s, c = i / 2; break; case Xp: u = n / 2, c = i + f; break; case Qp: u = -1 * s, c = i / 2; break; } r.setAttrs({ x: -1 * u, y: -1 * c, width: n, height: i }), e.setAttrs({ x: -1 * u, y: -1 * c }); } } } em.prototype.className = "Label"; Ft(em); class rs extends ue { _sceneFunc(e) { var r = this.width(), n = this.height(), i = this.pointerDirection(), a = this.pointerWidth(), s = this.pointerHeight(), u = this.cornerRadius(); let c = 0, f = 0, h = 0, d = 0; typeof u == "number" ? c = f = h = d = Math.min(u, r / 2, n / 2) : (c = Math.min(u[0] || 0, r / 2, n / 2), f = Math.min(u[1] || 0, r / 2, n / 2), d = Math.min(u[2] || 0, r / 2, n / 2), h = Math.min(u[3] || 0, r / 2, n / 2)), e.beginPath(), e.moveTo(c, 0), i === qp && (e.lineTo((r - a) / 2, 0), e.lineTo(r / 2, -1 * s), e.lineTo((r + a) / 2, 0)), e.lineTo(r - f, 0), e.arc(r - f, f, f, Math.PI * 3 / 2, 0, !1), i === Kp && (e.lineTo(r, (n - s) / 2), e.lineTo(r + a, n / 2), e.lineTo(r, (n + s) / 2)), e.lineTo(r, n - d), e.arc(r - d, n - d, d, 0, Math.PI / 2, !1), i === Xp && (e.lineTo((r + a) / 2, n), e.lineTo(r / 2, n + s), e.lineTo((r - a) / 2, n)), e.lineTo(h, n), e.arc(h, n - h, h, Math.PI / 2, Math.PI, !1), i === Qp && (e.lineTo(0, (n + s) / 2), e.lineTo(-1 * a, n / 2), e.lineTo(0, (n - s) / 2)), e.lineTo(0, c), e.arc(c, c, c, Math.PI, Math.PI * 3 / 2, !1), e.closePath(), e.fillStrokeShape(this); } getSelfRect() { var e = 0, r = 0, n = this.pointerWidth(), i = this.pointerHeight(), a = this.pointerDirection(), s = this.width(), u = this.height(); return a === qp ? (r -= i, u += i) : a === Xp ? u += i : a === Qp ? (e -= n * 1.5, s += n) : a === Kp && (s += n * 1.5), { x: e, y: r, width: s, height: u }; } } rs.prototype.className = "Tag"; Ft(rs); M.addGetterSetter(rs, "pointerDirection", gD); M.addGetterSetter(rs, "pointerWidth", 0, ce()); M.addGetterSetter(rs, "pointerHeight", 0, ce()); M.addGetterSetter(rs, "cornerRadius", 0, Xg(4)); class el extends ue { _sceneFunc(e) { var r = this.cornerRadius(), n = this.width(), i = this.height(); e.beginPath(), r ? q.drawRoundedRectPath(e, n, i, r) : e.rect(0, 0, n, i), e.closePath(), e.fillStrokeShape(this); } } el.prototype.className = "Rect"; Ft(el); M.addGetterSetter(el, "cornerRadius", 0, Xg(4)); class ns extends ue { _sceneFunc(e) { const r = this._getPoints(); e.beginPath(), e.moveTo(r[0].x, r[0].y); for (var n = 1; n < r.length; n++) e.lineTo(r[n].x, r[n].y); e.closePath(), e.fillStrokeShape(this); } _getPoints() { const e = this.attrs.sides, r = this.attrs.radius || 0, n = []; for (var i = 0; i < e; i++) n.push({ x: r * Math.sin(i * 2 * Math.PI / e), y: -1 * r * Math.cos(i * 2 * Math.PI / e) }); return n; } getSelfRect() { const e = this._getPoints(); var r = e[0].x, n = e[0].y, i = e[0].x, a = e[0].y; return e.forEach((s) => { r = Math.min(r, s.x), n = Math.max(n, s.x), i = Math.min(i, s.y), a = Math.max(a, s.y); }), { x: r, y: i, width: n - r, height: a - i }; } getWidth() { return this.radius() * 2; } getHeight() { return this.radius() * 2; } setWidth(e) { this.radius(e / 2); } setHeight(e) { this.radius(e / 2); } } ns.prototype.className = "RegularPolygon"; ns.prototype._centroid = !0; ns.prototype._attrsAffectingSize = ["radius"]; Ft(ns); M.addGetterSetter(ns, "radius", 0, ce()); M.addGetterSetter(ns, "sides", 0, ce()); var U1 = Math.PI * 2; class is extends ue { _sceneFunc(e) { e.beginPath(), e.arc(0, 0, this.innerRadius(), 0, U1, !1), e.moveTo(this.outerRadius(), 0), e.arc(0, 0, this.outerRadius(), U1, 0, !0), e.closePath(), e.fillStrokeShape(this); } getWidth() { return this.outerRadius() * 2; } getHeight() { return this.outerRadius() * 2; } setWidth(e) { this.outerRadius(e / 2); } setHeight(e) { this.outerRadius(e / 2); } } is.prototype.className = "Ring"; is.prototype._centroid = !0; is.prototype._attrsAffectingSize = ["innerRadius", "outerRadius"]; Ft(is); M.addGetterSetter(is, "innerRadius", 0, ce()); M.addGetterSetter(is, "outerRadius", 0, ce()); class gi extends ue { constructor(e) { super(e), this._updated = !0, this.anim = new xn(() => { var r = this._updated; return this._updated = !1, r; }), this.on("animationChange.konva", function() { this.frameIndex(0); }), this.on("frameIndexChange.konva", function() { this._updated = !0; }), this.on("frameRateChange.konva", function() { this.anim.isRunning() && (clearInterval(this.interval), this._setInterval()); }); } _sceneFunc(e) { var r = this.animation(), n = this.frameIndex(), i = n * 4, a = this.animations()[r], s = this.frameOffsets(), u = a[i + 0], c = a[i + 1], f = a[i + 2], h = a[i + 3], d = this.image(); if ((this.hasFill() || this.hasStroke()) && (e.beginPath(), e.rect(0, 0, f, h), e.closePath(), e.fillStrokeShape(this)), d) if (s) { var g = s[r], v = n * 2; e.drawImage(d, u, c, f, h, g[v + 0], g[v + 1], f, h); } else e.drawImage(d, u, c, f, h, 0, 0, f, h); } _hitFunc(e) { var r = this.animation(), n = this.frameIndex(), i = n * 4, a = this.animations()[r], s = this.frameOffsets(), u = a[i + 2], c = a[i + 3]; if (e.beginPath(), s) { var f = s[r], h = n * 2; e.rect(f[h + 0], f[h + 1], u, c); } else e.rect(0, 0, u, c); e.closePath(), e.fillShape(this); } _useBufferCanvas() { return super._useBufferCanvas(!0); } _setInterval() { var e = this; this.interval = setInterval(function() { e._updateIndex(); }, 1e3 / this.frameRate()); } start() { if (!this.isRunning()) { var e = this.getLayer(); this.anim.setLayers(e), this._setInterval(), this.anim.start(); } } stop() { this.anim.stop(), clearInterval(this.interval); } isRunning() { return this.anim.isRunning(); } _updateIndex() { var e = this.frameIndex(), r = this.animation(), n = this.animations(), i = n[r], a = i.length / 4; e < a - 1 ? this.frameIndex(e + 1) : this.frameIndex(0); } } gi.prototype.className = "Sprite"; Ft(gi); M.addGetterSetter(gi, "animation"); M.addGetterSetter(gi, "animations"); M.addGetterSetter(gi, "frameOffsets"); M.addGetterSetter(gi, "image"); M.addGetterSetter(gi, "frameIndex", 0, ce()); M.addGetterSetter(gi, "frameRate", 17, ce()); M.backCompat(gi, { index: "frameIndex", getIndex: "getFrameIndex", setIndex: "setFrameIndex" }); class wa extends ue { _sceneFunc(e) { var r = this.innerRadius(), n = this.outerRadius(), i = this.numPoints(); e.beginPath(), e.moveTo(0, 0 - n); for (var a = 1; a < i * 2; a++) { var s = a % 2 === 0 ? n : r, u = s * Math.sin(a * Math.PI / i), c = -1 * s * Math.cos(a * Math.PI / i); e.lineTo(u, c); } e.closePath(), e.fillStrokeShape(this); } getWidth() { return this.outerRadius() * 2; } getHeight() { return this.outerRadius() * 2; } setWidth(e) { this.outerRadius(e / 2); } setHeight(e) { this.outerRadius(e / 2); } } wa.prototype.className = "Star"; wa.prototype._centroid = !0; wa.prototype._attrsAffectingSize = ["innerRadius", "outerRadius"]; Ft(wa); M.addGetterSetter(wa, "numPoints", 5, ce()); M.addGetterSetter(wa, "innerRadius", 0, ce()); M.addGetterSetter(wa, "outerRadius", 0, ce()); function Hw(t) { return Array.from(t); } var Ws = "auto", vD = "center", ou = "justify", yD = "Change.konva", bD = "2d", H1 = "-", Yw = "left", SD = "text", wD = "Text", xD = "top", CD = "bottom", Y1 = "middle", qw = "normal", _D = "px ", Ic = " ", PD = "right", ED = "word", TD = "char", q1 = "none", Zd = "…", Kw = [ "fontFamily", "fontSize", "fontStyle", "fontVariant", "padding", "align", "verticalAlign", "lineHeight", "text", "width", "height", "wrap", "ellipsis", "letterSpacing" ], AD = Kw.length; function OD(t) { return t.split(",").map((e) => { e = e.trim(); const r = e.indexOf(" ") >= 0, n = e.indexOf('"') >= 0 || e.indexOf("'") >= 0; return r && !n && (e = `"${e}"`), e; }).join(", "); } var Dc; function $d() { return Dc || (Dc = q.createCanvasElement().getContext(bD), Dc); } function RD(t) { t.fillText(this._partialText, this._partialTextX, this._partialTextY); } function kD(t) { t.strokeText(this._partialText, this._partialTextX, this._partialTextY); } function ID(t) { return t = t || {}, !t.fillLinearGradientColorStops && !t.fillRadialGradientColorStops && !t.fillPatternImage && (t.fill = t.fill || "black"), t; } let Bt = class extends ue { constructor(e) { super(ID(e)), this._partialTextX = 0, this._partialTextY = 0; for (var r = 0; r < AD; r++) this.on(Kw[r] + yD, this._setTextData); this._setTextData(); } _sceneFunc(e) { var r = this.textArr, n = r.length; if (this.text()) { var i = this.padding(), a = this.fontSize(), s = this.lineHeight() * a, u = this.verticalAlign(), c = 0, f = this.align(), h = this.getWidth(), d = this.letterSpacing(), g = this.fill(), v = this.textDecoration(), m = v.indexOf("underline") !== -1, b = v.indexOf("line-through") !== -1, S, x = 0, x = s / 2, w = 0, _ = 0; for (e.setAttr("font", this._getContextFont()), e.setAttr("textBaseline", Y1), e.setAttr("textAlign", Yw), u === Y1 ? c = (this.getHeight() - n * s - i * 2) / 2 : u === CD && (c = this.getHeight() - n * s - i * 2), e.translate(i, c + i), S = 0; S < n; S++) { var w = 0, _ = 0, P = r[S], E = P.text, k = P.width, D = P.lastInParagraph, V, H, W; if (e.save(), f === PD ? w += h - k - i * 2 : f === vD && (w += (h - k - i * 2) / 2), m) { e.save(), e.beginPath(), e.moveTo(w, x + _ + Math.round(a / 2)), V = E.split(" ").length - 1, H = V === 0, W = f === ou && !D ? h - i * 2 : k, e.lineTo(w + Math.round(W), x + _ + Math.round(a / 2)), e.lineWidth = a / 15; const j = this._getLinearGradient(); e.strokeStyle = j || g, e.stroke(), e.restore(); } if (b) { e.save(), e.beginPath(), e.moveTo(w, x + _), V = E.split(" ").length - 1, H = V === 0, W = f === ou && D && !H ? h - i * 2 : k, e.lineTo(w + Math.round(W), x + _), e.lineWidth = a / 15; const j = this._getLinearGradient(); e.strokeStyle = j || g, e.stroke(), e.restore(); } if (d !== 0 || f === ou) { V = E.split(" ").length - 1; for (var K = Hw(E), ie = 0; ie < K.length; ie++) { var F = K[ie]; F === " " && !D && f === ou && (w += (h - i * 2 - k) / V), this._partialTextX = w, this._partialTextY = x + _, this._partialText = F, e.fillStrokeShape(this), w += this.measureSize(F).width + d; } } else this._partialTextX = w, this._partialTextY = x + _, this._partialText = E, e.fillStrokeShape(this); e.restore(), n > 1 && (x += s); } } } _hitFunc(e) { var r = this.getWidth(), n = this.getHeight(); e.beginPath(), e.rect(0, 0, r, n), e.closePath(), e.fillStrokeShape(this); } setText(e) { var r = q._isString(e) ? e : e == null ? "" : e + ""; return this._setAttr(SD, r), this; } getWidth() { var e = this.attrs.width === Ws || this.attrs.width === void 0; return e ? this.getTextWidth() + this.padding() * 2 : this.attrs.width; } getHeight() { var e = this.attrs.height === Ws || this.attrs.height === void 0; return e ? this.fontSize() * this.textArr.length * this.lineHeight() + this.padding() * 2 : this.attrs.height; } getTextWidth() { return this.textWidth; } getTextHeight() { return q.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."), this.textHeight; } measureSize(e) { var r = $d(), n = this.fontSize(), i; return r.save(), r.font = this._getContextFont(), i = r.measureText(e), r.restore(), { width: i.width, height: n }; } _getContextFont() { return this.fontStyle() + Ic + this.fontVariant() + Ic + (this.fontSize() + _D) + OD(this.fontFamily()); } _addTextLine(e) { this.align() === ou && (e = e.trim()); var n = this._getTextWidth(e); return this.textArr.push({ text: e, width: n, lastInParagraph: !1 }); } _getTextWidth(e) { var r = this.letterSpacing(), n = e.length; return $d().measureText(e).width + (n ? r * (n - 1) : 0); } _setTextData() { var e = this.text().split(` `), r = +this.fontSize(), n = 0, i = this.lineHeight() * r, a = this.attrs.width, s = this.attrs.height, u = a !== Ws && a !== void 0, c = s !== Ws && s !== void 0, f = this.padding(), h = a - f * 2, d = s - f * 2, g = 0, v = this.wrap(), m = v !== q1, b = v !== TD && m, S = this.ellipsis(); this.textArr = [], $d().font = this._getContextFont(); for (var x = S ? this._getTextWidth(Zd) : 0, w = 0, _ = e.length; w < _; ++w) { var P = e[w], E = this._getTextWidth(P); if (u && E > h) for (; P.length > 0; ) { for (var k = 0, D = P.length, V = "", H = 0; k < D; ) { var W = k + D >>> 1, K = P.slice(0, W + 1), ie = this._getTextWidth(K) + x; ie <= h ? (k = W + 1, V = K, H = ie) : D = W; } if (V) { if (b) { var F, O = P[V.length], N = O === Ic || O === H1; N && H <= h ? F = V.length : F = Math.max(V.lastIndexOf(Ic), V.lastIndexOf(H1)) + 1, F > 0 && (k = F, V = V.slice(0, k), H = this._getTextWidth(V)); } V = V.trimRight(), this._addTextLine(V), n = Math.max(n, H), g += i; var j = this._shouldHandleEllipsis(g); if (j) { this._tryToAddEllipsisToLastLine(); break; } if (P = P.slice(k), P = P.trimLeft(), P.length > 0 && (E = this._getTextWidth(P), E <= h)) { this._addTextLine(P), g += i, n = Math.max(n, E); break; } } else break; } else this._addTextLine(P), g += i, n = Math.max(n, E), this._shouldHandleEllipsis(g) && w < _ - 1 && this._tryToAddEllipsisToLastLine(); if (this.textArr[this.textArr.length - 1] && (this.textArr[this.textArr.length - 1].lastInParagraph = !0), c && g + i > d) break; } this.textHeight = r, this.textWidth = n; } _shouldHandleEllipsis(e) { var r = +this.fontSize(), n = this.lineHeight() * r, i = this.attrs.height, a = i !== Ws && i !== void 0, s = this.padding(), u = i - s * 2, c = this.wrap(), f = c !== q1; return !f || a && e + n > u; } _tryToAddEllipsisToLastLine() { var e = this.attrs.width, r = e !== Ws && e !== void 0, n = this.padding(), i = e - n * 2, a = this.ellipsis(), s = this.textArr[this.textArr.length - 1]; if (!(!s || !a)) { if (r) { var u = this._getTextWidth(s.text + Zd) < i; u || (s.text = s.text.slice(0, s.text.length - 3)); } this.textArr.splice(this.textArr.length - 1, 1), this._addTextLine(s.text + Zd); } } getStrokeScaleEnabled() { return !0; } }; Bt.prototype._fillFunc = RD; Bt.prototype._strokeFunc = kD; Bt.prototype.className = wD; Bt.prototype._attrsAffectingSize = [ "text", "fontSize", "padding", "wrap", "lineHeight", "letterSpacing" ]; Ft(Bt); M.overWriteSetter(Bt, "width", Qg()); M.overWriteSetter(Bt, "height", Qg()); M.addGetterSetter(Bt, "fontFamily", "Arial"); M.addGetterSetter(Bt, "fontSize", 12, ce()); M.addGetterSetter(Bt, "fontStyle", qw); M.addGetterSetter(Bt, "fontVariant", qw); M.addGetterSetter(Bt, "padding", 0, ce()); M.addGetterSetter(Bt, "align", Yw); M.addGetterSetter(Bt, "verticalAlign", xD); M.addGetterSetter(Bt, "lineHeight", 1, ce()); M.addGetterSetter(Bt, "wrap", ED); M.addGetterSetter(Bt, "ellipsis", !1, Yn()); M.addGetterSetter(Bt, "letterSpacing", 0, ce()); M.addGetterSetter(Bt, "text", "", bo()); M.addGetterSetter(Bt, "textDecoration", ""); var DD = "", Xw = "normal"; function Qw(t) { t.fillText(this.partialText, 0, 0); } function Jw(t) { t.strokeText(this.partialText, 0, 0); } class ir extends ue { constructor(e) { super(e), this.dummyCanvas = q.createCanvasElement(), this.dataArray = [], this.dataArray = xt.parsePathData(this.attrs.data), this.on("dataChange.konva", function() { this.dataArray = xt.parsePathData(this.attrs.data), this._setTextData(); }), this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva", this._setTextData), this._setTextData(); } _sceneFunc(e) { e.setAttr("font", this._getContextFont()), e.setAttr("textBaseline", this.textBaseline()), e.setAttr("textAlign", "left"), e.save(); var r = this.textDecoration(), n = this.fill(), i = this.fontSize(), a = this.glyphInfo; r === "underline" && e.beginPath(); for (var s = 0; s < a.length; s++) { e.save(); var u = a[s].p0; e.translate(u.x, u.y), e.rotate(a[s].rotation), this.partialText = a[s].text, e.fillStrokeShape(this), r === "underline" && (s === 0 && e.moveTo(0, i / 2 + 1), e.lineTo(i, i / 2 + 1)), e.restore(); } r === "underline" && (e.strokeStyle = n, e.lineWidth = i / 20, e.stroke()), e.restore(); } _hitFunc(e) { e.beginPath(); var r = this.glyphInfo; if (r.length >= 1) { var n = r[0].p0; e.moveTo(n.x, n.y); } for (var i = 0; i < r.length; i++) { var a = r[i].p1; e.lineTo(a.x, a.y); } e.setAttr("lineWidth", this.fontSize()), e.setAttr("strokeStyle", this.colorKey), e.stroke(); } getTextWidth() { return this.textWidth; } getTextHeight() { return q.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."), this.textHeight; } setText(e) { return Bt.prototype.setText.call(this, e); } _getContextFont() { return Bt.prototype._getContextFont.call(this); } _getTextSize(e) { var r = this.dummyCanvas, n = r.getContext("2d"); n.save(), n.font = this._getContextFont(); var i = n.measureText(e); return n.restore(), { width: i.width, height: parseInt(this.attrs.fontSize, 10) }; } _setTextData() { var e = this, r = this._getTextSize(this.attrs.text), n = this.letterSpacing(), i = this.align(), a = this.kerningFunc(); this.textWidth = r.width, this.textHeight = r.height; var s = Math.max(this.textWidth + ((this.attrs.text || "").length - 1) * n, 0); this.glyphInfo = []; for (var u = 0, c = 0; c < e.dataArray.length; c++) e.dataArray[c].pathLength > 0 && (u += e.dataArray[c].pathLength); var f = 0; i === "center" && (f = Math.max(0, u / 2 - s / 2)), i === "right" && (f = Math.max(0, u - s)); for (var h = Hw(this.text()), d = this.text().split(" ").length - 1, g, v, m, b = -1, S = 0, x = function() { S = 0; for (var ie = e.dataArray, F = b + 1; F < ie.length; F++) { if (ie[F].pathLength > 0) return b = F, ie[F]; ie[F].command === "M" && (g = { x: ie[F].points[0], y: ie[F].points[1] }); } return {}; }, w = function(ie) { var F = e._getTextSize(ie).width + n; ie === " " && i === "justify" && (F += (u - s) / d); var O = 0, N = 0; for (v = void 0; Math.abs(F - O) / F > 0.01 && N < 20; ) { N++; for (var j = O; m === void 0; ) m = x(), m && j + m.pathLength < F && (j += m.pathLength, m = void 0); if (Object.keys(m).length === 0 || g === void 0) return; var J = !1; switch (m.command) { case "L": xt.getLineLength(g.x, g.y, m.points[0], m.points[1]) > F ? v = xt.getPointOnLine(F, g.x, g.y, m.points[0], m.points[1], g.x, g.y) : m = void 0; break; case "A": var te = m.points[4], ee = m.points[5], ae = m.points[4] + ee; S === 0 ? S = te + 1e-8 : F > O ? S += Math.PI / 180 * ee / Math.abs(ee) : S -= Math.PI / 360 * ee / Math.abs(ee), (ee < 0 && S < ae || ee >= 0 && S > ae) && (S = ae, J = !0), v = xt.getPointOnEllipticalArc(m.points[0], m.points[1], m.points[2], m.points[3], S, m.points[6]); break; case "C": S === 0 ? F > m.pathLength ? S = 1e-8 : S = F / m.pathLength : F > O ? S += (F - O) / m.pathLength / 2 : S = Math.max(S - (O - F) / m.pathLength / 2, 0), S > 1 && (S = 1, J = !0), v = xt.getPointOnCubicBezier(S, m.start.x, m.start.y, m.points[0], m.points[1], m.points[2], m.points[3], m.points[4], m.points[5]); break; case "Q": S === 0 ? S = F / m.pathLength : F > O ? S += (F - O) / m.pathLength : S -= (O - F) / m.pathLength, S > 1 && (S = 1, J = !0), v = xt.getPointOnQuadraticBezier(S, m.start.x, m.start.y, m.points[0], m.points[1], m.points[2], m.points[3]); break; } v !== void 0 && (O = xt.getLineLength(g.x, g.y, v.x, v.y)), J && (J = !1, m = void 0); } }, _ = "C", P = e._getTextSize(_).width + n, E = f / P - 1, k = 0; k < E && (w(_), !(g === void 0 || v === void 0)); k++) g = v; for (var D = 0; D < h.length && (w(h[D]), !(g === void 0 || v === void 0)); D++) { var V = xt.getLineLength(g.x, g.y, v.x, v.y), H = 0; if (a) try { H = a(h[D - 1], h[D]) * this.fontSize(); } catch { H = 0; } g.x += H, v.x += H, this.textWidth += H; var W = xt.getPointOnLine(H + V / 2, g.x, g.y, v.x, v.y), K = Math.atan2(v.y - g.y, v.x - g.x); this.glyphInfo.push({ transposeX: W.x, transposeY: W.y, text: h[D], rotation: K, p0: g, p1: v }), g = v; } } getSelfRect() { if (!this.glyphInfo.length) return { x: 0, y: 0, width: 0, height: 0 }; var e = []; this.glyphInfo.forEach(function(h) { e.push(h.p0.x), e.push(h.p0.y), e.push(h.p1.x), e.push(h.p1.y); }); for (var r = e[0] || 0, n = e[0] || 0, i = e[1] || 0, a = e[1] || 0, s, u, c = 0; c < e.length / 2; c++) s = e[c * 2], u = e[c * 2 + 1], r = Math.min(r, s), n = Math.max(n, s), i = Math.min(i, u), a = Math.max(a, u); var f = this.fontSize(); return { x: r - f / 2, y: i - f / 2, width: n - r + f, height: a - i + f }; } destroy() { return q.releaseCanvas(this.dummyCanvas), super.destroy(); } } ir.prototype._fillFunc = Qw; ir.prototype._strokeFunc = Jw; ir.prototype._fillFuncHit = Qw; ir.prototype._strokeFuncHit = Jw; ir.prototype.className = "TextPath"; ir.prototype._attrsAffectingSize = ["text", "fontSize", "data"]; Ft(ir); M.addGetterSetter(ir, "data"); M.addGetterSetter(ir, "fontFamily", "Arial"); M.addGetterSetter(ir, "fontSize", 12, ce()); M.addGetterSetter(ir, "fontStyle", Xw); M.addGetterSetter(ir, "align", "left"); M.addGetterSetter(ir, "letterSpacing", 0, ce()); M.addGetterSetter(ir, "textBaseline", "middle"); M.addGetterSetter(ir, "fontVariant", Xw); M.addGetterSetter(ir, "text", DD); M.addGetterSetter(ir, "textDecoration", null); M.addGetterSetter(ir, "kerningFunc", null); var Zw = "tr-konva", MD = [ "resizeEnabledChange", "rotateAnchorOffsetChange", "rotateEnabledChange", "enabledAnchorsChange", "anchorSizeChange", "borderEnabledChange", "borderStrokeChange", "borderStrokeWidthChange", "borderDashChange", "anchorStrokeChange", "anchorStrokeWidthChange", "anchorFillChange", "anchorCornerRadiusChange", "ignoreStrokeChange" ].map((t) => t + `.${Zw}`).join(" "), K1 = "nodesRect", LD = [ "widthChange", "heightChange", "scaleXChange", "scaleYChange", "skewXChange", "skewYChange", "rotationChange", "offsetXChange", "offsetYChange", "transformsEnabledChange", "strokeWidthChange" ], ND = { "top-left": -45, "top-center": 0, "top-right": 45, "middle-right": -90, "middle-left": 90, "bottom-left": -135, "bottom-center": 180, "bottom-right": 135 }; const BD = "ontouchstart" in be._global; function FD(t, e) { if (t === "rotater") return "crosshair"; e += q.degToRad(ND[t] || 0); var r = (q.radToDeg(e) % 360 + 360) % 360; return q._inRange(r, 315 + 22.5, 360) || q._inRange(r, 0, 22.5) ? "ns-resize" : q._inRange(r, 45 - 22.5, 45 + 22.5) ? "nesw-resize" : q._inRange(r, 90 - 22.5, 90 + 22.5) ? "ew-resize" : q._inRange(r, 135 - 22.5, 135 + 22.5) ? "nwse-resize" : q._inRange(r, 180 - 22.5, 180 + 22.5) ? "ns-resize" : q._inRange(r, 225 - 22.5, 225 + 22.5) ? "nesw-resize" : q._inRange(r, 270 - 22.5, 270 + 22.5) ? "ew-resize" : q._inRange(r, 315 - 22.5, 315 + 22.5) ? "nwse-resize" : (q.error("Transformer has unknown angle for cursor detection: " + r), "pointer"); } var wf = [ "top-left", "top-center", "top-right", "middle-right", "middle-left", "bottom-left", "bottom-center", "bottom-right" ], X1 = 1e8; function jD(t) { return { x: t.x + t.width / 2 * Math.cos(t.rotation) + t.height / 2 * Math.sin(-t.rotation), y: t.y + t.height / 2 * Math.cos(t.rotation) + t.width / 2 * Math.sin(t.rotation) }; } function $w(t, e, r) { const n = r.x + (t.x - r.x) * Math.cos(e) - (t.y - r.y) * Math.sin(e), i = r.y + (t.x - r.x) * Math.sin(e) + (t.y - r.y) * Math.cos(e); return Object.assign(Object.assign({}, t), { rotation: t.rotation + e, x: n, y: i }); } function VD(t, e) { const r = jD(t); return $w(t, e, r); } function zD(t, e, r) { let n = e; for (let i = 0; i < t.length; i++) { const a = be.getAngle(t[i]), s = Math.abs(a - e) % (Math.PI * 2); Math.min(s, Math.PI * 2 - s) < r && (n = a); } return n; } class gt extends ao { constructor(e) { super(e), this._transforming = !1, this._createElements(), this._handleMouseMove = this._handleMouseMove.bind(this), this._handleMouseUp = this._handleMouseUp.bind(this), this.update = this.update.bind(this), this.on(MD, this.update), this.getNode() && this.update(); } attachTo(e) { return this.setNode(e), this; } setNode(e) { return q.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."), this.setNodes([e]); } getNode() { return this._nodes && this._nodes[0]; } _getEventNamespace() { return Zw + this._id; } setNodes(e = []) { this._nodes && this._nodes.length && this.detach(), this._nodes = e, e.length === 1 && this.useSingleNodeRotation() ? this.rotation(e[0].getAbsoluteRotation()) : this.rotation(0), this._nodes.forEach((n) => { const i = () => { this.nodes().length === 1 && this.useSingleNodeRotation() && this.rotation(this.nodes()[0].getAbsoluteRotation()), this._resetTransformCache(), !this._transforming && !this.isDragging() && this.update(); }, a = n._attrsAffectingSize.map((s) => s + "Change." + this._getEventNamespace()).join(" "); n.on(a, i), n.on(LD.map((s) => s + `.${this._getEventNamespace()}`).join(" "), i), n.on(`absoluteTransformChange.${this._getEventNamespace()}`, i), this._proxyDrag(n); }), this._resetTransformCache(); var r = !!this.findOne(".top-left"); return r && this.update(), this; } _proxyDrag(e) { let r; e.on(`dragstart.${this._getEventNamespace()}`, (n) => { r = e.getAbsolutePosition(), !this.isDragging() && e !== this.findOne(".back") && this.startDrag(n, !1); }), e.on(`dragmove.${this._getEventNamespace()}`, (n) => { if (!r) return; const i = e.getAbsolutePosition(), a = i.x - r.x, s = i.y - r.y; this.nodes().forEach((u) => { if (u === e || u.isDragging()) return; const c = u.getAbsolutePosition(); u.setAbsolutePosition({ x: c.x + a, y: c.y + s }), u.startDrag(n); }), r = null; }); } getNodes() { return this._nodes || []; } getActiveAnchor() { return this._movingAnchorName; } detach() { this._nodes && this._nodes.forEach((e) => { e.off("." + this._getEventNamespace()); }), this._nodes = [], this._resetTransformCache(); } _resetTransformCache() { this._clearCache(K1), this._clearCache("transform"), this._clearSelfAndDescendantCache("absoluteTransform"); } _getNodeRect() { return this._getCache(K1, this.__getNodeRect); } __getNodeShape(e, r = this.rotation(), n) { var i = e.getClientRect({ skipTransform: !0, skipShadow: !0, skipStroke: this.ignoreStroke() }), a = e.getAbsoluteScale(n), s = e.getAbsolutePosition(n), u = i.x * a.x - e.offsetX() * a.x, c = i.y * a.y - e.offsetY() * a.y; const f = (be.getAngle(e.getAbsoluteRotation()) + Math.PI * 2) % (Math.PI * 2), h = { x: s.x + u * Math.cos(f) + c * Math.sin(-f), y: s.y + c * Math.cos(f) + u * Math.sin(f), width: i.width * a.x, height: i.height * a.y, rotation: f }; return $w(h, -be.getAngle(r), { x: 0, y: 0 }); } __getNodeRect() { var e = this.getNode(); if (!e) return { x: -X1, y: -X1, width: 0, height: 0, rotation: 0 }; const r = []; this.nodes().map((f) => { const h = f.getClientRect({ skipTransform: !0, skipShadow: !0, skipStroke: this.ignoreStroke() }); var d = [ { x: h.x, y: h.y }, { x: h.x + h.width, y: h.y }, { x: h.x + h.width, y: h.y + h.height }, { x: h.x, y: h.y + h.height } ], g = f.getAbsoluteTransform(); d.forEach(function(v) { var m = g.point(v); r.push(m); }); }); const n = new tn(); n.rotate(-be.getAngle(this.rotation())); var i, a, s, u; r.forEach(function(f) { var h = n.point(f); i === void 0 && (i = s = h.x, a = u = h.y), i = Math.min(i, h.x), a = Math.min(a, h.y), s = Math.max(s, h.x), u = Math.max(u, h.y); }), n.invert(); const c = n.point({ x: i, y: a }); return { x: c.x, y: c.y, width: s - i, height: u - a, rotation: be.getAngle(this.rotation()) }; } getX() { return this._getNodeRect().x; } getY() { return this._getNodeRect().y; } getWidth() { return this._getNodeRect().width; } getHeight() { return this._getNodeRect().height; } _createElements() { this._createBack(), wf.forEach(function(e) { this._createAnchor(e); }.bind(this)), this._createAnchor("rotater"); } _createAnchor(e) { var r = new el({ stroke: "rgb(0, 161, 255)", fill: "white", strokeWidth: 1, name: e + " _anchor", dragDistance: 0, draggable: !0, hitStrokeWidth: BD ? 10 : "auto" }), n = this; r.on("mousedown touchstart", function(i) { n._handleMouseDown(i); }), r.on("dragstart", (i) => { r.stopDrag(), i.cancelBubble = !0; }), r.on("dragend", (i) => { i.cancelBubble = !0; }), r.on("mouseenter", () => { var i = be.getAngle(this.rotation()), a = FD(e, i); r.getStage().content && (r.getStage().content.style.cursor = a), this._cursorChange = !0; }), r.on("mouseout", () => { r.getStage().content && (r.getStage().content.style.cursor = ""), this._cursorChange = !1; }), this.add(r); } _createBack() { var e = new ue({ name: "back", width: 0, height: 0, draggable: !0, sceneFunc(r) { var n = this.getParent(), i = n.padding(); r.beginPath(), r.rect(-i, -i, this.width() + i * 2, this.height() + i * 2), r.moveTo(this.width() / 2, -i), n.rotateEnabled() && r.lineTo(this.width() / 2, -n.rotateAnchorOffset() * q._sign(this.height()) - i), r.fillStrokeShape(this); }, hitFunc: (r, n) => { if (this.shouldOverdrawWholeArea()) { var i = this.padding(); r.beginPath(), r.rect(-i, -i, n.width() + i * 2, n.height() + i * 2), r.fillStrokeShape(n); } } }); this.add(e), this._proxyDrag(e), e.on("dragstart", (r) => { r.cancelBubble = !0; }), e.on("dragmove", (r) => { r.cancelBubble = !0; }), e.on("dragend", (r) => { r.cancelBubble = !0; }), this.on("dragmove", (r) => { this.update(); }); } _handleMouseDown(e) { this._movingAnchorName = e.target.name().split(" ")[0]; var r = this._getNodeRect(), n = r.width, i = r.height, a = Math.sqrt(Math.pow(n, 2) + Math.pow(i, 2)); this.sin = Math.abs(i / a), this.cos = Math.abs(n / a), typeof window < "u" && (window.addEventListener("mousemove", this._handleMouseMove), window.addEventListener("touchmove", this._handleMouseMove), window.addEventListener("mouseup", this._handleMouseUp, !0), window.addEventListener("touchend", this._handleMouseUp, !0)), this._transforming = !0; var s = e.target.getAbsolutePosition(), u = e.target.getStage().getPointerPosition(); this._anchorDragOffset = { x: u.x - s.x, y: u.y - s.y }, this._fire("transformstart", { evt: e.evt, target: this.getNode() }), this._nodes.forEach((c) => { c._fire("transformstart", { evt: e.evt, target: c }); }); } _handleMouseMove(e) { var r, n, i, a = this.findOne("." + this._movingAnchorName), s = a.getStage(); s.setPointersPositions(e); const u = s.getPointerPosition(); let c = { x: u.x - this._anchorDragOffset.x, y: u.y - this._anchorDragOffset.y }; const f = a.getAbsolutePosition(); this.anchorDragBoundFunc() && (c = this.anchorDragBoundFunc()(f, c, e)), a.setAbsolutePosition(c); const h = a.getAbsolutePosition(); if (!(f.x === h.x && f.y === h.y)) { if (this._movingAnchorName === "rotater") { var d = this._getNodeRect(); r = a.x() - d.width / 2, n = -a.y() + d.height / 2; let ie = Math.atan2(-n, r) + Math.PI / 2; d.height < 0 && (ie -= Math.PI); var g = be.getAngle(this.rotation()); const F = g + ie, O = be.getAngle(this.rotationSnapTolerance()), j = zD(this.rotationSnaps(), F, O) - d.rotation, J = VD(d, j); this._fitNodesInto(J, e); return; } var v = this.keepRatio() || e.shiftKey, w = this.centeredScaling() || e.altKey; if (this._movingAnchorName === "top-left") { if (v) { var m = w ? { x: this.width() / 2, y: this.height() / 2 } : { x: this.findOne(".bottom-right").x(), y: this.findOne(".bottom-right").y() }; i = Math.sqrt(Math.pow(m.x - a.x(), 2) + Math.pow(m.y - a.y(), 2)); var b = this.findOne(".top-left").x() > m.x ? -1 : 1, S = this.findOne(".top-left").y() > m.y ? -1 : 1; r = i * this.cos * b, n = i * this.sin * S, this.findOne(".top-left").x(m.x - r), this.findOne(".top-left").y(m.y - n); } } else if (this._movingAnchorName === "top-center") this.findOne(".top-left").y(a.y()); else if (this._movingAnchorName === "top-right") { if (v) { var m = w ? { x: this.width() / 2, y: this.height() / 2 } : { x: this.findOne(".bottom-left").x(), y: this.findOne(".bottom-left").y() }; i = Math.sqrt(Math.pow(a.x() - m.x, 2) + Math.pow(m.y - a.y(), 2)); var b = this.findOne(".top-right").x() < m.x ? -1 : 1, S = this.findOne(".top-right").y() > m.y ? -1 : 1; r = i * this.cos * b, n = i * this.sin * S, this.findOne(".top-right").x(m.x + r), this.findOne(".top-right").y(m.y - n); } var x = a.position(); this.findOne(".top-left").y(x.y), this.findOne(".bottom-right").x(x.x); } else if (this._movingAnchorName === "middle-left") this.findOne(".top-left").x(a.x()); else if (this._movingAnchorName === "middle-right") this.findOne(".bottom-right").x(a.x()); else if (this._movingAnchorName === "bottom-left") { if (v) { var m = w ? { x: this.width() / 2, y: this.height() / 2 } : { x: this.findOne(".top-right").x(), y: this.findOne(".top-right").y() }; i = Math.sqrt(Math.pow(m.x - a.x(), 2) + Math.pow(a.y() - m.y, 2)); var b = m.x < a.x() ? -1 : 1, S = a.y() < m.y ? -1 : 1; r = i * this.cos * b, n = i * this.sin * S, a.x(m.x - r), a.y(m.y + n); } x = a.position(), this.findOne(".top-left").x(x.x), this.findOne(".bottom-right").y(x.y); } else if (this._movingAnchorName === "bottom-center") this.findOne(".bottom-right").y(a.y()); else if (this._movingAnchorName === "bottom-right") { if (v) { var m = w ? { x: this.width() / 2, y: this.height() / 2 } : { x: this.findOne(".top-left").x(), y: this.findOne(".top-left").y() }; i = Math.sqrt(Math.pow(a.x() - m.x, 2) + Math.pow(a.y() - m.y, 2)); var b = this.findOne(".bottom-right").x() < m.x ? -1 : 1, S = this.findOne(".bottom-right").y() < m.y ? -1 : 1; r = i * this.cos * b, n = i * this.sin * S, this.findOne(".bottom-right").x(m.x + r), this.findOne(".bottom-right").y(m.y + n); } } else console.error(new Error("Wrong position argument of selection resizer: " + this._movingAnchorName)); var w = this.centeredScaling() || e.altKey; if (w) { var _ = this.findOne(".top-left"), P = this.findOne(".bottom-right"), E = _.x(), k = _.y(), D = this.getWidth() - P.x(), V = this.getHeight() - P.y(); P.move({ x: -E, y: -k }), _.move({ x: D, y: V }); } var H = this.findOne(".top-left").getAbsolutePosition(); r = H.x, n = H.y; var W = this.findOne(".bottom-right").x() - this.findOne(".top-left").x(), K = this.findOne(".bottom-right").y() - this.findOne(".top-left").y(); this._fitNodesInto({ x: r, y: n, width: W, height: K, rotation: be.getAngle(this.rotation()) }, e); } } _handleMouseUp(e) { this._removeEvents(e); } getAbsoluteTransform() { return this.getTransform(); } _removeEvents(e) { if (this._transforming) { this._transforming = !1, typeof window < "u" && (window.removeEventListener("mousemove", this._handleMouseMove), window.removeEventListener("touchmove", this._handleMouseMove), window.removeEventListener("mouseup", this._handleMouseUp, !0), window.removeEventListener("touchend", this._handleMouseUp, !0)); var r = this.getNode(); this._fire("transformend", { evt: e, target: r }), r && this._nodes.forEach((n) => { n._fire("transformend", { evt: e, target: n }); }), this._movingAnchorName = null; } } _fitNodesInto(e, r) { var n = this._getNodeRect(); const i = 1; if (q._inRange(e.width, -this.padding() * 2 - i, i)) { this.update(); return; } if (q._inRange(e.height, -this.padding() * 2 - i, i)) { this.update(); return; } const a = this.flipEnabled(); var s = new tn(); if (s.rotate(be.getAngle(this.rotation())), this._movingAnchorName && e.width < 0 && this._movingAnchorName.indexOf("left") >= 0) { const d = s.point({ x: -this.padding() * 2, y: 0 }); if (e.x += d.x, e.y += d.y, e.width += this.padding() * 2, this._movingAnchorName = this._movingAnchorName.replace("left", "right"), this._anchorDragOffset.x -= d.x, this._anchorDragOffset.y -= d.y, !a) { this.update(); return; } } else if (this._movingAnchorName && e.width < 0 && this._movingAnchorName.indexOf("right") >= 0) { const d = s.point({ x: this.padding() * 2, y: 0 }); if (this._movingAnchorName = this._movingAnchorName.replace("right", "left"), this._anchorDragOffset.x -= d.x, this._anchorDragOffset.y -= d.y, e.width += this.padding() * 2, !a) { this.update(); return; } } if (this._movingAnchorName && e.height < 0 && this._movingAnchorName.indexOf("top") >= 0) { const d = s.point({ x: 0, y: -this.padding() * 2 }); if (e.x += d.x, e.y += d.y, this._movingAnchorName = this._movingAnchorName.replace("top", "bottom"), this._anchorDragOffset.x -= d.x, this._anchorDragOffset.y -= d.y, e.height += this.padding() * 2, !a) { this.update(); return; } } else if (this._movingAnchorName && e.height < 0 && this._movingAnchorName.indexOf("bottom") >= 0) { const d = s.point({ x: 0, y: this.padding() * 2 }); if (this._movingAnchorName = this._movingAnchorName.replace("bottom", "top"), this._anchorDragOffset.x -= d.x, this._anchorDragOffset.y -= d.y, e.height += this.padding() * 2, !a) { this.update(); return; } } if (this.boundBoxFunc()) { const d = this.boundBoxFunc()(n, e); d ? e = d : q.warn("boundBoxFunc returned falsy. You should return new bound rect from it!"); } const u = 1e7, c = new tn(); c.translate(n.x, n.y), c.rotate(n.rotation), c.scale(n.width / u, n.height / u); const f = new tn(); f.translate(e.x, e.y), f.rotate(e.rotation), f.scale(e.width / u, e.height / u); const h = f.multiply(c.invert()); this._nodes.forEach((d) => { var g; const v = d.getParent().getAbsoluteTransform(), m = d.getTransform().copy(); m.translate(d.offsetX(), d.offsetY()); const b = new tn(); b.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(m); const S = b.decompose(); d.setAttrs(S), this._fire("transform", { evt: r, target: d }), d._fire("transform", { evt: r, target: d }), (g = d.getLayer()) === null || g === void 0 || g.batchDraw(); }), this.rotation(q._getRotation(e.rotation)), this._resetTransformCache(), this.update(), this.getLayer().batchDraw(); } forceUpdate() { this._resetTransformCache(), this.update(); } _batchChangeChild(e, r) { this.findOne(e).setAttrs(r); } update() { var e, r = this._getNodeRect(); this.rotation(q._getRotation(r.rotation)); var n = r.width, i = r.height, a = this.enabledAnchors(), s = this.resizeEnabled(), u = this.padding(), c = this.anchorSize(); this.find("._anchor").forEach((f) => { f.setAttrs({ width: c, height: c, offsetX: c / 2, offsetY: c / 2, stroke: this.anchorStroke(), strokeWidth: this.anchorStrokeWidth(), fill: this.anchorFill(), cornerRadius: this.anchorCornerRadius() }); }), this._batchChangeChild(".top-left", { x: 0, y: 0, offsetX: c / 2 + u, offsetY: c / 2 + u, visible: s && a.indexOf("top-left") >= 0 }), this._batchChangeChild(".top-center", { x: n / 2, y: 0, offsetY: c / 2 + u, visible: s && a.indexOf("top-center") >= 0 }), this._batchChangeChild(".top-right", { x: n, y: 0, offsetX: c / 2 - u, offsetY: c / 2 + u, visible: s && a.indexOf("top-right") >= 0 }), this._batchChangeChild(".middle-left", { x: 0, y: i / 2, offsetX: c / 2 + u, visible: s && a.indexOf("middle-left") >= 0 }), this._batchChangeChild(".middle-right", { x: n, y: i / 2, offsetX: c / 2 - u, visible: s && a.indexOf("middle-right") >= 0 }), this._batchChangeChild(".bottom-left", { x: 0, y: i, offsetX: c / 2 + u, offsetY: c / 2 - u, visible: s && a.indexOf("bottom-left") >= 0 }), this._batchChangeChild(".bottom-center", { x: n / 2, y: i, offsetY: c / 2 - u, visible: s && a.indexOf("bottom-center") >= 0 }), this._batchChangeChild(".bottom-right", { x: n, y: i, offsetX: c / 2 - u, offsetY: c / 2 - u, visible: s && a.indexOf("bottom-right") >= 0 }), this._batchChangeChild(".rotater", { x: n / 2, y: -this.rotateAnchorOffset() * q._sign(i) - u, visible: this.rotateEnabled() }), this._batchChangeChild(".back", { width: n, height: i, visible: this.borderEnabled(), stroke: this.borderStroke(), strokeWidth: this.borderStrokeWidth(), dash: this.borderDash(), x: 0, y: 0 }), (e = this.getLayer()) === null || e === void 0 || e.batchDraw(); } isTransforming() { return this._transforming; } stopTransform() { if (this._transforming) { this._removeEvents(); var e = this.findOne("." + this._movingAnchorName); e && e.stopDrag(); } } destroy() { return this.getStage() && this._cursorChange && this.getStage().content && (this.getStage().content.style.cursor = ""), ao.prototype.destroy.call(this), this.detach(), this._removeEvents(), this; } toObject() { return de.prototype.toObject.call(this); } clone(e) { var r = de.prototype.clone.call(this, e); return r; } getClientRect() { return this.nodes().length > 0 ? super.getClientRect() : { x: 0, y: 0, width: 0, height: 0 }; } } function GD(t) { return t instanceof Array || q.warn("enabledAnchors value should be an array"), t instanceof Array && t.forEach(function(e) { wf.indexOf(e) === -1 && q.warn("Unknown anchor name: " + e + ". Available names are: " + wf.join(", ")); }), t || []; } gt.prototype.className = "Transformer"; Ft(gt); M.addGetterSetter(gt, "enabledAnchors", wf, GD); M.addGetterSetter(gt, "flipEnabled", !0, Yn()); M.addGetterSetter(gt, "resizeEnabled", !0); M.addGetterSetter(gt, "anchorSize", 10, ce()); M.addGetterSetter(gt, "rotateEnabled", !0); M.addGetterSetter(gt, "rotationSnaps", []); M.addGetterSetter(gt, "rotateAnchorOffset", 50, ce()); M.addGetterSetter(gt, "rotationSnapTolerance", 5, ce()); M.addGetterSetter(gt, "borderEnabled", !0); M.addGetterSetter(gt, "anchorStroke", "rgb(0, 161, 255)"); M.addGetterSetter(gt, "anchorStrokeWidth", 1, ce()); M.addGetterSetter(gt, "anchorFill", "white"); M.addGetterSetter(gt, "anchorCornerRadius", 0, ce()); M.addGetterSetter(gt, "borderStroke", "rgb(0, 161, 255)"); M.addGetterSetter(gt, "borderStrokeWidth", 1, ce()); M.addGetterSetter(gt, "borderDash"); M.addGetterSetter(gt, "keepRatio", !0); M.addGetterSetter(gt, "centeredScaling", !1); M.addGetterSetter(gt, "ignoreStroke", !1); M.addGetterSetter(gt, "padding", 0, ce()); M.addGetterSetter(gt, "node"); M.addGetterSetter(gt, "nodes"); M.addGetterSetter(gt, "boundBoxFunc"); M.addGetterSetter(gt, "anchorDragBoundFunc"); M.addGetterSetter(gt, "shouldOverdrawWholeArea", !1); M.addGetterSetter(gt, "useSingleNodeRotation", !0); M.backCompat(gt, { lineEnabled: "borderEnabled", rotateHandlerOffset: "rotateAnchorOffset", enabledHandlers: "enabledAnchors" }); class Gi extends ue { _sceneFunc(e) { e.beginPath(), e.arc(0, 0, this.radius(), 0, be.getAngle(this.angle()), this.clockwise()), e.lineTo(0, 0), e.closePath(), e.fillStrokeShape(this); } getWidth() { return this.radius() * 2; } getHeight() { return this.radius() * 2; } setWidth(e) { this.radius(e / 2); } setHeight(e) { this.radius(e / 2); } } Gi.prototype.className = "Wedge"; Gi.prototype._centroid = !0; Gi.prototype._attrsAffectingSize = ["radius"]; Ft(Gi); M.addGetterSetter(Gi, "radius", 0, ce()); M.addGetterSetter(Gi, "angle", 0, ce()); M.addGetterSetter(Gi, "clockwise", !1); M.backCompat(Gi, { angleDeg: "angle", getAngleDeg: "getAngle", setAngleDeg: "setAngle" }); function Q1() { this.r = 0, this.g = 0, this.b = 0, this.a = 0, this.next = null; } var WD = [ 512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292, 512, 454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292, 273, 512, 482, 454, 428, 405, 383, 364, 345, 328, 312, 298, 284, 271, 259, 496, 475, 456, 437, 420, 404, 388, 374, 360, 347, 335, 323, 312, 302, 292, 282, 273, 265, 512, 497, 482, 468, 454, 441, 428, 417, 405, 394, 383, 373, 364, 354, 345, 337, 328, 320, 312, 305, 298, 291, 284, 278, 271, 265, 259, 507, 496, 485, 475, 465, 456, 446, 437, 428, 420, 412, 404, 396, 388, 381, 374, 367, 360, 354, 347, 341, 335, 329, 323, 318, 312, 307, 302, 297, 292, 287, 282, 278, 273, 269, 265, 261, 512, 505, 497, 489, 482, 475, 468, 461, 454, 447, 441, 435, 428, 422, 417, 411, 405, 399, 394, 389, 383, 378, 373, 368, 364, 359, 354, 350, 345, 341, 337, 332, 328, 324, 320, 316, 312, 309, 305, 301, 298, 294, 291, 287, 284, 281, 278, 274, 271, 268, 265, 262, 259, 257, 507, 501, 496, 491, 485, 480, 475, 470, 465, 460, 456, 451, 446, 442, 437, 433, 428, 424, 420, 416, 412, 408, 404, 400, 396, 392, 388, 385, 381, 377, 374, 370, 367, 363, 360, 357, 354, 350, 347, 344, 341, 338, 335, 332, 329, 326, 323, 320, 318, 315, 312, 310, 307, 304, 302, 299, 297, 294, 292, 289, 287, 285, 282, 280, 278, 275, 273, 271, 269, 267, 265, 263, 261, 259 ], UD = [ 9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24 ]; function HD(t, e) { var r = t.data, n = t.width, i = t.height, a, s, u, c, f, h, d, g, v, m, b, S, x, w, _, P, E, k, D, V, H, W, K, ie, F = e + e + 1, O = n - 1, N = i - 1, j = e + 1, J = j * (j + 1) / 2, te = new Q1(), ee = null, ae = te, le = null, Ce = null, we = WD[e], Re = UD[e]; for (u = 1; u < F; u++) ae = ae.next = new Q1(), u === j && (ee = ae); for (ae.next = te, d = h = 0, s = 0; s < i; s++) { for (P = E = k = D = g = v = m = b = 0, S = j * (V = r[h]), x = j * (H = r[h + 1]), w = j * (W = r[h + 2]), _ = j * (K = r[h + 3]), g += J * V, v += J * H, m += J * W, b += J * K, ae = te, u = 0; u < j; u++) ae.r = V, ae.g = H, ae.b = W, ae.a = K, ae = ae.next; for (u = 1; u < j; u++) c = h + ((O < u ? O : u) << 2), g += (ae.r = V = r[c]) * (ie = j - u), v += (ae.g = H = r[c + 1]) * ie, m += (ae.b = W = r[c + 2]) * ie, b += (ae.a = K = r[c + 3]) * ie, P += V, E += H, k += W, D += K, ae = ae.next; for (le = te, Ce = ee, a = 0; a < n; a++) r[h + 3] = K = b * we >> Re, K !== 0 ? (K = 255 / K, r[h] = (g * we >> Re) * K, r[h + 1] = (v * we >> Re) * K, r[h + 2] = (m * we >> Re) * K) : r[h] = r[h + 1] = r[h + 2] = 0, g -= S, v -= x, m -= w, b -= _, S -= le.r, x -= le.g, w -= le.b, _ -= le.a, c = d + ((c = a + e + 1) < O ? c : O) << 2, P += le.r = r[c], E += le.g = r[c + 1], k += le.b = r[c + 2], D += le.a = r[c + 3], g += P, v += E, m += k, b += D, le = le.next, S += V = Ce.r, x += H = Ce.g, w += W = Ce.b, _ += K = Ce.a, P -= V, E -= H, k -= W, D -= K, Ce = Ce.next, h += 4; d += n; } for (a = 0; a < n; a++) { for (E = k = D = P = v = m = b = g = 0, h = a << 2, S = j * (V = r[h]), x = j * (H = r[h + 1]), w = j * (W = r[h + 2]), _ = j * (K = r[h + 3]), g += J * V, v += J * H, m += J * W, b += J * K, ae = te, u = 0; u < j; u++) ae.r = V, ae.g = H, ae.b = W, ae.a = K, ae = ae.next; for (f = n, u = 1; u <= e; u++) h = f + a << 2, g += (ae.r = V = r[h]) * (ie = j - u), v += (ae.g = H = r[h + 1]) * ie, m += (ae.b = W = r[h + 2]) * ie, b += (ae.a = K = r[h + 3]) * ie, P += V, E += H, k += W, D += K, ae = ae.next, u < N && (f += n); for (h = a, le = te, Ce = ee, s = 0; s < i; s++) c = h << 2, r[c + 3] = K = b * we >> Re, K > 0 ? (K = 255 / K, r[c] = (g * we >> Re) * K, r[c + 1] = (v * we >> Re) * K, r[c + 2] = (m * we >> Re) * K) : r[c] = r[c + 1] = r[c + 2] = 0, g -= S, v -= x, m -= w, b -= _, S -= le.r, x -= le.g, w -= le.b, _ -= le.a, c = a + ((c = s + j) < N ? c : N) * n << 2, g += P += le.r = r[c], v += E += le.g = r[c + 1], m += k += le.b = r[c + 2], b += D += le.a = r[c + 3], le = le.next, S += V = Ce.r, x += H = Ce.g, w += W = Ce.b, _ += K = Ce.a, P -= V, E -= H, k -= W, D -= K, Ce = Ce.next, h += n; } } const YD = function(e) { var r = Math.round(this.blurRadius()); r > 0 && HD(e, r); }; M.addGetterSetter(de, "blurRadius", 0, ce(), M.afterSetFilter); const qD = function(t) { var e = this.brightness() * 255, r = t.data, n = r.length, i; for (i = 0; i < n; i += 4) r[i] += e, r[i + 1] += e, r[i + 2] += e; }; M.addGetterSetter(de, "brightness", 0, ce(), M.afterSetFilter); const KD = function(t) { var e = Math.pow((this.contrast() + 100) / 100, 2), r = t.data, n = r.length, i = 150, a = 150, s = 150, u; for (u = 0; u < n; u += 4) i = r[u], a = r[u + 1], s = r[u + 2], i /= 255, i -= 0.5, i *= e, i += 0.5, i *= 255, a /= 255, a -= 0.5, a *= e, a += 0.5, a *= 255, s /= 255, s -= 0.5, s *= e, s += 0.5, s *= 255, i = i < 0 ? 0 : i > 255 ? 255 : i, a = a < 0 ? 0 : a > 255 ? 255 : a, s = s < 0 ? 0 : s > 255 ? 255 : s, r[u] = i, r[u + 1] = a, r[u + 2] = s; }; M.addGetterSetter(de, "contrast", 0, ce(), M.afterSetFilter); const XD = function(t) { var e = this.embossStrength() * 10, r = this.embossWhiteLevel() * 255, n = this.embossDirection(), i = this.embossBlend(), a = 0, s = 0, u = t.data, c = t.width, f = t.height, h = c * 4, d = f; switch (n) { case "top-left": a = -1, s = -1; break; case "top": a = -1, s = 0; break; case "top-right": a = -1, s = 1; break; case "right": a = 0, s = 1; break; case "bottom-right": a = 1, s = 1; break; case "bottom": a = 1, s = 0; break; case "bottom-left": a = 1, s = -1; break; case "left": a = 0, s = -1; break; default: q.error("Unknown emboss direction: " + n); } do { var g = (d - 1) * h, v = a; d + v < 1 && (v = 0), d + v > f && (v = 0); var m = (d - 1 + v) * c * 4, b = c; do { var S = g + (b - 1) * 4, x = s; b + x < 1 && (x = 0), b + x > c && (x = 0); var w = m + (b - 1 + x) * 4, _ = u[S] - u[w], P = u[S + 1] - u[w + 1], E = u[S + 2] - u[w + 2], k = _, D = k > 0 ? k : -k, V = P > 0 ? P : -P, H = E > 0 ? E : -E; if (V > D && (k = P), H > D && (k = E), k *= e, i) { var W = u[S] + k, K = u[S + 1] + k, ie = u[S + 2] + k; u[S] = W > 255 ? 255 : W < 0 ? 0 : W, u[S + 1] = K > 255 ? 255 : K < 0 ? 0 : K, u[S + 2] = ie > 255 ? 255 : ie < 0 ? 0 : ie; } else { var F = r - k; F < 0 ? F = 0 : F > 255 && (F = 255), u[S] = u[S + 1] = u[S + 2] = F; } } while (--b); } while (--d); }; M.addGetterSetter(de, "embossStrength", 0.5, ce(), M.afterSetFilter); M.addGetterSetter(de, "embossWhiteLevel", 0.5, ce(), M.afterSetFilter); M.addGetterSetter(de, "embossDirection", "top-left", null, M.afterSetFilter); M.addGetterSetter(de, "embossBlend", !1, null, M.afterSetFilter); function ep(t, e, r, n, i) { var a = r - e, s = i - n, u; return a === 0 ? n + s / 2 : s === 0 ? n : (u = (t - e) / a, u = s * u + n, u); } const QD = function(t) { var e = t.data, r = e.length, n = e[0], i = n, a, s = e[1], u = s, c, f = e[2], h = f, d, g, v = this.enhance(); if (v !== 0) { for (g = 0; g < r; g += 4) a = e[g + 0], a < n ? n = a : a > i && (i = a), c = e[g + 1], c < s ? s = c : c > u && (u = c), d = e[g + 2], d < f ? f = d : d > h && (h = d); i === n && (i = 255, n = 0), u === s && (u = 255, s = 0), h === f && (h = 255, f = 0); var m, b, S, x, w, _, P, E, k; for (v > 0 ? (b = i + v * (255 - i), S = n - v * (n - 0), w = u + v * (255 - u), _ = s - v * (s - 0), E = h + v * (255 - h), k = f - v * (f - 0)) : (m = (i + n) * 0.5, b = i + v * (i - m), S = n + v * (n - m), x = (u + s) * 0.5, w = u + v * (u - x), _ = s + v * (s - x), P = (h + f) * 0.5, E = h + v * (h - P), k = f + v * (f - P)), g = 0; g < r; g += 4) e[g + 0] = ep(e[g + 0], n, i, S, b), e[g + 1] = ep(e[g + 1], s, u, _, w), e[g + 2] = ep(e[g + 2], f, h, k, E); } }; M.addGetterSetter(de, "enhance", 0, ce(), M.afterSetFilter); const JD = function(t) { var e = t.data, r = e.length, n, i; for (n = 0; n < r; n += 4) i = 0.34 * e[n] + 0.5 * e[n + 1] + 0.16 * e[n + 2], e[n] = i, e[n + 1] = i, e[n + 2] = i; }; M.addGetterSetter(de, "hue", 0, ce(), M.afterSetFilter); M.addGetterSetter(de, "saturation", 0, ce(), M.afterSetFilter); M.addGetterSetter(de, "luminance", 0, ce(), M.afterSetFilter); const ZD = function(t) { var e = t.data, r = e.length, n = 1, i = Math.pow(2, this.saturation()), a = Math.abs(this.hue() + 360) % 360, s = this.luminance() * 127, u, c = n * i * Math.cos(a * Math.PI / 180), f = n * i * Math.sin(a * Math.PI / 180), h = 0.299 * n + 0.701 * c + 0.167 * f, d = 0.587 * n - 0.587 * c + 0.33 * f, g = 0.114 * n - 0.114 * c - 0.497 * f, v = 0.299 * n - 0.299 * c - 0.328 * f, m = 0.587 * n + 0.413 * c + 0.035 * f, b = 0.114 * n - 0.114 * c + 0.293 * f, S = 0.299 * n - 0.3 * c + 1.25 * f, x = 0.587 * n - 0.586 * c - 1.05 * f, w = 0.114 * n + 0.886 * c - 0.2 * f, _, P, E, k; for (u = 0; u < r; u += 4) _ = e[u + 0], P = e[u + 1], E = e[u + 2], k = e[u + 3], e[u + 0] = h * _ + d * P + g * E + s, e[u + 1] = v * _ + m * P + b * E + s, e[u + 2] = S * _ + x * P + w * E + s, e[u + 3] = k; }, $D = function(t) { var e = t.data, r = e.length, n = Math.pow(2, this.value()), i = Math.pow(2, this.saturation()), a = Math.abs(this.hue() + 360) % 360, s, u = n * i * Math.cos(a * Math.PI / 180), c = n * i * Math.sin(a * Math.PI / 180), f = 0.299 * n + 0.701 * u + 0.167 * c, h = 0.587 * n - 0.587 * u + 0.33 * c, d = 0.114 * n - 0.114 * u - 0.497 * c, g = 0.299 * n - 0.299 * u - 0.328 * c, v = 0.587 * n + 0.413 * u + 0.035 * c, m = 0.114 * n - 0.114 * u + 0.293 * c, b = 0.299 * n - 0.3 * u + 1.25 * c, S = 0.587 * n - 0.586 * u - 1.05 * c, x = 0.114 * n + 0.886 * u - 0.2 * c, w, _, P, E; for (s = 0; s < r; s += 4) w = e[s + 0], _ = e[s + 1], P = e[s + 2], E = e[s + 3], e[s + 0] = f * w + h * _ + d * P, e[s + 1] = g * w + v * _ + m * P, e[s + 2] = b * w + S * _ + x * P, e[s + 3] = E; }; M.addGetterSetter(de, "hue", 0, ce(), M.afterSetFilter); M.addGetterSetter(de, "saturation", 0, ce(), M.afterSetFilter); M.addGetterSetter(de, "value", 0, ce(), M.afterSetFilter); const eM = function(t) { var e = t.data, r = e.length, n; for (n = 0; n < r; n += 4) e[n] = 255 - e[n], e[n + 1] = 255 - e[n + 1], e[n + 2] = 255 - e[n + 2]; }; var tM = function(t, e, r) { var n = t.data, i = e.data, a = t.width, s = t.height, u = r.polarCenterX || a / 2, c = r.polarCenterY || s / 2, f, h, d, g = 0, v = 0, m = 0, b = 0, S, x = Math.sqrt(u * u + c * c); h = a - u, d = s - c, S = Math.sqrt(h * h + d * d), x = S > x ? S : x; var w = s, _ = a, P, E, k = 360 / _ * Math.PI / 180, D, V; for (E = 0; E < _; E += 1) for (D = Math.sin(E * k), V = Math.cos(E * k), P = 0; P < w; P += 1) h = Math.floor(u + x * P / w * V), d = Math.floor(c + x * P / w * D), f = (d * a + h) * 4, g = n[f + 0], v = n[f + 1], m = n[f + 2], b = n[f + 3], f = (E + P * a) * 4, i[f + 0] = g, i[f + 1] = v, i[f + 2] = m, i[f + 3] = b; }, rM = function(t, e, r) { var n = t.data, i = e.data, a = t.width, s = t.height, u = r.polarCenterX || a / 2, c = r.polarCenterY || s / 2, f, h, d, g, v, m = 0, b = 0, S = 0, x = 0, w, _ = Math.sqrt(u * u + c * c); h = a - u, d = s - c, w = Math.sqrt(h * h + d * d), _ = w > _ ? w : _; var P = s, E = a, k, D, V = r.polarRotation || 0, H, W; for (h = 0; h < a; h += 1) for (d = 0; d < s; d += 1) g = h - u, v = d - c, k = Math.sqrt(g * g + v * v) * P / _, D = (Math.atan2(v, g) * 180 / Math.PI + 360 + V) % 360, D = D * E / 360, H = Math.floor(D), W = Math.floor(k), f = (W * a + H) * 4, m = n[f + 0], b = n[f + 1], S = n[f + 2], x = n[f + 3], f = (d * a + h) * 4, i[f + 0] = m, i[f + 1] = b, i[f + 2] = S, i[f + 3] = x; }; const nM = function(t) { var e = t.width, r = t.height, n, i, a, s, u, c, f, h, d, g, v = Math.round(this.kaleidoscopePower()), m = Math.round(this.kaleidoscopeAngle()), b = Math.floor(e * (m % 360) / 360); if (!(v < 1)) { var S = q.createCanvasElement(); S.width = e, S.height = r; var x = S.getContext("2d").getImageData(0, 0, e, r); q.releaseCanvas(S), tM(t, x, { polarCenterX: e / 2, polarCenterY: r / 2 }); for (var w = e / Math.pow(2, v); w <= 8; ) w = w * 2, v -= 1; w = Math.ceil(w); var _ = w, P = 0, E = _, k = 1; for (b + w > e && (P = _, E = 0, k = -1), i = 0; i < r; i += 1) for (n = P; n !== E; n += k) a = Math.round(n + b) % e, d = (e * i + a) * 4, u = x.data[d + 0], c = x.data[d + 1], f = x.data[d + 2], h = x.data[d + 3], g = (e * i + n) * 4, x.data[g + 0] = u, x.data[g + 1] = c, x.data[g + 2] = f, x.data[g + 3] = h; for (i = 0; i < r; i += 1) for (_ = Math.floor(w), s = 0; s < v; s += 1) { for (n = 0; n < _ + 1; n += 1) d = (e * i + n) * 4, u = x.data[d + 0], c = x.data[d + 1], f = x.data[d + 2], h = x.data[d + 3], g = (e * i + _ * 2 - n - 1) * 4, x.data[g + 0] = u, x.data[g + 1] = c, x.data[g + 2] = f, x.data[g + 3] = h; _ *= 2; } rM(x, t, { polarRotation: 0 }); } }; M.addGetterSetter(de, "kaleidoscopePower", 2, ce(), M.afterSetFilter); M.addGetterSetter(de, "kaleidoscopeAngle", 0, ce(), M.afterSetFilter); function Mc(t, e, r) { var n = (r * t.width + e) * 4, i = []; return i.push(t.data[n++], t.data[n++], t.data[n++], t.data[n++]), i; } function uu(t, e) { return Math.sqrt(Math.pow(t[0] - e[0], 2) + Math.pow(t[1] - e[1], 2) + Math.pow(t[2] - e[2], 2)); } function iM(t) { for (var e = [0, 0, 0], r = 0; r < t.length; r++) e[0] += t[r][0], e[1] += t[r][1], e[2] += t[r][2]; return e[0] /= t.length, e[1] /= t.length, e[2] /= t.length, e; } function aM(t, e) { var r = Mc(t, 0, 0), n = Mc(t, t.width - 1, 0), i = Mc(t, 0, t.height - 1), a = Mc(t, t.width - 1, t.height - 1), s = e || 10; if (uu(r, n) < s && uu(n, a) < s && uu(a, i) < s && uu(i, r) < s) { for (var u = iM([n, r, a, i]), c = [], f = 0; f < t.width * t.height; f++) { var h = uu(u, [ t.data[f * 4], t.data[f * 4 + 1], t.data[f * 4 + 2] ]); c[f] = h < s ? 0 : 255; } return c; } } function sM(t, e) { for (var r = 0; r < t.width * t.height; r++) t.data[4 * r + 3] = e[r]; } function oM(t, e, r) { for (var n = [1, 1, 1, 1, 0, 1, 1, 1, 1], i = Math.round(Math.sqrt(n.length)), a = Math.floor(i / 2), s = [], u = 0; u < r; u++) for (var c = 0; c < e; c++) { for (var f = u * e + c, h = 0, d = 0; d < i; d++) for (var g = 0; g < i; g++) { var v = u + d - a, m = c + g - a; if (v >= 0 && v < r && m >= 0 && m < e) { var b = v * e + m, S = n[d * i + g]; h += t[b] * S; } } s[f] = h === 255 * 8 ? 255 : 0; } return s; } function uM(t, e, r) { for (var n = [1, 1, 1, 1, 1, 1, 1, 1, 1], i = Math.round(Math.sqrt(n.length)), a = Math.floor(i / 2), s = [], u = 0; u < r; u++) for (var c = 0; c < e; c++) { for (var f = u * e + c, h = 0, d = 0; d < i; d++) for (var g = 0; g < i; g++) { var v = u + d - a, m = c + g - a; if (v >= 0 && v < r && m >= 0 && m < e) { var b = v * e + m, S = n[d * i + g]; h += t[b] * S; } } s[f] = h >= 255 * 4 ? 255 : 0; } return s; } function lM(t, e, r) { for (var n = [0.1111111111111111, 0.1111111111111111, 0.1111111111111111, 0.1111111111111111, 0.1111111111111111, 0.1111111111111111, 0.1111111111111111, 0.1111111111111111, 0.1111111111111111], i = Math.round(Math.sqrt(n.length)), a = Math.floor(i / 2), s = [], u = 0; u < r; u++) for (var c = 0; c < e; c++) { for (var f = u * e + c, h = 0, d = 0; d < i; d++) for (var g = 0; g < i; g++) { var v = u + d - a, m = c + g - a; if (v >= 0 && v < r && m >= 0 && m < e) { var b = v * e + m, S = n[d * i + g]; h += t[b] * S; } } s[f] = h; } return s; } const cM = function(t) { var e = this.threshold(), r = aM(t, e); return r && (r = oM(r, t.width, t.height), r = uM(r, t.width, t.height), r = lM(r, t.width, t.height), sM(t, r)), t; }; M.addGetterSetter(de, "threshold", 0, ce(), M.afterSetFilter); const fM = function(t) { var e = this.noise() * 255, r = t.data, n = r.length, i = e / 2, a; for (a = 0; a < n; a += 4) r[a + 0] += i - 2 * i * Math.random(), r[a + 1] += i - 2 * i * Math.random(), r[a + 2] += i - 2 * i * Math.random(); }; M.addGetterSetter(de, "noise", 0.2, ce(), M.afterSetFilter); const hM = function(t) { var e = Math.ceil(this.pixelSize()), r = t.width, n = t.height, i, a, s, u, c, f, h, d = Math.ceil(r / e), g = Math.ceil(n / e), v, m, b, S, x, w, _, P = t.data; if (e <= 0) { q.error("pixelSize value can not be <= 0"); return; } for (x = 0; x < d; x += 1) for (w = 0; w < g; w += 1) { for (u = 0, c = 0, f = 0, h = 0, v = x * e, m = v + e, b = w * e, S = b + e, _ = 0, i = v; i < m; i += 1) if (!(i >= r)) for (a = b; a < S; a += 1) a >= n || (s = (r * a + i) * 4, u += P[s + 0], c += P[s + 1], f += P[s + 2], h += P[s + 3], _ += 1); for (u = u / _, c = c / _, f = f / _, h = h / _, i = v; i < m; i += 1) if (!(i >= r)) for (a = b; a < S; a += 1) a >= n || (s = (r * a + i) * 4, P[s + 0] = u, P[s + 1] = c, P[s + 2] = f, P[s + 3] = h); } }; M.addGetterSetter(de, "pixelSize", 8, ce(), M.afterSetFilter); const dM = function(t) { var e = Math.round(this.levels() * 254) + 1, r = t.data, n = r.length, i = 255 / e, a; for (a = 0; a < n; a += 1) r[a] = Math.floor(r[a] / i) * i; }; M.addGetterSetter(de, "levels", 0.5, ce(), M.afterSetFilter); const pM = function(t) { var e = t.data, r = e.length, n = this.red(), i = this.green(), a = this.blue(), s, u; for (s = 0; s < r; s += 4) u = (0.34 * e[s] + 0.5 * e[s + 1] + 0.16 * e[s + 2]) / 255, e[s] = u * n, e[s + 1] = u * i, e[s + 2] = u * a, e[s + 3] = e[s + 3]; }; M.addGetterSetter(de, "red", 0, function(t) { return this._filterUpToDate = !1, t > 255 ? 255 : t < 0 ? 0 : Math.round(t); }); M.addGetterSetter(de, "green", 0, function(t) { return this._filterUpToDate = !1, t > 255 ? 255 : t < 0 ? 0 : Math.round(t); }); M.addGetterSetter(de, "blue", 0, xw, M.afterSetFilter); const gM = function(t) { var e = t.data, r = e.length, n = this.red(), i = this.green(), a = this.blue(), s = this.alpha(), u, c; for (u = 0; u < r; u += 4) c = 1 - s, e[u] = n * s + e[u] * c, e[u + 1] = i * s + e[u + 1] * c, e[u + 2] = a * s + e[u + 2] * c; }; M.addGetterSetter(de, "red", 0, function(t) { return this._filterUpToDate = !1, t > 255 ? 255 : t < 0 ? 0 : Math.round(t); }); M.addGetterSetter(de, "green", 0, function(t) { return this._filterUpToDate = !1, t > 255 ? 255 : t < 0 ? 0 : Math.round(t); }); M.addGetterSetter(de, "blue", 0, xw, M.afterSetFilter); M.addGetterSetter(de, "alpha", 1, function(t) { return this._filterUpToDate = !1, t > 1 ? 1 : t < 0 ? 0 : t; }); const mM = function(t) { var e = t.data, r = e.length, n, i, a, s; for (n = 0; n < r; n += 4) i = e[n + 0], a = e[n + 1], s = e[n + 2], e[n + 0] = Math.min(255, i * 0.393 + a * 0.769 + s * 0.189), e[n + 1] = Math.min(255, i * 0.349 + a * 0.686 + s * 0.168), e[n + 2] = Math.min(255, i * 0.272 + a * 0.534 + s * 0.131); }, vM = function(t) { var e = t.data, r = t.width, n = t.height, i = r * 4, a = n; do { var s = (a - 1) * i, u = r; do { var c = s + (u - 1) * 4, f = e[c], h = e[c + 1], d = e[c + 2]; f > 127 && (f = 255 - f), h > 127 && (h = 255 - h), d > 127 && (d = 255 - d), e[c] = f, e[c + 1] = h, e[c + 2] = d; } while (--u); } while (--a); }, yM = function(t) { var e = this.threshold() * 255, r = t.data, n = r.length, i; for (i = 0; i < n; i += 1) r[i] = r[i] < e ? 0 : 255; }; M.addGetterSetter(de, "threshold", 0.5, ce(), M.afterSetFilter); const lu = G1.Util._assign(G1, { Arc: Vi, Arrow: ts, Circle: So, Ellipse: Sa, Image: pi, Label: em, Tag: rs, Line: zi, Path: xt, Rect: el, RegularPolygon: ns, Ring: is, Sprite: gi, Star: wa, Text: Bt, TextPath: ir, Transformer: gt, Wedge: Gi, Filters: { Blur: YD, Brighten: qD, Contrast: KD, Emboss: XD, Enhance: QD, Grayscale: JD, HSL: ZD, HSV: $D, Invert: eM, Kaleidoscope: nM, Mask: cM, Noise: fM, Pixelate: hM, Posterize: dM, RGB: pM, RGBA: gM, Sepia: mM, Solarize: vM, Threshold: yM } }), bM = (t, e) => { const { width: r, height: n } = e, i = document.createElement("div"), a = new lu.Stage({ container: i, width: r, height: n }), s = new lu.Layer(), u = new lu.Layer(); s.add( new lu.Rect({ ...e, fill: "white" }) ), t.forEach( (f) => u.add( new lu.Line({ points: f.points, stroke: "black", strokeWidth: f.strokeWidth * 2, tension: 0, lineCap: "round", lineJoin: "round", shadowForStrokeEnabled: !1, globalCompositeOperation: f.tool === "brush" ? "source-over" : "destination-out" }) ) ), a.add(s), a.add(u); const c = a.toDataURL({ ...e }); return i.remove(), c; }; let ex = null, tx = null; const nH = (t) => { ex = t; }, SM = () => ex, iH = (t) => { tx = t; }, aH = () => tx, wM = (t) => { const e = window.open(""); e && t.forEach((r) => { const n = new Image(); n.src = r.base64, e.document.write(r.caption), e.document.write("
"), e.document.write(n.outerHTML), e.document.write("

"); }); }, xM = (t, e) => Math.floor(Math.random() * (e - t + 1) + t), CM = (t) => { const e = SM(), { generationMode: r, generationState: n, postprocessingState: i, canvasState: a, systemState: s } = t, { codeformerFidelity: u, facetoolStrength: c, facetoolType: f, hiresFix: h, hiresStrength: d, shouldRunESRGAN: g, shouldRunFacetool: v, upscalingLevel: m, upscalingStrength: b, upscalingDenoising: S } = i, { cfgScale: x, height: w, img2imgStrength: _, infillMethod: P, initialImage: E, iterations: k, perlin: D, prompt: V, negativePrompt: H, sampler: W, seamBlur: K, seamless: ie, seamSize: F, seamSteps: O, seamStrength: N, seed: j, seedWeights: J, shouldFitToWidthHeight: te, shouldGenerateVariations: ee, shouldRandomizeSeed: ae, steps: le, threshold: Ce, tileSize: we, variationAmount: Re, width: ke, shouldUseSymmetry: ve, horizontalSymmetrySteps: ot, verticalSymmetrySteps: Fe } = n, { shouldDisplayInProgressType: qe, saveIntermediatesInterval: St, enableImageDebugging: et } = s, Z = { prompt: V, iterations: k, steps: le, cfg_scale: x, threshold: Ce, perlin: D, height: w, width: ke, sampler_name: W, seed: j, progress_images: qe === "full-res", progress_latents: qe === "latents", save_intermediates: St, generation_mode: r, init_mask: "" }; let mt = !1, fe = !1; if (H !== "" && (Z.prompt = `${V} [${H}]`), Z.seed = ae ? xM(oI, uI) : j, ve && (ot > 0 && (Z.h_symmetry_time_pct = Math.max( 0, Math.min(1, ot / le) )), Fe > 0 && (Z.v_symmetry_time_pct = Math.max( 0, Math.min(1, Fe / le) ))), r === "txt2img" && (Z.hires_fix = h, h && (Z.strength = d)), ["txt2img", "img2img"].includes(r) && (Z.seamless = ie, g && (mt = { level: m, denoise_str: S, strength: b }), v && (fe = { type: f, strength: c }, f === "codeformer" && (fe.codeformer_fidelity = u))), r === "img2img" && E && (Z.init_img = typeof E == "string" ? E : E.url, Z.strength = _, Z.fit = te), r === "unifiedCanvas" && e) { const { layerState: { objects: xe }, boundingBoxCoordinates: ut, boundingBoxDimensions: je, stageScale: jt, isMaskEnabled: cr, shouldPreserveMaskedArea: Et, boundingBoxScaleMethod: Tt, scaledBoundingBoxDimensions: Ut } = a, At = { ...ut, ...je }, Hr = bM( cr ? xe.filter(DS) : [], At ); Z.init_mask = Hr, Z.fit = !1, Z.strength = _, Z.invert_mask = Et, Z.bounding_box = At; const vr = e.scale(); e.scale({ x: 1 / jt, y: 1 / jt }); const un = e.getAbsolutePosition(), $t = e.toDataURL({ x: At.x + un.x, y: At.y + un.y, width: At.width, height: At.height }); et && wM([ { base64: Hr, caption: "mask sent as init_mask" }, { base64: $t, caption: "image sent as init_img" } ]), e.scale(vr), Z.init_img = $t, Z.progress_images = !1, Tt !== "none" && (Z.inpaint_width = Ut.width, Z.inpaint_height = Ut.height), Z.seam_size = F, Z.seam_blur = K, Z.seam_strength = N, Z.seam_steps = O, Z.tile_size = we, Z.infill_method = P, Z.force_outpaint = !1; } return ee ? (Z.variation_amount = Re, J && (Z.with_variations = A6(J))) : Z.variation_amount = 0, et && (Z.enable_image_debugging = et), { generationParameters: Z, esrganParameters: mt, facetoolParameters: fe }; }; var _M = /d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g, PM = /\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g, EM = /[^-+\dA-Z]/g; function ur(t, e, r, n) { if (arguments.length === 1 && typeof t == "string" && !/\d/.test(t) && (e = t, t = void 0), t = t || t === 0 ? t : new Date(), t instanceof Date || (t = new Date(t)), isNaN(t)) throw TypeError("Invalid date"); e = String(J1[e] || e || J1.default); var i = e.slice(0, 4); (i === "UTC:" || i === "GMT:") && (e = e.slice(4), r = !0, i === "GMT:" && (n = !0)); var a = function() { return r ? "getUTC" : "get"; }, s = function() { return t[a() + "Date"](); }, u = function() { return t[a() + "Day"](); }, c = function() { return t[a() + "Month"](); }, f = function() { return t[a() + "FullYear"](); }, h = function() { return t[a() + "Hours"](); }, d = function() { return t[a() + "Minutes"](); }, g = function() { return t[a() + "Seconds"](); }, v = function() { return t[a() + "Milliseconds"](); }, m = function() { return r ? 0 : t.getTimezoneOffset(); }, b = function() { return TM(t); }, S = function() { return AM(t); }, x = { d: function() { return s(); }, dd: function() { return en(s()); }, ddd: function() { return jr.dayNames[u()]; }, DDD: function() { return Z1({ y: f(), m: c(), d: s(), _: a(), dayName: jr.dayNames[u()], short: !0 }); }, dddd: function() { return jr.dayNames[u() + 7]; }, DDDD: function() { return Z1({ y: f(), m: c(), d: s(), _: a(), dayName: jr.dayNames[u() + 7] }); }, m: function() { return c() + 1; }, mm: function() { return en(c() + 1); }, mmm: function() { return jr.monthNames[c()]; }, mmmm: function() { return jr.monthNames[c() + 12]; }, yy: function() { return String(f()).slice(2); }, yyyy: function() { return en(f(), 4); }, h: function() { return h() % 12 || 12; }, hh: function() { return en(h() % 12 || 12); }, H: function() { return h(); }, HH: function() { return en(h()); }, M: function() { return d(); }, MM: function() { return en(d()); }, s: function() { return g(); }, ss: function() { return en(g()); }, l: function() { return en(v(), 3); }, L: function() { return en(Math.floor(v() / 10)); }, t: function() { return h() < 12 ? jr.timeNames[0] : jr.timeNames[1]; }, tt: function() { return h() < 12 ? jr.timeNames[2] : jr.timeNames[3]; }, T: function() { return h() < 12 ? jr.timeNames[4] : jr.timeNames[5]; }, TT: function() { return h() < 12 ? jr.timeNames[6] : jr.timeNames[7]; }, Z: function() { return n ? "GMT" : r ? "UTC" : OM(t); }, o: function() { return (m() > 0 ? "-" : "+") + en(Math.floor(Math.abs(m()) / 60) * 100 + Math.abs(m()) % 60, 4); }, p: function() { return (m() > 0 ? "-" : "+") + en(Math.floor(Math.abs(m()) / 60), 2) + ":" + en(Math.floor(Math.abs(m()) % 60), 2); }, S: function() { return ["th", "st", "nd", "rd"][s() % 10 > 3 ? 0 : (s() % 100 - s() % 10 != 10) * s() % 10]; }, W: function() { return b(); }, WW: function() { return en(b()); }, N: function() { return S(); } }; return e.replace(_M, function(w) { return w in x ? x[w]() : w.slice(1, w.length - 1); }); } var J1 = { default: "ddd mmm dd yyyy HH:MM:ss", shortDate: "m/d/yy", paddedShortDate: "mm/dd/yyyy", mediumDate: "mmm d, yyyy", longDate: "mmmm d, yyyy", fullDate: "dddd, mmmm d, yyyy", shortTime: "h:MM TT", mediumTime: "h:MM:ss TT", longTime: "h:MM:ss TT Z", isoDate: "yyyy-mm-dd", isoTime: "HH:MM:ss", isoDateTime: "yyyy-mm-dd'T'HH:MM:sso", isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'", expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z" }, jr = { dayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], monthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], timeNames: ["a", "p", "am", "pm", "A", "P", "AM", "PM"] }, en = function(e) { var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2; return String(e).padStart(r, "0"); }, Z1 = function(e) { var r = e.y, n = e.m, i = e.d, a = e._, s = e.dayName, u = e.short, c = u === void 0 ? !1 : u, f = new Date(), h = new Date(); h.setDate(h[a + "Date"]() - 1); var d = new Date(); d.setDate(d[a + "Date"]() + 1); var g = function() { return f[a + "Date"](); }, v = function() { return f[a + "Month"](); }, m = function() { return f[a + "FullYear"](); }, b = function() { return h[a + "Date"](); }, S = function() { return h[a + "Month"](); }, x = function() { return h[a + "FullYear"](); }, w = function() { return d[a + "Date"](); }, _ = function() { return d[a + "Month"](); }, P = function() { return d[a + "FullYear"](); }; return m() === r && v() === n && g() === i ? c ? "Tdy" : "Today" : x() === r && S() === n && b() === i ? c ? "Ysd" : "Yesterday" : P() === r && _() === n && w() === i ? c ? "Tmw" : "Tomorrow" : s; }, TM = function(e) { var r = new Date(e.getFullYear(), e.getMonth(), e.getDate()); r.setDate(r.getDate() - (r.getDay() + 6) % 7 + 3); var n = new Date(r.getFullYear(), 0, 4); n.setDate(n.getDate() - (n.getDay() + 6) % 7 + 3); var i = r.getTimezoneOffset() - n.getTimezoneOffset(); r.setHours(r.getHours() - i); var a = (r - n) / (864e5 * 7); return 1 + Math.floor(a); }, AM = function(e) { var r = e.getDay(); return r === 0 && (r = 7), r; }, OM = function(e) { return (String(e).match(PM) || [""]).pop().replace(EM, "").replace(/GMT\+0000/g, "UTC"); }; const RM = (t, e) => { const { dispatch: r, getState: n } = t; return { emitGenerateImage: (i) => { r(ri(!0)); const a = n(), { generation: s, postprocessing: u, system: c, canvas: f } = a, h = { generationMode: i, generationState: s, postprocessingState: u, canvasState: f, systemState: c }; r(hk()); const { generationParameters: d, esrganParameters: g, facetoolParameters: v } = CM(h); e.emit( "generateImage", d, g, v ), d.init_mask && (d.init_mask = d.init_mask.substr(0, 64).concat("...")), d.init_img && (d.init_img = d.init_img.substr(0, 64).concat("...")), r( or({ timestamp: ur(new Date(), "isoDateTime"), message: `Image generation requested: ${JSON.stringify({ ...d, ...g, ...v })}` }) ); }, emitRunESRGAN: (i) => { r(ri(!0)); const { postprocessing: { upscalingLevel: a, upscalingDenoising: s, upscalingStrength: u } } = n(), c = { upscale: [a, s, u] }; e.emit("runPostprocessing", i, { type: "esrgan", ...c }), r( or({ timestamp: ur(new Date(), "isoDateTime"), message: `ESRGAN upscale requested: ${JSON.stringify({ file: i.url, ...c })}` }) ); }, emitRunFacetool: (i) => { r(ri(!0)); const { postprocessing: { facetoolType: a, facetoolStrength: s, codeformerFidelity: u } } = n(), c = { facetool_strength: s }; a === "codeformer" && (c.codeformer_fidelity = u), e.emit("runPostprocessing", i, { type: a, ...c }), r( or({ timestamp: ur(new Date(), "isoDateTime"), message: `Face restoration (${a}) requested: ${JSON.stringify( { file: i.url, ...c } )}` }) ); }, emitDeleteImage: (i) => { const { url: a, uuid: s, category: u, thumbnail: c } = i; r(NS(i)), e.emit("deleteImage", a, c, s, u); }, emitRequestImages: (i) => { const a = n().gallery, { earliest_mtime: s } = a.categories[i]; e.emit("requestImages", i, s); }, emitRequestNewImages: (i) => { const a = n().gallery, { latest_mtime: s } = a.categories[i]; e.emit("requestLatestImages", i, s); }, emitCancelProcessing: () => { e.emit("cancel"); }, emitRequestSystemConfig: () => { e.emit("requestSystemConfig"); }, emitSearchForModels: (i) => { e.emit("searchForModels", i); }, emitAddNewModel: (i) => { e.emit("addNewModel", i); }, emitDeleteModel: (i) => { e.emit("deleteModel", i); }, emitConvertToDiffusers: (i) => { r(ck()), e.emit("convertToDiffusers", i); }, emitMergeDiffusersModels: (i) => { r(fk()), e.emit("mergeDiffusersModels", i); }, emitRequestModelChange: (i) => { r(lk()), e.emit("requestModelChange", i); }, emitSaveStagingAreaImageToGallery: (i) => { e.emit("requestSaveStagingAreaImageToGallery", i); }, emitRequestEmptyTempFolder: () => { e.emit("requestEmptyTempFolder"); } }; }; let Lc; const kM = new Uint8Array(16); function IM() { if (!Lc && (Lc = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Lc)) throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported"); return Lc(kM); } const pr = []; for (let t = 0; t < 256; ++t) pr.push((t + 256).toString(16).slice(1)); function DM(t, e = 0) { return (pr[t[e + 0]] + pr[t[e + 1]] + pr[t[e + 2]] + pr[t[e + 3]] + "-" + pr[t[e + 4]] + pr[t[e + 5]] + "-" + pr[t[e + 6]] + pr[t[e + 7]] + "-" + pr[t[e + 8]] + pr[t[e + 9]] + "-" + pr[t[e + 10]] + pr[t[e + 11]] + pr[t[e + 12]] + pr[t[e + 13]] + pr[t[e + 14]] + pr[t[e + 15]]).toLowerCase(); } const MM = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), $1 = { randomUUID: MM }; function Nc(t, e, r) { if ($1.randomUUID && !e && !t) return $1.randomUUID(); t = t || {}; const n = t.random || (t.rng || IM)(); if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, e) { r = r || 0; for (let i = 0; i < 16; ++i) e[r + i] = n[i]; return e; } return DM(n); } const sH = Mt( "socketio/generateImage" ), oH = Mt("socketio/runESRGAN"), uH = Mt("socketio/runFacetool"), lH = Mt("socketio/deleteImage"), e2 = Mt( "socketio/requestImages" ), t2 = Mt( "socketio/requestNewImages" ), cH = Mt( "socketio/cancelProcessing" ), LM = Mt( "socketio/requestSystemConfig" ), fH = Mt("socketio/searchForModels"), hH = Mt("socketio/addNewModel"), dH = Mt("socketio/deleteModel"), pH = Mt( "socketio/convertToDiffusers" ), gH = Mt( "socketio/mergeDiffusersModels" ), mH = Mt( "socketio/requestModelChange" ), vH = Mt( "socketio/saveStagingAreaImageToGallery" ), yH = Mt( "socketio/requestEmptyTempFolder" ), NM = (t) => { const { dispatch: e, getState: r } = t; return { /** * Callback to run when we receive a 'connect' event. */ onConnect: () => { try { e(y1(!0)), e(Vs(Ge.t("common.statusConnected"))), e(LM()); const n = r().gallery; n.categories.result.latest_mtime ? e(t2("result")) : e(e2("result")), n.categories.user.latest_mtime ? e(t2("user")) : e(e2("user")); } catch (n) { console.error(n); } }, /** * Callback to run when we receive a 'disconnect' event. */ onDisconnect: () => { try { e(y1(!1)), e(Vs(Ge.t("common.statusDisconnected"))), e( or({ timestamp: ur(new Date(), "isoDateTime"), message: "Disconnected from server", level: "warning" }) ); } catch (n) { console.error(n); } }, /** * Callback to run when we receive a 'generationResult' event. */ onGenerationResult: (n) => { try { const i = r(), { activeTab: a } = i.ui, { shouldLoopback: s } = i.postprocessing, { boundingBox: u, generationMode: c, ...f } = n, h = { uuid: Nc(), ...f }; if (["txt2img", "img2img"].includes(c) && e( yc({ category: "result", image: { ...h, category: "result" } }) ), c === "unifiedCanvas" && n.boundingBox) { const { boundingBox: d } = n; e( m6({ image: { ...h, category: "temp" }, boundingBox: d }) ), i.canvas.shouldAutoSave && e( yc({ image: { ...h, category: "result" }, category: "result" }) ); } if (s) switch (iw[a]) { case "img2img": { e(I6(h)); break; } } e(Wd()), e( or({ timestamp: ur(new Date(), "isoDateTime"), message: `Image generated: ${n.url}` }) ); } catch (i) { console.error(i); } }, /** * Callback to run when we receive a 'intermediateResult' event. */ onIntermediateResult: (n) => { try { e( S6({ uuid: Nc(), ...n, category: "result" }) ), n.isBase64 || e( or({ timestamp: ur(new Date(), "isoDateTime"), message: `Intermediate image generated: ${n.url}` }) ); } catch (i) { console.error(i); } }, /** * Callback to run when we receive an 'esrganResult' event. */ onPostprocessingResult: (n) => { try { e( yc({ category: "result", image: { uuid: Nc(), ...n, category: "result" } }) ), e( or({ timestamp: ur(new Date(), "isoDateTime"), message: `Postprocessed: ${n.url}` }) ); } catch (i) { console.error(i); } }, /** * Callback to run when we receive a 'progressUpdate' event. * TODO: Add additional progress phases */ onProgressUpdate: (n) => { try { e(ri(!0)), e(sk(n)); } catch (i) { console.error(i); } }, /** * Callback to run when we receive a 'progressUpdate' event. */ onError: (n) => { const { message: i, additionalData: a } = n; try { e( or({ timestamp: ur(new Date(), "isoDateTime"), message: `Server error: ${i}`, level: "error" }) ), e(b1()), e(Wd()); } catch (s) { console.error(s); } }, /** * Callback to run when we receive a 'galleryImages' event. */ onGalleryImages: (n) => { const { images: i, areMoreImagesAvailable: a, category: s } = n, u = i.map((c) => ({ uuid: Nc(), ...c })); e( b6({ images: u, areMoreImagesAvailable: a, category: s }) ), e( or({ timestamp: ur(new Date(), "isoDateTime"), message: `Loaded ${i.length} images` }) ); }, /** * Callback to run when we receive a 'processingCanceled' event. */ onProcessingCanceled: () => { e(uk()); const { intermediateImage: n } = r().gallery; n && (n.isBase64 || (e( yc({ category: "result", image: n }) ), e( or({ timestamp: ur(new Date(), "isoDateTime"), message: `Intermediate image saved: ${n.url}` }) )), e(Wd())), e( or({ timestamp: ur(new Date(), "isoDateTime"), message: "Processing canceled", level: "warning" }) ); }, /** * Callback to run when we receive a 'imageDeleted' event. */ onImageDeleted: (n) => { const { url: i } = n; e(NS(n)); const { generation: { initialImage: a, maskPath: s } } = r(); (a === i || (a == null ? void 0 : a.url) === i) && e(R6()), s === i && e(D6("")), e( or({ timestamp: ur(new Date(), "isoDateTime"), message: `Image deleted: ${i}` }) ); }, onSystemConfig: (n) => { e(ok(n)), n.infill_methods.includes("patchmatch") || e(k6(n.infill_methods[0])); }, onFoundModels: (n) => { const { search_folder: i, found_models: a } = n; e(dk(i)), e(pk(a)); }, onNewModelAdded: (n) => { const { new_model_name: i, model_list: a, update: s } = n; e(zs(a)), e(ri(!1)), e(Vs(Ge.t("modelManager.modelAdded"))), e( or({ timestamp: ur(new Date(), "isoDateTime"), message: `Model Added: ${i}`, level: "info" }) ), e( nu({ title: s ? `${Ge.t("modelManager.modelUpdated")}: ${i}` : `${Ge.t("modelManager.modelAdded")}: ${i}`, status: "success", duration: 2500, isClosable: !0 }) ); }, onModelDeleted: (n) => { const { deleted_model_name: i, model_list: a } = n; e(zs(a)), e(ri(!1)), e( or({ timestamp: ur(new Date(), "isoDateTime"), message: `${Ge.t( "modelManager.modelAdded" )}: ${i}`, level: "info" }) ), e( nu({ title: `${Ge.t( "modelManager.modelEntryDeleted" )}: ${i}`, status: "success", duration: 2500, isClosable: !0 }) ); }, onModelConverted: (n) => { const { converted_model_name: i, model_list: a } = n; e(zs(a)), e(Vs(Ge.t("common.statusModelConverted"))), e(ri(!1)), e(wc(!0)), e( or({ timestamp: ur(new Date(), "isoDateTime"), message: `Model converted: ${i}`, level: "info" }) ), e( nu({ title: `${Ge.t( "modelManager.modelConverted" )}: ${i}`, status: "success", duration: 2500, isClosable: !0 }) ); }, onModelsMerged: (n) => { const { merged_models: i, merged_model_name: a, model_list: s } = n; e(zs(s)), e(Vs(Ge.t("common.statusMergedModels"))), e(ri(!1)), e(wc(!0)), e( or({ timestamp: ur(new Date(), "isoDateTime"), message: `Models merged: ${i}`, level: "info" }) ), e( nu({ title: `${Ge.t("modelManager.modelsMerged")}: ${a}`, status: "success", duration: 2500, isClosable: !0 }) ); }, onModelChanged: (n) => { const { model_name: i, model_list: a } = n; e(zs(a)), e(Vs(Ge.t("common.statusModelChanged"))), e(ri(!1)), e(wc(!0)), e( or({ timestamp: ur(new Date(), "isoDateTime"), message: `Model changed: ${i}`, level: "info" }) ); }, onModelChangeFailed: (n) => { const { model_name: i, model_list: a } = n; e(zs(a)), e(ri(!1)), e(wc(!0)), e(b1()), e( or({ timestamp: ur(new Date(), "isoDateTime"), message: `Model change failed: ${i}`, level: "error" }) ); }, onTempFolderEmptied: () => { e( nu({ title: Ge.t("toast.tempFoldersEmptied"), status: "success", duration: 2500, isClosable: !0 }) ); } }; }, BM = () => { const { origin: t } = new URL(window.location.href), e = Jc(t, { timeout: 6e4, path: `${window.location.pathname}socket.io` }); let r = !1; return (i) => (a) => (s) => { const { onConnect: u, onDisconnect: c, onError: f, onPostprocessingResult: h, onGenerationResult: d, onIntermediateResult: g, onProgressUpdate: v, onGalleryImages: m, onProcessingCanceled: b, onImageDeleted: S, onSystemConfig: x, onModelChanged: w, onFoundModels: _, onNewModelAdded: P, onModelDeleted: E, onModelConverted: k, onModelsMerged: D, onModelChangeFailed: V, onTempFolderEmptied: H } = NM(i), { emitGenerateImage: W, emitRunESRGAN: K, emitRunFacetool: ie, emitDeleteImage: F, emitRequestImages: O, emitRequestNewImages: N, emitCancelProcessing: j, emitRequestSystemConfig: J, emitSearchForModels: te, emitAddNewModel: ee, emitDeleteModel: ae, emitConvertToDiffusers: le, emitMergeDiffusersModels: Ce, emitRequestModelChange: we, emitSaveStagingAreaImageToGallery: Re, emitRequestEmptyTempFolder: ke } = RM(i, e); switch (r || (e.on("connect", () => u()), e.on("disconnect", () => c()), e.on("error", (ve) => f(ve)), e.on( "generationResult", (ve) => d(ve) ), e.on( "postprocessingResult", (ve) => h(ve) ), e.on( "intermediateResult", (ve) => g(ve) ), e.on( "progressUpdate", (ve) => v(ve) ), e.on( "galleryImages", (ve) => m(ve) ), e.on("processingCanceled", () => { b(); }), e.on("imageDeleted", (ve) => { S(ve); }), e.on("systemConfig", (ve) => { x(ve); }), e.on("foundModels", (ve) => { _(ve); }), e.on("newModelAdded", (ve) => { P(ve); }), e.on("modelDeleted", (ve) => { E(ve); }), e.on("modelConverted", (ve) => { k(ve); }), e.on("modelsMerged", (ve) => { D(ve); }), e.on("modelChanged", (ve) => { w(ve); }), e.on("modelChangeFailed", (ve) => { V(ve); }), e.on("tempFolderEmptied", () => { H(); }), r = !0), s.type) { case "socketio/generateImage": { W(s.payload); break; } case "socketio/runESRGAN": { K(s.payload); break; } case "socketio/runFacetool": { ie(s.payload); break; } case "socketio/deleteImage": { F(s.payload); break; } case "socketio/requestImages": { O(s.payload); break; } case "socketio/requestNewImages": { N(s.payload); break; } case "socketio/cancelProcessing": { j(); break; } case "socketio/requestSystemConfig": { J(); break; } case "socketio/searchForModels": { te(s.payload); break; } case "socketio/addNewModel": { ee(s.payload); break; } case "socketio/deleteModel": { ae(s.payload); break; } case "socketio/convertToDiffusers": { le(s.payload); break; } case "socketio/mergeDiffusersModels": { Ce(s.payload); break; } case "socketio/requestModelChange": { we(s.payload); break; } case "socketio/saveStagingAreaImageToGallery": { Re(s.payload); break; } case "socketio/requestEmptyTempFolder": { ke(); break; } } a(s); }; }, FM = [ "cursorPosition", "isCanvasInitialized", "doesCanvasNeedScaling" ].map((t) => `canvas.${t}`), jM = [ "currentIteration", "currentStatus", "currentStep", "isCancelable", "isConnected", "isESRGANAvailable", "isGFPGANAvailable", "isProcessing", "socketId", "totalIterations", "totalSteps", "openModel", "cancelOptions.cancelAfter" ].map((t) => `system.${t}`), VM = [ "categories", "currentCategory", "currentImage", "currentImageUuid", "shouldAutoSwitchToNewImages", "intermediateImage" ].map((t) => `gallery.${t}`), zM = ["isLightboxOpen"].map( (t) => `lightbox.${t}` ), rx = pS({ generation: M6, postprocessing: N6, gallery: w6, system: gk, canvas: v6, ui: bk, lightbox: _6 }), GM = kS.getPersistConfig({ key: "root", storage: RS, rootReducer: rx, blacklist: [ ...FM, ...jM, ...VM, ...zM ], debounce: 300 }), WM = Q5(GM, rx), nx = E5({ reducer: WM, middleware: (t) => t({ immutableCheck: !1, serializableCheck: !1 }).concat(BM()), devTools: { // Uncommenting these very rapidly called actions makes the redux dev tools output much more readable actionsDenylist: [ "canvas/setCursorPosition", "canvas/setStageCoordinates", "canvas/setStageScale", "canvas/setIsDrawing", "canvas/setBoundingBoxCoordinates", "canvas/setBoundingBoxDimensions", "canvas/setIsDrawing", "canvas/addPointToCurrentLine" ] } }), UM = r6(nx); function HM(t) { if (t.sheet) return t.sheet; for (var e = 0; e < document.styleSheets.length; e++) if (document.styleSheets[e].ownerNode === t) return document.styleSheets[e]; } function YM(t) { var e = document.createElement("style"); return e.setAttribute("data-emotion", t.key), t.nonce !== void 0 && e.setAttribute("nonce", t.nonce), e.appendChild(document.createTextNode("")), e.setAttribute("data-s", ""), e; } var qM = /* @__PURE__ */ function() { function t(r) { var n = this; this._insertTag = function(i) { var a; n.tags.length === 0 ? n.insertionPoint ? a = n.insertionPoint.nextSibling : n.prepend ? a = n.container.firstChild : a = n.before : a = n.tags[n.tags.length - 1].nextSibling, n.container.insertBefore(i, a), n.tags.push(i); }, this.isSpeedy = r.speedy === void 0 ? process.env.NODE_ENV === "production" : r.speedy, this.tags = [], this.ctr = 0, this.nonce = r.nonce, this.key = r.key, this.container = r.container, this.prepend = r.prepend, this.insertionPoint = r.insertionPoint, this.before = null; } var e = t.prototype; return e.hydrate = function(n) { n.forEach(this._insertTag); }, e.insert = function(n) { this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(YM(this)); var i = this.tags[this.tags.length - 1]; if (process.env.NODE_ENV !== "production") { var a = n.charCodeAt(0) === 64 && n.charCodeAt(1) === 105; a && this._alreadyInsertedOrderInsensitiveRule && console.error(`You're attempting to insert the following rule: ` + n + "\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."), this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !a; } if (this.isSpeedy) { var s = HM(i); try { s.insertRule(n, s.cssRules.length); } catch (u) { process.env.NODE_ENV !== "production" && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(n) && console.error('There was a problem inserting the following rule: "' + n + '"', u); } } else i.appendChild(document.createTextNode(n)); this.ctr++; }, e.flush = function() { this.tags.forEach(function(n) { return n.parentNode && n.parentNode.removeChild(n); }), this.tags = [], this.ctr = 0, process.env.NODE_ENV !== "production" && (this._alreadyInsertedOrderInsensitiveRule = !1); }, t; }(), xr = "-ms-", xf = "-moz-", st = "-webkit-", tm = "comm", rm = "rule", nm = "decl", KM = "@import", ix = "@keyframes", XM = Math.abs, Kf = String.fromCharCode, QM = Object.assign; function JM(t, e) { return mr(t, 0) ^ 45 ? (((e << 2 ^ mr(t, 0)) << 2 ^ mr(t, 1)) << 2 ^ mr(t, 2)) << 2 ^ mr(t, 3) : 0; } function ax(t) { return t.trim(); } function ZM(t, e) { return (t = e.exec(t)) ? t[0] : t; } function pt(t, e, r) { return t.replace(e, r); } function Jp(t, e) { return t.indexOf(e); } function mr(t, e) { return t.charCodeAt(e) | 0; } function Gu(t, e, r) { return t.slice(e, r); } function ni(t) { return t.length; } function im(t) { return t.length; } function Bc(t, e) { return e.push(t), t; } function $M(t, e) { return t.map(e).join(""); } var Xf = 1, so = 1, sx = 0, Gr = 0, Xt = 0, wo = ""; function Qf(t, e, r, n, i, a, s) { return { value: t, root: e, parent: r, type: n, props: i, children: a, line: Xf, column: so, length: s, return: "" }; } function cu(t, e) { return QM(Qf("", null, null, "", null, null, 0), t, { length: -t.length }, e); } function eL() { return Xt; } function tL() { return Xt = Gr > 0 ? mr(wo, --Gr) : 0, so--, Xt === 10 && (so = 1, Xf--), Xt; } function nn() { return Xt = Gr < sx ? mr(wo, Gr++) : 0, so++, Xt === 10 && (so = 1, Xf++), Xt; } function li() { return mr(wo, Gr); } function tf() { return Gr; } function tl(t, e) { return Gu(wo, t, e); } function Wu(t) { switch (t) { case 0: case 9: case 10: case 13: case 32: return 5; case 33: case 43: case 44: case 47: case 62: case 64: case 126: case 59: case 123: case 125: return 4; case 58: return 3; case 34: case 39: case 40: case 91: return 2; case 41: case 93: return 1; } return 0; } function ox(t) { return Xf = so = 1, sx = ni(wo = t), Gr = 0, []; } function ux(t) { return wo = "", t; } function rf(t) { return ax(tl(Gr - 1, Zp(t === 91 ? t + 2 : t === 40 ? t + 1 : t))); } function rL(t) { for (; (Xt = li()) && Xt < 33; ) nn(); return Wu(t) > 2 || Wu(Xt) > 3 ? "" : " "; } function nL(t, e) { for (; --e && nn() && !(Xt < 48 || Xt > 102 || Xt > 57 && Xt < 65 || Xt > 70 && Xt < 97); ) ; return tl(t, tf() + (e < 6 && li() == 32 && nn() == 32)); } function Zp(t) { for (; nn(); ) switch (Xt) { case t: return Gr; case 34: case 39: t !== 34 && t !== 39 && Zp(Xt); break; case 40: t === 41 && Zp(t); break; case 92: nn(); break; } return Gr; } function iL(t, e) { for (; nn() && t + Xt !== 47 + 10; ) if (t + Xt === 42 + 42 && li() === 47) break; return "/*" + tl(e, Gr - 1) + "*" + Kf(t === 47 ? t : nn()); } function aL(t) { for (; !Wu(li()); ) nn(); return tl(t, Gr); } function sL(t) { return ux(nf("", null, null, null, [""], t = ox(t), 0, [0], t)); } function nf(t, e, r, n, i, a, s, u, c) { for (var f = 0, h = 0, d = s, g = 0, v = 0, m = 0, b = 1, S = 1, x = 1, w = 0, _ = "", P = i, E = a, k = n, D = _; S; ) switch (m = w, w = nn()) { case 40: if (m != 108 && mr(D, d - 1) == 58) { Jp(D += pt(rf(w), "&", "&\f"), "&\f") != -1 && (x = -1); break; } case 34: case 39: case 91: D += rf(w); break; case 9: case 10: case 13: case 32: D += rL(m); break; case 92: D += nL(tf() - 1, 7); continue; case 47: switch (li()) { case 42: case 47: Bc(oL(iL(nn(), tf()), e, r), c); break; default: D += "/"; } break; case 123 * b: u[f++] = ni(D) * x; case 125 * b: case 59: case 0: switch (w) { case 0: case 125: S = 0; case 59 + h: v > 0 && ni(D) - d && Bc(v > 32 ? n2(D + ";", n, r, d - 1) : n2(pt(D, " ", "") + ";", n, r, d - 2), c); break; case 59: D += ";"; default: if (Bc(k = r2(D, e, r, f, h, i, u, _, P = [], E = [], d), a), w === 123) if (h === 0) nf(D, e, k, k, P, a, d, u, E); else switch (g === 99 && mr(D, 3) === 110 ? 100 : g) { case 100: case 109: case 115: nf(t, k, k, n && Bc(r2(t, k, k, 0, 0, i, u, _, i, P = [], d), E), i, E, d, u, n ? P : E); break; default: nf(D, k, k, k, [""], E, 0, u, E); } } f = h = v = 0, b = x = 1, _ = D = "", d = s; break; case 58: d = 1 + ni(D), v = m; default: if (b < 1) { if (w == 123) --b; else if (w == 125 && b++ == 0 && tL() == 125) continue; } switch (D += Kf(w), w * b) { case 38: x = h > 0 ? 1 : (D += "\f", -1); break; case 44: u[f++] = (ni(D) - 1) * x, x = 1; break; case 64: li() === 45 && (D += rf(nn())), g = li(), h = d = ni(_ = D += aL(tf())), w++; break; case 45: m === 45 && ni(D) == 2 && (b = 0); } } return a; } function r2(t, e, r, n, i, a, s, u, c, f, h) { for (var d = i - 1, g = i === 0 ? a : [""], v = im(g), m = 0, b = 0, S = 0; m < n; ++m) for (var x = 0, w = Gu(t, d + 1, d = XM(b = s[m])), _ = t; x < v; ++x) (_ = ax(b > 0 ? g[x] + " " + w : pt(w, /&\f/g, g[x]))) && (c[S++] = _); return Qf(t, e, r, i === 0 ? rm : u, c, f, h); } function oL(t, e, r) { return Qf(t, e, r, tm, Kf(eL()), Gu(t, 2, -2), 0); } function n2(t, e, r, n) { return Qf(t, e, r, nm, Gu(t, 0, n), Gu(t, n + 1, -1), n); } function ro(t, e) { for (var r = "", n = im(t), i = 0; i < n; i++) r += e(t[i], i, t, e) || ""; return r; } function uL(t, e, r, n) { switch (t.type) { case KM: case nm: return t.return = t.return || t.value; case tm: return ""; case ix: return t.return = t.value + "{" + ro(t.children, n) + "}"; case rm: t.value = t.props.join(","); } return ni(r = ro(t.children, n)) ? t.return = t.value + "{" + r + "}" : ""; } function lL(t) { var e = im(t); return function(r, n, i, a) { for (var s = "", u = 0; u < e; u++) s += t[u](r, n, i, a) || ""; return s; }; } function cL(t) { return function(e) { e.root || (e = e.return) && t(e); }; } var i2 = function(e) { var r = /* @__PURE__ */ new WeakMap(); return function(n) { if (r.has(n)) return r.get(n); var i = e(n); return r.set(n, i), i; }; }; function lx(t) { var e = /* @__PURE__ */ Object.create(null); return function(r) { return e[r] === void 0 && (e[r] = t(r)), e[r]; }; } var fL = function(e, r, n) { for (var i = 0, a = 0; i = a, a = li(), i === 38 && a === 12 && (r[n] = 1), !Wu(a); ) nn(); return tl(e, Gr); }, hL = function(e, r) { var n = -1, i = 44; do switch (Wu(i)) { case 0: i === 38 && li() === 12 && (r[n] = 1), e[n] += fL(Gr - 1, r, n); break; case 2: e[n] += rf(i); break; case 4: if (i === 44) { e[++n] = li() === 58 ? "&\f" : "", r[n] = e[n].length; break; } default: e[n] += Kf(i); } while (i = nn()); return e; }, dL = function(e, r) { return ux(hL(ox(e), r)); }, a2 = /* @__PURE__ */ new WeakMap(), pL = function(e) { if (!(e.type !== "rule" || !e.parent || // positive .length indicates that this rule contains pseudo // negative .length indicates that this rule has been already prefixed e.length < 1)) { for (var r = e.value, n = e.parent, i = e.column === n.column && e.line === n.line; n.type !== "rule"; ) if (n = n.parent, !n) return; if (!(e.props.length === 1 && r.charCodeAt(0) !== 58 && !a2.get(n)) && !i) { a2.set(e, !0); for (var a = [], s = dL(r, a), u = n.props, c = 0, f = 0; c < s.length; c++) for (var h = 0; h < u.length; h++, f++) e.props[f] = a[c] ? s[c].replace(/&\f/g, u[h]) : u[h] + " " + s[c]; } } }, gL = function(e) { if (e.type === "decl") { var r = e.value; // charcode for l r.charCodeAt(0) === 108 && // charcode for b r.charCodeAt(2) === 98 && (e.return = "", e.value = ""); } }, mL = "emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason", vL = function(e) { return e.type === "comm" && e.children.indexOf(mL) > -1; }, yL = function(e) { return function(r, n, i) { if (!(r.type !== "rule" || e.compat)) { var a = r.value.match(/(:first|:nth|:nth-last)-child/g); if (a) { for (var s = r.parent === i[0], u = s ? i[0].children : ( // global rule at the root level i ), c = u.length - 1; c >= 0; c--) { var f = u[c]; if (f.line < r.line) break; if (f.column < r.column) { if (vL(f)) return; break; } } a.forEach(function(h) { console.error('The pseudo class "' + h + '" is potentially unsafe when doing server-side rendering. Try changing it to "' + h.split("-child")[0] + '-of-type".'); }); } } }; }, cx = function(e) { return e.type.charCodeAt(1) === 105 && e.type.charCodeAt(0) === 64; }, bL = function(e, r) { for (var n = e - 1; n >= 0; n--) if (!cx(r[n])) return !0; return !1; }, s2 = function(e) { e.type = "", e.value = "", e.return = "", e.children = "", e.props = ""; }, SL = function(e, r, n) { cx(e) && (e.parent ? (console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."), s2(e)) : bL(r, n) && (console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."), s2(e))); }; function fx(t, e) { switch (JM(t, e)) { case 5103: return st + "print-" + t + t; case 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921: case 5572: case 6356: case 5844: case 3191: case 6645: case 3005: case 6391: case 5879: case 5623: case 6135: case 4599: case 4855: case 4215: case 6389: case 5109: case 5365: case 5621: case 3829: return st + t + t; case 5349: case 4246: case 4810: case 6968: case 2756: return st + t + xf + t + xr + t + t; case 6828: case 4268: return st + t + xr + t + t; case 6165: return st + t + xr + "flex-" + t + t; case 5187: return st + t + pt(t, /(\w+).+(:[^]+)/, st + "box-$1$2" + xr + "flex-$1$2") + t; case 5443: return st + t + xr + "flex-item-" + pt(t, /flex-|-self/, "") + t; case 4675: return st + t + xr + "flex-line-pack" + pt(t, /align-content|flex-|-self/, "") + t; case 5548: return st + t + xr + pt(t, "shrink", "negative") + t; case 5292: return st + t + xr + pt(t, "basis", "preferred-size") + t; case 6060: return st + "box-" + pt(t, "-grow", "") + st + t + xr + pt(t, "grow", "positive") + t; case 4554: return st + pt(t, /([^-])(transform)/g, "$1" + st + "$2") + t; case 6187: return pt(pt(pt(t, /(zoom-|grab)/, st + "$1"), /(image-set)/, st + "$1"), t, "") + t; case 5495: case 3959: return pt(t, /(image-set\([^]*)/, st + "$1$`$1"); case 4968: return pt(pt(t, /(.+:)(flex-)?(.*)/, st + "box-pack:$3" + xr + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + st + t + t; case 4095: case 3583: case 4068: case 2532: return pt(t, /(.+)-inline(.+)/, st + "$1$2") + t; case 8116: case 7059: case 5753: case 5535: case 5445: case 5701: case 4933: case 4677: case 5533: case 5789: case 5021: case 4765: if (ni(t) - 1 - e > 6) switch (mr(t, e + 1)) { case 109: if (mr(t, e + 4) !== 45) break; case 102: return pt(t, /(.+:)(.+)-([^]+)/, "$1" + st + "$2-$3$1" + xf + (mr(t, e + 3) == 108 ? "$3" : "$2-$3")) + t; case 115: return ~Jp(t, "stretch") ? fx(pt(t, "stretch", "fill-available"), e) + t : t; } break; case 4949: if (mr(t, e + 1) !== 115) break; case 6444: switch (mr(t, ni(t) - 3 - (~Jp(t, "!important") && 10))) { case 107: return pt(t, ":", ":" + st) + t; case 101: return pt(t, /(.+:)([^;!]+)(;|!.+)?/, "$1" + st + (mr(t, 14) === 45 ? "inline-" : "") + "box$3$1" + st + "$2$3$1" + xr + "$2box$3") + t; } break; case 5936: switch (mr(t, e + 11)) { case 114: return st + t + xr + pt(t, /[svh]\w+-[tblr]{2}/, "tb") + t; case 108: return st + t + xr + pt(t, /[svh]\w+-[tblr]{2}/, "tb-rl") + t; case 45: return st + t + xr + pt(t, /[svh]\w+-[tblr]{2}/, "lr") + t; } return st + t + xr + t + t; } return t; } var wL = function(e, r, n, i) { if (e.length > -1 && !e.return) switch (e.type) { case nm: e.return = fx(e.value, e.length); break; case ix: return ro([cu(e, { value: pt(e.value, "@", "@" + st) })], i); case rm: if (e.length) return $M(e.props, function(a) { switch (ZM(a, /(::plac\w+|:read-\w+)/)) { case ":read-only": case ":read-write": return ro([cu(e, { props: [pt(a, /:(read-\w+)/, ":" + xf + "$1")] })], i); case "::placeholder": return ro([cu(e, { props: [pt(a, /:(plac\w+)/, ":" + st + "input-$1")] }), cu(e, { props: [pt(a, /:(plac\w+)/, ":" + xf + "$1")] }), cu(e, { props: [pt(a, /:(plac\w+)/, xr + "input-$1")] })], i); } return ""; }); } }, xL = [wL], CL = function(e) { var r = e.key; if (process.env.NODE_ENV !== "production" && !r) throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache. If multiple caches share the same key they might "fight" for each other's style elements.`); if (r === "css") { var n = document.querySelectorAll("style[data-emotion]:not([data-s])"); Array.prototype.forEach.call(n, function(b) { var S = b.getAttribute("data-emotion"); S.indexOf(" ") !== -1 && (document.head.appendChild(b), b.setAttribute("data-s", "")); }); } var i = e.stylisPlugins || xL; if (process.env.NODE_ENV !== "production" && /[^a-z-]/.test(r)) throw new Error('Emotion key must only contain lower case alphabetical characters and - but "' + r + '" was passed'); var a = {}, s, u = []; s = e.container || document.head, Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which // means that the style elements we're looking at are only Emotion 11 server-rendered style elements document.querySelectorAll('style[data-emotion^="' + r + ' "]'), function(b) { for (var S = b.getAttribute("data-emotion").split(" "), x = 1; x < S.length; x++) a[S[x]] = !0; u.push(b); } ); var c, f = [pL, gL]; process.env.NODE_ENV !== "production" && f.push(yL({ get compat() { return m.compat; } }), SL); { var h, d = [uL, process.env.NODE_ENV !== "production" ? function(b) { b.root || (b.return ? h.insert(b.return) : b.value && b.type !== tm && h.insert(b.value + "{}")); } : cL(function(b) { h.insert(b); })], g = lL(f.concat(i, d)), v = function(S) { return ro(sL(S), g); }; c = function(S, x, w, _) { h = w, process.env.NODE_ENV !== "production" && x.map !== void 0 && (h = { insert: function(E) { w.insert(E + x.map); } }), v(S ? S + "{" + x.styles + "}" : x.styles), _ && (m.inserted[x.name] = !0); }; } var m = { key: r, sheet: new qM({ key: r, container: s, nonce: e.nonce, speedy: e.speedy, prepend: e.prepend, insertionPoint: e.insertionPoint }), nonce: e.nonce, inserted: a, registered: {}, insert: c }; return m.sheet.hydrate(u), m; }, _L = !0; function am(t, e, r) { var n = ""; return r.split(" ").forEach(function(i) { t[i] !== void 0 ? e.push(t[i] + ";") : n += i + " "; }), n; } var Jf = function(e, r, n) { var i = e.key + "-" + r.name; // we only need to add the styles to the registered cache if the // class name could be used further down // the tree but if it's a string tag, we know it won't // so we don't have to add it to registered cache. // this improves memory usage since we can avoid storing the whole style string (n === !1 || // we need to always store it if we're in compat mode and // in node since emotion-server relies on whether a style is in // the registered cache to know whether a style is global or not // also, note that this check will be dead code eliminated in the browser _L === !1) && e.registered[i] === void 0 && (e.registered[i] = r.styles); }, Zf = function(e, r, n) { Jf(e, r, n); var i = e.key + "-" + r.name; if (e.inserted[r.name] === void 0) { var a = r; do e.insert(r === a ? "." + i : "", a, e.sheet, !0), a = a.next; while (a !== void 0); } }; function PL(t) { for (var e = 0, r, n = 0, i = t.length; i >= 4; ++n, i -= 4) r = t.charCodeAt(n) & 255 | (t.charCodeAt(++n) & 255) << 8 | (t.charCodeAt(++n) & 255) << 16 | (t.charCodeAt(++n) & 255) << 24, r = /* Math.imul(k, m): */ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), r ^= /* k >>> r: */ r >>> 24, e = /* Math.imul(k, m): */ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */ (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16); switch (i) { case 3: e ^= (t.charCodeAt(n + 2) & 255) << 16; case 2: e ^= (t.charCodeAt(n + 1) & 255) << 8; case 1: e ^= t.charCodeAt(n) & 255, e = /* Math.imul(h, m): */ (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16); } return e ^= e >>> 13, e = /* Math.imul(h, m): */ (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16), ((e ^ e >>> 15) >>> 0).toString(36); } var EL = { animationIterationCount: 1, borderImageOutset: 1, borderImageSlice: 1, borderImageWidth: 1, boxFlex: 1, boxFlexGroup: 1, boxOrdinalGroup: 1, columnCount: 1, columns: 1, flex: 1, flexGrow: 1, flexPositive: 1, flexShrink: 1, flexNegative: 1, flexOrder: 1, gridRow: 1, gridRowEnd: 1, gridRowSpan: 1, gridRowStart: 1, gridColumn: 1, gridColumnEnd: 1, gridColumnSpan: 1, gridColumnStart: 1, msGridRow: 1, msGridRowSpan: 1, msGridColumn: 1, msGridColumnSpan: 1, fontWeight: 1, lineHeight: 1, opacity: 1, order: 1, orphans: 1, tabSize: 1, widows: 1, zIndex: 1, zoom: 1, WebkitLineClamp: 1, // SVG-related properties fillOpacity: 1, floodOpacity: 1, stopOpacity: 1, strokeDasharray: 1, strokeDashoffset: 1, strokeMiterlimit: 1, strokeOpacity: 1, strokeWidth: 1 }, o2 = `You have illegal escape sequence in your template literal, most likely inside content's property value. Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';". You can read more about this here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`, TL = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).", AL = /[A-Z]|^ms/g, hx = /_EMO_([^_]+?)_([^]*?)_EMO_/g, sm = function(e) { return e.charCodeAt(1) === 45; }, u2 = function(e) { return e != null && typeof e != "boolean"; }, tp = /* @__PURE__ */ lx(function(t) { return sm(t) ? t : t.replace(AL, "-$&").toLowerCase(); }), Cf = function(e, r) { switch (e) { case "animation": case "animationName": if (typeof r == "string") return r.replace(hx, function(n, i, a) { return zn = { name: i, styles: a, next: zn }, i; }); } return EL[e] !== 1 && !sm(e) && typeof r == "number" && r !== 0 ? r + "px" : r; }; if (process.env.NODE_ENV !== "production") { var OL = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/, RL = ["normal", "none", "initial", "inherit", "unset"], kL = Cf, IL = /^-ms-/, DL = /-(.)/g, l2 = {}; Cf = function(e, r) { if (e === "content" && (typeof r != "string" || RL.indexOf(r) === -1 && !OL.test(r) && (r.charAt(0) !== r.charAt(r.length - 1) || r.charAt(0) !== '"' && r.charAt(0) !== "'"))) throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + r + "\"'`"); var n = kL(e, r); return n !== "" && !sm(e) && e.indexOf("-") !== -1 && l2[e] === void 0 && (l2[e] = !0, console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + e.replace(IL, "ms-").replace(DL, function(i, a) { return a.toUpperCase(); }) + "?")), n; }; } var dx = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform."; function Uu(t, e, r) { if (r == null) return ""; if (r.__emotion_styles !== void 0) { if (process.env.NODE_ENV !== "production" && r.toString() === "NO_COMPONENT_SELECTOR") throw new Error(dx); return r; } switch (typeof r) { case "boolean": return ""; case "object": { if (r.anim === 1) return zn = { name: r.name, styles: r.styles, next: zn }, r.name; if (r.styles !== void 0) { var n = r.next; if (n !== void 0) for (; n !== void 0; ) zn = { name: n.name, styles: n.styles, next: zn }, n = n.next; var i = r.styles + ";"; return process.env.NODE_ENV !== "production" && r.map !== void 0 && (i += r.map), i; } return ML(t, e, r); } case "function": { if (t !== void 0) { var a = zn, s = r(t); return zn = a, Uu(t, e, s); } else process.env.NODE_ENV !== "production" && console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"); break; } case "string": if (process.env.NODE_ENV !== "production") { var u = [], c = r.replace(hx, function(h, d, g) { var v = "animation" + u.length; return u.push("const " + v + " = keyframes`" + g.replace(/^@keyframes animation-\w+/, "") + "`"), "${" + v + "}"; }); u.length && console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n" + [].concat(u, ["`" + c + "`"]).join(` `) + ` You should wrap it with \`css\` like this: ` + ("css`" + c + "`")); } break; } if (e == null) return r; var f = e[r]; return f !== void 0 ? f : r; } function ML(t, e, r) { var n = ""; if (Array.isArray(r)) for (var i = 0; i < r.length; i++) n += Uu(t, e, r[i]) + ";"; else for (var a in r) { var s = r[a]; if (typeof s != "object") e != null && e[s] !== void 0 ? n += a + "{" + e[s] + "}" : u2(s) && (n += tp(a) + ":" + Cf(a, s) + ";"); else { if (a === "NO_COMPONENT_SELECTOR" && process.env.NODE_ENV !== "production") throw new Error(dx); if (Array.isArray(s) && typeof s[0] == "string" && (e == null || e[s[0]] === void 0)) for (var u = 0; u < s.length; u++) u2(s[u]) && (n += tp(a) + ":" + Cf(a, s[u]) + ";"); else { var c = Uu(t, e, s); switch (a) { case "animation": case "animationName": { n += tp(a) + ":" + c + ";"; break; } default: process.env.NODE_ENV !== "production" && a === "undefined" && console.error(TL), n += a + "{" + c + "}"; } } } } return n; } var c2 = /label:\s*([^\s;\n{]+)\s*(;|$)/g, px; process.env.NODE_ENV !== "production" && (px = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g); var zn, oo = function(e, r, n) { if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0) return e[0]; var i = !0, a = ""; zn = void 0; var s = e[0]; s == null || s.raw === void 0 ? (i = !1, a += Uu(n, r, s)) : (process.env.NODE_ENV !== "production" && s[0] === void 0 && console.error(o2), a += s[0]); for (var u = 1; u < e.length; u++) a += Uu(n, r, e[u]), i && (process.env.NODE_ENV !== "production" && s[u] === void 0 && console.error(o2), a += s[u]); var c; process.env.NODE_ENV !== "production" && (a = a.replace(px, function(g) { return c = g, ""; })), c2.lastIndex = 0; for (var f = "", h; (h = c2.exec(a)) !== null; ) f += "-" + // $FlowFixMe we know it's not null h[1]; var d = PL(a) + f; return process.env.NODE_ENV !== "production" ? { name: d, styles: a, map: c, next: zn, toString: function() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } } : { name: d, styles: a, next: zn }; }, LL = function(e) { return e(); }, gx = gr["useInsertionEffect"] ? gr["useInsertionEffect"] : !1, om = gx || LL, f2 = gx || Ff, NL = {}.hasOwnProperty, um = /* @__PURE__ */ On( // we're doing this to avoid preconstruct's dead code elimination in this one case // because this module is primarily intended for the browser and node // but it's also required in react native and similar environments sometimes // and we could have a special build just for that // but this is much easier and the native packages // might use a different theme context in the future anyway typeof HTMLElement < "u" ? /* @__PURE__ */ CL({ key: "css" }) : null ); process.env.NODE_ENV !== "production" && (um.displayName = "EmotionCacheContext"); um.Provider; var $f = function(e) { return /* @__PURE__ */ kg(function(r, n) { var i = bt(um); return e(r, i, n); }); }, ma = /* @__PURE__ */ On({}); process.env.NODE_ENV !== "production" && (ma.displayName = "EmotionThemeContext"); var BL = function(e, r) { if (typeof r == "function") { var n = r(e); if (process.env.NODE_ENV !== "production" && (n == null || typeof n != "object" || Array.isArray(n))) throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!"); return n; } if (process.env.NODE_ENV !== "production" && (r == null || typeof r != "object" || Array.isArray(r))) throw new Error("[ThemeProvider] Please make your theme prop a plain object"); return ff({}, e, r); }, FL = /* @__PURE__ */ i2(function(t) { return i2(function(e) { return BL(t, e); }); }), bH = function(e) { var r = bt(ma); return e.theme !== r && (r = FL(r)(e.theme)), /* @__PURE__ */ si(ma.Provider, { value: r }, e.children); }, h2 = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", d2 = "__EMOTION_LABEL_PLEASE_DO_NOT_USE__", jL = function(e) { var r = e.cache, n = e.serialized, i = e.isStringTag; return Jf(r, n, i), om(function() { return Zf(r, n, i); }), null; }, VL = /* @__PURE__ */ $f(function(t, e, r) { var n = t.css; typeof n == "string" && e.registered[n] !== void 0 && (n = e.registered[n]); var i = t[h2], a = [n], s = ""; typeof t.className == "string" ? s = am(e.registered, a, t.className) : t.className != null && (s = t.className + " "); var u = oo(a, void 0, bt(ma)); if (process.env.NODE_ENV !== "production" && u.name.indexOf("-") === -1) { var c = t[d2]; c && (u = oo([u, "label:" + c + ";"])); } s += e.key + "-" + u.name; var f = {}; for (var h in t) NL.call(t, h) && h !== "css" && h !== h2 && (process.env.NODE_ENV === "production" || h !== d2) && (f[h] = t[h]); return f.ref = r, f.className = s, /* @__PURE__ */ si(jf, null, /* @__PURE__ */ si(jL, { cache: e, serialized: u, isStringTag: typeof i == "string" }), /* @__PURE__ */ si(i, f)); }); process.env.NODE_ENV !== "production" && (VL.displayName = "EmotionCssPropInternal"); var zL = { name: "@emotion/react", version: "11.10.6", main: "dist/emotion-react.cjs.js", module: "dist/emotion-react.esm.js", browser: { "./dist/emotion-react.esm.js": "./dist/emotion-react.browser.esm.js" }, exports: { ".": { module: { worker: "./dist/emotion-react.worker.esm.js", browser: "./dist/emotion-react.browser.esm.js", default: "./dist/emotion-react.esm.js" }, default: "./dist/emotion-react.cjs.js" }, "./jsx-runtime": { module: { worker: "./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js", browser: "./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js", default: "./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js" }, default: "./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js" }, "./_isolated-hnrs": { module: { worker: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js", browser: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js", default: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js" }, default: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js" }, "./jsx-dev-runtime": { module: { worker: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js", browser: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js", default: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js" }, default: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js" }, "./package.json": "./package.json", "./types/css-prop": "./types/css-prop.d.ts", "./macro": "./macro.js" }, types: "types/index.d.ts", files: [ "src", "dist", "jsx-runtime", "jsx-dev-runtime", "_isolated-hnrs", "types/*.d.ts", "macro.js", "macro.d.ts", "macro.js.flow" ], sideEffects: !1, author: "Emotion Contributors", license: "MIT", scripts: { "test:typescript": "dtslint types" }, dependencies: { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.10.6", "@emotion/cache": "^11.10.5", "@emotion/serialize": "^1.1.1", "@emotion/use-insertion-effect-with-fallbacks": "^1.0.0", "@emotion/utils": "^1.2.0", "@emotion/weak-memoize": "^0.3.0", "hoist-non-react-statics": "^3.3.1" }, peerDependencies: { react: ">=16.8.0" }, peerDependenciesMeta: { "@types/react": { optional: !0 } }, devDependencies: { "@definitelytyped/dtslint": "0.0.112", "@emotion/css": "11.10.6", "@emotion/css-prettifier": "1.1.1", "@emotion/server": "11.10.0", "@emotion/styled": "11.10.6", "html-tag-names": "^1.1.2", react: "16.14.0", "svg-tag-names": "^1.1.1", typescript: "^4.5.5" }, repository: "https://github.com/emotion-js/emotion/tree/main/packages/react", publishConfig: { access: "public" }, "umd:main": "dist/emotion-react.umd.min.js", preconstruct: { entrypoints: [ "./index.js", "./jsx-runtime.js", "./jsx-dev-runtime.js", "./_isolated-hnrs.js" ], umdName: "emotionReact", exports: { envConditions: [ "browser", "worker" ], extra: { "./types/css-prop": "./types/css-prop.d.ts", "./macro": "./macro.js" } } } }, p2 = !1, GL = /* @__PURE__ */ $f(function(t, e) { process.env.NODE_ENV !== "production" && !p2 && // check for className as well since the user is // probably using the custom createElement which // means it will be turned into a className prop // $FlowFixMe I don't really want to add it to the type since it shouldn't be used (t.className || t.css) && (console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"), p2 = !0); var r = t.styles, n = oo([r], void 0, bt(ma)), i = $e(); return f2(function() { var a = e.key + "-global", s = new e.sheet.constructor({ key: a, nonce: e.sheet.nonce, container: e.sheet.container, speedy: e.sheet.isSpeedy }), u = !1, c = document.querySelector('style[data-emotion="' + a + " " + n.name + '"]'); return e.sheet.tags.length && (s.before = e.sheet.tags[0]), c !== null && (u = !0, c.setAttribute("data-emotion", a), s.hydrate([c])), i.current = [s, u], function() { s.flush(); }; }, [e]), f2(function() { var a = i.current, s = a[0], u = a[1]; if (u) { a[1] = !1; return; } if (n.next !== void 0 && Zf(e, n.next, !0), s.tags.length) { var c = s.tags[s.tags.length - 1].nextElementSibling; s.before = c, s.flush(); } e.insert("", n, s, !1); }, [e, n.name]), null; }); process.env.NODE_ENV !== "production" && (GL.displayName = "EmotionGlobal"); function WL() { for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++) e[r] = arguments[r]; return oo(e); } var UL = function() { var e = WL.apply(void 0, arguments), r = "animation-" + e.name; return { name: r, styles: "@keyframes " + r + "{" + e.styles + "}", anim: 1, toString: function() { return "_EMO_" + this.name + "_" + this.styles + "_EMO_"; } }; }, HL = function t(e) { for (var r = e.length, n = 0, i = ""; n < r; n++) { var a = e[n]; if (a != null) { var s = void 0; switch (typeof a) { case "boolean": break; case "object": { if (Array.isArray(a)) s = t(a); else { process.env.NODE_ENV !== "production" && a.styles !== void 0 && a.name !== void 0 && console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from component."), s = ""; for (var u in a) a[u] && u && (s && (s += " "), s += u); } break; } default: s = a; } s && (i && (i += " "), i += s); } } return i; }; function YL(t, e, r) { var n = [], i = am(t, n, r); return n.length < 2 ? r : i + e(n); } var qL = function(e) { var r = e.cache, n = e.serializedArr; return om(function() { for (var i = 0; i < n.length; i++) Zf(r, n[i], !1); }), null; }, KL = /* @__PURE__ */ $f(function(t, e) { var r = !1, n = [], i = function() { if (r && process.env.NODE_ENV !== "production") throw new Error("css can only be used during render"); for (var f = arguments.length, h = new Array(f), d = 0; d < f; d++) h[d] = arguments[d]; var g = oo(h, e.registered); return n.push(g), Jf(e, g, !1), e.key + "-" + g.name; }, a = function() { if (r && process.env.NODE_ENV !== "production") throw new Error("cx can only be used during render"); for (var f = arguments.length, h = new Array(f), d = 0; d < f; d++) h[d] = arguments[d]; return YL(e.registered, i, HL(h)); }, s = { css: i, cx: a, theme: bt(ma) }, u = t.children(s); return r = !0, /* @__PURE__ */ si(jf, null, /* @__PURE__ */ si(qL, { cache: e, serializedArr: n }), u); }); process.env.NODE_ENV !== "production" && (KL.displayName = "EmotionClassNames"); if (process.env.NODE_ENV !== "production") { var g2 = !0, XL = typeof jest < "u" || typeof vi < "u"; if (g2 && !XL) { var m2 = ( // $FlowIgnore typeof globalThis < "u" ? globalThis : g2 ? window : global ), v2 = "__EMOTION_REACT_" + zL.version.split(".")[0] + "__"; m2[v2] && console.warn("You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used."), m2[v2] = !0; } } function QL(t, e) { return `${t} returned \`undefined\`. Seems you forgot to wrap component within ${e}`; } function rl(t = {}) { const { name: e, strict: r = !0, hookName: n = "useContext", providerName: i = "Provider", errorMessage: a } = t, s = On(void 0); s.displayName = e; function u() { var c; const f = bt(s); if (!f && r) { const h = new Error( a ?? QL(n, i) ); throw h.name = "ContextError", (c = Error.captureStackTrace) == null || c.call(Error, h, u), h; } return f; } return [s.Provider, u, s]; } var [JL, ZL] = rl({ strict: !1, name: "PortalManagerContext" }); function $L(t) { const { children: e, zIndex: r } = t; return /* @__PURE__ */ he.jsx(JL, { value: { zIndex: r }, children: e }); } $L.displayName = "PortalManager"; var Hu = Boolean(globalThis == null ? void 0 : globalThis.document) ? Ff : Wt, [mx, e9] = rl({ strict: !1, name: "PortalContext" }), lm = "chakra-portal", t9 = ".chakra-portal", r9 = (t) => /* @__PURE__ */ he.jsx( "div", { className: "chakra-portal-zIndex", style: { position: "absolute", zIndex: t.zIndex, top: 0, left: 0, right: 0 }, children: t.children } ), n9 = (t) => { const { appendToParentPortal: e, children: r } = t, [n, i] = En(null), a = $e(null), [, s] = En({}); Wt(() => s({}), []); const u = e9(), c = ZL(); Hu(() => { if (!n) return; const h = n.ownerDocument, d = e ? u ?? h.body : h.body; if (!d) return; a.current = h.createElement("div"), a.current.className = lm, d.appendChild(a.current), s({}); const g = a.current; return () => { d.contains(g) && d.removeChild(g); }; }, [n]); const f = c != null && c.zIndex ? /* @__PURE__ */ he.jsx(r9, { zIndex: c == null ? void 0 : c.zIndex, children: r }) : r; return a.current ? $b( /* @__PURE__ */ he.jsx(mx, { value: a.current, children: f }), a.current ) : /* @__PURE__ */ he.jsx( "span", { ref: (h) => { h && i(h); } } ); }, i9 = (t) => { const { children: e, containerRef: r, appendToParentPortal: n } = t, i = r.current, a = i ?? (typeof window < "u" ? document.body : void 0), s = Mr(() => { const c = i == null ? void 0 : i.ownerDocument.createElement("div"); return c && (c.className = lm), c; }, [i]), [, u] = En({}); return Hu(() => u({}), []), Hu(() => { if (!(!s || !a)) return a.appendChild(s), () => { a.removeChild(s); }; }, [s, a]), a && s ? $b( /* @__PURE__ */ he.jsx(mx, { value: n ? s : null, children: e }), s ) : null; }; function eh(t) { const e = { appendToParentPortal: !0, ...t }, { containerRef: r, ...n } = e; return r ? /* @__PURE__ */ he.jsx(i9, { containerRef: r, ...n }) : /* @__PURE__ */ he.jsx(n9, { ...n }); } eh.className = lm; eh.selector = t9; eh.displayName = "Portal"; function th() { const t = bt( ma ); if (!t) throw Error( "useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``" ); return t; } var vx = On({}); vx.displayName = "ColorModeContext"; function yx() { const t = bt(vx); if (t === void 0) throw new Error("useColorMode must be used within a ColorModeProvider"); return t; } function a9() { const t = yx(), e = th(); return { ...t, theme: e }; } function s9(t, e, r) { var n, i; if (e == null) return e; const a = (s) => { var u, c; return (c = (u = t.__breakpoints) == null ? void 0 : u.asArray) == null ? void 0 : c[s]; }; return (i = (n = a(e)) != null ? n : a(r)) != null ? i : r; } function o9(t, e, r) { var n, i; if (e == null) return e; const a = (s) => { var u, c; return (c = (u = t.__cssMap) == null ? void 0 : u[s]) == null ? void 0 : c.value; }; return (i = (n = a(e)) != null ? n : a(r)) != null ? i : r; } function SH(t, e, r) { const n = th(); return u9(t, e, r)(n); } function u9(t, e, r) { const n = Array.isArray(e) ? e : [e], i = Array.isArray(r) ? r : [r]; return (a) => { const s = i.filter(Boolean), u = n.map((c, f) => { var h, d; if (t === "breakpoints") return s9(a, c, (h = s[f]) != null ? h : c); const g = `${t}.${c}`; return o9(a, g, (d = s[f]) != null ? d : c); }); return Array.isArray(e) ? u : u[0]; }; } var xa = (...t) => t.filter(Boolean).join(" "); function l9() { return process.env.NODE_ENV !== "production"; } function _n(t) { const e = typeof t; return t != null && (e === "object" || e === "function") && !Array.isArray(t); } var wH = (t) => { const { condition: e, message: r } = t; e && l9() && console.warn(r); }; function la(t, ...e) { return c9(t) ? t(...e) : t; } var c9 = (t) => typeof t == "function", y2 = (t) => t ? "" : void 0, xH = (t) => t ? !0 : void 0; function kr(...t) { return function(r) { t.some((n) => (n == null || n(r), r == null ? void 0 : r.defaultPrevented)); }; } function f9(...t) { return function(r) { t.forEach((n) => { n == null || n(r); }); }; } var _f = {}, h9 = { get exports() { return _f; }, set exports(t) { _f = t; } }; (function(t, e) { var r = 200, n = "__lodash_hash_undefined__", i = 800, a = 16, s = 9007199254740991, u = "[object Arguments]", c = "[object Array]", f = "[object AsyncFunction]", h = "[object Boolean]", d = "[object Date]", g = "[object Error]", v = "[object Function]", m = "[object GeneratorFunction]", b = "[object Map]", S = "[object Number]", x = "[object Null]", w = "[object Object]", _ = "[object Proxy]", P = "[object RegExp]", E = "[object Set]", k = "[object String]", D = "[object Undefined]", V = "[object WeakMap]", H = "[object ArrayBuffer]", W = "[object DataView]", K = "[object Float32Array]", ie = "[object Float64Array]", F = "[object Int8Array]", O = "[object Int16Array]", N = "[object Int32Array]", j = "[object Uint8Array]", J = "[object Uint8ClampedArray]", te = "[object Uint16Array]", ee = "[object Uint32Array]", ae = /[\\^$.*+?()[\]{}|]/g, le = /^\[object .+?Constructor\]$/, Ce = /^(?:0|[1-9]\d*)$/, we = {}; we[K] = we[ie] = we[F] = we[O] = we[N] = we[j] = we[J] = we[te] = we[ee] = !0, we[u] = we[c] = we[H] = we[h] = we[W] = we[d] = we[g] = we[v] = we[b] = we[S] = we[w] = we[P] = we[E] = we[k] = we[V] = !1; var Re = typeof Dr == "object" && Dr && Dr.Object === Object && Dr, ke = typeof self == "object" && self && self.Object === Object && self, ve = Re || ke || Function("return this")(), ot = e && !e.nodeType && e, Fe = ot && !0 && t && !t.nodeType && t, qe = Fe && Fe.exports === ot, St = qe && Re.process, et = function() { try { var R = Fe && Fe.require && Fe.require("util").types; return R || St && St.binding && St.binding("util"); } catch { } }(), Z = et && et.isTypedArray; function mt(R, z, X) { switch (X.length) { case 0: return R.call(z); case 1: return R.call(z, X[0]); case 2: return R.call(z, X[0], X[1]); case 3: return R.call(z, X[0], X[1], X[2]); } return R.apply(z, X); } function fe(R, z) { for (var X = -1, me = Array(R); ++X < R; ) me[X] = z(X); return me; } function xe(R) { return function(z) { return R(z); }; } function ut(R, z) { return R == null ? void 0 : R[z]; } function je(R, z) { return function(X) { return R(z(X)); }; } var jt = Array.prototype, cr = Function.prototype, Et = Object.prototype, Tt = ve["__core-js_shared__"], Ut = cr.toString, At = Et.hasOwnProperty, Hr = function() { var R = /[^.]+$/.exec(Tt && Tt.keys && Tt.keys.IE_PROTO || ""); return R ? "Symbol(src)_1." + R : ""; }(), vr = Et.toString, un = Ut.call(Object), $t = RegExp( "^" + Ut.call(At).replace(ae, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ), yr = qe ? ve.Buffer : void 0, mi = ve.Symbol, yi = ve.Uint8Array, qn = yr ? yr.allocUnsafe : void 0, Wi = je(Object.getPrototypeOf, Object), Ui = Object.create, Pa = Et.propertyIsEnumerable, Ea = jt.splice, Yr = mi ? mi.toStringTag : void 0, Kn = function() { try { var R = vs(Object, "defineProperty"); return R({}, "", {}), R; } catch { } }(), xo = yr ? yr.isBuffer : void 0, Hi = Math.max, os = Date.now, ln = vs(ve, "Map"), cn = vs(Object, "create"), Ta = function() { function R() { } return function(z) { if (!Dn(z)) return {}; if (Ui) return Ui(z); R.prototype = z; var X = new R(); return R.prototype = void 0, X; }; }(); function fn(R) { var z = -1, X = R == null ? 0 : R.length; for (this.clear(); ++z < X; ) { var me = R[z]; this.set(me[0], me[1]); } } function Co() { this.__data__ = cn ? cn(null) : {}, this.size = 0; } function us(R) { var z = this.has(R) && delete this.__data__[R]; return this.size -= z ? 1 : 0, z; } function ls(R) { var z = this.__data__; if (cn) { var X = z[R]; return X === n ? void 0 : X; } return At.call(z, R) ? z[R] : void 0; } function cs(R) { var z = this.__data__; return cn ? z[R] !== void 0 : At.call(z, R); } function fs(R, z) { var X = this.__data__; return this.size += this.has(R) ? 0 : 1, X[R] = cn && z === void 0 ? n : z, this; } fn.prototype.clear = Co, fn.prototype.delete = us, fn.prototype.get = ls, fn.prototype.has = cs, fn.prototype.set = fs; function qr(R) { var z = -1, X = R == null ? 0 : R.length; for (this.clear(); ++z < X; ) { var me = R[z]; this.set(me[0], me[1]); } } function Aa() { this.__data__ = [], this.size = 0; } function hs(R) { var z = this.__data__, X = tr(z, R); if (X < 0) return !1; var me = z.length - 1; return X == me ? z.pop() : Ea.call(z, X, 1), --this.size, !0; } function Oa(R) { var z = this.__data__, X = tr(z, R); return X < 0 ? void 0 : z[X][1]; } function _o(R) { return tr(this.__data__, R) > -1; } function Po(R, z) { var X = this.__data__, me = tr(X, R); return me < 0 ? (++this.size, X.push([R, z])) : X[me][1] = z, this; } qr.prototype.clear = Aa, qr.prototype.delete = hs, qr.prototype.get = Oa, qr.prototype.has = _o, qr.prototype.set = Po; function Xn(R) { var z = -1, X = R == null ? 0 : R.length; for (this.clear(); ++z < X; ) { var me = R[z]; this.set(me[0], me[1]); } } function L() { this.size = 0, this.__data__ = { hash: new fn(), map: new (ln || qr)(), string: new fn() }; } function oe(R) { var z = ms(this, R).delete(R); return this.size -= z ? 1 : 0, z; } function pe(R) { return ms(this, R).get(R); } function Pe(R) { return ms(this, R).has(R); } function Xe(R, z) { var X = ms(this, R), me = X.size; return X.set(R, z), this.size += X.size == me ? 0 : 1, this; } Xn.prototype.clear = L, Xn.prototype.delete = oe, Xn.prototype.get = pe, Xn.prototype.has = Pe, Xn.prototype.set = Xe; function Ue(R) { var z = this.__data__ = new qr(R); this.size = z.size; } function We() { this.__data__ = new qr(), this.size = 0; } function Ne(R) { var z = this.__data__, X = z.delete(R); return this.size = z.size, X; } function er(R) { return this.__data__.get(R); } function Ot(R) { return this.__data__.has(R); } function kt(R, z) { var X = this.__data__; if (X instanceof qr) { var me = X.__data__; if (!ln || me.length < r - 1) return me.push([R, z]), this.size = ++X.size, this; X = this.__data__ = new Xn(me); } return X.set(R, z), this.size = X.size, this; } Ue.prototype.clear = We, Ue.prototype.delete = Ne, Ue.prototype.get = er, Ue.prototype.has = Ot, Ue.prototype.set = kt; function br(R, z) { var X = Do(R), me = !X && Io(R), He = !X && !me && Tl(R), vt = !X && !me && !He && Ol(R), Me = X || me || He || vt, Ve = Me ? fe(R.length, String) : [], rt = Ve.length; for (var Er in R) (z || At.call(R, Er)) && !(Me && // Safari 9 has enumerable `arguments.length` in strict mode. (Er == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. He && (Er == "offset" || Er == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. vt && (Er == "buffer" || Er == "byteLength" || Er == "byteOffset") || // Skip index properties. Sl(Er, rt))) && Ve.push(Er); return Ve; } function Pr(R, z, X) { (X !== void 0 && !bs(R[z], X) || X === void 0 && !(z in R)) && Eo(R, z, X); } function ds(R, z, X) { var me = R[z]; (!(At.call(R, z) && bs(me, X)) || X === void 0 && !(z in R)) && Eo(R, z, X); } function tr(R, z) { for (var X = R.length; X--; ) if (bs(R[X][0], z)) return X; return -1; } function Eo(R, z, X) { z == "__proto__" && Kn ? Kn(R, z, { configurable: !0, enumerable: !0, value: X, writable: !0 }) : R[z] = X; } var mh = yl(); function ps(R) { return R == null ? R === void 0 ? D : x : Yr && Yr in Object(R) ? bl(R) : Cl(R); } function To(R) { return Ra(R) && ps(R) == u; } function fl(R) { if (!Dn(R) || ko(R)) return !1; var z = Mo(R) ? $t : le; return z.test(El(R)); } function hl(R) { return Ra(R) && Al(R.length) && !!we[ps(R)]; } function vh(R) { if (!Dn(R)) return xl(R); var z = bi(R), X = []; for (var me in R) me == "constructor" && (z || !At.call(R, me)) || X.push(me); return X; } function dl(R, z, X, me, He) { R !== z && mh(z, function(vt, Me) { if (He || (He = new Ue()), Dn(vt)) yh(R, z, Me, X, dl, me, He); else { var Ve = me ? me(ys(R, Me), vt, Me + "", R, z, He) : void 0; Ve === void 0 && (Ve = vt), Pr(R, Me, Ve); } }, Rl); } function yh(R, z, X, me, He, vt, Me) { var Ve = ys(R, X), rt = ys(z, X), Er = Me.get(rt); if (Er) { Pr(R, X, Er); return; } var fr = vt ? vt(Ve, rt, X + "", R, z, Me) : void 0, ar = fr === void 0; if (ar) { var ws = Do(rt), xs = !ws && Tl(rt), Lo = !ws && !xs && Ol(rt); fr = rt, ws || xs || Lo ? Do(Ve) ? fr = Ve : xh(Ve) ? fr = Sh(Ve) : xs ? (ar = !1, fr = gl(rt, !0)) : Lo ? (ar = !1, fr = Ao(rt, !0)) : fr = [] : Ch(rt) || Io(rt) ? (fr = Ve, Io(Ve) ? fr = _h(Ve) : (!Dn(Ve) || Mo(Ve)) && (fr = Oo(rt))) : ar = !1; } ar && (Me.set(rt, fr), He(fr, rt, me, vt, Me), Me.delete(rt)), Pr(R, X, fr); } function bh(R, z) { return _l(wh(R, z, kl), R + ""); } var pl = Kn ? function(R, z) { return Kn(R, "toString", { configurable: !0, enumerable: !1, value: wt(z), writable: !0 }); } : kl; function gl(R, z) { if (z) return R.slice(); var X = R.length, me = qn ? qn(X) : new R.constructor(X); return R.copy(me), me; } function ml(R) { var z = new R.constructor(R.byteLength); return new yi(z).set(new yi(R)), z; } function Ao(R, z) { var X = z ? ml(R.buffer) : R.buffer; return new R.constructor(X, R.byteOffset, R.length); } function Sh(R, z) { var X = -1, me = R.length; for (z || (z = Array(me)); ++X < me; ) z[X] = R[X]; return z; } function vl(R, z, X, me) { var He = !X; X || (X = {}); for (var vt = -1, Me = z.length; ++vt < Me; ) { var Ve = z[vt], rt = me ? me(X[Ve], R[Ve], Ve, X, R) : void 0; rt === void 0 && (rt = R[Ve]), He ? Eo(X, Ve, rt) : ds(X, Ve, rt); } return X; } function gs(R) { return bh(function(z, X) { var me = -1, He = X.length, vt = He > 1 ? X[He - 1] : void 0, Me = He > 2 ? X[2] : void 0; for (vt = R.length > 3 && typeof vt == "function" ? (He--, vt) : void 0, Me && wl(X[0], X[1], Me) && (vt = He < 3 ? void 0 : vt, He = 1), z = Object(z); ++me < He; ) { var Ve = X[me]; Ve && R(z, Ve, me, vt); } return z; }); } function yl(R) { return function(z, X, me) { for (var He = -1, vt = Object(z), Me = me(z), Ve = Me.length; Ve--; ) { var rt = Me[R ? Ve : ++He]; if (X(vt[rt], rt, vt) === !1) break; } return z; }; } function ms(R, z) { var X = R.__data__; return Ro(z) ? X[typeof z == "string" ? "string" : "hash"] : X.map; } function vs(R, z) { var X = ut(R, z); return fl(X) ? X : void 0; } function bl(R) { var z = At.call(R, Yr), X = R[Yr]; try { R[Yr] = void 0; var me = !0; } catch { } var He = vr.call(R); return me && (z ? R[Yr] = X : delete R[Yr]), He; } function Oo(R) { return typeof R.constructor == "function" && !bi(R) ? Ta(Wi(R)) : {}; } function Sl(R, z) { var X = typeof R; return z = z ?? s, !!z && (X == "number" || X != "symbol" && Ce.test(R)) && R > -1 && R % 1 == 0 && R < z; } function wl(R, z, X) { if (!Dn(X)) return !1; var me = typeof z; return (me == "number" ? Ss(X) && Sl(z, X.length) : me == "string" && z in X) ? bs(X[z], R) : !1; } function Ro(R) { var z = typeof R; return z == "string" || z == "number" || z == "symbol" || z == "boolean" ? R !== "__proto__" : R === null; } function ko(R) { return !!Hr && Hr in R; } function bi(R) { var z = R && R.constructor, X = typeof z == "function" && z.prototype || Et; return R === X; } function xl(R) { var z = []; if (R != null) for (var X in Object(R)) z.push(X); return z; } function Cl(R) { return vr.call(R); } function wh(R, z, X) { return z = Hi(z === void 0 ? R.length - 1 : z, 0), function() { for (var me = arguments, He = -1, vt = Hi(me.length - z, 0), Me = Array(vt); ++He < vt; ) Me[He] = me[z + He]; He = -1; for (var Ve = Array(z + 1); ++He < z; ) Ve[He] = me[He]; return Ve[z] = X(Me), mt(R, this, Ve); }; } function ys(R, z) { if (!(z === "constructor" && typeof R[z] == "function") && z != "__proto__") return R[z]; } var _l = Pl(pl); function Pl(R) { var z = 0, X = 0; return function() { var me = os(), He = a - (me - X); if (X = me, He > 0) { if (++z >= i) return arguments[0]; } else z = 0; return R.apply(void 0, arguments); }; } function El(R) { if (R != null) { try { return Ut.call(R); } catch { } try { return R + ""; } catch { } } return ""; } function bs(R, z) { return R === z || R !== R && z !== z; } var Io = To(function() { return arguments; }()) ? To : function(R) { return Ra(R) && At.call(R, "callee") && !Pa.call(R, "callee"); }, Do = Array.isArray; function Ss(R) { return R != null && Al(R.length) && !Mo(R); } function xh(R) { return Ra(R) && Ss(R); } var Tl = xo || Ph; function Mo(R) { if (!Dn(R)) return !1; var z = ps(R); return z == v || z == m || z == f || z == _; } function Al(R) { return typeof R == "number" && R > -1 && R % 1 == 0 && R <= s; } function Dn(R) { var z = typeof R; return R != null && (z == "object" || z == "function"); } function Ra(R) { return R != null && typeof R == "object"; } function Ch(R) { if (!Ra(R) || ps(R) != w) return !1; var z = Wi(R); if (z === null) return !0; var X = At.call(z, "constructor") && z.constructor; return typeof X == "function" && X instanceof X && Ut.call(X) == un; } var Ol = Z ? xe(Z) : hl; function _h(R) { return vl(R, Rl(R)); } function Rl(R) { return Ss(R) ? br(R, !0) : vh(R); } var Ct = gs(function(R, z, X, me) { dl(R, z, X, me); }); function wt(R) { return function() { return R; }; } function kl(R) { return R; } function Ph() { return !1; } t.exports = Ct; })(h9, _f); const ai = _f; var d9 = (t) => /!(important)?$/.test(t), b2 = (t) => typeof t == "string" ? t.replace(/!(important)?$/, "").trim() : t, p9 = (t, e) => (r) => { const n = String(e), i = d9(n), a = b2(n), s = t ? `${t}.${a}` : a; let u = _n(r.__cssMap) && s in r.__cssMap ? r.__cssMap[s].varRef : e; return u = b2(u), i ? `${u} !important` : u; }; function cm(t) { const { scale: e, transform: r, compose: n } = t; return (a, s) => { var u; const c = p9(e, a)(s); let f = (u = r == null ? void 0 : r(c, s)) != null ? u : c; return n && (f = n(f, s)), f; }; } var Fc = (...t) => (e) => t.reduce((r, n) => n(r), e); function jn(t, e) { return (r) => { const n = { property: r, scale: t }; return n.transform = cm({ scale: t, transform: e }), n; }; } var g9 = ({ rtl: t, ltr: e }) => (r) => r.direction === "rtl" ? t : e; function m9(t) { const { property: e, scale: r, transform: n } = t; return { scale: r, property: g9(e), transform: r ? cm({ scale: r, compose: n }) : n }; } var bx = [ "rotate(var(--chakra-rotate, 0))", "scaleX(var(--chakra-scale-x, 1))", "scaleY(var(--chakra-scale-y, 1))", "skewX(var(--chakra-skew-x, 0))", "skewY(var(--chakra-skew-y, 0))" ]; function v9() { return [ "translateX(var(--chakra-translate-x, 0))", "translateY(var(--chakra-translate-y, 0))", ...bx ].join(" "); } function y9() { return [ "translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)", ...bx ].join(" "); } var b9 = { "--chakra-blur": "var(--chakra-empty,/*!*/ /*!*/)", "--chakra-brightness": "var(--chakra-empty,/*!*/ /*!*/)", "--chakra-contrast": "var(--chakra-empty,/*!*/ /*!*/)", "--chakra-grayscale": "var(--chakra-empty,/*!*/ /*!*/)", "--chakra-hue-rotate": "var(--chakra-empty,/*!*/ /*!*/)", "--chakra-invert": "var(--chakra-empty,/*!*/ /*!*/)", "--chakra-saturate": "var(--chakra-empty,/*!*/ /*!*/)", "--chakra-sepia": "var(--chakra-empty,/*!*/ /*!*/)", "--chakra-drop-shadow": "var(--chakra-empty,/*!*/ /*!*/)", filter: [ "var(--chakra-blur)", "var(--chakra-brightness)", "var(--chakra-contrast)", "var(--chakra-grayscale)", "var(--chakra-hue-rotate)", "var(--chakra-invert)", "var(--chakra-saturate)", "var(--chakra-sepia)", "var(--chakra-drop-shadow)" ].join(" ") }, S9 = { backdropFilter: [ "var(--chakra-backdrop-blur)", "var(--chakra-backdrop-brightness)", "var(--chakra-backdrop-contrast)", "var(--chakra-backdrop-grayscale)", "var(--chakra-backdrop-hue-rotate)", "var(--chakra-backdrop-invert)", "var(--chakra-backdrop-opacity)", "var(--chakra-backdrop-saturate)", "var(--chakra-backdrop-sepia)" ].join(" "), "--chakra-backdrop-blur": "var(--chakra-empty,/*!*/ /*!*/)", "--chakra-backdrop-brightness": "var(--chakra-empty,/*!*/ /*!*/)", "--chakra-backdrop-contrast": "var(--chakra-empty,/*!*/ /*!*/)", "--chakra-backdrop-grayscale": "var(--chakra-empty,/*!*/ /*!*/)", "--chakra-backdrop-hue-rotate": "var(--chakra-empty,/*!*/ /*!*/)", "--chakra-backdrop-invert": "var(--chakra-empty,/*!*/ /*!*/)", "--chakra-backdrop-opacity": "var(--chakra-empty,/*!*/ /*!*/)", "--chakra-backdrop-saturate": "var(--chakra-empty,/*!*/ /*!*/)", "--chakra-backdrop-sepia": "var(--chakra-empty,/*!*/ /*!*/)" }; function w9(t) { return { "--chakra-ring-offset-shadow": "var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)", "--chakra-ring-shadow": "var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)", "--chakra-ring-width": t, boxShadow: [ "var(--chakra-ring-offset-shadow)", "var(--chakra-ring-shadow)", "var(--chakra-shadow, 0 0 #0000)" ].join(", ") }; } var x9 = { "row-reverse": { space: "--chakra-space-x-reverse", divide: "--chakra-divide-x-reverse" }, "column-reverse": { space: "--chakra-space-y-reverse", divide: "--chakra-divide-y-reverse" } }, $p = { "to-t": "to top", "to-tr": "to top right", "to-r": "to right", "to-br": "to bottom right", "to-b": "to bottom", "to-bl": "to bottom left", "to-l": "to left", "to-tl": "to top left" }, C9 = new Set(Object.values($p)), Sx = /* @__PURE__ */ new Set([ "none", "-moz-initial", "inherit", "initial", "revert", "unset" ]), _9 = (t) => t.trim(); function P9(t, e) { if (t == null || Sx.has(t)) return t; const n = /(^[a-z-A-Z]+)\((.*)\)/g.exec(t), i = n == null ? void 0 : n[1], a = n == null ? void 0 : n[2]; if (!i || !a) return t; const s = i.includes("-gradient") ? i : `${i}-gradient`, [u, ...c] = a.split(",").map(_9).filter(Boolean); if ((c == null ? void 0 : c.length) === 0) return t; const f = u in $p ? $p[u] : u; c.unshift(f); const h = c.map((d) => { if (C9.has(d)) return d; const g = d.indexOf(" "), [v, m] = g !== -1 ? [d.substr(0, g), d.substr(g + 1)] : [d], b = wx(m) ? m : m && m.split(" "), S = `colors.${v}`, x = S in e.__cssMap ? e.__cssMap[S].varRef : v; return b ? [ x, ...Array.isArray(b) ? b : [b] ].join(" ") : x; }); return `${s}(${h.join(", ")})`; } var wx = (t) => typeof t == "string" && t.includes("(") && t.includes(")"), E9 = (t, e) => P9(t, e ?? {}); function T9(t) { return /^var\(--.+\)$/.test(t); } var A9 = (t) => { const e = parseFloat(t.toString()), r = t.toString().replace(String(e), ""); return { unitless: !r, value: e, unit: r }; }, ei = (t) => (e) => `${t}(${e})`, tt = { filter(t) { return t !== "auto" ? t : b9; }, backdropFilter(t) { return t !== "auto" ? t : S9; }, ring(t) { return w9(tt.px(t)); }, bgClip(t) { return t === "text" ? { color: "transparent", backgroundClip: "text" } : { backgroundClip: t }; }, transform(t) { return t === "auto" ? v9() : t === "auto-gpu" ? y9() : t; }, vh(t) { return t === "$100vh" ? "var(--chakra-vh)" : t; }, px(t) { if (t == null) return t; const { unitless: e } = A9(t); return e || typeof t == "number" ? `${t}px` : t; }, fraction(t) { return typeof t != "number" || t > 1 ? t : `${t * 100}%`; }, float(t, e) { const r = { left: "right", right: "left" }; return e.direction === "rtl" ? r[t] : t; }, degree(t) { if (T9(t) || t == null) return t; const e = typeof t == "string" && !t.endsWith("deg"); return typeof t == "number" || e ? `${t}deg` : t; }, gradient: E9, blur: ei("blur"), opacity: ei("opacity"), brightness: ei("brightness"), contrast: ei("contrast"), dropShadow: ei("drop-shadow"), grayscale: ei("grayscale"), hueRotate: ei("hue-rotate"), invert: ei("invert"), saturate: ei("saturate"), sepia: ei("sepia"), bgImage(t) { return t == null || wx(t) || Sx.has(t) ? t : `url(${t})`; }, outline(t) { const e = String(t) === "0" || String(t) === "none"; return t !== null && e ? { outline: "2px solid transparent", outlineOffset: "2px" } : { outline: t }; }, flexDirection(t) { var e; const { space: r, divide: n } = (e = x9[t]) != null ? e : {}, i = { flexDirection: t }; return r && (i[r] = 1), n && (i[n] = 1), i; } }, G = { borderWidths: jn("borderWidths"), borderStyles: jn("borderStyles"), colors: jn("colors"), borders: jn("borders"), radii: jn("radii", tt.px), space: jn("space", Fc(tt.vh, tt.px)), spaceT: jn("space", Fc(tt.vh, tt.px)), degreeT(t) { return { property: t, transform: tt.degree }; }, prop(t, e, r) { return { property: t, scale: e, ...e && { transform: cm({ scale: e, transform: r }) } }; }, propT(t, e) { return { property: t, transform: e }; }, sizes: jn("sizes", Fc(tt.vh, tt.px)), sizesT: jn("sizes", Fc(tt.vh, tt.fraction)), shadows: jn("shadows"), logical: m9, blur: jn("blur", tt.blur) }, af = { background: G.colors("background"), backgroundColor: G.colors("backgroundColor"), backgroundImage: G.propT("backgroundImage", tt.bgImage), backgroundSize: !0, backgroundPosition: !0, backgroundRepeat: !0, backgroundAttachment: !0, backgroundClip: { transform: tt.bgClip }, bgSize: G.prop("backgroundSize"), bgPosition: G.prop("backgroundPosition"), bg: G.colors("background"), bgColor: G.colors("backgroundColor"), bgPos: G.prop("backgroundPosition"), bgRepeat: G.prop("backgroundRepeat"), bgAttachment: G.prop("backgroundAttachment"), bgGradient: G.propT("backgroundImage", tt.gradient), bgClip: { transform: tt.bgClip } }; Object.assign(af, { bgImage: af.backgroundImage, bgImg: af.backgroundImage }); var at = { border: G.borders("border"), borderWidth: G.borderWidths("borderWidth"), borderStyle: G.borderStyles("borderStyle"), borderColor: G.colors("borderColor"), borderRadius: G.radii("borderRadius"), borderTop: G.borders("borderTop"), borderBlockStart: G.borders("borderBlockStart"), borderTopLeftRadius: G.radii("borderTopLeftRadius"), borderStartStartRadius: G.logical({ scale: "radii", property: { ltr: "borderTopLeftRadius", rtl: "borderTopRightRadius" } }), borderEndStartRadius: G.logical({ scale: "radii", property: { ltr: "borderBottomLeftRadius", rtl: "borderBottomRightRadius" } }), borderTopRightRadius: G.radii("borderTopRightRadius"), borderStartEndRadius: G.logical({ scale: "radii", property: { ltr: "borderTopRightRadius", rtl: "borderTopLeftRadius" } }), borderEndEndRadius: G.logical({ scale: "radii", property: { ltr: "borderBottomRightRadius", rtl: "borderBottomLeftRadius" } }), borderRight: G.borders("borderRight"), borderInlineEnd: G.borders("borderInlineEnd"), borderBottom: G.borders("borderBottom"), borderBlockEnd: G.borders("borderBlockEnd"), borderBottomLeftRadius: G.radii("borderBottomLeftRadius"), borderBottomRightRadius: G.radii("borderBottomRightRadius"), borderLeft: G.borders("borderLeft"), borderInlineStart: { property: "borderInlineStart", scale: "borders" }, borderInlineStartRadius: G.logical({ scale: "radii", property: { ltr: ["borderTopLeftRadius", "borderBottomLeftRadius"], rtl: ["borderTopRightRadius", "borderBottomRightRadius"] } }), borderInlineEndRadius: G.logical({ scale: "radii", property: { ltr: ["borderTopRightRadius", "borderBottomRightRadius"], rtl: ["borderTopLeftRadius", "borderBottomLeftRadius"] } }), borderX: G.borders(["borderLeft", "borderRight"]), borderInline: G.borders("borderInline"), borderY: G.borders(["borderTop", "borderBottom"]), borderBlock: G.borders("borderBlock"), borderTopWidth: G.borderWidths("borderTopWidth"), borderBlockStartWidth: G.borderWidths("borderBlockStartWidth"), borderTopColor: G.colors("borderTopColor"), borderBlockStartColor: G.colors("borderBlockStartColor"), borderTopStyle: G.borderStyles("borderTopStyle"), borderBlockStartStyle: G.borderStyles("borderBlockStartStyle"), borderBottomWidth: G.borderWidths("borderBottomWidth"), borderBlockEndWidth: G.borderWidths("borderBlockEndWidth"), borderBottomColor: G.colors("borderBottomColor"), borderBlockEndColor: G.colors("borderBlockEndColor"), borderBottomStyle: G.borderStyles("borderBottomStyle"), borderBlockEndStyle: G.borderStyles("borderBlockEndStyle"), borderLeftWidth: G.borderWidths("borderLeftWidth"), borderInlineStartWidth: G.borderWidths("borderInlineStartWidth"), borderLeftColor: G.colors("borderLeftColor"), borderInlineStartColor: G.colors("borderInlineStartColor"), borderLeftStyle: G.borderStyles("borderLeftStyle"), borderInlineStartStyle: G.borderStyles("borderInlineStartStyle"), borderRightWidth: G.borderWidths("borderRightWidth"), borderInlineEndWidth: G.borderWidths("borderInlineEndWidth"), borderRightColor: G.colors("borderRightColor"), borderInlineEndColor: G.colors("borderInlineEndColor"), borderRightStyle: G.borderStyles("borderRightStyle"), borderInlineEndStyle: G.borderStyles("borderInlineEndStyle"), borderTopRadius: G.radii(["borderTopLeftRadius", "borderTopRightRadius"]), borderBottomRadius: G.radii([ "borderBottomLeftRadius", "borderBottomRightRadius" ]), borderLeftRadius: G.radii(["borderTopLeftRadius", "borderBottomLeftRadius"]), borderRightRadius: G.radii([ "borderTopRightRadius", "borderBottomRightRadius" ]) }; Object.assign(at, { rounded: at.borderRadius, roundedTop: at.borderTopRadius, roundedTopLeft: at.borderTopLeftRadius, roundedTopRight: at.borderTopRightRadius, roundedTopStart: at.borderStartStartRadius, roundedTopEnd: at.borderStartEndRadius, roundedBottom: at.borderBottomRadius, roundedBottomLeft: at.borderBottomLeftRadius, roundedBottomRight: at.borderBottomRightRadius, roundedBottomStart: at.borderEndStartRadius, roundedBottomEnd: at.borderEndEndRadius, roundedLeft: at.borderLeftRadius, roundedRight: at.borderRightRadius, roundedStart: at.borderInlineStartRadius, roundedEnd: at.borderInlineEndRadius, borderStart: at.borderInlineStart, borderEnd: at.borderInlineEnd, borderTopStartRadius: at.borderStartStartRadius, borderTopEndRadius: at.borderStartEndRadius, borderBottomStartRadius: at.borderEndStartRadius, borderBottomEndRadius: at.borderEndEndRadius, borderStartRadius: at.borderInlineStartRadius, borderEndRadius: at.borderInlineEndRadius, borderStartWidth: at.borderInlineStartWidth, borderEndWidth: at.borderInlineEndWidth, borderStartColor: at.borderInlineStartColor, borderEndColor: at.borderInlineEndColor, borderStartStyle: at.borderInlineStartStyle, borderEndStyle: at.borderInlineEndStyle }); var O9 = { color: G.colors("color"), textColor: G.colors("color"), fill: G.colors("fill"), stroke: G.colors("stroke") }, eg = { boxShadow: G.shadows("boxShadow"), mixBlendMode: !0, blendMode: G.prop("mixBlendMode"), backgroundBlendMode: !0, bgBlendMode: G.prop("backgroundBlendMode"), opacity: !0 }; Object.assign(eg, { shadow: eg.boxShadow }); var R9 = { filter: { transform: tt.filter }, blur: G.blur("--chakra-blur"), brightness: G.propT("--chakra-brightness", tt.brightness), contrast: G.propT("--chakra-contrast", tt.contrast), hueRotate: G.degreeT("--chakra-hue-rotate"), invert: G.propT("--chakra-invert", tt.invert), saturate: G.propT("--chakra-saturate", tt.saturate), dropShadow: G.propT("--chakra-drop-shadow", tt.dropShadow), backdropFilter: { transform: tt.backdropFilter }, backdropBlur: G.blur("--chakra-backdrop-blur"), backdropBrightness: G.propT( "--chakra-backdrop-brightness", tt.brightness ), backdropContrast: G.propT("--chakra-backdrop-contrast", tt.contrast), backdropHueRotate: G.degreeT("--chakra-backdrop-hue-rotate"), backdropInvert: G.propT("--chakra-backdrop-invert", tt.invert), backdropSaturate: G.propT("--chakra-backdrop-saturate", tt.saturate) }, Pf = { alignItems: !0, alignContent: !0, justifyItems: !0, justifyContent: !0, flexWrap: !0, flexDirection: { transform: tt.flexDirection }, flex: !0, flexFlow: !0, flexGrow: !0, flexShrink: !0, flexBasis: G.sizes("flexBasis"), justifySelf: !0, alignSelf: !0, order: !0, placeItems: !0, placeContent: !0, placeSelf: !0, gap: G.space("gap"), rowGap: G.space("rowGap"), columnGap: G.space("columnGap") }; Object.assign(Pf, { flexDir: Pf.flexDirection }); var xx = { gridGap: G.space("gridGap"), gridColumnGap: G.space("gridColumnGap"), gridRowGap: G.space("gridRowGap"), gridColumn: !0, gridRow: !0, gridAutoFlow: !0, gridAutoColumns: !0, gridColumnStart: !0, gridColumnEnd: !0, gridRowStart: !0, gridRowEnd: !0, gridAutoRows: !0, gridTemplate: !0, gridTemplateColumns: !0, gridTemplateRows: !0, gridTemplateAreas: !0, gridArea: !0 }, k9 = { appearance: !0, cursor: !0, resize: !0, userSelect: !0, pointerEvents: !0, outline: { transform: tt.outline }, outlineOffset: !0, outlineColor: G.colors("outlineColor") }, Sn = { width: G.sizesT("width"), inlineSize: G.sizesT("inlineSize"), height: G.sizes("height"), blockSize: G.sizes("blockSize"), boxSize: G.sizes(["width", "height"]), minWidth: G.sizes("minWidth"), minInlineSize: G.sizes("minInlineSize"), minHeight: G.sizes("minHeight"), minBlockSize: G.sizes("minBlockSize"), maxWidth: G.sizes("maxWidth"), maxInlineSize: G.sizes("maxInlineSize"), maxHeight: G.sizes("maxHeight"), maxBlockSize: G.sizes("maxBlockSize"), overflow: !0, overflowX: !0, overflowY: !0, overscrollBehavior: !0, overscrollBehaviorX: !0, overscrollBehaviorY: !0, display: !0, hideFrom: { scale: "breakpoints", transform: (t, e) => { var r, n, i; return { [(i = (n = (r = e.__breakpoints) == null ? void 0 : r.get(t)) == null ? void 0 : n.minWQuery) != null ? i : `@media screen and (min-width: ${t})`]: { display: "none" } }; } }, hideBelow: { scale: "breakpoints", transform: (t, e) => { var r, n, i; return { [(i = (n = (r = e.__breakpoints) == null ? void 0 : r.get(t)) == null ? void 0 : n.maxWQuery) != null ? i : `@media screen and (max-width: ${t})`]: { display: "none" } }; } }, verticalAlign: !0, boxSizing: !0, boxDecorationBreak: !0, float: G.propT("float", tt.float), objectFit: !0, objectPosition: !0, visibility: !0, isolation: !0 }; Object.assign(Sn, { w: Sn.width, h: Sn.height, minW: Sn.minWidth, maxW: Sn.maxWidth, minH: Sn.minHeight, maxH: Sn.maxHeight, overscroll: Sn.overscrollBehavior, overscrollX: Sn.overscrollBehaviorX, overscrollY: Sn.overscrollBehaviorY }); var I9 = { listStyleType: !0, listStylePosition: !0, listStylePos: G.prop("listStylePosition"), listStyleImage: !0, listStyleImg: G.prop("listStyleImage") }; function D9(t, e, r, n) { const i = typeof e == "string" ? e.split(".") : [e]; for (n = 0; n < i.length && t; n += 1) t = t[i[n]]; return t === void 0 ? r : t; } var M9 = (t) => { const e = /* @__PURE__ */ new WeakMap(); return (n, i, a, s) => { if (typeof n > "u") return t(n, i, a); e.has(n) || e.set(n, /* @__PURE__ */ new Map()); const u = e.get(n); if (u.has(i)) return u.get(i); const c = t(n, i, a, s); return u.set(i, c), c; }; }, L9 = M9(D9), N9 = { border: "0px", clip: "rect(0, 0, 0, 0)", width: "1px", height: "1px", margin: "-1px", padding: "0px", overflow: "hidden", whiteSpace: "nowrap", position: "absolute" }, B9 = { position: "static", width: "auto", height: "auto", clip: "auto", padding: "0", margin: "0", overflow: "visible", whiteSpace: "normal" }, rp = (t, e, r) => { const n = {}, i = L9(t, e, {}); for (const a in i) a in r && r[a] != null || (n[a] = i[a]); return n; }, F9 = { srOnly: { transform(t) { return t === !0 ? N9 : t === "focusable" ? B9 : {}; } }, layerStyle: { processResult: !0, transform: (t, e, r) => rp(e, `layerStyles.${t}`, r) }, textStyle: { processResult: !0, transform: (t, e, r) => rp(e, `textStyles.${t}`, r) }, apply: { processResult: !0, transform: (t, e, r) => rp(e, t, r) } }, Au = { position: !0, pos: G.prop("position"), zIndex: G.prop("zIndex", "zIndices"), inset: G.spaceT("inset"), insetX: G.spaceT(["left", "right"]), insetInline: G.spaceT("insetInline"), insetY: G.spaceT(["top", "bottom"]), insetBlock: G.spaceT("insetBlock"), top: G.spaceT("top"), insetBlockStart: G.spaceT("insetBlockStart"), bottom: G.spaceT("bottom"), insetBlockEnd: G.spaceT("insetBlockEnd"), left: G.spaceT("left"), insetInlineStart: G.logical({ scale: "space", property: { ltr: "left", rtl: "right" } }), right: G.spaceT("right"), insetInlineEnd: G.logical({ scale: "space", property: { ltr: "right", rtl: "left" } }) }; Object.assign(Au, { insetStart: Au.insetInlineStart, insetEnd: Au.insetInlineEnd }); var j9 = { ring: { transform: tt.ring }, ringColor: G.colors("--chakra-ring-color"), ringOffset: G.prop("--chakra-ring-offset-width"), ringOffsetColor: G.colors("--chakra-ring-offset-color"), ringInset: G.prop("--chakra-ring-inset") }, Rt = { margin: G.spaceT("margin"), marginTop: G.spaceT("marginTop"), marginBlockStart: G.spaceT("marginBlockStart"), marginRight: G.spaceT("marginRight"), marginInlineEnd: G.spaceT("marginInlineEnd"), marginBottom: G.spaceT("marginBottom"), marginBlockEnd: G.spaceT("marginBlockEnd"), marginLeft: G.spaceT("marginLeft"), marginInlineStart: G.spaceT("marginInlineStart"), marginX: G.spaceT(["marginInlineStart", "marginInlineEnd"]), marginInline: G.spaceT("marginInline"), marginY: G.spaceT(["marginTop", "marginBottom"]), marginBlock: G.spaceT("marginBlock"), padding: G.space("padding"), paddingTop: G.space("paddingTop"), paddingBlockStart: G.space("paddingBlockStart"), paddingRight: G.space("paddingRight"), paddingBottom: G.space("paddingBottom"), paddingBlockEnd: G.space("paddingBlockEnd"), paddingLeft: G.space("paddingLeft"), paddingInlineStart: G.space("paddingInlineStart"), paddingInlineEnd: G.space("paddingInlineEnd"), paddingX: G.space(["paddingInlineStart", "paddingInlineEnd"]), paddingInline: G.space("paddingInline"), paddingY: G.space(["paddingTop", "paddingBottom"]), paddingBlock: G.space("paddingBlock") }; Object.assign(Rt, { m: Rt.margin, mt: Rt.marginTop, mr: Rt.marginRight, me: Rt.marginInlineEnd, marginEnd: Rt.marginInlineEnd, mb: Rt.marginBottom, ml: Rt.marginLeft, ms: Rt.marginInlineStart, marginStart: Rt.marginInlineStart, mx: Rt.marginX, my: Rt.marginY, p: Rt.padding, pt: Rt.paddingTop, py: Rt.paddingY, px: Rt.paddingX, pb: Rt.paddingBottom, pl: Rt.paddingLeft, ps: Rt.paddingInlineStart, paddingStart: Rt.paddingInlineStart, pr: Rt.paddingRight, pe: Rt.paddingInlineEnd, paddingEnd: Rt.paddingInlineEnd }); var V9 = { textDecorationColor: G.colors("textDecorationColor"), textDecoration: !0, textDecor: { property: "textDecoration" }, textDecorationLine: !0, textDecorationStyle: !0, textDecorationThickness: !0, textUnderlineOffset: !0, textShadow: G.shadows("textShadow") }, z9 = { clipPath: !0, transform: G.propT("transform", tt.transform), transformOrigin: !0, translateX: G.spaceT("--chakra-translate-x"), translateY: G.spaceT("--chakra-translate-y"), skewX: G.degreeT("--chakra-skew-x"), skewY: G.degreeT("--chakra-skew-y"), scaleX: G.prop("--chakra-scale-x"), scaleY: G.prop("--chakra-scale-y"), scale: G.prop(["--chakra-scale-x", "--chakra-scale-y"]), rotate: G.degreeT("--chakra-rotate") }, G9 = { transition: !0, transitionDelay: !0, animation: !0, willChange: !0, transitionDuration: G.prop("transitionDuration", "transition.duration"), transitionProperty: G.prop("transitionProperty", "transition.property"), transitionTimingFunction: G.prop( "transitionTimingFunction", "transition.easing" ) }, W9 = { fontFamily: G.prop("fontFamily", "fonts"), fontSize: G.prop("fontSize", "fontSizes", tt.px), fontWeight: G.prop("fontWeight", "fontWeights"), lineHeight: G.prop("lineHeight", "lineHeights"), letterSpacing: G.prop("letterSpacing", "letterSpacings"), textAlign: !0, fontStyle: !0, textIndent: !0, wordBreak: !0, overflowWrap: !0, textOverflow: !0, textTransform: !0, whiteSpace: !0, isTruncated: { transform(t) { if (t === !0) return { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }; } }, noOfLines: { static: { overflow: "hidden", textOverflow: "ellipsis", display: "-webkit-box", WebkitBoxOrient: "vertical", WebkitLineClamp: "var(--chakra-line-clamp)" }, property: "--chakra-line-clamp" } }, U9 = { scrollBehavior: !0, scrollSnapAlign: !0, scrollSnapStop: !0, scrollSnapType: !0, scrollMargin: G.spaceT("scrollMargin"), scrollMarginTop: G.spaceT("scrollMarginTop"), scrollMarginBottom: G.spaceT("scrollMarginBottom"), scrollMarginLeft: G.spaceT("scrollMarginLeft"), scrollMarginRight: G.spaceT("scrollMarginRight"), scrollMarginX: G.spaceT(["scrollMarginLeft", "scrollMarginRight"]), scrollMarginY: G.spaceT(["scrollMarginTop", "scrollMarginBottom"]), scrollPadding: G.spaceT("scrollPadding"), scrollPaddingTop: G.spaceT("scrollPaddingTop"), scrollPaddingBottom: G.spaceT("scrollPaddingBottom"), scrollPaddingLeft: G.spaceT("scrollPaddingLeft"), scrollPaddingRight: G.spaceT("scrollPaddingRight"), scrollPaddingX: G.spaceT(["scrollPaddingLeft", "scrollPaddingRight"]), scrollPaddingY: G.spaceT(["scrollPaddingTop", "scrollPaddingBottom"]) }; function Cx(t) { return _n(t) && t.reference ? t.reference : String(t); } var rh = (t, ...e) => e.map(Cx).join(` ${t} `).replace(/calc/g, ""), S2 = (...t) => `calc(${rh("+", ...t)})`, w2 = (...t) => `calc(${rh("-", ...t)})`, tg = (...t) => `calc(${rh("*", ...t)})`, x2 = (...t) => `calc(${rh("/", ...t)})`, C2 = (t) => { const e = Cx(t); return e != null && !Number.isNaN(parseFloat(e)) ? String(e).startsWith("-") ? String(e).slice(1) : `-${e}` : tg(e, -1); }, Ya = Object.assign( (t) => ({ add: (...e) => Ya(S2(t, ...e)), subtract: (...e) => Ya(w2(t, ...e)), multiply: (...e) => Ya(tg(t, ...e)), divide: (...e) => Ya(x2(t, ...e)), negate: () => Ya(C2(t)), toString: () => t.toString() }), { add: S2, subtract: w2, multiply: tg, divide: x2, negate: C2 } ); function H9(t, e = "-") { return t.replace(/\s+/g, e); } function Y9(t) { const e = H9(t.toString()); return K9(q9(e)); } function q9(t) { return t.includes("\\.") ? t : !Number.isInteger(parseFloat(t.toString())) ? t.replace(".", "\\.") : t; } function K9(t) { return t.replace(/[!-,/:-@[-^`{-~]/g, "\\$&"); } function X9(t, e = "") { return [e, t].filter(Boolean).join("-"); } function Q9(t, e) { return `var(${t}${e ? `, ${e}` : ""})`; } function J9(t, e = "") { return Y9(`--${X9(t, e)}`); } function Z9(t, e, r) { const n = J9(t, r); return { variable: n, reference: Q9(n, e) }; } function $9(t) { const e = t == null ? 0 : t.length; return e ? t[e - 1] : void 0; } function e8(t) { const e = parseFloat(t.toString()), r = t.toString().replace(String(e), ""); return { unitless: !r, value: e, unit: r }; } function rg(t) { if (t == null) return t; const { unitless: e } = e8(t); return e || typeof t == "number" ? `${t}px` : t; } var _x = (t, e) => parseInt(t[1], 10) > parseInt(e[1], 10) ? 1 : -1, fm = (t) => Object.fromEntries(Object.entries(t).sort(_x)); function _2(t) { const e = fm(t); return Object.assign(Object.values(e), e); } function t8(t) { const e = Object.keys(fm(t)); return new Set(e); } function P2(t) { var e; if (!t) return t; t = (e = rg(t)) != null ? e : t; const r = -0.02; return typeof t == "number" ? `${t + r}` : t.replace(/(\d+\.?\d*)/u, (n) => `${parseFloat(n) + r}`); } function wu(t, e) { const r = ["@media screen"]; return t && r.push("and", `(min-width: ${rg(t)})`), e && r.push("and", `(max-width: ${rg(e)})`), r.join(" "); } function r8(t) { var e; if (!t) return null; t.base = (e = t.base) != null ? e : "0px"; const r = _2(t), n = Object.entries(t).sort(_x).map(([s, u], c, f) => { var h; let [, d] = (h = f[c + 1]) != null ? h : []; return d = parseFloat(d) > 0 ? P2(d) : void 0, { _minW: P2(u), breakpoint: s, minW: u, maxW: d, maxWQuery: wu(null, d), minWQuery: wu(u), minMaxQuery: wu(u, d) }; }), i = t8(t), a = Array.from(i.values()); return { keys: i, normalized: r, isResponsive(s) { const u = Object.keys(s); return u.length > 0 && u.every((c) => i.has(c)); }, asObject: fm(t), asArray: _2(t), details: n, get(s) { return n.find((u) => u.breakpoint === s); }, media: [ null, ...r.map((s) => wu(s)).slice(1) ], toArrayValue(s) { if (!_n(s)) throw new Error("toArrayValue: value must be an object"); const u = a.map((c) => { var f; return (f = s[c]) != null ? f : null; }); for (; $9(u) === null; ) u.pop(); return u; }, toObjectValue(s) { if (!Array.isArray(s)) throw new Error("toObjectValue: value must be an array"); return s.reduce((u, c, f) => { const h = a[f]; return h != null && c != null && (u[h] = c), u; }, {}); } }; } var dr = { hover: (t, e) => `${t}:hover ${e}, ${t}[data-hover] ${e}`, focus: (t, e) => `${t}:focus ${e}, ${t}[data-focus] ${e}`, focusVisible: (t, e) => `${t}:focus-visible ${e}`, focusWithin: (t, e) => `${t}:focus-within ${e}`, active: (t, e) => `${t}:active ${e}, ${t}[data-active] ${e}`, disabled: (t, e) => `${t}:disabled ${e}, ${t}[data-disabled] ${e}`, invalid: (t, e) => `${t}:invalid ${e}, ${t}[data-invalid] ${e}`, checked: (t, e) => `${t}:checked ${e}, ${t}[data-checked] ${e}`, indeterminate: (t, e) => `${t}:indeterminate ${e}, ${t}[aria-checked=mixed] ${e}, ${t}[data-indeterminate] ${e}`, readOnly: (t, e) => `${t}:read-only ${e}, ${t}[readonly] ${e}, ${t}[data-read-only] ${e}`, expanded: (t, e) => `${t}:read-only ${e}, ${t}[aria-expanded=true] ${e}, ${t}[data-expanded] ${e}`, placeholderShown: (t, e) => `${t}:placeholder-shown ${e}` }, ta = (t) => Px((e) => t(e, "&"), "[role=group]", "[data-group]", ".group"), ki = (t) => Px((e) => t(e, "~ &"), "[data-peer]", ".peer"), Px = (t, ...e) => e.map(t).join(", "), nh = { _hover: "&:hover, &[data-hover]", _active: "&:active, &[data-active]", _focus: "&:focus, &[data-focus]", _highlighted: "&[data-highlighted]", _focusWithin: "&:focus-within", _focusVisible: "&:focus-visible, &[data-focus-visible]", _disabled: "&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]", _readOnly: "&[aria-readonly=true], &[readonly], &[data-readonly]", _before: "&::before", _after: "&::after", _empty: "&:empty", _expanded: "&[aria-expanded=true], &[data-expanded]", _checked: "&[aria-checked=true], &[data-checked]", _grabbed: "&[aria-grabbed=true], &[data-grabbed]", _pressed: "&[aria-pressed=true], &[data-pressed]", _invalid: "&[aria-invalid=true], &[data-invalid]", _valid: "&[data-valid], &[data-state=valid]", _loading: "&[data-loading], &[aria-busy=true]", _selected: "&[aria-selected=true], &[data-selected]", _hidden: "&[hidden], &[data-hidden]", _autofill: "&:-webkit-autofill", _even: "&:nth-of-type(even)", _odd: "&:nth-of-type(odd)", _first: "&:first-of-type", _last: "&:last-of-type", _notFirst: "&:not(:first-of-type)", _notLast: "&:not(:last-of-type)", _visited: "&:visited", _activeLink: "&[aria-current=page]", _activeStep: "&[aria-current=step]", _indeterminate: "&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]", _groupHover: ta(dr.hover), _peerHover: ki(dr.hover), _groupFocus: ta(dr.focus), _peerFocus: ki(dr.focus), _groupFocusVisible: ta(dr.focusVisible), _peerFocusVisible: ki(dr.focusVisible), _groupActive: ta(dr.active), _peerActive: ki(dr.active), _groupDisabled: ta(dr.disabled), _peerDisabled: ki(dr.disabled), _groupInvalid: ta(dr.invalid), _peerInvalid: ki(dr.invalid), _groupChecked: ta(dr.checked), _peerChecked: ki(dr.checked), _groupFocusWithin: ta(dr.focusWithin), _peerFocusWithin: ki(dr.focusWithin), _peerPlaceholderShown: ki(dr.placeholderShown), _placeholder: "&::placeholder", _placeholderShown: "&:placeholder-shown", _fullScreen: "&:fullscreen", _selection: "&::selection", _rtl: "[dir=rtl] &, &[dir=rtl]", _ltr: "[dir=ltr] &, &[dir=ltr]", _mediaDark: "@media (prefers-color-scheme: dark)", _mediaReduceMotion: "@media (prefers-reduced-motion: reduce)", _dark: ".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]", _light: ".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]" }, n8 = Object.keys( nh ); function E2(t, e) { return Z9(String(t).replace(/\./g, "-"), void 0, e); } function i8(t, e) { let r = {}; const n = {}; for (const [i, a] of Object.entries(t)) { const { isSemantic: s, value: u } = a, { variable: c, reference: f } = E2(i, e == null ? void 0 : e.cssVarPrefix); if (!s) { if (i.startsWith("space")) { const g = i.split("."), [v, ...m] = g, b = `${v}.-${m.join(".")}`, S = Ya.negate(u), x = Ya.negate(f); n[b] = { value: S, var: c, varRef: x }; } r[c] = u, n[i] = { value: u, var: c, varRef: f }; continue; } const h = (g) => { const m = [String(i).split(".")[0], g].join("."); if (!t[m]) return g; const { reference: S } = E2(m, e == null ? void 0 : e.cssVarPrefix); return S; }, d = _n(u) ? u : { default: u }; r = ai( r, Object.entries(d).reduce( (g, [v, m]) => { var b, S; const x = h(m); if (v === "default") return g[c] = x, g; const w = (S = (b = nh) == null ? void 0 : b[v]) != null ? S : v; return g[w] = { [c]: x }, g; }, {} ) ), n[i] = { value: f, var: c, varRef: f }; } return { cssVars: r, cssMap: n }; } function a8(t, e = []) { const r = Object.assign({}, t); for (const n of e) n in r && delete r[n]; return r; } function s8(t, e) { const r = {}; for (const n of e) n in t && (r[n] = t[n]); return r; } var o8 = [ "colors", "borders", "borderWidths", "borderStyles", "fonts", "fontSizes", "fontWeights", "letterSpacings", "lineHeights", "radii", "space", "shadows", "sizes", "zIndices", "transition", "blur", "breakpoints" ]; function u8(t) { return s8(t, o8); } function l8(t) { return t.semanticTokens; } function c8(t) { const { __cssMap: e, __cssVars: r, __breakpoints: n, ...i } = t; return i; } function f8({ tokens: t, semanticTokens: e }) { var r, n; const i = Object.entries((r = ng(t)) != null ? r : {}).map( ([s, u]) => [s, { isSemantic: !1, value: u }] ), a = Object.entries( (n = ng(e, 1)) != null ? n : {} ).map(([s, u]) => [s, { isSemantic: !0, value: u }]); return Object.fromEntries([ ...i, ...a ]); } function ng(t, e = 1 / 0) { return !_n(t) && !Array.isArray(t) || !e ? t : Object.entries(t).reduce((r, [n, i]) => (_n(i) || Array.isArray(i) ? Object.entries(ng(i, e - 1)).forEach( ([a, s]) => { r[`${n}.${a}`] = s; } ) : r[n] = i, r), {}); } function CH(t) { var e; const r = c8(t), n = u8(r), i = l8(r), a = f8({ tokens: n, semanticTokens: i }), s = (e = r.config) == null ? void 0 : e.cssVarPrefix, { cssMap: u, cssVars: c } = i8(a, { cssVarPrefix: s }); return Object.assign(r, { __cssVars: { ...{ "--chakra-ring-inset": "var(--chakra-empty,/*!*/ /*!*/)", "--chakra-ring-offset-width": "0px", "--chakra-ring-offset-color": "#fff", "--chakra-ring-color": "rgba(66, 153, 225, 0.6)", "--chakra-ring-offset-shadow": "0 0 #0000", "--chakra-ring-shadow": "0 0 #0000", "--chakra-space-x-reverse": "0", "--chakra-space-y-reverse": "0" }, ...c }, __cssMap: u, __breakpoints: r8(r.breakpoints) }), r; } var hm = ai( {}, af, at, O9, Pf, Sn, R9, j9, k9, xx, F9, Au, eg, Rt, U9, W9, V9, z9, I9, G9 ), h8 = Object.assign({}, Rt, Sn, Pf, xx, Au), _H = Object.keys( h8 ), d8 = [...Object.keys(hm), ...n8], p8 = { ...hm, ...nh }, g8 = (t) => t in p8, m8 = (t) => (e) => { if (!e.__breakpoints) return t; const { isResponsive: r, toArrayValue: n, media: i } = e.__breakpoints, a = {}; for (const s in t) { let u = la(t[s], e); if (u == null) continue; if (u = _n(u) && r(u) ? n(u) : u, !Array.isArray(u)) { a[s] = u; continue; } const c = u.slice(0, i.length).length; for (let f = 0; f < c; f += 1) { const h = i == null ? void 0 : i[f]; if (!h) { a[s] = u[f]; continue; } a[h] = a[h] || {}, u[f] != null && (a[h][s] = u[f]); } } return a; }; function v8(t) { const e = []; let r = "", n = !1; for (let i = 0; i < t.length; i++) { const a = t[i]; a === "(" ? (n = !0, r += a) : a === ")" ? (n = !1, r += a) : a === "," && !n ? (e.push(r), r = "") : r += a; } return r = r.trim(), r && e.push(r), e; } function y8(t) { return /^var\(--.+\)$/.test(t); } var b8 = (t, e) => t.startsWith("--") && typeof e == "string" && !y8(e), S8 = (t, e) => { var r, n; if (e == null) return e; const i = (c) => { var f, h; return (h = (f = t.__cssMap) == null ? void 0 : f[c]) == null ? void 0 : h.varRef; }, a = (c) => { var f; return (f = i(c)) != null ? f : c; }, [s, u] = v8(e); return e = (n = (r = i(s)) != null ? r : a(u)) != null ? n : a(e), e; }; function w8(t) { const { configs: e = {}, pseudos: r = {}, theme: n } = t, i = (a, s = !1) => { var u, c, f; const h = la(a, n), d = m8(h)(n); let g = {}; for (let v in d) { const m = d[v]; let b = la(m, n); v in r && (v = r[v]), b8(v, b) && (b = S8(n, b)); let S = e[v]; if (S === !0 && (S = { property: v }), _n(b)) { g[v] = (u = g[v]) != null ? u : {}, g[v] = ai( {}, g[v], i(b, !0) ); continue; } let x = (f = (c = S == null ? void 0 : S.transform) == null ? void 0 : c.call(S, b, n, h)) != null ? f : b; x = S != null && S.processResult ? i(x, !0) : x; const w = la(S == null ? void 0 : S.property, n); if (!s && (S != null && S.static)) { const _ = la(S.static, n); g = ai({}, g, _); } if (w && Array.isArray(w)) { for (const _ of w) g[_] = x; continue; } if (w) { w === "&" && _n(x) ? g = ai({}, g, x) : g[w] = x; continue; } if (_n(x)) { g = ai({}, g, x); continue; } g[v] = x; } return g; }; return i; } var x8 = (t) => (e) => w8({ theme: e, pseudos: nh, configs: hm })(t); function PH(t) { return t; } function EH(t) { return t; } function TH(t) { return { definePartsStyle(e) { return e; }, defineMultiStyleConfig(e) { return { parts: t, ...e }; } }; } function C8(t, e) { if (Array.isArray(t)) return t; if (_n(t)) return e(t); if (t != null) return [t]; } function _8(t, e) { for (let r = e + 1; r < t.length; r++) if (t[r] != null) return r; return -1; } function P8(t) { const e = t.__breakpoints; return function(n, i, a, s) { var u, c; if (!e) return; const f = {}, h = C8(a, e.toArrayValue); if (!h) return f; const d = h.length, g = d === 1, v = !!n.parts; for (let m = 0; m < d; m++) { const b = e.details[m], S = e.details[_8(h, m)], x = wu(b.minW, S == null ? void 0 : S._minW), w = la((u = n[i]) == null ? void 0 : u[h[m]], s); if (w) { if (v) { (c = n.parts) == null || c.forEach((_) => { ai(f, { [_]: g ? w[_] : { [x]: w[_] } }); }); continue; } if (!v) { g ? ai(f, w) : f[x] = w; continue; } f[x] = w; } } return f; }; } function E8(t) { return (e) => { var r; const { variant: n, size: i, theme: a } = e, s = P8(a); return ai( {}, la((r = t.baseStyle) != null ? r : {}, e), s(t, "sizes", i, e), s(t, "variants", n, e) ); }; } function T8(t, e, r) { var n, i, a; return (a = (i = (n = t.__cssMap) == null ? void 0 : n[`${e}.${r}`]) == null ? void 0 : i.varRef) != null ? a : r; } function nl(t) { return a8(t, ["styleConfig", "size", "variant", "colorScheme"]); } function A8(t, e) { const r = {}; return Object.keys(t).forEach((n) => { e.includes(n) || (r[n] = t[n]); }), r; } function O8(t, e, r, n) { const i = typeof e == "string" ? e.split(".") : [e]; for (n = 0; n < i.length && t; n += 1) t = t[i[n]]; return t === void 0 ? r : t; } var R8 = (t) => { const e = /* @__PURE__ */ new WeakMap(); return (n, i, a, s) => { if (typeof n > "u") return t(n, i, a); e.has(n) || e.set(n, /* @__PURE__ */ new Map()); const u = e.get(n); if (u.has(i)) return u.get(i); const c = t(n, i, a, s); return u.set(i, c), c; }; }, k8 = R8(O8); function Ex(t, e) { const r = {}; return Object.keys(t).forEach((n) => { const i = t[n]; e(i, n, t) && (r[n] = i); }), r; } var Tx = (t) => Ex(t, (e) => e != null); function I8(t) { return typeof t == "function"; } process.env.NODE_ENV; process.env.NODE_ENV; function D8(t, ...e) { return I8(t) ? t(...e) : t; } function AH(...t) { return function(r) { t.some((n) => (n == null || n(r), r == null ? void 0 : r.defaultPrevented)); }; } var M8 = typeof Element < "u", L8 = typeof Map == "function", N8 = typeof Set == "function", B8 = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView; function sf(t, e) { if (t === e) return !0; if (t && e && typeof t == "object" && typeof e == "object") { if (t.constructor !== e.constructor) return !1; var r, n, i; if (Array.isArray(t)) { if (r = t.length, r != e.length) return !1; for (n = r; n-- !== 0; ) if (!sf(t[n], e[n])) return !1; return !0; } var a; if (L8 && t instanceof Map && e instanceof Map) { if (t.size !== e.size) return !1; for (a = t.entries(); !(n = a.next()).done; ) if (!e.has(n.value[0])) return !1; for (a = t.entries(); !(n = a.next()).done; ) if (!sf(n.value[1], e.get(n.value[0]))) return !1; return !0; } if (N8 && t instanceof Set && e instanceof Set) { if (t.size !== e.size) return !1; for (a = t.entries(); !(n = a.next()).done; ) if (!e.has(n.value[0])) return !1; return !0; } if (B8 && ArrayBuffer.isView(t) && ArrayBuffer.isView(e)) { if (r = t.length, r != e.length) return !1; for (n = r; n-- !== 0; ) if (t[n] !== e[n]) return !1; return !0; } if (t.constructor === RegExp) return t.source === e.source && t.flags === e.flags; if (t.valueOf !== Object.prototype.valueOf) return t.valueOf() === e.valueOf(); if (t.toString !== Object.prototype.toString) return t.toString() === e.toString(); if (i = Object.keys(t), r = i.length, r !== Object.keys(e).length) return !1; for (n = r; n-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(e, i[n])) return !1; if (M8 && t instanceof Element) return !1; for (n = r; n-- !== 0; ) if (!((i[n] === "_owner" || i[n] === "__v" || i[n] === "__o") && t.$$typeof) && !sf(t[i[n]], e[i[n]])) return !1; return !0; } return t !== t && e !== e; } var F8 = function(e, r) { try { return sf(e, r); } catch (n) { if ((n.message || "").match(/stack|recursion/i)) return console.warn("react-fast-compare cannot handle circular refs"), !1; throw n; } }; function Ax(t, e = {}) { var r; const { styleConfig: n, ...i } = e, { theme: a, colorMode: s } = a9(), u = t ? k8(a, `components.${t}`) : void 0, c = n || u, f = ai( { theme: a, colorMode: s }, (r = c == null ? void 0 : c.defaultProps) != null ? r : {}, Tx(A8(i, ["children"])) ), h = $e({}); if (c) { const g = E8(c)(f); F8(h.current, g) || (h.current = g); } return h.current; } function ih(t, e = {}) { return Ax(t, e); } function j8(t, e = {}) { return Ax(t, e); } var V8 = /* @__PURE__ */ new Set([ ...d8, "textStyle", "layerStyle", "apply", "noOfLines", "focusBorderColor", "errorBorderColor", "as", "__css", "css", "sx" ]), z8 = /* @__PURE__ */ new Set([ "htmlWidth", "htmlHeight", "htmlSize", "htmlTranslate" ]); function G8(t) { return z8.has(t) || !V8.has(t); } function W8(t) { const e = Object.assign({}, t); for (let r in e) e[r] === void 0 && delete e[r]; return e; } function U8(t, ...e) { if (t == null) throw new TypeError("Cannot convert undefined or null to object"); const r = { ...t }; for (const n of e) if (n != null) for (const i in n) Object.prototype.hasOwnProperty.call(n, i) && (i in r && delete r[i], r[i] = n[i]); return r; } var H8 = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, Y8 = /* @__PURE__ */ lx( function(t) { return H8.test(t) || t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && t.charCodeAt(2) < 91; } /* Z+1 */ ), q8 = Y8, K8 = function(e) { return e !== "theme"; }, T2 = function(e) { return typeof e == "string" && // 96 is one less than the char code // for "a" so this is checking that // it's a lowercase character e.charCodeAt(0) > 96 ? q8 : K8; }, A2 = function(e, r, n) { var i; if (r) { var a = r.shouldForwardProp; i = e.__emotion_forwardProp && a ? function(s) { return e.__emotion_forwardProp(s) && a(s); } : a; } return typeof i != "function" && n && (i = e.__emotion_forwardProp), i; }, O2 = `You have illegal escape sequence in your template literal, most likely inside content's property value. Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';". You can read more about this here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`, X8 = function(e) { var r = e.cache, n = e.serialized, i = e.isStringTag; return Jf(r, n, i), om(function() { return Zf(r, n, i); }), null; }, Q8 = function t(e, r) { if (process.env.NODE_ENV !== "production" && e === void 0) throw new Error(`You are trying to create a styled element with an undefined component. You may have forgotten to import it.`); var n = e.__emotion_real === e, i = n && e.__emotion_base || e, a, s; r !== void 0 && (a = r.label, s = r.target); var u = A2(e, r, n), c = u || T2(i), f = !c("as"); return function() { var h = arguments, d = n && e.__emotion_styles !== void 0 ? e.__emotion_styles.slice(0) : []; if (a !== void 0 && d.push("label:" + a + ";"), h[0] == null || h[0].raw === void 0) d.push.apply(d, h); else { process.env.NODE_ENV !== "production" && h[0][0] === void 0 && console.error(O2), d.push(h[0][0]); for (var g = h.length, v = 1; v < g; v++) process.env.NODE_ENV !== "production" && h[0][v] === void 0 && console.error(O2), d.push(h[v], h[0][v]); } var m = $f(function(b, S, x) { var w = f && b.as || i, _ = "", P = [], E = b; if (b.theme == null) { E = {}; for (var k in b) E[k] = b[k]; E.theme = bt(ma); } typeof b.className == "string" ? _ = am(S.registered, P, b.className) : b.className != null && (_ = b.className + " "); var D = oo(d.concat(P), S.registered, E); _ += S.key + "-" + D.name, s !== void 0 && (_ += " " + s); var V = f && u === void 0 ? T2(w) : c, H = {}; for (var W in b) f && W === "as" || // $FlowFixMe V(W) && (H[W] = b[W]); return H.className = _, H.ref = x, /* @__PURE__ */ si(jf, null, /* @__PURE__ */ si(X8, { cache: S, serialized: D, isStringTag: typeof w == "string" }), /* @__PURE__ */ si(w, H)); }); return m.displayName = a !== void 0 ? a : "Styled(" + (typeof i == "string" ? i : i.displayName || i.name || "Component") + ")", m.defaultProps = e.defaultProps, m.__emotion_real = m, m.__emotion_base = i, m.__emotion_styles = d, m.__emotion_forwardProp = u, Object.defineProperty(m, "toString", { value: function() { return s === void 0 && process.env.NODE_ENV !== "production" ? "NO_COMPONENT_SELECTOR" : "." + s; } }), m.withComponent = function(b, S) { return t(b, ff({}, r, S, { shouldForwardProp: A2(m, S, !0) })).apply(void 0, d); }, m; }; }, J8 = [ "a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "marquee", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "u", "ul", "var", "video", "wbr", // SVG "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan" ], Ef = Q8.bind(); J8.forEach(function(t) { Ef[t] = Ef(t); }); var R2, Z8 = (R2 = Ef.default) != null ? R2 : Ef, $8 = ({ baseStyle: t }) => (e) => { const { theme: r, css: n, __css: i, sx: a, ...s } = e, u = Ex(s, (d, g) => g8(g)), c = D8(t, e), f = U8( {}, i, c, Tx(u), a ), h = x8(f)(e.theme); return n ? [h, n] : h; }; function np(t, e) { const { baseStyle: r, ...n } = e ?? {}; n.shouldForwardProp || (n.shouldForwardProp = G8); const i = $8({ baseStyle: r }), a = Z8( t, n )(i); return Zt.forwardRef(function(c, f) { const { colorMode: h, forced: d } = yx(); return Zt.createElement(a, { ref: f, "data-theme": d ? h : void 0, ...c }); }); } function e7() { const t = /* @__PURE__ */ new Map(); return new Proxy(np, { apply(e, r, n) { return np(...n); }, get(e, r) { return t.has(r) || t.set(r, np(r)), t.get(r); } }); } var Gt = e7(); function Ur(t) { return kg(t); } function ig(t, e = []) { const r = $e(t); return Wt(() => { r.current = t; }), Ze((...n) => { var i; return (i = r.current) == null ? void 0 : i.call(r, ...n); }, e); } function Ox(t, e) { const r = $e(!1), n = $e(!1); Wt(() => { if (r.current && n.current) return t(); n.current = !0; }, e), Wt(() => (r.current = !0, () => { r.current = !1; }), []); } const Rx = On({ transformPagePoint: (t) => t, isStatic: !1, reducedMotion: "never" }), ah = On({}); function t7() { return bt(ah).visualElement; } const il = On(null), sh = typeof document < "u", Tf = sh ? Ff : Wt, kx = On({ strict: !1 }); function r7(t, e, r, n) { const i = t7(), a = bt(kx), s = bt(il), u = bt(Rx).reducedMotion, c = $e(); n = n || a.renderer, !c.current && n && (c.current = n(t, { visualState: e, parent: i, props: r, presenceContext: s, blockInitialAnimation: s ? s.initial === !1 : !1, reducedMotionConfig: u })); const f = c.current; return Jb(() => { f && f.update(r, s); }), Tf(() => { f && f.render(); }), Wt(() => { f && f.updateFeatures(); }), (window.HandoffAppearAnimations ? Tf : Wt)(() => { f && f.animationState && f.animationState.animateChanges(); }), f; } function Xs(t) { return typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current"); } function n7(t, e, r) { return Ze( (n) => { n && t.mount && t.mount(n), e && (n ? e.mount(n) : e.unmount()), r && (typeof r == "function" ? r(n) : Xs(r) && (r.current = n)); }, /** * Only pass a new ref callback to React if we've received a visual element * factory. Otherwise we'll be mounting/remounting every time externalRef * or other dependencies change. */ [e] ); } function Yu(t) { return typeof t == "string" || Array.isArray(t); } function oh(t) { return typeof t == "object" && typeof t.start == "function"; } const dm = [ "animate", "whileInView", "whileFocus", "whileHover", "whileTap", "whileDrag", "exit" ], pm = ["initial", ...dm]; function uh(t) { return oh(t.animate) || pm.some((e) => Yu(t[e])); } function Ix(t) { return Boolean(uh(t) || t.variants); } function i7(t, e) { if (uh(t)) { const { initial: r, animate: n } = t; return { initial: r === !1 || Yu(r) ? r : void 0, animate: Yu(n) ? n : void 0 }; } return t.inherit !== !1 ? e : {}; } function a7(t) { const { initial: e, animate: r } = i7(t, bt(ah)); return Mr(() => ({ initial: e, animate: r }), [k2(e), k2(r)]); } function k2(t) { return Array.isArray(t) ? t.join(" ") : t; } const I2 = { animation: [ "animate", "exit", "variants", "whileHover", "whileTap", "whileFocus", "whileDrag", "whileInView" ], exit: ["exit"], drag: ["drag", "dragControls"], focus: ["whileFocus"], hover: ["whileHover", "onHoverStart", "onHoverEnd"], tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"], pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"], inView: ["whileInView", "onViewportEnter", "onViewportLeave"], layout: ["layout", "layoutId"] }, qu = {}; for (const t in I2) qu[t] = { isEnabled: (e) => I2[t].some((r) => !!e[r]) }; function s7(t) { for (const e in t) qu[e] = { ...qu[e], ...t[e] }; } function gm(t) { const e = $e(null); return e.current === null && (e.current = t()), e.current; } const Ou = { /** * Global flag as to whether the tree has animated since the last time * we resized the window */ hasAnimatedSinceResize: !0, /** * We set this to true once, on the first update. Any nodes added to the tree beyond that * update will be given a `data-projection-id` attribute. */ hasEverUpdated: !1 }; let o7 = 1; function u7() { return gm(() => { if (Ou.hasEverUpdated) return o7++; }); } const mm = On({}), Dx = On({}), l7 = Symbol.for("motionComponentSymbol"); function c7({ preloadedFeatures: t, createVisualElement: e, useRender: r, useVisualState: n, Component: i }) { t && s7(t); function a(u, c) { let f; const h = { ...bt(Rx), ...u, layoutId: f7(u) }, { isStatic: d } = h, g = a7(u), v = d ? void 0 : u7(), m = n(u, d); if (!d && sh) { g.visualElement = r7(i, m, h, e); const b = bt(Dx), S = bt(kx).strict; g.visualElement && (f = g.visualElement.loadFeatures( // Note: Pass the full new combined props to correctly re-render dynamic feature components. h, S, t, v, b )); } return gr.createElement( ah.Provider, { value: g }, f && g.visualElement ? gr.createElement(f, { visualElement: g.visualElement, ...h }) : null, r(i, u, v, n7(m, g.visualElement, c), m, d, g.visualElement) ); } const s = kg(a); return s[l7] = i, s; } function f7({ layoutId: t }) { const e = bt(mm).id; return e && t !== void 0 ? e + "-" + t : t; } function h7(t) { function e(n, i = {}) { return c7(t(n, i)); } if (typeof Proxy > "u") return e; const r = /* @__PURE__ */ new Map(); return new Proxy(e, { /** * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc. * The prop name is passed through as `key` and we can use that to generate a `motion` * DOM component with that name. */ get: (n, i) => (r.has(i) || r.set(i, e(i)), r.get(i)) }); } const d7 = [ "animate", "circle", "defs", "desc", "ellipse", "g", "image", "line", "filter", "marker", "mask", "metadata", "path", "pattern", "polygon", "polyline", "rect", "stop", "switch", "symbol", "svg", "text", "tspan", "use", "view" ]; function vm(t) { return ( /** * If it's not a string, it's a custom React component. Currently we only support * HTML custom React components. */ typeof t != "string" || /** * If it contains a dash, the element is a custom HTML webcomponent. */ t.includes("-") ? !1 : ( /** * If it's in our list of lowercase SVG tags, it's an SVG component */ !!(d7.indexOf(t) > -1 || /** * If it contains a capital letter, it's an SVG component */ /[A-Z]/.test(t)) ) ); } const Af = {}; function p7(t) { Object.assign(Af, t); } const lh = [ "transformPerspective", "x", "y", "z", "translateX", "translateY", "translateZ", "scale", "scaleX", "scaleY", "rotate", "rotateX", "rotateY", "rotateZ", "skew", "skewX", "skewY" ], as = new Set(lh); function Mx(t, { layout: e, layoutId: r }) { return as.has(t) || t.startsWith("origin") || (e || r !== void 0) && (!!Af[t] || t === "opacity"); } const Wr = (t) => Boolean(t && t.getVelocity), g7 = { x: "translateX", y: "translateY", z: "translateZ", transformPerspective: "perspective" }, m7 = lh.length; function v7(t, { enableHardwareAcceleration: e = !0, allowTransformNone: r = !0 }, n, i) { let a = ""; for (let s = 0; s < m7; s++) { const u = lh[s]; if (t[u] !== void 0) { const c = g7[u] || u; a += `${c}(${t[u]}) `; } } return e && !t.z && (a += "translateZ(0)"), a = a.trim(), i ? a = i(t, n ? "" : a) : r && n && (a = "none"), a; } const Lx = (t) => (e) => typeof e == "string" && e.startsWith(t), Nx = Lx("--"), ag = Lx("var(--"), y7 = (t, e) => e && typeof t == "number" ? e.transform(t) : t, uo = (t, e, r) => Math.min(Math.max(r, t), e), ss = { test: (t) => typeof t == "number", parse: parseFloat, transform: (t) => t }, Ru = { ...ss, transform: (t) => uo(0, 1, t) }, jc = { ...ss, default: 1 }, ku = (t) => Math.round(t * 1e5) / 1e5, Ku = /(-)?([\d]*\.?[\d])+/g, sg = /(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi, b7 = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i; function al(t) { return typeof t == "string"; } const sl = (t) => ({ test: (e) => al(e) && e.endsWith(t) && e.split(" ").length === 1, parse: parseFloat, transform: (e) => `${e}${t}` }), ia = sl("deg"), ci = sl("%"), Ae = sl("px"), S7 = sl("vh"), w7 = sl("vw"), D2 = { ...ci, parse: (t) => ci.parse(t) / 100, transform: (t) => ci.transform(t * 100) }, M2 = { ...ss, transform: Math.round }, Bx = { // Border props borderWidth: Ae, borderTopWidth: Ae, borderRightWidth: Ae, borderBottomWidth: Ae, borderLeftWidth: Ae, borderRadius: Ae, radius: Ae, borderTopLeftRadius: Ae, borderTopRightRadius: Ae, borderBottomRightRadius: Ae, borderBottomLeftRadius: Ae, // Positioning props width: Ae, maxWidth: Ae, height: Ae, maxHeight: Ae, size: Ae, top: Ae, right: Ae, bottom: Ae, left: Ae, // Spacing props padding: Ae, paddingTop: Ae, paddingRight: Ae, paddingBottom: Ae, paddingLeft: Ae, margin: Ae, marginTop: Ae, marginRight: Ae, marginBottom: Ae, marginLeft: Ae, // Transform props rotate: ia, rotateX: ia, rotateY: ia, rotateZ: ia, scale: jc, scaleX: jc, scaleY: jc, scaleZ: jc, skew: ia, skewX: ia, skewY: ia, distance: Ae, translateX: Ae, translateY: Ae, translateZ: Ae, x: Ae, y: Ae, z: Ae, perspective: Ae, transformPerspective: Ae, opacity: Ru, originX: D2, originY: D2, originZ: Ae, // Misc zIndex: M2, // SVG fillOpacity: Ru, strokeOpacity: Ru, numOctaves: M2 }; function ym(t, e, r, n) { const { style: i, vars: a, transform: s, transformOrigin: u } = t; let c = !1, f = !1, h = !0; for (const d in e) { const g = e[d]; if (Nx(d)) { a[d] = g; continue; } const v = Bx[d], m = y7(g, v); if (as.has(d)) { if (c = !0, s[d] = m, !h) continue; g !== (v.default || 0) && (h = !1); } else d.startsWith("origin") ? (f = !0, u[d] = m) : i[d] = m; } if (e.transform || (c || n ? i.transform = v7(t.transform, r, h, n) : i.transform && (i.transform = "none")), f) { const { originX: d = "50%", originY: g = "50%", originZ: v = 0 } = u; i.transformOrigin = `${d} ${g} ${v}`; } } const bm = () => ({ style: {}, transform: {}, transformOrigin: {}, vars: {} }); function Fx(t, e, r) { for (const n in e) !Wr(e[n]) && !Mx(n, r) && (t[n] = e[n]); } function x7({ transformTemplate: t }, e, r) { return Mr(() => { const n = bm(); return ym(n, e, { enableHardwareAcceleration: !r }, t), Object.assign({}, n.vars, n.style); }, [e]); } function C7(t, e, r) { const n = t.style || {}, i = {}; return Fx(i, n, t), Object.assign(i, x7(t, e, r)), t.transformValues ? t.transformValues(i) : i; } function _7(t, e, r) { const n = {}, i = C7(t, e, r); return t.drag && t.dragListener !== !1 && (n.draggable = !1, i.userSelect = i.WebkitUserSelect = i.WebkitTouchCallout = "none", i.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (n.tabIndex = 0), n.style = i, n; } const P7 = /* @__PURE__ */ new Set([ "animate", "exit", "variants", "initial", "style", "values", "variants", "transition", "transformTemplate", "transformValues", "custom", "inherit", "onLayoutAnimationStart", "onLayoutAnimationComplete", "onLayoutMeasure", "onBeforeLayoutMeasure", "onAnimationStart", "onAnimationComplete", "onUpdate", "onDragStart", "onDrag", "onDragEnd", "onMeasureDragConstraints", "onDirectionLock", "onDragTransitionEnd", "_dragX", "_dragY", "onHoverStart", "onHoverEnd", "onViewportEnter", "onViewportLeave", "ignoreStrict", "viewport" ]); function Of(t) { return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || P7.has(t); } let jx = (t) => !Of(t); function E7(t) { t && (jx = (e) => e.startsWith("on") ? !Of(e) : t(e)); } try { E7(require("@emotion/is-prop-valid").default); } catch { } function T7(t, e, r) { const n = {}; for (const i in t) i === "values" && typeof t.values == "object" || (jx(i) || r === !0 && Of(i) || !e && !Of(i) || // If trying to use native HTML drag events, forward drag listeners t.draggable && i.startsWith("onDrag")) && (n[i] = t[i]); return n; } function L2(t, e, r) { return typeof t == "string" ? t : Ae.transform(e + r * t); } function A7(t, e, r) { const n = L2(e, t.x, t.width), i = L2(r, t.y, t.height); return `${n} ${i}`; } const O7 = { offset: "stroke-dashoffset", array: "stroke-dasharray" }, R7 = { offset: "strokeDashoffset", array: "strokeDasharray" }; function k7(t, e, r = 1, n = 0, i = !0) { t.pathLength = 1; const a = i ? O7 : R7; t[a.offset] = Ae.transform(-n); const s = Ae.transform(e), u = Ae.transform(r); t[a.array] = `${s} ${u}`; } function Sm(t, { attrX: e, attrY: r, originX: n, originY: i, pathLength: a, pathSpacing: s = 1, pathOffset: u = 0, // This is object creation, which we try to avoid per-frame. ...c }, f, h, d) { if (ym(t, c, f, d), h) { t.style.viewBox && (t.attrs.viewBox = t.style.viewBox); return; } t.attrs = t.style, t.style = {}; const { attrs: g, style: v, dimensions: m } = t; g.transform && (m && (v.transform = g.transform), delete g.transform), m && (n !== void 0 || i !== void 0 || v.transform) && (v.transformOrigin = A7(m, n !== void 0 ? n : 0.5, i !== void 0 ? i : 0.5)), e !== void 0 && (g.x = e), r !== void 0 && (g.y = r), a !== void 0 && k7(g, a, s, u, !1); } const Vx = () => ({ ...bm(), attrs: {} }), wm = (t) => typeof t == "string" && t.toLowerCase() === "svg"; function I7(t, e, r, n) { const i = Mr(() => { const a = Vx(); return Sm(a, e, { enableHardwareAcceleration: !1 }, wm(n), t.transformTemplate), { ...a.attrs, style: { ...a.style } }; }, [e]); if (t.style) { const a = {}; Fx(a, t.style, t), i.style = { ...a, ...i.style }; } return i; } function D7(t = !1) { return (r, n, i, a, { latestValues: s }, u) => { const f = (vm(r) ? I7 : _7)(n, s, u, r), d = { ...T7(n, typeof r == "string", t), ...f, ref: a }, { children: g } = n, v = Mr(() => Wr(g) ? g.get() : g, [g]); return i && (d["data-projection-id"] = i), si(r, { ...d, children: v }); }; } const xm = (t) => t.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(); function zx(t, { style: e, vars: r }, n, i) { Object.assign(t.style, e, i && i.getProjectionStyles(n)); for (const a in r) t.style.setProperty(a, r[a]); } const Gx = /* @__PURE__ */ new Set([ "baseFrequency", "diffuseConstant", "kernelMatrix", "kernelUnitLength", "keySplines", "keyTimes", "limitingConeAngle", "markerHeight", "markerWidth", "numOctaves", "targetX", "targetY", "surfaceScale", "specularConstant", "specularExponent", "stdDeviation", "tableValues", "viewBox", "gradientTransform", "pathLength", "startOffset", "textLength", "lengthAdjust" ]); function Wx(t, e, r, n) { zx(t, e, void 0, n); for (const i in e.attrs) t.setAttribute(Gx.has(i) ? i : xm(i), e.attrs[i]); } function Cm(t, e) { const { style: r } = t, n = {}; for (const i in r) (Wr(r[i]) || e.style && Wr(e.style[i]) || Mx(i, t)) && (n[i] = r[i]); return n; } function Ux(t, e) { const r = Cm(t, e); for (const n in t) if (Wr(t[n]) || Wr(e[n])) { const i = n === "x" || n === "y" ? "attr" + n.toUpperCase() : n; r[i] = t[n]; } return r; } function _m(t, e, r, n = {}, i = {}) { return typeof e == "function" && (e = e(r !== void 0 ? r : t.custom, n, i)), typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function" && (e = e(r !== void 0 ? r : t.custom, n, i)), e; } const Rf = (t) => Array.isArray(t), M7 = (t) => Boolean(t && typeof t == "object" && t.mix && t.toValue), L7 = (t) => Rf(t) ? t[t.length - 1] || 0 : t; function of(t) { const e = Wr(t) ? t.get() : t; return M7(e) ? e.toValue() : e; } function N7({ scrapeMotionValuesFromProps: t, createRenderState: e, onMount: r }, n, i, a) { const s = { latestValues: B7(n, i, a, t), renderState: e() }; return r && (s.mount = (u) => r(n, u, s)), s; } const Hx = (t) => (e, r) => { const n = bt(ah), i = bt(il), a = () => N7(t, e, n, i); return r ? a() : gm(a); }; function B7(t, e, r, n) { const i = {}, a = n(t, {}); for (const g in a) i[g] = of(a[g]); let { initial: s, animate: u } = t; const c = uh(t), f = Ix(t); e && f && !c && t.inherit !== !1 && (s === void 0 && (s = e.initial), u === void 0 && (u = e.animate)); let h = r ? r.initial === !1 : !1; h = h || s === !1; const d = h ? u : s; return d && typeof d != "boolean" && !oh(d) && (Array.isArray(d) ? d : [d]).forEach((v) => { const m = _m(t, v); if (!m) return; const { transitionEnd: b, transition: S, ...x } = m; for (const w in x) { let _ = x[w]; if (Array.isArray(_)) { const P = h ? _.length - 1 : 0; _ = _[P]; } _ !== null && (i[w] = _); } for (const w in b) i[w] = b[w]; }), i; } const F7 = { useVisualState: Hx({ scrapeMotionValuesFromProps: Ux, createRenderState: Vx, onMount: (t, e, { renderState: r, latestValues: n }) => { try { r.dimensions = typeof e.getBBox == "function" ? e.getBBox() : e.getBoundingClientRect(); } catch { r.dimensions = { x: 0, y: 0, width: 0, height: 0 }; } Sm(r, n, { enableHardwareAcceleration: !1 }, wm(e.tagName), t.transformTemplate), Wx(e, r); } }) }, j7 = { useVisualState: Hx({ scrapeMotionValuesFromProps: Cm, createRenderState: bm }) }; function V7(t, { forwardMotionProps: e = !1 }, r, n) { return { ...vm(t) ? F7 : j7, preloadedFeatures: r, useRender: D7(e), createVisualElement: n, Component: t }; } function Mi(t, e, r, n = { passive: !0 }) { return t.addEventListener(e, r, n), () => t.removeEventListener(e, r); } const Yx = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1; function ch(t, e = "page") { return { point: { x: t[e + "X"], y: t[e + "Y"] } }; } const z7 = (t) => (e) => Yx(e) && t(e, ch(e)); function Ni(t, e, r, n) { return Mi(t, e, z7(r), n); } const G7 = (t, e) => (r) => e(t(r)), ha = (...t) => t.reduce(G7); function qx(t) { let e = null; return () => { const r = () => { e = null; }; return e === null ? (e = t, r) : !1; }; } const N2 = qx("dragHorizontal"), B2 = qx("dragVertical"); function Kx(t) { let e = !1; if (t === "y") e = B2(); else if (t === "x") e = N2(); else { const r = N2(), n = B2(); r && n ? e = () => { r(), n(); } : (r && r(), n && n()); } return e; } function Xx() { const t = Kx(!0); return t ? (t(), !1) : !0; } class Ca { constructor(e) { this.isMounted = !1, this.node = e; } update() { } } function F2(t, e) { const r = "pointer" + (e ? "enter" : "leave"), n = "onHover" + (e ? "Start" : "End"), i = (a, s) => { if (a.type === "touch" || Xx()) return; const u = t.getProps(); t.animationState && u.whileHover && t.animationState.setActive("whileHover", e), u[n] && u[n](a, s); }; return Ni(t.current, r, i, { passive: !t.getProps()[n] }); } class W7 extends Ca { mount() { this.unmount = ha(F2(this.node, !0), F2(this.node, !1)); } unmount() { } } class U7 extends Ca { constructor() { super(...arguments), this.isActive = !1; } onFocus() { let e = !1; try { e = this.node.current.matches(":focus-visible"); } catch { e = !0; } !e || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0); } onBlur() { !this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1); } mount() { this.unmount = ha(Mi(this.node.current, "focus", () => this.onFocus()), Mi(this.node.current, "blur", () => this.onBlur())); } unmount() { } } const Qx = (t, e) => e ? t === e ? !0 : Qx(t, e.parentElement) : !1, Pn = (t) => t; function ip(t, e) { if (!e) return; const r = new PointerEvent("pointer" + t); e(r, ch(r)); } class H7 extends Ca { constructor() { super(...arguments), this.removeStartListeners = Pn, this.removeEndListeners = Pn, this.removeAccessibleListeners = Pn, this.startPointerPress = (e, r) => { if (this.removeEndListeners(), this.isPressing) return; const n = this.node.getProps(), a = Ni(window, "pointerup", (u, c) => { if (!this.checkPressEnd()) return; const { onTap: f, onTapCancel: h } = this.node.getProps(); Qx(this.node.current, u.target) ? f && f(u, c) : h && h(u, c); }, { passive: !(n.onTap || n.onPointerUp) }), s = Ni(window, "pointercancel", (u, c) => this.cancelPress(u, c), { passive: !(n.onTapCancel || n.onPointerCancel) }); this.removeEndListeners = ha(a, s), this.startPress(e, r); }, this.startAccessiblePress = () => { const e = (a) => { if (a.key !== "Enter" || this.isPressing) return; const s = (u) => { u.key !== "Enter" || !this.checkPressEnd() || ip("up", this.node.getProps().onTap); }; this.removeEndListeners(), this.removeEndListeners = Mi(this.node.current, "keyup", s), ip("down", (u, c) => { this.startPress(u, c); }); }, r = Mi(this.node.current, "keydown", e), n = () => { this.isPressing && ip("cancel", (a, s) => this.cancelPress(a, s)); }, i = Mi(this.node.current, "blur", n); this.removeAccessibleListeners = ha(r, i); }; } startPress(e, r) { this.isPressing = !0; const { onTapStart: n, whileTap: i } = this.node.getProps(); i && this.node.animationState && this.node.animationState.setActive("whileTap", !0), n && n(e, r); } checkPressEnd() { return this.removeEndListeners(), this.isPressing = !1, this.node.getProps().whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !1), !Xx(); } cancelPress(e, r) { if (!this.checkPressEnd()) return; const { onTapCancel: n } = this.node.getProps(); n && n(e, r); } mount() { const e = this.node.getProps(), r = Ni(this.node.current, "pointerdown", this.startPointerPress, { passive: !(e.onTapStart || e.onPointerStart) }), n = Mi(this.node.current, "focus", this.startAccessiblePress); this.removeStartListeners = ha(r, n); } unmount() { this.removeStartListeners(), this.removeEndListeners(), this.removeAccessibleListeners(); } } const og = /* @__PURE__ */ new WeakMap(), ap = /* @__PURE__ */ new WeakMap(), Y7 = (t) => { const e = og.get(t.target); e && e(t); }, q7 = (t) => { t.forEach(Y7); }; function K7({ root: t, ...e }) { const r = t || document; ap.has(r) || ap.set(r, {}); const n = ap.get(r), i = JSON.stringify(e); return n[i] || (n[i] = new IntersectionObserver(q7, { root: t, ...e })), n[i]; } function X7(t, e, r) { const n = K7(e); return og.set(t, r), n.observe(t), () => { og.delete(t), n.unobserve(t); }; } const Q7 = { some: 0, all: 1 }; class J7 extends Ca { constructor() { super(...arguments), this.hasEnteredView = !1, this.isInView = !1; } /** * TODO: Remove this in 10.0 */ viewportFallback() { requestAnimationFrame(() => { this.hasEnteredView = !0; const { onViewportEnter: e } = this.node.getProps(); e && e(null), this.node.animationState && this.node.animationState.setActive("whileInView", !0); }); } startObserver() { this.unmount(); const { viewport: e = {} } = this.node.getProps(), { root: r, margin: n, amount: i = "some", once: a, fallback: s = !0 } = e; if (typeof IntersectionObserver > "u") { s && this.viewportFallback(); return; } const u = { root: r ? r.current : void 0, rootMargin: n, threshold: typeof i == "number" ? i : Q7[i] }, c = (f) => { const { isIntersecting: h } = f; if (this.isInView === h || (this.isInView = h, a && !h && this.hasEnteredView)) return; h && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", h); const { onViewportEnter: d, onViewportLeave: g } = this.node.getProps(), v = h ? d : g; v && v(f); }; return X7(this.node.current, u, c); } mount() { this.startObserver(); } update() { if (typeof IntersectionObserver > "u") return; const { props: e, prevProps: r } = this.node; ["amount", "margin", "root"].some(Z7(e, r)) && this.startObserver(); } unmount() { } } function Z7({ viewport: t = {} }, { viewport: e = {} } = {}) { return (r) => t[r] !== e[r]; } const $7 = { inView: { Feature: J7 }, tap: { Feature: H7 }, focus: { Feature: U7 }, hover: { Feature: W7 } }; function Jx(t, e) { if (!Array.isArray(e)) return !1; const r = e.length; if (r !== t.length) return !1; for (let n = 0; n < r; n++) if (e[n] !== t[n]) return !1; return !0; } const eN = (t) => /^\-?\d*\.?\d+$/.test(t), tN = (t) => /^0[^.\s]+$/.test(t), Bi = { delta: 0, timestamp: 0 }, Zx = 1 / 60 * 1e3, rN = typeof performance < "u" ? () => performance.now() : () => Date.now(), $x = typeof window < "u" ? (t) => window.requestAnimationFrame(t) : (t) => setTimeout(() => t(rN()), Zx); function nN(t) { let e = [], r = [], n = 0, i = !1, a = !1; const s = /* @__PURE__ */ new WeakSet(), u = { /** * Schedule a process to run on the next frame. */ schedule: (c, f = !1, h = !1) => { const d = h && i, g = d ? e : r; return f && s.add(c), g.indexOf(c) === -1 && (g.push(c), d && i && (n = e.length)), c; }, /** * Cancel the provided callback from running on the next frame. */ cancel: (c) => { const f = r.indexOf(c); f !== -1 && r.splice(f, 1), s.delete(c); }, /** * Execute all schedule callbacks. */ process: (c) => { if (i) { a = !0; return; } if (i = !0, [e, r] = [r, e], r.length = 0, n = e.length, n) for (let f = 0; f < n; f++) { const h = e[f]; h(c), s.has(h) && (u.schedule(h), t()); } i = !1, a && (a = !1, u.process(c)); } }; return u; } const iN = 40; let ug = !0, Xu = !1, lg = !1; const ol = [ "read", "update", "preRender", "render", "postRender" ], fh = ol.reduce((t, e) => (t[e] = nN(() => Xu = !0), t), {}), _r = ol.reduce((t, e) => { const r = fh[e]; return t[e] = (n, i = !1, a = !1) => (Xu || sN(), r.schedule(n, i, a)), t; }, {}), va = ol.reduce((t, e) => (t[e] = fh[e].cancel, t), {}), sp = ol.reduce((t, e) => (t[e] = () => fh[e].process(Bi), t), {}), aN = (t) => fh[t].process(Bi), e3 = (t) => { Xu = !1, Bi.delta = ug ? Zx : Math.max(Math.min(t - Bi.timestamp, iN), 1), Bi.timestamp = t, lg = !0, ol.forEach(aN), lg = !1, Xu && (ug = !1, $x(e3)); }, sN = () => { Xu = !0, ug = !0, lg || $x(e3); }; function Pm(t, e) { t.indexOf(e) === -1 && t.push(e); } function Em(t, e) { const r = t.indexOf(e); r > -1 && t.splice(r, 1); } class Tm { constructor() { this.subscriptions = []; } add(e) { return Pm(this.subscriptions, e), () => Em(this.subscriptions, e); } notify(e, r, n) { const i = this.subscriptions.length; if (i) if (i === 1) this.subscriptions[0](e, r, n); else for (let a = 0; a < i; a++) { const s = this.subscriptions[a]; s && s(e, r, n); } } getSize() { return this.subscriptions.length; } clear() { this.subscriptions.length = 0; } } function Am(t, e) { return e ? t * (1e3 / e) : 0; } const oN = (t) => !isNaN(parseFloat(t)); class uN { /** * @param init - The initiating value * @param config - Optional configuration options * * - `transformer`: A function to transform incoming values with. * * @internal */ constructor(e, r = {}) { this.version = "9.1.7", this.timeDelta = 0, this.lastUpdated = 0, this.canTrackVelocity = !1, this.events = {}, this.updateAndNotify = (n, i = !0) => { this.prev = this.current, this.current = n; const { delta: a, timestamp: s } = Bi; this.lastUpdated !== s && (this.timeDelta = a, this.lastUpdated = s, _r.postRender(this.scheduleVelocityCheck)), this.prev !== this.current && this.events.change && this.events.change.notify(this.current), this.events.velocityChange && this.events.velocityChange.notify(this.getVelocity()), i && this.events.renderRequest && this.events.renderRequest.notify(this.current); }, this.scheduleVelocityCheck = () => _r.postRender(this.velocityCheck), this.velocityCheck = ({ timestamp: n }) => { n !== this.lastUpdated && (this.prev = this.current, this.events.velocityChange && this.events.velocityChange.notify(this.getVelocity())); }, this.hasAnimated = !1, this.prev = this.current = e, this.canTrackVelocity = oN(this.current), this.owner = r.owner; } /** * Adds a function that will be notified when the `MotionValue` is updated. * * It returns a function that, when called, will cancel the subscription. * * When calling `onChange` inside a React component, it should be wrapped with the * `useEffect` hook. As it returns an unsubscribe function, this should be returned * from the `useEffect` function to ensure you don't add duplicate subscribers.. * * ```jsx * export const MyComponent = () => { * const x = useMotionValue(0) * const y = useMotionValue(0) * const opacity = useMotionValue(1) * * useEffect(() => { * function updateOpacity() { * const maxXY = Math.max(x.get(), y.get()) * const newOpacity = transform(maxXY, [0, 100], [1, 0]) * opacity.set(newOpacity) * } * * const unsubscribeX = x.on("change", updateOpacity) * const unsubscribeY = y.on("change", updateOpacity) * * return () => { * unsubscribeX() * unsubscribeY() * } * }, []) * * return * } * ``` * * @param subscriber - A function that receives the latest value. * @returns A function that, when called, will cancel this subscription. * * @deprecated */ onChange(e) { return this.on("change", e); } on(e, r) { this.events[e] || (this.events[e] = new Tm()); const n = this.events[e].add(r); return e === "change" ? () => { n(), _r.read(() => { this.events.change.getSize() || this.stop(); }); } : n; } clearListeners() { for (const e in this.events) this.events[e].clear(); } /** * Attaches a passive effect to the `MotionValue`. * * @internal */ attach(e, r) { this.passiveEffect = e, this.stopPassiveEffect = r; } /** * Sets the state of the `MotionValue`. * * @remarks * * ```jsx * const x = useMotionValue(0) * x.set(10) * ``` * * @param latest - Latest value to set. * @param render - Whether to notify render subscribers. Defaults to `true` * * @public */ set(e, r = !0) { !r || !this.passiveEffect ? this.updateAndNotify(e, r) : this.passiveEffect(e, this.updateAndNotify); } setWithVelocity(e, r, n) { this.set(r), this.prev = e, this.timeDelta = n; } /** * Set the state of the `MotionValue`, stopping any active animations, * effects, and resets velocity to `0`. */ jump(e) { this.updateAndNotify(e), this.prev = e, this.stop(), this.stopPassiveEffect && this.stopPassiveEffect(); } /** * Returns the latest state of `MotionValue` * * @returns - The latest state of `MotionValue` * * @public */ get() { return this.current; } /** * @public */ getPrevious() { return this.prev; } /** * Returns the latest velocity of `MotionValue` * * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical. * * @public */ getVelocity() { return this.canTrackVelocity ? ( // These casts could be avoided if parseFloat would be typed better Am(parseFloat(this.current) - parseFloat(this.prev), this.timeDelta) ) : 0; } /** * Registers a new animation to control this `MotionValue`. Only one * animation can drive a `MotionValue` at one time. * * ```jsx * value.start() * ``` * * @param animation - A function that starts the provided animation * * @internal */ start(e) { return this.stop(), new Promise((r) => { this.hasAnimated = !0, this.animation = e(r) || null, this.events.animationStart && this.events.animationStart.notify(); }).then(() => { this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation(); }); } /** * Stop the currently active animation. * * @public */ stop() { this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation(); } /** * Returns `true` if this value is currently animating. * * @public */ isAnimating() { return !!this.animation; } clearAnimation() { this.animation = null; } /** * Destroy and clean up subscribers to this `MotionValue`. * * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually * created a `MotionValue` via the `motionValue` function. * * @public */ destroy() { this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect(); } } function lo(t, e) { return new uN(t, e); } const Om = (t, e) => (r) => Boolean(al(r) && b7.test(r) && r.startsWith(t) || e && Object.prototype.hasOwnProperty.call(r, e)), t3 = (t, e, r) => (n) => { if (!al(n)) return n; const [i, a, s, u] = n.match(Ku); return { [t]: parseFloat(i), [e]: parseFloat(a), [r]: parseFloat(s), alpha: u !== void 0 ? parseFloat(u) : 1 }; }, lN = (t) => uo(0, 255, t), op = { ...ss, transform: (t) => Math.round(lN(t)) }, qa = { test: Om("rgb", "red"), parse: t3("red", "green", "blue"), transform: ({ red: t, green: e, blue: r, alpha: n = 1 }) => "rgba(" + op.transform(t) + ", " + op.transform(e) + ", " + op.transform(r) + ", " + ku(Ru.transform(n)) + ")" }; function cN(t) { let e = "", r = "", n = "", i = ""; return t.length > 5 ? (e = t.substring(1, 3), r = t.substring(3, 5), n = t.substring(5, 7), i = t.substring(7, 9)) : (e = t.substring(1, 2), r = t.substring(2, 3), n = t.substring(3, 4), i = t.substring(4, 5), e += e, r += r, n += n, i += i), { red: parseInt(e, 16), green: parseInt(r, 16), blue: parseInt(n, 16), alpha: i ? parseInt(i, 16) / 255 : 1 }; } const cg = { test: Om("#"), parse: cN, transform: qa.transform }, Qs = { test: Om("hsl", "hue"), parse: t3("hue", "saturation", "lightness"), transform: ({ hue: t, saturation: e, lightness: r, alpha: n = 1 }) => "hsla(" + Math.round(t) + ", " + ci.transform(ku(e)) + ", " + ci.transform(ku(r)) + ", " + ku(Ru.transform(n)) + ")" }, Ir = { test: (t) => qa.test(t) || cg.test(t) || Qs.test(t), parse: (t) => qa.test(t) ? qa.parse(t) : Qs.test(t) ? Qs.parse(t) : cg.parse(t), transform: (t) => al(t) ? t : t.hasOwnProperty("red") ? qa.transform(t) : Qs.transform(t) }, r3 = "${c}", n3 = "${n}"; function fN(t) { var e, r; return isNaN(t) && al(t) && (((e = t.match(Ku)) === null || e === void 0 ? void 0 : e.length) || 0) + (((r = t.match(sg)) === null || r === void 0 ? void 0 : r.length) || 0) > 0; } function kf(t) { typeof t == "number" && (t = `${t}`); const e = []; let r = 0, n = 0; const i = t.match(sg); i && (r = i.length, t = t.replace(sg, r3), e.push(...i.map(Ir.parse))); const a = t.match(Ku); return a && (n = a.length, t = t.replace(Ku, n3), e.push(...a.map(ss.parse))), { values: e, numColors: r, numNumbers: n, tokenised: t }; } function i3(t) { return kf(t).values; } function a3(t) { const { values: e, numColors: r, tokenised: n } = kf(t), i = e.length; return (a) => { let s = n; for (let u = 0; u < i; u++) s = s.replace(u < r ? r3 : n3, u < r ? Ir.transform(a[u]) : ku(a[u])); return s; }; } const hN = (t) => typeof t == "number" ? 0 : t; function dN(t) { const e = i3(t); return a3(t)(e.map(hN)); } const ya = { test: fN, parse: i3, createTransformer: a3, getAnimatableNone: dN }, pN = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]); function gN(t) { const [e, r] = t.slice(0, -1).split("("); if (e === "drop-shadow") return t; const [n] = r.match(Ku) || []; if (!n) return t; const i = r.replace(n, ""); let a = pN.has(e) ? 1 : 0; return n !== r && (a *= 100), e + "(" + a + i + ")"; } const mN = /([a-z-]*)\(.*?\)/g, fg = { ...ya, getAnimatableNone: (t) => { const e = t.match(mN); return e ? e.map(gN).join(" ") : t; } }, vN = { ...Bx, // Color props color: Ir, backgroundColor: Ir, outlineColor: Ir, fill: Ir, stroke: Ir, // Border props borderColor: Ir, borderTopColor: Ir, borderRightColor: Ir, borderBottomColor: Ir, borderLeftColor: Ir, filter: fg, WebkitFilter: fg }, Rm = (t) => vN[t]; function km(t, e) { let r = Rm(t); return r !== fg && (r = ya), r.getAnimatableNone ? r.getAnimatableNone(e) : void 0; } const s3 = (t) => (e) => e.test(t), yN = { test: (t) => t === "auto", parse: (t) => t }, o3 = [ss, Ae, ci, ia, w7, S7, yN], fu = (t) => o3.find(s3(t)), bN = [...o3, Ir, ya], SN = (t) => bN.find(s3(t)); function wN(t) { const e = {}; return t.values.forEach((r, n) => e[n] = r.get()), e; } function xN(t) { const e = {}; return t.values.forEach((r, n) => e[n] = r.getVelocity()), e; } function hh(t, e, r) { const n = t.getProps(); return _m(n, e, r !== void 0 ? r : n.custom, wN(t), xN(t)); } function CN(t, e, r) { t.hasValue(e) ? t.getValue(e).set(r) : t.addValue(e, lo(r)); } function _N(t, e) { const r = hh(t, e); let { transitionEnd: n = {}, transition: i = {}, ...a } = r ? t.makeTargetAnimatable(r, !1) : {}; a = { ...a, ...n }; for (const s in a) { const u = L7(a[s]); CN(t, s, u); } } function PN(t, e, r) { var n, i; const a = Object.keys(e).filter((u) => !t.hasValue(u)), s = a.length; if (s) for (let u = 0; u < s; u++) { const c = a[u], f = e[c]; let h = null; Array.isArray(f) && (h = f[0]), h === null && (h = (i = (n = r[c]) !== null && n !== void 0 ? n : t.readValue(c)) !== null && i !== void 0 ? i : e[c]), h != null && (typeof h == "string" && (eN(h) || tN(h)) ? h = parseFloat(h) : !SN(h) && ya.test(f) && (h = km(c, f)), t.addValue(c, lo(h, { owner: t })), r[c] === void 0 && (r[c] = h), h !== null && t.setBaseTarget(c, h)); } } function EN(t, e) { return e ? (e[t] || e.default || e).from : void 0; } function TN(t, e, r) { const n = {}; for (const i in t) { const a = EN(i, e); if (a !== void 0) n[i] = a; else { const s = r.getValue(i); s && (n[i] = s.get()); } } return n; } function If(t) { return Boolean(Wr(t) && t.add); } const AN = "framerAppearId", ON = "data-" + xm(AN); let ul = Pn, Wn = Pn; process.env.NODE_ENV !== "production" && (ul = (t, e) => { !t && typeof console < "u" && console.warn(e); }, Wn = (t, e) => { if (!t) throw new Error(e); }); const uf = (t) => t * 1e3, RN = { current: !1 }, Im = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Dm = (t) => (e) => 1 - t(1 - e), Mm = (t) => t * t, kN = Dm(Mm), Lm = Im(Mm), Nt = (t, e, r) => -r * t + r * e + t; function up(t, e, r) { return r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? t + (e - t) * 6 * r : r < 1 / 2 ? e : r < 2 / 3 ? t + (e - t) * (2 / 3 - r) * 6 : t; } function IN({ hue: t, saturation: e, lightness: r, alpha: n }) { t /= 360, e /= 100, r /= 100; let i = 0, a = 0, s = 0; if (!e) i = a = s = r; else { const u = r < 0.5 ? r * (1 + e) : r + e - r * e, c = 2 * r - u; i = up(c, u, t + 1 / 3), a = up(c, u, t), s = up(c, u, t - 1 / 3); } return { red: Math.round(i * 255), green: Math.round(a * 255), blue: Math.round(s * 255), alpha: n }; } const lp = (t, e, r) => { const n = t * t; return Math.sqrt(Math.max(0, r * (e * e - n) + n)); }, DN = [cg, qa, Qs], MN = (t) => DN.find((e) => e.test(t)); function j2(t) { const e = MN(t); Wn(Boolean(e), `'${t}' is not an animatable color. Use the equivalent color code instead.`); let r = e.parse(t); return e === Qs && (r = IN(r)), r; } const u3 = (t, e) => { const r = j2(t), n = j2(e), i = { ...r }; return (a) => (i.red = lp(r.red, n.red, a), i.green = lp(r.green, n.green, a), i.blue = lp(r.blue, n.blue, a), i.alpha = Nt(r.alpha, n.alpha, a), qa.transform(i)); }; function l3(t, e) { return typeof t == "number" ? (r) => Nt(t, e, r) : Ir.test(t) ? u3(t, e) : f3(t, e); } const c3 = (t, e) => { const r = [...t], n = r.length, i = t.map((a, s) => l3(a, e[s])); return (a) => { for (let s = 0; s < n; s++) r[s] = i[s](a); return r; }; }, LN = (t, e) => { const r = { ...t, ...e }, n = {}; for (const i in r) t[i] !== void 0 && e[i] !== void 0 && (n[i] = l3(t[i], e[i])); return (i) => { for (const a in n) r[a] = n[a](i); return r; }; }, f3 = (t, e) => { const r = ya.createTransformer(e), n = kf(t), i = kf(e); return n.numColors === i.numColors && n.numNumbers >= i.numNumbers ? ha(c3(n.values, i.values), r) : (ul(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), (s) => `${s > 0 ? e : t}`); }, Qu = (t, e, r) => { const n = e - t; return n === 0 ? 1 : (r - t) / n; }, V2 = (t, e) => (r) => Nt(t, e, r); function NN(t) { return typeof t == "number" ? V2 : typeof t == "string" ? Ir.test(t) ? u3 : f3 : Array.isArray(t) ? c3 : typeof t == "object" ? LN : V2; } function BN(t, e, r) { const n = [], i = r || NN(t[0]), a = t.length - 1; for (let s = 0; s < a; s++) { let u = i(t[s], t[s + 1]); if (e) { const c = Array.isArray(e) ? e[s] : e; u = ha(c, u); } n.push(u); } return n; } function h3(t, e, { clamp: r = !0, ease: n, mixer: i } = {}) { const a = t.length; Wn(a === e.length, "Both input and output ranges must be the same length"), Wn(!n || !Array.isArray(n) || n.length === a - 1, "Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."), t[0] > t[a - 1] && (t = [...t].reverse(), e = [...e].reverse()); const s = BN(e, n, i), u = s.length, c = (f) => { let h = 0; if (u > 1) for (; h < t.length - 2 && !(f < t[h + 1]); h++) ; const d = Qu(t[h], t[h + 1], f); return s[h](d); }; return r ? (f) => c(uo(t[0], t[a - 1], f)) : c; } function FN(t, e) { const r = t[t.length - 1]; for (let n = 1; n <= e; n++) { const i = Qu(0, e, n); t.push(Nt(r, 1, i)); } } function jN(t) { const e = [0]; return FN(e, t.length - 1), e; } function VN(t, e) { return t.map((r) => r * e); } const d3 = (t, e, r) => (((1 - 3 * r + 3 * e) * t + (3 * r - 6 * e)) * t + 3 * e) * t, zN = 1e-7, GN = 12; function WN(t, e, r, n, i) { let a, s, u = 0; do s = e + (r - e) / 2, a = d3(s, n, i) - t, a > 0 ? r = s : e = s; while (Math.abs(a) > zN && ++u < GN); return s; } function p3(t, e, r, n) { if (t === e && r === n) return Pn; const i = (a) => WN(a, 0, 1, t, r); return (a) => a === 0 || a === 1 ? a : d3(i(a), e, n); } const g3 = (t) => 1 - Math.sin(Math.acos(t)), Nm = Dm(g3), UN = Im(Nm), m3 = p3(0.33, 1.53, 0.69, 0.99), Bm = Dm(m3), HN = Im(Bm), YN = (t) => (t *= 2) < 1 ? 0.5 * Bm(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), z2 = { linear: Pn, easeIn: Mm, easeInOut: Lm, easeOut: kN, circIn: g3, circInOut: UN, circOut: Nm, backIn: Bm, backInOut: HN, backOut: m3, anticipate: YN }, G2 = (t) => { if (Array.isArray(t)) { Wn(t.length === 4, "Cubic bezier arrays must contain four numerical values."); const [e, r, n, i] = t; return p3(e, r, n, i); } else if (typeof t == "string") return Wn(z2[t] !== void 0, `Invalid easing type '${t}'`), z2[t]; return t; }, qN = (t) => Array.isArray(t) && typeof t[0] != "number"; function KN(t, e) { return t.map(() => e || Lm).splice(0, t.length - 1); } function hg({ keyframes: t, ease: e = Lm, times: r, duration: n = 300 }) { t = [...t]; const i = qN(e) ? e.map(G2) : G2(e), a = { done: !1, value: t[0] }, s = VN( // Only use the provided offsets if they're the correct length // TODO Maybe we should warn here if there's a length mismatch r && r.length === t.length ? r : jN(t), n ); function u() { return h3(s, t, { ease: Array.isArray(i) ? i : KN(t, i) }); } let c = u(); return { next: (f) => (a.value = c(f), a.done = f >= n, a), flipTarget: () => { t.reverse(), c = u(); } }; } const cp = 1e-3, XN = 0.01, W2 = 10, QN = 0.05, JN = 1; function ZN({ duration: t = 800, bounce: e = 0.25, velocity: r = 0, mass: n = 1 }) { let i, a; ul(t <= W2 * 1e3, "Spring duration must be 10 seconds or less"); let s = 1 - e; s = uo(QN, JN, s), t = uo(XN, W2, t / 1e3), s < 1 ? (i = (f) => { const h = f * s, d = h * t, g = h - r, v = dg(f, s), m = Math.exp(-d); return cp - g / v * m; }, a = (f) => { const d = f * s * t, g = d * r + r, v = Math.pow(s, 2) * Math.pow(f, 2) * t, m = Math.exp(-d), b = dg(Math.pow(f, 2), s); return (-i(f) + cp > 0 ? -1 : 1) * ((g - v) * m) / b; }) : (i = (f) => { const h = Math.exp(-f * t), d = (f - r) * t + 1; return -cp + h * d; }, a = (f) => { const h = Math.exp(-f * t), d = (r - f) * (t * t); return h * d; }); const u = 5 / t, c = eB(i, a, u); if (t = t * 1e3, isNaN(c)) return { stiffness: 100, damping: 10, duration: t }; { const f = Math.pow(c, 2) * n; return { stiffness: f, damping: s * 2 * Math.sqrt(n * f), duration: t }; } } const $N = 12; function eB(t, e, r) { let n = r; for (let i = 1; i < $N; i++) n = n - t(n) / e(n); return n; } function dg(t, e) { return t * Math.sqrt(1 - e * e); } const tB = ["duration", "bounce"], rB = ["stiffness", "damping", "mass"]; function U2(t, e) { return e.some((r) => t[r] !== void 0); } function nB(t) { let e = { velocity: 0, stiffness: 100, damping: 10, mass: 1, isResolvedFromDuration: !1, ...t }; if (!U2(t, rB) && U2(t, tB)) { const r = ZN(t); e = { ...e, ...r, velocity: 0, mass: 1 }, e.isResolvedFromDuration = !0; } return e; } const iB = 5; function v3({ keyframes: t, restDelta: e, restSpeed: r, ...n }) { let i = t[0], a = t[t.length - 1]; const s = { done: !1, value: i }, { stiffness: u, damping: c, mass: f, velocity: h, duration: d, isResolvedFromDuration: g } = nB(n); let v = aB, m = h ? -(h / 1e3) : 0; const b = c / (2 * Math.sqrt(u * f)); function S() { const x = a - i, w = Math.sqrt(u / f) / 1e3, _ = Math.abs(x) < 5; if (r || (r = _ ? 0.01 : 2), e || (e = _ ? 5e-3 : 0.5), b < 1) { const P = dg(w, b); v = (E) => { const k = Math.exp(-b * w * E); return a - k * ((m + b * w * x) / P * Math.sin(P * E) + x * Math.cos(P * E)); }; } else if (b === 1) v = (P) => a - Math.exp(-w * P) * (x + (m + w * x) * P); else { const P = w * Math.sqrt(b * b - 1); v = (E) => { const k = Math.exp(-b * w * E), D = Math.min(P * E, 300); return a - k * ((m + b * w * x) * Math.sinh(D) + P * x * Math.cosh(D)) / P; }; } } return S(), { next: (x) => { const w = v(x); if (g) s.done = x >= d; else { let _ = m; if (x !== 0) if (b < 1) { const k = Math.max(0, x - iB); _ = Am(w - v(k), x - k); } else _ = 0; const P = Math.abs(_) <= r, E = Math.abs(a - w) <= e; s.done = P && E; } return s.value = s.done ? a : w, s; }, flipTarget: () => { m = -m, [i, a] = [a, i], S(); } }; } v3.needsInterpolation = (t, e) => typeof t == "string" || typeof e == "string"; const aB = (t) => 0; function sB({ /** * The decay animation dynamically calculates an end of the animation * based on the initial keyframe, so we only need to define a single keyframe * as default. */ keyframes: t = [0], velocity: e = 0, power: r = 0.8, timeConstant: n = 350, restDelta: i = 0.5, modifyTarget: a }) { const s = t[0], u = { done: !1, value: s }; let c = r * e; const f = s + c, h = a === void 0 ? f : a(f); return h !== f && (c = h - s), { next: (d) => { const g = -c * Math.exp(-d / n); return u.done = !(g > i || g < -i), u.value = u.done ? h : h + g, u; }, flipTarget: () => { } }; } const oB = { decay: sB, keyframes: hg, tween: hg, spring: v3 }; function y3(t, e, r = 0) { return t - e - r; } function uB(t, e = 0, r = 0, n = !0) { return n ? y3(e + -t, e, r) : e - (t - e) + r; } function lB(t, e, r, n) { return n ? t >= e + r : t <= -r; } const cB = (t) => { const e = ({ delta: r }) => t(r); return { start: () => _r.update(e, !0), stop: () => va.update(e) }; }; function Df({ duration: t, driver: e = cB, elapsed: r = 0, repeat: n = 0, repeatType: i = "loop", repeatDelay: a = 0, keyframes: s, autoplay: u = !0, onPlay: c, onStop: f, onComplete: h, onRepeat: d, onUpdate: g, type: v = "keyframes", ...m }) { const b = r; let S, x = 0, w = t, _ = !1, P = !0, E; const k = oB[s.length > 2 ? "keyframes" : v] || hg, D = s[0], V = s[s.length - 1]; let H = { done: !1, value: D }; const { needsInterpolation: W } = k; W && W(D, V) && (E = h3([0, 100], [D, V], { clamp: !1 }), s = [0, 100]); const K = k({ ...m, duration: t, keyframes: s }); function ie() { x++, i === "reverse" ? (P = x % 2 === 0, r = uB(r, w, a, P)) : (r = y3(r, w, a), i === "mirror" && K.flipTarget()), _ = !1, d && d(); } function F() { S && S.stop(), h && h(); } function O(j) { P || (j = -j), r += j, _ || (H = K.next(Math.max(0, r)), E && (H.value = E(H.value)), _ = P ? H.done : r <= 0), g && g(H.value), _ && (x === 0 && (w = w !== void 0 ? w : r), x < n ? lB(r, w, a, P) && ie() : F()); } function N() { c && c(), S = e(O), S.start(); } return u && N(), { stop: () => { f && f(), S && S.stop(); }, /** * Set the current time of the animation. This is purposefully * mirroring the WAAPI animation API to make them interchanagable. * Going forward this file should be ported more towards * https://github.com/motiondivision/motionone/blob/main/packages/animation/src/Animation.ts * Which behaviourally adheres to WAAPI as far as possible. * * WARNING: This is not safe to use for most animations. We currently * only use it for handoff from WAAPI within Framer. * * This animation function consumes time every frame rather than being sampled for time. * So the sample() method performs some headless frames to ensure * repeats are handled correctly. Ideally in the future we will replace * that method with this, once repeat calculations are pure. */ set currentTime(j) { r = b, O(j); }, /** * animate() can't yet be sampled for time, instead it * consumes time. So to sample it we have to run a low * temporal-resolution version. */ sample: (j) => { r = b; const J = t && typeof t == "number" ? Math.max(t * 0.5, 50) : 50; let te = 0; for (O(0); te <= j; ) { const ee = j - te; O(Math.min(ee, J)), te += J; } return H; } }; } function fB(t) { return !t || // Default easing Array.isArray(t) || // Bezier curve typeof t == "string" && b3[t]; } const xu = ([t, e, r, n]) => `cubic-bezier(${t}, ${e}, ${r}, ${n})`, b3 = { linear: "linear", ease: "ease", easeIn: "ease-in", easeOut: "ease-out", easeInOut: "ease-in-out", circIn: xu([0, 0.65, 0.55, 1]), circOut: xu([0.55, 0, 1, 0.45]), backIn: xu([0.31, 0.01, 0.66, -0.59]), backOut: xu([0.33, 1.53, 0.69, 0.99]) }; function hB(t) { if (t) return Array.isArray(t) ? xu(t) : b3[t]; } function dB(t, e, r, { delay: n = 0, duration: i, repeat: a = 0, repeatType: s = "loop", ease: u, times: c } = {}) { return t.animate({ [e]: r, offset: c }, { delay: n, duration: i, easing: hB(u), fill: "both", iterations: a + 1, direction: s === "reverse" ? "alternate" : "normal" }); } const H2 = { waapi: () => Object.hasOwnProperty.call(Element.prototype, "animate") }, fp = {}, S3 = {}; for (const t in H2) S3[t] = () => (fp[t] === void 0 && (fp[t] = H2[t]()), fp[t]); function pB(t, { repeat: e, repeatType: r = "loop" }) { const n = e && r !== "loop" && e % 2 === 1 ? 0 : t.length - 1; return t[n]; } const gB = /* @__PURE__ */ new Set([ "opacity", "clipPath", "filter", "transform" ]), Vc = 10; function mB(t, e, { onUpdate: r, onComplete: n, ...i }) { if (!(S3.waapi() && gB.has(e) && !i.repeatDelay && i.repeatType !== "mirror" && i.damping !== 0)) return !1; let { keyframes: s, duration: u = 300, elapsed: c = 0, ease: f } = i; if (i.type === "spring" || !fB(i.ease)) { if (i.repeat === 1 / 0) return; const d = Df({ ...i, elapsed: 0 }); let g = { done: !1, value: s[0] }; const v = []; let m = 0; for (; !g.done && m < 2e4; ) g = d.sample(m), v.push(g.value), m += Vc; s = v, u = m - Vc, f = "linear"; } const h = dB(t.owner.current, e, s, { ...i, delay: -c, duration: u, /** * This function is currently not called if ease is provided * as a function so the cast is safe. * * However it would be possible for a future refinement to port * in easing pregeneration from Motion One for browsers that * support the upcoming `linear()` easing function. */ ease: f }); return h.onfinish = () => { t.set(pB(s, i)), _r.update(() => h.cancel()), n && n(); }, { get currentTime() { return h.currentTime || 0; }, set currentTime(d) { h.currentTime = d; }, stop: () => { const { currentTime: d } = h; if (d) { const g = Df({ ...i, autoplay: !1 }); t.setWithVelocity(g.sample(d - Vc).value, g.sample(d).value, Vc); } _r.update(() => h.cancel()); } }; } function w3(t, e) { const r = performance.now(), n = ({ timestamp: i }) => { const a = i - r; a >= e && (va.read(n), t(a - e)); }; return _r.read(n, !0), () => va.read(n); } function vB({ keyframes: t, elapsed: e, onUpdate: r, onComplete: n }) { const i = () => { r && r(t[t.length - 1]), n && n(); }; return e ? { stop: w3(i, -e) } : i(); } function yB({ keyframes: t, velocity: e = 0, min: r, max: n, power: i = 0.8, timeConstant: a = 750, bounceStiffness: s = 500, bounceDamping: u = 10, restDelta: c = 1, modifyTarget: f, driver: h, onUpdate: d, onComplete: g, onStop: v }) { const m = t[0]; let b; function S(P) { return r !== void 0 && P < r || n !== void 0 && P > n; } function x(P) { return r === void 0 ? n : n === void 0 || Math.abs(r - P) < Math.abs(n - P) ? r : n; } function w(P) { b && b.stop(), b = Df({ keyframes: [0, 1], velocity: 0, ...P, driver: h, onUpdate: (E) => { d && d(E), P.onUpdate && P.onUpdate(E); }, onComplete: g, onStop: v }); } function _(P) { w({ type: "spring", stiffness: s, damping: u, restDelta: c, ...P }); } if (S(m)) _({ velocity: e, keyframes: [m, x(m)] }); else { let P = i * e + m; typeof f < "u" && (P = f(P)); const E = x(P), k = E === r ? -1 : 1; let D, V; const H = (W) => { D = V, V = W, e = Am(W - D, Bi.delta), (k === 1 && W > E || k === -1 && W < E) && _({ keyframes: [W, E], velocity: e }); }; w({ type: "decay", keyframes: [m, 0], velocity: e, timeConstant: a, power: i, restDelta: c, modifyTarget: f, onUpdate: S(P) ? H : void 0 }); } return { stop: () => b && b.stop() }; } const bB = { type: "spring", stiffness: 500, damping: 25, restSpeed: 10 }, SB = (t) => ({ type: "spring", stiffness: 550, damping: t === 0 ? 2 * Math.sqrt(550) : 30, restSpeed: 10 }), wB = { type: "keyframes", duration: 0.8 }, xB = { type: "keyframes", ease: [0.25, 0.1, 0.35, 1], duration: 0.3 }, CB = (t, { keyframes: e }) => e.length > 2 ? wB : as.has(t) ? t.startsWith("scale") ? SB(e[1]) : bB : xB, pg = (t, e) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string ya.test(e) && // And it contains numbers and/or colors !e.startsWith("url(")); function _B({ when: t, delay: e, delayChildren: r, staggerChildren: n, staggerDirection: i, repeat: a, repeatType: s, repeatDelay: u, from: c, elapsed: f, ...h }) { return !!Object.keys(h).length; } function Y2(t) { return t === 0 || typeof t == "string" && parseFloat(t) === 0 && t.indexOf(" ") === -1; } function q2(t) { return typeof t == "number" ? 0 : km("", t); } function x3(t, e) { return t[e] || t.default || t; } function PB(t, e, r, n) { const i = pg(e, r); let a = n.from !== void 0 ? n.from : t.get(); return a === "none" && i && typeof r == "string" ? a = km(e, r) : Y2(a) && typeof r == "string" ? a = q2(r) : !Array.isArray(r) && Y2(r) && typeof a == "string" && (r = q2(a)), Array.isArray(r) ? (r[0] === null && (r[0] = a), r) : [a, r]; } const Fm = (t, e, r, n = {}) => (i) => { const a = x3(n, t) || {}, s = a.delay || n.delay || 0; let { elapsed: u = 0 } = n; u = u - uf(s); const c = PB(e, t, r, a), f = c[0], h = c[c.length - 1], d = pg(t, f), g = pg(t, h); ul(d === g, `You are trying to animate ${t} from "${f}" to "${h}". ${f} is not an animatable value - to enable this animation set ${f} to a value animatable to ${h} via the \`style\` property.`); let v = { keyframes: c, velocity: e.getVelocity(), ...a, elapsed: u, onUpdate: (m) => { e.set(m), a.onUpdate && a.onUpdate(m); }, onComplete: () => { i(), a.onComplete && a.onComplete(); } }; if (!d || !g || RN.current || a.type === !1) return vB(v); if (a.type === "inertia") return yB(v); if (_B(a) || (v = { ...v, ...CB(t, v) }), v.duration && (v.duration = uf(v.duration)), v.repeatDelay && (v.repeatDelay = uf(v.repeatDelay)), e.owner && e.owner.current instanceof HTMLElement && !e.owner.getProps().onUpdate) { const m = mB(e, t, v); if (m) return m; } return Df(v); }; function EB(t, e, r = {}) { t.notify("AnimationStart", e); let n; if (Array.isArray(e)) { const i = e.map((a) => gg(t, a, r)); n = Promise.all(i); } else if (typeof e == "string") n = gg(t, e, r); else { const i = typeof e == "function" ? hh(t, e, r.custom) : e; n = C3(t, i, r); } return n.then(() => t.notify("AnimationComplete", e)); } function gg(t, e, r = {}) { const n = hh(t, e, r.custom); let { transition: i = t.getDefaultTransition() || {} } = n || {}; r.transitionOverride && (i = r.transitionOverride); const a = n ? () => C3(t, n, r) : () => Promise.resolve(), s = t.variantChildren && t.variantChildren.size ? (c = 0) => { const { delayChildren: f = 0, staggerChildren: h, staggerDirection: d } = i; return TB(t, e, f + c, h, d, r); } : () => Promise.resolve(), { when: u } = i; if (u) { const [c, f] = u === "beforeChildren" ? [a, s] : [s, a]; return c().then(f); } else return Promise.all([a(), s(r.delay)]); } function C3(t, e, { delay: r = 0, transitionOverride: n, type: i } = {}) { let { transition: a = t.getDefaultTransition(), transitionEnd: s, ...u } = t.makeTargetAnimatable(e); const c = t.getValue("willChange"); n && (a = n); const f = [], h = i && t.animationState && t.animationState.getState()[i]; for (const d in u) { const g = t.getValue(d), v = u[d]; if (!g || v === void 0 || h && OB(h, d)) continue; const m = { delay: r, elapsed: 0, ...a }; if (window.HandoffAppearAnimations && !g.hasAnimated) { const S = t.getProps()[ON]; S && (m.elapsed = window.HandoffAppearAnimations(S, d, g, _r)); } let b = g.start(Fm(d, g, v, t.shouldReduceMotion && as.has(d) ? { type: !1 } : m)); If(c) && (c.add(d), b = b.then(() => c.remove(d))), f.push(b); } return Promise.all(f).then(() => { s && _N(t, s); }); } function TB(t, e, r = 0, n = 0, i = 1, a) { const s = [], u = (t.variantChildren.size - 1) * n, c = i === 1 ? (f = 0) => f * n : (f = 0) => u - f * n; return Array.from(t.variantChildren).sort(AB).forEach((f, h) => { f.notify("AnimationStart", e), s.push(gg(f, e, { ...a, delay: r + c(h) }).then(() => f.notify("AnimationComplete", e))); }), Promise.all(s); } function AB(t, e) { return t.sortNodePosition(e); } function OB({ protectedKeys: t, needsAnimating: e }, r) { const n = t.hasOwnProperty(r) && e[r] !== !0; return e[r] = !1, n; } const RB = [...dm].reverse(), kB = dm.length; function IB(t) { return (e) => Promise.all(e.map(({ animation: r, options: n }) => EB(t, r, n))); } function DB(t) { let e = IB(t); const r = LB(); let n = !0; const i = (c, f) => { const h = hh(t, f); if (h) { const { transition: d, transitionEnd: g, ...v } = h; c = { ...c, ...v, ...g }; } return c; }; function a(c) { e = c(t); } function s(c, f) { const h = t.getProps(), d = t.getVariantContext(!0) || {}, g = [], v = /* @__PURE__ */ new Set(); let m = {}, b = 1 / 0; for (let x = 0; x < kB; x++) { const w = RB[x], _ = r[w], P = h[w] !== void 0 ? h[w] : d[w], E = Yu(P), k = w === f ? _.isActive : null; k === !1 && (b = x); let D = P === d[w] && P !== h[w] && E; if (D && n && t.manuallyAnimateOnMount && (D = !1), _.protectedKeys = { ...m }, // If it isn't active and hasn't *just* been set as inactive !_.isActive && k === null || // If we didn't and don't have any defined prop for this animation type !P && !_.prevProp || // Or if the prop doesn't define an animation oh(P) || typeof P == "boolean") continue; const V = MB(_.prevProp, P); let H = V || // If we're making this variant active, we want to always make it active w === f && _.isActive && !D && E || // If we removed a higher-priority variant (i is in reverse order) x > b && E; const W = Array.isArray(P) ? P : [P]; let K = W.reduce(i, {}); k === !1 && (K = {}); const { prevResolvedValues: ie = {} } = _, F = { ...ie, ...K }, O = (N) => { H = !0, v.delete(N), _.needsAnimating[N] = !0; }; for (const N in F) { const j = K[N], J = ie[N]; m.hasOwnProperty(N) || (j !== J ? Rf(j) && Rf(J) ? !Jx(j, J) || V ? O(N) : _.protectedKeys[N] = !0 : j !== void 0 ? O(N) : v.add(N) : j !== void 0 && v.has(N) ? O(N) : _.protectedKeys[N] = !0); } _.prevProp = P, _.prevResolvedValues = K, _.isActive && (m = { ...m, ...K }), n && t.blockInitialAnimation && (H = !1), H && !D && g.push(...W.map((N) => ({ animation: N, options: { type: w, ...c } }))); } if (v.size) { const x = {}; v.forEach((w) => { const _ = t.getBaseTarget(w); _ !== void 0 && (x[w] = _); }), g.push({ animation: x }); } let S = Boolean(g.length); return n && h.initial === !1 && !t.manuallyAnimateOnMount && (S = !1), n = !1, S ? e(g) : Promise.resolve(); } function u(c, f, h) { var d; if (r[c].isActive === f) return Promise.resolve(); (d = t.variantChildren) === null || d === void 0 || d.forEach((v) => { var m; return (m = v.animationState) === null || m === void 0 ? void 0 : m.setActive(c, f); }), r[c].isActive = f; const g = s(h, c); for (const v in r) r[v].protectedKeys = {}; return g; } return { animateChanges: s, setActive: u, setAnimateFunction: a, getState: () => r }; } function MB(t, e) { return typeof e == "string" ? e !== t : Array.isArray(e) ? !Jx(e, t) : !1; } function za(t = !1) { return { isActive: t, protectedKeys: {}, needsAnimating: {}, prevResolvedValues: {} }; } function LB() { return { animate: za(!0), whileInView: za(), whileHover: za(), whileTap: za(), whileDrag: za(), whileFocus: za(), exit: za() }; } class NB extends Ca { /** * We dynamically generate the AnimationState manager as it contains a reference * to the underlying animation library. We only want to load that if we load this, * so people can optionally code split it out using the `m` component. */ constructor(e) { super(e), e.animationState || (e.animationState = DB(e)); } updateAnimationControlsSubscription() { const { animate: e } = this.node.getProps(); this.unmount(), oh(e) && (this.unmount = e.subscribe(this.node)); } /** * Subscribe any provided AnimationControls to the component's VisualElement */ mount() { this.updateAnimationControlsSubscription(); } update() { const { animate: e } = this.node.getProps(), { animate: r } = this.node.prevProps || {}; e !== r && this.updateAnimationControlsSubscription(); } unmount() { } } let BB = 0; class FB extends Ca { constructor() { super(...arguments), this.id = BB++; } update() { if (!this.node.presenceContext) return; const { isPresent: e, onExitComplete: r, custom: n } = this.node.presenceContext, { isPresent: i } = this.node.prevPresenceContext || {}; if (!this.node.animationState || e === i) return; const a = this.node.animationState.setActive("exit", !e, { custom: n ?? this.node.getProps().custom }); r && !e && a.then(() => r(this.id)); } mount() { const { register: e } = this.node.presenceContext || {}; e && (this.unmount = e(this.id)); } unmount() { } } const jB = { animation: { Feature: NB }, exit: { Feature: FB } }, K2 = (t, e) => Math.abs(t - e); function VB(t, e) { const r = K2(t.x, e.x), n = K2(t.y, e.y); return Math.sqrt(r ** 2 + n ** 2); } class _3 { constructor(e, r, { transformPagePoint: n } = {}) { if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.updatePoint = () => { if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return; const f = dp(this.lastMoveEventInfo, this.history), h = this.startEvent !== null, d = VB(f.offset, { x: 0, y: 0 }) >= 3; if (!h && !d) return; const { point: g } = f, { timestamp: v } = Bi; this.history.push({ ...g, timestamp: v }); const { onStart: m, onMove: b } = this.handlers; h || (m && m(this.lastMoveEvent, f), this.startEvent = this.lastMoveEvent), b && b(this.lastMoveEvent, f); }, this.handlePointerMove = (f, h) => { this.lastMoveEvent = f, this.lastMoveEventInfo = hp(h, this.transformPagePoint), _r.update(this.updatePoint, !0); }, this.handlePointerUp = (f, h) => { if (this.end(), !(this.lastMoveEvent && this.lastMoveEventInfo)) return; const { onEnd: d, onSessionEnd: g } = this.handlers, v = dp(f.type === "pointercancel" ? this.lastMoveEventInfo : hp(h, this.transformPagePoint), this.history); this.startEvent && d && d(f, v), g && g(f, v); }, !Yx(e)) return; this.handlers = r, this.transformPagePoint = n; const i = ch(e), a = hp(i, this.transformPagePoint), { point: s } = a, { timestamp: u } = Bi; this.history = [{ ...s, timestamp: u }]; const { onSessionStart: c } = r; c && c(e, dp(a, this.history)), this.removeListeners = ha(Ni(window, "pointermove", this.handlePointerMove), Ni(window, "pointerup", this.handlePointerUp), Ni(window, "pointercancel", this.handlePointerUp)); } updateHandlers(e) { this.handlers = e; } end() { this.removeListeners && this.removeListeners(), va.update(this.updatePoint); } } function hp(t, e) { return e ? { point: e(t.point) } : t; } function X2(t, e) { return { x: t.x - e.x, y: t.y - e.y }; } function dp({ point: t }, e) { return { point: t, delta: X2(t, P3(e)), offset: X2(t, zB(e)), velocity: GB(e, 0.1) }; } function zB(t) { return t[0]; } function P3(t) { return t[t.length - 1]; } function GB(t, e) { if (t.length < 2) return { x: 0, y: 0 }; let r = t.length - 1, n = null; const i = P3(t); for (; r >= 0 && (n = t[r], !(i.timestamp - n.timestamp > uf(e))); ) r--; if (!n) return { x: 0, y: 0 }; const a = (i.timestamp - n.timestamp) / 1e3; if (a === 0) return { x: 0, y: 0 }; const s = { x: (i.x - n.x) / a, y: (i.y - n.y) / a }; return s.x === 1 / 0 && (s.x = 0), s.y === 1 / 0 && (s.y = 0), s; } function on(t) { return t.max - t.min; } function mg(t, e = 0, r = 0.01) { return Math.abs(t - e) <= r; } function Q2(t, e, r, n = 0.5) { t.origin = n, t.originPoint = Nt(e.min, e.max, t.origin), t.scale = on(r) / on(e), (mg(t.scale, 1, 1e-4) || isNaN(t.scale)) && (t.scale = 1), t.translate = Nt(r.min, r.max, t.origin) - t.originPoint, (mg(t.translate) || isNaN(t.translate)) && (t.translate = 0); } function Iu(t, e, r, n) { Q2(t.x, e.x, r.x, n ? n.originX : void 0), Q2(t.y, e.y, r.y, n ? n.originY : void 0); } function J2(t, e, r) { t.min = r.min + e.min, t.max = t.min + on(e); } function WB(t, e, r) { J2(t.x, e.x, r.x), J2(t.y, e.y, r.y); } function Z2(t, e, r) { t.min = e.min - r.min, t.max = t.min + on(e); } function Du(t, e, r) { Z2(t.x, e.x, r.x), Z2(t.y, e.y, r.y); } function UB(t, { min: e, max: r }, n) { return e !== void 0 && t < e ? t = n ? Nt(e, t, n.min) : Math.max(t, e) : r !== void 0 && t > r && (t = n ? Nt(r, t, n.max) : Math.min(t, r)), t; } function $2(t, e, r) { return { min: e !== void 0 ? t.min + e : void 0, max: r !== void 0 ? t.max + r - (t.max - t.min) : void 0 }; } function HB(t, { top: e, left: r, bottom: n, right: i }) { return { x: $2(t.x, r, i), y: $2(t.y, e, n) }; } function eb(t, e) { let r = e.min - t.min, n = e.max - t.max; return e.max - e.min < t.max - t.min && ([r, n] = [n, r]), { min: r, max: n }; } function YB(t, e) { return { x: eb(t.x, e.x), y: eb(t.y, e.y) }; } function qB(t, e) { let r = 0.5; const n = on(t), i = on(e); return i > n ? r = Qu(e.min, e.max - n, t.min) : n > i && (r = Qu(t.min, t.max - i, e.min)), uo(0, 1, r); } function KB(t, e) { const r = {}; return e.min !== void 0 && (r.min = e.min - t.min), e.max !== void 0 && (r.max = e.max - t.min), r; } const vg = 0.35; function XB(t = vg) { return t === !1 ? t = 0 : t === !0 && (t = vg), { x: tb(t, "left", "right"), y: tb(t, "top", "bottom") }; } function tb(t, e, r) { return { min: rb(t, e), max: rb(t, r) }; } function rb(t, e) { return typeof t == "number" ? t : t[e] || 0; } const nb = () => ({ translate: 0, scale: 1, origin: 0, originPoint: 0 }), Mu = () => ({ x: nb(), y: nb() }), ib = () => ({ min: 0, max: 0 }), Kt = () => ({ x: ib(), y: ib() }); function ti(t) { return [t("x"), t("y")]; } function E3({ top: t, left: e, right: r, bottom: n }) { return { x: { min: e, max: r }, y: { min: t, max: n } }; } function QB({ x: t, y: e }) { return { top: e.min, right: t.max, bottom: e.max, left: t.min }; } function JB(t, e) { if (!e) return t; const r = e({ x: t.left, y: t.top }), n = e({ x: t.right, y: t.bottom }); return { top: r.y, left: r.x, bottom: n.y, right: n.x }; } function pp(t) { return t === void 0 || t === 1; } function yg({ scale: t, scaleX: e, scaleY: r }) { return !pp(t) || !pp(e) || !pp(r); } function Ua(t) { return yg(t) || T3(t) || t.z || t.rotate || t.rotateX || t.rotateY; } function T3(t) { return ab(t.x) || ab(t.y); } function ab(t) { return t && t !== "0%"; } function Mf(t, e, r) { const n = t - r, i = e * n; return r + i; } function sb(t, e, r, n, i) { return i !== void 0 && (t = Mf(t, i, n)), Mf(t, r, n) + e; } function bg(t, e = 0, r = 1, n, i) { t.min = sb(t.min, e, r, n, i), t.max = sb(t.max, e, r, n, i); } function A3(t, { x: e, y: r }) { bg(t.x, e.translate, e.scale, e.originPoint), bg(t.y, r.translate, r.scale, r.originPoint); } function ZB(t, e, r, n = !1) { const i = r.length; if (!i) return; e.x = e.y = 1; let a, s; for (let u = 0; u < i; u++) { a = r[u], s = a.projectionDelta; const c = a.instance; c && c.style && c.style.display === "contents" || (n && a.options.layoutScroll && a.scroll && a !== a.root && Js(t, { x: -a.scroll.offset.x, y: -a.scroll.offset.y }), s && (e.x *= s.x.scale, e.y *= s.y.scale, A3(t, s)), n && Ua(a.latestValues) && Js(t, a.latestValues)); } e.x = ob(e.x), e.y = ob(e.y); } function ob(t) { return Number.isInteger(t) || t > 1.0000000000001 || t < 0.999999999999 ? t : 1; } function sa(t, e) { t.min = t.min + e, t.max = t.max + e; } function ub(t, e, [r, n, i]) { const a = e[i] !== void 0 ? e[i] : 0.5, s = Nt(t.min, t.max, a); bg(t, e[r], e[n], s, e.scale); } const $B = ["x", "scaleX", "originX"], eF = ["y", "scaleY", "originY"]; function Js(t, e) { ub(t.x, e, $B), ub(t.y, e, eF); } function O3(t, e) { return E3(JB(t.getBoundingClientRect(), e)); } function tF(t, e, r) { const n = O3(t, r), { scroll: i } = e; return i && (sa(n.x, i.offset.x), sa(n.y, i.offset.y)), n; } const rF = /* @__PURE__ */ new WeakMap(); class nF { constructor(e) { this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = Kt(), this.visualElement = e; } start(e, { snapToCursor: r = !1 } = {}) { const { presenceContext: n } = this.visualElement; if (n && n.isPresent === !1) return; const i = (c) => { this.stopAnimation(), r && this.snapToCursor(ch(c, "page").point); }, a = (c, f) => { const { drag: h, dragPropagation: d, onDragStart: g } = this.getProps(); if (h && !d && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock = Kx(h), !this.openGlobalLock)) return; this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), ti((m) => { let b = this.getAxisMotionValue(m).get() || 0; if (ci.test(b)) { const { projection: S } = this.visualElement; if (S && S.layout) { const x = S.layout.layoutBox[m]; x && (b = on(x) * (parseFloat(b) / 100)); } } this.originPoint[m] = b; }), g && g(c, f); const { animationState: v } = this.visualElement; v && v.setActive("whileDrag", !0); }, s = (c, f) => { const { dragPropagation: h, dragDirectionLock: d, onDirectionLock: g, onDrag: v } = this.getProps(); if (!h && !this.openGlobalLock) return; const { offset: m } = f; if (d && this.currentDirection === null) { this.currentDirection = iF(m), this.currentDirection !== null && g && g(this.currentDirection); return; } this.updateAxis("x", f.point, m), this.updateAxis("y", f.point, m), this.visualElement.render(), v && v(c, f); }, u = (c, f) => this.stop(c, f); this.panSession = new _3(e, { onSessionStart: i, onStart: a, onMove: s, onSessionEnd: u }, { transformPagePoint: this.visualElement.getTransformPagePoint() }); } stop(e, r) { const n = this.isDragging; if (this.cancel(), !n) return; const { velocity: i } = r; this.startAnimation(i); const { onDragEnd: a } = this.getProps(); a && a(e, r); } cancel() { this.isDragging = !1; const { projection: e, animationState: r } = this.visualElement; e && (e.isAnimationBlocked = !1), this.panSession && this.panSession.end(), this.panSession = void 0; const { dragPropagation: n } = this.getProps(); !n && this.openGlobalLock && (this.openGlobalLock(), this.openGlobalLock = null), r && r.setActive("whileDrag", !1); } updateAxis(e, r, n) { const { drag: i } = this.getProps(); if (!n || !zc(e, i, this.currentDirection)) return; const a = this.getAxisMotionValue(e); let s = this.originPoint[e] + n[e]; this.constraints && this.constraints[e] && (s = UB(s, this.constraints[e], this.elastic[e])), a.set(s); } resolveConstraints() { const { dragConstraints: e, dragElastic: r } = this.getProps(), { layout: n } = this.visualElement.projection || {}, i = this.constraints; e && Xs(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && n ? this.constraints = HB(n.layoutBox, e) : this.constraints = !1, this.elastic = XB(r), i !== this.constraints && n && this.constraints && !this.hasMutatedConstraints && ti((a) => { this.getAxisMotionValue(a) && (this.constraints[a] = KB(n.layoutBox[a], this.constraints[a])); }); } resolveRefConstraints() { const { dragConstraints: e, onMeasureDragConstraints: r } = this.getProps(); if (!e || !Xs(e)) return !1; const n = e.current; Wn(n !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop."); const { projection: i } = this.visualElement; if (!i || !i.layout) return !1; const a = tF(n, i.root, this.visualElement.getTransformPagePoint()); let s = YB(i.layout.layoutBox, a); if (r) { const u = r(QB(s)); this.hasMutatedConstraints = !!u, u && (s = E3(u)); } return s; } startAnimation(e) { const { drag: r, dragMomentum: n, dragElastic: i, dragTransition: a, dragSnapToOrigin: s, onDragTransitionEnd: u } = this.getProps(), c = this.constraints || {}, f = ti((h) => { if (!zc(h, r, this.currentDirection)) return; let d = c && c[h] || {}; s && (d = { min: 0, max: 0 }); const g = i ? 200 : 1e6, v = i ? 40 : 1e7, m = { type: "inertia", velocity: n ? e[h] : 0, bounceStiffness: g, bounceDamping: v, timeConstant: 750, restDelta: 1, restSpeed: 10, ...a, ...d }; return this.startAxisValueAnimation(h, m); }); return Promise.all(f).then(u); } startAxisValueAnimation(e, r) { const n = this.getAxisMotionValue(e); return n.start(Fm(e, n, 0, r)); } stopAnimation() { ti((e) => this.getAxisMotionValue(e).stop()); } /** * Drag works differently depending on which props are provided. * * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values. * - Otherwise, we apply the delta to the x/y motion values. */ getAxisMotionValue(e) { const r = "_drag" + e.toUpperCase(), n = this.visualElement.getProps(), i = n[r]; return i || this.visualElement.getValue(e, (n.initial ? n.initial[e] : void 0) || 0); } snapToCursor(e) { ti((r) => { const { drag: n } = this.getProps(); if (!zc(r, n, this.currentDirection)) return; const { projection: i } = this.visualElement, a = this.getAxisMotionValue(r); if (i && i.layout) { const { min: s, max: u } = i.layout.layoutBox[r]; a.set(e[r] - Nt(s, u, 0.5)); } }); } /** * When the viewport resizes we want to check if the measured constraints * have changed and, if so, reposition the element within those new constraints * relative to where it was before the resize. */ scalePositionWithinConstraints() { if (!this.visualElement.current) return; const { drag: e, dragConstraints: r } = this.getProps(), { projection: n } = this.visualElement; if (!Xs(r) || !n || !this.constraints) return; this.stopAnimation(); const i = { x: 0, y: 0 }; ti((s) => { const u = this.getAxisMotionValue(s); if (u) { const c = u.get(); i[s] = qB({ min: c, max: c }, this.constraints[s]); } }); const { transformTemplate: a } = this.visualElement.getProps(); this.visualElement.current.style.transform = a ? a({}, "") : "none", n.root && n.root.updateScroll(), n.updateLayout(), this.resolveConstraints(), ti((s) => { if (!zc(s, e, null)) return; const u = this.getAxisMotionValue(s), { min: c, max: f } = this.constraints[s]; u.set(Nt(c, f, i[s])); }); } addListeners() { if (!this.visualElement.current) return; rF.set(this.visualElement, this); const e = this.visualElement.current, r = Ni(e, "pointerdown", (c) => { const { drag: f, dragListener: h = !0 } = this.getProps(); f && h && this.start(c); }), n = () => { const { dragConstraints: c } = this.getProps(); Xs(c) && (this.constraints = this.resolveRefConstraints()); }, { projection: i } = this.visualElement, a = i.addEventListener("measure", n); i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), n(); const s = Mi(window, "resize", () => this.scalePositionWithinConstraints()), u = i.addEventListener("didUpdate", ({ delta: c, hasLayoutChanged: f }) => { this.isDragging && f && (ti((h) => { const d = this.getAxisMotionValue(h); d && (this.originPoint[h] += c[h].translate, d.set(d.get() + c[h].translate)); }), this.visualElement.render()); }); return () => { s(), r(), a(), u && u(); }; } getProps() { const e = this.visualElement.getProps(), { drag: r = !1, dragDirectionLock: n = !1, dragPropagation: i = !1, dragConstraints: a = !1, dragElastic: s = vg, dragMomentum: u = !0 } = e; return { ...e, drag: r, dragDirectionLock: n, dragPropagation: i, dragConstraints: a, dragElastic: s, dragMomentum: u }; } } function zc(t, e, r) { return (e === !0 || e === t) && (r === null || r === t); } function iF(t, e = 10) { let r = null; return Math.abs(t.y) > e ? r = "y" : Math.abs(t.x) > e && (r = "x"), r; } class aF extends Ca { constructor(e) { super(e), this.removeGroupControls = Pn, this.removeListeners = Pn, this.controls = new nF(e); } mount() { const { dragControls: e } = this.node.getProps(); e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || Pn; } unmount() { this.removeGroupControls(), this.removeListeners(); } } class sF extends Ca { constructor() { super(...arguments), this.removePointerDownListener = Pn; } onPointerDown(e) { this.session = new _3(e, this.createPanHandlers(), { transformPagePoint: this.node.getTransformPagePoint() }); } createPanHandlers() { const { onPanSessionStart: e, onPanStart: r, onPan: n, onPanEnd: i } = this.node.getProps(); return { onSessionStart: e, onStart: r, onMove: n, onEnd: (a, s) => { delete this.session, i && i(a, s); } }; } mount() { this.removePointerDownListener = Ni(this.node.current, "pointerdown", (e) => this.onPointerDown(e)); } update() { this.session && this.session.updateHandlers(this.createPanHandlers()); } unmount() { this.removePointerDownListener(), this.session && this.session.end(); } } function oF() { const t = bt(il); if (t === null) return [!0, null]; const { isPresent: e, onExitComplete: r, register: n } = t, i = go(); return Wt(() => n(i), []), !e && r ? [!1, () => r && r(i)] : [!0]; } function OH() { return uF(bt(il)); } function uF(t) { return t === null ? !0 : t.isPresent; } function lb(t, e) { return e.max === e.min ? 0 : t / (e.max - e.min) * 100; } const hu = { correct: (t, e) => { if (!e.target) return t; if (typeof t == "string") if (Ae.test(t)) t = parseFloat(t); else return t; const r = lb(t, e.target.x), n = lb(t, e.target.y); return `${r}% ${n}%`; } }, R3 = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/; function lF(t) { const e = R3.exec(t); if (!e) return [,]; const [, r, n] = e; return [r, n]; } const cF = 4; function Sg(t, e, r = 1) { Wn(r <= cF, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`); const [n, i] = lF(t); if (!n) return; const a = window.getComputedStyle(e).getPropertyValue(n); return a ? a.trim() : ag(i) ? Sg(i, e, r + 1) : i; } function fF(t, { ...e }, r) { const n = t.current; if (!(n instanceof Element)) return { target: e, transitionEnd: r }; r && (r = { ...r }), t.values.forEach((i) => { const a = i.get(); if (!ag(a)) return; const s = Sg(a, n); s && i.set(s); }); for (const i in e) { const a = e[i]; if (!ag(a)) continue; const s = Sg(a, n); s && (e[i] = s, r && r[i] === void 0 && (r[i] = a)); } return { target: e, transitionEnd: r }; } const cb = "_$css", hF = { correct: (t, { treeScale: e, projectionDelta: r }) => { const n = t, i = t.includes("var("), a = []; i && (t = t.replace(R3, (v) => (a.push(v), cb))); const s = ya.parse(t); if (s.length > 5) return n; const u = ya.createTransformer(t), c = typeof s[0] != "number" ? 1 : 0, f = r.x.scale * e.x, h = r.y.scale * e.y; s[0 + c] /= f, s[1 + c] /= h; const d = Nt(f, h, 0.5); typeof s[2 + c] == "number" && (s[2 + c] /= d), typeof s[3 + c] == "number" && (s[3 + c] /= d); let g = u(s); if (i) { let v = 0; g = g.replace(cb, () => { const m = a[v]; return v++, m; }); } return g; } }; class dF extends Zt.Component { /** * This only mounts projection nodes for components that * need measuring, we might want to do it for all components * in order to incorporate transforms */ componentDidMount() { const { visualElement: e, layoutGroup: r, switchLayoutGroup: n, layoutId: i } = this.props, { projection: a } = e; p7(pF), a && (r.group && r.group.add(a), n && n.register && i && n.register(a), a.root.didUpdate(), a.addEventListener("animationComplete", () => { this.safeToRemove(); }), a.setOptions({ ...a.options, onExitComplete: () => this.safeToRemove() })), Ou.hasEverUpdated = !0; } getSnapshotBeforeUpdate(e) { const { layoutDependency: r, visualElement: n, drag: i, isPresent: a } = this.props, s = n.projection; return s && (s.isPresent = a, i || e.layoutDependency !== r || r === void 0 ? s.willUpdate() : this.safeToRemove(), e.isPresent !== a && (a ? s.promote() : s.relegate() || _r.postRender(() => { const u = s.getStack(); (!u || !u.members.length) && this.safeToRemove(); }))), null; } componentDidUpdate() { const { projection: e } = this.props.visualElement; e && (e.root.didUpdate(), !e.currentAnimation && e.isLead() && this.safeToRemove()); } componentWillUnmount() { const { visualElement: e, layoutGroup: r, switchLayoutGroup: n } = this.props, { projection: i } = e; i && (i.scheduleCheckAfterUnmount(), r && r.group && r.group.remove(i), n && n.deregister && n.deregister(i)); } safeToRemove() { const { safeToRemove: e } = this.props; e && e(); } render() { return null; } } function k3(t) { const [e, r] = oF(), n = bt(mm); return Zt.createElement(dF, { ...t, layoutGroup: n, switchLayoutGroup: bt(Dx), isPresent: e, safeToRemove: r }); } const pF = { borderRadius: { ...hu, applyTo: [ "borderTopLeftRadius", "borderTopRightRadius", "borderBottomLeftRadius", "borderBottomRightRadius" ] }, borderTopLeftRadius: hu, borderTopRightRadius: hu, borderBottomLeftRadius: hu, borderBottomRightRadius: hu, boxShadow: hF }; function gF(t, e, r = {}) { const n = Wr(t) ? t : lo(t); return n.start(Fm("", n, e, r)), { stop: () => n.stop(), isAnimating: () => n.isAnimating() }; } const I3 = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], mF = I3.length, fb = (t) => typeof t == "string" ? parseFloat(t) : t, hb = (t) => typeof t == "number" || Ae.test(t); function vF(t, e, r, n, i, a) { i ? (t.opacity = Nt( 0, // TODO Reinstate this if only child r.opacity !== void 0 ? r.opacity : 1, yF(n) ), t.opacityExit = Nt(e.opacity !== void 0 ? e.opacity : 1, 0, bF(n))) : a && (t.opacity = Nt(e.opacity !== void 0 ? e.opacity : 1, r.opacity !== void 0 ? r.opacity : 1, n)); for (let s = 0; s < mF; s++) { const u = `border${I3[s]}Radius`; let c = db(e, u), f = db(r, u); if (c === void 0 && f === void 0) continue; c || (c = 0), f || (f = 0), c === 0 || f === 0 || hb(c) === hb(f) ? (t[u] = Math.max(Nt(fb(c), fb(f), n), 0), (ci.test(f) || ci.test(c)) && (t[u] += "%")) : t[u] = f; } (e.rotate || r.rotate) && (t.rotate = Nt(e.rotate || 0, r.rotate || 0, n)); } function db(t, e) { return t[e] !== void 0 ? t[e] : t.borderRadius; } const yF = D3(0, 0.5, Nm), bF = D3(0.5, 0.95, Pn); function D3(t, e, r) { return (n) => n < t ? 0 : n > e ? 1 : r(Qu(t, e, n)); } function pb(t, e) { t.min = e.min, t.max = e.max; } function bn(t, e) { pb(t.x, e.x), pb(t.y, e.y); } function gb(t, e, r, n, i) { return t -= e, t = Mf(t, 1 / r, n), i !== void 0 && (t = Mf(t, 1 / i, n)), t; } function SF(t, e = 0, r = 1, n = 0.5, i, a = t, s = t) { if (ci.test(e) && (e = parseFloat(e), e = Nt(s.min, s.max, e / 100) - s.min), typeof e != "number") return; let u = Nt(a.min, a.max, n); t === a && (u -= e), t.min = gb(t.min, e, r, u, i), t.max = gb(t.max, e, r, u, i); } function mb(t, e, [r, n, i], a, s) { SF(t, e[r], e[n], e[i], e.scale, a, s); } const wF = ["x", "scaleX", "originX"], xF = ["y", "scaleY", "originY"]; function vb(t, e, r, n) { mb(t.x, e, wF, r ? r.x : void 0, n ? n.x : void 0), mb(t.y, e, xF, r ? r.y : void 0, n ? n.y : void 0); } function yb(t) { return t.translate === 0 && t.scale === 1; } function M3(t) { return yb(t.x) && yb(t.y); } function wg(t, e) { return t.x.min === e.x.min && t.x.max === e.x.max && t.y.min === e.y.min && t.y.max === e.y.max; } function bb(t) { return on(t.x) / on(t.y); } class CF { constructor() { this.members = []; } add(e) { Pm(this.members, e), e.scheduleRender(); } remove(e) { if (Em(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) { const r = this.members[this.members.length - 1]; r && this.promote(r); } } relegate(e) { const r = this.members.findIndex((i) => e === i); if (r === 0) return !1; let n; for (let i = r; i >= 0; i--) { const a = this.members[i]; if (a.isPresent !== !1) { n = a; break; } } return n ? (this.promote(n), !0) : !1; } promote(e, r) { const n = this.lead; if (e !== n && (this.prevLead = n, this.lead = e, e.show(), n)) { n.instance && n.scheduleRender(), e.scheduleRender(), e.resumeFrom = n, r && (e.resumeFrom.preserveOpacity = !0), n.snapshot && (e.snapshot = n.snapshot, e.snapshot.latestValues = n.animationValues || n.latestValues), e.root && e.root.isUpdating && (e.isLayoutDirty = !0); const { crossfade: i } = e.options; i === !1 && n.hide(); } } exitAnimationComplete() { this.members.forEach((e) => { const { options: r, resumingFrom: n } = e; r.onExitComplete && r.onExitComplete(), n && n.options.onExitComplete && n.options.onExitComplete(); }); } scheduleRender() { this.members.forEach((e) => { e.instance && e.scheduleRender(!1); }); } /** * Clear any leads that have been removed this render to prevent them from being * used in future animations and to prevent memory leaks */ removeLeadSnapshot() { this.lead && this.lead.snapshot && (this.lead.snapshot = void 0); } } function Sb(t, e, r) { let n = ""; const i = t.x.translate / e.x, a = t.y.translate / e.y; if ((i || a) && (n = `translate3d(${i}px, ${a}px, 0) `), (e.x !== 1 || e.y !== 1) && (n += `scale(${1 / e.x}, ${1 / e.y}) `), r) { const { rotate: c, rotateX: f, rotateY: h } = r; c && (n += `rotate(${c}deg) `), f && (n += `rotateX(${f}deg) `), h && (n += `rotateY(${h}deg) `); } const s = t.x.scale * e.x, u = t.y.scale * e.y; return (s !== 1 || u !== 1) && (n += `scale(${s}, ${u})`), n || "none"; } const _F = (t, e) => t.depth - e.depth; class PF { constructor() { this.children = [], this.isDirty = !1; } add(e) { Pm(this.children, e), this.isDirty = !0; } remove(e) { Em(this.children, e), this.isDirty = !0; } forEach(e) { this.isDirty && this.children.sort(_F), this.isDirty = !1, this.children.forEach(e); } } function EF(t) { window.MotionDebug && window.MotionDebug.record(t); } const wb = ["", "X", "Y", "Z"], xb = 1e3; let TF = 0; const Ha = { type: "projectionFrame", totalNodes: 0, resolvedTargetDeltas: 0, recalculatedProjection: 0 }; function L3({ attachResizeListener: t, defaultParent: e, measureScroll: r, checkIsScrollRoot: n, resetTransform: i }) { return class { constructor(s, u = {}, c = e == null ? void 0 : e()) { this.id = TF++, this.animationId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.potentialNodes = /* @__PURE__ */ new Map(), this.checkUpdateFailed = () => { this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots()); }, this.updateProjection = () => { Ha.totalNodes = Ha.resolvedTargetDeltas = Ha.recalculatedProjection = 0, this.nodes.forEach(RF), this.nodes.forEach(MF), this.nodes.forEach(LF), this.nodes.forEach(kF), EF(Ha); }, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.elementId = s, this.latestValues = u, this.root = c ? c.root || c : this, this.path = c ? [...c.path, c] : [], this.parent = c, this.depth = c ? c.depth + 1 : 0, s && this.root.registerPotentialNode(s, this); for (let f = 0; f < this.path.length; f++) this.path[f].shouldResetTransform = !0; this.root === this && (this.nodes = new PF()); } addEventListener(s, u) { return this.eventHandlers.has(s) || this.eventHandlers.set(s, new Tm()), this.eventHandlers.get(s).add(u); } notifyListeners(s, ...u) { const c = this.eventHandlers.get(s); c && c.notify(...u); } hasListeners(s) { return this.eventHandlers.has(s); } registerPotentialNode(s, u) { this.potentialNodes.set(s, u); } /** * Lifecycles */ mount(s, u = !1) { if (this.instance) return; this.isSVG = s instanceof SVGElement && s.tagName !== "svg", this.instance = s; const { layoutId: c, layout: f, visualElement: h } = this.options; if (h && !h.current && h.mount(s), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.elementId && this.root.potentialNodes.delete(this.elementId), u && (f || c) && (this.isLayoutDirty = !0), t) { let d; const g = () => this.root.updateBlockedByResize = !1; t(s, () => { this.root.updateBlockedByResize = !0, d && d(), d = w3(g, 250), Ou.hasAnimatedSinceResize && (Ou.hasAnimatedSinceResize = !1, this.nodes.forEach(_b)); }); } c && this.root.registerSharedNode(c, this), this.options.animate !== !1 && h && (c || f) && this.addEventListener("didUpdate", ({ delta: d, hasLayoutChanged: g, hasRelativeTargetChanged: v, layout: m }) => { if (this.isTreeAnimationBlocked()) { this.target = void 0, this.relativeTarget = void 0; return; } const b = this.options.transition || h.getDefaultTransition() || VF, { onLayoutAnimationStart: S, onLayoutAnimationComplete: x } = h.getProps(), w = !this.targetLayout || !wg(this.targetLayout, m) || v, _ = !g && v; if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || _ || g && (w || !this.currentAnimation)) { this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(d, _); const P = { ...x3(b, "layout"), onPlay: S, onComplete: x }; (h.shouldReduceMotion || this.options.layoutRoot) && (P.delay = 0, P.type = !1), this.startAnimation(P); } else !g && this.animationProgress === 0 && _b(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete(); this.targetLayout = m; }); } unmount() { this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this); const s = this.getStack(); s && s.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, va.preRender(this.updateProjection); } // only on the root blockUpdate() { this.updateManuallyBlocked = !0; } unblockUpdate() { this.updateManuallyBlocked = !1; } isUpdateBlocked() { return this.updateManuallyBlocked || this.updateBlockedByResize; } isTreeAnimationBlocked() { return this.isAnimationBlocked || this.parent && this.parent.isTreeAnimationBlocked() || !1; } // Note: currently only running on root node startUpdate() { this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(NF), this.animationId++); } getTransformTemplate() { const { visualElement: s } = this.options; return s && s.getProps().transformTemplate; } willUpdate(s = !0) { if (this.root.isUpdateBlocked()) { this.options.onExitComplete && this.options.onExitComplete(); return; } if (!this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty) return; this.isLayoutDirty = !0; for (let h = 0; h < this.path.length; h++) { const d = this.path[h]; d.shouldResetTransform = !0, d.updateScroll("snapshot"), d.options.layoutRoot && d.willUpdate(!1); } const { layoutId: u, layout: c } = this.options; if (u === void 0 && !c) return; const f = this.getTransformTemplate(); this.prevTransformTemplateValue = f ? f(this.latestValues, "") : void 0, this.updateSnapshot(), s && this.notifyListeners("willUpdate"); } // Note: Currently only running on root node didUpdate() { if (this.isUpdateBlocked()) { this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(Cb); return; } this.isUpdating && (this.isUpdating = !1, this.potentialNodes.size && (this.potentialNodes.forEach(zF), this.potentialNodes.clear()), this.nodes.forEach(DF), this.nodes.forEach(AF), this.nodes.forEach(OF), this.clearAllSnapshots(), sp.update(), sp.preRender(), sp.render()); } clearAllSnapshots() { this.nodes.forEach(IF), this.sharedNodes.forEach(BF); } scheduleUpdateProjection() { _r.preRender(this.updateProjection, !1, !0); } scheduleCheckAfterUnmount() { _r.postRender(() => { this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed(); }); } /** * Update measurements */ updateSnapshot() { this.snapshot || !this.instance || (this.snapshot = this.measure()); } updateLayout() { if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty)) return; if (this.resumeFrom && !this.resumeFrom.instance) for (let c = 0; c < this.path.length; c++) this.path[c].updateScroll(); const s = this.layout; this.layout = this.measure(!1), this.layoutCorrected = Kt(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox); const { visualElement: u } = this.options; u && u.notify("LayoutMeasure", this.layout.layoutBox, s ? s.layoutBox : void 0); } updateScroll(s = "measure") { let u = Boolean(this.options.layoutScroll && this.instance); this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === s && (u = !1), u && (this.scroll = { animationId: this.root.animationId, phase: s, isRoot: n(this.instance), offset: r(this.instance) }); } resetTransform() { if (!i) return; const s = this.isLayoutDirty || this.shouldResetTransform, u = this.projectionDelta && !M3(this.projectionDelta), c = this.getTransformTemplate(), f = c ? c(this.latestValues, "") : void 0, h = f !== this.prevTransformTemplateValue; s && (u || Ua(this.latestValues) || h) && (i(this.instance, f), this.shouldResetTransform = !1, this.scheduleRender()); } measure(s = !0) { const u = this.measurePageBox(); let c = this.removeElementScroll(u); return s && (c = this.removeTransform(c)), GF(c), { animationId: this.root.animationId, measuredBox: u, layoutBox: c, latestValues: {}, source: this.id }; } measurePageBox() { const { visualElement: s } = this.options; if (!s) return Kt(); const u = s.measureViewportBox(), { scroll: c } = this.root; return c && (sa(u.x, c.offset.x), sa(u.y, c.offset.y)), u; } removeElementScroll(s) { const u = Kt(); bn(u, s); for (let c = 0; c < this.path.length; c++) { const f = this.path[c], { scroll: h, options: d } = f; if (f !== this.root && h && d.layoutScroll) { if (h.isRoot) { bn(u, s); const { scroll: g } = this.root; g && (sa(u.x, -g.offset.x), sa(u.y, -g.offset.y)); } sa(u.x, h.offset.x), sa(u.y, h.offset.y); } } return u; } applyTransform(s, u = !1) { const c = Kt(); bn(c, s); for (let f = 0; f < this.path.length; f++) { const h = this.path[f]; !u && h.options.layoutScroll && h.scroll && h !== h.root && Js(c, { x: -h.scroll.offset.x, y: -h.scroll.offset.y }), Ua(h.latestValues) && Js(c, h.latestValues); } return Ua(this.latestValues) && Js(c, this.latestValues), c; } removeTransform(s) { const u = Kt(); bn(u, s); for (let c = 0; c < this.path.length; c++) { const f = this.path[c]; if (!f.instance || !Ua(f.latestValues)) continue; yg(f.latestValues) && f.updateSnapshot(); const h = Kt(), d = f.measurePageBox(); bn(h, d), vb(u, f.latestValues, f.snapshot ? f.snapshot.layoutBox : void 0, h); } return Ua(this.latestValues) && vb(u, this.latestValues), u; } setTargetDelta(s) { this.targetDelta = s, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0; } setOptions(s) { this.options = { ...this.options, ...s, crossfade: s.crossfade !== void 0 ? s.crossfade : !0 }; } clearMeasurements() { this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1; } /** * Frame calculations */ resolveTargetDelta() { var s; const u = this.getLead(); if (this.isProjectionDirty || (this.isProjectionDirty = u.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = u.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = u.isSharedProjectionDirty), !((Boolean(this.resumingFrom) || this !== u) && this.isSharedProjectionDirty || this.isProjectionDirty || !((s = this.parent) === null || s === void 0) && s.isProjectionDirty || this.attemptToResolveRelativeTarget)) return; const { layout: h, layoutId: d } = this.options; if (!(!this.layout || !(h || d))) { if (!this.targetDelta && !this.relativeTarget) { const g = this.getClosestProjectingParent(); g && g.layout ? (this.relativeParent = g, this.relativeTarget = Kt(), this.relativeTargetOrigin = Kt(), Du(this.relativeTargetOrigin, this.layout.layoutBox, g.layout.layoutBox), bn(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0; } if (!(!this.relativeTarget && !this.targetDelta)) { if (this.target || (this.target = Kt(), this.targetWithTransforms = Kt()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? WB(this.target, this.relativeTarget, this.relativeParent.target) : this.targetDelta ? (Boolean(this.resumingFrom) ? this.target = this.applyTransform(this.layout.layoutBox) : bn(this.target, this.layout.layoutBox), A3(this.target, this.targetDelta)) : bn(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) { this.attemptToResolveRelativeTarget = !1; const g = this.getClosestProjectingParent(); g && Boolean(g.resumingFrom) === Boolean(this.resumingFrom) && !g.options.layoutScroll && g.target ? (this.relativeParent = g, this.relativeTarget = Kt(), this.relativeTargetOrigin = Kt(), Du(this.relativeTargetOrigin, this.target, g.target), bn(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0; } Ha.resolvedTargetDeltas++; } } } getClosestProjectingParent() { if (!(!this.parent || yg(this.parent.latestValues) || T3(this.parent.latestValues))) return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent(); } isProjecting() { return Boolean((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout); } calcProjection() { var s; const u = this.getLead(), c = Boolean(this.resumingFrom) || this !== u; let f = !0; if ((this.isProjectionDirty || !((s = this.parent) === null || s === void 0) && s.isProjectionDirty) && (f = !1), c && (this.isSharedProjectionDirty || this.isTransformDirty) && (f = !1), f) return; const { layout: h, layoutId: d } = this.options; if (this.isTreeAnimating = Boolean(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(h || d)) return; bn(this.layoutCorrected, this.layout.layoutBox), ZB(this.layoutCorrected, this.treeScale, this.path, c); const { target: g } = u; if (!g) return; this.projectionDelta || (this.projectionDelta = Mu(), this.projectionDeltaWithTransform = Mu()); const v = this.treeScale.x, m = this.treeScale.y, b = this.projectionTransform; Iu(this.projectionDelta, this.layoutCorrected, g, this.latestValues), this.projectionTransform = Sb(this.projectionDelta, this.treeScale), (this.projectionTransform !== b || this.treeScale.x !== v || this.treeScale.y !== m) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", g)), Ha.recalculatedProjection++; } hide() { this.isVisible = !1; } show() { this.isVisible = !0; } scheduleRender(s = !0) { if (this.options.scheduleRender && this.options.scheduleRender(), s) { const u = this.getStack(); u && u.scheduleRender(); } this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0); } setAnimationOrigin(s, u = !1) { const c = this.snapshot, f = c ? c.latestValues : {}, h = { ...this.latestValues }, d = Mu(); (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !u; const g = Kt(), v = c ? c.source : void 0, m = this.layout ? this.layout.source : void 0, b = v !== m, S = this.getStack(), x = !S || S.members.length <= 1, w = Boolean(b && !x && this.options.crossfade === !0 && !this.path.some(jF)); this.animationProgress = 0; let _; this.mixTargetDelta = (P) => { const E = P / 1e3; Pb(d.x, s.x, E), Pb(d.y, s.y, E), this.setTargetDelta(d), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Du(g, this.layout.layoutBox, this.relativeParent.layout.layoutBox), FF(this.relativeTarget, this.relativeTargetOrigin, g, E), _ && wg(this.relativeTarget, _) && (this.isProjectionDirty = !1), _ || (_ = Kt()), bn(_, this.relativeTarget)), b && (this.animationValues = h, vF(h, f, this.latestValues, E, w, x)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = E; }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0); } startAnimation(s) { this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (va.update(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = _r.update(() => { Ou.hasAnimatedSinceResize = !0, this.currentAnimation = gF(0, xb, { ...s, onUpdate: (u) => { this.mixTargetDelta(u), s.onUpdate && s.onUpdate(u); }, onComplete: () => { s.onComplete && s.onComplete(), this.completeAnimation(); } }), this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation), this.pendingAnimation = void 0; }); } completeAnimation() { this.resumingFrom && (this.resumingFrom.currentAnimation = void 0, this.resumingFrom.preserveOpacity = void 0); const s = this.getStack(); s && s.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete"); } finishAnimation() { this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(xb), this.currentAnimation.stop()), this.completeAnimation(); } applyTransformsToTarget() { const s = this.getLead(); let { targetWithTransforms: u, target: c, layout: f, latestValues: h } = s; if (!(!u || !c || !f)) { if (this !== s && this.layout && f && N3(this.options.animationType, this.layout.layoutBox, f.layoutBox)) { c = this.target || Kt(); const d = on(this.layout.layoutBox.x); c.x.min = s.target.x.min, c.x.max = c.x.min + d; const g = on(this.layout.layoutBox.y); c.y.min = s.target.y.min, c.y.max = c.y.min + g; } bn(u, c), Js(u, h), Iu(this.projectionDeltaWithTransform, this.layoutCorrected, u, h); } } registerSharedNode(s, u) { this.sharedNodes.has(s) || this.sharedNodes.set(s, new CF()), this.sharedNodes.get(s).add(u); const f = u.options.initialPromotionConfig; u.promote({ transition: f ? f.transition : void 0, preserveFollowOpacity: f && f.shouldPreserveFollowOpacity ? f.shouldPreserveFollowOpacity(u) : void 0 }); } isLead() { const s = this.getStack(); return s ? s.lead === this : !0; } getLead() { var s; const { layoutId: u } = this.options; return u ? ((s = this.getStack()) === null || s === void 0 ? void 0 : s.lead) || this : this; } getPrevLead() { var s; const { layoutId: u } = this.options; return u ? (s = this.getStack()) === null || s === void 0 ? void 0 : s.prevLead : void 0; } getStack() { const { layoutId: s } = this.options; if (s) return this.root.sharedNodes.get(s); } promote({ needsReset: s, transition: u, preserveFollowOpacity: c } = {}) { const f = this.getStack(); f && f.promote(this, c), s && (this.projectionDelta = void 0, this.needsReset = !0), u && this.setOptions({ transition: u }); } relegate() { const s = this.getStack(); return s ? s.relegate(this) : !1; } resetRotation() { const { visualElement: s } = this.options; if (!s) return; let u = !1; const { latestValues: c } = s; if ((c.rotate || c.rotateX || c.rotateY || c.rotateZ) && (u = !0), !u) return; const f = {}; for (let h = 0; h < wb.length; h++) { const d = "rotate" + wb[h]; c[d] && (f[d] = c[d], s.setStaticValue(d, 0)); } s.render(); for (const h in f) s.setStaticValue(h, f[h]); s.scheduleRender(); } getProjectionStyles(s = {}) { var u, c; const f = {}; if (!this.instance || this.isSVG) return f; if (this.isVisible) f.visibility = ""; else return { visibility: "hidden" }; const h = this.getTransformTemplate(); if (this.needsReset) return this.needsReset = !1, f.opacity = "", f.pointerEvents = of(s.pointerEvents) || "", f.transform = h ? h(this.latestValues, "") : "none", f; const d = this.getLead(); if (!this.projectionDelta || !this.layout || !d.target) { const b = {}; return this.options.layoutId && (b.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, b.pointerEvents = of(s.pointerEvents) || ""), this.hasProjected && !Ua(this.latestValues) && (b.transform = h ? h({}, "") : "none", this.hasProjected = !1), b; } const g = d.animationValues || d.latestValues; this.applyTransformsToTarget(), f.transform = Sb(this.projectionDeltaWithTransform, this.treeScale, g), h && (f.transform = h(g, f.transform)); const { x: v, y: m } = this.projectionDelta; f.transformOrigin = `${v.origin * 100}% ${m.origin * 100}% 0`, d.animationValues ? f.opacity = d === this ? (c = (u = g.opacity) !== null && u !== void 0 ? u : this.latestValues.opacity) !== null && c !== void 0 ? c : 1 : this.preserveOpacity ? this.latestValues.opacity : g.opacityExit : f.opacity = d === this ? g.opacity !== void 0 ? g.opacity : "" : g.opacityExit !== void 0 ? g.opacityExit : 0; for (const b in Af) { if (g[b] === void 0) continue; const { correct: S, applyTo: x } = Af[b], w = f.transform === "none" ? g[b] : S(g[b], d); if (x) { const _ = x.length; for (let P = 0; P < _; P++) f[x[P]] = w; } else f[b] = w; } return this.options.layoutId && (f.pointerEvents = d === this ? of(s.pointerEvents) || "" : "none"), f; } clearSnapshot() { this.resumeFrom = this.snapshot = void 0; } // Only run on root resetTree() { this.root.nodes.forEach((s) => { var u; return (u = s.currentAnimation) === null || u === void 0 ? void 0 : u.stop(); }), this.root.nodes.forEach(Cb), this.root.sharedNodes.clear(); } }; } function AF(t) { t.updateLayout(); } function OF(t) { var e; const r = ((e = t.resumeFrom) === null || e === void 0 ? void 0 : e.snapshot) || t.snapshot; if (t.isLead() && t.layout && r && t.hasListeners("didUpdate")) { const { layoutBox: n, measuredBox: i } = t.layout, { animationType: a } = t.options, s = r.source !== t.layout.source; a === "size" ? ti((d) => { const g = s ? r.measuredBox[d] : r.layoutBox[d], v = on(g); g.min = n[d].min, g.max = g.min + v; }) : N3(a, r.layoutBox, n) && ti((d) => { const g = s ? r.measuredBox[d] : r.layoutBox[d], v = on(n[d]); g.max = g.min + v; }); const u = Mu(); Iu(u, n, r.layoutBox); const c = Mu(); s ? Iu(c, t.applyTransform(i, !0), r.measuredBox) : Iu(c, n, r.layoutBox); const f = !M3(u); let h = !1; if (!t.resumeFrom) { const d = t.getClosestProjectingParent(); if (d && !d.resumeFrom) { const { snapshot: g, layout: v } = d; if (g && v) { const m = Kt(); Du(m, r.layoutBox, g.layoutBox); const b = Kt(); Du(b, n, v.layoutBox), wg(m, b) || (h = !0), d.options.layoutRoot && (t.relativeTarget = b, t.relativeTargetOrigin = m, t.relativeParent = d); } } } t.notifyListeners("didUpdate", { layout: n, snapshot: r, delta: c, layoutDelta: u, hasLayoutChanged: f, hasRelativeTargetChanged: h }); } else if (t.isLead()) { const { onExitComplete: n } = t.options; n && n(); } t.options.transition = void 0; } function RF(t) { Ha.totalNodes++, t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = Boolean(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty)); } function kF(t) { t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1; } function IF(t) { t.clearSnapshot(); } function Cb(t) { t.clearMeasurements(); } function DF(t) { const { visualElement: e } = t.options; e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform(); } function _b(t) { t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0; } function MF(t) { t.resolveTargetDelta(); } function LF(t) { t.calcProjection(); } function NF(t) { t.resetRotation(); } function BF(t) { t.removeLeadSnapshot(); } function Pb(t, e, r) { t.translate = Nt(e.translate, 0, r), t.scale = Nt(e.scale, 1, r), t.origin = e.origin, t.originPoint = e.originPoint; } function Eb(t, e, r, n) { t.min = Nt(e.min, r.min, n), t.max = Nt(e.max, r.max, n); } function FF(t, e, r, n) { Eb(t.x, e.x, r.x, n), Eb(t.y, e.y, r.y, n); } function jF(t) { return t.animationValues && t.animationValues.opacityExit !== void 0; } const VF = { duration: 0.45, ease: [0.4, 0, 0.1, 1] }; function zF(t, e) { let r = t.root; for (let a = t.path.length - 1; a >= 0; a--) if (Boolean(t.path[a].instance)) { r = t.path[a]; break; } const i = (r && r !== t.root ? r.instance : document).querySelector(`[data-projection-id="${e}"]`); i && t.mount(i, !0); } function Tb(t) { t.min = Math.round(t.min), t.max = Math.round(t.max); } function GF(t) { Tb(t.x), Tb(t.y); } function N3(t, e, r) { return t === "position" || t === "preserve-aspect" && !mg(bb(e), bb(r), 0.2); } const WF = L3({ attachResizeListener: (t, e) => Mi(t, "resize", e), measureScroll: () => ({ x: document.documentElement.scrollLeft || document.body.scrollLeft, y: document.documentElement.scrollTop || document.body.scrollTop }), checkIsScrollRoot: () => !0 }), gp = { current: void 0 }, B3 = L3({ measureScroll: (t) => ({ x: t.scrollLeft, y: t.scrollTop }), defaultParent: () => { if (!gp.current) { const t = new WF(0, {}); t.mount(window), t.setOptions({ layoutScroll: !0 }), gp.current = t; } return gp.current; }, resetTransform: (t, e) => { t.style.transform = e !== void 0 ? e : "none"; }, checkIsScrollRoot: (t) => Boolean(window.getComputedStyle(t).position === "fixed") }), UF = { pan: { Feature: sF }, drag: { Feature: aF, ProjectionNode: B3, MeasureLayout: k3 } }, HF = /* @__PURE__ */ new Set([ "width", "height", "top", "left", "right", "bottom", "x", "y" ]), F3 = (t) => HF.has(t), YF = (t) => Object.keys(t).some(F3), Gc = (t) => t === ss || t === Ae, Ab = (t, e) => parseFloat(t.split(", ")[e]), Ob = (t, e) => (r, { transform: n }) => { if (n === "none" || !n) return 0; const i = n.match(/^matrix3d\((.+)\)$/); if (i) return Ab(i[1], e); { const a = n.match(/^matrix\((.+)\)$/); return a ? Ab(a[1], t) : 0; } }, qF = /* @__PURE__ */ new Set(["x", "y", "z"]), KF = lh.filter((t) => !qF.has(t)); function XF(t) { const e = []; return KF.forEach((r) => { const n = t.getValue(r); n !== void 0 && (e.push([r, n.get()]), n.set(r.startsWith("scale") ? 1 : 0)); }), e.length && t.render(), e; } const Rb = { // Dimensions width: ({ x: t }, { paddingLeft: e = "0", paddingRight: r = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(r), height: ({ y: t }, { paddingTop: e = "0", paddingBottom: r = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(r), top: (t, { top: e }) => parseFloat(e), left: (t, { left: e }) => parseFloat(e), bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min), right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min), // Transform x: Ob(4, 13), y: Ob(5, 14) }, QF = (t, e, r) => { const n = e.measureViewportBox(), i = e.current, a = getComputedStyle(i), { display: s } = a, u = {}; s === "none" && e.setStaticValue("display", t.display || "block"), r.forEach((f) => { u[f] = Rb[f](n, a); }), e.render(); const c = e.measureViewportBox(); return r.forEach((f) => { const h = e.getValue(f); h && h.jump(u[f]), t[f] = Rb[f](c, a); }), t; }, JF = (t, e, r = {}, n = {}) => { e = { ...e }, n = { ...n }; const i = Object.keys(e).filter(F3); let a = [], s = !1; const u = []; if (i.forEach((c) => { const f = t.getValue(c); if (!t.hasValue(c)) return; let h = r[c], d = fu(h); const g = e[c]; let v; if (Rf(g)) { const m = g.length, b = g[0] === null ? 1 : 0; h = g[b], d = fu(h); for (let S = b; S < m; S++) v ? Wn(fu(g[S]) === v, "All keyframes must be of the same type") : (v = fu(g[S]), Wn(v === d || Gc(d) && Gc(v), "Keyframes must be of the same dimension as the current value")); } else v = fu(g); if (d !== v) if (Gc(d) && Gc(v)) { const m = f.get(); typeof m == "string" && f.set(parseFloat(m)), typeof g == "string" ? e[c] = parseFloat(g) : Array.isArray(g) && v === Ae && (e[c] = g.map(parseFloat)); } else d != null && d.transform && (v != null && v.transform) && (h === 0 || g === 0) ? h === 0 ? f.set(v.transform(h)) : e[c] = d.transform(g) : (s || (a = XF(t), s = !0), u.push(c), n[c] = n[c] !== void 0 ? n[c] : e[c], f.jump(g)); }), u.length) { const c = u.indexOf("height") >= 0 ? window.pageYOffset : null, f = QF(e, t, u); return a.length && a.forEach(([h, d]) => { t.getValue(h).set(d); }), t.render(), sh && c !== null && window.scrollTo({ top: c }), { target: f, transitionEnd: n }; } else return { target: e, transitionEnd: n }; }; function ZF(t, e, r, n) { return YF(e) ? JF(t, e, r, n) : { target: e, transitionEnd: n }; } const $F = (t, e, r, n) => { const i = fF(t, e, n); return e = i.target, n = i.transitionEnd, ZF(t, e, r, n); }, xg = { current: null }, j3 = { current: !1 }; function ej() { if (j3.current = !0, !!sh) if (window.matchMedia) { const t = window.matchMedia("(prefers-reduced-motion)"), e = () => xg.current = t.matches; t.addListener(e), e(); } else xg.current = !1; } const kb = /* @__PURE__ */ new Set(); function jm(t, e, r) { t || kb.has(e) || (console.warn(e), r && console.warn(r), kb.add(e)); } function tj(t, e, r) { const { willChange: n } = e; for (const i in e) { const a = e[i], s = r[i]; if (Wr(a)) t.addValue(i, a), If(n) && n.add(i), process.env.NODE_ENV === "development" && jm(a.version === "9.1.7", `Attempting to mix Framer Motion versions ${a.version} with 9.1.7 may not work as expected.`); else if (Wr(s)) t.addValue(i, lo(a, { owner: t })), If(n) && n.remove(i); else if (s !== a) if (t.hasValue(i)) { const u = t.getValue(i); !u.hasAnimated && u.set(a); } else { const u = t.getStaticValue(i); t.addValue(i, lo(u !== void 0 ? u : a, { owner: t })); } } for (const i in r) e[i] === void 0 && t.removeValue(i); return e; } const V3 = Object.keys(qu), rj = V3.length, Ib = [ "AnimationStart", "AnimationComplete", "Update", "BeforeLayoutMeasure", "LayoutMeasure", "LayoutAnimationStart", "LayoutAnimationComplete" ], nj = pm.length; class ij { constructor({ parent: e, props: r, presenceContext: n, reducedMotionConfig: i, visualState: a }, s = {}) { this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => { this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection)); }, this.scheduleRender = () => _r.render(this.render, !1, !0); const { latestValues: u, renderState: c } = a; this.latestValues = u, this.baseTarget = { ...u }, this.initialValues = r.initial ? { ...u } : {}, this.renderState = c, this.parent = e, this.props = r, this.presenceContext = n, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = s, this.isControllingVariants = uh(r), this.isVariantNode = Ix(r), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = Boolean(e && e.current); const { willChange: f, ...h } = this.scrapeMotionValuesFromProps(r, {}); for (const d in h) { const g = h[d]; u[d] !== void 0 && Wr(g) && (g.set(u[d], !1), If(f) && f.add(d)); } } /** * This method takes React props and returns found MotionValues. For example, HTML * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays. * * This isn't an abstract method as it needs calling in the constructor, but it is * intended to be one. */ scrapeMotionValuesFromProps(e, r) { return {}; } mount(e) { this.current = e, this.projection && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((r, n) => this.bindToMotionValue(n, r)), j3.current || ej(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : xg.current, process.env.NODE_ENV !== "production" && jm(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext); } unmount() { this.projection && this.projection.unmount(), va.update(this.notifyUpdate), va.render(this.render), this.valueSubscriptions.forEach((e) => e()), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this); for (const e in this.events) this.events[e].clear(); for (const e in this.features) this.features[e].unmount(); this.current = null; } bindToMotionValue(e, r) { const n = as.has(e), i = r.on("change", (s) => { this.latestValues[e] = s, this.props.onUpdate && _r.update(this.notifyUpdate, !1, !0), n && this.projection && (this.projection.isTransformDirty = !0); }), a = r.on("renderRequest", this.scheduleRender); this.valueSubscriptions.set(e, () => { i(), a(); }); } sortNodePosition(e) { return !this.current || !this.sortInstanceNodePosition || this.type !== e.type ? 0 : this.sortInstanceNodePosition(this.current, e.current); } loadFeatures({ children: e, ...r }, n, i, a, s) { let u, c; if (process.env.NODE_ENV !== "production" && i && n) { const f = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead."; r.ignoreStrict ? ul(!1, f) : Wn(!1, f); } for (let f = 0; f < rj; f++) { const h = V3[f], { isEnabled: d, Feature: g, ProjectionNode: v, MeasureLayout: m } = qu[h]; v && (u = v), d(r) && (!this.features[h] && g && (this.features[h] = new g(this)), m && (c = m)); } if (!this.projection && u) { this.projection = new u(a, this.latestValues, this.parent && this.parent.projection); const { layoutId: f, layout: h, drag: d, dragConstraints: g, layoutScroll: v, layoutRoot: m } = r; this.projection.setOptions({ layoutId: f, layout: h, alwaysMeasureLayout: Boolean(d) || g && Xs(g), visualElement: this, scheduleRender: () => this.scheduleRender(), /** * TODO: Update options in an effect. This could be tricky as it'll be too late * to update by the time layout animations run. * We also need to fix this safeToRemove by linking it up to the one returned by usePresence, * ensuring it gets called if there's no potential layout animations. * */ animationType: typeof h == "string" ? h : "both", initialPromotionConfig: s, layoutScroll: v, layoutRoot: m }); } return c; } updateFeatures() { for (const e in this.features) { const r = this.features[e]; r.isMounted ? r.update(this.props, this.prevProps) : (r.mount(), r.isMounted = !0); } } triggerBuild() { this.build(this.renderState, this.latestValues, this.options, this.props); } /** * Measure the current viewport box with or without transforms. * Only measures axis-aligned boxes, rotate and skew must be manually * removed with a re-render to work. */ measureViewportBox() { return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Kt(); } getStaticValue(e) { return this.latestValues[e]; } setStaticValue(e, r) { this.latestValues[e] = r; } /** * Make a target animatable by Popmotion. For instance, if we're * trying to animate width from 100px to 100vw we need to measure 100vw * in pixels to determine what we really need to animate to. This is also * pluggable to support Framer's custom value types like Color, * and CSS variables. */ makeTargetAnimatable(e, r = !0) { return this.makeTargetAnimatableFromInstance(e, this.props, r); } /** * Update the provided props. Ensure any newly-added motion values are * added to our map, old ones removed, and listeners updated. */ update(e, r) { (e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = r; for (let n = 0; n < Ib.length; n++) { const i = Ib[n]; this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]); const a = e["on" + i]; a && (this.propEventSubscriptions[i] = this.on(i, a)); } this.prevMotionValues = tj(this, this.scrapeMotionValuesFromProps(e, this.prevProps), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue(); } getProps() { return this.props; } /** * Returns the variant definition with a given name. */ getVariant(e) { return this.props.variants ? this.props.variants[e] : void 0; } /** * Returns the defined default transition on this component. */ getDefaultTransition() { return this.props.transition; } getTransformPagePoint() { return this.props.transformPagePoint; } getClosestVariantNode() { return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0; } getVariantContext(e = !1) { if (e) return this.parent ? this.parent.getVariantContext() : void 0; if (!this.isControllingVariants) { const n = this.parent ? this.parent.getVariantContext() || {} : {}; return this.props.initial !== void 0 && (n.initial = this.props.initial), n; } const r = {}; for (let n = 0; n < nj; n++) { const i = pm[n], a = this.props[i]; (Yu(a) || a === !1) && (r[i] = a); } return r; } /** * Add a child visual element to our set of children. */ addVariantChild(e) { const r = this.getClosestVariantNode(); if (r) return r.variantChildren && r.variantChildren.add(e), () => r.variantChildren.delete(e); } /** * Add a motion value and bind it to this visual element. */ addValue(e, r) { r !== this.values.get(e) && (this.removeValue(e), this.bindToMotionValue(e, r)), this.values.set(e, r), this.latestValues[e] = r.get(); } /** * Remove a motion value and unbind any active subscriptions. */ removeValue(e) { this.values.delete(e); const r = this.valueSubscriptions.get(e); r && (r(), this.valueSubscriptions.delete(e)), delete this.latestValues[e], this.removeValueFromRenderState(e, this.renderState); } /** * Check whether we have a motion value for this key */ hasValue(e) { return this.values.has(e); } getValue(e, r) { if (this.props.values && this.props.values[e]) return this.props.values[e]; let n = this.values.get(e); return n === void 0 && r !== void 0 && (n = lo(r, { owner: this }), this.addValue(e, n)), n; } /** * If we're trying to animate to a previously unencountered value, * we need to check for it in our state and as a last resort read it * directly from the instance (which might have performance implications). */ readValue(e) { return this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.readValueFromInstance(this.current, e, this.options); } /** * Set the base target to later animate back to. This is currently * only hydrated on creation and when we first read a value. */ setBaseTarget(e, r) { this.baseTarget[e] = r; } /** * Find the base target for a value thats been removed from all animation * props. */ getBaseTarget(e) { var r; const { initial: n } = this.props, i = typeof n == "string" || typeof n == "object" ? (r = _m(this.props, n)) === null || r === void 0 ? void 0 : r[e] : void 0; if (n && i !== void 0) return i; const a = this.getBaseTargetFromProps(this.props, e); return a !== void 0 && !Wr(a) ? a : this.initialValues[e] !== void 0 && i === void 0 ? void 0 : this.baseTarget[e]; } on(e, r) { return this.events[e] || (this.events[e] = new Tm()), this.events[e].add(r); } notify(e, ...r) { this.events[e] && this.events[e].notify(...r); } } class z3 extends ij { sortInstanceNodePosition(e, r) { return e.compareDocumentPosition(r) & 2 ? 1 : -1; } getBaseTargetFromProps(e, r) { return e.style ? e.style[r] : void 0; } removeValueFromRenderState(e, { vars: r, style: n }) { delete r[e], delete n[e]; } makeTargetAnimatableFromInstance({ transition: e, transitionEnd: r, ...n }, { transformValues: i }, a) { let s = TN(n, e || {}, this); if (i && (r && (r = i(r)), n && (n = i(n)), s && (s = i(s))), a) { PN(this, n, s); const u = $F(this, n, s, r); r = u.transitionEnd, n = u.target; } return { transition: e, transitionEnd: r, ...n }; } } function aj(t) { return window.getComputedStyle(t); } class sj extends z3 { readValueFromInstance(e, r) { if (as.has(r)) { const n = Rm(r); return n && n.default || 0; } else { const n = aj(e), i = (Nx(r) ? n.getPropertyValue(r) : n[r]) || 0; return typeof i == "string" ? i.trim() : i; } } measureInstanceViewportBox(e, { transformPagePoint: r }) { return O3(e, r); } build(e, r, n, i) { ym(e, r, n, i.transformTemplate); } scrapeMotionValuesFromProps(e, r) { return Cm(e, r); } handleChildMotionValue() { this.childSubscription && (this.childSubscription(), delete this.childSubscription); const { children: e } = this.props; Wr(e) && (this.childSubscription = e.on("change", (r) => { this.current && (this.current.textContent = `${r}`); })); } renderInstance(e, r, n, i) { zx(e, r, n, i); } } class oj extends z3 { constructor() { super(...arguments), this.isSVGTag = !1; } getBaseTargetFromProps(e, r) { return e[r]; } readValueFromInstance(e, r) { if (as.has(r)) { const n = Rm(r); return n && n.default || 0; } return r = Gx.has(r) ? r : xm(r), e.getAttribute(r); } measureInstanceViewportBox() { return Kt(); } scrapeMotionValuesFromProps(e, r) { return Ux(e, r); } build(e, r, n, i) { Sm(e, r, n, this.isSVGTag, i.transformTemplate); } renderInstance(e, r, n, i) { Wx(e, r, n, i); } mount(e) { this.isSVGTag = wm(e.tagName), super.mount(e); } } const uj = (t, e) => vm(t) ? new oj(e, { enableHardwareAcceleration: !1 }) : new sj(e, { enableHardwareAcceleration: !0 }), lj = { layout: { ProjectionNode: B3, MeasureLayout: k3 } }, cj = { ...jB, ...$7, ...UF, ...lj }, G3 = /* @__PURE__ */ h7((t, e) => V7(t, e, cj, uj)); function W3() { const t = $e(!1); return Tf(() => (t.current = !0, () => { t.current = !1; }), []), t; } function fj() { const t = W3(), [e, r] = En(0), n = Ze(() => { t.current && r(e + 1); }, [e]); return [Ze(() => _r.postRender(n), [n]), e]; } class hj extends gr.Component { getSnapshotBeforeUpdate(e) { const r = this.props.childRef.current; if (r && e.isPresent && !this.props.isPresent) { const n = this.props.sizeRef.current; n.height = r.offsetHeight || 0, n.width = r.offsetWidth || 0, n.top = r.offsetTop, n.left = r.offsetLeft; } return null; } /** * Required with getSnapshotBeforeUpdate to stop React complaining. */ componentDidUpdate() { } render() { return this.props.children; } } function dj({ children: t, isPresent: e }) { const r = go(), n = $e(null), i = $e({ width: 0, height: 0, top: 0, left: 0 }); return Jb(() => { const { width: a, height: s, top: u, left: c } = i.current; if (e || !n.current || !a || !s) return; n.current.dataset.motionPopId = r; const f = document.createElement("style"); return document.head.appendChild(f), f.sheet && f.sheet.insertRule(` [data-motion-pop-id="${r}"] { position: absolute !important; width: ${a}px !important; height: ${s}px !important; top: ${u}px !important; left: ${c}px !important; } `), () => { document.head.removeChild(f); }; }, [e]), gr.createElement(hj, { isPresent: e, childRef: n, sizeRef: i }, gr.cloneElement(t, { ref: n })); } const mp = ({ children: t, initial: e, isPresent: r, onExitComplete: n, custom: i, presenceAffectsLayout: a, mode: s }) => { const u = gm(pj), c = go(), f = Mr( () => ({ id: c, initial: e, isPresent: r, custom: i, onExitComplete: (h) => { u.set(h, !0); for (const d of u.values()) if (!d) return; n && n(); }, register: (h) => (u.set(h, !1), () => u.delete(h)) }), /** * If the presence of a child affects the layout of the components around it, * we want to make a new context value to ensure they get re-rendered * so they can detect that layout change. */ a ? void 0 : [r] ); return Mr(() => { u.forEach((h, d) => u.set(d, !1)); }, [r]), gr.useEffect(() => { !r && !u.size && n && n(); }, [r]), s === "popLayout" && (t = gr.createElement(dj, { isPresent: r }, t)), gr.createElement(il.Provider, { value: f }, t); }; function pj() { return /* @__PURE__ */ new Map(); } function gj(t) { return Wt(() => () => t(), []); } const qs = (t) => t.key || ""; function mj(t, e) { t.forEach((r) => { const n = qs(r); e.set(n, r); }); } function vj(t) { const e = []; return Vf.forEach(t, (r) => { zf(r) && e.push(r); }), e; } const yj = ({ children: t, custom: e, initial: r = !0, onExitComplete: n, exitBeforeEnter: i, presenceAffectsLayout: a = !0, mode: s = "sync" }) => { i && (s = "wait", process.env.NODE_ENV !== "production" && jm(!1, "Replace exitBeforeEnter with mode='wait'")); let [u] = fj(); const c = bt(mm).forceRender; c && (u = c); const f = W3(), h = vj(t); let d = h; const g = /* @__PURE__ */ new Set(), v = $e(d), m = $e(/* @__PURE__ */ new Map()).current, b = $e(!0); if (Tf(() => { b.current = !1, mj(h, m), v.current = d; }), gj(() => { b.current = !0, m.clear(), g.clear(); }), b.current) return gr.createElement(gr.Fragment, null, d.map((_) => gr.createElement(mp, { key: qs(_), isPresent: !0, initial: r ? void 0 : !1, presenceAffectsLayout: a, mode: s }, _))); d = [...d]; const S = v.current.map(qs), x = h.map(qs), w = S.length; for (let _ = 0; _ < w; _++) { const P = S[_]; x.indexOf(P) === -1 && g.add(P); } return s === "wait" && g.size && (d = []), g.forEach((_) => { if (x.indexOf(_) !== -1) return; const P = m.get(_); if (!P) return; const E = S.indexOf(_), k = () => { m.delete(_), g.delete(_); const D = v.current.findIndex((V) => V.key === _); if (v.current.splice(D, 1), !g.size) { if (v.current = h, f.current === !1) return; u(), n && n(); } }; d.splice(E, 0, gr.createElement(mp, { key: qs(P), isPresent: !1, onExitComplete: k, custom: e, presenceAffectsLayout: a, mode: s }, P)); }), d = d.map((_) => { const P = _.key; return g.has(P) ? _ : gr.createElement(mp, { key: qs(_), isPresent: !0, presenceAffectsLayout: a, mode: s }, _); }), process.env.NODE_ENV !== "production" && s === "wait" && d.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`), gr.createElement(gr.Fragment, null, g.size ? d : d.map((_) => mo(_))); }; var bj = UL({ "0%": { transform: "rotate(0deg)" }, "100%": { transform: "rotate(360deg)" } }), Vm = Ur((t, e) => { const r = ih("Spinner", t), { label: n = "Loading...", thickness: i = "2px", speed: a = "0.45s", emptyColor: s = "transparent", className: u, ...c } = nl(t), f = xa("chakra-spinner", u), h = { display: "inline-block", borderColor: "currentColor", borderStyle: "solid", borderRadius: "99999px", borderWidth: i, borderBottomColor: s, borderLeftColor: s, animation: `${bj} ${a} linear infinite`, ...r }; return /* @__PURE__ */ he.jsx( Gt.div, { ref: e, __css: h, className: f, ...c, children: n && /* @__PURE__ */ he.jsx(Gt.span, { srOnly: !0, children: n }) } ); }); Vm.displayName = "Spinner"; function Sj(t, e) { if (t != null) { if (typeof t == "function") { t(e); return; } try { t.current = e; } catch { throw new Error(`Cannot assign value '${e}' to ref '${t}'`); } } } function Di(...t) { return (e) => { t.forEach((r) => { Sj(r, e); }); }; } function wj(...t) { return Mr(() => Di(...t), t); } var Cg = Ur(function(e, r) { const { htmlWidth: n, htmlHeight: i, alt: a, ...s } = e; return /* @__PURE__ */ he.jsx("img", { width: n, height: i, ref: r, alt: a, ...s }); }); Cg.displayName = "NativeImage"; function xj(t) { const { loading: e, src: r, srcSet: n, onLoad: i, onError: a, crossOrigin: s, sizes: u, ignoreFallback: c } = t, [f, h] = En("pending"); Wt(() => { h(r ? "loading" : "pending"); }, [r]); const d = $e(), g = Ze(() => { if (!r) return; v(); const m = new Image(); m.src = r, s && (m.crossOrigin = s), n && (m.srcset = n), u && (m.sizes = u), e && (m.loading = e), m.onload = (b) => { v(), h("loaded"), i == null || i(b); }, m.onerror = (b) => { v(), h("failed"), a == null || a(b); }, d.current = m; }, [r, s, n, u, i, a, e]), v = () => { d.current && (d.current.onload = null, d.current.onerror = null, d.current = null); }; return Hu(() => { if (!c) return f === "loading" && g(), () => { v(); }; }, [f, g, c]), c ? "loaded" : f; } var Cj = (t, e) => t !== "loaded" && e === "beforeLoadOrError" || t === "failed" && e === "onError"; function _j(t, e = []) { const r = Object.assign({}, t); for (const n of e) n in r && delete r[n]; return r; } var U3 = Ur(function(e, r) { const { fallbackSrc: n, fallback: i, src: a, srcSet: s, align: u, fit: c, loading: f, ignoreFallback: h, crossOrigin: d, fallbackStrategy: g = "beforeLoadOrError", referrerPolicy: v, ...m } = e, b = n !== void 0 || i !== void 0, S = f != null || h || !b, x = xj({ ...e, ignoreFallback: S }), w = Cj(x, g), _ = { ref: r, objectFit: c, objectPosition: u, ...S ? m : _j(m, ["onError", "onLoad"]) }; return w ? i || /* @__PURE__ */ he.jsx( Gt.img, { as: Cg, className: "chakra-image__placeholder", src: n, ..._ } ) : /* @__PURE__ */ he.jsx( Gt.img, { as: Cg, src: a, srcSet: s, crossOrigin: d, loading: f, referrerPolicy: v, className: "chakra-image", ..._ } ); }); U3.displayName = "Image"; function Pj(t) { return Vf.toArray(t).filter( (e) => zf(e) ); } var [kH, Ej] = rl({ strict: !1, name: "ButtonGroupContext" }); function Tj(t) { const [e, r] = En(!t); return { ref: Ze((a) => { a && r(a.tagName === "BUTTON"); }, []), type: e ? "button" : void 0 }; } function _g(t) { const { children: e, className: r, ...n } = t, i = zf(e) ? mo(e, { "aria-hidden": !0, focusable: !1 }) : e, a = xa("chakra-button__icon", r); return /* @__PURE__ */ he.jsx( Gt.span, { display: "inline-flex", alignSelf: "center", flexShrink: 0, ...n, className: a, children: i } ); } _g.displayName = "ButtonIcon"; function Pg(t) { const { label: e, placement: r, spacing: n = "0.5rem", children: i = /* @__PURE__ */ he.jsx(Vm, { color: "currentColor", width: "1em", height: "1em" }), className: a, __css: s, ...u } = t, c = xa("chakra-button__spinner", a), f = r === "start" ? "marginEnd" : "marginStart", h = Mr( () => ({ display: "flex", alignItems: "center", position: e ? "relative" : "absolute", [f]: e ? n : 0, fontSize: "1em", lineHeight: "normal", ...s }), [s, e, f, n] ); return /* @__PURE__ */ he.jsx(Gt.div, { className: c, ...u, __css: h, children: i }); } Pg.displayName = "ButtonSpinner"; var zm = Ur((t, e) => { const r = Ej(), n = ih("Button", { ...r, ...t }), { isDisabled: i = r == null ? void 0 : r.isDisabled, isLoading: a, isActive: s, children: u, leftIcon: c, rightIcon: f, loadingText: h, iconSpacing: d = "0.5rem", type: g, spinner: v, spinnerPlacement: m = "start", className: b, as: S, ...x } = nl(t), w = Mr(() => { const k = { ...n == null ? void 0 : n._focus, zIndex: 1 }; return { display: "inline-flex", appearance: "none", alignItems: "center", justifyContent: "center", userSelect: "none", position: "relative", whiteSpace: "nowrap", verticalAlign: "middle", outline: "none", ...n, ...!!r && { _focus: k } }; }, [n, r]), { ref: _, type: P } = Tj(S), E = { rightIcon: f, leftIcon: c, iconSpacing: d, children: u }; return /* @__PURE__ */ he.jsxs( Gt.button, { ref: wj(e, _), as: S, type: g ?? P, "data-active": y2(s), "data-loading": y2(a), __css: w, className: xa("chakra-button", b), ...x, disabled: i || a, children: [ a && m === "start" && /* @__PURE__ */ he.jsx( Pg, { className: "chakra-button__spinner--start", label: h, placement: "start", spacing: d, children: v } ), a ? h || /* @__PURE__ */ he.jsx(Gt.span, { opacity: 0, children: /* @__PURE__ */ he.jsx(Db, { ...E }) }) : /* @__PURE__ */ he.jsx(Db, { ...E }), a && m === "end" && /* @__PURE__ */ he.jsx( Pg, { className: "chakra-button__spinner--end", label: h, placement: "end", spacing: d, children: v } ) ] } ); }); zm.displayName = "Button"; function Db(t) { const { leftIcon: e, rightIcon: r, children: n, iconSpacing: i } = t; return /* @__PURE__ */ he.jsxs(he.Fragment, { children: [ e && /* @__PURE__ */ he.jsx(_g, { marginEnd: i, children: e }), n, r && /* @__PURE__ */ he.jsx(_g, { marginStart: i, children: r }) ] }); } var H3 = Ur( (t, e) => { const { icon: r, children: n, isRound: i, "aria-label": a, ...s } = t, u = r || n, c = zf(u) ? mo(u, { "aria-hidden": !0, focusable: !1 }) : null; return /* @__PURE__ */ he.jsx( zm, { padding: "0", borderRadius: i ? "full" : void 0, ref: e, "aria-label": a, ...s, children: c } ); } ); H3.displayName = "IconButton"; function no(t, e, r, n) { const i = ig(r); return Wt(() => { const a = typeof t == "function" ? t() : t ?? document; if (!(!r || !a)) return a.addEventListener(e, i, n), () => { a.removeEventListener(e, i, n); }; }, [e, t, n, i, r]), () => { const a = typeof t == "function" ? t() : t ?? document; a == null || a.removeEventListener(e, i, n); }; } function Aj(t) { return "current" in t; } var Y3 = () => typeof window < "u"; function Oj() { var t; const e = navigator.userAgentData; return (t = e == null ? void 0 : e.platform) != null ? t : navigator.platform; } var Rj = (t) => Y3() && t.test(navigator.vendor), kj = (t) => Y3() && t.test(Oj()), Ij = () => kj(/mac|iphone|ipad|ipod/i), Dj = () => Ij() && Rj(/apple/i); function Mj(t) { const { ref: e, elements: r, enabled: n } = t, i = () => { var a, s; return (s = (a = e.current) == null ? void 0 : a.ownerDocument) != null ? s : document; }; no(i, "pointerdown", (a) => { if (!Dj() || !n) return; const s = a.target, c = (r ?? [e]).some((f) => { const h = Aj(f) ? f.current : f; return (h == null ? void 0 : h.contains(s)) || h === s; }); i().activeElement !== s && c && (a.preventDefault(), s.focus()); }); } function q3(t) { return t != null && typeof t == "object" && "nodeType" in t && t.nodeType === Node.ELEMENT_NODE; } function K3(t) { var e; if (!q3(t)) return !1; const r = (e = t.ownerDocument.defaultView) != null ? e : window; return t instanceof r.HTMLElement; } function Lj(t) { var e, r; return (r = (e = X3(t)) == null ? void 0 : e.defaultView) != null ? r : window; } function X3(t) { return q3(t) ? t.ownerDocument : document; } function Nj(t) { return X3(t).activeElement; } var Q3 = (t) => t.hasAttribute("tabindex"), Bj = (t) => Q3(t) && t.tabIndex === -1; function Fj(t) { return Boolean(t.getAttribute("disabled")) === !0 || Boolean(t.getAttribute("aria-disabled")) === !0; } function J3(t) { return t.parentElement && J3(t.parentElement) ? !0 : t.hidden; } function jj(t) { const e = t.getAttribute("contenteditable"); return e !== "false" && e != null; } function Z3(t) { if (!K3(t) || J3(t) || Fj(t)) return !1; const { localName: e } = t; if (["input", "select", "textarea", "button"].indexOf(e) >= 0) return !0; const n = { a: () => t.hasAttribute("href"), audio: () => t.hasAttribute("controls"), video: () => t.hasAttribute("controls") }; return e in n ? n[e]() : jj(t) ? !0 : Q3(t); } function Vj(t) { return t ? K3(t) && Z3(t) && !Bj(t) : !1; } var zj = [ "input:not(:disabled):not([disabled])", "select:not(:disabled):not([disabled])", "textarea:not(:disabled):not([disabled])", "embed", "iframe", "object", "a[href]", "area[href]", "button:not(:disabled):not([disabled])", "[tabindex]", "audio[controls]", "video[controls]", "*[tabindex]:not([aria-disabled])", "*[contenteditable]" ], Gj = zj.join(), Wj = (t) => t.offsetWidth > 0 && t.offsetHeight > 0; function Uj(t) { const e = Array.from( t.querySelectorAll(Gj) ); return e.unshift(t), e.filter((r) => Z3(r) && Wj(r)); } function $3(t, e) { return Array.isArray(t) ? t.map((r) => r === null ? null : e(r)) : _n(t) ? Object.keys(t).reduce((r, n) => (r[n] = e(t[n]), r), {}) : t != null ? e(t) : null; } var Lf = Ur(function(e, r) { const n = ih("Text", e), { className: i, align: a, decoration: s, casing: u, ...c } = nl(e), f = W8({ textAlign: e.align, textDecoration: e.decoration, textTransform: e.casing }); return /* @__PURE__ */ he.jsx( Gt.p, { ref: r, className: xa("chakra-text", e.className), ...f, ...c, __css: n } ); }); Lf.displayName = "Text"; var eC = (t) => /* @__PURE__ */ he.jsx( Gt.div, { className: "chakra-stack__item", ...t, __css: { display: "inline-block", flex: "0 0 auto", minWidth: 0, ...t.__css } } ); eC.displayName = "StackItem"; var Eg = "& > *:not(style) ~ *:not(style)"; function Hj(t) { const { spacing: e, direction: r } = t, n = { column: { marginTop: e, marginEnd: 0, marginBottom: 0, marginStart: 0 }, row: { marginTop: 0, marginEnd: 0, marginBottom: 0, marginStart: e }, "column-reverse": { marginTop: 0, marginEnd: 0, marginBottom: e, marginStart: 0 }, "row-reverse": { marginTop: 0, marginEnd: e, marginBottom: 0, marginStart: 0 } }; return { flexDirection: r, [Eg]: $3( r, (i) => n[i] ) }; } function Yj(t) { const { spacing: e, direction: r } = t, n = { column: { my: e, mx: 0, borderLeftWidth: 0, borderBottomWidth: "1px" }, "column-reverse": { my: e, mx: 0, borderLeftWidth: 0, borderBottomWidth: "1px" }, row: { mx: e, my: 0, borderLeftWidth: "1px", borderBottomWidth: 0 }, "row-reverse": { mx: e, my: 0, borderLeftWidth: "1px", borderBottomWidth: 0 } }; return { "&": $3( r, (i) => n[i] ) }; } var tC = Ur((t, e) => { const { isInline: r, direction: n, align: i, justify: a, spacing: s = "0.5rem", wrap: u, children: c, divider: f, className: h, shouldWrapChildren: d, ...g } = t, v = r ? "row" : n ?? "column", m = Mr( () => Hj({ direction: v, spacing: s }), [v, s] ), b = Mr( () => Yj({ spacing: s, direction: v }), [s, v] ), S = !!f, x = !d && !S, w = Mr(() => { const P = Pj(c); return x ? P : P.map((E, k) => { const D = typeof E.key < "u" ? E.key : k, V = k + 1 === P.length, W = d ? /* @__PURE__ */ he.jsx(eC, { children: E }, D) : E; if (!S) return W; const K = mo( f, { __css: b } ), ie = V ? null : K; return /* @__PURE__ */ he.jsxs(jf, { children: [ W, ie ] }, D); }); }, [ f, b, S, x, d, c ]), _ = xa("chakra-stack", h); return /* @__PURE__ */ he.jsx( Gt.div, { ref: e, display: "flex", alignItems: i, justifyContent: a, flexDirection: m.flexDirection, flexWrap: u, className: _, __css: S ? {} : { [Eg]: m[Eg] }, ...g, children: w } ); }); tC.displayName = "Stack"; var rC = Ur((t, e) => /* @__PURE__ */ he.jsx(tC, { align: "center", ...t, direction: "column", ref: e })); rC.displayName = "VStack"; var Gm = Ur(function(e, r) { const { direction: n, align: i, justify: a, wrap: s, basis: u, grow: c, shrink: f, ...h } = e, d = { display: "flex", flexDirection: n, alignItems: i, justifyContent: a, flexWrap: s, flexBasis: u, flexGrow: c, flexShrink: f }; return /* @__PURE__ */ he.jsx(Gt.div, { ref: r, __css: d, ...h }); }); Gm.displayName = "Flex"; function qj(t) { const e = t.current; if (!e) return !1; const r = Nj(e); return !r || e.contains(r) ? !1 : !!Vj(r); } function Kj(t, e) { const { shouldFocus: r, visible: n, focusRef: i } = e, a = r && !n; Ox(() => { if (!a || qj(t)) return; const s = (i == null ? void 0 : i.current) || t.current; s && requestAnimationFrame(() => { s.focus(); }); }, [a, t, i]); } var Xj = { preventScroll: !0, shouldFocus: !1 }; function Qj(t, e = Xj) { const { focusRef: r, preventScroll: n, shouldFocus: i, visible: a } = e, s = Jj(t) ? t.current : t, u = i && a, c = $e(u), f = $e(a); Hu(() => { !f.current && a && (c.current = u), f.current = a; }, [a, u]); const h = Ze(() => { if (!(!a || !s || !c.current) && (c.current = !1, !s.contains(document.activeElement))) if (r != null && r.current) requestAnimationFrame(() => { var d; (d = r.current) == null || d.focus({ preventScroll: n }); }); else { const d = Uj(s); d.length > 0 && requestAnimationFrame(() => { d[0].focus({ preventScroll: n }); }); } }, [a, n, s, r]); Ox(() => { h(); }, [h]), no(s, "transitionend", h); } function Jj(t) { return "current" in t; } var Us = (t, e) => ({ var: t, varRef: e ? `var(${t}, ${e})` : `var(${t})` }), Qt = { arrowShadowColor: Us("--popper-arrow-shadow-color"), arrowSize: Us("--popper-arrow-size", "8px"), arrowSizeHalf: Us("--popper-arrow-size-half"), arrowBg: Us("--popper-arrow-bg"), transformOrigin: Us("--popper-transform-origin"), arrowOffset: Us("--popper-arrow-offset") }; function Zj(t) { if (t.includes("top")) return "1px 1px 1px 0 var(--popper-arrow-shadow-color)"; if (t.includes("bottom")) return "-1px -1px 1px 0 var(--popper-arrow-shadow-color)"; if (t.includes("right")) return "-1px 1px 1px 0 var(--popper-arrow-shadow-color)"; if (t.includes("left")) return "1px -1px 1px 0 var(--popper-arrow-shadow-color)"; } var $j = { top: "bottom center", "top-start": "bottom left", "top-end": "bottom right", bottom: "top center", "bottom-start": "top left", "bottom-end": "top right", left: "right center", "left-start": "right top", "left-end": "right bottom", right: "left center", "right-start": "left top", "right-end": "left bottom" }, eV = (t) => $j[t], Mb = { scroll: !0, resize: !0 }; function tV(t) { let e; return typeof t == "object" ? e = { enabled: !0, options: { ...Mb, ...t } } : e = { enabled: t, options: Mb }, e; } var rV = { name: "matchWidth", enabled: !0, phase: "beforeWrite", requires: ["computeStyles"], fn: ({ state: t }) => { t.styles.popper.width = `${t.rects.reference.width}px`; }, effect: ({ state: t }) => () => { const e = t.elements.reference; t.elements.popper.style.width = `${e.offsetWidth}px`; } }, nV = { name: "transformOrigin", enabled: !0, phase: "write", fn: ({ state: t }) => { Lb(t); }, effect: ({ state: t }) => () => { Lb(t); } }, Lb = (t) => { t.elements.popper.style.setProperty( Qt.transformOrigin.var, eV(t.placement) ); }, iV = { name: "positionArrow", enabled: !0, phase: "afterWrite", fn: ({ state: t }) => { aV(t); } }, aV = (t) => { var e; if (!t.placement) return; const r = sV(t.placement); if ((e = t.elements) != null && e.arrow && r) { Object.assign(t.elements.arrow.style, { [r.property]: r.value, width: Qt.arrowSize.varRef, height: Qt.arrowSize.varRef, zIndex: -1 }); const n = { [Qt.arrowSizeHalf.var]: `calc(${Qt.arrowSize.varRef} / 2)`, [Qt.arrowOffset.var]: `calc(${Qt.arrowSizeHalf.varRef} * -1)` }; for (const i in n) t.elements.arrow.style.setProperty(i, n[i]); } }, sV = (t) => { if (t.startsWith("top")) return { property: "bottom", value: Qt.arrowOffset.varRef }; if (t.startsWith("bottom")) return { property: "top", value: Qt.arrowOffset.varRef }; if (t.startsWith("left")) return { property: "right", value: Qt.arrowOffset.varRef }; if (t.startsWith("right")) return { property: "left", value: Qt.arrowOffset.varRef }; }, oV = { name: "innerArrow", enabled: !0, phase: "main", requires: ["arrow"], fn: ({ state: t }) => { Nb(t); }, effect: ({ state: t }) => () => { Nb(t); } }, Nb = (t) => { if (!t.elements.arrow) return; const e = t.elements.arrow.querySelector( "[data-popper-arrow-inner]" ); if (!e) return; const r = Zj(t.placement); r && e.style.setProperty("--popper-arrow-default-shadow", r), Object.assign(e.style, { transform: "rotate(45deg)", background: Qt.arrowBg.varRef, top: 0, left: 0, width: "100%", height: "100%", position: "absolute", zIndex: "inherit", boxShadow: "var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))" }); }, uV = { "start-start": { ltr: "left-start", rtl: "right-start" }, "start-end": { ltr: "left-end", rtl: "right-end" }, "end-start": { ltr: "right-start", rtl: "left-start" }, "end-end": { ltr: "right-end", rtl: "left-end" }, start: { ltr: "left", rtl: "right" }, end: { ltr: "right", rtl: "left" } }, lV = { "auto-start": "auto-end", "auto-end": "auto-start", "top-start": "top-end", "top-end": "top-start", "bottom-start": "bottom-end", "bottom-end": "bottom-start" }; function cV(t, e = "ltr") { var r, n; const i = ((r = uV[t]) == null ? void 0 : r[e]) || t; return e === "ltr" ? i : (n = lV[t]) != null ? n : i; } var Vr = "top", Tn = "bottom", An = "right", zr = "left", dh = "auto", ll = [Vr, Tn, An, zr], co = "start", Ju = "end", fV = "clippingParents", nC = "viewport", du = "popper", hV = "reference", Bb = /* @__PURE__ */ ll.reduce(function(t, e) { return t.concat([e + "-" + co, e + "-" + Ju]); }, []), iC = /* @__PURE__ */ [].concat(ll, [dh]).reduce(function(t, e) { return t.concat([e, e + "-" + co, e + "-" + Ju]); }, []), dV = "beforeRead", pV = "read", gV = "afterRead", mV = "beforeMain", vV = "main", yV = "afterMain", bV = "beforeWrite", SV = "write", wV = "afterWrite", Tg = [dV, pV, gV, mV, vV, yV, bV, SV, wV]; function di(t) { return t ? (t.nodeName || "").toLowerCase() : null; } function In(t) { if (t == null) return window; if (t.toString() !== "[object Window]") { var e = t.ownerDocument; return e && e.defaultView || window; } return t; } function Za(t) { var e = In(t).Element; return t instanceof e || t instanceof Element; } function an(t) { var e = In(t).HTMLElement; return t instanceof e || t instanceof HTMLElement; } function Wm(t) { if (typeof ShadowRoot > "u") return !1; var e = In(t).ShadowRoot; return t instanceof e || t instanceof ShadowRoot; } function xV(t) { var e = t.state; Object.keys(e.elements).forEach(function(r) { var n = e.styles[r] || {}, i = e.attributes[r] || {}, a = e.elements[r]; !an(a) || !di(a) || (Object.assign(a.style, n), Object.keys(i).forEach(function(s) { var u = i[s]; u === !1 ? a.removeAttribute(s) : a.setAttribute(s, u === !0 ? "" : u); })); }); } function CV(t) { var e = t.state, r = { popper: { position: e.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} }; return Object.assign(e.elements.popper.style, r.popper), e.styles = r, e.elements.arrow && Object.assign(e.elements.arrow.style, r.arrow), function() { Object.keys(e.elements).forEach(function(n) { var i = e.elements[n], a = e.attributes[n] || {}, s = Object.keys(e.styles.hasOwnProperty(n) ? e.styles[n] : r[n]), u = s.reduce(function(c, f) { return c[f] = "", c; }, {}); !an(i) || !di(i) || (Object.assign(i.style, u), Object.keys(a).forEach(function(c) { i.removeAttribute(c); })); }); }; } const _V = { name: "applyStyles", enabled: !0, phase: "write", fn: xV, effect: CV, requires: ["computeStyles"] }; function Gn(t) { return t.split("-")[0]; } var Xa = Math.max, Nf = Math.min, fo = Math.round; function Ag() { var t = navigator.userAgentData; return t != null && t.brands ? t.brands.map(function(e) { return e.brand + "/" + e.version; }).join(" ") : navigator.userAgent; } function aC() { return !/^((?!chrome|android).)*safari/i.test(Ag()); } function ho(t, e, r) { e === void 0 && (e = !1), r === void 0 && (r = !1); var n = t.getBoundingClientRect(), i = 1, a = 1; e && an(t) && (i = t.offsetWidth > 0 && fo(n.width) / t.offsetWidth || 1, a = t.offsetHeight > 0 && fo(n.height) / t.offsetHeight || 1); var s = Za(t) ? In(t) : window, u = s.visualViewport, c = !aC() && r, f = (n.left + (c && u ? u.offsetLeft : 0)) / i, h = (n.top + (c && u ? u.offsetTop : 0)) / a, d = n.width / i, g = n.height / a; return { width: d, height: g, top: h, right: f + d, bottom: h + g, left: f, x: f, y: h }; } function Um(t) { var e = ho(t), r = t.offsetWidth, n = t.offsetHeight; return Math.abs(e.width - r) <= 1 && (r = e.width), Math.abs(e.height - n) <= 1 && (n = e.height), { x: t.offsetLeft, y: t.offsetTop, width: r, height: n }; } function sC(t, e) { var r = e.getRootNode && e.getRootNode(); if (t.contains(e)) return !0; if (r && Wm(r)) { var n = e; do { if (n && t.isSameNode(n)) return !0; n = n.parentNode || n.host; } while (n); } return !1; } function Un(t) { return In(t).getComputedStyle(t); } function PV(t) { return ["table", "td", "th"].indexOf(di(t)) >= 0; } function _a(t) { return ((Za(t) ? t.ownerDocument : ( // $FlowFixMe[prop-missing] t.document )) || window.document).documentElement; } function ph(t) { return di(t) === "html" ? t : ( // this is a quicker (but less type safe) way to save quite some bytes from the bundle // $FlowFixMe[incompatible-return] // $FlowFixMe[prop-missing] t.assignedSlot || // step into the shadow DOM of the parent of a slotted node t.parentNode || // DOM Element detected (Wm(t) ? t.host : null) || // ShadowRoot detected // $FlowFixMe[incompatible-call]: HTMLElement is a Node _a(t) ); } function Fb(t) { return !an(t) || // https://github.com/popperjs/popper-core/issues/837 Un(t).position === "fixed" ? null : t.offsetParent; } function EV(t) { var e = /firefox/i.test(Ag()), r = /Trident/i.test(Ag()); if (r && an(t)) { var n = Un(t); if (n.position === "fixed") return null; } var i = ph(t); for (Wm(i) && (i = i.host); an(i) && ["html", "body"].indexOf(di(i)) < 0; ) { var a = Un(i); if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || e && a.willChange === "filter" || e && a.filter && a.filter !== "none") return i; i = i.parentNode; } return null; } function cl(t) { for (var e = In(t), r = Fb(t); r && PV(r) && Un(r).position === "static"; ) r = Fb(r); return r && (di(r) === "html" || di(r) === "body" && Un(r).position === "static") ? e : r || EV(t) || e; } function Hm(t) { return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y"; } function Lu(t, e, r) { return Xa(t, Nf(e, r)); } function TV(t, e, r) { var n = Lu(t, e, r); return n > r ? r : n; } function oC() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function uC(t) { return Object.assign({}, oC(), t); } function lC(t, e) { return e.reduce(function(r, n) { return r[n] = t, r; }, {}); } var AV = function(e, r) { return e = typeof e == "function" ? e(Object.assign({}, r.rects, { placement: r.placement })) : e, uC(typeof e != "number" ? e : lC(e, ll)); }; function OV(t) { var e, r = t.state, n = t.name, i = t.options, a = r.elements.arrow, s = r.modifiersData.popperOffsets, u = Gn(r.placement), c = Hm(u), f = [zr, An].indexOf(u) >= 0, h = f ? "height" : "width"; if (!(!a || !s)) { var d = AV(i.padding, r), g = Um(a), v = c === "y" ? Vr : zr, m = c === "y" ? Tn : An, b = r.rects.reference[h] + r.rects.reference[c] - s[c] - r.rects.popper[h], S = s[c] - r.rects.reference[c], x = cl(a), w = x ? c === "y" ? x.clientHeight || 0 : x.clientWidth || 0 : 0, _ = b / 2 - S / 2, P = d[v], E = w - g[h] - d[m], k = w / 2 - g[h] / 2 + _, D = Lu(P, k, E), V = c; r.modifiersData[n] = (e = {}, e[V] = D, e.centerOffset = D - k, e); } } function RV(t) { var e = t.state, r = t.options, n = r.element, i = n === void 0 ? "[data-popper-arrow]" : n; if (i != null && !(typeof i == "string" && (i = e.elements.popper.querySelector(i), !i))) { if (process.env.NODE_ENV !== "production" && (an(i) || console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" "))), !sC(e.elements.popper, i)) { process.env.NODE_ENV !== "production" && console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" ")); return; } e.elements.arrow = i; } } const kV = { name: "arrow", enabled: !0, phase: "main", fn: OV, effect: RV, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function po(t) { return t.split("-")[1]; } var IV = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function DV(t) { var e = t.x, r = t.y, n = window, i = n.devicePixelRatio || 1; return { x: fo(e * i) / i || 0, y: fo(r * i) / i || 0 }; } function jb(t) { var e, r = t.popper, n = t.popperRect, i = t.placement, a = t.variation, s = t.offsets, u = t.position, c = t.gpuAcceleration, f = t.adaptive, h = t.roundOffsets, d = t.isFixed, g = s.x, v = g === void 0 ? 0 : g, m = s.y, b = m === void 0 ? 0 : m, S = typeof h == "function" ? h({ x: v, y: b }) : { x: v, y: b }; v = S.x, b = S.y; var x = s.hasOwnProperty("x"), w = s.hasOwnProperty("y"), _ = zr, P = Vr, E = window; if (f) { var k = cl(r), D = "clientHeight", V = "clientWidth"; if (k === In(r) && (k = _a(r), Un(k).position !== "static" && u === "absolute" && (D = "scrollHeight", V = "scrollWidth")), k = k, i === Vr || (i === zr || i === An) && a === Ju) { P = Tn; var H = d && k === E && E.visualViewport ? E.visualViewport.height : ( // $FlowFixMe[prop-missing] k[D] ); b -= H - n.height, b *= c ? 1 : -1; } if (i === zr || (i === Vr || i === Tn) && a === Ju) { _ = An; var W = d && k === E && E.visualViewport ? E.visualViewport.width : ( // $FlowFixMe[prop-missing] k[V] ); v -= W - n.width, v *= c ? 1 : -1; } } var K = Object.assign({ position: u }, f && IV), ie = h === !0 ? DV({ x: v, y: b }) : { x: v, y: b }; if (v = ie.x, b = ie.y, c) { var F; return Object.assign({}, K, (F = {}, F[P] = w ? "0" : "", F[_] = x ? "0" : "", F.transform = (E.devicePixelRatio || 1) <= 1 ? "translate(" + v + "px, " + b + "px)" : "translate3d(" + v + "px, " + b + "px, 0)", F)); } return Object.assign({}, K, (e = {}, e[P] = w ? b + "px" : "", e[_] = x ? v + "px" : "", e.transform = "", e)); } function MV(t) { var e = t.state, r = t.options, n = r.gpuAcceleration, i = n === void 0 ? !0 : n, a = r.adaptive, s = a === void 0 ? !0 : a, u = r.roundOffsets, c = u === void 0 ? !0 : u; if (process.env.NODE_ENV !== "production") { var f = Un(e.elements.popper).transitionProperty || ""; s && ["transform", "top", "right", "bottom", "left"].some(function(d) { return f.indexOf(d) >= 0; }) && console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', ` `, 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", ` `, "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" ")); } var h = { placement: Gn(e.placement), variation: po(e.placement), popper: e.elements.popper, popperRect: e.rects.popper, gpuAcceleration: i, isFixed: e.options.strategy === "fixed" }; e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, jb(Object.assign({}, h, { offsets: e.modifiersData.popperOffsets, position: e.options.strategy, adaptive: s, roundOffsets: c })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, jb(Object.assign({}, h, { offsets: e.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: c })))), e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-placement": e.placement }); } const LV = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: MV, data: {} }; var Wc = { passive: !0 }; function NV(t) { var e = t.state, r = t.instance, n = t.options, i = n.scroll, a = i === void 0 ? !0 : i, s = n.resize, u = s === void 0 ? !0 : s, c = In(e.elements.popper), f = [].concat(e.scrollParents.reference, e.scrollParents.popper); return a && f.forEach(function(h) { h.addEventListener("scroll", r.update, Wc); }), u && c.addEventListener("resize", r.update, Wc), function() { a && f.forEach(function(h) { h.removeEventListener("scroll", r.update, Wc); }), u && c.removeEventListener("resize", r.update, Wc); }; } const BV = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: NV, data: {} }; var FV = { left: "right", right: "left", bottom: "top", top: "bottom" }; function lf(t) { return t.replace(/left|right|bottom|top/g, function(e) { return FV[e]; }); } var jV = { start: "end", end: "start" }; function Vb(t) { return t.replace(/start|end/g, function(e) { return jV[e]; }); } function Ym(t) { var e = In(t), r = e.pageXOffset, n = e.pageYOffset; return { scrollLeft: r, scrollTop: n }; } function qm(t) { return ho(_a(t)).left + Ym(t).scrollLeft; } function VV(t, e) { var r = In(t), n = _a(t), i = r.visualViewport, a = n.clientWidth, s = n.clientHeight, u = 0, c = 0; if (i) { a = i.width, s = i.height; var f = aC(); (f || !f && e === "fixed") && (u = i.offsetLeft, c = i.offsetTop); } return { width: a, height: s, x: u + qm(t), y: c }; } function zV(t) { var e, r = _a(t), n = Ym(t), i = (e = t.ownerDocument) == null ? void 0 : e.body, a = Xa(r.scrollWidth, r.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), s = Xa(r.scrollHeight, r.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), u = -n.scrollLeft + qm(t), c = -n.scrollTop; return Un(i || r).direction === "rtl" && (u += Xa(r.clientWidth, i ? i.clientWidth : 0) - a), { width: a, height: s, x: u, y: c }; } function Km(t) { var e = Un(t), r = e.overflow, n = e.overflowX, i = e.overflowY; return /auto|scroll|overlay|hidden/.test(r + i + n); } function cC(t) { return ["html", "body", "#document"].indexOf(di(t)) >= 0 ? t.ownerDocument.body : an(t) && Km(t) ? t : cC(ph(t)); } function Nu(t, e) { var r; e === void 0 && (e = []); var n = cC(t), i = n === ((r = t.ownerDocument) == null ? void 0 : r.body), a = In(n), s = i ? [a].concat(a.visualViewport || [], Km(n) ? n : []) : n, u = e.concat(s); return i ? u : ( // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here u.concat(Nu(ph(s))) ); } function Og(t) { return Object.assign({}, t, { left: t.x, top: t.y, right: t.x + t.width, bottom: t.y + t.height }); } function GV(t, e) { var r = ho(t, !1, e === "fixed"); return r.top = r.top + t.clientTop, r.left = r.left + t.clientLeft, r.bottom = r.top + t.clientHeight, r.right = r.left + t.clientWidth, r.width = t.clientWidth, r.height = t.clientHeight, r.x = r.left, r.y = r.top, r; } function zb(t, e, r) { return e === nC ? Og(VV(t, r)) : Za(e) ? GV(e, r) : Og(zV(_a(t))); } function WV(t) { var e = Nu(ph(t)), r = ["absolute", "fixed"].indexOf(Un(t).position) >= 0, n = r && an(t) ? cl(t) : t; return Za(n) ? e.filter(function(i) { return Za(i) && sC(i, n) && di(i) !== "body"; }) : []; } function UV(t, e, r, n) { var i = e === "clippingParents" ? WV(t) : [].concat(e), a = [].concat(i, [r]), s = a[0], u = a.reduce(function(c, f) { var h = zb(t, f, n); return c.top = Xa(h.top, c.top), c.right = Nf(h.right, c.right), c.bottom = Nf(h.bottom, c.bottom), c.left = Xa(h.left, c.left), c; }, zb(t, s, n)); return u.width = u.right - u.left, u.height = u.bottom - u.top, u.x = u.left, u.y = u.top, u; } function fC(t) { var e = t.reference, r = t.element, n = t.placement, i = n ? Gn(n) : null, a = n ? po(n) : null, s = e.x + e.width / 2 - r.width / 2, u = e.y + e.height / 2 - r.height / 2, c; switch (i) { case Vr: c = { x: s, y: e.y - r.height }; break; case Tn: c = { x: s, y: e.y + e.height }; break; case An: c = { x: e.x + e.width, y: u }; break; case zr: c = { x: e.x - r.width, y: u }; break; default: c = { x: e.x, y: e.y }; } var f = i ? Hm(i) : null; if (f != null) { var h = f === "y" ? "height" : "width"; switch (a) { case co: c[f] = c[f] - (e[h] / 2 - r[h] / 2); break; case Ju: c[f] = c[f] + (e[h] / 2 - r[h] / 2); break; } } return c; } function Zu(t, e) { e === void 0 && (e = {}); var r = e, n = r.placement, i = n === void 0 ? t.placement : n, a = r.strategy, s = a === void 0 ? t.strategy : a, u = r.boundary, c = u === void 0 ? fV : u, f = r.rootBoundary, h = f === void 0 ? nC : f, d = r.elementContext, g = d === void 0 ? du : d, v = r.altBoundary, m = v === void 0 ? !1 : v, b = r.padding, S = b === void 0 ? 0 : b, x = uC(typeof S != "number" ? S : lC(S, ll)), w = g === du ? hV : du, _ = t.rects.popper, P = t.elements[m ? w : g], E = UV(Za(P) ? P : P.contextElement || _a(t.elements.popper), c, h, s), k = ho(t.elements.reference), D = fC({ reference: k, element: _, strategy: "absolute", placement: i }), V = Og(Object.assign({}, _, D)), H = g === du ? V : k, W = { top: E.top - H.top + x.top, bottom: H.bottom - E.bottom + x.bottom, left: E.left - H.left + x.left, right: H.right - E.right + x.right }, K = t.modifiersData.offset; if (g === du && K) { var ie = K[i]; Object.keys(W).forEach(function(F) { var O = [An, Tn].indexOf(F) >= 0 ? 1 : -1, N = [Vr, Tn].indexOf(F) >= 0 ? "y" : "x"; W[F] += ie[N] * O; }); } return W; } function HV(t, e) { e === void 0 && (e = {}); var r = e, n = r.placement, i = r.boundary, a = r.rootBoundary, s = r.padding, u = r.flipVariations, c = r.allowedAutoPlacements, f = c === void 0 ? iC : c, h = po(n), d = h ? u ? Bb : Bb.filter(function(m) { return po(m) === h; }) : ll, g = d.filter(function(m) { return f.indexOf(m) >= 0; }); g.length === 0 && (g = d, process.env.NODE_ENV !== "production" && console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" "))); var v = g.reduce(function(m, b) { return m[b] = Zu(t, { placement: b, boundary: i, rootBoundary: a, padding: s })[Gn(b)], m; }, {}); return Object.keys(v).sort(function(m, b) { return v[m] - v[b]; }); } function YV(t) { if (Gn(t) === dh) return []; var e = lf(t); return [Vb(t), e, Vb(e)]; } function qV(t) { var e = t.state, r = t.options, n = t.name; if (!e.modifiersData[n]._skip) { for (var i = r.mainAxis, a = i === void 0 ? !0 : i, s = r.altAxis, u = s === void 0 ? !0 : s, c = r.fallbackPlacements, f = r.padding, h = r.boundary, d = r.rootBoundary, g = r.altBoundary, v = r.flipVariations, m = v === void 0 ? !0 : v, b = r.allowedAutoPlacements, S = e.options.placement, x = Gn(S), w = x === S, _ = c || (w || !m ? [lf(S)] : YV(S)), P = [S].concat(_).reduce(function(Re, ke) { return Re.concat(Gn(ke) === dh ? HV(e, { placement: ke, boundary: h, rootBoundary: d, padding: f, flipVariations: m, allowedAutoPlacements: b }) : ke); }, []), E = e.rects.reference, k = e.rects.popper, D = /* @__PURE__ */ new Map(), V = !0, H = P[0], W = 0; W < P.length; W++) { var K = P[W], ie = Gn(K), F = po(K) === co, O = [Vr, Tn].indexOf(ie) >= 0, N = O ? "width" : "height", j = Zu(e, { placement: K, boundary: h, rootBoundary: d, altBoundary: g, padding: f }), J = O ? F ? An : zr : F ? Tn : Vr; E[N] > k[N] && (J = lf(J)); var te = lf(J), ee = []; if (a && ee.push(j[ie] <= 0), u && ee.push(j[J] <= 0, j[te] <= 0), ee.every(function(Re) { return Re; })) { H = K, V = !1; break; } D.set(K, ee); } if (V) for (var ae = m ? 3 : 1, le = function(ke) { var ve = P.find(function(ot) { var Fe = D.get(ot); if (Fe) return Fe.slice(0, ke).every(function(qe) { return qe; }); }); if (ve) return H = ve, "break"; }, Ce = ae; Ce > 0; Ce--) { var we = le(Ce); if (we === "break") break; } e.placement !== H && (e.modifiersData[n]._skip = !0, e.placement = H, e.reset = !0); } } const KV = { name: "flip", enabled: !0, phase: "main", fn: qV, requiresIfExists: ["offset"], data: { _skip: !1 } }; function Gb(t, e, r) { return r === void 0 && (r = { x: 0, y: 0 }), { top: t.top - e.height - r.y, right: t.right - e.width + r.x, bottom: t.bottom - e.height + r.y, left: t.left - e.width - r.x }; } function Wb(t) { return [Vr, An, Tn, zr].some(function(e) { return t[e] >= 0; }); } function XV(t) { var e = t.state, r = t.name, n = e.rects.reference, i = e.rects.popper, a = e.modifiersData.preventOverflow, s = Zu(e, { elementContext: "reference" }), u = Zu(e, { altBoundary: !0 }), c = Gb(s, n), f = Gb(u, i, a), h = Wb(c), d = Wb(f); e.modifiersData[r] = { referenceClippingOffsets: c, popperEscapeOffsets: f, isReferenceHidden: h, hasPopperEscaped: d }, e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-reference-hidden": h, "data-popper-escaped": d }); } const QV = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: XV }; function JV(t, e, r) { var n = Gn(t), i = [zr, Vr].indexOf(n) >= 0 ? -1 : 1, a = typeof r == "function" ? r(Object.assign({}, e, { placement: t })) : r, s = a[0], u = a[1]; return s = s || 0, u = (u || 0) * i, [zr, An].indexOf(n) >= 0 ? { x: u, y: s } : { x: s, y: u }; } function ZV(t) { var e = t.state, r = t.options, n = t.name, i = r.offset, a = i === void 0 ? [0, 0] : i, s = iC.reduce(function(h, d) { return h[d] = JV(d, e.rects, a), h; }, {}), u = s[e.placement], c = u.x, f = u.y; e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += c, e.modifiersData.popperOffsets.y += f), e.modifiersData[n] = s; } const $V = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: ZV }; function ez(t) { var e = t.state, r = t.name; e.modifiersData[r] = fC({ reference: e.rects.reference, element: e.rects.popper, strategy: "absolute", placement: e.placement }); } const tz = { name: "popperOffsets", enabled: !0, phase: "read", fn: ez, data: {} }; function rz(t) { return t === "x" ? "y" : "x"; } function nz(t) { var e = t.state, r = t.options, n = t.name, i = r.mainAxis, a = i === void 0 ? !0 : i, s = r.altAxis, u = s === void 0 ? !1 : s, c = r.boundary, f = r.rootBoundary, h = r.altBoundary, d = r.padding, g = r.tether, v = g === void 0 ? !0 : g, m = r.tetherOffset, b = m === void 0 ? 0 : m, S = Zu(e, { boundary: c, rootBoundary: f, padding: d, altBoundary: h }), x = Gn(e.placement), w = po(e.placement), _ = !w, P = Hm(x), E = rz(P), k = e.modifiersData.popperOffsets, D = e.rects.reference, V = e.rects.popper, H = typeof b == "function" ? b(Object.assign({}, e.rects, { placement: e.placement })) : b, W = typeof H == "number" ? { mainAxis: H, altAxis: H } : Object.assign({ mainAxis: 0, altAxis: 0 }, H), K = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, ie = { x: 0, y: 0 }; if (k) { if (a) { var F, O = P === "y" ? Vr : zr, N = P === "y" ? Tn : An, j = P === "y" ? "height" : "width", J = k[P], te = J + S[O], ee = J - S[N], ae = v ? -V[j] / 2 : 0, le = w === co ? D[j] : V[j], Ce = w === co ? -V[j] : -D[j], we = e.elements.arrow, Re = v && we ? Um(we) : { width: 0, height: 0 }, ke = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : oC(), ve = ke[O], ot = ke[N], Fe = Lu(0, D[j], Re[j]), qe = _ ? D[j] / 2 - ae - Fe - ve - W.mainAxis : le - Fe - ve - W.mainAxis, St = _ ? -D[j] / 2 + ae + Fe + ot + W.mainAxis : Ce + Fe + ot + W.mainAxis, et = e.elements.arrow && cl(e.elements.arrow), Z = et ? P === "y" ? et.clientTop || 0 : et.clientLeft || 0 : 0, mt = (F = K == null ? void 0 : K[P]) != null ? F : 0, fe = J + qe - mt - Z, xe = J + St - mt, ut = Lu(v ? Nf(te, fe) : te, J, v ? Xa(ee, xe) : ee); k[P] = ut, ie[P] = ut - J; } if (u) { var je, jt = P === "x" ? Vr : zr, cr = P === "x" ? Tn : An, Et = k[E], Tt = E === "y" ? "height" : "width", Ut = Et + S[jt], At = Et - S[cr], Hr = [Vr, zr].indexOf(x) !== -1, vr = (je = K == null ? void 0 : K[E]) != null ? je : 0, un = Hr ? Ut : Et - D[Tt] - V[Tt] - vr + W.altAxis, $t = Hr ? Et + D[Tt] + V[Tt] - vr - W.altAxis : At, yr = v && Hr ? TV(un, Et, $t) : Lu(v ? un : Ut, Et, v ? $t : At); k[E] = yr, ie[E] = yr - Et; } e.modifiersData[n] = ie; } } const iz = { name: "preventOverflow", enabled: !0, phase: "main", fn: nz, requiresIfExists: ["offset"] }; function az(t) { return { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop }; } function sz(t) { return t === In(t) || !an(t) ? Ym(t) : az(t); } function oz(t) { var e = t.getBoundingClientRect(), r = fo(e.width) / t.offsetWidth || 1, n = fo(e.height) / t.offsetHeight || 1; return r !== 1 || n !== 1; } function uz(t, e, r) { r === void 0 && (r = !1); var n = an(e), i = an(e) && oz(e), a = _a(e), s = ho(t, i, r), u = { scrollLeft: 0, scrollTop: 0 }, c = { x: 0, y: 0 }; return (n || !n && !r) && ((di(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078 Km(a)) && (u = sz(e)), an(e) ? (c = ho(e, !0), c.x += e.clientLeft, c.y += e.clientTop) : a && (c.x = qm(a))), { x: s.left + u.scrollLeft - c.x, y: s.top + u.scrollTop - c.y, width: s.width, height: s.height }; } function lz(t) { var e = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = []; t.forEach(function(a) { e.set(a.name, a); }); function i(a) { r.add(a.name); var s = [].concat(a.requires || [], a.requiresIfExists || []); s.forEach(function(u) { if (!r.has(u)) { var c = e.get(u); c && i(c); } }), n.push(a); } return t.forEach(function(a) { r.has(a.name) || i(a); }), n; } function cz(t) { var e = lz(t); return Tg.reduce(function(r, n) { return r.concat(e.filter(function(i) { return i.phase === n; })); }, []); } function fz(t) { var e; return function() { return e || (e = new Promise(function(r) { Promise.resolve().then(function() { e = void 0, r(t()); }); })), e; }; } function ra(t) { for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++) r[n - 1] = arguments[n]; return [].concat(r).reduce(function(i, a) { return i.replace(/%s/, a); }, t); } var Ga = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s', hz = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available', Ub = ["name", "enabled", "phase", "fn", "effect", "requires", "options"]; function dz(t) { t.forEach(function(e) { [].concat(Object.keys(e), Ub).filter(function(r, n, i) { return i.indexOf(r) === n; }).forEach(function(r) { switch (r) { case "name": typeof e.name != "string" && console.error(ra(Ga, String(e.name), '"name"', '"string"', '"' + String(e.name) + '"')); break; case "enabled": typeof e.enabled != "boolean" && console.error(ra(Ga, e.name, '"enabled"', '"boolean"', '"' + String(e.enabled) + '"')); break; case "phase": Tg.indexOf(e.phase) < 0 && console.error(ra(Ga, e.name, '"phase"', "either " + Tg.join(", "), '"' + String(e.phase) + '"')); break; case "fn": typeof e.fn != "function" && console.error(ra(Ga, e.name, '"fn"', '"function"', '"' + String(e.fn) + '"')); break; case "effect": e.effect != null && typeof e.effect != "function" && console.error(ra(Ga, e.name, '"effect"', '"function"', '"' + String(e.fn) + '"')); break; case "requires": e.requires != null && !Array.isArray(e.requires) && console.error(ra(Ga, e.name, '"requires"', '"array"', '"' + String(e.requires) + '"')); break; case "requiresIfExists": Array.isArray(e.requiresIfExists) || console.error(ra(Ga, e.name, '"requiresIfExists"', '"array"', '"' + String(e.requiresIfExists) + '"')); break; case "options": case "data": break; default: console.error('PopperJS: an invalid property has been provided to the "' + e.name + '" modifier, valid properties are ' + Ub.map(function(n) { return '"' + n + '"'; }).join(", ") + '; but "' + r + '" was provided.'); } e.requires && e.requires.forEach(function(n) { t.find(function(i) { return i.name === n; }) == null && console.error(ra(hz, String(e.name), n, n)); }); }); }); } function pz(t, e) { var r = /* @__PURE__ */ new Set(); return t.filter(function(n) { var i = e(n); if (!r.has(i)) return r.add(i), !0; }); } function gz(t) { var e = t.reduce(function(r, n) { var i = r[n.name]; return r[n.name] = i ? Object.assign({}, i, n, { options: Object.assign({}, i.options, n.options), data: Object.assign({}, i.data, n.data) }) : n, r; }, {}); return Object.keys(e).map(function(r) { return e[r]; }); } var Hb = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.", mz = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.", Yb = { placement: "bottom", modifiers: [], strategy: "absolute" }; function qb() { for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++) e[r] = arguments[r]; return !e.some(function(n) { return !(n && typeof n.getBoundingClientRect == "function"); }); } function vz(t) { t === void 0 && (t = {}); var e = t, r = e.defaultModifiers, n = r === void 0 ? [] : r, i = e.defaultOptions, a = i === void 0 ? Yb : i; return function(u, c, f) { f === void 0 && (f = a); var h = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, Yb, a), modifiersData: {}, elements: { reference: u, popper: c }, attributes: {}, styles: {} }, d = [], g = !1, v = { state: h, setOptions: function(x) { var w = typeof x == "function" ? x(h.options) : x; b(), h.options = Object.assign({}, a, h.options, w), h.scrollParents = { reference: Za(u) ? Nu(u) : u.contextElement ? Nu(u.contextElement) : [], popper: Nu(c) }; var _ = cz(gz([].concat(n, h.options.modifiers))); if (h.orderedModifiers = _.filter(function(K) { return K.enabled; }), process.env.NODE_ENV !== "production") { var P = pz([].concat(_, h.options.modifiers), function(K) { var ie = K.name; return ie; }); if (dz(P), Gn(h.options.placement) === dh) { var E = h.orderedModifiers.find(function(K) { var ie = K.name; return ie === "flip"; }); E || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" ")); } var k = Un(c), D = k.marginTop, V = k.marginRight, H = k.marginBottom, W = k.marginLeft; [D, V, H, W].some(function(K) { return parseFloat(K); }) && console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" ")); } return m(), v.update(); }, // Sync update – it will always be executed, even if not necessary. This // is useful for low frequency updates where sync behavior simplifies the // logic. // For high frequency updates (e.g. `resize` and `scroll` events), always // prefer the async Popper#update method forceUpdate: function() { if (!g) { var x = h.elements, w = x.reference, _ = x.popper; if (!qb(w, _)) { process.env.NODE_ENV !== "production" && console.error(Hb); return; } h.rects = { reference: uz(w, cl(_), h.options.strategy === "fixed"), popper: Um(_) }, h.reset = !1, h.placement = h.options.placement, h.orderedModifiers.forEach(function(K) { return h.modifiersData[K.name] = Object.assign({}, K.data); }); for (var P = 0, E = 0; E < h.orderedModifiers.length; E++) { if (process.env.NODE_ENV !== "production" && (P += 1, P > 100)) { console.error(mz); break; } if (h.reset === !0) { h.reset = !1, E = -1; continue; } var k = h.orderedModifiers[E], D = k.fn, V = k.options, H = V === void 0 ? {} : V, W = k.name; typeof D == "function" && (h = D({ state: h, options: H, name: W, instance: v }) || h); } } }, // Async and optimistically optimized update – it will not be executed if // not necessary (debounced to run at most once-per-tick) update: fz(function() { return new Promise(function(S) { v.forceUpdate(), S(h); }); }), destroy: function() { b(), g = !0; } }; if (!qb(u, c)) return process.env.NODE_ENV !== "production" && console.error(Hb), v; v.setOptions(f).then(function(S) { !g && f.onFirstUpdate && f.onFirstUpdate(S); }); function m() { h.orderedModifiers.forEach(function(S) { var x = S.name, w = S.options, _ = w === void 0 ? {} : w, P = S.effect; if (typeof P == "function") { var E = P({ state: h, name: x, instance: v, options: _ }), k = function() { }; d.push(E || k); } }); } function b() { d.forEach(function(S) { return S(); }), d = []; } return v; }; } var yz = [BV, tz, LV, _V, $V, KV, iz, kV, QV], bz = /* @__PURE__ */ vz({ defaultModifiers: yz }); function hC(t = {}) { const { enabled: e = !0, modifiers: r, placement: n = "bottom", strategy: i = "absolute", arrowPadding: a = 8, eventListeners: s = !0, offset: u, gutter: c = 8, flip: f = !0, boundary: h = "clippingParents", preventOverflow: d = !0, matchWidth: g, direction: v = "ltr" } = t, m = $e(null), b = $e(null), S = $e(null), x = cV(n, v), w = $e(() => { }), _ = Ze(() => { var W; !e || !m.current || !b.current || ((W = w.current) == null || W.call(w), S.current = bz(m.current, b.current, { placement: x, modifiers: [ oV, iV, nV, { ...rV, enabled: !!g }, { name: "eventListeners", ...tV(s) }, { name: "arrow", options: { padding: a } }, { name: "offset", options: { offset: u ?? [0, c] } }, { name: "flip", enabled: !!f, options: { padding: 8 } }, { name: "preventOverflow", enabled: !!d, options: { boundary: h } }, ...r ?? [] ], strategy: i }), S.current.forceUpdate(), w.current = S.current.destroy); }, [ x, e, r, g, s, a, u, c, f, d, h, i ]); Wt(() => () => { var W; !m.current && !b.current && ((W = S.current) == null || W.destroy(), S.current = null); }, []); const P = Ze( (W) => { m.current = W, _(); }, [_] ), E = Ze( (W = {}, K = null) => ({ ...W, ref: Di(P, K) }), [P] ), k = Ze( (W) => { b.current = W, _(); }, [_] ), D = Ze( (W = {}, K = null) => ({ ...W, ref: Di(k, K), style: { ...W.style, position: i, minWidth: g ? void 0 : "max-content", inset: "0 auto auto 0" } }), [i, k, g] ), V = Ze((W = {}, K = null) => { const { size: ie, shadowColor: F, bg: O, style: N, ...j } = W; return { ...j, ref: K, "data-popper-arrow": "", style: Sz(W) }; }, []), H = Ze( (W = {}, K = null) => ({ ...W, ref: K, "data-popper-arrow-inner": "" }), [] ); return { update() { var W; (W = S.current) == null || W.update(); }, forceUpdate() { var W; (W = S.current) == null || W.forceUpdate(); }, transformOrigin: Qt.transformOrigin.varRef, referenceRef: P, popperRef: k, getPopperProps: D, getArrowProps: V, getArrowInnerProps: H, getReferenceProps: E }; } function Sz(t) { const { size: e, shadowColor: r, bg: n, style: i } = t, a = { ...i, position: "absolute" }; return e && (a["--popper-arrow-size"] = e), r && (a["--popper-arrow-shadow-color"] = r), n && (a["--popper-arrow-bg"] = n), a; } function dC(t = {}) { const { onClose: e, onOpen: r, isOpen: n, id: i } = t, a = ig(r), s = ig(e), [u, c] = En(t.defaultIsOpen || !1), f = n !== void 0 ? n : u, h = n !== void 0, d = go(), g = i ?? `disclosure-${d}`, v = Ze(() => { h || c(!1), s == null || s(); }, [h, s]), m = Ze(() => { h || c(!0), a == null || a(); }, [h, a]), b = Ze(() => { f ? v() : m(); }, [f, m, v]); function S(w = {}) { return { ...w, "aria-expanded": f, "aria-controls": g, onClick(_) { var P; (P = w.onClick) == null || P.call(w, _), b(); } }; } function x(w = {}) { return { ...w, hidden: !f, id: g }; } return { isOpen: f, onOpen: m, onClose: v, onToggle: b, isControlled: h, getButtonProps: S, getDisclosureProps: x }; } function wz(t) { const { isOpen: e, ref: r } = t, [n, i] = En(e), [a, s] = En(!1); return Wt(() => { a || (i(e), s(!0)); }, [e, a, n]), no( () => r.current, "animationend", () => { i(e); } ), { present: !(e ? !1 : !n), onComplete() { var c; const f = Lj(r.current), h = new f.CustomEvent("animationend", { bubbles: !0 }); (c = r.current) == null || c.dispatchEvent(h); } }; } function xz(t) { const { wasSelected: e, enabled: r, isSelected: n, mode: i = "unmount" } = t; return !!(!r || n || i === "keepMounted" && e); } var [Cz, gh] = rl({ name: "PopoverContext", errorMessage: "usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``" }), [_z, pC] = rl({ name: "PopoverStylesContext", errorMessage: `usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" ` }); function gC(t) { const e = Vf.only(t.children), { getTriggerProps: r } = gh(); return mo(e, r(e.props, e.ref)); } gC.displayName = "PopoverTrigger"; var Hs = { click: "click", hover: "hover" }; function Pz(t = {}) { const { closeOnBlur: e = !0, closeOnEsc: r = !0, initialFocusRef: n, id: i, returnFocusOnClose: a = !0, autoFocus: s = !0, arrowSize: u, arrowShadowColor: c, trigger: f = Hs.click, openDelay: h = 200, closeDelay: d = 200, isLazy: g, lazyBehavior: v = "unmount", computePositionOnMount: m, ...b } = t, { isOpen: S, onClose: x, onOpen: w, onToggle: _ } = dC(t), P = $e(null), E = $e(null), k = $e(null), D = $e(!1), V = $e(!1); S && (V.current = !0); const [H, W] = En(!1), [K, ie] = En(!1), F = go(), O = i ?? F, [N, j, J, te] = [ "popover-trigger", "popover-content", "popover-header", "popover-body" ].map((xe) => `${xe}-${O}`), { referenceRef: ee, getArrowProps: ae, getPopperProps: le, getArrowInnerProps: Ce, forceUpdate: we } = hC({ ...b, enabled: S || !!m }), Re = wz({ isOpen: S, ref: k }); Mj({ enabled: S, ref: E }), Kj(k, { focusRef: E, visible: S, shouldFocus: a && f === Hs.click }), Qj(k, { focusRef: n, visible: S, shouldFocus: s && f === Hs.click }); const ke = xz({ wasSelected: V.current, enabled: g, mode: v, isSelected: Re.present }), ve = Ze( (xe = {}, ut = null) => { const je = { ...xe, style: { ...xe.style, transformOrigin: Qt.transformOrigin.varRef, [Qt.arrowSize.var]: u ? `${u}px` : void 0, [Qt.arrowShadowColor.var]: c }, ref: Di(k, ut), children: ke ? xe.children : null, id: j, tabIndex: -1, role: "dialog", onKeyDown: kr(xe.onKeyDown, (jt) => { r && jt.key === "Escape" && x(); }), onBlur: kr(xe.onBlur, (jt) => { const cr = Kb(jt), Et = vp(k.current, cr), Tt = vp(E.current, cr); S && e && (!Et && !Tt) && x(); }), "aria-labelledby": H ? J : void 0, "aria-describedby": K ? te : void 0 }; return f === Hs.hover && (je.role = "tooltip", je.onMouseEnter = kr(xe.onMouseEnter, () => { D.current = !0; }), je.onMouseLeave = kr( xe.onMouseLeave, (jt) => { jt.nativeEvent.relatedTarget !== null && (D.current = !1, setTimeout(() => x(), d)); } )), je; }, [ ke, j, H, J, K, te, f, r, x, S, e, d, c, u ] ), ot = Ze( (xe = {}, ut = null) => le( { ...xe, style: { visibility: S ? "visible" : "hidden", ...xe.style } }, ut ), [S, le] ), Fe = Ze( (xe, ut = null) => ({ ...xe, ref: Di(ut, P, ee) }), [P, ee] ), qe = $e(), St = $e(), et = Ze( (xe) => { P.current == null && ee(xe); }, [ee] ), Z = Ze( (xe = {}, ut = null) => { const je = { ...xe, ref: Di(E, ut, et), id: N, "aria-haspopup": "dialog", "aria-expanded": S, "aria-controls": j }; return f === Hs.click && (je.onClick = kr(xe.onClick, _)), f === Hs.hover && (je.onFocus = kr(xe.onFocus, () => { qe.current === void 0 && w(); }), je.onBlur = kr(xe.onBlur, (jt) => { const cr = Kb(jt), Et = !vp(k.current, cr); S && e && Et && x(); }), je.onKeyDown = kr(xe.onKeyDown, (jt) => { jt.key === "Escape" && x(); }), je.onMouseEnter = kr(xe.onMouseEnter, () => { D.current = !0, qe.current = window.setTimeout(() => w(), h); }), je.onMouseLeave = kr(xe.onMouseLeave, () => { D.current = !1, qe.current && (clearTimeout(qe.current), qe.current = void 0), St.current = window.setTimeout(() => { D.current === !1 && x(); }, d); })), je; }, [ N, S, j, f, et, _, w, e, x, h, d ] ); Wt(() => () => { qe.current && clearTimeout(qe.current), St.current && clearTimeout(St.current); }, []); const mt = Ze( (xe = {}, ut = null) => ({ ...xe, id: J, ref: Di(ut, (je) => { W(!!je); }) }), [J] ), fe = Ze( (xe = {}, ut = null) => ({ ...xe, id: te, ref: Di(ut, (je) => { ie(!!je); }) }), [te] ); return { forceUpdate: we, isOpen: S, onAnimationComplete: Re.onComplete, onClose: x, getAnchorProps: Fe, getArrowProps: ae, getArrowInnerProps: Ce, getPopoverPositionerProps: ot, getPopoverProps: ve, getTriggerProps: Z, getHeaderProps: mt, getBodyProps: fe }; } function vp(t, e) { return t === e || (t == null ? void 0 : t.contains(e)); } function Kb(t) { var e; const r = t.currentTarget.ownerDocument.activeElement; return (e = t.relatedTarget) != null ? e : r; } function mC(t) { const e = j8("Popover", t), { children: r, ...n } = nl(t), i = th(), a = Pz({ ...n, direction: i.direction }); return /* @__PURE__ */ he.jsx(Cz, { value: a, children: /* @__PURE__ */ he.jsx(_z, { value: e, children: la(r, { isOpen: a.isOpen, onClose: a.onClose, forceUpdate: a.forceUpdate }) }) }); } mC.displayName = "Popover"; function vC(t) { var e; const { bg: r, bgColor: n, backgroundColor: i, shadow: a, boxShadow: s } = t, { getArrowProps: u, getArrowInnerProps: c } = gh(), f = pC(), h = (e = r ?? n) != null ? e : i, d = a ?? s; return /* @__PURE__ */ he.jsx( Gt.div, { ...u(), className: "chakra-popover__arrow-positioner", children: /* @__PURE__ */ he.jsx( Gt.div, { className: xa("chakra-popover__arrow", t.className), ...c(t), __css: { "--popper-arrow-bg": h ? `colors.${h}, ${h}` : void 0, "--popper-arrow-shadow": d ? `shadows.${d}, ${d}` : void 0, ...f.arrow } } ) } ); } vC.displayName = "PopoverArrow"; function Ez(t) { if (t) return { enter: { ...t.enter, visibility: "visible" }, exit: { ...t.exit, transitionEnd: { visibility: "hidden" } } }; } var Tz = { exit: { opacity: 0, scale: 0.95, transition: { duration: 0.1, ease: [0.4, 0, 1, 1] } }, enter: { scale: 1, opacity: 1, transition: { duration: 0.15, ease: [0, 0, 0.2, 1] } } }, Az = Gt(G3.section), yC = Ur(function(e, r) { const { variants: n = Tz, ...i } = e, { isOpen: a } = gh(); return /* @__PURE__ */ he.jsx( Az, { ref: r, variants: Ez(n), initial: !1, animate: a ? "enter" : "exit", ...i } ); }); yC.displayName = "PopoverTransition"; var bC = Ur( function(e, r) { const { rootProps: n, motionProps: i, ...a } = e, { getPopoverProps: s, getPopoverPositionerProps: u, onAnimationComplete: c } = gh(), f = pC(), h = { position: "relative", display: "flex", flexDirection: "column", ...f.content }; return /* @__PURE__ */ he.jsx( Gt.div, { ...u(n), __css: f.popper, className: "chakra-popover__popper", children: /* @__PURE__ */ he.jsx( yC, { ...i, ...s(a, r), onAnimationComplete: f9( c, a.onAnimationComplete ), className: xa("chakra-popover__content", e.className), __css: h } ) } ); } ); bC.displayName = "PopoverContent"; var Oz = { exit: { scale: 0.85, opacity: 0, transition: { opacity: { duration: 0.15, easings: "easeInOut" }, scale: { duration: 0.2, easings: "easeInOut" } } }, enter: { scale: 1, opacity: 1, transition: { opacity: { easings: "easeOut", duration: 0.2 }, scale: { duration: 0.2, ease: [0.175, 0.885, 0.4, 1.1] } } } }, Bf = (t) => { var e; return ((e = t.current) == null ? void 0 : e.ownerDocument) || document; }, Rg = (t) => { var e, r; return ((r = (e = t.current) == null ? void 0 : e.ownerDocument) == null ? void 0 : r.defaultView) || window; }; function Rz(t = {}) { const { openDelay: e = 0, closeDelay: r = 0, closeOnClick: n = !0, closeOnMouseDown: i, closeOnScroll: a, closeOnPointerDown: s = i, closeOnEsc: u = !0, onOpen: c, onClose: f, placement: h, id: d, isOpen: g, defaultIsOpen: v, arrowSize: m = 10, arrowShadowColor: b, arrowPadding: S, modifiers: x, isDisabled: w, gutter: _, offset: P, direction: E, ...k } = t, { isOpen: D, onOpen: V, onClose: H } = dC({ isOpen: g, defaultIsOpen: v, onOpen: c, onClose: f }), { referenceRef: W, getPopperProps: K, getArrowInnerProps: ie, getArrowProps: F } = hC({ enabled: D, placement: h, arrowPadding: S, modifiers: x, gutter: _, offset: P, direction: E }), O = go(), j = `tooltip-${d ?? O}`, J = $e(null), te = $e(), ee = Ze(() => { te.current && (clearTimeout(te.current), te.current = void 0); }, []), ae = $e(), le = Ze(() => { ae.current && (clearTimeout(ae.current), ae.current = void 0); }, []), Ce = Ze(() => { le(), H(); }, [H, le]), we = kz(J, Ce), Re = Ze(() => { if (!w && !te.current) { we(); const Z = Rg(J); te.current = Z.setTimeout(V, e); } }, [we, w, V, e]), ke = Ze(() => { ee(); const Z = Rg(J); ae.current = Z.setTimeout(Ce, r); }, [r, Ce, ee]), ve = Ze(() => { D && n && ke(); }, [n, ke, D]), ot = Ze(() => { D && s && ke(); }, [s, ke, D]), Fe = Ze( (Z) => { D && Z.key === "Escape" && ke(); }, [D, ke] ); no( () => Bf(J), "keydown", u ? Fe : void 0 ), no( () => Bf(J), "scroll", () => { D && a && Ce(); } ), Wt(() => { w && (ee(), D && H()); }, [w, D, H, ee]), Wt( () => () => { ee(), le(); }, [ee, le] ), no(() => J.current, "pointerleave", ke); const qe = Ze( (Z = {}, mt = null) => ({ ...Z, ref: Di(J, mt, W), onPointerEnter: kr(Z.onPointerEnter, (xe) => { xe.pointerType !== "touch" && Re(); }), onClick: kr(Z.onClick, ve), onPointerDown: kr(Z.onPointerDown, ot), onFocus: kr(Z.onFocus, Re), onBlur: kr(Z.onBlur, ke), "aria-describedby": D ? j : void 0 }), [ Re, ke, ot, D, j, ve, W ] ), St = Ze( (Z = {}, mt = null) => K( { ...Z, style: { ...Z.style, [Qt.arrowSize.var]: m ? `${m}px` : void 0, [Qt.arrowShadowColor.var]: b } }, mt ), [K, m, b] ), et = Ze( (Z = {}, mt = null) => { const fe = { ...Z.style, position: "relative", transformOrigin: Qt.transformOrigin.varRef }; return { ref: mt, ...k, ...Z, id: j, role: "tooltip", style: fe }; }, [k, j] ); return { isOpen: D, show: Re, hide: ke, getTriggerProps: qe, getTooltipProps: et, getTooltipPositionerProps: St, getArrowProps: F, getArrowInnerProps: ie }; } var yp = "chakra-ui:close-tooltip"; function kz(t, e) { return Wt(() => { const r = Bf(t); return r.addEventListener(yp, e), () => r.removeEventListener(yp, e); }, [e, t]), () => { const r = Bf(t), n = Rg(t); r.dispatchEvent(new n.CustomEvent(yp)); }; } function Iz(t, e = []) { const r = Object.assign({}, t); for (const n of e) n in r && delete r[n]; return r; } function Dz(t, e) { const r = {}; for (const n of e) n in t && (r[n] = t[n]); return r; } var Mz = Gt(G3.div), Xm = Ur((t, e) => { var r, n; const i = ih("Tooltip", t), a = nl(t), s = th(), { children: u, label: c, shouldWrapChildren: f, "aria-label": h, hasArrow: d, bg: g, portalProps: v, background: m, backgroundColor: b, bgColor: S, motionProps: x, ...w } = a, _ = (n = (r = m ?? b) != null ? r : g) != null ? n : S; if (_) { i.bg = _; const K = T8(s, "colors", _); i[Qt.arrowBg.var] = K; } const P = Rz({ ...w, direction: s.direction }), E = typeof u == "string" || f; let k; if (E) k = /* @__PURE__ */ he.jsx( Gt.span, { display: "inline-block", tabIndex: 0, ...P.getTriggerProps(), children: u } ); else { const K = Vf.only(u); k = mo( K, P.getTriggerProps(K.props, K.ref) ); } const D = !!h, V = P.getTooltipProps({}, e), H = D ? Iz(V, ["role", "id"]) : V, W = Dz(V, ["role", "id"]); return c ? /* @__PURE__ */ he.jsxs(he.Fragment, { children: [ k, /* @__PURE__ */ he.jsx(yj, { children: P.isOpen && /* @__PURE__ */ he.jsx(eh, { ...v, children: /* @__PURE__ */ he.jsx( Gt.div, { ...P.getTooltipPositionerProps(), __css: { zIndex: i.zIndex, pointerEvents: "none" }, children: /* @__PURE__ */ he.jsxs( Mz, { variants: Oz, initial: "exit", animate: "enter", exit: "exit", ...x, ...H, __css: i, children: [ c, D && /* @__PURE__ */ he.jsx(Gt.span, { srOnly: !0, ...W, children: h }), d && /* @__PURE__ */ he.jsx( Gt.div, { "data-popper-arrow": !0, className: "chakra-tooltip__arrow-wrapper", children: /* @__PURE__ */ he.jsx( Gt.div, { "data-popper-arrow-inner": !0, className: "chakra-tooltip__arrow", __css: { bg: i.bg } } ) } ) ] } ) } ) }) }) ] }) : /* @__PURE__ */ he.jsx(he.Fragment, { children: u }); }); Xm.displayName = "Tooltip"; const Xb = (t) => { const { t: e } = rw(), { showText: r = !1, text: n = e("common.loadingInvokeAI") } = t; return /* @__PURE__ */ he.jsxs( Gm, { width: "100vw", height: "100vh", alignItems: "center", justifyContent: "center", bg: "#121212", flexDirection: "column", rowGap: 4, children: [ /* @__PURE__ */ he.jsx(Vm, { color: "grey", w: "5rem", h: "5rem" }), r && /* @__PURE__ */ he.jsx( Lf, { color: "grey", fontWeight: "semibold", fontFamily: "'Inter', sans-serif", children: n } ) ] } ); }, Lz = Zb(() => import("./App-4c446f4d.mjs")), Nz = Zb(() => import("./ThemeLocaleProvider-ece7b27a.mjs")); function IH(t) { return /* @__PURE__ */ he.jsx(Zt.StrictMode, { children: /* @__PURE__ */ he.jsx(MO, { store: nx, children: /* @__PURE__ */ he.jsx(sS, { loading: /* @__PURE__ */ he.jsx(Xb, {}), persistor: UM, children: /* @__PURE__ */ he.jsx(Zt.Suspense, { fallback: /* @__PURE__ */ he.jsx(Xb, { showText: !0 }), children: /* @__PURE__ */ he.jsx(Nz, { children: /* @__PURE__ */ he.jsx(Lz, { children: t.children }) }) }) }) }) }); } const Bz = BO, SC = wO, Fz = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdMAAAHTCAYAAAB8/vKtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFyWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNy4xLWMwMDAgNzkuZWRhMmIzZiwgMjAyMS8xMS8xNC0xMjozMDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW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uRZQACVNRjGYDJ+AF6/4+1yJKx7/wRqF/AP7pbymi1EiYimK3C/AxvHDd2+daxOTzL+BBvCncF3yuRZQwCVMxmewCHAccjTdiNf0tRxQpCVBRcBKmYrKahResh+FtYqrytRrhpzzwLPAXvCMtMoUrCk7CVJSCKryuNAcCR+H1ShWlrQ14DG8j0aMjPxbCN1sK00CB6hBiWySBu0c+AOYBH8Vr/XYwMMWnusT4SQFPAf8A/gYsQpp/iElERqZisgsD++LdbLMvsB/Q5GtFYixSeMH5D7zR53N4b5qEKEoyMhWlLgc8PfIBEMHbyHQw3v2TBwOtyGYmv63DC85X8Po4v4CEpyghEqai1GTxXqxHG+8rYCbeiHUesAewJ9CMNI6YKH14obkIWI5309BbgOVnUUJMJAlTUeo0Xk/W1Rv9XAivf/DeeKPXOXg9hGcBsYJWN7llgfXAYrzbV5YDLwMrgbSPdQlRcBKmohzl8V7wV77n52uBHYD5eF2aZuNNEc8e+bVynSpO4t2q8ubIxxpgGbAE6EYuzxZCwlSIjfTjreW9txFAFG/H8HZ44Todb5q4GWgZ+XEl3maoySaPN4psA9rx+ti+DXQAq/CmZ9vwNgwJITZBwlSILcvghcpbm/j1KFCNF64NQOPIt9V4N+XU441soyO/Zox8Gxz5fsU41JjGuxHFBTpHvt89UnsfMAD0AIMjP98HdOFN0w7g3UsrhPiAJEyF2HaZkY+OTfx6GK/xRBgvVI2RbwN4U8dT8ILVxbsyLD7yc+83fWriheDgyH+v8NaF2/E2+Lh4QenijbRzeNO02W37KwohNmeL50yFEEIIsXlyNEAIIYTYRhKmQgghxDaSMBVCCCG2kYSpEEIIsY0kTIUQQohtJGEqhBBCbKP/D8/Q3MAstNOAAAAAAElFTkSuQmCC", DH = () => { const t = SC( (e) => e.system.app_version ); return /* @__PURE__ */ he.jsxs(Gm, { alignItems: "center", gap: 3, ps: 1, children: [ /* @__PURE__ */ he.jsx(U3, { src: Fz, alt: "invoke-ai-logo", w: "32px", h: "32px" }), /* @__PURE__ */ he.jsxs(Lf, { fontSize: "xl", children: [ "invoke ", /* @__PURE__ */ he.jsx("strong", { children: "ai" }) ] }), /* @__PURE__ */ he.jsx( Lf, { sx: { fontWeight: 300, marginTop: 1 }, variant: "subtext", children: t } ) ] }); }, jz = Ur((t, e) => { const { children: r, tooltip: n = "", tooltipProps: i, isChecked: a, ...s } = t; return /* @__PURE__ */ he.jsx(Xm, { label: n, ...i, children: /* @__PURE__ */ he.jsx(zm, { ref: e, "aria-checked": a, ...s, children: r }) }); }), Vz = Ig(jz), wC = Ur((t, e) => { const { role: r, tooltip: n = "", tooltipProps: i, isChecked: a, ...s } = t; return /* @__PURE__ */ he.jsx( Xm, { label: n, hasArrow: !0, ...i, ...i != null && i.placement ? { placement: i.placement } : { placement: "top" }, children: /* @__PURE__ */ he.jsx( H3, { ref: e, role: r, "aria-checked": a !== void 0 ? a : void 0, ...s } ) } ); }); wC.displayName = "IAIIconButton"; const zz = Ig(wC), Gz = (t) => { const { triggerComponent: e, children: r, hasArrow: n = !0, isLazy: i = !0, ...a } = t; return /* @__PURE__ */ he.jsxs(mC, { isLazy: i, ...a, children: [ /* @__PURE__ */ he.jsx(gC, { children: e }), /* @__PURE__ */ he.jsxs(bC, { children: [ n && /* @__PURE__ */ he.jsx(vC, {}), r ] }) ] }); }, Wz = Ig(Gz); var xC = { color: void 0, size: void 0, className: void 0, style: void 0, attr: void 0 }, Qb = Zt.createContext && Zt.createContext(xC), da = globalThis && globalThis.__assign || function() { return da = Object.assign || function(t) { for (var e, r = 1, n = arguments.length; r < n; r++) { e = arguments[r]; for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]); } return t; }, da.apply(this, arguments); }, Uz = globalThis && globalThis.__rest || function(t, e) { var r = {}; for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (r[n] = t[n]); if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, n = Object.getOwnPropertySymbols(t); i < n.length; i++) e.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[i]) && (r[n[i]] = t[n[i]]); return r; }; function CC(t) { return t && t.map(function(e, r) { return Zt.createElement(e.tag, da({ key: r }, e.attr), CC(e.child)); }); } function Oe(t) { return function(e) { return Zt.createElement(Hz, da({ attr: da({}, t.attr) }, e), CC(t.child)); }; } function Hz(t) { var e = function(r) { var n = t.attr, i = t.size, a = t.title, s = Uz(t, ["attr", "size", "title"]), u = i || r.size || "1em", c; return r.className && (c = r.className), t.className && (c = (c ? c + " " : "") + t.className), Zt.createElement("svg", da({ stroke: "currentColor", fill: "currentColor", strokeWidth: "0" }, r.attr, n, s, { className: c, style: da(da({ color: t.color || r.color }, r.style), t.style), height: u, width: u, xmlns: "http://www.w3.org/2000/svg" }), a && Zt.createElement("title", null, a), t.children); }; return Qb !== void 0 ? Zt.createElement(Qb.Consumer, null, function(r) { return e(r); }) : e(xC); } function MH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z" } }] })(t); } function LH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 496 512" }, child: [{ tag: "path", attr: { d: "M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z" } }] })(t); } function NH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z" } }] })(t); } function BH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 256 512" }, child: [{ tag: "path", attr: { d: "M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z" } }] })(t); } function FH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 256 512" }, child: [{ tag: "path", attr: { d: "M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z" } }] })(t); } function jH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z" } }] })(t); } function VH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z" } }] })(t); } function zH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z" } }] })(t); } function GH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z" } }] })(t); } function WH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z" } }] })(t); } function Yz(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" } }] })(t); } function UH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z" } }] })(t); } function HH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z" } }] })(t); } function YH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z" } }] })(t); } function qH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M239.1 6.3l-208 78c-18.7 7-31.1 25-31.1 45v225.1c0 18.2 10.3 34.8 26.5 42.9l208 104c13.5 6.8 29.4 6.8 42.9 0l208-104c16.3-8.1 26.5-24.8 26.5-42.9V129.3c0-20-12.4-37.9-31.1-44.9l-208-78C262 2.2 250 2.2 239.1 6.3zM256 68.4l192 72v1.1l-192 78-192-78v-1.1l192-72zm32 356V275.5l160-65v133.9l-160 80z" } }] })(t); } function KH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z" } }] })(t); } function XH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z" } }] })(t); } function QH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z" } }] })(t); } function JH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z" } }] })(t); } function ZH(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z" } }] })(t); } function $H(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z" } }] })(t); } function eY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z" } }] })(t); } function tY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M512 320s-64 92.65-64 128c0 35.35 28.66 64 64 64s64-28.65 64-64-64-128-64-128zm-9.37-102.94L294.94 9.37C288.69 3.12 280.5 0 272.31 0s-16.38 3.12-22.62 9.37l-81.58 81.58L81.93 4.76c-6.25-6.25-16.38-6.25-22.62 0L36.69 27.38c-6.24 6.25-6.24 16.38 0 22.62l86.19 86.18-94.76 94.76c-37.49 37.48-37.49 98.26 0 135.75l117.19 117.19c18.74 18.74 43.31 28.12 67.87 28.12 24.57 0 49.13-9.37 67.87-28.12l221.57-221.57c12.5-12.5 12.5-32.75.01-45.25zm-116.22 70.97H65.93c1.36-3.84 3.57-7.98 7.43-11.83l13.15-13.15 81.61-81.61 58.6 58.6c12.49 12.49 32.75 12.49 45.24 0s12.49-32.75 0-45.24l-58.6-58.6 58.95-58.95 162.44 162.44-48.34 48.34z" } }] })(t); } function rY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 496 512" }, child: [{ tag: "path", attr: { d: "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z" } }] })(t); } function nY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z" } }] })(t); } function iY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z" } }] })(t); } function aY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M152.1 236.2c-3.5-12.1-7.8-33.2-7.8-33.2h-.5s-4.3 21.1-7.8 33.2l-11.1 37.5H163zM616 96H336v320h280c13.3 0 24-10.7 24-24V120c0-13.3-10.7-24-24-24zm-24 120c0 6.6-5.4 12-12 12h-11.4c-6.9 23.6-21.7 47.4-42.7 69.9 8.4 6.4 17.1 12.5 26.1 18 5.5 3.4 7.3 10.5 4.1 16.2l-7.9 13.9c-3.4 5.9-10.9 7.8-16.7 4.3-12.6-7.8-24.5-16.1-35.4-24.9-10.9 8.7-22.7 17.1-35.4 24.9-5.8 3.5-13.3 1.6-16.7-4.3l-7.9-13.9c-3.2-5.6-1.4-12.8 4.2-16.2 9.3-5.7 18-11.7 26.1-18-7.9-8.4-14.9-17-21-25.7-4-5.7-2.2-13.6 3.7-17.1l6.5-3.9 7.3-4.3c5.4-3.2 12.4-1.7 16 3.4 5 7 10.8 14 17.4 20.9 13.5-14.2 23.8-28.9 30-43.2H412c-6.6 0-12-5.4-12-12v-16c0-6.6 5.4-12 12-12h64v-16c0-6.6 5.4-12 12-12h16c6.6 0 12 5.4 12 12v16h64c6.6 0 12 5.4 12 12zM0 120v272c0 13.3 10.7 24 24 24h280V96H24c-13.3 0-24 10.7-24 24zm58.9 216.1L116.4 167c1.7-4.9 6.2-8.1 11.4-8.1h32.5c5.1 0 9.7 3.3 11.4 8.1l57.5 169.1c2.6 7.8-3.1 15.9-11.4 15.9h-22.9a12 12 0 0 1-11.5-8.6l-9.4-31.9h-60.2l-9.1 31.8c-1.5 5.1-6.2 8.7-11.5 8.7H70.3c-8.2 0-14-8.1-11.4-15.9z" } }] })(t); } function sY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z" } }] })(t); } function oY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z" } }] })(t); } function uY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z" } }] })(t); } function lY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z" } }] })(t); } function qz(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z" } }] })(t); } function cY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z" } }] })(t); } function fY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z" } }] })(t); } function hY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z" } }] })(t); } function dY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z" } }] })(t); } function pY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z" } }] })(t); } function gY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z" } }] })(t); } function mY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z" } }] })(t); } function vY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z" } }] })(t); } function yY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z" } }] })(t); } function bY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z" } }] })(t); } function SY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z" } }] })(t); } function wY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z" } }] })(t); } function xY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z" } }] })(t); } function CY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z" } }] })(t); } function _Y(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z" } }] })(t); } function PY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z" } }] })(t); } function EY(t) { return Oe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z" } }] })(t); } function TY() { const { t } = rw(), e = Bz(), r = SC( (s) => s.ui.currentTheme ), n = { dark: t("common.darkTheme"), light: t("common.lightTheme"), green: t("common.greenTheme"), ocean: t("common.oceanTheme") }, i = (s) => { e(yk(s)); }, a = () => { const s = []; return Object.keys(n).forEach((u) => { s.push( /* @__PURE__ */ he.jsx( Vz, { isChecked: r === u, leftIcon: r === u ? /* @__PURE__ */ he.jsx(Yz, {}) : void 0, size: "sm", onClick: () => i(u), children: n[u] }, u ) ); }), s; }; return /* @__PURE__ */ he.jsx( Wz, { trigger: "hover", triggerComponent: /* @__PURE__ */ he.jsx( zz, { "aria-label": t("common.themeLabel"), size: "sm", variant: "link", "data-variant": "link", fontSize: 20, icon: /* @__PURE__ */ he.jsx(qz, {}) } ), children: /* @__PURE__ */ he.jsx(rC, { align: "stretch", children: a() }) } ); } export { SC as $, yj as A, kH as B, Pj as C, xz as D, dC as E, hC as F, Kj as G, wz as H, th as I, la as J, oF as K, no as L, gh as M, pC as N, _n as O, eh as P, _H as Q, iw as R, tC as S, zt as T, Nc as U, yc as V, NG as W, I6 as X, Gm as Y, Bz as Z, ff as _, Gt as a, P6 as a$, rw as a0, bU as a1, Lf as a2, Xm as a3, zz as a4, NH as a5, uY as a6, UH as a7, _U as a8, Vz as a9, PU as aA, Wz as aB, aY as aC, Yz as aD, DH as aE, qH as aF, iY as aG, TY as aH, WH as aI, LH as aJ, MH as aK, LG as aL, MU as aM, YU as aN, LU as aO, HU as aP, _Y as aQ, $U as aR, lU as aS, uU as aT, oU as aU, mU as aV, vU as aW, ZU as aX, gU as aY, lH as aZ, Kc as a_, pH as aa, rC as ab, hH as ac, Oe as ad, fH as ae, fY as af, mY as ag, FU as ah, dk as ai, pk as aj, VU as ak, zm as al, mH as am, OU as an, dH as ao, SH as ap, gH as aq, Vm as ar, eH as as, yU as at, wU as au, CU as av, BU as aw, jU as ax, EU as ay, UM as az, xa as b, xU as b$, jW as b0, VW as b1, yY as b2, bY as b3, HH as b4, KH as b5, JH as b6, hY as b7, vY as b8, GH as b9, FH as bA, bW as bB, yW as bC, U3 as bD, R6 as bE, pU as bF, iU as bG, aU as bH, nU as bI, JW as bJ, xM as bK, uI as bL, oI as bM, dU as bN, QW as bO, T6 as bP, tU as bQ, JU as bR, NW as bS, XU as bT, KU as bU, TW as bV, QU as bW, mC as bX, gC as bY, bC as bZ, vC as b_, rY as ba, QH as bb, xY as bc, EW as bd, IU as be, kW as bf, qW as bg, oH as bh, uH as bi, NU as bj, $W as bk, FW as bl, zW as bm, ZW as bn, DW as bo, By as bp, KW as bq, WW as br, cU as bs, rU as bt, MW as bu, D6 as bv, LW as bw, XW as bx, H3 as by, BH as bz, rl as c, _G as c$, cH as c0, kU as c1, RU as c2, Pg as c3, Ny as c4, sH as c5, cY as c6, dY as c7, hU as c8, fU as c9, iG as cA, aG as cB, sG as cC, oW as cD, bG as cE, yG as cF, pG as cG, jH as cH, VH as cI, eY as cJ, $H as cK, sW as cL, gY as cM, vH as cN, gG as cO, EG as cP, TG as cQ, vc as cR, ua as cS, UG as cT, GG as cU, jG as cV, eG as cW, tG as cX, nH as cY, iH as cZ, IG as c_, Qz as ca, be as cb, G1 as cc, WG as cd, lW as ce, uW as cf, xG as cg, $G as ch, fW as ci, aH as cj, hG as ck, FG as cl, lu as cm, DG as cn, dG as co, SM as cp, BG as cq, lG as cr, MG as cs, cG as ct, vG as cu, Jz as cv, Zz as cw, $z as cx, cW as cy, DS as cz, ig as d, PW as d$, PG as d0, pY as d1, SG as d2, CY as d3, pW as d4, AU as d5, wc as d6, ri as d7, nu as d8, Ge as d9, YG as dA, mW as dB, ZG as dC, QG as dD, iW as dE, oY as dF, nG as dG, k6 as dH, eU as dI, gW as dJ, OG as dK, GW as dL, UW as dM, HW as dN, YW as dO, WU as dP, TU as dQ, GU as dR, wY as dS, RW as dT, vW as dU, nY as dV, CW as dW, PY as dX, SW as dY, wW as dZ, xW as d_, qG as da, Vs as db, rG as dc, HG as dd, sY as de, zH as df, SY as dg, wG as dh, CG as di, YH as dj, uG as dk, oG as dl, lY as dm, XH as dn, tY as dp, ZH as dq, yH as dr, fG as ds, EY as dt, aW as du, KG as dv, XG as dw, rW as dx, kG as dy, RG as dz, kr as e, e2 as e0, UU as e1, qU as e2, yx as e3, GL as e4, vx as e5, PH as e6, TH as e7, Z9 as e8, EH as e9, ai as ea, CH as eb, bH as ec, k8 as ed, x8 as ee, $L as ef, OH as eg, IH as eh, Ur as f, G3 as g, j8 as h, y2 as i, he as j, ih as k, xH as l, Di as m, Hu as n, nl as o, Ox as p, UL as q, f9 as r, Sp as s, Rp as t, a9 as u, Hn as v, wH as w, Uj as x, D8 as y, AH as z };