(function() {
  "use strict";
  var commonjsGlobal$1 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
  function getDefaultExportFromCjs(x) {
    return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
  }
  function getAugmentedNamespace(n) {
    if (Object.prototype.hasOwnProperty.call(n, "__esModule")) return n;
    var f = n.default;
    if (typeof f == "function") {
      var a = function a2() {
        if (this instanceof a2) {
          return Reflect.construct(f, arguments, this.constructor);
        }
        return f.apply(this, arguments);
      };
      a.prototype = f.prototype;
    } else a = {};
    Object.defineProperty(a, "__esModule", { value: true });
    Object.keys(n).forEach(function(k) {
      var d = Object.getOwnPropertyDescriptor(n, k);
      Object.defineProperty(a, k, d.get ? d : {
        enumerable: true,
        get: function() {
          return n[k];
        }
      });
    });
    return a;
  }
  var jsxRuntime = { exports: {} };
  var reactJsxRuntime_production_min = {};
  var react = { exports: {} };
  var react_production_min = {};
  /*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  */
  var objectAssign;
  var hasRequiredObjectAssign;
  function requireObjectAssign() {
    if (hasRequiredObjectAssign) return objectAssign;
    hasRequiredObjectAssign = 1;
    var getOwnPropertySymbols = Object.getOwnPropertySymbols;
    var hasOwnProperty = Object.prototype.hasOwnProperty;
    var propIsEnumerable = Object.prototype.propertyIsEnumerable;
    function toObject(val) {
      if (val === null || val === void 0) {
        throw new TypeError("Object.assign cannot be called with null or undefined");
      }
      return Object(val);
    }
    function shouldUseNative() {
      try {
        if (!Object.assign) {
          return false;
        }
        var test1 = new String("abc");
        test1[5] = "de";
        if (Object.getOwnPropertyNames(test1)[0] === "5") {
          return false;
        }
        var test2 = {};
        for (var i = 0; i < 10; i++) {
          test2["_" + String.fromCharCode(i)] = i;
        }
        var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
          return test2[n];
        });
        if (order2.join("") !== "0123456789") {
          return false;
        }
        var test3 = {};
        "abcdefghijklmnopqrst".split("").forEach(function(letter) {
          test3[letter] = letter;
        });
        if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
          return false;
        }
        return true;
      } catch (err) {
        return false;
      }
    }
    objectAssign = shouldUseNative() ? Object.assign : function(target, source) {
      var from;
      var to = toObject(target);
      var symbols;
      for (var s = 1; s < arguments.length; s++) {
        from = Object(arguments[s]);
        for (var key in from) {
          if (hasOwnProperty.call(from, key)) {
            to[key] = from[key];
          }
        }
        if (getOwnPropertySymbols) {
          symbols = getOwnPropertySymbols(from);
          for (var i = 0; i < symbols.length; i++) {
            if (propIsEnumerable.call(from, symbols[i])) {
              to[symbols[i]] = from[symbols[i]];
            }
          }
        }
      }
      return to;
    };
    return objectAssign;
  }
  /** @license React v16.14.0
   * react.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */
  var hasRequiredReact_production_min;
  function requireReact_production_min() {
    if (hasRequiredReact_production_min) return react_production_min;
    hasRequiredReact_production_min = 1;
    var l = requireObjectAssign(), n = "function" === typeof Symbol && Symbol.for, p = n ? Symbol.for("react.element") : 60103, q = n ? Symbol.for("react.portal") : 60106, r = n ? Symbol.for("react.fragment") : 60107, t = n ? Symbol.for("react.strict_mode") : 60108, u = n ? Symbol.for("react.profiler") : 60114, v = n ? Symbol.for("react.provider") : 60109, w = n ? Symbol.for("react.context") : 60110, x = n ? Symbol.for("react.forward_ref") : 60112, y = n ? Symbol.for("react.suspense") : 60113, z = n ? Symbol.for("react.memo") : 60115, A = n ? Symbol.for("react.lazy") : 60116, B = "function" === typeof Symbol && Symbol.iterator;
    function C(a) {
      for (var b = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, c = 1; c < arguments.length; c++) b += "&args[]=" + encodeURIComponent(arguments[c]);
      return "Minified React error #" + a + "; visit " + b + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
    }
    var D = { isMounted: function() {
      return false;
    }, enqueueForceUpdate: function() {
    }, enqueueReplaceState: function() {
    }, enqueueSetState: function() {
    } }, E = {};
    function F(a, b, c) {
      this.props = a;
      this.context = b;
      this.refs = E;
      this.updater = c || D;
    }
    F.prototype.isReactComponent = {};
    F.prototype.setState = function(a, b) {
      if ("object" !== typeof a && "function" !== typeof a && null != a) throw Error(C(85));
      this.updater.enqueueSetState(this, a, b, "setState");
    };
    F.prototype.forceUpdate = function(a) {
      this.updater.enqueueForceUpdate(this, a, "forceUpdate");
    };
    function G() {
    }
    G.prototype = F.prototype;
    function H(a, b, c) {
      this.props = a;
      this.context = b;
      this.refs = E;
      this.updater = c || D;
    }
    var I = H.prototype = new G();
    I.constructor = H;
    l(I, F.prototype);
    I.isPureReactComponent = true;
    var J = { current: null }, K = Object.prototype.hasOwnProperty, L = { key: true, ref: true, __self: true, __source: true };
    function M(a, b, c) {
      var e, d = {}, g = null, k = null;
      if (null != b) for (e in void 0 !== b.ref && (k = b.ref), void 0 !== b.key && (g = "" + b.key), b) K.call(b, e) && !L.hasOwnProperty(e) && (d[e] = b[e]);
      var f = arguments.length - 2;
      if (1 === f) d.children = c;
      else if (1 < f) {
        for (var h = Array(f), m = 0; m < f; m++) h[m] = arguments[m + 2];
        d.children = h;
      }
      if (a && a.defaultProps) for (e in f = a.defaultProps, f) void 0 === d[e] && (d[e] = f[e]);
      return { $$typeof: p, type: a, key: g, ref: k, props: d, _owner: J.current };
    }
    function N(a, b) {
      return { $$typeof: p, type: a.type, key: b, ref: a.ref, props: a.props, _owner: a._owner };
    }
    function O(a) {
      return "object" === typeof a && null !== a && a.$$typeof === p;
    }
    function escape(a) {
      var b = { "=": "=0", ":": "=2" };
      return "$" + ("" + a).replace(/[=:]/g, function(a2) {
        return b[a2];
      });
    }
    var P = /\/+/g, Q = [];
    function R(a, b, c, e) {
      if (Q.length) {
        var d = Q.pop();
        d.result = a;
        d.keyPrefix = b;
        d.func = c;
        d.context = e;
        d.count = 0;
        return d;
      }
      return { result: a, keyPrefix: b, func: c, context: e, count: 0 };
    }
    function S(a) {
      a.result = null;
      a.keyPrefix = null;
      a.func = null;
      a.context = null;
      a.count = 0;
      10 > Q.length && Q.push(a);
    }
    function T(a, b, c, e) {
      var d = typeof a;
      if ("undefined" === d || "boolean" === d) a = null;
      var g = false;
      if (null === a) g = true;
      else switch (d) {
        case "string":
        case "number":
          g = true;
          break;
        case "object":
          switch (a.$$typeof) {
            case p:
            case q:
              g = true;
          }
      }
      if (g) return c(e, a, "" === b ? "." + U(a, 0) : b), 1;
      g = 0;
      b = "" === b ? "." : b + ":";
      if (Array.isArray(a)) for (var k = 0; k < a.length; k++) {
        d = a[k];
        var f = b + U(d, k);
        g += T(d, f, c, e);
      }
      else if (null === a || "object" !== typeof a ? f = null : (f = B && a[B] || a["@@iterator"], f = "function" === typeof f ? f : null), "function" === typeof f) for (a = f.call(a), k = 0; !(d = a.next()).done; ) d = d.value, f = b + U(d, k++), g += T(d, f, c, e);
      else if ("object" === d) throw c = "" + a, Error(C(31, "[object Object]" === c ? "object with keys {" + Object.keys(a).join(", ") + "}" : c, ""));
      return g;
    }
    function V(a, b, c) {
      return null == a ? 0 : T(a, "", b, c);
    }
    function U(a, b) {
      return "object" === typeof a && null !== a && null != a.key ? escape(a.key) : b.toString(36);
    }
    function W(a, b) {
      a.func.call(a.context, b, a.count++);
    }
    function aa(a, b, c) {
      var e = a.result, d = a.keyPrefix;
      a = a.func.call(a.context, b, a.count++);
      Array.isArray(a) ? X(a, e, c, function(a2) {
        return a2;
      }) : null != a && (O(a) && (a = N(a, d + (!a.key || b && b.key === a.key ? "" : ("" + a.key).replace(P, "$&/") + "/") + c)), e.push(a));
    }
    function X(a, b, c, e, d) {
      var g = "";
      null != c && (g = ("" + c).replace(P, "$&/") + "/");
      b = R(b, g, e, d);
      V(a, aa, b);
      S(b);
    }
    var Y = { current: null };
    function Z() {
      var a = Y.current;
      if (null === a) throw Error(C(321));
      return a;
    }
    var ba = { ReactCurrentDispatcher: Y, ReactCurrentBatchConfig: { suspense: null }, ReactCurrentOwner: J, IsSomeRendererActing: { current: false }, assign: l };
    react_production_min.Children = { map: function(a, b, c) {
      if (null == a) return a;
      var e = [];
      X(a, e, null, b, c);
      return e;
    }, forEach: function(a, b, c) {
      if (null == a) return a;
      b = R(null, null, b, c);
      V(a, W, b);
      S(b);
    }, count: function(a) {
      return V(a, function() {
        return null;
      }, null);
    }, toArray: function(a) {
      var b = [];
      X(a, b, null, function(a2) {
        return a2;
      });
      return b;
    }, only: function(a) {
      if (!O(a)) throw Error(C(143));
      return a;
    } };
    react_production_min.Component = F;
    react_production_min.Fragment = r;
    react_production_min.Profiler = u;
    react_production_min.PureComponent = H;
    react_production_min.StrictMode = t;
    react_production_min.Suspense = y;
    react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ba;
    react_production_min.cloneElement = function(a, b, c) {
      if (null === a || void 0 === a) throw Error(C(267, a));
      var e = l({}, a.props), d = a.key, g = a.ref, k = a._owner;
      if (null != b) {
        void 0 !== b.ref && (g = b.ref, k = J.current);
        void 0 !== b.key && (d = "" + b.key);
        if (a.type && a.type.defaultProps) var f = a.type.defaultProps;
        for (h in b) K.call(b, h) && !L.hasOwnProperty(h) && (e[h] = void 0 === b[h] && void 0 !== f ? f[h] : b[h]);
      }
      var h = arguments.length - 2;
      if (1 === h) e.children = c;
      else if (1 < h) {
        f = Array(h);
        for (var m = 0; m < h; m++) f[m] = arguments[m + 2];
        e.children = f;
      }
      return {
        $$typeof: p,
        type: a.type,
        key: d,
        ref: g,
        props: e,
        _owner: k
      };
    };
    react_production_min.createContext = function(a, b) {
      void 0 === b && (b = null);
      a = { $$typeof: w, _calculateChangedBits: b, _currentValue: a, _currentValue2: a, _threadCount: 0, Provider: null, Consumer: null };
      a.Provider = { $$typeof: v, _context: a };
      return a.Consumer = a;
    };
    react_production_min.createElement = M;
    react_production_min.createFactory = function(a) {
      var b = M.bind(null, a);
      b.type = a;
      return b;
    };
    react_production_min.createRef = function() {
      return { current: null };
    };
    react_production_min.forwardRef = function(a) {
      return { $$typeof: x, render: a };
    };
    react_production_min.isValidElement = O;
    react_production_min.lazy = function(a) {
      return { $$typeof: A, _ctor: a, _status: -1, _result: null };
    };
    react_production_min.memo = function(a, b) {
      return { $$typeof: z, type: a, compare: void 0 === b ? null : b };
    };
    react_production_min.useCallback = function(a, b) {
      return Z().useCallback(a, b);
    };
    react_production_min.useContext = function(a, b) {
      return Z().useContext(a, b);
    };
    react_production_min.useDebugValue = function() {
    };
    react_production_min.useEffect = function(a, b) {
      return Z().useEffect(a, b);
    };
    react_production_min.useImperativeHandle = function(a, b, c) {
      return Z().useImperativeHandle(a, b, c);
    };
    react_production_min.useLayoutEffect = function(a, b) {
      return Z().useLayoutEffect(a, b);
    };
    react_production_min.useMemo = function(a, b) {
      return Z().useMemo(a, b);
    };
    react_production_min.useReducer = function(a, b, c) {
      return Z().useReducer(a, b, c);
    };
    react_production_min.useRef = function(a) {
      return Z().useRef(a);
    };
    react_production_min.useState = function(a) {
      return Z().useState(a);
    };
    react_production_min.version = "16.14.0";
    return react_production_min;
  }
  var hasRequiredReact;
  function requireReact() {
    if (hasRequiredReact) return react.exports;
    hasRequiredReact = 1;
    {
      react.exports = requireReact_production_min();
    }
    return react.exports;
  }
  /** @license React v16.14.0
   * react-jsx-runtime.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */
  var hasRequiredReactJsxRuntime_production_min;
  function requireReactJsxRuntime_production_min() {
    if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
    hasRequiredReactJsxRuntime_production_min = 1;
    var f = requireReact(), g = 60103;
    reactJsxRuntime_production_min.Fragment = 60107;
    if ("function" === typeof Symbol && Symbol.for) {
      var h = Symbol.for;
      g = h("react.element");
      reactJsxRuntime_production_min.Fragment = h("react.fragment");
    }
    var m = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, n = Object.prototype.hasOwnProperty, p = { key: true, ref: true, __self: true, __source: true };
    function q(c, a, k) {
      var b, d = {}, e = null, l = null;
      void 0 !== k && (e = "" + k);
      void 0 !== a.key && (e = "" + a.key);
      void 0 !== a.ref && (l = a.ref);
      for (b in a) n.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
      if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]);
      return { $$typeof: g, type: c, key: e, ref: l, props: d, _owner: m.current };
    }
    reactJsxRuntime_production_min.jsx = q;
    reactJsxRuntime_production_min.jsxs = q;
    return reactJsxRuntime_production_min;
  }
  var hasRequiredJsxRuntime;
  function requireJsxRuntime() {
    if (hasRequiredJsxRuntime) return jsxRuntime.exports;
    hasRequiredJsxRuntime = 1;
    {
      jsxRuntime.exports = requireReactJsxRuntime_production_min();
    }
    return jsxRuntime.exports;
  }
  var jsxRuntimeExports = requireJsxRuntime();
  var reactExports = requireReact();
  const React = /* @__PURE__ */ getDefaultExportFromCjs(reactExports);
  var reactDom = { exports: {} };
  var reactDom_production_min = {};
  var scheduler = { exports: {} };
  var scheduler_production_min = {};
  /** @license React v0.19.1
   * scheduler.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */
  var hasRequiredScheduler_production_min;
  function requireScheduler_production_min() {
    if (hasRequiredScheduler_production_min) return scheduler_production_min;
    hasRequiredScheduler_production_min = 1;
    (function(exports) {
      var f, g, h, k, l;
      if ("undefined" === typeof window || "function" !== typeof MessageChannel) {
        var p = null, q = null, t = function() {
          if (null !== p) try {
            var a = exports.unstable_now();
            p(true, a);
            p = null;
          } catch (b) {
            throw setTimeout(t, 0), b;
          }
        }, u = Date.now();
        exports.unstable_now = function() {
          return Date.now() - u;
        };
        f = function(a) {
          null !== p ? setTimeout(f, 0, a) : (p = a, setTimeout(t, 0));
        };
        g = function(a, b) {
          q = setTimeout(a, b);
        };
        h = function() {
          clearTimeout(q);
        };
        k = function() {
          return false;
        };
        l = exports.unstable_forceFrameRate = function() {
        };
      } else {
        var w = window.performance, x = window.Date, y = window.setTimeout, z = window.clearTimeout;
        if ("undefined" !== typeof console) {
          var A = window.cancelAnimationFrame;
          "function" !== typeof window.requestAnimationFrame && console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills");
          "function" !== typeof A && console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills");
        }
        if ("object" === typeof w && "function" === typeof w.now) exports.unstable_now = function() {
          return w.now();
        };
        else {
          var B = x.now();
          exports.unstable_now = function() {
            return x.now() - B;
          };
        }
        var C = false, D = null, E = -1, F = 5, G = 0;
        k = function() {
          return exports.unstable_now() >= G;
        };
        l = function() {
        };
        exports.unstable_forceFrameRate = function(a) {
          0 > a || 125 < a ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported") : F = 0 < a ? Math.floor(1e3 / a) : 5;
        };
        var H = new MessageChannel(), I = H.port2;
        H.port1.onmessage = function() {
          if (null !== D) {
            var a = exports.unstable_now();
            G = a + F;
            try {
              D(true, a) ? I.postMessage(null) : (C = false, D = null);
            } catch (b) {
              throw I.postMessage(null), b;
            }
          } else C = false;
        };
        f = function(a) {
          D = a;
          C || (C = true, I.postMessage(null));
        };
        g = function(a, b) {
          E = y(function() {
            a(exports.unstable_now());
          }, b);
        };
        h = function() {
          z(E);
          E = -1;
        };
      }
      function J(a, b) {
        var c = a.length;
        a.push(b);
        a: for (; ; ) {
          var d = c - 1 >>> 1, e = a[d];
          if (void 0 !== e && 0 < K(e, b)) a[d] = b, a[c] = e, c = d;
          else break a;
        }
      }
      function L(a) {
        a = a[0];
        return void 0 === a ? null : a;
      }
      function M(a) {
        var b = a[0];
        if (void 0 !== b) {
          var c = a.pop();
          if (c !== b) {
            a[0] = c;
            a: for (var d = 0, e = a.length; d < e; ) {
              var m = 2 * (d + 1) - 1, n = a[m], v = m + 1, r = a[v];
              if (void 0 !== n && 0 > K(n, c)) void 0 !== r && 0 > K(r, n) ? (a[d] = r, a[v] = c, d = v) : (a[d] = n, a[m] = c, d = m);
              else if (void 0 !== r && 0 > K(r, c)) a[d] = r, a[v] = c, d = v;
              else break a;
            }
          }
          return b;
        }
        return null;
      }
      function K(a, b) {
        var c = a.sortIndex - b.sortIndex;
        return 0 !== c ? c : a.id - b.id;
      }
      var N = [], O = [], P = 1, Q = null, R = 3, S = false, T = false, U = false;
      function V(a) {
        for (var b = L(O); null !== b; ) {
          if (null === b.callback) M(O);
          else if (b.startTime <= a) M(O), b.sortIndex = b.expirationTime, J(N, b);
          else break;
          b = L(O);
        }
      }
      function W(a) {
        U = false;
        V(a);
        if (!T) if (null !== L(N)) T = true, f(X);
        else {
          var b = L(O);
          null !== b && g(W, b.startTime - a);
        }
      }
      function X(a, b) {
        T = false;
        U && (U = false, h());
        S = true;
        var c = R;
        try {
          V(b);
          for (Q = L(N); null !== Q && (!(Q.expirationTime > b) || a && !k()); ) {
            var d = Q.callback;
            if (null !== d) {
              Q.callback = null;
              R = Q.priorityLevel;
              var e = d(Q.expirationTime <= b);
              b = exports.unstable_now();
              "function" === typeof e ? Q.callback = e : Q === L(N) && M(N);
              V(b);
            } else M(N);
            Q = L(N);
          }
          if (null !== Q) var m = true;
          else {
            var n = L(O);
            null !== n && g(W, n.startTime - b);
            m = false;
          }
          return m;
        } finally {
          Q = null, R = c, S = false;
        }
      }
      function Y(a) {
        switch (a) {
          case 1:
            return -1;
          case 2:
            return 250;
          case 5:
            return 1073741823;
          case 4:
            return 1e4;
          default:
            return 5e3;
        }
      }
      var Z = l;
      exports.unstable_IdlePriority = 5;
      exports.unstable_ImmediatePriority = 1;
      exports.unstable_LowPriority = 4;
      exports.unstable_NormalPriority = 3;
      exports.unstable_Profiling = null;
      exports.unstable_UserBlockingPriority = 2;
      exports.unstable_cancelCallback = function(a) {
        a.callback = null;
      };
      exports.unstable_continueExecution = function() {
        T || S || (T = true, f(X));
      };
      exports.unstable_getCurrentPriorityLevel = function() {
        return R;
      };
      exports.unstable_getFirstCallbackNode = function() {
        return L(N);
      };
      exports.unstable_next = function(a) {
        switch (R) {
          case 1:
          case 2:
          case 3:
            var b = 3;
            break;
          default:
            b = R;
        }
        var c = R;
        R = b;
        try {
          return a();
        } finally {
          R = c;
        }
      };
      exports.unstable_pauseExecution = function() {
      };
      exports.unstable_requestPaint = Z;
      exports.unstable_runWithPriority = function(a, b) {
        switch (a) {
          case 1:
          case 2:
          case 3:
          case 4:
          case 5:
            break;
          default:
            a = 3;
        }
        var c = R;
        R = a;
        try {
          return b();
        } finally {
          R = c;
        }
      };
      exports.unstable_scheduleCallback = function(a, b, c) {
        var d = exports.unstable_now();
        if ("object" === typeof c && null !== c) {
          var e = c.delay;
          e = "number" === typeof e && 0 < e ? d + e : d;
          c = "number" === typeof c.timeout ? c.timeout : Y(a);
        } else c = Y(a), e = d;
        c = e + c;
        a = { id: P++, callback: b, priorityLevel: a, startTime: e, expirationTime: c, sortIndex: -1 };
        e > d ? (a.sortIndex = e, J(O, a), null === L(N) && a === L(O) && (U ? h() : U = true, g(W, e - d))) : (a.sortIndex = c, J(N, a), T || S || (T = true, f(X)));
        return a;
      };
      exports.unstable_shouldYield = function() {
        var a = exports.unstable_now();
        V(a);
        var b = L(N);
        return b !== Q && null !== Q && null !== b && null !== b.callback && b.startTime <= a && b.expirationTime < Q.expirationTime || k();
      };
      exports.unstable_wrapCallback = function(a) {
        var b = R;
        return function() {
          var c = R;
          R = b;
          try {
            return a.apply(this, arguments);
          } finally {
            R = c;
          }
        };
      };
    })(scheduler_production_min);
    return scheduler_production_min;
  }
  var hasRequiredScheduler;
  function requireScheduler() {
    if (hasRequiredScheduler) return scheduler.exports;
    hasRequiredScheduler = 1;
    {
      scheduler.exports = requireScheduler_production_min();
    }
    return scheduler.exports;
  }
  /** @license React v16.14.0
   * react-dom.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */
  var hasRequiredReactDom_production_min;
  function requireReactDom_production_min() {
    if (hasRequiredReactDom_production_min) return reactDom_production_min;
    hasRequiredReactDom_production_min = 1;
    var aa = requireReact(), n = requireObjectAssign(), r = requireScheduler();
    function u(a) {
      for (var b = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, c = 1; c < arguments.length; c++) b += "&args[]=" + encodeURIComponent(arguments[c]);
      return "Minified React error #" + a + "; visit " + b + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
    }
    if (!aa) throw Error(u(227));
    function ba(a, b, c, d, e, f, g, h, k) {
      var l = Array.prototype.slice.call(arguments, 3);
      try {
        b.apply(c, l);
      } catch (m) {
        this.onError(m);
      }
    }
    var da = false, ea = null, fa = false, ha = null, ia = { onError: function(a) {
      da = true;
      ea = a;
    } };
    function ja(a, b, c, d, e, f, g, h, k) {
      da = false;
      ea = null;
      ba.apply(ia, arguments);
    }
    function ka(a, b, c, d, e, f, g, h, k) {
      ja.apply(this, arguments);
      if (da) {
        if (da) {
          var l = ea;
          da = false;
          ea = null;
        } else throw Error(u(198));
        fa || (fa = true, ha = l);
      }
    }
    var la = null, ma = null, na = null;
    function oa(a, b, c) {
      var d = a.type || "unknown-event";
      a.currentTarget = na(c);
      ka(d, b, void 0, a);
      a.currentTarget = null;
    }
    var pa = null, qa = {};
    function ra() {
      if (pa) for (var a in qa) {
        var b = qa[a], c = pa.indexOf(a);
        if (!(-1 < c)) throw Error(u(96, a));
        if (!sa[c]) {
          if (!b.extractEvents) throw Error(u(97, a));
          sa[c] = b;
          c = b.eventTypes;
          for (var d in c) {
            var e = void 0;
            var f = c[d], g = b, h = d;
            if (ta.hasOwnProperty(h)) throw Error(u(99, h));
            ta[h] = f;
            var k = f.phasedRegistrationNames;
            if (k) {
              for (e in k) k.hasOwnProperty(e) && ua(k[e], g, h);
              e = true;
            } else f.registrationName ? (ua(f.registrationName, g, h), e = true) : e = false;
            if (!e) throw Error(u(98, d, a));
          }
        }
      }
    }
    function ua(a, b, c) {
      if (va[a]) throw Error(u(100, a));
      va[a] = b;
      wa[a] = b.eventTypes[c].dependencies;
    }
    var sa = [], ta = {}, va = {}, wa = {};
    function xa(a) {
      var b = false, c;
      for (c in a) if (a.hasOwnProperty(c)) {
        var d = a[c];
        if (!qa.hasOwnProperty(c) || qa[c] !== d) {
          if (qa[c]) throw Error(u(102, c));
          qa[c] = d;
          b = true;
        }
      }
      b && ra();
    }
    var ya = !("undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement), za = null, Aa = null, Ba = null;
    function Ca(a) {
      if (a = ma(a)) {
        if ("function" !== typeof za) throw Error(u(280));
        var b = a.stateNode;
        b && (b = la(b), za(a.stateNode, a.type, b));
      }
    }
    function Da(a) {
      Aa ? Ba ? Ba.push(a) : Ba = [a] : Aa = a;
    }
    function Ea() {
      if (Aa) {
        var a = Aa, b = Ba;
        Ba = Aa = null;
        Ca(a);
        if (b) for (a = 0; a < b.length; a++) Ca(b[a]);
      }
    }
    function Fa(a, b) {
      return a(b);
    }
    function Ga(a, b, c, d, e) {
      return a(b, c, d, e);
    }
    function Ha() {
    }
    var Ia = Fa, Ja = false, Ka = false;
    function La() {
      if (null !== Aa || null !== Ba) Ha(), Ea();
    }
    function Ma(a, b, c) {
      if (Ka) return a(b, c);
      Ka = true;
      try {
        return Ia(a, b, c);
      } finally {
        Ka = false, La();
      }
    }
    var Na = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, Oa = Object.prototype.hasOwnProperty, Pa = {}, Qa = {};
    function Ra(a) {
      if (Oa.call(Qa, a)) return true;
      if (Oa.call(Pa, a)) return false;
      if (Na.test(a)) return Qa[a] = true;
      Pa[a] = true;
      return false;
    }
    function Sa(a, b, c, d) {
      if (null !== c && 0 === c.type) return false;
      switch (typeof b) {
        case "function":
        case "symbol":
          return true;
        case "boolean":
          if (d) return false;
          if (null !== c) return !c.acceptsBooleans;
          a = a.toLowerCase().slice(0, 5);
          return "data-" !== a && "aria-" !== a;
        default:
          return false;
      }
    }
    function Ta(a, b, c, d) {
      if (null === b || "undefined" === typeof b || Sa(a, b, c, d)) return true;
      if (d) return false;
      if (null !== c) switch (c.type) {
        case 3:
          return !b;
        case 4:
          return false === b;
        case 5:
          return isNaN(b);
        case 6:
          return isNaN(b) || 1 > b;
      }
      return false;
    }
    function v(a, b, c, d, e, f) {
      this.acceptsBooleans = 2 === b || 3 === b || 4 === b;
      this.attributeName = d;
      this.attributeNamespace = e;
      this.mustUseProperty = c;
      this.propertyName = a;
      this.type = b;
      this.sanitizeURL = f;
    }
    var C = {};
    "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a) {
      C[a] = new v(a, 0, false, a, null, false);
    });
    [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(a) {
      var b = a[0];
      C[b] = new v(b, 1, false, a[1], null, false);
    });
    ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(a) {
      C[a] = new v(a, 2, false, a.toLowerCase(), null, false);
    });
    ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(a) {
      C[a] = new v(a, 2, false, a, null, false);
    });
    "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a) {
      C[a] = new v(a, 3, false, a.toLowerCase(), null, false);
    });
    ["checked", "multiple", "muted", "selected"].forEach(function(a) {
      C[a] = new v(a, 3, true, a, null, false);
    });
    ["capture", "download"].forEach(function(a) {
      C[a] = new v(a, 4, false, a, null, false);
    });
    ["cols", "rows", "size", "span"].forEach(function(a) {
      C[a] = new v(a, 6, false, a, null, false);
    });
    ["rowSpan", "start"].forEach(function(a) {
      C[a] = new v(a, 5, false, a.toLowerCase(), null, false);
    });
    var Ua = /[\-:]([a-z])/g;
    function Va(a) {
      return a[1].toUpperCase();
    }
    "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a) {
      var b = a.replace(
        Ua,
        Va
      );
      C[b] = new v(b, 1, false, a, null, false);
    });
    "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a) {
      var b = a.replace(Ua, Va);
      C[b] = new v(b, 1, false, a, "http://www.w3.org/1999/xlink", false);
    });
    ["xml:base", "xml:lang", "xml:space"].forEach(function(a) {
      var b = a.replace(Ua, Va);
      C[b] = new v(b, 1, false, a, "http://www.w3.org/XML/1998/namespace", false);
    });
    ["tabIndex", "crossOrigin"].forEach(function(a) {
      C[a] = new v(a, 1, false, a.toLowerCase(), null, false);
    });
    C.xlinkHref = new v("xlinkHref", 1, false, "xlink:href", "http://www.w3.org/1999/xlink", true);
    ["src", "href", "action", "formAction"].forEach(function(a) {
      C[a] = new v(a, 1, false, a.toLowerCase(), null, true);
    });
    var Wa = aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
    Wa.hasOwnProperty("ReactCurrentDispatcher") || (Wa.ReactCurrentDispatcher = { current: null });
    Wa.hasOwnProperty("ReactCurrentBatchConfig") || (Wa.ReactCurrentBatchConfig = { suspense: null });
    function Xa(a, b, c, d) {
      var e = C.hasOwnProperty(b) ? C[b] : null;
      var f = null !== e ? 0 === e.type : d ? false : !(2 < b.length) || "o" !== b[0] && "O" !== b[0] || "n" !== b[1] && "N" !== b[1] ? false : true;
      f || (Ta(b, c, e, d) && (c = null), d || null === e ? Ra(b) && (null === c ? a.removeAttribute(b) : a.setAttribute(b, "" + c)) : e.mustUseProperty ? a[e.propertyName] = null === c ? 3 === e.type ? false : "" : c : (b = e.attributeName, d = e.attributeNamespace, null === c ? a.removeAttribute(b) : (e = e.type, c = 3 === e || 4 === e && true === c ? "" : "" + c, d ? a.setAttributeNS(d, b, c) : a.setAttribute(b, c))));
    }
    var Ya = /^(.*)[\\\/]/, E = "function" === typeof Symbol && Symbol.for, Za = E ? Symbol.for("react.element") : 60103, $a = E ? Symbol.for("react.portal") : 60106, ab = E ? Symbol.for("react.fragment") : 60107, bb = E ? Symbol.for("react.strict_mode") : 60108, cb = E ? Symbol.for("react.profiler") : 60114, db = E ? Symbol.for("react.provider") : 60109, eb = E ? Symbol.for("react.context") : 60110, fb = E ? Symbol.for("react.concurrent_mode") : 60111, gb = E ? Symbol.for("react.forward_ref") : 60112, hb = E ? Symbol.for("react.suspense") : 60113, ib = E ? Symbol.for("react.suspense_list") : 60120, jb = E ? Symbol.for("react.memo") : 60115, kb = E ? Symbol.for("react.lazy") : 60116, lb = E ? Symbol.for("react.block") : 60121, mb = "function" === typeof Symbol && Symbol.iterator;
    function nb(a) {
      if (null === a || "object" !== typeof a) return null;
      a = mb && a[mb] || a["@@iterator"];
      return "function" === typeof a ? a : null;
    }
    function ob(a) {
      if (-1 === a._status) {
        a._status = 0;
        var b = a._ctor;
        b = b();
        a._result = b;
        b.then(function(b2) {
          0 === a._status && (b2 = b2.default, a._status = 1, a._result = b2);
        }, function(b2) {
          0 === a._status && (a._status = 2, a._result = b2);
        });
      }
    }
    function pb(a) {
      if (null == a) return null;
      if ("function" === typeof a) return a.displayName || a.name || null;
      if ("string" === typeof a) return a;
      switch (a) {
        case ab:
          return "Fragment";
        case $a:
          return "Portal";
        case cb:
          return "Profiler";
        case bb:
          return "StrictMode";
        case hb:
          return "Suspense";
        case ib:
          return "SuspenseList";
      }
      if ("object" === typeof a) switch (a.$$typeof) {
        case eb:
          return "Context.Consumer";
        case db:
          return "Context.Provider";
        case gb:
          var b = a.render;
          b = b.displayName || b.name || "";
          return a.displayName || ("" !== b ? "ForwardRef(" + b + ")" : "ForwardRef");
        case jb:
          return pb(a.type);
        case lb:
          return pb(a.render);
        case kb:
          if (a = 1 === a._status ? a._result : null) return pb(a);
      }
      return null;
    }
    function qb(a) {
      var b = "";
      do {
        a: switch (a.tag) {
          case 3:
          case 4:
          case 6:
          case 7:
          case 10:
          case 9:
            var c = "";
            break a;
          default:
            var d = a._debugOwner, e = a._debugSource, f = pb(a.type);
            c = null;
            d && (c = pb(d.type));
            d = f;
            f = "";
            e ? f = " (at " + e.fileName.replace(Ya, "") + ":" + e.lineNumber + ")" : c && (f = " (created by " + c + ")");
            c = "\n    in " + (d || "Unknown") + f;
        }
        b += c;
        a = a.return;
      } while (a);
      return b;
    }
    function rb(a) {
      switch (typeof a) {
        case "boolean":
        case "number":
        case "object":
        case "string":
        case "undefined":
          return a;
        default:
          return "";
      }
    }
    function sb(a) {
      var b = a.type;
      return (a = a.nodeName) && "input" === a.toLowerCase() && ("checkbox" === b || "radio" === b);
    }
    function tb(a) {
      var b = sb(a) ? "checked" : "value", c = Object.getOwnPropertyDescriptor(a.constructor.prototype, b), d = "" + a[b];
      if (!a.hasOwnProperty(b) && "undefined" !== typeof c && "function" === typeof c.get && "function" === typeof c.set) {
        var e = c.get, f = c.set;
        Object.defineProperty(a, b, { configurable: true, get: function() {
          return e.call(this);
        }, set: function(a2) {
          d = "" + a2;
          f.call(this, a2);
        } });
        Object.defineProperty(a, b, { enumerable: c.enumerable });
        return { getValue: function() {
          return d;
        }, setValue: function(a2) {
          d = "" + a2;
        }, stopTracking: function() {
          a._valueTracker = null;
          delete a[b];
        } };
      }
    }
    function xb(a) {
      a._valueTracker || (a._valueTracker = tb(a));
    }
    function yb(a) {
      if (!a) return false;
      var b = a._valueTracker;
      if (!b) return true;
      var c = b.getValue();
      var d = "";
      a && (d = sb(a) ? a.checked ? "true" : "false" : a.value);
      a = d;
      return a !== c ? (b.setValue(a), true) : false;
    }
    function zb(a, b) {
      var c = b.checked;
      return n({}, b, { defaultChecked: void 0, defaultValue: void 0, value: void 0, checked: null != c ? c : a._wrapperState.initialChecked });
    }
    function Ab(a, b) {
      var c = null == b.defaultValue ? "" : b.defaultValue, d = null != b.checked ? b.checked : b.defaultChecked;
      c = rb(null != b.value ? b.value : c);
      a._wrapperState = { initialChecked: d, initialValue: c, controlled: "checkbox" === b.type || "radio" === b.type ? null != b.checked : null != b.value };
    }
    function Bb(a, b) {
      b = b.checked;
      null != b && Xa(a, "checked", b, false);
    }
    function Cb(a, b) {
      Bb(a, b);
      var c = rb(b.value), d = b.type;
      if (null != c) if ("number" === d) {
        if (0 === c && "" === a.value || a.value != c) a.value = "" + c;
      } else a.value !== "" + c && (a.value = "" + c);
      else if ("submit" === d || "reset" === d) {
        a.removeAttribute("value");
        return;
      }
      b.hasOwnProperty("value") ? Db(a, b.type, c) : b.hasOwnProperty("defaultValue") && Db(a, b.type, rb(b.defaultValue));
      null == b.checked && null != b.defaultChecked && (a.defaultChecked = !!b.defaultChecked);
    }
    function Eb(a, b, c) {
      if (b.hasOwnProperty("value") || b.hasOwnProperty("defaultValue")) {
        var d = b.type;
        if (!("submit" !== d && "reset" !== d || void 0 !== b.value && null !== b.value)) return;
        b = "" + a._wrapperState.initialValue;
        c || b === a.value || (a.value = b);
        a.defaultValue = b;
      }
      c = a.name;
      "" !== c && (a.name = "");
      a.defaultChecked = !!a._wrapperState.initialChecked;
      "" !== c && (a.name = c);
    }
    function Db(a, b, c) {
      if ("number" !== b || a.ownerDocument.activeElement !== a) null == c ? a.defaultValue = "" + a._wrapperState.initialValue : a.defaultValue !== "" + c && (a.defaultValue = "" + c);
    }
    function Fb(a) {
      var b = "";
      aa.Children.forEach(a, function(a2) {
        null != a2 && (b += a2);
      });
      return b;
    }
    function Gb(a, b) {
      a = n({ children: void 0 }, b);
      if (b = Fb(b.children)) a.children = b;
      return a;
    }
    function Hb(a, b, c, d) {
      a = a.options;
      if (b) {
        b = {};
        for (var e = 0; e < c.length; e++) b["$" + c[e]] = true;
        for (c = 0; c < a.length; c++) e = b.hasOwnProperty("$" + a[c].value), a[c].selected !== e && (a[c].selected = e), e && d && (a[c].defaultSelected = true);
      } else {
        c = "" + rb(c);
        b = null;
        for (e = 0; e < a.length; e++) {
          if (a[e].value === c) {
            a[e].selected = true;
            d && (a[e].defaultSelected = true);
            return;
          }
          null !== b || a[e].disabled || (b = a[e]);
        }
        null !== b && (b.selected = true);
      }
    }
    function Ib(a, b) {
      if (null != b.dangerouslySetInnerHTML) throw Error(u(91));
      return n({}, b, { value: void 0, defaultValue: void 0, children: "" + a._wrapperState.initialValue });
    }
    function Jb(a, b) {
      var c = b.value;
      if (null == c) {
        c = b.children;
        b = b.defaultValue;
        if (null != c) {
          if (null != b) throw Error(u(92));
          if (Array.isArray(c)) {
            if (!(1 >= c.length)) throw Error(u(93));
            c = c[0];
          }
          b = c;
        }
        null == b && (b = "");
        c = b;
      }
      a._wrapperState = { initialValue: rb(c) };
    }
    function Kb(a, b) {
      var c = rb(b.value), d = rb(b.defaultValue);
      null != c && (c = "" + c, c !== a.value && (a.value = c), null == b.defaultValue && a.defaultValue !== c && (a.defaultValue = c));
      null != d && (a.defaultValue = "" + d);
    }
    function Lb(a) {
      var b = a.textContent;
      b === a._wrapperState.initialValue && "" !== b && null !== b && (a.value = b);
    }
    var Mb = { html: "http://www.w3.org/1999/xhtml", svg: "http://www.w3.org/2000/svg" };
    function Nb(a) {
      switch (a) {
        case "svg":
          return "http://www.w3.org/2000/svg";
        case "math":
          return "http://www.w3.org/1998/Math/MathML";
        default:
          return "http://www.w3.org/1999/xhtml";
      }
    }
    function Ob(a, b) {
      return null == a || "http://www.w3.org/1999/xhtml" === a ? Nb(b) : "http://www.w3.org/2000/svg" === a && "foreignObject" === b ? "http://www.w3.org/1999/xhtml" : a;
    }
    var Pb, Qb = (function(a) {
      return "undefined" !== typeof MSApp && MSApp.execUnsafeLocalFunction ? function(b, c, d, e) {
        MSApp.execUnsafeLocalFunction(function() {
          return a(b, c, d, e);
        });
      } : a;
    })(function(a, b) {
      if (a.namespaceURI !== Mb.svg || "innerHTML" in a) a.innerHTML = b;
      else {
        Pb = Pb || document.createElement("div");
        Pb.innerHTML = "<svg>" + b.valueOf().toString() + "</svg>";
        for (b = Pb.firstChild; a.firstChild; ) a.removeChild(a.firstChild);
        for (; b.firstChild; ) a.appendChild(b.firstChild);
      }
    });
    function Rb(a, b) {
      if (b) {
        var c = a.firstChild;
        if (c && c === a.lastChild && 3 === c.nodeType) {
          c.nodeValue = b;
          return;
        }
      }
      a.textContent = b;
    }
    function Sb(a, b) {
      var c = {};
      c[a.toLowerCase()] = b.toLowerCase();
      c["Webkit" + a] = "webkit" + b;
      c["Moz" + a] = "moz" + b;
      return c;
    }
    var Tb = { animationend: Sb("Animation", "AnimationEnd"), animationiteration: Sb("Animation", "AnimationIteration"), animationstart: Sb("Animation", "AnimationStart"), transitionend: Sb("Transition", "TransitionEnd") }, Ub = {}, Vb = {};
    ya && (Vb = document.createElement("div").style, "AnimationEvent" in window || (delete Tb.animationend.animation, delete Tb.animationiteration.animation, delete Tb.animationstart.animation), "TransitionEvent" in window || delete Tb.transitionend.transition);
    function Wb(a) {
      if (Ub[a]) return Ub[a];
      if (!Tb[a]) return a;
      var b = Tb[a], c;
      for (c in b) if (b.hasOwnProperty(c) && c in Vb) return Ub[a] = b[c];
      return a;
    }
    var Xb = Wb("animationend"), Yb = Wb("animationiteration"), Zb = Wb("animationstart"), $b = Wb("transitionend"), ac = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "), bc = new ("function" === typeof WeakMap ? WeakMap : Map)();
    function cc(a) {
      var b = bc.get(a);
      void 0 === b && (b = /* @__PURE__ */ new Map(), bc.set(a, b));
      return b;
    }
    function dc(a) {
      var b = a, c = a;
      if (a.alternate) for (; b.return; ) b = b.return;
      else {
        a = b;
        do
          b = a, 0 !== (b.effectTag & 1026) && (c = b.return), a = b.return;
        while (a);
      }
      return 3 === b.tag ? c : null;
    }
    function ec(a) {
      if (13 === a.tag) {
        var b = a.memoizedState;
        null === b && (a = a.alternate, null !== a && (b = a.memoizedState));
        if (null !== b) return b.dehydrated;
      }
      return null;
    }
    function fc(a) {
      if (dc(a) !== a) throw Error(u(188));
    }
    function gc(a) {
      var b = a.alternate;
      if (!b) {
        b = dc(a);
        if (null === b) throw Error(u(188));
        return b !== a ? null : a;
      }
      for (var c = a, d = b; ; ) {
        var e = c.return;
        if (null === e) break;
        var f = e.alternate;
        if (null === f) {
          d = e.return;
          if (null !== d) {
            c = d;
            continue;
          }
          break;
        }
        if (e.child === f.child) {
          for (f = e.child; f; ) {
            if (f === c) return fc(e), a;
            if (f === d) return fc(e), b;
            f = f.sibling;
          }
          throw Error(u(188));
        }
        if (c.return !== d.return) c = e, d = f;
        else {
          for (var g = false, h = e.child; h; ) {
            if (h === c) {
              g = true;
              c = e;
              d = f;
              break;
            }
            if (h === d) {
              g = true;
              d = e;
              c = f;
              break;
            }
            h = h.sibling;
          }
          if (!g) {
            for (h = f.child; h; ) {
              if (h === c) {
                g = true;
                c = f;
                d = e;
                break;
              }
              if (h === d) {
                g = true;
                d = f;
                c = e;
                break;
              }
              h = h.sibling;
            }
            if (!g) throw Error(u(189));
          }
        }
        if (c.alternate !== d) throw Error(u(190));
      }
      if (3 !== c.tag) throw Error(u(188));
      return c.stateNode.current === c ? a : b;
    }
    function hc(a) {
      a = gc(a);
      if (!a) return null;
      for (var b = a; ; ) {
        if (5 === b.tag || 6 === b.tag) return b;
        if (b.child) b.child.return = b, b = b.child;
        else {
          if (b === a) break;
          for (; !b.sibling; ) {
            if (!b.return || b.return === a) return null;
            b = b.return;
          }
          b.sibling.return = b.return;
          b = b.sibling;
        }
      }
      return null;
    }
    function ic(a, b) {
      if (null == b) throw Error(u(30));
      if (null == a) return b;
      if (Array.isArray(a)) {
        if (Array.isArray(b)) return a.push.apply(a, b), a;
        a.push(b);
        return a;
      }
      return Array.isArray(b) ? [a].concat(b) : [a, b];
    }
    function jc(a, b, c) {
      Array.isArray(a) ? a.forEach(b, c) : a && b.call(c, a);
    }
    var kc = null;
    function lc(a) {
      if (a) {
        var b = a._dispatchListeners, c = a._dispatchInstances;
        if (Array.isArray(b)) for (var d = 0; d < b.length && !a.isPropagationStopped(); d++) oa(a, b[d], c[d]);
        else b && oa(a, b, c);
        a._dispatchListeners = null;
        a._dispatchInstances = null;
        a.isPersistent() || a.constructor.release(a);
      }
    }
    function mc(a) {
      null !== a && (kc = ic(kc, a));
      a = kc;
      kc = null;
      if (a) {
        jc(a, lc);
        if (kc) throw Error(u(95));
        if (fa) throw a = ha, fa = false, ha = null, a;
      }
    }
    function nc(a) {
      a = a.target || a.srcElement || window;
      a.correspondingUseElement && (a = a.correspondingUseElement);
      return 3 === a.nodeType ? a.parentNode : a;
    }
    function oc(a) {
      if (!ya) return false;
      a = "on" + a;
      var b = a in document;
      b || (b = document.createElement("div"), b.setAttribute(a, "return;"), b = "function" === typeof b[a]);
      return b;
    }
    var pc = [];
    function qc(a) {
      a.topLevelType = null;
      a.nativeEvent = null;
      a.targetInst = null;
      a.ancestors.length = 0;
      10 > pc.length && pc.push(a);
    }
    function rc(a, b, c, d) {
      if (pc.length) {
        var e = pc.pop();
        e.topLevelType = a;
        e.eventSystemFlags = d;
        e.nativeEvent = b;
        e.targetInst = c;
        return e;
      }
      return { topLevelType: a, eventSystemFlags: d, nativeEvent: b, targetInst: c, ancestors: [] };
    }
    function sc(a) {
      var b = a.targetInst, c = b;
      do {
        if (!c) {
          a.ancestors.push(c);
          break;
        }
        var d = c;
        if (3 === d.tag) d = d.stateNode.containerInfo;
        else {
          for (; d.return; ) d = d.return;
          d = 3 !== d.tag ? null : d.stateNode.containerInfo;
        }
        if (!d) break;
        b = c.tag;
        5 !== b && 6 !== b || a.ancestors.push(c);
        c = tc(d);
      } while (c);
      for (c = 0; c < a.ancestors.length; c++) {
        b = a.ancestors[c];
        var e = nc(a.nativeEvent);
        d = a.topLevelType;
        var f = a.nativeEvent, g = a.eventSystemFlags;
        0 === c && (g |= 64);
        for (var h = null, k = 0; k < sa.length; k++) {
          var l = sa[k];
          l && (l = l.extractEvents(d, b, f, e, g)) && (h = ic(h, l));
        }
        mc(h);
      }
    }
    function uc(a, b, c) {
      if (!c.has(a)) {
        switch (a) {
          case "scroll":
            vc(b, "scroll", true);
            break;
          case "focus":
          case "blur":
            vc(b, "focus", true);
            vc(b, "blur", true);
            c.set("blur", null);
            c.set("focus", null);
            break;
          case "cancel":
          case "close":
            oc(a) && vc(b, a, true);
            break;
          case "invalid":
          case "submit":
          case "reset":
            break;
          default:
            -1 === ac.indexOf(a) && F(a, b);
        }
        c.set(a, null);
      }
    }
    var wc, xc, yc, zc = false, Ac = [], Bc = null, Cc = null, Dc = null, Ec = /* @__PURE__ */ new Map(), Fc = /* @__PURE__ */ new Map(), Gc = [], Hc = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "), Ic = "focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");
    function Jc(a, b) {
      var c = cc(b);
      Hc.forEach(function(a2) {
        uc(a2, b, c);
      });
      Ic.forEach(function(a2) {
        uc(a2, b, c);
      });
    }
    function Kc(a, b, c, d, e) {
      return { blockedOn: a, topLevelType: b, eventSystemFlags: c | 32, nativeEvent: e, container: d };
    }
    function Lc(a, b) {
      switch (a) {
        case "focus":
        case "blur":
          Bc = null;
          break;
        case "dragenter":
        case "dragleave":
          Cc = null;
          break;
        case "mouseover":
        case "mouseout":
          Dc = null;
          break;
        case "pointerover":
        case "pointerout":
          Ec.delete(b.pointerId);
          break;
        case "gotpointercapture":
        case "lostpointercapture":
          Fc.delete(b.pointerId);
      }
    }
    function Mc(a, b, c, d, e, f) {
      if (null === a || a.nativeEvent !== f) return a = Kc(b, c, d, e, f), null !== b && (b = Nc(b), null !== b && xc(b)), a;
      a.eventSystemFlags |= d;
      return a;
    }
    function Oc(a, b, c, d, e) {
      switch (b) {
        case "focus":
          return Bc = Mc(Bc, a, b, c, d, e), true;
        case "dragenter":
          return Cc = Mc(Cc, a, b, c, d, e), true;
        case "mouseover":
          return Dc = Mc(Dc, a, b, c, d, e), true;
        case "pointerover":
          var f = e.pointerId;
          Ec.set(f, Mc(Ec.get(f) || null, a, b, c, d, e));
          return true;
        case "gotpointercapture":
          return f = e.pointerId, Fc.set(f, Mc(Fc.get(f) || null, a, b, c, d, e)), true;
      }
      return false;
    }
    function Pc(a) {
      var b = tc(a.target);
      if (null !== b) {
        var c = dc(b);
        if (null !== c) {
          if (b = c.tag, 13 === b) {
            if (b = ec(c), null !== b) {
              a.blockedOn = b;
              r.unstable_runWithPriority(a.priority, function() {
                yc(c);
              });
              return;
            }
          } else if (3 === b && c.stateNode.hydrate) {
            a.blockedOn = 3 === c.tag ? c.stateNode.containerInfo : null;
            return;
          }
        }
      }
      a.blockedOn = null;
    }
    function Qc(a) {
      if (null !== a.blockedOn) return false;
      var b = Rc(a.topLevelType, a.eventSystemFlags, a.container, a.nativeEvent);
      if (null !== b) {
        var c = Nc(b);
        null !== c && xc(c);
        a.blockedOn = b;
        return false;
      }
      return true;
    }
    function Sc(a, b, c) {
      Qc(a) && c.delete(b);
    }
    function Tc() {
      for (zc = false; 0 < Ac.length; ) {
        var a = Ac[0];
        if (null !== a.blockedOn) {
          a = Nc(a.blockedOn);
          null !== a && wc(a);
          break;
        }
        var b = Rc(a.topLevelType, a.eventSystemFlags, a.container, a.nativeEvent);
        null !== b ? a.blockedOn = b : Ac.shift();
      }
      null !== Bc && Qc(Bc) && (Bc = null);
      null !== Cc && Qc(Cc) && (Cc = null);
      null !== Dc && Qc(Dc) && (Dc = null);
      Ec.forEach(Sc);
      Fc.forEach(Sc);
    }
    function Uc(a, b) {
      a.blockedOn === b && (a.blockedOn = null, zc || (zc = true, r.unstable_scheduleCallback(r.unstable_NormalPriority, Tc)));
    }
    function Vc(a) {
      function b(b2) {
        return Uc(b2, a);
      }
      if (0 < Ac.length) {
        Uc(Ac[0], a);
        for (var c = 1; c < Ac.length; c++) {
          var d = Ac[c];
          d.blockedOn === a && (d.blockedOn = null);
        }
      }
      null !== Bc && Uc(Bc, a);
      null !== Cc && Uc(Cc, a);
      null !== Dc && Uc(Dc, a);
      Ec.forEach(b);
      Fc.forEach(b);
      for (c = 0; c < Gc.length; c++) d = Gc[c], d.blockedOn === a && (d.blockedOn = null);
      for (; 0 < Gc.length && (c = Gc[0], null === c.blockedOn); ) Pc(c), null === c.blockedOn && Gc.shift();
    }
    var Wc = {}, Yc = /* @__PURE__ */ new Map(), Zc = /* @__PURE__ */ new Map(), $c = [
      "abort",
      "abort",
      Xb,
      "animationEnd",
      Yb,
      "animationIteration",
      Zb,
      "animationStart",
      "canplay",
      "canPlay",
      "canplaythrough",
      "canPlayThrough",
      "durationchange",
      "durationChange",
      "emptied",
      "emptied",
      "encrypted",
      "encrypted",
      "ended",
      "ended",
      "error",
      "error",
      "gotpointercapture",
      "gotPointerCapture",
      "load",
      "load",
      "loadeddata",
      "loadedData",
      "loadedmetadata",
      "loadedMetadata",
      "loadstart",
      "loadStart",
      "lostpointercapture",
      "lostPointerCapture",
      "playing",
      "playing",
      "progress",
      "progress",
      "seeking",
      "seeking",
      "stalled",
      "stalled",
      "suspend",
      "suspend",
      "timeupdate",
      "timeUpdate",
      $b,
      "transitionEnd",
      "waiting",
      "waiting"
    ];
    function ad(a, b) {
      for (var c = 0; c < a.length; c += 2) {
        var d = a[c], e = a[c + 1], f = "on" + (e[0].toUpperCase() + e.slice(1));
        f = { phasedRegistrationNames: { bubbled: f, captured: f + "Capture" }, dependencies: [d], eventPriority: b };
        Zc.set(d, b);
        Yc.set(d, f);
        Wc[e] = f;
      }
    }
    ad("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "), 0);
    ad("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "), 1);
    ad($c, 2);
    for (var bd = "change selectionchange textInput compositionstart compositionend compositionupdate".split(" "), cd = 0; cd < bd.length; cd++) Zc.set(bd[cd], 0);
    var dd = r.unstable_UserBlockingPriority, ed = r.unstable_runWithPriority, fd = true;
    function F(a, b) {
      vc(b, a, false);
    }
    function vc(a, b, c) {
      var d = Zc.get(b);
      switch (void 0 === d ? 2 : d) {
        case 0:
          d = gd.bind(null, b, 1, a);
          break;
        case 1:
          d = hd.bind(null, b, 1, a);
          break;
        default:
          d = id.bind(null, b, 1, a);
      }
      c ? a.addEventListener(b, d, true) : a.addEventListener(b, d, false);
    }
    function gd(a, b, c, d) {
      Ja || Ha();
      var e = id, f = Ja;
      Ja = true;
      try {
        Ga(e, a, b, c, d);
      } finally {
        (Ja = f) || La();
      }
    }
    function hd(a, b, c, d) {
      ed(dd, id.bind(null, a, b, c, d));
    }
    function id(a, b, c, d) {
      if (fd) if (0 < Ac.length && -1 < Hc.indexOf(a)) a = Kc(null, a, b, c, d), Ac.push(a);
      else {
        var e = Rc(a, b, c, d);
        if (null === e) Lc(a, d);
        else if (-1 < Hc.indexOf(a)) a = Kc(e, a, b, c, d), Ac.push(a);
        else if (!Oc(e, a, b, c, d)) {
          Lc(a, d);
          a = rc(a, d, null, b);
          try {
            Ma(sc, a);
          } finally {
            qc(a);
          }
        }
      }
    }
    function Rc(a, b, c, d) {
      c = nc(d);
      c = tc(c);
      if (null !== c) {
        var e = dc(c);
        if (null === e) c = null;
        else {
          var f = e.tag;
          if (13 === f) {
            c = ec(e);
            if (null !== c) return c;
            c = null;
          } else if (3 === f) {
            if (e.stateNode.hydrate) return 3 === e.tag ? e.stateNode.containerInfo : null;
            c = null;
          } else e !== c && (c = null);
        }
      }
      a = rc(a, d, c, b);
      try {
        Ma(sc, a);
      } finally {
        qc(a);
      }
      return null;
    }
    var jd = {
      animationIterationCount: true,
      borderImageOutset: true,
      borderImageSlice: true,
      borderImageWidth: true,
      boxFlex: true,
      boxFlexGroup: true,
      boxOrdinalGroup: true,
      columnCount: true,
      columns: true,
      flex: true,
      flexGrow: true,
      flexPositive: true,
      flexShrink: true,
      flexNegative: true,
      flexOrder: true,
      gridArea: true,
      gridRow: true,
      gridRowEnd: true,
      gridRowSpan: true,
      gridRowStart: true,
      gridColumn: true,
      gridColumnEnd: true,
      gridColumnSpan: true,
      gridColumnStart: true,
      fontWeight: true,
      lineClamp: true,
      lineHeight: true,
      opacity: true,
      order: true,
      orphans: true,
      tabSize: true,
      widows: true,
      zIndex: true,
      zoom: true,
      fillOpacity: true,
      floodOpacity: true,
      stopOpacity: true,
      strokeDasharray: true,
      strokeDashoffset: true,
      strokeMiterlimit: true,
      strokeOpacity: true,
      strokeWidth: true
    }, kd = ["Webkit", "ms", "Moz", "O"];
    Object.keys(jd).forEach(function(a) {
      kd.forEach(function(b) {
        b = b + a.charAt(0).toUpperCase() + a.substring(1);
        jd[b] = jd[a];
      });
    });
    function ld(a, b, c) {
      return null == b || "boolean" === typeof b || "" === b ? "" : c || "number" !== typeof b || 0 === b || jd.hasOwnProperty(a) && jd[a] ? ("" + b).trim() : b + "px";
    }
    function md(a, b) {
      a = a.style;
      for (var c in b) if (b.hasOwnProperty(c)) {
        var d = 0 === c.indexOf("--"), e = ld(c, b[c], d);
        "float" === c && (c = "cssFloat");
        d ? a.setProperty(c, e) : a[c] = e;
      }
    }
    var nd = n({ menuitem: true }, { area: true, base: true, br: true, col: true, embed: true, hr: true, img: true, input: true, keygen: true, link: true, meta: true, param: true, source: true, track: true, wbr: true });
    function od(a, b) {
      if (b) {
        if (nd[a] && (null != b.children || null != b.dangerouslySetInnerHTML)) throw Error(u(137, a, ""));
        if (null != b.dangerouslySetInnerHTML) {
          if (null != b.children) throw Error(u(60));
          if (!("object" === typeof b.dangerouslySetInnerHTML && "__html" in b.dangerouslySetInnerHTML)) throw Error(u(61));
        }
        if (null != b.style && "object" !== typeof b.style) throw Error(u(62, ""));
      }
    }
    function pd(a, b) {
      if (-1 === a.indexOf("-")) return "string" === typeof b.is;
      switch (a) {
        case "annotation-xml":
        case "color-profile":
        case "font-face":
        case "font-face-src":
        case "font-face-uri":
        case "font-face-format":
        case "font-face-name":
        case "missing-glyph":
          return false;
        default:
          return true;
      }
    }
    var qd = Mb.html;
    function rd(a, b) {
      a = 9 === a.nodeType || 11 === a.nodeType ? a : a.ownerDocument;
      var c = cc(a);
      b = wa[b];
      for (var d = 0; d < b.length; d++) uc(b[d], a, c);
    }
    function sd() {
    }
    function td(a) {
      a = a || ("undefined" !== typeof document ? document : void 0);
      if ("undefined" === typeof a) return null;
      try {
        return a.activeElement || a.body;
      } catch (b) {
        return a.body;
      }
    }
    function ud(a) {
      for (; a && a.firstChild; ) a = a.firstChild;
      return a;
    }
    function vd(a, b) {
      var c = ud(a);
      a = 0;
      for (var d; c; ) {
        if (3 === c.nodeType) {
          d = a + c.textContent.length;
          if (a <= b && d >= b) return { node: c, offset: b - a };
          a = d;
        }
        a: {
          for (; c; ) {
            if (c.nextSibling) {
              c = c.nextSibling;
              break a;
            }
            c = c.parentNode;
          }
          c = void 0;
        }
        c = ud(c);
      }
    }
    function wd(a, b) {
      return a && b ? a === b ? true : a && 3 === a.nodeType ? false : b && 3 === b.nodeType ? wd(a, b.parentNode) : "contains" in a ? a.contains(b) : a.compareDocumentPosition ? !!(a.compareDocumentPosition(b) & 16) : false : false;
    }
    function xd() {
      for (var a = window, b = td(); b instanceof a.HTMLIFrameElement; ) {
        try {
          var c = "string" === typeof b.contentWindow.location.href;
        } catch (d) {
          c = false;
        }
        if (c) a = b.contentWindow;
        else break;
        b = td(a.document);
      }
      return b;
    }
    function yd(a) {
      var b = a && a.nodeName && a.nodeName.toLowerCase();
      return b && ("input" === b && ("text" === a.type || "search" === a.type || "tel" === a.type || "url" === a.type || "password" === a.type) || "textarea" === b || "true" === a.contentEditable);
    }
    var zd = "$", Ad = "/$", Bd = "$?", Cd = "$!", Dd = null, Ed = null;
    function Fd(a, b) {
      switch (a) {
        case "button":
        case "input":
        case "select":
        case "textarea":
          return !!b.autoFocus;
      }
      return false;
    }
    function Gd(a, b) {
      return "textarea" === a || "option" === a || "noscript" === a || "string" === typeof b.children || "number" === typeof b.children || "object" === typeof b.dangerouslySetInnerHTML && null !== b.dangerouslySetInnerHTML && null != b.dangerouslySetInnerHTML.__html;
    }
    var Hd = "function" === typeof setTimeout ? setTimeout : void 0, Id = "function" === typeof clearTimeout ? clearTimeout : void 0;
    function Jd(a) {
      for (; null != a; a = a.nextSibling) {
        var b = a.nodeType;
        if (1 === b || 3 === b) break;
      }
      return a;
    }
    function Kd(a) {
      a = a.previousSibling;
      for (var b = 0; a; ) {
        if (8 === a.nodeType) {
          var c = a.data;
          if (c === zd || c === Cd || c === Bd) {
            if (0 === b) return a;
            b--;
          } else c === Ad && b++;
        }
        a = a.previousSibling;
      }
      return null;
    }
    var Ld = Math.random().toString(36).slice(2), Md = "__reactInternalInstance$" + Ld, Nd = "__reactEventHandlers$" + Ld, Od = "__reactContainere$" + Ld;
    function tc(a) {
      var b = a[Md];
      if (b) return b;
      for (var c = a.parentNode; c; ) {
        if (b = c[Od] || c[Md]) {
          c = b.alternate;
          if (null !== b.child || null !== c && null !== c.child) for (a = Kd(a); null !== a; ) {
            if (c = a[Md]) return c;
            a = Kd(a);
          }
          return b;
        }
        a = c;
        c = a.parentNode;
      }
      return null;
    }
    function Nc(a) {
      a = a[Md] || a[Od];
      return !a || 5 !== a.tag && 6 !== a.tag && 13 !== a.tag && 3 !== a.tag ? null : a;
    }
    function Pd(a) {
      if (5 === a.tag || 6 === a.tag) return a.stateNode;
      throw Error(u(33));
    }
    function Qd(a) {
      return a[Nd] || null;
    }
    function Rd(a) {
      do
        a = a.return;
      while (a && 5 !== a.tag);
      return a ? a : null;
    }
    function Sd(a, b) {
      var c = a.stateNode;
      if (!c) return null;
      var d = la(c);
      if (!d) return null;
      c = d[b];
      a: switch (b) {
        case "onClick":
        case "onClickCapture":
        case "onDoubleClick":
        case "onDoubleClickCapture":
        case "onMouseDown":
        case "onMouseDownCapture":
        case "onMouseMove":
        case "onMouseMoveCapture":
        case "onMouseUp":
        case "onMouseUpCapture":
        case "onMouseEnter":
          (d = !d.disabled) || (a = a.type, d = !("button" === a || "input" === a || "select" === a || "textarea" === a));
          a = !d;
          break a;
        default:
          a = false;
      }
      if (a) return null;
      if (c && "function" !== typeof c) throw Error(u(
        231,
        b,
        typeof c
      ));
      return c;
    }
    function Td(a, b, c) {
      if (b = Sd(a, c.dispatchConfig.phasedRegistrationNames[b])) c._dispatchListeners = ic(c._dispatchListeners, b), c._dispatchInstances = ic(c._dispatchInstances, a);
    }
    function Ud(a) {
      if (a && a.dispatchConfig.phasedRegistrationNames) {
        for (var b = a._targetInst, c = []; b; ) c.push(b), b = Rd(b);
        for (b = c.length; 0 < b--; ) Td(c[b], "captured", a);
        for (b = 0; b < c.length; b++) Td(c[b], "bubbled", a);
      }
    }
    function Vd(a, b, c) {
      a && c && c.dispatchConfig.registrationName && (b = Sd(a, c.dispatchConfig.registrationName)) && (c._dispatchListeners = ic(c._dispatchListeners, b), c._dispatchInstances = ic(c._dispatchInstances, a));
    }
    function Wd(a) {
      a && a.dispatchConfig.registrationName && Vd(a._targetInst, null, a);
    }
    function Xd(a) {
      jc(a, Ud);
    }
    var Yd = null, Zd = null, $d = null;
    function ae() {
      if ($d) return $d;
      var a, b = Zd, c = b.length, d, e = "value" in Yd ? Yd.value : Yd.textContent, f = e.length;
      for (a = 0; a < c && b[a] === e[a]; a++) ;
      var g = c - a;
      for (d = 1; d <= g && b[c - d] === e[f - d]; d++) ;
      return $d = e.slice(a, 1 < d ? 1 - d : void 0);
    }
    function be() {
      return true;
    }
    function ce() {
      return false;
    }
    function G(a, b, c, d) {
      this.dispatchConfig = a;
      this._targetInst = b;
      this.nativeEvent = c;
      a = this.constructor.Interface;
      for (var e in a) a.hasOwnProperty(e) && ((b = a[e]) ? this[e] = b(c) : "target" === e ? this.target = d : this[e] = c[e]);
      this.isDefaultPrevented = (null != c.defaultPrevented ? c.defaultPrevented : false === c.returnValue) ? be : ce;
      this.isPropagationStopped = ce;
      return this;
    }
    n(G.prototype, { preventDefault: function() {
      this.defaultPrevented = true;
      var a = this.nativeEvent;
      a && (a.preventDefault ? a.preventDefault() : "unknown" !== typeof a.returnValue && (a.returnValue = false), this.isDefaultPrevented = be);
    }, stopPropagation: function() {
      var a = this.nativeEvent;
      a && (a.stopPropagation ? a.stopPropagation() : "unknown" !== typeof a.cancelBubble && (a.cancelBubble = true), this.isPropagationStopped = be);
    }, persist: function() {
      this.isPersistent = be;
    }, isPersistent: ce, destructor: function() {
      var a = this.constructor.Interface, b;
      for (b in a) this[b] = null;
      this.nativeEvent = this._targetInst = this.dispatchConfig = null;
      this.isPropagationStopped = this.isDefaultPrevented = ce;
      this._dispatchInstances = this._dispatchListeners = null;
    } });
    G.Interface = { type: null, target: null, currentTarget: function() {
      return null;
    }, eventPhase: null, bubbles: null, cancelable: null, timeStamp: function(a) {
      return a.timeStamp || Date.now();
    }, defaultPrevented: null, isTrusted: null };
    G.extend = function(a) {
      function b() {
      }
      function c() {
        return d.apply(this, arguments);
      }
      var d = this;
      b.prototype = d.prototype;
      var e = new b();
      n(e, c.prototype);
      c.prototype = e;
      c.prototype.constructor = c;
      c.Interface = n({}, d.Interface, a);
      c.extend = d.extend;
      de(c);
      return c;
    };
    de(G);
    function ee(a, b, c, d) {
      if (this.eventPool.length) {
        var e = this.eventPool.pop();
        this.call(e, a, b, c, d);
        return e;
      }
      return new this(a, b, c, d);
    }
    function fe(a) {
      if (!(a instanceof this)) throw Error(u(279));
      a.destructor();
      10 > this.eventPool.length && this.eventPool.push(a);
    }
    function de(a) {
      a.eventPool = [];
      a.getPooled = ee;
      a.release = fe;
    }
    var ge = G.extend({ data: null }), he = G.extend({ data: null }), ie = [9, 13, 27, 32], je = ya && "CompositionEvent" in window, ke = null;
    ya && "documentMode" in document && (ke = document.documentMode);
    var le = ya && "TextEvent" in window && !ke, me = ya && (!je || ke && 8 < ke && 11 >= ke), ne = String.fromCharCode(32), oe = { beforeInput: { phasedRegistrationNames: { bubbled: "onBeforeInput", captured: "onBeforeInputCapture" }, dependencies: ["compositionend", "keypress", "textInput", "paste"] }, compositionEnd: { phasedRegistrationNames: { bubbled: "onCompositionEnd", captured: "onCompositionEndCapture" }, dependencies: "blur compositionend keydown keypress keyup mousedown".split(" ") }, compositionStart: { phasedRegistrationNames: {
      bubbled: "onCompositionStart",
      captured: "onCompositionStartCapture"
    }, dependencies: "blur compositionstart keydown keypress keyup mousedown".split(" ") }, compositionUpdate: { phasedRegistrationNames: { bubbled: "onCompositionUpdate", captured: "onCompositionUpdateCapture" }, dependencies: "blur compositionupdate keydown keypress keyup mousedown".split(" ") } }, pe = false;
    function qe(a, b) {
      switch (a) {
        case "keyup":
          return -1 !== ie.indexOf(b.keyCode);
        case "keydown":
          return 229 !== b.keyCode;
        case "keypress":
        case "mousedown":
        case "blur":
          return true;
        default:
          return false;
      }
    }
    function re(a) {
      a = a.detail;
      return "object" === typeof a && "data" in a ? a.data : null;
    }
    var se = false;
    function te(a, b) {
      switch (a) {
        case "compositionend":
          return re(b);
        case "keypress":
          if (32 !== b.which) return null;
          pe = true;
          return ne;
        case "textInput":
          return a = b.data, a === ne && pe ? null : a;
        default:
          return null;
      }
    }
    function ue(a, b) {
      if (se) return "compositionend" === a || !je && qe(a, b) ? (a = ae(), $d = Zd = Yd = null, se = false, a) : null;
      switch (a) {
        case "paste":
          return null;
        case "keypress":
          if (!(b.ctrlKey || b.altKey || b.metaKey) || b.ctrlKey && b.altKey) {
            if (b.char && 1 < b.char.length) return b.char;
            if (b.which) return String.fromCharCode(b.which);
          }
          return null;
        case "compositionend":
          return me && "ko" !== b.locale ? null : b.data;
        default:
          return null;
      }
    }
    var ve = { eventTypes: oe, extractEvents: function(a, b, c, d) {
      var e;
      if (je) b: {
        switch (a) {
          case "compositionstart":
            var f = oe.compositionStart;
            break b;
          case "compositionend":
            f = oe.compositionEnd;
            break b;
          case "compositionupdate":
            f = oe.compositionUpdate;
            break b;
        }
        f = void 0;
      }
      else se ? qe(a, c) && (f = oe.compositionEnd) : "keydown" === a && 229 === c.keyCode && (f = oe.compositionStart);
      f ? (me && "ko" !== c.locale && (se || f !== oe.compositionStart ? f === oe.compositionEnd && se && (e = ae()) : (Yd = d, Zd = "value" in Yd ? Yd.value : Yd.textContent, se = true)), f = ge.getPooled(
        f,
        b,
        c,
        d
      ), e ? f.data = e : (e = re(c), null !== e && (f.data = e)), Xd(f), e = f) : e = null;
      (a = le ? te(a, c) : ue(a, c)) ? (b = he.getPooled(oe.beforeInput, b, c, d), b.data = a, Xd(b)) : b = null;
      return null === e ? b : null === b ? e : [e, b];
    } }, we = { color: true, date: true, datetime: true, "datetime-local": true, email: true, month: true, number: true, password: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true };
    function xe(a) {
      var b = a && a.nodeName && a.nodeName.toLowerCase();
      return "input" === b ? !!we[a.type] : "textarea" === b ? true : false;
    }
    var ye = { change: { phasedRegistrationNames: { bubbled: "onChange", captured: "onChangeCapture" }, dependencies: "blur change click focus input keydown keyup selectionchange".split(" ") } };
    function ze(a, b, c) {
      a = G.getPooled(ye.change, a, b, c);
      a.type = "change";
      Da(c);
      Xd(a);
      return a;
    }
    var Ae = null, Be = null;
    function Ce(a) {
      mc(a);
    }
    function De(a) {
      var b = Pd(a);
      if (yb(b)) return a;
    }
    function Ee(a, b) {
      if ("change" === a) return b;
    }
    var Fe = false;
    ya && (Fe = oc("input") && (!document.documentMode || 9 < document.documentMode));
    function Ge() {
      Ae && (Ae.detachEvent("onpropertychange", He), Be = Ae = null);
    }
    function He(a) {
      if ("value" === a.propertyName && De(Be)) if (a = ze(Be, a, nc(a)), Ja) mc(a);
      else {
        Ja = true;
        try {
          Fa(Ce, a);
        } finally {
          Ja = false, La();
        }
      }
    }
    function Ie(a, b, c) {
      "focus" === a ? (Ge(), Ae = b, Be = c, Ae.attachEvent("onpropertychange", He)) : "blur" === a && Ge();
    }
    function Je(a) {
      if ("selectionchange" === a || "keyup" === a || "keydown" === a) return De(Be);
    }
    function Ke(a, b) {
      if ("click" === a) return De(b);
    }
    function Le(a, b) {
      if ("input" === a || "change" === a) return De(b);
    }
    var Me = { eventTypes: ye, _isInputEventSupported: Fe, extractEvents: function(a, b, c, d) {
      var e = b ? Pd(b) : window, f = e.nodeName && e.nodeName.toLowerCase();
      if ("select" === f || "input" === f && "file" === e.type) var g = Ee;
      else if (xe(e)) if (Fe) g = Le;
      else {
        g = Je;
        var h = Ie;
      }
      else (f = e.nodeName) && "input" === f.toLowerCase() && ("checkbox" === e.type || "radio" === e.type) && (g = Ke);
      if (g && (g = g(a, b))) return ze(g, c, d);
      h && h(a, e, b);
      "blur" === a && (a = e._wrapperState) && a.controlled && "number" === e.type && Db(e, "number", e.value);
    } }, Ne = G.extend({ view: null, detail: null }), Oe = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" };
    function Pe(a) {
      var b = this.nativeEvent;
      return b.getModifierState ? b.getModifierState(a) : (a = Oe[a]) ? !!b[a] : false;
    }
    function Qe() {
      return Pe;
    }
    var Re = 0, Se = 0, Te = false, Ue = false, Ve = Ne.extend({ screenX: null, screenY: null, clientX: null, clientY: null, pageX: null, pageY: null, ctrlKey: null, shiftKey: null, altKey: null, metaKey: null, getModifierState: Qe, button: null, buttons: null, relatedTarget: function(a) {
      return a.relatedTarget || (a.fromElement === a.srcElement ? a.toElement : a.fromElement);
    }, movementX: function(a) {
      if ("movementX" in a) return a.movementX;
      var b = Re;
      Re = a.screenX;
      return Te ? "mousemove" === a.type ? a.screenX - b : 0 : (Te = true, 0);
    }, movementY: function(a) {
      if ("movementY" in a) return a.movementY;
      var b = Se;
      Se = a.screenY;
      return Ue ? "mousemove" === a.type ? a.screenY - b : 0 : (Ue = true, 0);
    } }), We = Ve.extend({ pointerId: null, width: null, height: null, pressure: null, tangentialPressure: null, tiltX: null, tiltY: null, twist: null, pointerType: null, isPrimary: null }), Xe = { mouseEnter: { registrationName: "onMouseEnter", dependencies: ["mouseout", "mouseover"] }, mouseLeave: { registrationName: "onMouseLeave", dependencies: ["mouseout", "mouseover"] }, pointerEnter: { registrationName: "onPointerEnter", dependencies: ["pointerout", "pointerover"] }, pointerLeave: {
      registrationName: "onPointerLeave",
      dependencies: ["pointerout", "pointerover"]
    } }, Ye = { eventTypes: Xe, extractEvents: function(a, b, c, d, e) {
      var f = "mouseover" === a || "pointerover" === a, g = "mouseout" === a || "pointerout" === a;
      if (f && 0 === (e & 32) && (c.relatedTarget || c.fromElement) || !g && !f) return null;
      f = d.window === d ? d : (f = d.ownerDocument) ? f.defaultView || f.parentWindow : window;
      if (g) {
        if (g = b, b = (b = c.relatedTarget || c.toElement) ? tc(b) : null, null !== b) {
          var h = dc(b);
          if (b !== h || 5 !== b.tag && 6 !== b.tag) b = null;
        }
      } else g = null;
      if (g === b) return null;
      if ("mouseout" === a || "mouseover" === a) {
        var k = Ve;
        var l = Xe.mouseLeave;
        var m = Xe.mouseEnter;
        var p = "mouse";
      } else if ("pointerout" === a || "pointerover" === a) k = We, l = Xe.pointerLeave, m = Xe.pointerEnter, p = "pointer";
      a = null == g ? f : Pd(g);
      f = null == b ? f : Pd(b);
      l = k.getPooled(l, g, c, d);
      l.type = p + "leave";
      l.target = a;
      l.relatedTarget = f;
      c = k.getPooled(m, b, c, d);
      c.type = p + "enter";
      c.target = f;
      c.relatedTarget = a;
      d = g;
      p = b;
      if (d && p) a: {
        k = d;
        m = p;
        g = 0;
        for (a = k; a; a = Rd(a)) g++;
        a = 0;
        for (b = m; b; b = Rd(b)) a++;
        for (; 0 < g - a; ) k = Rd(k), g--;
        for (; 0 < a - g; ) m = Rd(m), a--;
        for (; g--; ) {
          if (k === m || k === m.alternate) break a;
          k = Rd(k);
          m = Rd(m);
        }
        k = null;
      }
      else k = null;
      m = k;
      for (k = []; d && d !== m; ) {
        g = d.alternate;
        if (null !== g && g === m) break;
        k.push(d);
        d = Rd(d);
      }
      for (d = []; p && p !== m; ) {
        g = p.alternate;
        if (null !== g && g === m) break;
        d.push(p);
        p = Rd(p);
      }
      for (p = 0; p < k.length; p++) Vd(k[p], "bubbled", l);
      for (p = d.length; 0 < p--; ) Vd(d[p], "captured", c);
      return 0 === (e & 64) ? [l] : [l, c];
    } };
    function Ze(a, b) {
      return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b;
    }
    var $e = "function" === typeof Object.is ? Object.is : Ze, af = Object.prototype.hasOwnProperty;
    function bf(a, b) {
      if ($e(a, b)) return true;
      if ("object" !== typeof a || null === a || "object" !== typeof b || null === b) return false;
      var c = Object.keys(a), d = Object.keys(b);
      if (c.length !== d.length) return false;
      for (d = 0; d < c.length; d++) if (!af.call(b, c[d]) || !$e(a[c[d]], b[c[d]])) return false;
      return true;
    }
    var cf = ya && "documentMode" in document && 11 >= document.documentMode, df = { select: { phasedRegistrationNames: { bubbled: "onSelect", captured: "onSelectCapture" }, dependencies: "blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ") } }, ef = null, ff = null, gf = null, hf = false;
    function jf(a, b) {
      var c = b.window === b ? b.document : 9 === b.nodeType ? b : b.ownerDocument;
      if (hf || null == ef || ef !== td(c)) return null;
      c = ef;
      "selectionStart" in c && yd(c) ? c = { start: c.selectionStart, end: c.selectionEnd } : (c = (c.ownerDocument && c.ownerDocument.defaultView || window).getSelection(), c = { anchorNode: c.anchorNode, anchorOffset: c.anchorOffset, focusNode: c.focusNode, focusOffset: c.focusOffset });
      return gf && bf(gf, c) ? null : (gf = c, a = G.getPooled(df.select, ff, a, b), a.type = "select", a.target = ef, Xd(a), a);
    }
    var kf = { eventTypes: df, extractEvents: function(a, b, c, d, e, f) {
      e = f || (d.window === d ? d.document : 9 === d.nodeType ? d : d.ownerDocument);
      if (!(f = !e)) {
        a: {
          e = cc(e);
          f = wa.onSelect;
          for (var g = 0; g < f.length; g++) if (!e.has(f[g])) {
            e = false;
            break a;
          }
          e = true;
        }
        f = !e;
      }
      if (f) return null;
      e = b ? Pd(b) : window;
      switch (a) {
        case "focus":
          if (xe(e) || "true" === e.contentEditable) ef = e, ff = b, gf = null;
          break;
        case "blur":
          gf = ff = ef = null;
          break;
        case "mousedown":
          hf = true;
          break;
        case "contextmenu":
        case "mouseup":
        case "dragend":
          return hf = false, jf(c, d);
        case "selectionchange":
          if (cf) break;
        case "keydown":
        case "keyup":
          return jf(c, d);
      }
      return null;
    } }, lf = G.extend({ animationName: null, elapsedTime: null, pseudoElement: null }), mf = G.extend({ clipboardData: function(a) {
      return "clipboardData" in a ? a.clipboardData : window.clipboardData;
    } }), nf = Ne.extend({ relatedTarget: null });
    function of(a) {
      var b = a.keyCode;
      "charCode" in a ? (a = a.charCode, 0 === a && 13 === b && (a = 13)) : a = b;
      10 === a && (a = 13);
      return 32 <= a || 13 === a ? a : 0;
    }
    var pf = { Esc: "Escape", Spacebar: " ", Left: "ArrowLeft", Up: "ArrowUp", Right: "ArrowRight", Down: "ArrowDown", Del: "Delete", Win: "OS", Menu: "ContextMenu", Apps: "ContextMenu", Scroll: "ScrollLock", MozPrintableKey: "Unidentified" }, qf = {
      8: "Backspace",
      9: "Tab",
      12: "Clear",
      13: "Enter",
      16: "Shift",
      17: "Control",
      18: "Alt",
      19: "Pause",
      20: "CapsLock",
      27: "Escape",
      32: " ",
      33: "PageUp",
      34: "PageDown",
      35: "End",
      36: "Home",
      37: "ArrowLeft",
      38: "ArrowUp",
      39: "ArrowRight",
      40: "ArrowDown",
      45: "Insert",
      46: "Delete",
      112: "F1",
      113: "F2",
      114: "F3",
      115: "F4",
      116: "F5",
      117: "F6",
      118: "F7",
      119: "F8",
      120: "F9",
      121: "F10",
      122: "F11",
      123: "F12",
      144: "NumLock",
      145: "ScrollLock",
      224: "Meta"
    }, rf = Ne.extend({ key: function(a) {
      if (a.key) {
        var b = pf[a.key] || a.key;
        if ("Unidentified" !== b) return b;
      }
      return "keypress" === a.type ? (a = of(a), 13 === a ? "Enter" : String.fromCharCode(a)) : "keydown" === a.type || "keyup" === a.type ? qf[a.keyCode] || "Unidentified" : "";
    }, location: null, ctrlKey: null, shiftKey: null, altKey: null, metaKey: null, repeat: null, locale: null, getModifierState: Qe, charCode: function(a) {
      return "keypress" === a.type ? of(a) : 0;
    }, keyCode: function(a) {
      return "keydown" === a.type || "keyup" === a.type ? a.keyCode : 0;
    }, which: function(a) {
      return "keypress" === a.type ? of(a) : "keydown" === a.type || "keyup" === a.type ? a.keyCode : 0;
    } }), sf = Ve.extend({ dataTransfer: null }), tf = Ne.extend({ touches: null, targetTouches: null, changedTouches: null, altKey: null, metaKey: null, ctrlKey: null, shiftKey: null, getModifierState: Qe }), uf = G.extend({ propertyName: null, elapsedTime: null, pseudoElement: null }), vf = Ve.extend({ deltaX: function(a) {
      return "deltaX" in a ? a.deltaX : "wheelDeltaX" in a ? -a.wheelDeltaX : 0;
    }, deltaY: function(a) {
      return "deltaY" in a ? a.deltaY : "wheelDeltaY" in a ? -a.wheelDeltaY : "wheelDelta" in a ? -a.wheelDelta : 0;
    }, deltaZ: null, deltaMode: null }), wf = { eventTypes: Wc, extractEvents: function(a, b, c, d) {
      var e = Yc.get(a);
      if (!e) return null;
      switch (a) {
        case "keypress":
          if (0 === of(c)) return null;
        case "keydown":
        case "keyup":
          a = rf;
          break;
        case "blur":
        case "focus":
          a = nf;
          break;
        case "click":
          if (2 === c.button) return null;
        case "auxclick":
        case "dblclick":
        case "mousedown":
        case "mousemove":
        case "mouseup":
        case "mouseout":
        case "mouseover":
        case "contextmenu":
          a = Ve;
          break;
        case "drag":
        case "dragend":
        case "dragenter":
        case "dragexit":
        case "dragleave":
        case "dragover":
        case "dragstart":
        case "drop":
          a = sf;
          break;
        case "touchcancel":
        case "touchend":
        case "touchmove":
        case "touchstart":
          a = tf;
          break;
        case Xb:
        case Yb:
        case Zb:
          a = lf;
          break;
        case $b:
          a = uf;
          break;
        case "scroll":
          a = Ne;
          break;
        case "wheel":
          a = vf;
          break;
        case "copy":
        case "cut":
        case "paste":
          a = mf;
          break;
        case "gotpointercapture":
        case "lostpointercapture":
        case "pointercancel":
        case "pointerdown":
        case "pointermove":
        case "pointerout":
        case "pointerover":
        case "pointerup":
          a = We;
          break;
        default:
          a = G;
      }
      b = a.getPooled(e, b, c, d);
      Xd(b);
      return b;
    } };
    if (pa) throw Error(u(101));
    pa = Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" "));
    ra();
    var xf = Nc;
    la = Qd;
    ma = xf;
    na = Pd;
    xa({ SimpleEventPlugin: wf, EnterLeaveEventPlugin: Ye, ChangeEventPlugin: Me, SelectEventPlugin: kf, BeforeInputEventPlugin: ve });
    var yf = [], zf = -1;
    function H(a) {
      0 > zf || (a.current = yf[zf], yf[zf] = null, zf--);
    }
    function I(a, b) {
      zf++;
      yf[zf] = a.current;
      a.current = b;
    }
    var Af = {}, J = { current: Af }, K = { current: false }, Bf = Af;
    function Cf(a, b) {
      var c = a.type.contextTypes;
      if (!c) return Af;
      var d = a.stateNode;
      if (d && d.__reactInternalMemoizedUnmaskedChildContext === b) return d.__reactInternalMemoizedMaskedChildContext;
      var e = {}, f;
      for (f in c) e[f] = b[f];
      d && (a = a.stateNode, a.__reactInternalMemoizedUnmaskedChildContext = b, a.__reactInternalMemoizedMaskedChildContext = e);
      return e;
    }
    function L(a) {
      a = a.childContextTypes;
      return null !== a && void 0 !== a;
    }
    function Df() {
      H(K);
      H(J);
    }
    function Ef(a, b, c) {
      if (J.current !== Af) throw Error(u(168));
      I(J, b);
      I(K, c);
    }
    function Ff(a, b, c) {
      var d = a.stateNode;
      a = b.childContextTypes;
      if ("function" !== typeof d.getChildContext) return c;
      d = d.getChildContext();
      for (var e in d) if (!(e in a)) throw Error(u(108, pb(b) || "Unknown", e));
      return n({}, c, {}, d);
    }
    function Gf(a) {
      a = (a = a.stateNode) && a.__reactInternalMemoizedMergedChildContext || Af;
      Bf = J.current;
      I(J, a);
      I(K, K.current);
      return true;
    }
    function Hf(a, b, c) {
      var d = a.stateNode;
      if (!d) throw Error(u(169));
      c ? (a = Ff(a, b, Bf), d.__reactInternalMemoizedMergedChildContext = a, H(K), H(J), I(J, a)) : H(K);
      I(K, c);
    }
    var If = r.unstable_runWithPriority, Jf = r.unstable_scheduleCallback, Kf = r.unstable_cancelCallback, Lf = r.unstable_requestPaint, Mf = r.unstable_now, Nf = r.unstable_getCurrentPriorityLevel, Of = r.unstable_ImmediatePriority, Pf = r.unstable_UserBlockingPriority, Qf = r.unstable_NormalPriority, Rf = r.unstable_LowPriority, Sf = r.unstable_IdlePriority, Tf = {}, Uf = r.unstable_shouldYield, Vf = void 0 !== Lf ? Lf : function() {
    }, Wf = null, Xf = null, Yf = false, Zf = Mf(), $f = 1e4 > Zf ? Mf : function() {
      return Mf() - Zf;
    };
    function ag() {
      switch (Nf()) {
        case Of:
          return 99;
        case Pf:
          return 98;
        case Qf:
          return 97;
        case Rf:
          return 96;
        case Sf:
          return 95;
        default:
          throw Error(u(332));
      }
    }
    function bg(a) {
      switch (a) {
        case 99:
          return Of;
        case 98:
          return Pf;
        case 97:
          return Qf;
        case 96:
          return Rf;
        case 95:
          return Sf;
        default:
          throw Error(u(332));
      }
    }
    function cg(a, b) {
      a = bg(a);
      return If(a, b);
    }
    function dg(a, b, c) {
      a = bg(a);
      return Jf(a, b, c);
    }
    function eg(a) {
      null === Wf ? (Wf = [a], Xf = Jf(Of, fg)) : Wf.push(a);
      return Tf;
    }
    function gg() {
      if (null !== Xf) {
        var a = Xf;
        Xf = null;
        Kf(a);
      }
      fg();
    }
    function fg() {
      if (!Yf && null !== Wf) {
        Yf = true;
        var a = 0;
        try {
          var b = Wf;
          cg(99, function() {
            for (; a < b.length; a++) {
              var c = b[a];
              do
                c = c(true);
              while (null !== c);
            }
          });
          Wf = null;
        } catch (c) {
          throw null !== Wf && (Wf = Wf.slice(a + 1)), Jf(Of, gg), c;
        } finally {
          Yf = false;
        }
      }
    }
    function hg(a, b, c) {
      c /= 10;
      return 1073741821 - (((1073741821 - a + b / 10) / c | 0) + 1) * c;
    }
    function ig(a, b) {
      if (a && a.defaultProps) {
        b = n({}, b);
        a = a.defaultProps;
        for (var c in a) void 0 === b[c] && (b[c] = a[c]);
      }
      return b;
    }
    var jg = { current: null }, kg = null, lg = null, mg = null;
    function ng() {
      mg = lg = kg = null;
    }
    function og(a) {
      var b = jg.current;
      H(jg);
      a.type._context._currentValue = b;
    }
    function pg(a, b) {
      for (; null !== a; ) {
        var c = a.alternate;
        if (a.childExpirationTime < b) a.childExpirationTime = b, null !== c && c.childExpirationTime < b && (c.childExpirationTime = b);
        else if (null !== c && c.childExpirationTime < b) c.childExpirationTime = b;
        else break;
        a = a.return;
      }
    }
    function qg(a, b) {
      kg = a;
      mg = lg = null;
      a = a.dependencies;
      null !== a && null !== a.firstContext && (a.expirationTime >= b && (rg = true), a.firstContext = null);
    }
    function sg(a, b) {
      if (mg !== a && false !== b && 0 !== b) {
        if ("number" !== typeof b || 1073741823 === b) mg = a, b = 1073741823;
        b = { context: a, observedBits: b, next: null };
        if (null === lg) {
          if (null === kg) throw Error(u(308));
          lg = b;
          kg.dependencies = { expirationTime: 0, firstContext: b, responders: null };
        } else lg = lg.next = b;
      }
      return a._currentValue;
    }
    var tg = false;
    function ug(a) {
      a.updateQueue = { baseState: a.memoizedState, baseQueue: null, shared: { pending: null }, effects: null };
    }
    function vg(a, b) {
      a = a.updateQueue;
      b.updateQueue === a && (b.updateQueue = { baseState: a.baseState, baseQueue: a.baseQueue, shared: a.shared, effects: a.effects });
    }
    function wg(a, b) {
      a = { expirationTime: a, suspenseConfig: b, tag: 0, payload: null, callback: null, next: null };
      return a.next = a;
    }
    function xg(a, b) {
      a = a.updateQueue;
      if (null !== a) {
        a = a.shared;
        var c = a.pending;
        null === c ? b.next = b : (b.next = c.next, c.next = b);
        a.pending = b;
      }
    }
    function yg(a, b) {
      var c = a.alternate;
      null !== c && vg(c, a);
      a = a.updateQueue;
      c = a.baseQueue;
      null === c ? (a.baseQueue = b.next = b, b.next = b) : (b.next = c.next, c.next = b);
    }
    function zg(a, b, c, d) {
      var e = a.updateQueue;
      tg = false;
      var f = e.baseQueue, g = e.shared.pending;
      if (null !== g) {
        if (null !== f) {
          var h = f.next;
          f.next = g.next;
          g.next = h;
        }
        f = g;
        e.shared.pending = null;
        h = a.alternate;
        null !== h && (h = h.updateQueue, null !== h && (h.baseQueue = g));
      }
      if (null !== f) {
        h = f.next;
        var k = e.baseState, l = 0, m = null, p = null, x = null;
        if (null !== h) {
          var z = h;
          do {
            g = z.expirationTime;
            if (g < d) {
              var ca = { expirationTime: z.expirationTime, suspenseConfig: z.suspenseConfig, tag: z.tag, payload: z.payload, callback: z.callback, next: null };
              null === x ? (p = x = ca, m = k) : x = x.next = ca;
              g > l && (l = g);
            } else {
              null !== x && (x = x.next = { expirationTime: 1073741823, suspenseConfig: z.suspenseConfig, tag: z.tag, payload: z.payload, callback: z.callback, next: null });
              Ag(g, z.suspenseConfig);
              a: {
                var D = a, t = z;
                g = b;
                ca = c;
                switch (t.tag) {
                  case 1:
                    D = t.payload;
                    if ("function" === typeof D) {
                      k = D.call(ca, k, g);
                      break a;
                    }
                    k = D;
                    break a;
                  case 3:
                    D.effectTag = D.effectTag & -4097 | 64;
                  case 0:
                    D = t.payload;
                    g = "function" === typeof D ? D.call(ca, k, g) : D;
                    if (null === g || void 0 === g) break a;
                    k = n({}, k, g);
                    break a;
                  case 2:
                    tg = true;
                }
              }
              null !== z.callback && (a.effectTag |= 32, g = e.effects, null === g ? e.effects = [z] : g.push(z));
            }
            z = z.next;
            if (null === z || z === h) if (g = e.shared.pending, null === g) break;
            else z = f.next = g.next, g.next = h, e.baseQueue = f = g, e.shared.pending = null;
          } while (1);
        }
        null === x ? m = k : x.next = p;
        e.baseState = m;
        e.baseQueue = x;
        Bg(l);
        a.expirationTime = l;
        a.memoizedState = k;
      }
    }
    function Cg(a, b, c) {
      a = b.effects;
      b.effects = null;
      if (null !== a) for (b = 0; b < a.length; b++) {
        var d = a[b], e = d.callback;
        if (null !== e) {
          d.callback = null;
          d = e;
          e = c;
          if ("function" !== typeof d) throw Error(u(191, d));
          d.call(e);
        }
      }
    }
    var Dg = Wa.ReactCurrentBatchConfig, Eg = new aa.Component().refs;
    function Fg(a, b, c, d) {
      b = a.memoizedState;
      c = c(d, b);
      c = null === c || void 0 === c ? b : n({}, b, c);
      a.memoizedState = c;
      0 === a.expirationTime && (a.updateQueue.baseState = c);
    }
    var Jg = { isMounted: function(a) {
      return (a = a._reactInternalFiber) ? dc(a) === a : false;
    }, enqueueSetState: function(a, b, c) {
      a = a._reactInternalFiber;
      var d = Gg(), e = Dg.suspense;
      d = Hg(d, a, e);
      e = wg(d, e);
      e.payload = b;
      void 0 !== c && null !== c && (e.callback = c);
      xg(a, e);
      Ig(a, d);
    }, enqueueReplaceState: function(a, b, c) {
      a = a._reactInternalFiber;
      var d = Gg(), e = Dg.suspense;
      d = Hg(d, a, e);
      e = wg(d, e);
      e.tag = 1;
      e.payload = b;
      void 0 !== c && null !== c && (e.callback = c);
      xg(a, e);
      Ig(a, d);
    }, enqueueForceUpdate: function(a, b) {
      a = a._reactInternalFiber;
      var c = Gg(), d = Dg.suspense;
      c = Hg(c, a, d);
      d = wg(c, d);
      d.tag = 2;
      void 0 !== b && null !== b && (d.callback = b);
      xg(a, d);
      Ig(a, c);
    } };
    function Kg(a, b, c, d, e, f, g) {
      a = a.stateNode;
      return "function" === typeof a.shouldComponentUpdate ? a.shouldComponentUpdate(d, f, g) : b.prototype && b.prototype.isPureReactComponent ? !bf(c, d) || !bf(e, f) : true;
    }
    function Lg(a, b, c) {
      var d = false, e = Af;
      var f = b.contextType;
      "object" === typeof f && null !== f ? f = sg(f) : (e = L(b) ? Bf : J.current, d = b.contextTypes, f = (d = null !== d && void 0 !== d) ? Cf(a, e) : Af);
      b = new b(c, f);
      a.memoizedState = null !== b.state && void 0 !== b.state ? b.state : null;
      b.updater = Jg;
      a.stateNode = b;
      b._reactInternalFiber = a;
      d && (a = a.stateNode, a.__reactInternalMemoizedUnmaskedChildContext = e, a.__reactInternalMemoizedMaskedChildContext = f);
      return b;
    }
    function Mg(a, b, c, d) {
      a = b.state;
      "function" === typeof b.componentWillReceiveProps && b.componentWillReceiveProps(c, d);
      "function" === typeof b.UNSAFE_componentWillReceiveProps && b.UNSAFE_componentWillReceiveProps(c, d);
      b.state !== a && Jg.enqueueReplaceState(b, b.state, null);
    }
    function Ng(a, b, c, d) {
      var e = a.stateNode;
      e.props = c;
      e.state = a.memoizedState;
      e.refs = Eg;
      ug(a);
      var f = b.contextType;
      "object" === typeof f && null !== f ? e.context = sg(f) : (f = L(b) ? Bf : J.current, e.context = Cf(a, f));
      zg(a, c, e, d);
      e.state = a.memoizedState;
      f = b.getDerivedStateFromProps;
      "function" === typeof f && (Fg(a, b, f, c), e.state = a.memoizedState);
      "function" === typeof b.getDerivedStateFromProps || "function" === typeof e.getSnapshotBeforeUpdate || "function" !== typeof e.UNSAFE_componentWillMount && "function" !== typeof e.componentWillMount || (b = e.state, "function" === typeof e.componentWillMount && e.componentWillMount(), "function" === typeof e.UNSAFE_componentWillMount && e.UNSAFE_componentWillMount(), b !== e.state && Jg.enqueueReplaceState(e, e.state, null), zg(a, c, e, d), e.state = a.memoizedState);
      "function" === typeof e.componentDidMount && (a.effectTag |= 4);
    }
    var Og = Array.isArray;
    function Pg(a, b, c) {
      a = c.ref;
      if (null !== a && "function" !== typeof a && "object" !== typeof a) {
        if (c._owner) {
          c = c._owner;
          if (c) {
            if (1 !== c.tag) throw Error(u(309));
            var d = c.stateNode;
          }
          if (!d) throw Error(u(147, a));
          var e = "" + a;
          if (null !== b && null !== b.ref && "function" === typeof b.ref && b.ref._stringRef === e) return b.ref;
          b = function(a2) {
            var b2 = d.refs;
            b2 === Eg && (b2 = d.refs = {});
            null === a2 ? delete b2[e] : b2[e] = a2;
          };
          b._stringRef = e;
          return b;
        }
        if ("string" !== typeof a) throw Error(u(284));
        if (!c._owner) throw Error(u(290, a));
      }
      return a;
    }
    function Qg(a, b) {
      if ("textarea" !== a.type) throw Error(u(31, "[object Object]" === Object.prototype.toString.call(b) ? "object with keys {" + Object.keys(b).join(", ") + "}" : b, ""));
    }
    function Rg(a) {
      function b(b2, c2) {
        if (a) {
          var d2 = b2.lastEffect;
          null !== d2 ? (d2.nextEffect = c2, b2.lastEffect = c2) : b2.firstEffect = b2.lastEffect = c2;
          c2.nextEffect = null;
          c2.effectTag = 8;
        }
      }
      function c(c2, d2) {
        if (!a) return null;
        for (; null !== d2; ) b(c2, d2), d2 = d2.sibling;
        return null;
      }
      function d(a2, b2) {
        for (a2 = /* @__PURE__ */ new Map(); null !== b2; ) null !== b2.key ? a2.set(b2.key, b2) : a2.set(b2.index, b2), b2 = b2.sibling;
        return a2;
      }
      function e(a2, b2) {
        a2 = Sg(a2, b2);
        a2.index = 0;
        a2.sibling = null;
        return a2;
      }
      function f(b2, c2, d2) {
        b2.index = d2;
        if (!a) return c2;
        d2 = b2.alternate;
        if (null !== d2) return d2 = d2.index, d2 < c2 ? (b2.effectTag = 2, c2) : d2;
        b2.effectTag = 2;
        return c2;
      }
      function g(b2) {
        a && null === b2.alternate && (b2.effectTag = 2);
        return b2;
      }
      function h(a2, b2, c2, d2) {
        if (null === b2 || 6 !== b2.tag) return b2 = Tg(c2, a2.mode, d2), b2.return = a2, b2;
        b2 = e(b2, c2);
        b2.return = a2;
        return b2;
      }
      function k(a2, b2, c2, d2) {
        if (null !== b2 && b2.elementType === c2.type) return d2 = e(b2, c2.props), d2.ref = Pg(a2, b2, c2), d2.return = a2, d2;
        d2 = Ug(c2.type, c2.key, c2.props, null, a2.mode, d2);
        d2.ref = Pg(a2, b2, c2);
        d2.return = a2;
        return d2;
      }
      function l(a2, b2, c2, d2) {
        if (null === b2 || 4 !== b2.tag || b2.stateNode.containerInfo !== c2.containerInfo || b2.stateNode.implementation !== c2.implementation) return b2 = Vg(c2, a2.mode, d2), b2.return = a2, b2;
        b2 = e(b2, c2.children || []);
        b2.return = a2;
        return b2;
      }
      function m(a2, b2, c2, d2, f2) {
        if (null === b2 || 7 !== b2.tag) return b2 = Wg(c2, a2.mode, d2, f2), b2.return = a2, b2;
        b2 = e(b2, c2);
        b2.return = a2;
        return b2;
      }
      function p(a2, b2, c2) {
        if ("string" === typeof b2 || "number" === typeof b2) return b2 = Tg("" + b2, a2.mode, c2), b2.return = a2, b2;
        if ("object" === typeof b2 && null !== b2) {
          switch (b2.$$typeof) {
            case Za:
              return c2 = Ug(b2.type, b2.key, b2.props, null, a2.mode, c2), c2.ref = Pg(a2, null, b2), c2.return = a2, c2;
            case $a:
              return b2 = Vg(b2, a2.mode, c2), b2.return = a2, b2;
          }
          if (Og(b2) || nb(b2)) return b2 = Wg(b2, a2.mode, c2, null), b2.return = a2, b2;
          Qg(a2, b2);
        }
        return null;
      }
      function x(a2, b2, c2, d2) {
        var e2 = null !== b2 ? b2.key : null;
        if ("string" === typeof c2 || "number" === typeof c2) return null !== e2 ? null : h(a2, b2, "" + c2, d2);
        if ("object" === typeof c2 && null !== c2) {
          switch (c2.$$typeof) {
            case Za:
              return c2.key === e2 ? c2.type === ab ? m(a2, b2, c2.props.children, d2, e2) : k(a2, b2, c2, d2) : null;
            case $a:
              return c2.key === e2 ? l(a2, b2, c2, d2) : null;
          }
          if (Og(c2) || nb(c2)) return null !== e2 ? null : m(a2, b2, c2, d2, null);
          Qg(a2, c2);
        }
        return null;
      }
      function z(a2, b2, c2, d2, e2) {
        if ("string" === typeof d2 || "number" === typeof d2) return a2 = a2.get(c2) || null, h(b2, a2, "" + d2, e2);
        if ("object" === typeof d2 && null !== d2) {
          switch (d2.$$typeof) {
            case Za:
              return a2 = a2.get(null === d2.key ? c2 : d2.key) || null, d2.type === ab ? m(b2, a2, d2.props.children, e2, d2.key) : k(b2, a2, d2, e2);
            case $a:
              return a2 = a2.get(null === d2.key ? c2 : d2.key) || null, l(b2, a2, d2, e2);
          }
          if (Og(d2) || nb(d2)) return a2 = a2.get(c2) || null, m(b2, a2, d2, e2, null);
          Qg(b2, d2);
        }
        return null;
      }
      function ca(e2, g2, h2, k2) {
        for (var l2 = null, t = null, m2 = g2, y = g2 = 0, A = null; null !== m2 && y < h2.length; y++) {
          m2.index > y ? (A = m2, m2 = null) : A = m2.sibling;
          var q = x(e2, m2, h2[y], k2);
          if (null === q) {
            null === m2 && (m2 = A);
            break;
          }
          a && m2 && null === q.alternate && b(e2, m2);
          g2 = f(q, g2, y);
          null === t ? l2 = q : t.sibling = q;
          t = q;
          m2 = A;
        }
        if (y === h2.length) return c(e2, m2), l2;
        if (null === m2) {
          for (; y < h2.length; y++) m2 = p(e2, h2[y], k2), null !== m2 && (g2 = f(m2, g2, y), null === t ? l2 = m2 : t.sibling = m2, t = m2);
          return l2;
        }
        for (m2 = d(e2, m2); y < h2.length; y++) A = z(m2, e2, y, h2[y], k2), null !== A && (a && null !== A.alternate && m2.delete(null === A.key ? y : A.key), g2 = f(A, g2, y), null === t ? l2 = A : t.sibling = A, t = A);
        a && m2.forEach(function(a2) {
          return b(e2, a2);
        });
        return l2;
      }
      function D(e2, g2, h2, l2) {
        var k2 = nb(h2);
        if ("function" !== typeof k2) throw Error(u(150));
        h2 = k2.call(h2);
        if (null == h2) throw Error(u(151));
        for (var m2 = k2 = null, t = g2, y = g2 = 0, A = null, q = h2.next(); null !== t && !q.done; y++, q = h2.next()) {
          t.index > y ? (A = t, t = null) : A = t.sibling;
          var D2 = x(e2, t, q.value, l2);
          if (null === D2) {
            null === t && (t = A);
            break;
          }
          a && t && null === D2.alternate && b(e2, t);
          g2 = f(D2, g2, y);
          null === m2 ? k2 = D2 : m2.sibling = D2;
          m2 = D2;
          t = A;
        }
        if (q.done) return c(e2, t), k2;
        if (null === t) {
          for (; !q.done; y++, q = h2.next()) q = p(e2, q.value, l2), null !== q && (g2 = f(q, g2, y), null === m2 ? k2 = q : m2.sibling = q, m2 = q);
          return k2;
        }
        for (t = d(e2, t); !q.done; y++, q = h2.next()) q = z(t, e2, y, q.value, l2), null !== q && (a && null !== q.alternate && t.delete(null === q.key ? y : q.key), g2 = f(q, g2, y), null === m2 ? k2 = q : m2.sibling = q, m2 = q);
        a && t.forEach(function(a2) {
          return b(e2, a2);
        });
        return k2;
      }
      return function(a2, d2, f2, h2) {
        var k2 = "object" === typeof f2 && null !== f2 && f2.type === ab && null === f2.key;
        k2 && (f2 = f2.props.children);
        var l2 = "object" === typeof f2 && null !== f2;
        if (l2) switch (f2.$$typeof) {
          case Za:
            a: {
              l2 = f2.key;
              for (k2 = d2; null !== k2; ) {
                if (k2.key === l2) {
                  switch (k2.tag) {
                    case 7:
                      if (f2.type === ab) {
                        c(a2, k2.sibling);
                        d2 = e(k2, f2.props.children);
                        d2.return = a2;
                        a2 = d2;
                        break a;
                      }
                      break;
                    default:
                      if (k2.elementType === f2.type) {
                        c(
                          a2,
                          k2.sibling
                        );
                        d2 = e(k2, f2.props);
                        d2.ref = Pg(a2, k2, f2);
                        d2.return = a2;
                        a2 = d2;
                        break a;
                      }
                  }
                  c(a2, k2);
                  break;
                } else b(a2, k2);
                k2 = k2.sibling;
              }
              f2.type === ab ? (d2 = Wg(f2.props.children, a2.mode, h2, f2.key), d2.return = a2, a2 = d2) : (h2 = Ug(f2.type, f2.key, f2.props, null, a2.mode, h2), h2.ref = Pg(a2, d2, f2), h2.return = a2, a2 = h2);
            }
            return g(a2);
          case $a:
            a: {
              for (k2 = f2.key; null !== d2; ) {
                if (d2.key === k2) if (4 === d2.tag && d2.stateNode.containerInfo === f2.containerInfo && d2.stateNode.implementation === f2.implementation) {
                  c(a2, d2.sibling);
                  d2 = e(d2, f2.children || []);
                  d2.return = a2;
                  a2 = d2;
                  break a;
                } else {
                  c(a2, d2);
                  break;
                }
                else b(a2, d2);
                d2 = d2.sibling;
              }
              d2 = Vg(f2, a2.mode, h2);
              d2.return = a2;
              a2 = d2;
            }
            return g(a2);
        }
        if ("string" === typeof f2 || "number" === typeof f2) return f2 = "" + f2, null !== d2 && 6 === d2.tag ? (c(a2, d2.sibling), d2 = e(d2, f2), d2.return = a2, a2 = d2) : (c(a2, d2), d2 = Tg(f2, a2.mode, h2), d2.return = a2, a2 = d2), g(a2);
        if (Og(f2)) return ca(a2, d2, f2, h2);
        if (nb(f2)) return D(a2, d2, f2, h2);
        l2 && Qg(a2, f2);
        if ("undefined" === typeof f2 && !k2) switch (a2.tag) {
          case 1:
          case 0:
            throw a2 = a2.type, Error(u(152, a2.displayName || a2.name || "Component"));
        }
        return c(a2, d2);
      };
    }
    var Xg = Rg(true), Yg = Rg(false), Zg = {}, $g = { current: Zg }, ah = { current: Zg }, bh = { current: Zg };
    function ch(a) {
      if (a === Zg) throw Error(u(174));
      return a;
    }
    function dh(a, b) {
      I(bh, b);
      I(ah, a);
      I($g, Zg);
      a = b.nodeType;
      switch (a) {
        case 9:
        case 11:
          b = (b = b.documentElement) ? b.namespaceURI : Ob(null, "");
          break;
        default:
          a = 8 === a ? b.parentNode : b, b = a.namespaceURI || null, a = a.tagName, b = Ob(b, a);
      }
      H($g);
      I($g, b);
    }
    function eh() {
      H($g);
      H(ah);
      H(bh);
    }
    function fh(a) {
      ch(bh.current);
      var b = ch($g.current);
      var c = Ob(b, a.type);
      b !== c && (I(ah, a), I($g, c));
    }
    function gh(a) {
      ah.current === a && (H($g), H(ah));
    }
    var M = { current: 0 };
    function hh(a) {
      for (var b = a; null !== b; ) {
        if (13 === b.tag) {
          var c = b.memoizedState;
          if (null !== c && (c = c.dehydrated, null === c || c.data === Bd || c.data === Cd)) return b;
        } else if (19 === b.tag && void 0 !== b.memoizedProps.revealOrder) {
          if (0 !== (b.effectTag & 64)) return b;
        } else if (null !== b.child) {
          b.child.return = b;
          b = b.child;
          continue;
        }
        if (b === a) break;
        for (; null === b.sibling; ) {
          if (null === b.return || b.return === a) return null;
          b = b.return;
        }
        b.sibling.return = b.return;
        b = b.sibling;
      }
      return null;
    }
    function ih(a, b) {
      return { responder: a, props: b };
    }
    var jh = Wa.ReactCurrentDispatcher, kh = Wa.ReactCurrentBatchConfig, lh = 0, N = null, O = null, P = null, mh = false;
    function Q() {
      throw Error(u(321));
    }
    function nh(a, b) {
      if (null === b) return false;
      for (var c = 0; c < b.length && c < a.length; c++) if (!$e(a[c], b[c])) return false;
      return true;
    }
    function oh(a, b, c, d, e, f) {
      lh = f;
      N = b;
      b.memoizedState = null;
      b.updateQueue = null;
      b.expirationTime = 0;
      jh.current = null === a || null === a.memoizedState ? ph : qh;
      a = c(d, e);
      if (b.expirationTime === lh) {
        f = 0;
        do {
          b.expirationTime = 0;
          if (!(25 > f)) throw Error(u(301));
          f += 1;
          P = O = null;
          b.updateQueue = null;
          jh.current = rh;
          a = c(d, e);
        } while (b.expirationTime === lh);
      }
      jh.current = sh;
      b = null !== O && null !== O.next;
      lh = 0;
      P = O = N = null;
      mh = false;
      if (b) throw Error(u(300));
      return a;
    }
    function th() {
      var a = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null };
      null === P ? N.memoizedState = P = a : P = P.next = a;
      return P;
    }
    function uh() {
      if (null === O) {
        var a = N.alternate;
        a = null !== a ? a.memoizedState : null;
      } else a = O.next;
      var b = null === P ? N.memoizedState : P.next;
      if (null !== b) P = b, O = a;
      else {
        if (null === a) throw Error(u(310));
        O = a;
        a = { memoizedState: O.memoizedState, baseState: O.baseState, baseQueue: O.baseQueue, queue: O.queue, next: null };
        null === P ? N.memoizedState = P = a : P = P.next = a;
      }
      return P;
    }
    function vh(a, b) {
      return "function" === typeof b ? b(a) : b;
    }
    function wh(a) {
      var b = uh(), c = b.queue;
      if (null === c) throw Error(u(311));
      c.lastRenderedReducer = a;
      var d = O, e = d.baseQueue, f = c.pending;
      if (null !== f) {
        if (null !== e) {
          var g = e.next;
          e.next = f.next;
          f.next = g;
        }
        d.baseQueue = e = f;
        c.pending = null;
      }
      if (null !== e) {
        e = e.next;
        d = d.baseState;
        var h = g = f = null, k = e;
        do {
          var l = k.expirationTime;
          if (l < lh) {
            var m = { expirationTime: k.expirationTime, suspenseConfig: k.suspenseConfig, action: k.action, eagerReducer: k.eagerReducer, eagerState: k.eagerState, next: null };
            null === h ? (g = h = m, f = d) : h = h.next = m;
            l > N.expirationTime && (N.expirationTime = l, Bg(l));
          } else null !== h && (h = h.next = { expirationTime: 1073741823, suspenseConfig: k.suspenseConfig, action: k.action, eagerReducer: k.eagerReducer, eagerState: k.eagerState, next: null }), Ag(l, k.suspenseConfig), d = k.eagerReducer === a ? k.eagerState : a(d, k.action);
          k = k.next;
        } while (null !== k && k !== e);
        null === h ? f = d : h.next = g;
        $e(d, b.memoizedState) || (rg = true);
        b.memoizedState = d;
        b.baseState = f;
        b.baseQueue = h;
        c.lastRenderedState = d;
      }
      return [b.memoizedState, c.dispatch];
    }
    function xh(a) {
      var b = uh(), c = b.queue;
      if (null === c) throw Error(u(311));
      c.lastRenderedReducer = a;
      var d = c.dispatch, e = c.pending, f = b.memoizedState;
      if (null !== e) {
        c.pending = null;
        var g = e = e.next;
        do
          f = a(f, g.action), g = g.next;
        while (g !== e);
        $e(f, b.memoizedState) || (rg = true);
        b.memoizedState = f;
        null === b.baseQueue && (b.baseState = f);
        c.lastRenderedState = f;
      }
      return [f, d];
    }
    function yh(a) {
      var b = th();
      "function" === typeof a && (a = a());
      b.memoizedState = b.baseState = a;
      a = b.queue = { pending: null, dispatch: null, lastRenderedReducer: vh, lastRenderedState: a };
      a = a.dispatch = zh.bind(null, N, a);
      return [b.memoizedState, a];
    }
    function Ah(a, b, c, d) {
      a = { tag: a, create: b, destroy: c, deps: d, next: null };
      b = N.updateQueue;
      null === b ? (b = { lastEffect: null }, N.updateQueue = b, b.lastEffect = a.next = a) : (c = b.lastEffect, null === c ? b.lastEffect = a.next = a : (d = c.next, c.next = a, a.next = d, b.lastEffect = a));
      return a;
    }
    function Bh() {
      return uh().memoizedState;
    }
    function Ch(a, b, c, d) {
      var e = th();
      N.effectTag |= a;
      e.memoizedState = Ah(1 | b, c, void 0, void 0 === d ? null : d);
    }
    function Dh(a, b, c, d) {
      var e = uh();
      d = void 0 === d ? null : d;
      var f = void 0;
      if (null !== O) {
        var g = O.memoizedState;
        f = g.destroy;
        if (null !== d && nh(d, g.deps)) {
          Ah(b, c, f, d);
          return;
        }
      }
      N.effectTag |= a;
      e.memoizedState = Ah(1 | b, c, f, d);
    }
    function Eh(a, b) {
      return Ch(516, 4, a, b);
    }
    function Fh(a, b) {
      return Dh(516, 4, a, b);
    }
    function Gh(a, b) {
      return Dh(4, 2, a, b);
    }
    function Hh(a, b) {
      if ("function" === typeof b) return a = a(), b(a), function() {
        b(null);
      };
      if (null !== b && void 0 !== b) return a = a(), b.current = a, function() {
        b.current = null;
      };
    }
    function Ih(a, b, c) {
      c = null !== c && void 0 !== c ? c.concat([a]) : null;
      return Dh(4, 2, Hh.bind(null, b, a), c);
    }
    function Jh() {
    }
    function Kh(a, b) {
      th().memoizedState = [a, void 0 === b ? null : b];
      return a;
    }
    function Lh(a, b) {
      var c = uh();
      b = void 0 === b ? null : b;
      var d = c.memoizedState;
      if (null !== d && null !== b && nh(b, d[1])) return d[0];
      c.memoizedState = [a, b];
      return a;
    }
    function Mh(a, b) {
      var c = uh();
      b = void 0 === b ? null : b;
      var d = c.memoizedState;
      if (null !== d && null !== b && nh(b, d[1])) return d[0];
      a = a();
      c.memoizedState = [a, b];
      return a;
    }
    function Nh(a, b, c) {
      var d = ag();
      cg(98 > d ? 98 : d, function() {
        a(true);
      });
      cg(97 < d ? 97 : d, function() {
        var d2 = kh.suspense;
        kh.suspense = void 0 === b ? null : b;
        try {
          a(false), c();
        } finally {
          kh.suspense = d2;
        }
      });
    }
    function zh(a, b, c) {
      var d = Gg(), e = Dg.suspense;
      d = Hg(d, a, e);
      e = { expirationTime: d, suspenseConfig: e, action: c, eagerReducer: null, eagerState: null, next: null };
      var f = b.pending;
      null === f ? e.next = e : (e.next = f.next, f.next = e);
      b.pending = e;
      f = a.alternate;
      if (a === N || null !== f && f === N) mh = true, e.expirationTime = lh, N.expirationTime = lh;
      else {
        if (0 === a.expirationTime && (null === f || 0 === f.expirationTime) && (f = b.lastRenderedReducer, null !== f)) try {
          var g = b.lastRenderedState, h = f(g, c);
          e.eagerReducer = f;
          e.eagerState = h;
          if ($e(h, g)) return;
        } catch (k) {
        } finally {
        }
        Ig(
          a,
          d
        );
      }
    }
    var sh = { readContext: sg, useCallback: Q, useContext: Q, useEffect: Q, useImperativeHandle: Q, useLayoutEffect: Q, useMemo: Q, useReducer: Q, useRef: Q, useState: Q, useDebugValue: Q, useResponder: Q, useDeferredValue: Q, useTransition: Q }, ph = { readContext: sg, useCallback: Kh, useContext: sg, useEffect: Eh, useImperativeHandle: function(a, b, c) {
      c = null !== c && void 0 !== c ? c.concat([a]) : null;
      return Ch(4, 2, Hh.bind(null, b, a), c);
    }, useLayoutEffect: function(a, b) {
      return Ch(4, 2, a, b);
    }, useMemo: function(a, b) {
      var c = th();
      b = void 0 === b ? null : b;
      a = a();
      c.memoizedState = [
        a,
        b
      ];
      return a;
    }, useReducer: function(a, b, c) {
      var d = th();
      b = void 0 !== c ? c(b) : b;
      d.memoizedState = d.baseState = b;
      a = d.queue = { pending: null, dispatch: null, lastRenderedReducer: a, lastRenderedState: b };
      a = a.dispatch = zh.bind(null, N, a);
      return [d.memoizedState, a];
    }, useRef: function(a) {
      var b = th();
      a = { current: a };
      return b.memoizedState = a;
    }, useState: yh, useDebugValue: Jh, useResponder: ih, useDeferredValue: function(a, b) {
      var c = yh(a), d = c[0], e = c[1];
      Eh(function() {
        var c2 = kh.suspense;
        kh.suspense = void 0 === b ? null : b;
        try {
          e(a);
        } finally {
          kh.suspense = c2;
        }
      }, [a, b]);
      return d;
    }, useTransition: function(a) {
      var b = yh(false), c = b[0];
      b = b[1];
      return [Kh(Nh.bind(null, b, a), [b, a]), c];
    } }, qh = { readContext: sg, useCallback: Lh, useContext: sg, useEffect: Fh, useImperativeHandle: Ih, useLayoutEffect: Gh, useMemo: Mh, useReducer: wh, useRef: Bh, useState: function() {
      return wh(vh);
    }, useDebugValue: Jh, useResponder: ih, useDeferredValue: function(a, b) {
      var c = wh(vh), d = c[0], e = c[1];
      Fh(function() {
        var c2 = kh.suspense;
        kh.suspense = void 0 === b ? null : b;
        try {
          e(a);
        } finally {
          kh.suspense = c2;
        }
      }, [a, b]);
      return d;
    }, useTransition: function(a) {
      var b = wh(vh), c = b[0];
      b = b[1];
      return [Lh(Nh.bind(null, b, a), [b, a]), c];
    } }, rh = { readContext: sg, useCallback: Lh, useContext: sg, useEffect: Fh, useImperativeHandle: Ih, useLayoutEffect: Gh, useMemo: Mh, useReducer: xh, useRef: Bh, useState: function() {
      return xh(vh);
    }, useDebugValue: Jh, useResponder: ih, useDeferredValue: function(a, b) {
      var c = xh(vh), d = c[0], e = c[1];
      Fh(function() {
        var c2 = kh.suspense;
        kh.suspense = void 0 === b ? null : b;
        try {
          e(a);
        } finally {
          kh.suspense = c2;
        }
      }, [a, b]);
      return d;
    }, useTransition: function(a) {
      var b = xh(vh), c = b[0];
      b = b[1];
      return [Lh(Nh.bind(
        null,
        b,
        a
      ), [b, a]), c];
    } }, Oh = null, Ph = null, Qh = false;
    function Rh(a, b) {
      var c = Sh(5, null, null, 0);
      c.elementType = "DELETED";
      c.type = "DELETED";
      c.stateNode = b;
      c.return = a;
      c.effectTag = 8;
      null !== a.lastEffect ? (a.lastEffect.nextEffect = c, a.lastEffect = c) : a.firstEffect = a.lastEffect = c;
    }
    function Th(a, b) {
      switch (a.tag) {
        case 5:
          var c = a.type;
          b = 1 !== b.nodeType || c.toLowerCase() !== b.nodeName.toLowerCase() ? null : b;
          return null !== b ? (a.stateNode = b, true) : false;
        case 6:
          return b = "" === a.pendingProps || 3 !== b.nodeType ? null : b, null !== b ? (a.stateNode = b, true) : false;
        case 13:
          return false;
        default:
          return false;
      }
    }
    function Uh(a) {
      if (Qh) {
        var b = Ph;
        if (b) {
          var c = b;
          if (!Th(a, b)) {
            b = Jd(c.nextSibling);
            if (!b || !Th(a, b)) {
              a.effectTag = a.effectTag & -1025 | 2;
              Qh = false;
              Oh = a;
              return;
            }
            Rh(Oh, c);
          }
          Oh = a;
          Ph = Jd(b.firstChild);
        } else a.effectTag = a.effectTag & -1025 | 2, Qh = false, Oh = a;
      }
    }
    function Vh(a) {
      for (a = a.return; null !== a && 5 !== a.tag && 3 !== a.tag && 13 !== a.tag; ) a = a.return;
      Oh = a;
    }
    function Wh(a) {
      if (a !== Oh) return false;
      if (!Qh) return Vh(a), Qh = true, false;
      var b = a.type;
      if (5 !== a.tag || "head" !== b && "body" !== b && !Gd(b, a.memoizedProps)) for (b = Ph; b; ) Rh(a, b), b = Jd(b.nextSibling);
      Vh(a);
      if (13 === a.tag) {
        a = a.memoizedState;
        a = null !== a ? a.dehydrated : null;
        if (!a) throw Error(u(317));
        a: {
          a = a.nextSibling;
          for (b = 0; a; ) {
            if (8 === a.nodeType) {
              var c = a.data;
              if (c === Ad) {
                if (0 === b) {
                  Ph = Jd(a.nextSibling);
                  break a;
                }
                b--;
              } else c !== zd && c !== Cd && c !== Bd || b++;
            }
            a = a.nextSibling;
          }
          Ph = null;
        }
      } else Ph = Oh ? Jd(a.stateNode.nextSibling) : null;
      return true;
    }
    function Xh() {
      Ph = Oh = null;
      Qh = false;
    }
    var Yh = Wa.ReactCurrentOwner, rg = false;
    function R(a, b, c, d) {
      b.child = null === a ? Yg(b, null, c, d) : Xg(b, a.child, c, d);
    }
    function Zh(a, b, c, d, e) {
      c = c.render;
      var f = b.ref;
      qg(b, e);
      d = oh(a, b, c, d, f, e);
      if (null !== a && !rg) return b.updateQueue = a.updateQueue, b.effectTag &= -517, a.expirationTime <= e && (a.expirationTime = 0), $h(a, b, e);
      b.effectTag |= 1;
      R(a, b, d, e);
      return b.child;
    }
    function ai(a, b, c, d, e, f) {
      if (null === a) {
        var g = c.type;
        if ("function" === typeof g && !bi(g) && void 0 === g.defaultProps && null === c.compare && void 0 === c.defaultProps) return b.tag = 15, b.type = g, ci(a, b, g, d, e, f);
        a = Ug(c.type, null, d, null, b.mode, f);
        a.ref = b.ref;
        a.return = b;
        return b.child = a;
      }
      g = a.child;
      if (e < f && (e = g.memoizedProps, c = c.compare, c = null !== c ? c : bf, c(e, d) && a.ref === b.ref)) return $h(a, b, f);
      b.effectTag |= 1;
      a = Sg(g, d);
      a.ref = b.ref;
      a.return = b;
      return b.child = a;
    }
    function ci(a, b, c, d, e, f) {
      return null !== a && bf(a.memoizedProps, d) && a.ref === b.ref && (rg = false, e < f) ? (b.expirationTime = a.expirationTime, $h(a, b, f)) : di(a, b, c, d, f);
    }
    function ei(a, b) {
      var c = b.ref;
      if (null === a && null !== c || null !== a && a.ref !== c) b.effectTag |= 128;
    }
    function di(a, b, c, d, e) {
      var f = L(c) ? Bf : J.current;
      f = Cf(b, f);
      qg(b, e);
      c = oh(a, b, c, d, f, e);
      if (null !== a && !rg) return b.updateQueue = a.updateQueue, b.effectTag &= -517, a.expirationTime <= e && (a.expirationTime = 0), $h(a, b, e);
      b.effectTag |= 1;
      R(a, b, c, e);
      return b.child;
    }
    function fi(a, b, c, d, e) {
      if (L(c)) {
        var f = true;
        Gf(b);
      } else f = false;
      qg(b, e);
      if (null === b.stateNode) null !== a && (a.alternate = null, b.alternate = null, b.effectTag |= 2), Lg(b, c, d), Ng(b, c, d, e), d = true;
      else if (null === a) {
        var g = b.stateNode, h = b.memoizedProps;
        g.props = h;
        var k = g.context, l = c.contextType;
        "object" === typeof l && null !== l ? l = sg(l) : (l = L(c) ? Bf : J.current, l = Cf(b, l));
        var m = c.getDerivedStateFromProps, p = "function" === typeof m || "function" === typeof g.getSnapshotBeforeUpdate;
        p || "function" !== typeof g.UNSAFE_componentWillReceiveProps && "function" !== typeof g.componentWillReceiveProps || (h !== d || k !== l) && Mg(b, g, d, l);
        tg = false;
        var x = b.memoizedState;
        g.state = x;
        zg(b, d, g, e);
        k = b.memoizedState;
        h !== d || x !== k || K.current || tg ? ("function" === typeof m && (Fg(b, c, m, d), k = b.memoizedState), (h = tg || Kg(b, c, h, d, x, k, l)) ? (p || "function" !== typeof g.UNSAFE_componentWillMount && "function" !== typeof g.componentWillMount || ("function" === typeof g.componentWillMount && g.componentWillMount(), "function" === typeof g.UNSAFE_componentWillMount && g.UNSAFE_componentWillMount()), "function" === typeof g.componentDidMount && (b.effectTag |= 4)) : ("function" === typeof g.componentDidMount && (b.effectTag |= 4), b.memoizedProps = d, b.memoizedState = k), g.props = d, g.state = k, g.context = l, d = h) : ("function" === typeof g.componentDidMount && (b.effectTag |= 4), d = false);
      } else g = b.stateNode, vg(a, b), h = b.memoizedProps, g.props = b.type === b.elementType ? h : ig(b.type, h), k = g.context, l = c.contextType, "object" === typeof l && null !== l ? l = sg(l) : (l = L(c) ? Bf : J.current, l = Cf(b, l)), m = c.getDerivedStateFromProps, (p = "function" === typeof m || "function" === typeof g.getSnapshotBeforeUpdate) || "function" !== typeof g.UNSAFE_componentWillReceiveProps && "function" !== typeof g.componentWillReceiveProps || (h !== d || k !== l) && Mg(b, g, d, l), tg = false, k = b.memoizedState, g.state = k, zg(b, d, g, e), x = b.memoizedState, h !== d || k !== x || K.current || tg ? ("function" === typeof m && (Fg(b, c, m, d), x = b.memoizedState), (m = tg || Kg(b, c, h, d, k, x, l)) ? (p || "function" !== typeof g.UNSAFE_componentWillUpdate && "function" !== typeof g.componentWillUpdate || ("function" === typeof g.componentWillUpdate && g.componentWillUpdate(
        d,
        x,
        l
      ), "function" === typeof g.UNSAFE_componentWillUpdate && g.UNSAFE_componentWillUpdate(d, x, l)), "function" === typeof g.componentDidUpdate && (b.effectTag |= 4), "function" === typeof g.getSnapshotBeforeUpdate && (b.effectTag |= 256)) : ("function" !== typeof g.componentDidUpdate || h === a.memoizedProps && k === a.memoizedState || (b.effectTag |= 4), "function" !== typeof g.getSnapshotBeforeUpdate || h === a.memoizedProps && k === a.memoizedState || (b.effectTag |= 256), b.memoizedProps = d, b.memoizedState = x), g.props = d, g.state = x, g.context = l, d = m) : ("function" !== typeof g.componentDidUpdate || h === a.memoizedProps && k === a.memoizedState || (b.effectTag |= 4), "function" !== typeof g.getSnapshotBeforeUpdate || h === a.memoizedProps && k === a.memoizedState || (b.effectTag |= 256), d = false);
      return gi(a, b, c, d, f, e);
    }
    function gi(a, b, c, d, e, f) {
      ei(a, b);
      var g = 0 !== (b.effectTag & 64);
      if (!d && !g) return e && Hf(b, c, false), $h(a, b, f);
      d = b.stateNode;
      Yh.current = b;
      var h = g && "function" !== typeof c.getDerivedStateFromError ? null : d.render();
      b.effectTag |= 1;
      null !== a && g ? (b.child = Xg(b, a.child, null, f), b.child = Xg(b, null, h, f)) : R(a, b, h, f);
      b.memoizedState = d.state;
      e && Hf(b, c, true);
      return b.child;
    }
    function hi(a) {
      var b = a.stateNode;
      b.pendingContext ? Ef(a, b.pendingContext, b.pendingContext !== b.context) : b.context && Ef(a, b.context, false);
      dh(a, b.containerInfo);
    }
    var ii = { dehydrated: null, retryTime: 0 };
    function ji(a, b, c) {
      var d = b.mode, e = b.pendingProps, f = M.current, g = false, h;
      (h = 0 !== (b.effectTag & 64)) || (h = 0 !== (f & 2) && (null === a || null !== a.memoizedState));
      h ? (g = true, b.effectTag &= -65) : null !== a && null === a.memoizedState || void 0 === e.fallback || true === e.unstable_avoidThisFallback || (f |= 1);
      I(M, f & 1);
      if (null === a) {
        void 0 !== e.fallback && Uh(b);
        if (g) {
          g = e.fallback;
          e = Wg(null, d, 0, null);
          e.return = b;
          if (0 === (b.mode & 2)) for (a = null !== b.memoizedState ? b.child.child : b.child, e.child = a; null !== a; ) a.return = e, a = a.sibling;
          c = Wg(g, d, c, null);
          c.return = b;
          e.sibling = c;
          b.memoizedState = ii;
          b.child = e;
          return c;
        }
        d = e.children;
        b.memoizedState = null;
        return b.child = Yg(b, null, d, c);
      }
      if (null !== a.memoizedState) {
        a = a.child;
        d = a.sibling;
        if (g) {
          e = e.fallback;
          c = Sg(a, a.pendingProps);
          c.return = b;
          if (0 === (b.mode & 2) && (g = null !== b.memoizedState ? b.child.child : b.child, g !== a.child)) for (c.child = g; null !== g; ) g.return = c, g = g.sibling;
          d = Sg(d, e);
          d.return = b;
          c.sibling = d;
          c.childExpirationTime = 0;
          b.memoizedState = ii;
          b.child = c;
          return d;
        }
        c = Xg(b, a.child, e.children, c);
        b.memoizedState = null;
        return b.child = c;
      }
      a = a.child;
      if (g) {
        g = e.fallback;
        e = Wg(null, d, 0, null);
        e.return = b;
        e.child = a;
        null !== a && (a.return = e);
        if (0 === (b.mode & 2)) for (a = null !== b.memoizedState ? b.child.child : b.child, e.child = a; null !== a; ) a.return = e, a = a.sibling;
        c = Wg(g, d, c, null);
        c.return = b;
        e.sibling = c;
        c.effectTag |= 2;
        e.childExpirationTime = 0;
        b.memoizedState = ii;
        b.child = e;
        return c;
      }
      b.memoizedState = null;
      return b.child = Xg(b, a, e.children, c);
    }
    function ki(a, b) {
      a.expirationTime < b && (a.expirationTime = b);
      var c = a.alternate;
      null !== c && c.expirationTime < b && (c.expirationTime = b);
      pg(a.return, b);
    }
    function li(a, b, c, d, e, f) {
      var g = a.memoizedState;
      null === g ? a.memoizedState = { isBackwards: b, rendering: null, renderingStartTime: 0, last: d, tail: c, tailExpiration: 0, tailMode: e, lastEffect: f } : (g.isBackwards = b, g.rendering = null, g.renderingStartTime = 0, g.last = d, g.tail = c, g.tailExpiration = 0, g.tailMode = e, g.lastEffect = f);
    }
    function mi(a, b, c) {
      var d = b.pendingProps, e = d.revealOrder, f = d.tail;
      R(a, b, d.children, c);
      d = M.current;
      if (0 !== (d & 2)) d = d & 1 | 2, b.effectTag |= 64;
      else {
        if (null !== a && 0 !== (a.effectTag & 64)) a: for (a = b.child; null !== a; ) {
          if (13 === a.tag) null !== a.memoizedState && ki(a, c);
          else if (19 === a.tag) ki(a, c);
          else if (null !== a.child) {
            a.child.return = a;
            a = a.child;
            continue;
          }
          if (a === b) break a;
          for (; null === a.sibling; ) {
            if (null === a.return || a.return === b) break a;
            a = a.return;
          }
          a.sibling.return = a.return;
          a = a.sibling;
        }
        d &= 1;
      }
      I(M, d);
      if (0 === (b.mode & 2)) b.memoizedState = null;
      else switch (e) {
        case "forwards":
          c = b.child;
          for (e = null; null !== c; ) a = c.alternate, null !== a && null === hh(a) && (e = c), c = c.sibling;
          c = e;
          null === c ? (e = b.child, b.child = null) : (e = c.sibling, c.sibling = null);
          li(b, false, e, c, f, b.lastEffect);
          break;
        case "backwards":
          c = null;
          e = b.child;
          for (b.child = null; null !== e; ) {
            a = e.alternate;
            if (null !== a && null === hh(a)) {
              b.child = e;
              break;
            }
            a = e.sibling;
            e.sibling = c;
            c = e;
            e = a;
          }
          li(b, true, c, null, f, b.lastEffect);
          break;
        case "together":
          li(b, false, null, null, void 0, b.lastEffect);
          break;
        default:
          b.memoizedState = null;
      }
      return b.child;
    }
    function $h(a, b, c) {
      null !== a && (b.dependencies = a.dependencies);
      var d = b.expirationTime;
      0 !== d && Bg(d);
      if (b.childExpirationTime < c) return null;
      if (null !== a && b.child !== a.child) throw Error(u(153));
      if (null !== b.child) {
        a = b.child;
        c = Sg(a, a.pendingProps);
        b.child = c;
        for (c.return = b; null !== a.sibling; ) a = a.sibling, c = c.sibling = Sg(a, a.pendingProps), c.return = b;
        c.sibling = null;
      }
      return b.child;
    }
    var ni, oi, pi, qi;
    ni = function(a, b) {
      for (var c = b.child; null !== c; ) {
        if (5 === c.tag || 6 === c.tag) a.appendChild(c.stateNode);
        else if (4 !== c.tag && null !== c.child) {
          c.child.return = c;
          c = c.child;
          continue;
        }
        if (c === b) break;
        for (; null === c.sibling; ) {
          if (null === c.return || c.return === b) return;
          c = c.return;
        }
        c.sibling.return = c.return;
        c = c.sibling;
      }
    };
    oi = function() {
    };
    pi = function(a, b, c, d, e) {
      var f = a.memoizedProps;
      if (f !== d) {
        var g = b.stateNode;
        ch($g.current);
        a = null;
        switch (c) {
          case "input":
            f = zb(g, f);
            d = zb(g, d);
            a = [];
            break;
          case "option":
            f = Gb(g, f);
            d = Gb(g, d);
            a = [];
            break;
          case "select":
            f = n({}, f, { value: void 0 });
            d = n({}, d, { value: void 0 });
            a = [];
            break;
          case "textarea":
            f = Ib(g, f);
            d = Ib(g, d);
            a = [];
            break;
          default:
            "function" !== typeof f.onClick && "function" === typeof d.onClick && (g.onclick = sd);
        }
        od(c, d);
        var h, k;
        c = null;
        for (h in f) if (!d.hasOwnProperty(h) && f.hasOwnProperty(h) && null != f[h]) if ("style" === h) for (k in g = f[h], g) g.hasOwnProperty(k) && (c || (c = {}), c[k] = "");
        else "dangerouslySetInnerHTML" !== h && "children" !== h && "suppressContentEditableWarning" !== h && "suppressHydrationWarning" !== h && "autoFocus" !== h && (va.hasOwnProperty(h) ? a || (a = []) : (a = a || []).push(h, null));
        for (h in d) {
          var l = d[h];
          g = null != f ? f[h] : void 0;
          if (d.hasOwnProperty(h) && l !== g && (null != l || null != g)) if ("style" === h) if (g) {
            for (k in g) !g.hasOwnProperty(k) || l && l.hasOwnProperty(k) || (c || (c = {}), c[k] = "");
            for (k in l) l.hasOwnProperty(k) && g[k] !== l[k] && (c || (c = {}), c[k] = l[k]);
          } else c || (a || (a = []), a.push(h, c)), c = l;
          else "dangerouslySetInnerHTML" === h ? (l = l ? l.__html : void 0, g = g ? g.__html : void 0, null != l && g !== l && (a = a || []).push(h, l)) : "children" === h ? g === l || "string" !== typeof l && "number" !== typeof l || (a = a || []).push(h, "" + l) : "suppressContentEditableWarning" !== h && "suppressHydrationWarning" !== h && (va.hasOwnProperty(h) ? (null != l && rd(e, h), a || g === l || (a = [])) : (a = a || []).push(h, l));
        }
        c && (a = a || []).push("style", c);
        e = a;
        if (b.updateQueue = e) b.effectTag |= 4;
      }
    };
    qi = function(a, b, c, d) {
      c !== d && (b.effectTag |= 4);
    };
    function ri(a, b) {
      switch (a.tailMode) {
        case "hidden":
          b = a.tail;
          for (var c = null; null !== b; ) null !== b.alternate && (c = b), b = b.sibling;
          null === c ? a.tail = null : c.sibling = null;
          break;
        case "collapsed":
          c = a.tail;
          for (var d = null; null !== c; ) null !== c.alternate && (d = c), c = c.sibling;
          null === d ? b || null === a.tail ? a.tail = null : a.tail.sibling = null : d.sibling = null;
      }
    }
    function si(a, b, c) {
      var d = b.pendingProps;
      switch (b.tag) {
        case 2:
        case 16:
        case 15:
        case 0:
        case 11:
        case 7:
        case 8:
        case 12:
        case 9:
        case 14:
          return null;
        case 1:
          return L(b.type) && Df(), null;
        case 3:
          return eh(), H(K), H(J), c = b.stateNode, c.pendingContext && (c.context = c.pendingContext, c.pendingContext = null), null !== a && null !== a.child || !Wh(b) || (b.effectTag |= 4), oi(b), null;
        case 5:
          gh(b);
          c = ch(bh.current);
          var e = b.type;
          if (null !== a && null != b.stateNode) pi(a, b, e, d, c), a.ref !== b.ref && (b.effectTag |= 128);
          else {
            if (!d) {
              if (null === b.stateNode) throw Error(u(166));
              return null;
            }
            a = ch($g.current);
            if (Wh(b)) {
              d = b.stateNode;
              e = b.type;
              var f = b.memoizedProps;
              d[Md] = b;
              d[Nd] = f;
              switch (e) {
                case "iframe":
                case "object":
                case "embed":
                  F("load", d);
                  break;
                case "video":
                case "audio":
                  for (a = 0; a < ac.length; a++) F(ac[a], d);
                  break;
                case "source":
                  F("error", d);
                  break;
                case "img":
                case "image":
                case "link":
                  F("error", d);
                  F("load", d);
                  break;
                case "form":
                  F("reset", d);
                  F("submit", d);
                  break;
                case "details":
                  F("toggle", d);
                  break;
                case "input":
                  Ab(d, f);
                  F("invalid", d);
                  rd(c, "onChange");
                  break;
                case "select":
                  d._wrapperState = { wasMultiple: !!f.multiple };
                  F("invalid", d);
                  rd(c, "onChange");
                  break;
                case "textarea":
                  Jb(d, f), F("invalid", d), rd(c, "onChange");
              }
              od(e, f);
              a = null;
              for (var g in f) if (f.hasOwnProperty(g)) {
                var h = f[g];
                "children" === g ? "string" === typeof h ? d.textContent !== h && (a = ["children", h]) : "number" === typeof h && d.textContent !== "" + h && (a = ["children", "" + h]) : va.hasOwnProperty(g) && null != h && rd(c, g);
              }
              switch (e) {
                case "input":
                  xb(d);
                  Eb(d, f, true);
                  break;
                case "textarea":
                  xb(d);
                  Lb(d);
                  break;
                case "select":
                case "option":
                  break;
                default:
                  "function" === typeof f.onClick && (d.onclick = sd);
              }
              c = a;
              b.updateQueue = c;
              null !== c && (b.effectTag |= 4);
            } else {
              g = 9 === c.nodeType ? c : c.ownerDocument;
              a === qd && (a = Nb(e));
              a === qd ? "script" === e ? (a = g.createElement("div"), a.innerHTML = "<script><\/script>", a = a.removeChild(a.firstChild)) : "string" === typeof d.is ? a = g.createElement(e, { is: d.is }) : (a = g.createElement(e), "select" === e && (g = a, d.multiple ? g.multiple = true : d.size && (g.size = d.size))) : a = g.createElementNS(a, e);
              a[Md] = b;
              a[Nd] = d;
              ni(a, b, false, false);
              b.stateNode = a;
              g = pd(e, d);
              switch (e) {
                case "iframe":
                case "object":
                case "embed":
                  F(
                    "load",
                    a
                  );
                  h = d;
                  break;
                case "video":
                case "audio":
                  for (h = 0; h < ac.length; h++) F(ac[h], a);
                  h = d;
                  break;
                case "source":
                  F("error", a);
                  h = d;
                  break;
                case "img":
                case "image":
                case "link":
                  F("error", a);
                  F("load", a);
                  h = d;
                  break;
                case "form":
                  F("reset", a);
                  F("submit", a);
                  h = d;
                  break;
                case "details":
                  F("toggle", a);
                  h = d;
                  break;
                case "input":
                  Ab(a, d);
                  h = zb(a, d);
                  F("invalid", a);
                  rd(c, "onChange");
                  break;
                case "option":
                  h = Gb(a, d);
                  break;
                case "select":
                  a._wrapperState = { wasMultiple: !!d.multiple };
                  h = n({}, d, { value: void 0 });
                  F("invalid", a);
                  rd(c, "onChange");
                  break;
                case "textarea":
                  Jb(
                    a,
                    d
                  );
                  h = Ib(a, d);
                  F("invalid", a);
                  rd(c, "onChange");
                  break;
                default:
                  h = d;
              }
              od(e, h);
              var k = h;
              for (f in k) if (k.hasOwnProperty(f)) {
                var l = k[f];
                "style" === f ? md(a, l) : "dangerouslySetInnerHTML" === f ? (l = l ? l.__html : void 0, null != l && Qb(a, l)) : "children" === f ? "string" === typeof l ? ("textarea" !== e || "" !== l) && Rb(a, l) : "number" === typeof l && Rb(a, "" + l) : "suppressContentEditableWarning" !== f && "suppressHydrationWarning" !== f && "autoFocus" !== f && (va.hasOwnProperty(f) ? null != l && rd(c, f) : null != l && Xa(a, f, l, g));
              }
              switch (e) {
                case "input":
                  xb(a);
                  Eb(a, d, false);
                  break;
                case "textarea":
                  xb(a);
                  Lb(a);
                  break;
                case "option":
                  null != d.value && a.setAttribute("value", "" + rb(d.value));
                  break;
                case "select":
                  a.multiple = !!d.multiple;
                  c = d.value;
                  null != c ? Hb(a, !!d.multiple, c, false) : null != d.defaultValue && Hb(a, !!d.multiple, d.defaultValue, true);
                  break;
                default:
                  "function" === typeof h.onClick && (a.onclick = sd);
              }
              Fd(e, d) && (b.effectTag |= 4);
            }
            null !== b.ref && (b.effectTag |= 128);
          }
          return null;
        case 6:
          if (a && null != b.stateNode) qi(a, b, a.memoizedProps, d);
          else {
            if ("string" !== typeof d && null === b.stateNode) throw Error(u(166));
            c = ch(bh.current);
            ch($g.current);
            Wh(b) ? (c = b.stateNode, d = b.memoizedProps, c[Md] = b, c.nodeValue !== d && (b.effectTag |= 4)) : (c = (9 === c.nodeType ? c : c.ownerDocument).createTextNode(d), c[Md] = b, b.stateNode = c);
          }
          return null;
        case 13:
          H(M);
          d = b.memoizedState;
          if (0 !== (b.effectTag & 64)) return b.expirationTime = c, b;
          c = null !== d;
          d = false;
          null === a ? void 0 !== b.memoizedProps.fallback && Wh(b) : (e = a.memoizedState, d = null !== e, c || null === e || (e = a.child.sibling, null !== e && (f = b.firstEffect, null !== f ? (b.firstEffect = e, e.nextEffect = f) : (b.firstEffect = b.lastEffect = e, e.nextEffect = null), e.effectTag = 8)));
          if (c && !d && 0 !== (b.mode & 2)) if (null === a && true !== b.memoizedProps.unstable_avoidThisFallback || 0 !== (M.current & 1)) S === ti && (S = ui);
          else {
            if (S === ti || S === ui) S = vi;
            0 !== wi && null !== T && (xi(T, U), yi(T, wi));
          }
          if (c || d) b.effectTag |= 4;
          return null;
        case 4:
          return eh(), oi(b), null;
        case 10:
          return og(b), null;
        case 17:
          return L(b.type) && Df(), null;
        case 19:
          H(M);
          d = b.memoizedState;
          if (null === d) return null;
          e = 0 !== (b.effectTag & 64);
          f = d.rendering;
          if (null === f) if (e) ri(d, false);
          else {
            if (S !== ti || null !== a && 0 !== (a.effectTag & 64)) for (f = b.child; null !== f; ) {
              a = hh(f);
              if (null !== a) {
                b.effectTag |= 64;
                ri(d, false);
                e = a.updateQueue;
                null !== e && (b.updateQueue = e, b.effectTag |= 4);
                null === d.lastEffect && (b.firstEffect = null);
                b.lastEffect = d.lastEffect;
                for (d = b.child; null !== d; ) e = d, f = c, e.effectTag &= 2, e.nextEffect = null, e.firstEffect = null, e.lastEffect = null, a = e.alternate, null === a ? (e.childExpirationTime = 0, e.expirationTime = f, e.child = null, e.memoizedProps = null, e.memoizedState = null, e.updateQueue = null, e.dependencies = null) : (e.childExpirationTime = a.childExpirationTime, e.expirationTime = a.expirationTime, e.child = a.child, e.memoizedProps = a.memoizedProps, e.memoizedState = a.memoizedState, e.updateQueue = a.updateQueue, f = a.dependencies, e.dependencies = null === f ? null : { expirationTime: f.expirationTime, firstContext: f.firstContext, responders: f.responders }), d = d.sibling;
                I(M, M.current & 1 | 2);
                return b.child;
              }
              f = f.sibling;
            }
          }
          else {
            if (!e) if (a = hh(f), null !== a) {
              if (b.effectTag |= 64, e = true, c = a.updateQueue, null !== c && (b.updateQueue = c, b.effectTag |= 4), ri(d, true), null === d.tail && "hidden" === d.tailMode && !f.alternate) return b = b.lastEffect = d.lastEffect, null !== b && (b.nextEffect = null), null;
            } else 2 * $f() - d.renderingStartTime > d.tailExpiration && 1 < c && (b.effectTag |= 64, e = true, ri(d, false), b.expirationTime = b.childExpirationTime = c - 1);
            d.isBackwards ? (f.sibling = b.child, b.child = f) : (c = d.last, null !== c ? c.sibling = f : b.child = f, d.last = f);
          }
          return null !== d.tail ? (0 === d.tailExpiration && (d.tailExpiration = $f() + 500), c = d.tail, d.rendering = c, d.tail = c.sibling, d.lastEffect = b.lastEffect, d.renderingStartTime = $f(), c.sibling = null, b = M.current, I(M, e ? b & 1 | 2 : b & 1), c) : null;
      }
      throw Error(u(
        156,
        b.tag
      ));
    }
    function zi(a) {
      switch (a.tag) {
        case 1:
          L(a.type) && Df();
          var b = a.effectTag;
          return b & 4096 ? (a.effectTag = b & -4097 | 64, a) : null;
        case 3:
          eh();
          H(K);
          H(J);
          b = a.effectTag;
          if (0 !== (b & 64)) throw Error(u(285));
          a.effectTag = b & -4097 | 64;
          return a;
        case 5:
          return gh(a), null;
        case 13:
          return H(M), b = a.effectTag, b & 4096 ? (a.effectTag = b & -4097 | 64, a) : null;
        case 19:
          return H(M), null;
        case 4:
          return eh(), null;
        case 10:
          return og(a), null;
        default:
          return null;
      }
    }
    function Ai(a, b) {
      return { value: a, source: b, stack: qb(b) };
    }
    var Bi = "function" === typeof WeakSet ? WeakSet : Set;
    function Ci(a, b) {
      var c = b.source, d = b.stack;
      null === d && null !== c && (d = qb(c));
      null !== c && pb(c.type);
      b = b.value;
      null !== a && 1 === a.tag && pb(a.type);
      try {
        console.error(b);
      } catch (e) {
        setTimeout(function() {
          throw e;
        });
      }
    }
    function Di(a, b) {
      try {
        b.props = a.memoizedProps, b.state = a.memoizedState, b.componentWillUnmount();
      } catch (c) {
        Ei(a, c);
      }
    }
    function Fi(a) {
      var b = a.ref;
      if (null !== b) if ("function" === typeof b) try {
        b(null);
      } catch (c) {
        Ei(a, c);
      }
      else b.current = null;
    }
    function Gi(a, b) {
      switch (b.tag) {
        case 0:
        case 11:
        case 15:
        case 22:
          return;
        case 1:
          if (b.effectTag & 256 && null !== a) {
            var c = a.memoizedProps, d = a.memoizedState;
            a = b.stateNode;
            b = a.getSnapshotBeforeUpdate(b.elementType === b.type ? c : ig(b.type, c), d);
            a.__reactInternalSnapshotBeforeUpdate = b;
          }
          return;
        case 3:
        case 5:
        case 6:
        case 4:
        case 17:
          return;
      }
      throw Error(u(163));
    }
    function Hi(a, b) {
      b = b.updateQueue;
      b = null !== b ? b.lastEffect : null;
      if (null !== b) {
        var c = b = b.next;
        do {
          if ((c.tag & a) === a) {
            var d = c.destroy;
            c.destroy = void 0;
            void 0 !== d && d();
          }
          c = c.next;
        } while (c !== b);
      }
    }
    function Ii(a, b) {
      b = b.updateQueue;
      b = null !== b ? b.lastEffect : null;
      if (null !== b) {
        var c = b = b.next;
        do {
          if ((c.tag & a) === a) {
            var d = c.create;
            c.destroy = d();
          }
          c = c.next;
        } while (c !== b);
      }
    }
    function Ji(a, b, c) {
      switch (c.tag) {
        case 0:
        case 11:
        case 15:
        case 22:
          Ii(3, c);
          return;
        case 1:
          a = c.stateNode;
          if (c.effectTag & 4) if (null === b) a.componentDidMount();
          else {
            var d = c.elementType === c.type ? b.memoizedProps : ig(c.type, b.memoizedProps);
            a.componentDidUpdate(d, b.memoizedState, a.__reactInternalSnapshotBeforeUpdate);
          }
          b = c.updateQueue;
          null !== b && Cg(c, b, a);
          return;
        case 3:
          b = c.updateQueue;
          if (null !== b) {
            a = null;
            if (null !== c.child) switch (c.child.tag) {
              case 5:
                a = c.child.stateNode;
                break;
              case 1:
                a = c.child.stateNode;
            }
            Cg(c, b, a);
          }
          return;
        case 5:
          a = c.stateNode;
          null === b && c.effectTag & 4 && Fd(c.type, c.memoizedProps) && a.focus();
          return;
        case 6:
          return;
        case 4:
          return;
        case 12:
          return;
        case 13:
          null === c.memoizedState && (c = c.alternate, null !== c && (c = c.memoizedState, null !== c && (c = c.dehydrated, null !== c && Vc(c))));
          return;
        case 19:
        case 17:
        case 20:
        case 21:
          return;
      }
      throw Error(u(163));
    }
    function Ki(a, b, c) {
      "function" === typeof Li && Li(b);
      switch (b.tag) {
        case 0:
        case 11:
        case 14:
        case 15:
        case 22:
          a = b.updateQueue;
          if (null !== a && (a = a.lastEffect, null !== a)) {
            var d = a.next;
            cg(97 < c ? 97 : c, function() {
              var a2 = d;
              do {
                var c2 = a2.destroy;
                if (void 0 !== c2) {
                  var g = b;
                  try {
                    c2();
                  } catch (h) {
                    Ei(g, h);
                  }
                }
                a2 = a2.next;
              } while (a2 !== d);
            });
          }
          break;
        case 1:
          Fi(b);
          c = b.stateNode;
          "function" === typeof c.componentWillUnmount && Di(b, c);
          break;
        case 5:
          Fi(b);
          break;
        case 4:
          Mi(a, b, c);
      }
    }
    function Ni(a) {
      var b = a.alternate;
      a.return = null;
      a.child = null;
      a.memoizedState = null;
      a.updateQueue = null;
      a.dependencies = null;
      a.alternate = null;
      a.firstEffect = null;
      a.lastEffect = null;
      a.pendingProps = null;
      a.memoizedProps = null;
      a.stateNode = null;
      null !== b && Ni(b);
    }
    function Oi(a) {
      return 5 === a.tag || 3 === a.tag || 4 === a.tag;
    }
    function Pi(a) {
      a: {
        for (var b = a.return; null !== b; ) {
          if (Oi(b)) {
            var c = b;
            break a;
          }
          b = b.return;
        }
        throw Error(u(160));
      }
      b = c.stateNode;
      switch (c.tag) {
        case 5:
          var d = false;
          break;
        case 3:
          b = b.containerInfo;
          d = true;
          break;
        case 4:
          b = b.containerInfo;
          d = true;
          break;
        default:
          throw Error(u(161));
      }
      c.effectTag & 16 && (Rb(b, ""), c.effectTag &= -17);
      a: b: for (c = a; ; ) {
        for (; null === c.sibling; ) {
          if (null === c.return || Oi(c.return)) {
            c = null;
            break a;
          }
          c = c.return;
        }
        c.sibling.return = c.return;
        for (c = c.sibling; 5 !== c.tag && 6 !== c.tag && 18 !== c.tag; ) {
          if (c.effectTag & 2) continue b;
          if (null === c.child || 4 === c.tag) continue b;
          else c.child.return = c, c = c.child;
        }
        if (!(c.effectTag & 2)) {
          c = c.stateNode;
          break a;
        }
      }
      d ? Qi(a, c, b) : Ri(a, c, b);
    }
    function Qi(a, b, c) {
      var d = a.tag, e = 5 === d || 6 === d;
      if (e) a = e ? a.stateNode : a.stateNode.instance, b ? 8 === c.nodeType ? c.parentNode.insertBefore(a, b) : c.insertBefore(a, b) : (8 === c.nodeType ? (b = c.parentNode, b.insertBefore(a, c)) : (b = c, b.appendChild(a)), c = c._reactRootContainer, null !== c && void 0 !== c || null !== b.onclick || (b.onclick = sd));
      else if (4 !== d && (a = a.child, null !== a)) for (Qi(a, b, c), a = a.sibling; null !== a; ) Qi(a, b, c), a = a.sibling;
    }
    function Ri(a, b, c) {
      var d = a.tag, e = 5 === d || 6 === d;
      if (e) a = e ? a.stateNode : a.stateNode.instance, b ? c.insertBefore(a, b) : c.appendChild(a);
      else if (4 !== d && (a = a.child, null !== a)) for (Ri(a, b, c), a = a.sibling; null !== a; ) Ri(a, b, c), a = a.sibling;
    }
    function Mi(a, b, c) {
      for (var d = b, e = false, f, g; ; ) {
        if (!e) {
          e = d.return;
          a: for (; ; ) {
            if (null === e) throw Error(u(160));
            f = e.stateNode;
            switch (e.tag) {
              case 5:
                g = false;
                break a;
              case 3:
                f = f.containerInfo;
                g = true;
                break a;
              case 4:
                f = f.containerInfo;
                g = true;
                break a;
            }
            e = e.return;
          }
          e = true;
        }
        if (5 === d.tag || 6 === d.tag) {
          a: for (var h = a, k = d, l = c, m = k; ; ) if (Ki(h, m, l), null !== m.child && 4 !== m.tag) m.child.return = m, m = m.child;
          else {
            if (m === k) break a;
            for (; null === m.sibling; ) {
              if (null === m.return || m.return === k) break a;
              m = m.return;
            }
            m.sibling.return = m.return;
            m = m.sibling;
          }
          g ? (h = f, k = d.stateNode, 8 === h.nodeType ? h.parentNode.removeChild(k) : h.removeChild(k)) : f.removeChild(d.stateNode);
        } else if (4 === d.tag) {
          if (null !== d.child) {
            f = d.stateNode.containerInfo;
            g = true;
            d.child.return = d;
            d = d.child;
            continue;
          }
        } else if (Ki(a, d, c), null !== d.child) {
          d.child.return = d;
          d = d.child;
          continue;
        }
        if (d === b) break;
        for (; null === d.sibling; ) {
          if (null === d.return || d.return === b) return;
          d = d.return;
          4 === d.tag && (e = false);
        }
        d.sibling.return = d.return;
        d = d.sibling;
      }
    }
    function Si(a, b) {
      switch (b.tag) {
        case 0:
        case 11:
        case 14:
        case 15:
        case 22:
          Hi(3, b);
          return;
        case 1:
          return;
        case 5:
          var c = b.stateNode;
          if (null != c) {
            var d = b.memoizedProps, e = null !== a ? a.memoizedProps : d;
            a = b.type;
            var f = b.updateQueue;
            b.updateQueue = null;
            if (null !== f) {
              c[Nd] = d;
              "input" === a && "radio" === d.type && null != d.name && Bb(c, d);
              pd(a, e);
              b = pd(a, d);
              for (e = 0; e < f.length; e += 2) {
                var g = f[e], h = f[e + 1];
                "style" === g ? md(c, h) : "dangerouslySetInnerHTML" === g ? Qb(c, h) : "children" === g ? Rb(c, h) : Xa(c, g, h, b);
              }
              switch (a) {
                case "input":
                  Cb(c, d);
                  break;
                case "textarea":
                  Kb(c, d);
                  break;
                case "select":
                  b = c._wrapperState.wasMultiple, c._wrapperState.wasMultiple = !!d.multiple, a = d.value, null != a ? Hb(c, !!d.multiple, a, false) : b !== !!d.multiple && (null != d.defaultValue ? Hb(c, !!d.multiple, d.defaultValue, true) : Hb(c, !!d.multiple, d.multiple ? [] : "", false));
              }
            }
          }
          return;
        case 6:
          if (null === b.stateNode) throw Error(u(162));
          b.stateNode.nodeValue = b.memoizedProps;
          return;
        case 3:
          b = b.stateNode;
          b.hydrate && (b.hydrate = false, Vc(b.containerInfo));
          return;
        case 12:
          return;
        case 13:
          c = b;
          null === b.memoizedState ? d = false : (d = true, c = b.child, Ti = $f());
          if (null !== c) a: for (a = c; ; ) {
            if (5 === a.tag) f = a.stateNode, d ? (f = f.style, "function" === typeof f.setProperty ? f.setProperty("display", "none", "important") : f.display = "none") : (f = a.stateNode, e = a.memoizedProps.style, e = void 0 !== e && null !== e && e.hasOwnProperty("display") ? e.display : null, f.style.display = ld("display", e));
            else if (6 === a.tag) a.stateNode.nodeValue = d ? "" : a.memoizedProps;
            else if (13 === a.tag && null !== a.memoizedState && null === a.memoizedState.dehydrated) {
              f = a.child.sibling;
              f.return = a;
              a = f;
              continue;
            } else if (null !== a.child) {
              a.child.return = a;
              a = a.child;
              continue;
            }
            if (a === c) break;
            for (; null === a.sibling; ) {
              if (null === a.return || a.return === c) break a;
              a = a.return;
            }
            a.sibling.return = a.return;
            a = a.sibling;
          }
          Ui(b);
          return;
        case 19:
          Ui(b);
          return;
        case 17:
          return;
      }
      throw Error(u(163));
    }
    function Ui(a) {
      var b = a.updateQueue;
      if (null !== b) {
        a.updateQueue = null;
        var c = a.stateNode;
        null === c && (c = a.stateNode = new Bi());
        b.forEach(function(b2) {
          var d = Vi.bind(null, a, b2);
          c.has(b2) || (c.add(b2), b2.then(d, d));
        });
      }
    }
    var Wi = "function" === typeof WeakMap ? WeakMap : Map;
    function Xi(a, b, c) {
      c = wg(c, null);
      c.tag = 3;
      c.payload = { element: null };
      var d = b.value;
      c.callback = function() {
        Yi || (Yi = true, Zi = d);
        Ci(a, b);
      };
      return c;
    }
    function $i(a, b, c) {
      c = wg(c, null);
      c.tag = 3;
      var d = a.type.getDerivedStateFromError;
      if ("function" === typeof d) {
        var e = b.value;
        c.payload = function() {
          Ci(a, b);
          return d(e);
        };
      }
      var f = a.stateNode;
      null !== f && "function" === typeof f.componentDidCatch && (c.callback = function() {
        "function" !== typeof d && (null === aj ? aj = /* @__PURE__ */ new Set([this]) : aj.add(this), Ci(a, b));
        var c2 = b.stack;
        this.componentDidCatch(b.value, { componentStack: null !== c2 ? c2 : "" });
      });
      return c;
    }
    var bj = Math.ceil, cj = Wa.ReactCurrentDispatcher, dj = Wa.ReactCurrentOwner, V = 0, ej = 8, fj = 16, gj = 32, ti = 0, hj = 1, ij = 2, ui = 3, vi = 4, jj = 5, W = V, T = null, X = null, U = 0, S = ti, kj = null, lj = 1073741823, mj = 1073741823, nj = null, wi = 0, oj = false, Ti = 0, pj = 500, Y = null, Yi = false, Zi = null, aj = null, qj = false, rj = null, sj = 90, tj = null, uj = 0, vj = null, wj = 0;
    function Gg() {
      return (W & (fj | gj)) !== V ? 1073741821 - ($f() / 10 | 0) : 0 !== wj ? wj : wj = 1073741821 - ($f() / 10 | 0);
    }
    function Hg(a, b, c) {
      b = b.mode;
      if (0 === (b & 2)) return 1073741823;
      var d = ag();
      if (0 === (b & 4)) return 99 === d ? 1073741823 : 1073741822;
      if ((W & fj) !== V) return U;
      if (null !== c) a = hg(a, c.timeoutMs | 0 || 5e3, 250);
      else switch (d) {
        case 99:
          a = 1073741823;
          break;
        case 98:
          a = hg(a, 150, 100);
          break;
        case 97:
        case 96:
          a = hg(a, 5e3, 250);
          break;
        case 95:
          a = 2;
          break;
        default:
          throw Error(u(326));
      }
      null !== T && a === U && --a;
      return a;
    }
    function Ig(a, b) {
      if (50 < uj) throw uj = 0, vj = null, Error(u(185));
      a = xj(a, b);
      if (null !== a) {
        var c = ag();
        1073741823 === b ? (W & ej) !== V && (W & (fj | gj)) === V ? yj(a) : (Z(a), W === V && gg()) : Z(a);
        (W & 4) === V || 98 !== c && 99 !== c || (null === tj ? tj = /* @__PURE__ */ new Map([[a, b]]) : (c = tj.get(a), (void 0 === c || c > b) && tj.set(a, b)));
      }
    }
    function xj(a, b) {
      a.expirationTime < b && (a.expirationTime = b);
      var c = a.alternate;
      null !== c && c.expirationTime < b && (c.expirationTime = b);
      var d = a.return, e = null;
      if (null === d && 3 === a.tag) e = a.stateNode;
      else for (; null !== d; ) {
        c = d.alternate;
        d.childExpirationTime < b && (d.childExpirationTime = b);
        null !== c && c.childExpirationTime < b && (c.childExpirationTime = b);
        if (null === d.return && 3 === d.tag) {
          e = d.stateNode;
          break;
        }
        d = d.return;
      }
      null !== e && (T === e && (Bg(b), S === vi && xi(e, U)), yi(e, b));
      return e;
    }
    function zj(a) {
      var b = a.lastExpiredTime;
      if (0 !== b) return b;
      b = a.firstPendingTime;
      if (!Aj(a, b)) return b;
      var c = a.lastPingedTime;
      a = a.nextKnownPendingLevel;
      a = c > a ? c : a;
      return 2 >= a && b !== a ? 0 : a;
    }
    function Z(a) {
      if (0 !== a.lastExpiredTime) a.callbackExpirationTime = 1073741823, a.callbackPriority = 99, a.callbackNode = eg(yj.bind(null, a));
      else {
        var b = zj(a), c = a.callbackNode;
        if (0 === b) null !== c && (a.callbackNode = null, a.callbackExpirationTime = 0, a.callbackPriority = 90);
        else {
          var d = Gg();
          1073741823 === b ? d = 99 : 1 === b || 2 === b ? d = 95 : (d = 10 * (1073741821 - b) - 10 * (1073741821 - d), d = 0 >= d ? 99 : 250 >= d ? 98 : 5250 >= d ? 97 : 95);
          if (null !== c) {
            var e = a.callbackPriority;
            if (a.callbackExpirationTime === b && e >= d) return;
            c !== Tf && Kf(c);
          }
          a.callbackExpirationTime = b;
          a.callbackPriority = d;
          b = 1073741823 === b ? eg(yj.bind(null, a)) : dg(d, Bj.bind(null, a), { timeout: 10 * (1073741821 - b) - $f() });
          a.callbackNode = b;
        }
      }
    }
    function Bj(a, b) {
      wj = 0;
      if (b) return b = Gg(), Cj(a, b), Z(a), null;
      var c = zj(a);
      if (0 !== c) {
        b = a.callbackNode;
        if ((W & (fj | gj)) !== V) throw Error(u(327));
        Dj();
        a === T && c === U || Ej(a, c);
        if (null !== X) {
          var d = W;
          W |= fj;
          var e = Fj();
          do
            try {
              Gj();
              break;
            } catch (h) {
              Hj(a, h);
            }
          while (1);
          ng();
          W = d;
          cj.current = e;
          if (S === hj) throw b = kj, Ej(a, c), xi(a, c), Z(a), b;
          if (null === X) switch (e = a.finishedWork = a.current.alternate, a.finishedExpirationTime = c, d = S, T = null, d) {
            case ti:
            case hj:
              throw Error(u(345));
            case ij:
              Cj(a, 2 < c ? 2 : c);
              break;
            case ui:
              xi(a, c);
              d = a.lastSuspendedTime;
              c === d && (a.nextKnownPendingLevel = Ij(e));
              if (1073741823 === lj && (e = Ti + pj - $f(), 10 < e)) {
                if (oj) {
                  var f = a.lastPingedTime;
                  if (0 === f || f >= c) {
                    a.lastPingedTime = c;
                    Ej(a, c);
                    break;
                  }
                }
                f = zj(a);
                if (0 !== f && f !== c) break;
                if (0 !== d && d !== c) {
                  a.lastPingedTime = d;
                  break;
                }
                a.timeoutHandle = Hd(Jj.bind(null, a), e);
                break;
              }
              Jj(a);
              break;
            case vi:
              xi(a, c);
              d = a.lastSuspendedTime;
              c === d && (a.nextKnownPendingLevel = Ij(e));
              if (oj && (e = a.lastPingedTime, 0 === e || e >= c)) {
                a.lastPingedTime = c;
                Ej(a, c);
                break;
              }
              e = zj(a);
              if (0 !== e && e !== c) break;
              if (0 !== d && d !== c) {
                a.lastPingedTime = d;
                break;
              }
              1073741823 !== mj ? d = 10 * (1073741821 - mj) - $f() : 1073741823 === lj ? d = 0 : (d = 10 * (1073741821 - lj) - 5e3, e = $f(), c = 10 * (1073741821 - c) - e, d = e - d, 0 > d && (d = 0), d = (120 > d ? 120 : 480 > d ? 480 : 1080 > d ? 1080 : 1920 > d ? 1920 : 3e3 > d ? 3e3 : 4320 > d ? 4320 : 1960 * bj(d / 1960)) - d, c < d && (d = c));
              if (10 < d) {
                a.timeoutHandle = Hd(Jj.bind(null, a), d);
                break;
              }
              Jj(a);
              break;
            case jj:
              if (1073741823 !== lj && null !== nj) {
                f = lj;
                var g = nj;
                d = g.busyMinDurationMs | 0;
                0 >= d ? d = 0 : (e = g.busyDelayMs | 0, f = $f() - (10 * (1073741821 - f) - (g.timeoutMs | 0 || 5e3)), d = f <= e ? 0 : e + d - f);
                if (10 < d) {
                  xi(a, c);
                  a.timeoutHandle = Hd(Jj.bind(null, a), d);
                  break;
                }
              }
              Jj(a);
              break;
            default:
              throw Error(u(329));
          }
          Z(a);
          if (a.callbackNode === b) return Bj.bind(null, a);
        }
      }
      return null;
    }
    function yj(a) {
      var b = a.lastExpiredTime;
      b = 0 !== b ? b : 1073741823;
      if ((W & (fj | gj)) !== V) throw Error(u(327));
      Dj();
      a === T && b === U || Ej(a, b);
      if (null !== X) {
        var c = W;
        W |= fj;
        var d = Fj();
        do
          try {
            Kj();
            break;
          } catch (e) {
            Hj(a, e);
          }
        while (1);
        ng();
        W = c;
        cj.current = d;
        if (S === hj) throw c = kj, Ej(a, b), xi(a, b), Z(a), c;
        if (null !== X) throw Error(u(261));
        a.finishedWork = a.current.alternate;
        a.finishedExpirationTime = b;
        T = null;
        Jj(a);
        Z(a);
      }
      return null;
    }
    function Lj() {
      if (null !== tj) {
        var a = tj;
        tj = null;
        a.forEach(function(a2, c) {
          Cj(c, a2);
          Z(c);
        });
        gg();
      }
    }
    function Mj(a, b) {
      var c = W;
      W |= 1;
      try {
        return a(b);
      } finally {
        W = c, W === V && gg();
      }
    }
    function Nj(a, b) {
      var c = W;
      W &= -2;
      W |= ej;
      try {
        return a(b);
      } finally {
        W = c, W === V && gg();
      }
    }
    function Ej(a, b) {
      a.finishedWork = null;
      a.finishedExpirationTime = 0;
      var c = a.timeoutHandle;
      -1 !== c && (a.timeoutHandle = -1, Id(c));
      if (null !== X) for (c = X.return; null !== c; ) {
        var d = c;
        switch (d.tag) {
          case 1:
            d = d.type.childContextTypes;
            null !== d && void 0 !== d && Df();
            break;
          case 3:
            eh();
            H(K);
            H(J);
            break;
          case 5:
            gh(d);
            break;
          case 4:
            eh();
            break;
          case 13:
            H(M);
            break;
          case 19:
            H(M);
            break;
          case 10:
            og(d);
        }
        c = c.return;
      }
      T = a;
      X = Sg(a.current, null);
      U = b;
      S = ti;
      kj = null;
      mj = lj = 1073741823;
      nj = null;
      wi = 0;
      oj = false;
    }
    function Hj(a, b) {
      do {
        try {
          ng();
          jh.current = sh;
          if (mh) for (var c = N.memoizedState; null !== c; ) {
            var d = c.queue;
            null !== d && (d.pending = null);
            c = c.next;
          }
          lh = 0;
          P = O = N = null;
          mh = false;
          if (null === X || null === X.return) return S = hj, kj = b, X = null;
          a: {
            var e = a, f = X.return, g = X, h = b;
            b = U;
            g.effectTag |= 2048;
            g.firstEffect = g.lastEffect = null;
            if (null !== h && "object" === typeof h && "function" === typeof h.then) {
              var k = h;
              if (0 === (g.mode & 2)) {
                var l = g.alternate;
                l ? (g.updateQueue = l.updateQueue, g.memoizedState = l.memoizedState, g.expirationTime = l.expirationTime) : (g.updateQueue = null, g.memoizedState = null);
              }
              var m = 0 !== (M.current & 1), p = f;
              do {
                var x;
                if (x = 13 === p.tag) {
                  var z = p.memoizedState;
                  if (null !== z) x = null !== z.dehydrated ? true : false;
                  else {
                    var ca = p.memoizedProps;
                    x = void 0 === ca.fallback ? false : true !== ca.unstable_avoidThisFallback ? true : m ? false : true;
                  }
                }
                if (x) {
                  var D = p.updateQueue;
                  if (null === D) {
                    var t = /* @__PURE__ */ new Set();
                    t.add(k);
                    p.updateQueue = t;
                  } else D.add(k);
                  if (0 === (p.mode & 2)) {
                    p.effectTag |= 64;
                    g.effectTag &= -2981;
                    if (1 === g.tag) if (null === g.alternate) g.tag = 17;
                    else {
                      var y = wg(1073741823, null);
                      y.tag = 2;
                      xg(g, y);
                    }
                    g.expirationTime = 1073741823;
                    break a;
                  }
                  h = void 0;
                  g = b;
                  var A = e.pingCache;
                  null === A ? (A = e.pingCache = new Wi(), h = /* @__PURE__ */ new Set(), A.set(k, h)) : (h = A.get(k), void 0 === h && (h = /* @__PURE__ */ new Set(), A.set(k, h)));
                  if (!h.has(g)) {
                    h.add(g);
                    var q = Oj.bind(null, e, k, g);
                    k.then(q, q);
                  }
                  p.effectTag |= 4096;
                  p.expirationTime = b;
                  break a;
                }
                p = p.return;
              } while (null !== p);
              h = Error((pb(g.type) || "A React component") + " suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display." + qb(g));
            }
            S !== jj && (S = ij);
            h = Ai(h, g);
            p = f;
            do {
              switch (p.tag) {
                case 3:
                  k = h;
                  p.effectTag |= 4096;
                  p.expirationTime = b;
                  var B = Xi(p, k, b);
                  yg(p, B);
                  break a;
                case 1:
                  k = h;
                  var w = p.type, ub = p.stateNode;
                  if (0 === (p.effectTag & 64) && ("function" === typeof w.getDerivedStateFromError || null !== ub && "function" === typeof ub.componentDidCatch && (null === aj || !aj.has(ub)))) {
                    p.effectTag |= 4096;
                    p.expirationTime = b;
                    var vb = $i(p, k, b);
                    yg(p, vb);
                    break a;
                  }
              }
              p = p.return;
            } while (null !== p);
          }
          X = Pj(X);
        } catch (Xc) {
          b = Xc;
          continue;
        }
        break;
      } while (1);
    }
    function Fj() {
      var a = cj.current;
      cj.current = sh;
      return null === a ? sh : a;
    }
    function Ag(a, b) {
      a < lj && 2 < a && (lj = a);
      null !== b && a < mj && 2 < a && (mj = a, nj = b);
    }
    function Bg(a) {
      a > wi && (wi = a);
    }
    function Kj() {
      for (; null !== X; ) X = Qj(X);
    }
    function Gj() {
      for (; null !== X && !Uf(); ) X = Qj(X);
    }
    function Qj(a) {
      var b = Rj(a.alternate, a, U);
      a.memoizedProps = a.pendingProps;
      null === b && (b = Pj(a));
      dj.current = null;
      return b;
    }
    function Pj(a) {
      X = a;
      do {
        var b = X.alternate;
        a = X.return;
        if (0 === (X.effectTag & 2048)) {
          b = si(b, X, U);
          if (1 === U || 1 !== X.childExpirationTime) {
            for (var c = 0, d = X.child; null !== d; ) {
              var e = d.expirationTime, f = d.childExpirationTime;
              e > c && (c = e);
              f > c && (c = f);
              d = d.sibling;
            }
            X.childExpirationTime = c;
          }
          if (null !== b) return b;
          null !== a && 0 === (a.effectTag & 2048) && (null === a.firstEffect && (a.firstEffect = X.firstEffect), null !== X.lastEffect && (null !== a.lastEffect && (a.lastEffect.nextEffect = X.firstEffect), a.lastEffect = X.lastEffect), 1 < X.effectTag && (null !== a.lastEffect ? a.lastEffect.nextEffect = X : a.firstEffect = X, a.lastEffect = X));
        } else {
          b = zi(X);
          if (null !== b) return b.effectTag &= 2047, b;
          null !== a && (a.firstEffect = a.lastEffect = null, a.effectTag |= 2048);
        }
        b = X.sibling;
        if (null !== b) return b;
        X = a;
      } while (null !== X);
      S === ti && (S = jj);
      return null;
    }
    function Ij(a) {
      var b = a.expirationTime;
      a = a.childExpirationTime;
      return b > a ? b : a;
    }
    function Jj(a) {
      var b = ag();
      cg(99, Sj.bind(null, a, b));
      return null;
    }
    function Sj(a, b) {
      do
        Dj();
      while (null !== rj);
      if ((W & (fj | gj)) !== V) throw Error(u(327));
      var c = a.finishedWork, d = a.finishedExpirationTime;
      if (null === c) return null;
      a.finishedWork = null;
      a.finishedExpirationTime = 0;
      if (c === a.current) throw Error(u(177));
      a.callbackNode = null;
      a.callbackExpirationTime = 0;
      a.callbackPriority = 90;
      a.nextKnownPendingLevel = 0;
      var e = Ij(c);
      a.firstPendingTime = e;
      d <= a.lastSuspendedTime ? a.firstSuspendedTime = a.lastSuspendedTime = a.nextKnownPendingLevel = 0 : d <= a.firstSuspendedTime && (a.firstSuspendedTime = d - 1);
      d <= a.lastPingedTime && (a.lastPingedTime = 0);
      d <= a.lastExpiredTime && (a.lastExpiredTime = 0);
      a === T && (X = T = null, U = 0);
      1 < c.effectTag ? null !== c.lastEffect ? (c.lastEffect.nextEffect = c, e = c.firstEffect) : e = c : e = c.firstEffect;
      if (null !== e) {
        var f = W;
        W |= gj;
        dj.current = null;
        Dd = fd;
        var g = xd();
        if (yd(g)) {
          if ("selectionStart" in g) var h = { start: g.selectionStart, end: g.selectionEnd };
          else a: {
            h = (h = g.ownerDocument) && h.defaultView || window;
            var k = h.getSelection && h.getSelection();
            if (k && 0 !== k.rangeCount) {
              h = k.anchorNode;
              var l = k.anchorOffset, m = k.focusNode;
              k = k.focusOffset;
              try {
                h.nodeType, m.nodeType;
              } catch (wb) {
                h = null;
                break a;
              }
              var p = 0, x = -1, z = -1, ca = 0, D = 0, t = g, y = null;
              b: for (; ; ) {
                for (var A; ; ) {
                  t !== h || 0 !== l && 3 !== t.nodeType || (x = p + l);
                  t !== m || 0 !== k && 3 !== t.nodeType || (z = p + k);
                  3 === t.nodeType && (p += t.nodeValue.length);
                  if (null === (A = t.firstChild)) break;
                  y = t;
                  t = A;
                }
                for (; ; ) {
                  if (t === g) break b;
                  y === h && ++ca === l && (x = p);
                  y === m && ++D === k && (z = p);
                  if (null !== (A = t.nextSibling)) break;
                  t = y;
                  y = t.parentNode;
                }
                t = A;
              }
              h = -1 === x || -1 === z ? null : { start: x, end: z };
            } else h = null;
          }
          h = h || { start: 0, end: 0 };
        } else h = null;
        Ed = { activeElementDetached: null, focusedElem: g, selectionRange: h };
        fd = false;
        Y = e;
        do
          try {
            Tj();
          } catch (wb) {
            if (null === Y) throw Error(u(330));
            Ei(Y, wb);
            Y = Y.nextEffect;
          }
        while (null !== Y);
        Y = e;
        do
          try {
            for (g = a, h = b; null !== Y; ) {
              var q = Y.effectTag;
              q & 16 && Rb(Y.stateNode, "");
              if (q & 128) {
                var B = Y.alternate;
                if (null !== B) {
                  var w = B.ref;
                  null !== w && ("function" === typeof w ? w(null) : w.current = null);
                }
              }
              switch (q & 1038) {
                case 2:
                  Pi(Y);
                  Y.effectTag &= -3;
                  break;
                case 6:
                  Pi(Y);
                  Y.effectTag &= -3;
                  Si(Y.alternate, Y);
                  break;
                case 1024:
                  Y.effectTag &= -1025;
                  break;
                case 1028:
                  Y.effectTag &= -1025;
                  Si(Y.alternate, Y);
                  break;
                case 4:
                  Si(Y.alternate, Y);
                  break;
                case 8:
                  l = Y, Mi(g, l, h), Ni(l);
              }
              Y = Y.nextEffect;
            }
          } catch (wb) {
            if (null === Y) throw Error(u(330));
            Ei(Y, wb);
            Y = Y.nextEffect;
          }
        while (null !== Y);
        w = Ed;
        B = xd();
        q = w.focusedElem;
        h = w.selectionRange;
        if (B !== q && q && q.ownerDocument && wd(q.ownerDocument.documentElement, q)) {
          null !== h && yd(q) && (B = h.start, w = h.end, void 0 === w && (w = B), "selectionStart" in q ? (q.selectionStart = B, q.selectionEnd = Math.min(w, q.value.length)) : (w = (B = q.ownerDocument || document) && B.defaultView || window, w.getSelection && (w = w.getSelection(), l = q.textContent.length, g = Math.min(h.start, l), h = void 0 === h.end ? g : Math.min(h.end, l), !w.extend && g > h && (l = h, h = g, g = l), l = vd(q, g), m = vd(q, h), l && m && (1 !== w.rangeCount || w.anchorNode !== l.node || w.anchorOffset !== l.offset || w.focusNode !== m.node || w.focusOffset !== m.offset) && (B = B.createRange(), B.setStart(l.node, l.offset), w.removeAllRanges(), g > h ? (w.addRange(B), w.extend(m.node, m.offset)) : (B.setEnd(m.node, m.offset), w.addRange(B))))));
          B = [];
          for (w = q; w = w.parentNode; ) 1 === w.nodeType && B.push({
            element: w,
            left: w.scrollLeft,
            top: w.scrollTop
          });
          "function" === typeof q.focus && q.focus();
          for (q = 0; q < B.length; q++) w = B[q], w.element.scrollLeft = w.left, w.element.scrollTop = w.top;
        }
        fd = !!Dd;
        Ed = Dd = null;
        a.current = c;
        Y = e;
        do
          try {
            for (q = a; null !== Y; ) {
              var ub = Y.effectTag;
              ub & 36 && Ji(q, Y.alternate, Y);
              if (ub & 128) {
                B = void 0;
                var vb = Y.ref;
                if (null !== vb) {
                  var Xc = Y.stateNode;
                  switch (Y.tag) {
                    case 5:
                      B = Xc;
                      break;
                    default:
                      B = Xc;
                  }
                  "function" === typeof vb ? vb(B) : vb.current = B;
                }
              }
              Y = Y.nextEffect;
            }
          } catch (wb) {
            if (null === Y) throw Error(u(330));
            Ei(Y, wb);
            Y = Y.nextEffect;
          }
        while (null !== Y);
        Y = null;
        Vf();
        W = f;
      } else a.current = c;
      if (qj) qj = false, rj = a, sj = b;
      else for (Y = e; null !== Y; ) b = Y.nextEffect, Y.nextEffect = null, Y = b;
      b = a.firstPendingTime;
      0 === b && (aj = null);
      1073741823 === b ? a === vj ? uj++ : (uj = 0, vj = a) : uj = 0;
      "function" === typeof Uj && Uj(c.stateNode, d);
      Z(a);
      if (Yi) throw Yi = false, a = Zi, Zi = null, a;
      if ((W & ej) !== V) return null;
      gg();
      return null;
    }
    function Tj() {
      for (; null !== Y; ) {
        var a = Y.effectTag;
        0 !== (a & 256) && Gi(Y.alternate, Y);
        0 === (a & 512) || qj || (qj = true, dg(97, function() {
          Dj();
          return null;
        }));
        Y = Y.nextEffect;
      }
    }
    function Dj() {
      if (90 !== sj) {
        var a = 97 < sj ? 97 : sj;
        sj = 90;
        return cg(a, Vj);
      }
    }
    function Vj() {
      if (null === rj) return false;
      var a = rj;
      rj = null;
      if ((W & (fj | gj)) !== V) throw Error(u(331));
      var b = W;
      W |= gj;
      for (a = a.current.firstEffect; null !== a; ) {
        try {
          var c = a;
          if (0 !== (c.effectTag & 512)) switch (c.tag) {
            case 0:
            case 11:
            case 15:
            case 22:
              Hi(5, c), Ii(5, c);
          }
        } catch (d) {
          if (null === a) throw Error(u(330));
          Ei(a, d);
        }
        c = a.nextEffect;
        a.nextEffect = null;
        a = c;
      }
      W = b;
      gg();
      return true;
    }
    function Wj(a, b, c) {
      b = Ai(c, b);
      b = Xi(a, b, 1073741823);
      xg(a, b);
      a = xj(a, 1073741823);
      null !== a && Z(a);
    }
    function Ei(a, b) {
      if (3 === a.tag) Wj(a, a, b);
      else for (var c = a.return; null !== c; ) {
        if (3 === c.tag) {
          Wj(c, a, b);
          break;
        } else if (1 === c.tag) {
          var d = c.stateNode;
          if ("function" === typeof c.type.getDerivedStateFromError || "function" === typeof d.componentDidCatch && (null === aj || !aj.has(d))) {
            a = Ai(b, a);
            a = $i(c, a, 1073741823);
            xg(c, a);
            c = xj(c, 1073741823);
            null !== c && Z(c);
            break;
          }
        }
        c = c.return;
      }
    }
    function Oj(a, b, c) {
      var d = a.pingCache;
      null !== d && d.delete(b);
      T === a && U === c ? S === vi || S === ui && 1073741823 === lj && $f() - Ti < pj ? Ej(a, U) : oj = true : Aj(a, c) && (b = a.lastPingedTime, 0 !== b && b < c || (a.lastPingedTime = c, Z(a)));
    }
    function Vi(a, b) {
      var c = a.stateNode;
      null !== c && c.delete(b);
      b = 0;
      0 === b && (b = Gg(), b = Hg(b, a, null));
      a = xj(a, b);
      null !== a && Z(a);
    }
    var Rj;
    Rj = function(a, b, c) {
      var d = b.expirationTime;
      if (null !== a) {
        var e = b.pendingProps;
        if (a.memoizedProps !== e || K.current) rg = true;
        else {
          if (d < c) {
            rg = false;
            switch (b.tag) {
              case 3:
                hi(b);
                Xh();
                break;
              case 5:
                fh(b);
                if (b.mode & 4 && 1 !== c && e.hidden) return b.expirationTime = b.childExpirationTime = 1, null;
                break;
              case 1:
                L(b.type) && Gf(b);
                break;
              case 4:
                dh(b, b.stateNode.containerInfo);
                break;
              case 10:
                d = b.memoizedProps.value;
                e = b.type._context;
                I(jg, e._currentValue);
                e._currentValue = d;
                break;
              case 13:
                if (null !== b.memoizedState) {
                  d = b.child.childExpirationTime;
                  if (0 !== d && d >= c) return ji(a, b, c);
                  I(M, M.current & 1);
                  b = $h(a, b, c);
                  return null !== b ? b.sibling : null;
                }
                I(M, M.current & 1);
                break;
              case 19:
                d = b.childExpirationTime >= c;
                if (0 !== (a.effectTag & 64)) {
                  if (d) return mi(a, b, c);
                  b.effectTag |= 64;
                }
                e = b.memoizedState;
                null !== e && (e.rendering = null, e.tail = null);
                I(M, M.current);
                if (!d) return null;
            }
            return $h(a, b, c);
          }
          rg = false;
        }
      } else rg = false;
      b.expirationTime = 0;
      switch (b.tag) {
        case 2:
          d = b.type;
          null !== a && (a.alternate = null, b.alternate = null, b.effectTag |= 2);
          a = b.pendingProps;
          e = Cf(b, J.current);
          qg(b, c);
          e = oh(
            null,
            b,
            d,
            a,
            e,
            c
          );
          b.effectTag |= 1;
          if ("object" === typeof e && null !== e && "function" === typeof e.render && void 0 === e.$$typeof) {
            b.tag = 1;
            b.memoizedState = null;
            b.updateQueue = null;
            if (L(d)) {
              var f = true;
              Gf(b);
            } else f = false;
            b.memoizedState = null !== e.state && void 0 !== e.state ? e.state : null;
            ug(b);
            var g = d.getDerivedStateFromProps;
            "function" === typeof g && Fg(b, d, g, a);
            e.updater = Jg;
            b.stateNode = e;
            e._reactInternalFiber = b;
            Ng(b, d, a, c);
            b = gi(null, b, d, true, f, c);
          } else b.tag = 0, R(null, b, e, c), b = b.child;
          return b;
        case 16:
          a: {
            e = b.elementType;
            null !== a && (a.alternate = null, b.alternate = null, b.effectTag |= 2);
            a = b.pendingProps;
            ob(e);
            if (1 !== e._status) throw e._result;
            e = e._result;
            b.type = e;
            f = b.tag = Xj(e);
            a = ig(e, a);
            switch (f) {
              case 0:
                b = di(null, b, e, a, c);
                break a;
              case 1:
                b = fi(null, b, e, a, c);
                break a;
              case 11:
                b = Zh(null, b, e, a, c);
                break a;
              case 14:
                b = ai(null, b, e, ig(e.type, a), d, c);
                break a;
            }
            throw Error(u(306, e, ""));
          }
          return b;
        case 0:
          return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : ig(d, e), di(a, b, d, e, c);
        case 1:
          return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : ig(d, e), fi(a, b, d, e, c);
        case 3:
          hi(b);
          d = b.updateQueue;
          if (null === a || null === d) throw Error(u(282));
          d = b.pendingProps;
          e = b.memoizedState;
          e = null !== e ? e.element : null;
          vg(a, b);
          zg(b, d, null, c);
          d = b.memoizedState.element;
          if (d === e) Xh(), b = $h(a, b, c);
          else {
            if (e = b.stateNode.hydrate) Ph = Jd(b.stateNode.containerInfo.firstChild), Oh = b, e = Qh = true;
            if (e) for (c = Yg(b, null, d, c), b.child = c; c; ) c.effectTag = c.effectTag & -3 | 1024, c = c.sibling;
            else R(a, b, d, c), Xh();
            b = b.child;
          }
          return b;
        case 5:
          return fh(b), null === a && Uh(b), d = b.type, e = b.pendingProps, f = null !== a ? a.memoizedProps : null, g = e.children, Gd(d, e) ? g = null : null !== f && Gd(d, f) && (b.effectTag |= 16), ei(a, b), b.mode & 4 && 1 !== c && e.hidden ? (b.expirationTime = b.childExpirationTime = 1, b = null) : (R(a, b, g, c), b = b.child), b;
        case 6:
          return null === a && Uh(b), null;
        case 13:
          return ji(a, b, c);
        case 4:
          return dh(b, b.stateNode.containerInfo), d = b.pendingProps, null === a ? b.child = Xg(b, null, d, c) : R(a, b, d, c), b.child;
        case 11:
          return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : ig(d, e), Zh(a, b, d, e, c);
        case 7:
          return R(a, b, b.pendingProps, c), b.child;
        case 8:
          return R(
            a,
            b,
            b.pendingProps.children,
            c
          ), b.child;
        case 12:
          return R(a, b, b.pendingProps.children, c), b.child;
        case 10:
          a: {
            d = b.type._context;
            e = b.pendingProps;
            g = b.memoizedProps;
            f = e.value;
            var h = b.type._context;
            I(jg, h._currentValue);
            h._currentValue = f;
            if (null !== g) if (h = g.value, f = $e(h, f) ? 0 : ("function" === typeof d._calculateChangedBits ? d._calculateChangedBits(h, f) : 1073741823) | 0, 0 === f) {
              if (g.children === e.children && !K.current) {
                b = $h(a, b, c);
                break a;
              }
            } else for (h = b.child, null !== h && (h.return = b); null !== h; ) {
              var k = h.dependencies;
              if (null !== k) {
                g = h.child;
                for (var l = k.firstContext; null !== l; ) {
                  if (l.context === d && 0 !== (l.observedBits & f)) {
                    1 === h.tag && (l = wg(c, null), l.tag = 2, xg(h, l));
                    h.expirationTime < c && (h.expirationTime = c);
                    l = h.alternate;
                    null !== l && l.expirationTime < c && (l.expirationTime = c);
                    pg(h.return, c);
                    k.expirationTime < c && (k.expirationTime = c);
                    break;
                  }
                  l = l.next;
                }
              } else g = 10 === h.tag ? h.type === b.type ? null : h.child : h.child;
              if (null !== g) g.return = h;
              else for (g = h; null !== g; ) {
                if (g === b) {
                  g = null;
                  break;
                }
                h = g.sibling;
                if (null !== h) {
                  h.return = g.return;
                  g = h;
                  break;
                }
                g = g.return;
              }
              h = g;
            }
            R(a, b, e.children, c);
            b = b.child;
          }
          return b;
        case 9:
          return e = b.type, f = b.pendingProps, d = f.children, qg(b, c), e = sg(e, f.unstable_observedBits), d = d(e), b.effectTag |= 1, R(a, b, d, c), b.child;
        case 14:
          return e = b.type, f = ig(e, b.pendingProps), f = ig(e.type, f), ai(a, b, e, f, d, c);
        case 15:
          return ci(a, b, b.type, b.pendingProps, d, c);
        case 17:
          return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : ig(d, e), null !== a && (a.alternate = null, b.alternate = null, b.effectTag |= 2), b.tag = 1, L(d) ? (a = true, Gf(b)) : a = false, qg(b, c), Lg(b, d, e), Ng(b, d, e, c), gi(
            null,
            b,
            d,
            true,
            a,
            c
          );
        case 19:
          return mi(a, b, c);
      }
      throw Error(u(156, b.tag));
    };
    var Uj = null, Li = null;
    function Yj(a) {
      if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return false;
      var b = __REACT_DEVTOOLS_GLOBAL_HOOK__;
      if (b.isDisabled || !b.supportsFiber) return true;
      try {
        var c = b.inject(a);
        Uj = function(a2) {
          try {
            b.onCommitFiberRoot(c, a2, void 0, 64 === (a2.current.effectTag & 64));
          } catch (e) {
          }
        };
        Li = function(a2) {
          try {
            b.onCommitFiberUnmount(c, a2);
          } catch (e) {
          }
        };
      } catch (d) {
      }
      return true;
    }
    function Zj(a, b, c, d) {
      this.tag = a;
      this.key = c;
      this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null;
      this.index = 0;
      this.ref = null;
      this.pendingProps = b;
      this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null;
      this.mode = d;
      this.effectTag = 0;
      this.lastEffect = this.firstEffect = this.nextEffect = null;
      this.childExpirationTime = this.expirationTime = 0;
      this.alternate = null;
    }
    function Sh(a, b, c, d) {
      return new Zj(a, b, c, d);
    }
    function bi(a) {
      a = a.prototype;
      return !(!a || !a.isReactComponent);
    }
    function Xj(a) {
      if ("function" === typeof a) return bi(a) ? 1 : 0;
      if (void 0 !== a && null !== a) {
        a = a.$$typeof;
        if (a === gb) return 11;
        if (a === jb) return 14;
      }
      return 2;
    }
    function Sg(a, b) {
      var c = a.alternate;
      null === c ? (c = Sh(a.tag, b, a.key, a.mode), c.elementType = a.elementType, c.type = a.type, c.stateNode = a.stateNode, c.alternate = a, a.alternate = c) : (c.pendingProps = b, c.effectTag = 0, c.nextEffect = null, c.firstEffect = null, c.lastEffect = null);
      c.childExpirationTime = a.childExpirationTime;
      c.expirationTime = a.expirationTime;
      c.child = a.child;
      c.memoizedProps = a.memoizedProps;
      c.memoizedState = a.memoizedState;
      c.updateQueue = a.updateQueue;
      b = a.dependencies;
      c.dependencies = null === b ? null : {
        expirationTime: b.expirationTime,
        firstContext: b.firstContext,
        responders: b.responders
      };
      c.sibling = a.sibling;
      c.index = a.index;
      c.ref = a.ref;
      return c;
    }
    function Ug(a, b, c, d, e, f) {
      var g = 2;
      d = a;
      if ("function" === typeof a) bi(a) && (g = 1);
      else if ("string" === typeof a) g = 5;
      else a: switch (a) {
        case ab:
          return Wg(c.children, e, f, b);
        case fb:
          g = 8;
          e |= 7;
          break;
        case bb:
          g = 8;
          e |= 1;
          break;
        case cb:
          return a = Sh(12, c, b, e | 8), a.elementType = cb, a.type = cb, a.expirationTime = f, a;
        case hb:
          return a = Sh(13, c, b, e), a.type = hb, a.elementType = hb, a.expirationTime = f, a;
        case ib:
          return a = Sh(19, c, b, e), a.elementType = ib, a.expirationTime = f, a;
        default:
          if ("object" === typeof a && null !== a) switch (a.$$typeof) {
            case db:
              g = 10;
              break a;
            case eb:
              g = 9;
              break a;
            case gb:
              g = 11;
              break a;
            case jb:
              g = 14;
              break a;
            case kb:
              g = 16;
              d = null;
              break a;
            case lb:
              g = 22;
              break a;
          }
          throw Error(u(130, null == a ? a : typeof a, ""));
      }
      b = Sh(g, c, b, e);
      b.elementType = a;
      b.type = d;
      b.expirationTime = f;
      return b;
    }
    function Wg(a, b, c, d) {
      a = Sh(7, a, d, b);
      a.expirationTime = c;
      return a;
    }
    function Tg(a, b, c) {
      a = Sh(6, a, null, b);
      a.expirationTime = c;
      return a;
    }
    function Vg(a, b, c) {
      b = Sh(4, null !== a.children ? a.children : [], a.key, b);
      b.expirationTime = c;
      b.stateNode = { containerInfo: a.containerInfo, pendingChildren: null, implementation: a.implementation };
      return b;
    }
    function ak(a, b, c) {
      this.tag = b;
      this.current = null;
      this.containerInfo = a;
      this.pingCache = this.pendingChildren = null;
      this.finishedExpirationTime = 0;
      this.finishedWork = null;
      this.timeoutHandle = -1;
      this.pendingContext = this.context = null;
      this.hydrate = c;
      this.callbackNode = null;
      this.callbackPriority = 90;
      this.lastExpiredTime = this.lastPingedTime = this.nextKnownPendingLevel = this.lastSuspendedTime = this.firstSuspendedTime = this.firstPendingTime = 0;
    }
    function Aj(a, b) {
      var c = a.firstSuspendedTime;
      a = a.lastSuspendedTime;
      return 0 !== c && c >= b && a <= b;
    }
    function xi(a, b) {
      var c = a.firstSuspendedTime, d = a.lastSuspendedTime;
      c < b && (a.firstSuspendedTime = b);
      if (d > b || 0 === c) a.lastSuspendedTime = b;
      b <= a.lastPingedTime && (a.lastPingedTime = 0);
      b <= a.lastExpiredTime && (a.lastExpiredTime = 0);
    }
    function yi(a, b) {
      b > a.firstPendingTime && (a.firstPendingTime = b);
      var c = a.firstSuspendedTime;
      0 !== c && (b >= c ? a.firstSuspendedTime = a.lastSuspendedTime = a.nextKnownPendingLevel = 0 : b >= a.lastSuspendedTime && (a.lastSuspendedTime = b + 1), b > a.nextKnownPendingLevel && (a.nextKnownPendingLevel = b));
    }
    function Cj(a, b) {
      var c = a.lastExpiredTime;
      if (0 === c || c > b) a.lastExpiredTime = b;
    }
    function bk(a, b, c, d) {
      var e = b.current, f = Gg(), g = Dg.suspense;
      f = Hg(f, e, g);
      a: if (c) {
        c = c._reactInternalFiber;
        b: {
          if (dc(c) !== c || 1 !== c.tag) throw Error(u(170));
          var h = c;
          do {
            switch (h.tag) {
              case 3:
                h = h.stateNode.context;
                break b;
              case 1:
                if (L(h.type)) {
                  h = h.stateNode.__reactInternalMemoizedMergedChildContext;
                  break b;
                }
            }
            h = h.return;
          } while (null !== h);
          throw Error(u(171));
        }
        if (1 === c.tag) {
          var k = c.type;
          if (L(k)) {
            c = Ff(c, k, h);
            break a;
          }
        }
        c = h;
      } else c = Af;
      null === b.context ? b.context = c : b.pendingContext = c;
      b = wg(f, g);
      b.payload = { element: a };
      d = void 0 === d ? null : d;
      null !== d && (b.callback = d);
      xg(e, b);
      Ig(e, f);
      return f;
    }
    function ck(a) {
      a = a.current;
      if (!a.child) return null;
      switch (a.child.tag) {
        case 5:
          return a.child.stateNode;
        default:
          return a.child.stateNode;
      }
    }
    function dk(a, b) {
      a = a.memoizedState;
      null !== a && null !== a.dehydrated && a.retryTime < b && (a.retryTime = b);
    }
    function ek(a, b) {
      dk(a, b);
      (a = a.alternate) && dk(a, b);
    }
    function fk(a, b, c) {
      c = null != c && true === c.hydrate;
      var d = new ak(a, b, c), e = Sh(3, null, null, 2 === b ? 7 : 1 === b ? 3 : 0);
      d.current = e;
      e.stateNode = d;
      ug(e);
      a[Od] = d.current;
      c && 0 !== b && Jc(a, 9 === a.nodeType ? a : a.ownerDocument);
      this._internalRoot = d;
    }
    fk.prototype.render = function(a) {
      bk(a, this._internalRoot, null, null);
    };
    fk.prototype.unmount = function() {
      var a = this._internalRoot, b = a.containerInfo;
      bk(null, a, null, function() {
        b[Od] = null;
      });
    };
    function gk(a) {
      return !(!a || 1 !== a.nodeType && 9 !== a.nodeType && 11 !== a.nodeType && (8 !== a.nodeType || " react-mount-point-unstable " !== a.nodeValue));
    }
    function hk(a, b) {
      b || (b = a ? 9 === a.nodeType ? a.documentElement : a.firstChild : null, b = !(!b || 1 !== b.nodeType || !b.hasAttribute("data-reactroot")));
      if (!b) for (var c; c = a.lastChild; ) a.removeChild(c);
      return new fk(a, 0, b ? { hydrate: true } : void 0);
    }
    function ik(a, b, c, d, e) {
      var f = c._reactRootContainer;
      if (f) {
        var g = f._internalRoot;
        if ("function" === typeof e) {
          var h = e;
          e = function() {
            var a2 = ck(g);
            h.call(a2);
          };
        }
        bk(b, g, a, e);
      } else {
        f = c._reactRootContainer = hk(c, d);
        g = f._internalRoot;
        if ("function" === typeof e) {
          var k = e;
          e = function() {
            var a2 = ck(g);
            k.call(a2);
          };
        }
        Nj(function() {
          bk(b, g, a, e);
        });
      }
      return ck(g);
    }
    function jk(a, b, c) {
      var d = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
      return { $$typeof: $a, key: null == d ? null : "" + d, children: a, containerInfo: b, implementation: c };
    }
    wc = function(a) {
      if (13 === a.tag) {
        var b = hg(Gg(), 150, 100);
        Ig(a, b);
        ek(a, b);
      }
    };
    xc = function(a) {
      13 === a.tag && (Ig(a, 3), ek(a, 3));
    };
    yc = function(a) {
      if (13 === a.tag) {
        var b = Gg();
        b = Hg(b, a, null);
        Ig(a, b);
        ek(a, b);
      }
    };
    za = function(a, b, c) {
      switch (b) {
        case "input":
          Cb(a, c);
          b = c.name;
          if ("radio" === c.type && null != b) {
            for (c = a; c.parentNode; ) c = c.parentNode;
            c = c.querySelectorAll("input[name=" + JSON.stringify("" + b) + '][type="radio"]');
            for (b = 0; b < c.length; b++) {
              var d = c[b];
              if (d !== a && d.form === a.form) {
                var e = Qd(d);
                if (!e) throw Error(u(90));
                yb(d);
                Cb(d, e);
              }
            }
          }
          break;
        case "textarea":
          Kb(a, c);
          break;
        case "select":
          b = c.value, null != b && Hb(a, !!c.multiple, b, false);
      }
    };
    Fa = Mj;
    Ga = function(a, b, c, d, e) {
      var f = W;
      W |= 4;
      try {
        return cg(98, a.bind(null, b, c, d, e));
      } finally {
        W = f, W === V && gg();
      }
    };
    Ha = function() {
      (W & (1 | fj | gj)) === V && (Lj(), Dj());
    };
    Ia = function(a, b) {
      var c = W;
      W |= 2;
      try {
        return a(b);
      } finally {
        W = c, W === V && gg();
      }
    };
    function kk(a, b) {
      var c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
      if (!gk(b)) throw Error(u(200));
      return jk(a, b, null, c);
    }
    var lk = { Events: [Nc, Pd, Qd, xa, ta, Xd, function(a) {
      jc(a, Wd);
    }, Da, Ea, id, mc, Dj, { current: false }] };
    (function(a) {
      var b = a.findFiberByHostInstance;
      return Yj(n({}, a, { overrideHookState: null, overrideProps: null, setSuspenseHandler: null, scheduleUpdate: null, currentDispatcherRef: Wa.ReactCurrentDispatcher, findHostInstanceByFiber: function(a2) {
        a2 = hc(a2);
        return null === a2 ? null : a2.stateNode;
      }, findFiberByHostInstance: function(a2) {
        return b ? b(a2) : null;
      }, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null }));
    })({
      findFiberByHostInstance: tc,
      bundleType: 0,
      version: "16.14.0",
      rendererPackageName: "react-dom"
    });
    reactDom_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = lk;
    reactDom_production_min.createPortal = kk;
    reactDom_production_min.findDOMNode = function(a) {
      if (null == a) return null;
      if (1 === a.nodeType) return a;
      var b = a._reactInternalFiber;
      if (void 0 === b) {
        if ("function" === typeof a.render) throw Error(u(188));
        throw Error(u(268, Object.keys(a)));
      }
      a = hc(b);
      a = null === a ? null : a.stateNode;
      return a;
    };
    reactDom_production_min.flushSync = function(a, b) {
      if ((W & (fj | gj)) !== V) throw Error(u(187));
      var c = W;
      W |= 1;
      try {
        return cg(99, a.bind(null, b));
      } finally {
        W = c, gg();
      }
    };
    reactDom_production_min.hydrate = function(a, b, c) {
      if (!gk(b)) throw Error(u(200));
      return ik(null, a, b, true, c);
    };
    reactDom_production_min.render = function(a, b, c) {
      if (!gk(b)) throw Error(u(200));
      return ik(null, a, b, false, c);
    };
    reactDom_production_min.unmountComponentAtNode = function(a) {
      if (!gk(a)) throw Error(u(40));
      return a._reactRootContainer ? (Nj(function() {
        ik(null, null, a, false, function() {
          a._reactRootContainer = null;
          a[Od] = null;
        });
      }), true) : false;
    };
    reactDom_production_min.unstable_batchedUpdates = Mj;
    reactDom_production_min.unstable_createPortal = function(a, b) {
      return kk(a, b, 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null);
    };
    reactDom_production_min.unstable_renderSubtreeIntoContainer = function(a, b, c, d) {
      if (!gk(c)) throw Error(u(200));
      if (null == a || void 0 === a._reactInternalFiber) throw Error(u(38));
      return ik(a, b, c, false, d);
    };
    reactDom_production_min.version = "16.14.0";
    return reactDom_production_min;
  }
  var hasRequiredReactDom;
  function requireReactDom() {
    if (hasRequiredReactDom) return reactDom.exports;
    hasRequiredReactDom = 1;
    function checkDCE() {
      if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== "function") {
        return;
      }
      try {
        __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
      } catch (err) {
        console.error(err);
      }
    }
    {
      checkDCE();
      reactDom.exports = requireReactDom_production_min();
    }
    return reactDom.exports;
  }
  var reactDomExports = requireReactDom();
  const ReactDOM = /* @__PURE__ */ getDefaultExportFromCjs(reactDomExports);
  function _setPrototypeOf(t, e) {
    return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
      return t2.__proto__ = e2, t2;
    }, _setPrototypeOf(t, e);
  }
  function _inheritsLoose(t, o) {
    t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
  }
  var propTypes = { exports: {} };
  var ReactPropTypesSecret_1;
  var hasRequiredReactPropTypesSecret;
  function requireReactPropTypesSecret() {
    if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
    hasRequiredReactPropTypesSecret = 1;
    var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
    ReactPropTypesSecret_1 = ReactPropTypesSecret;
    return ReactPropTypesSecret_1;
  }
  var factoryWithThrowingShims;
  var hasRequiredFactoryWithThrowingShims;
  function requireFactoryWithThrowingShims() {
    if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
    hasRequiredFactoryWithThrowingShims = 1;
    var ReactPropTypesSecret = /* @__PURE__ */ requireReactPropTypesSecret();
    function emptyFunction() {
    }
    function emptyFunctionWithReset() {
    }
    emptyFunctionWithReset.resetWarningCache = emptyFunction;
    factoryWithThrowingShims = function() {
      function shim(props, propName, componentName, location, propFullName, secret) {
        if (secret === ReactPropTypesSecret) {
          return;
        }
        var err = new Error(
          "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
        );
        err.name = "Invariant Violation";
        throw err;
      }
      shim.isRequired = shim;
      function getShim() {
        return shim;
      }
      var ReactPropTypes = {
        array: shim,
        bigint: shim,
        bool: shim,
        func: shim,
        number: shim,
        object: shim,
        string: shim,
        symbol: shim,
        any: shim,
        arrayOf: getShim,
        element: shim,
        elementType: shim,
        instanceOf: getShim,
        node: shim,
        objectOf: getShim,
        oneOf: getShim,
        oneOfType: getShim,
        shape: getShim,
        exact: getShim,
        checkPropTypes: emptyFunctionWithReset,
        resetWarningCache: emptyFunction
      };
      ReactPropTypes.PropTypes = ReactPropTypes;
      return ReactPropTypes;
    };
    return factoryWithThrowingShims;
  }
  var hasRequiredPropTypes;
  function requirePropTypes() {
    if (hasRequiredPropTypes) return propTypes.exports;
    hasRequiredPropTypes = 1;
    {
      propTypes.exports = /* @__PURE__ */ requireFactoryWithThrowingShims()();
    }
    return propTypes.exports;
  }
  var propTypesExports = /* @__PURE__ */ requirePropTypes();
  const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
  function _extends() {
    return _extends = Object.assign ? Object.assign.bind() : function(n) {
      for (var e = 1; e < arguments.length; e++) {
        var t = arguments[e];
        for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
      }
      return n;
    }, _extends.apply(null, arguments);
  }
  function isAbsolute(pathname) {
    return pathname.charAt(0) === "/";
  }
  function spliceOne(list, index2) {
    for (var i = index2, k = i + 1, n = list.length; k < n; i += 1, k += 1) {
      list[i] = list[k];
    }
    list.pop();
  }
  function resolvePathname(to, from) {
    if (from === void 0) from = "";
    var toParts = to && to.split("/") || [];
    var fromParts = from && from.split("/") || [];
    var isToAbs = to && isAbsolute(to);
    var isFromAbs = from && isAbsolute(from);
    var mustEndAbs = isToAbs || isFromAbs;
    if (to && isAbsolute(to)) {
      fromParts = toParts;
    } else if (toParts.length) {
      fromParts.pop();
      fromParts = fromParts.concat(toParts);
    }
    if (!fromParts.length) return "/";
    var hasTrailingSlash;
    if (fromParts.length) {
      var last = fromParts[fromParts.length - 1];
      hasTrailingSlash = last === "." || last === ".." || last === "";
    } else {
      hasTrailingSlash = false;
    }
    var up = 0;
    for (var i = fromParts.length; i >= 0; i--) {
      var part = fromParts[i];
      if (part === ".") {
        spliceOne(fromParts, i);
      } else if (part === "..") {
        spliceOne(fromParts, i);
        up++;
      } else if (up) {
        spliceOne(fromParts, i);
        up--;
      }
    }
    if (!mustEndAbs) for (; up--; up) fromParts.unshift("..");
    if (mustEndAbs && fromParts[0] !== "" && (!fromParts[0] || !isAbsolute(fromParts[0])))
      fromParts.unshift("");
    var result = fromParts.join("/");
    if (hasTrailingSlash && result.substr(-1) !== "/") result += "/";
    return result;
  }
  function valueOf(obj) {
    return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);
  }
  function valueEqual(a, b) {
    if (a === b) return true;
    if (a == null || b == null) return false;
    if (Array.isArray(a)) {
      return Array.isArray(b) && a.length === b.length && a.every(function(item2, index2) {
        return valueEqual(item2, b[index2]);
      });
    }
    if (typeof a === "object" || typeof b === "object") {
      var aValue = valueOf(a);
      var bValue = valueOf(b);
      if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);
      return Object.keys(Object.assign({}, a, b)).every(function(key) {
        return valueEqual(a[key], b[key]);
      });
    }
    return false;
  }
  var prefix = "Invariant failed";
  function invariant(condition, message2) {
    {
      throw new Error(prefix);
    }
  }
  function addLeadingSlash$1(path) {
    return path.charAt(0) === "/" ? path : "/" + path;
  }
  function stripLeadingSlash(path) {
    return path.charAt(0) === "/" ? path.substr(1) : path;
  }
  function hasBasename(path, prefix2) {
    return path.toLowerCase().indexOf(prefix2.toLowerCase()) === 0 && "/?#".indexOf(path.charAt(prefix2.length)) !== -1;
  }
  function stripBasename$1(path, prefix2) {
    return hasBasename(path, prefix2) ? path.substr(prefix2.length) : path;
  }
  function stripTrailingSlash(path) {
    return path.charAt(path.length - 1) === "/" ? path.slice(0, -1) : path;
  }
  function parsePath(path) {
    var pathname = path || "/";
    var search = "";
    var hash = "";
    var hashIndex = pathname.indexOf("#");
    if (hashIndex !== -1) {
      hash = pathname.substr(hashIndex);
      pathname = pathname.substr(0, hashIndex);
    }
    var searchIndex = pathname.indexOf("?");
    if (searchIndex !== -1) {
      search = pathname.substr(searchIndex);
      pathname = pathname.substr(0, searchIndex);
    }
    return {
      pathname,
      search: search === "?" ? "" : search,
      hash: hash === "#" ? "" : hash
    };
  }
  function createPath(location) {
    var pathname = location.pathname, search = location.search, hash = location.hash;
    var path = pathname || "/";
    if (search && search !== "?") path += search.charAt(0) === "?" ? search : "?" + search;
    if (hash && hash !== "#") path += hash.charAt(0) === "#" ? hash : "#" + hash;
    return path;
  }
  function createLocation(path, state, key, currentLocation) {
    var location;
    if (typeof path === "string") {
      location = parsePath(path);
      location.state = state;
    } else {
      location = _extends({}, path);
      if (location.pathname === void 0) location.pathname = "";
      if (location.search) {
        if (location.search.charAt(0) !== "?") location.search = "?" + location.search;
      } else {
        location.search = "";
      }
      if (location.hash) {
        if (location.hash.charAt(0) !== "#") location.hash = "#" + location.hash;
      } else {
        location.hash = "";
      }
      if (state !== void 0 && location.state === void 0) location.state = state;
    }
    try {
      location.pathname = decodeURI(location.pathname);
    } catch (e) {
      if (e instanceof URIError) {
        throw new URIError('Pathname "' + location.pathname + '" could not be decoded. This is likely caused by an invalid percent-encoding.');
      } else {
        throw e;
      }
    }
    if (key) location.key = key;
    if (currentLocation) {
      if (!location.pathname) {
        location.pathname = currentLocation.pathname;
      } else if (location.pathname.charAt(0) !== "/") {
        location.pathname = resolvePathname(location.pathname, currentLocation.pathname);
      }
    } else {
      if (!location.pathname) {
        location.pathname = "/";
      }
    }
    return location;
  }
  function locationsAreEqual(a, b) {
    return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);
  }
  function createTransitionManager() {
    var prompt = null;
    function setPrompt(nextPrompt) {
      prompt = nextPrompt;
      return function() {
        if (prompt === nextPrompt) prompt = null;
      };
    }
    function confirmTransitionTo(location, action, getUserConfirmation, callback) {
      if (prompt != null) {
        var result = typeof prompt === "function" ? prompt(location, action) : prompt;
        if (typeof result === "string") {
          if (typeof getUserConfirmation === "function") {
            getUserConfirmation(result, callback);
          } else {
            callback(true);
          }
        } else {
          callback(result !== false);
        }
      } else {
        callback(true);
      }
    }
    var listeners = [];
    function appendListener(fn) {
      var isActive = true;
      function listener() {
        if (isActive) fn.apply(void 0, arguments);
      }
      listeners.push(listener);
      return function() {
        isActive = false;
        listeners = listeners.filter(function(item2) {
          return item2 !== listener;
        });
      };
    }
    function notifyListeners() {
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
      listeners.forEach(function(listener) {
        return listener.apply(void 0, args);
      });
    }
    return {
      setPrompt,
      confirmTransitionTo,
      appendListener,
      notifyListeners
    };
  }
  var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
  function getConfirmation(message2, callback) {
    callback(window.confirm(message2));
  }
  function supportsHistory() {
    var ua = window.navigator.userAgent;
    if ((ua.indexOf("Android 2.") !== -1 || ua.indexOf("Android 4.0") !== -1) && ua.indexOf("Mobile Safari") !== -1 && ua.indexOf("Chrome") === -1 && ua.indexOf("Windows Phone") === -1) return false;
    return window.history && "pushState" in window.history;
  }
  function supportsPopStateOnHashChange() {
    return window.navigator.userAgent.indexOf("Trident") === -1;
  }
  function supportsGoWithoutReloadUsingHash() {
    return window.navigator.userAgent.indexOf("Firefox") === -1;
  }
  function isExtraneousPopstateEvent(event) {
    return event.state === void 0 && navigator.userAgent.indexOf("CriOS") === -1;
  }
  var PopStateEvent = "popstate";
  var HashChangeEvent = "hashchange";
  function getHistoryState() {
    try {
      return window.history.state || {};
    } catch (e) {
      return {};
    }
  }
  function createBrowserHistory(props) {
    if (props === void 0) {
      props = {};
    }
    !canUseDOM ? invariant() : void 0;
    var globalHistory = window.history;
    var canUseHistory = supportsHistory();
    var needsHashChangeListener = !supportsPopStateOnHashChange();
    var _props = props, _props$forceRefresh = _props.forceRefresh, forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh, _props$getUserConfirm = _props.getUserConfirmation, getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm, _props$keyLength = _props.keyLength, keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
    var basename = props.basename ? stripTrailingSlash(addLeadingSlash$1(props.basename)) : "";
    function getDOMLocation(historyState) {
      var _ref = historyState || {}, key = _ref.key, state = _ref.state;
      var _window$location = window.location, pathname = _window$location.pathname, search = _window$location.search, hash = _window$location.hash;
      var path = pathname + search + hash;
      if (basename) path = stripBasename$1(path, basename);
      return createLocation(path, state, key);
    }
    function createKey() {
      return Math.random().toString(36).substr(2, keyLength);
    }
    var transitionManager = createTransitionManager();
    function setState(nextState) {
      _extends(history, nextState);
      history.length = globalHistory.length;
      transitionManager.notifyListeners(history.location, history.action);
    }
    function handlePopState(event) {
      if (isExtraneousPopstateEvent(event)) return;
      handlePop(getDOMLocation(event.state));
    }
    function handleHashChange() {
      handlePop(getDOMLocation(getHistoryState()));
    }
    var forceNextPop = false;
    function handlePop(location) {
      if (forceNextPop) {
        forceNextPop = false;
        setState();
      } else {
        var action = "POP";
        transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
          if (ok) {
            setState({
              action,
              location
            });
          } else {
            revertPop(location);
          }
        });
      }
    }
    function revertPop(fromLocation) {
      var toLocation = history.location;
      var toIndex = allKeys.indexOf(toLocation.key);
      if (toIndex === -1) toIndex = 0;
      var fromIndex = allKeys.indexOf(fromLocation.key);
      if (fromIndex === -1) fromIndex = 0;
      var delta = toIndex - fromIndex;
      if (delta) {
        forceNextPop = true;
        go(delta);
      }
    }
    var initialLocation = getDOMLocation(getHistoryState());
    var allKeys = [initialLocation.key];
    function createHref(location) {
      return basename + createPath(location);
    }
    function push(path, state) {
      var action = "PUSH";
      var location = createLocation(path, state, createKey(), history.location);
      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
        if (!ok) return;
        var href = createHref(location);
        var key = location.key, state2 = location.state;
        if (canUseHistory) {
          globalHistory.pushState({
            key,
            state: state2
          }, null, href);
          if (forceRefresh) {
            window.location.href = href;
          } else {
            var prevIndex = allKeys.indexOf(history.location.key);
            var nextKeys = allKeys.slice(0, prevIndex + 1);
            nextKeys.push(location.key);
            allKeys = nextKeys;
            setState({
              action,
              location
            });
          }
        } else {
          window.location.href = href;
        }
      });
    }
    function replace(path, state) {
      var action = "REPLACE";
      var location = createLocation(path, state, createKey(), history.location);
      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
        if (!ok) return;
        var href = createHref(location);
        var key = location.key, state2 = location.state;
        if (canUseHistory) {
          globalHistory.replaceState({
            key,
            state: state2
          }, null, href);
          if (forceRefresh) {
            window.location.replace(href);
          } else {
            var prevIndex = allKeys.indexOf(history.location.key);
            if (prevIndex !== -1) allKeys[prevIndex] = location.key;
            setState({
              action,
              location
            });
          }
        } else {
          window.location.replace(href);
        }
      });
    }
    function go(n) {
      globalHistory.go(n);
    }
    function goBack() {
      go(-1);
    }
    function goForward() {
      go(1);
    }
    var listenerCount = 0;
    function checkDOMListeners(delta) {
      listenerCount += delta;
      if (listenerCount === 1 && delta === 1) {
        window.addEventListener(PopStateEvent, handlePopState);
        if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);
      } else if (listenerCount === 0) {
        window.removeEventListener(PopStateEvent, handlePopState);
        if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);
      }
    }
    var isBlocked = false;
    function block(prompt) {
      if (prompt === void 0) {
        prompt = false;
      }
      var unblock = transitionManager.setPrompt(prompt);
      if (!isBlocked) {
        checkDOMListeners(1);
        isBlocked = true;
      }
      return function() {
        if (isBlocked) {
          isBlocked = false;
          checkDOMListeners(-1);
        }
        return unblock();
      };
    }
    function listen(listener) {
      var unlisten = transitionManager.appendListener(listener);
      checkDOMListeners(1);
      return function() {
        checkDOMListeners(-1);
        unlisten();
      };
    }
    var history = {
      length: globalHistory.length,
      action: "POP",
      location: initialLocation,
      createHref,
      push,
      replace,
      go,
      goBack,
      goForward,
      block,
      listen
    };
    return history;
  }
  var HashChangeEvent$1 = "hashchange";
  var HashPathCoders = {
    hashbang: {
      encodePath: function encodePath(path) {
        return path.charAt(0) === "!" ? path : "!/" + stripLeadingSlash(path);
      },
      decodePath: function decodePath(path) {
        return path.charAt(0) === "!" ? path.substr(1) : path;
      }
    },
    noslash: {
      encodePath: stripLeadingSlash,
      decodePath: addLeadingSlash$1
    },
    slash: {
      encodePath: addLeadingSlash$1,
      decodePath: addLeadingSlash$1
    }
  };
  function stripHash(url) {
    var hashIndex = url.indexOf("#");
    return hashIndex === -1 ? url : url.slice(0, hashIndex);
  }
  function getHashPath() {
    var href = window.location.href;
    var hashIndex = href.indexOf("#");
    return hashIndex === -1 ? "" : href.substring(hashIndex + 1);
  }
  function pushHashPath(path) {
    window.location.hash = path;
  }
  function replaceHashPath(path) {
    window.location.replace(stripHash(window.location.href) + "#" + path);
  }
  function createHashHistory(props) {
    if (props === void 0) {
      props = {};
    }
    !canUseDOM ? invariant() : void 0;
    var globalHistory = window.history;
    supportsGoWithoutReloadUsingHash();
    var _props = props, _props$getUserConfirm = _props.getUserConfirmation, getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm, _props$hashType = _props.hashType, hashType = _props$hashType === void 0 ? "slash" : _props$hashType;
    var basename = props.basename ? stripTrailingSlash(addLeadingSlash$1(props.basename)) : "";
    var _HashPathCoders$hashT = HashPathCoders[hashType], encodePath2 = _HashPathCoders$hashT.encodePath, decodePath2 = _HashPathCoders$hashT.decodePath;
    function getDOMLocation() {
      var path2 = decodePath2(getHashPath());
      if (basename) path2 = stripBasename$1(path2, basename);
      return createLocation(path2);
    }
    var transitionManager = createTransitionManager();
    function setState(nextState) {
      _extends(history, nextState);
      history.length = globalHistory.length;
      transitionManager.notifyListeners(history.location, history.action);
    }
    var forceNextPop = false;
    var ignorePath = null;
    function locationsAreEqual$$1(a, b) {
      return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;
    }
    function handleHashChange() {
      var path2 = getHashPath();
      var encodedPath2 = encodePath2(path2);
      if (path2 !== encodedPath2) {
        replaceHashPath(encodedPath2);
      } else {
        var location = getDOMLocation();
        var prevLocation = history.location;
        if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return;
        if (ignorePath === createPath(location)) return;
        ignorePath = null;
        handlePop(location);
      }
    }
    function handlePop(location) {
      if (forceNextPop) {
        forceNextPop = false;
        setState();
      } else {
        var action = "POP";
        transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
          if (ok) {
            setState({
              action,
              location
            });
          } else {
            revertPop(location);
          }
        });
      }
    }
    function revertPop(fromLocation) {
      var toLocation = history.location;
      var toIndex = allPaths.lastIndexOf(createPath(toLocation));
      if (toIndex === -1) toIndex = 0;
      var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));
      if (fromIndex === -1) fromIndex = 0;
      var delta = toIndex - fromIndex;
      if (delta) {
        forceNextPop = true;
        go(delta);
      }
    }
    var path = getHashPath();
    var encodedPath = encodePath2(path);
    if (path !== encodedPath) replaceHashPath(encodedPath);
    var initialLocation = getDOMLocation();
    var allPaths = [createPath(initialLocation)];
    function createHref(location) {
      var baseTag = document.querySelector("base");
      var href = "";
      if (baseTag && baseTag.getAttribute("href")) {
        href = stripHash(window.location.href);
      }
      return href + "#" + encodePath2(basename + createPath(location));
    }
    function push(path2, state) {
      var action = "PUSH";
      var location = createLocation(path2, void 0, void 0, history.location);
      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
        if (!ok) return;
        var path3 = createPath(location);
        var encodedPath2 = encodePath2(basename + path3);
        var hashChanged = getHashPath() !== encodedPath2;
        if (hashChanged) {
          ignorePath = path3;
          pushHashPath(encodedPath2);
          var prevIndex = allPaths.lastIndexOf(createPath(history.location));
          var nextPaths = allPaths.slice(0, prevIndex + 1);
          nextPaths.push(path3);
          allPaths = nextPaths;
          setState({
            action,
            location
          });
        } else {
          setState();
        }
      });
    }
    function replace(path2, state) {
      var action = "REPLACE";
      var location = createLocation(path2, void 0, void 0, history.location);
      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
        if (!ok) return;
        var path3 = createPath(location);
        var encodedPath2 = encodePath2(basename + path3);
        var hashChanged = getHashPath() !== encodedPath2;
        if (hashChanged) {
          ignorePath = path3;
          replaceHashPath(encodedPath2);
        }
        var prevIndex = allPaths.indexOf(createPath(history.location));
        if (prevIndex !== -1) allPaths[prevIndex] = path3;
        setState({
          action,
          location
        });
      });
    }
    function go(n) {
      globalHistory.go(n);
    }
    function goBack() {
      go(-1);
    }
    function goForward() {
      go(1);
    }
    var listenerCount = 0;
    function checkDOMListeners(delta) {
      listenerCount += delta;
      if (listenerCount === 1 && delta === 1) {
        window.addEventListener(HashChangeEvent$1, handleHashChange);
      } else if (listenerCount === 0) {
        window.removeEventListener(HashChangeEvent$1, handleHashChange);
      }
    }
    var isBlocked = false;
    function block(prompt) {
      if (prompt === void 0) {
        prompt = false;
      }
      var unblock = transitionManager.setPrompt(prompt);
      if (!isBlocked) {
        checkDOMListeners(1);
        isBlocked = true;
      }
      return function() {
        if (isBlocked) {
          isBlocked = false;
          checkDOMListeners(-1);
        }
        return unblock();
      };
    }
    function listen(listener) {
      var unlisten = transitionManager.appendListener(listener);
      checkDOMListeners(1);
      return function() {
        checkDOMListeners(-1);
        unlisten();
      };
    }
    var history = {
      length: globalHistory.length,
      action: "POP",
      location: initialLocation,
      createHref,
      push,
      replace,
      go,
      goBack,
      goForward,
      block,
      listen
    };
    return history;
  }
  function clamp(n, lowerBound, upperBound) {
    return Math.min(Math.max(n, lowerBound), upperBound);
  }
  function createMemoryHistory(props) {
    if (props === void 0) {
      props = {};
    }
    var _props = props, getUserConfirmation = _props.getUserConfirmation, _props$initialEntries = _props.initialEntries, initialEntries = _props$initialEntries === void 0 ? ["/"] : _props$initialEntries, _props$initialIndex = _props.initialIndex, initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex, _props$keyLength = _props.keyLength, keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
    var transitionManager = createTransitionManager();
    function setState(nextState) {
      _extends(history, nextState);
      history.length = history.entries.length;
      transitionManager.notifyListeners(history.location, history.action);
    }
    function createKey() {
      return Math.random().toString(36).substr(2, keyLength);
    }
    var index2 = clamp(initialIndex, 0, initialEntries.length - 1);
    var entries = initialEntries.map(function(entry) {
      return typeof entry === "string" ? createLocation(entry, void 0, createKey()) : createLocation(entry, void 0, entry.key || createKey());
    });
    var createHref = createPath;
    function push(path, state) {
      var action = "PUSH";
      var location = createLocation(path, state, createKey(), history.location);
      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
        if (!ok) return;
        var prevIndex = history.index;
        var nextIndex = prevIndex + 1;
        var nextEntries = history.entries.slice(0);
        if (nextEntries.length > nextIndex) {
          nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);
        } else {
          nextEntries.push(location);
        }
        setState({
          action,
          location,
          index: nextIndex,
          entries: nextEntries
        });
      });
    }
    function replace(path, state) {
      var action = "REPLACE";
      var location = createLocation(path, state, createKey(), history.location);
      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
        if (!ok) return;
        history.entries[history.index] = location;
        setState({
          action,
          location
        });
      });
    }
    function go(n) {
      var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);
      var action = "POP";
      var location = history.entries[nextIndex];
      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
        if (ok) {
          setState({
            action,
            location,
            index: nextIndex
          });
        } else {
          setState();
        }
      });
    }
    function goBack() {
      go(-1);
    }
    function goForward() {
      go(1);
    }
    function canGo(n) {
      var nextIndex = history.index + n;
      return nextIndex >= 0 && nextIndex < history.entries.length;
    }
    function block(prompt) {
      if (prompt === void 0) {
        prompt = false;
      }
      return transitionManager.setPrompt(prompt);
    }
    function listen(listener) {
      return transitionManager.appendListener(listener);
    }
    var history = {
      length: entries.length,
      action: "POP",
      location: entries[index2],
      index: index2,
      entries,
      createHref,
      push,
      replace,
      go,
      goBack,
      goForward,
      canGo,
      block,
      listen
    };
    return history;
  }
  var pathToRegexp$1 = { exports: {} };
  var isarray;
  var hasRequiredIsarray;
  function requireIsarray() {
    if (hasRequiredIsarray) return isarray;
    hasRequiredIsarray = 1;
    isarray = Array.isArray || function(arr) {
      return Object.prototype.toString.call(arr) == "[object Array]";
    };
    return isarray;
  }
  var hasRequiredPathToRegexp;
  function requirePathToRegexp() {
    if (hasRequiredPathToRegexp) return pathToRegexp$1.exports;
    hasRequiredPathToRegexp = 1;
    var isarray2 = requireIsarray();
    pathToRegexp$1.exports = pathToRegexp2;
    pathToRegexp$1.exports.parse = parse;
    pathToRegexp$1.exports.compile = compile;
    pathToRegexp$1.exports.tokensToFunction = tokensToFunction;
    pathToRegexp$1.exports.tokensToRegExp = tokensToRegExp;
    var PATH_REGEXP = new RegExp([
      // Match escaped characters that would otherwise appear in future matches.
      // This allows the user to escape special characters that won't transform.
      "(\\\\.)",
      // Match Express-style parameters and un-named parameters with a prefix
      // and optional suffixes. Matches appear as:
      //
      // "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
      // "/route(\\d+)"  => [undefined, undefined, undefined, "\d+", undefined, undefined]
      // "/*"            => ["/", undefined, undefined, undefined, undefined, "*"]
      "([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"
    ].join("|"), "g");
    function parse(str, options) {
      var tokens = [];
      var key = 0;
      var index2 = 0;
      var path = "";
      var defaultDelimiter = options && options.delimiter || "/";
      var res;
      while ((res = PATH_REGEXP.exec(str)) != null) {
        var m = res[0];
        var escaped = res[1];
        var offset = res.index;
        path += str.slice(index2, offset);
        index2 = offset + m.length;
        if (escaped) {
          path += escaped[1];
          continue;
        }
        var next2 = str[index2];
        var prefix2 = res[2];
        var name = res[3];
        var capture = res[4];
        var group = res[5];
        var modifier = res[6];
        var asterisk = res[7];
        if (path) {
          tokens.push(path);
          path = "";
        }
        var partial = prefix2 != null && next2 != null && next2 !== prefix2;
        var repeat = modifier === "+" || modifier === "*";
        var optional = modifier === "?" || modifier === "*";
        var delimiter = prefix2 || defaultDelimiter;
        var pattern = capture || group;
        var prevText = prefix2 || (typeof tokens[tokens.length - 1] === "string" ? tokens[tokens.length - 1] : "");
        tokens.push({
          name: name || key++,
          prefix: prefix2 || "",
          delimiter,
          optional,
          repeat,
          partial,
          asterisk: !!asterisk,
          pattern: pattern ? escapeGroup(pattern) : asterisk ? ".*" : restrictBacktrack(delimiter, prevText)
        });
      }
      if (index2 < str.length) {
        path += str.substr(index2);
      }
      if (path) {
        tokens.push(path);
      }
      return tokens;
    }
    function restrictBacktrack(delimiter, prevText) {
      if (!prevText || prevText.indexOf(delimiter) > -1) {
        return "[^" + escapeString(delimiter) + "]+?";
      }
      return escapeString(prevText) + "|(?:(?!" + escapeString(prevText) + ")[^" + escapeString(delimiter) + "])+?";
    }
    function compile(str, options) {
      return tokensToFunction(parse(str, options), options);
    }
    function encodeURIComponentPretty(str) {
      return encodeURI(str).replace(/[\/?#]/g, function(c) {
        return "%" + c.charCodeAt(0).toString(16).toUpperCase();
      });
    }
    function encodeAsterisk(str) {
      return encodeURI(str).replace(/[?#]/g, function(c) {
        return "%" + c.charCodeAt(0).toString(16).toUpperCase();
      });
    }
    function tokensToFunction(tokens, options) {
      var matches = new Array(tokens.length);
      for (var i = 0; i < tokens.length; i++) {
        if (typeof tokens[i] === "object") {
          matches[i] = new RegExp("^(?:" + tokens[i].pattern + ")$", flags(options));
        }
      }
      return function(obj, opts) {
        var path = "";
        var data = obj || {};
        var options2 = opts || {};
        var encode = options2.pretty ? encodeURIComponentPretty : encodeURIComponent;
        for (var i2 = 0; i2 < tokens.length; i2++) {
          var token = tokens[i2];
          if (typeof token === "string") {
            path += token;
            continue;
          }
          var value = data[token.name];
          var segment;
          if (value == null) {
            if (token.optional) {
              if (token.partial) {
                path += token.prefix;
              }
              continue;
            } else {
              throw new TypeError('Expected "' + token.name + '" to be defined');
            }
          }
          if (isarray2(value)) {
            if (!token.repeat) {
              throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + "`");
            }
            if (value.length === 0) {
              if (token.optional) {
                continue;
              } else {
                throw new TypeError('Expected "' + token.name + '" to not be empty');
              }
            }
            for (var j = 0; j < value.length; j++) {
              segment = encode(value[j]);
              if (!matches[i2].test(segment)) {
                throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + "`");
              }
              path += (j === 0 ? token.prefix : token.delimiter) + segment;
            }
            continue;
          }
          segment = token.asterisk ? encodeAsterisk(value) : encode(value);
          if (!matches[i2].test(segment)) {
            throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"');
          }
          path += token.prefix + segment;
        }
        return path;
      };
    }
    function escapeString(str) {
      return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, "\\$1");
    }
    function escapeGroup(group) {
      return group.replace(/([=!:$\/()])/g, "\\$1");
    }
    function attachKeys(re, keys) {
      re.keys = keys;
      return re;
    }
    function flags(options) {
      return options && options.sensitive ? "" : "i";
    }
    function regexpToRegexp(path, keys) {
      var groups = path.source.match(/\((?!\?)/g);
      if (groups) {
        for (var i = 0; i < groups.length; i++) {
          keys.push({
            name: i,
            prefix: null,
            delimiter: null,
            optional: false,
            repeat: false,
            partial: false,
            asterisk: false,
            pattern: null
          });
        }
      }
      return attachKeys(path, keys);
    }
    function arrayToRegexp(path, keys, options) {
      var parts = [];
      for (var i = 0; i < path.length; i++) {
        parts.push(pathToRegexp2(path[i], keys, options).source);
      }
      var regexp = new RegExp("(?:" + parts.join("|") + ")", flags(options));
      return attachKeys(regexp, keys);
    }
    function stringToRegexp(path, keys, options) {
      return tokensToRegExp(parse(path, options), keys, options);
    }
    function tokensToRegExp(tokens, keys, options) {
      if (!isarray2(keys)) {
        options = /** @type {!Object} */
        keys || options;
        keys = [];
      }
      options = options || {};
      var strict = options.strict;
      var end = options.end !== false;
      var route = "";
      for (var i = 0; i < tokens.length; i++) {
        var token = tokens[i];
        if (typeof token === "string") {
          route += escapeString(token);
        } else {
          var prefix2 = escapeString(token.prefix);
          var capture = "(?:" + token.pattern + ")";
          keys.push(token);
          if (token.repeat) {
            capture += "(?:" + prefix2 + capture + ")*";
          }
          if (token.optional) {
            if (!token.partial) {
              capture = "(?:" + prefix2 + "(" + capture + "))?";
            } else {
              capture = prefix2 + "(" + capture + ")?";
            }
          } else {
            capture = prefix2 + "(" + capture + ")";
          }
          route += capture;
        }
      }
      var delimiter = escapeString(options.delimiter || "/");
      var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;
      if (!strict) {
        route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + "(?:" + delimiter + "(?=$))?";
      }
      if (end) {
        route += "$";
      } else {
        route += strict && endsWithDelimiter ? "" : "(?=" + delimiter + "|$)";
      }
      return attachKeys(new RegExp("^" + route, flags(options)), keys);
    }
    function pathToRegexp2(path, keys, options) {
      if (!isarray2(keys)) {
        options = /** @type {!Object} */
        keys || options;
        keys = [];
      }
      options = options || {};
      if (path instanceof RegExp) {
        return regexpToRegexp(
          path,
          /** @type {!Array} */
          keys
        );
      }
      if (isarray2(path)) {
        return arrayToRegexp(
          /** @type {!Array} */
          path,
          /** @type {!Array} */
          keys,
          options
        );
      }
      return stringToRegexp(
        /** @type {string} */
        path,
        /** @type {!Array} */
        keys,
        options
      );
    }
    return pathToRegexp$1.exports;
  }
  var pathToRegexpExports = requirePathToRegexp();
  const pathToRegexp = /* @__PURE__ */ getDefaultExportFromCjs(pathToRegexpExports);
  var reactIs = { exports: {} };
  var reactIs_production_min = {};
  /** @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 hasRequiredReactIs_production_min;
  function requireReactIs_production_min() {
    if (hasRequiredReactIs_production_min) return reactIs_production_min;
    hasRequiredReactIs_production_min = 1;
    var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
    function z(a) {
      if ("object" === typeof a && null !== a) {
        var u = a.$$typeof;
        switch (u) {
          case c:
            switch (a = a.type, a) {
              case l:
              case m:
              case e:
              case g:
              case f:
              case p:
                return a;
              default:
                switch (a = a && a.$$typeof, a) {
                  case k:
                  case n:
                  case t:
                  case r:
                  case h:
                    return a;
                  default:
                    return u;
                }
            }
          case d:
            return u;
        }
      }
    }
    function A(a) {
      return z(a) === m;
    }
    reactIs_production_min.AsyncMode = l;
    reactIs_production_min.ConcurrentMode = m;
    reactIs_production_min.ContextConsumer = k;
    reactIs_production_min.ContextProvider = h;
    reactIs_production_min.Element = c;
    reactIs_production_min.ForwardRef = n;
    reactIs_production_min.Fragment = e;
    reactIs_production_min.Lazy = t;
    reactIs_production_min.Memo = r;
    reactIs_production_min.Portal = d;
    reactIs_production_min.Profiler = g;
    reactIs_production_min.StrictMode = f;
    reactIs_production_min.Suspense = p;
    reactIs_production_min.isAsyncMode = function(a) {
      return A(a) || z(a) === l;
    };
    reactIs_production_min.isConcurrentMode = A;
    reactIs_production_min.isContextConsumer = function(a) {
      return z(a) === k;
    };
    reactIs_production_min.isContextProvider = function(a) {
      return z(a) === h;
    };
    reactIs_production_min.isElement = function(a) {
      return "object" === typeof a && null !== a && a.$$typeof === c;
    };
    reactIs_production_min.isForwardRef = function(a) {
      return z(a) === n;
    };
    reactIs_production_min.isFragment = function(a) {
      return z(a) === e;
    };
    reactIs_production_min.isLazy = function(a) {
      return z(a) === t;
    };
    reactIs_production_min.isMemo = function(a) {
      return z(a) === r;
    };
    reactIs_production_min.isPortal = function(a) {
      return z(a) === d;
    };
    reactIs_production_min.isProfiler = function(a) {
      return z(a) === g;
    };
    reactIs_production_min.isStrictMode = function(a) {
      return z(a) === f;
    };
    reactIs_production_min.isSuspense = function(a) {
      return z(a) === p;
    };
    reactIs_production_min.isValidElementType = function(a) {
      return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
    };
    reactIs_production_min.typeOf = z;
    return reactIs_production_min;
  }
  var hasRequiredReactIs;
  function requireReactIs() {
    if (hasRequiredReactIs) return reactIs.exports;
    hasRequiredReactIs = 1;
    {
      reactIs.exports = requireReactIs_production_min();
    }
    return reactIs.exports;
  }
  requireReactIs();
  function _objectWithoutPropertiesLoose(r, e) {
    if (null == r) return {};
    var t = {};
    for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
      if (-1 !== e.indexOf(n)) continue;
      t[n] = r[n];
    }
    return t;
  }
  var hoistNonReactStatics_cjs;
  var hasRequiredHoistNonReactStatics_cjs;
  function requireHoistNonReactStatics_cjs() {
    if (hasRequiredHoistNonReactStatics_cjs) return hoistNonReactStatics_cjs;
    hasRequiredHoistNonReactStatics_cjs = 1;
    var reactIs2 = requireReactIs();
    var REACT_STATICS = {
      childContextTypes: true,
      contextType: true,
      contextTypes: true,
      defaultProps: true,
      displayName: true,
      getDefaultProps: true,
      getDerivedStateFromError: true,
      getDerivedStateFromProps: true,
      mixins: true,
      propTypes: true,
      type: true
    };
    var KNOWN_STATICS = {
      name: true,
      length: true,
      prototype: true,
      caller: true,
      callee: true,
      arguments: true,
      arity: true
    };
    var FORWARD_REF_STATICS = {
      "$$typeof": true,
      render: true,
      defaultProps: true,
      displayName: true,
      propTypes: true
    };
    var MEMO_STATICS = {
      "$$typeof": true,
      compare: true,
      defaultProps: true,
      displayName: true,
      propTypes: true,
      type: true
    };
    var TYPE_STATICS = {};
    TYPE_STATICS[reactIs2.ForwardRef] = FORWARD_REF_STATICS;
    TYPE_STATICS[reactIs2.Memo] = MEMO_STATICS;
    function getStatics(component) {
      if (reactIs2.isMemo(component)) {
        return MEMO_STATICS;
      }
      return TYPE_STATICS[component["$$typeof"]] || REACT_STATICS;
    }
    var defineProperty = Object.defineProperty;
    var getOwnPropertyNames = Object.getOwnPropertyNames;
    var getOwnPropertySymbols = Object.getOwnPropertySymbols;
    var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
    var getPrototypeOf = Object.getPrototypeOf;
    var objectPrototype = Object.prototype;
    function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
      if (typeof sourceComponent !== "string") {
        if (objectPrototype) {
          var inheritedComponent = getPrototypeOf(sourceComponent);
          if (inheritedComponent && inheritedComponent !== objectPrototype) {
            hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
          }
        }
        var keys = getOwnPropertyNames(sourceComponent);
        if (getOwnPropertySymbols) {
          keys = keys.concat(getOwnPropertySymbols(sourceComponent));
        }
        var targetStatics = getStatics(targetComponent);
        var sourceStatics = getStatics(sourceComponent);
        for (var i = 0; i < keys.length; ++i) {
          var key = keys[i];
          if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
            var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
            try {
              defineProperty(targetComponent, key, descriptor);
            } catch (e) {
            }
          }
        }
      }
      return targetComponent;
    }
    hoistNonReactStatics_cjs = hoistNonReactStatics;
    return hoistNonReactStatics_cjs;
  }
  requireHoistNonReactStatics_cjs();
  var MAX_SIGNED_31_BIT_INT = 1073741823;
  var commonjsGlobal = typeof globalThis !== "undefined" ? (
    // eslint-disable-next-line no-undef
    globalThis
  ) : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
  function getUniqueId() {
    var key = "__global_unique_id__";
    return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
  }
  function objectIs(x, y) {
    if (x === y) {
      return x !== 0 || 1 / x === 1 / y;
    } else {
      return x !== x && y !== y;
    }
  }
  function createEventEmitter(value) {
    var handlers = [];
    return {
      on: function on(handler) {
        handlers.push(handler);
      },
      off: function off(handler) {
        handlers = handlers.filter(function(h) {
          return h !== handler;
        });
      },
      get: function get() {
        return value;
      },
      set: function set(newValue, changedBits) {
        value = newValue;
        handlers.forEach(function(handler) {
          return handler(value, changedBits);
        });
      }
    };
  }
  function onlyChild(children) {
    return Array.isArray(children) ? children[0] : children;
  }
  function createReactContext(defaultValue, calculateChangedBits) {
    var _Provider$childContex, _Consumer$contextType;
    var contextProp = "__create-react-context-" + getUniqueId() + "__";
    var Provider = /* @__PURE__ */ (function(_React$Component) {
      _inheritsLoose(Provider2, _React$Component);
      function Provider2() {
        var _this;
        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
          args[_key] = arguments[_key];
        }
        _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
        _this.emitter = createEventEmitter(_this.props.value);
        return _this;
      }
      var _proto = Provider2.prototype;
      _proto.getChildContext = function getChildContext() {
        var _ref;
        return _ref = {}, _ref[contextProp] = this.emitter, _ref;
      };
      _proto.componentWillReceiveProps = function componentWillReceiveProps2(nextProps) {
        if (this.props.value !== nextProps.value) {
          var oldValue = this.props.value;
          var newValue = nextProps.value;
          var changedBits;
          if (objectIs(oldValue, newValue)) {
            changedBits = 0;
          } else {
            changedBits = typeof calculateChangedBits === "function" ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
            changedBits |= 0;
            if (changedBits !== 0) {
              this.emitter.set(nextProps.value, changedBits);
            }
          }
        }
      };
      _proto.render = function render() {
        return this.props.children;
      };
      return Provider2;
    })(React.Component);
    Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);
    var Consumer = /* @__PURE__ */ (function(_React$Component2) {
      _inheritsLoose(Consumer2, _React$Component2);
      function Consumer2() {
        var _this2;
        for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
          args[_key2] = arguments[_key2];
        }
        _this2 = _React$Component2.call.apply(_React$Component2, [this].concat(args)) || this;
        _this2.observedBits = void 0;
        _this2.state = {
          value: _this2.getValue()
        };
        _this2.onUpdate = function(newValue, changedBits) {
          var observedBits = _this2.observedBits | 0;
          if ((observedBits & changedBits) !== 0) {
            _this2.setState({
              value: _this2.getValue()
            });
          }
        };
        return _this2;
      }
      var _proto2 = Consumer2.prototype;
      _proto2.componentWillReceiveProps = function componentWillReceiveProps2(nextProps) {
        var observedBits = nextProps.observedBits;
        this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
      };
      _proto2.componentDidMount = function componentDidMount() {
        if (this.context[contextProp]) {
          this.context[contextProp].on(this.onUpdate);
        }
        var observedBits = this.props.observedBits;
        this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
      };
      _proto2.componentWillUnmount = function componentWillUnmount() {
        if (this.context[contextProp]) {
          this.context[contextProp].off(this.onUpdate);
        }
      };
      _proto2.getValue = function getValue() {
        if (this.context[contextProp]) {
          return this.context[contextProp].get();
        } else {
          return defaultValue;
        }
      };
      _proto2.render = function render() {
        return onlyChild(this.props.children)(this.state.value);
      };
      return Consumer2;
    })(React.Component);
    Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = PropTypes.object, _Consumer$contextType);
    return {
      Provider,
      Consumer
    };
  }
  var createContext = React.createContext || createReactContext;
  var createNamedContext = function createNamedContext2(name) {
    var context2 = createContext();
    context2.displayName = name;
    return context2;
  };
  var historyContext = /* @__PURE__ */ createNamedContext("Router-History");
  var context = /* @__PURE__ */ createNamedContext("Router");
  var Router = /* @__PURE__ */ (function(_React$Component) {
    _inheritsLoose(Router2, _React$Component);
    Router2.computeRootMatch = function computeRootMatch(pathname) {
      return {
        path: "/",
        url: "/",
        params: {},
        isExact: pathname === "/"
      };
    };
    function Router2(props) {
      var _this;
      _this = _React$Component.call(this, props) || this;
      _this.state = {
        location: props.history.location
      };
      _this._isMounted = false;
      _this._pendingLocation = null;
      if (!props.staticContext) {
        _this.unlisten = props.history.listen(function(location) {
          _this._pendingLocation = location;
        });
      }
      return _this;
    }
    var _proto = Router2.prototype;
    _proto.componentDidMount = function componentDidMount() {
      var _this2 = this;
      this._isMounted = true;
      if (this.unlisten) {
        this.unlisten();
      }
      if (!this.props.staticContext) {
        this.unlisten = this.props.history.listen(function(location) {
          if (_this2._isMounted) {
            _this2.setState({
              location
            });
          }
        });
      }
      if (this._pendingLocation) {
        this.setState({
          location: this._pendingLocation
        });
      }
    };
    _proto.componentWillUnmount = function componentWillUnmount() {
      if (this.unlisten) {
        this.unlisten();
        this._isMounted = false;
        this._pendingLocation = null;
      }
    };
    _proto.render = function render() {
      return /* @__PURE__ */ React.createElement(context.Provider, {
        value: {
          history: this.props.history,
          location: this.state.location,
          match: Router2.computeRootMatch(this.state.location.pathname),
          staticContext: this.props.staticContext
        }
      }, /* @__PURE__ */ React.createElement(historyContext.Provider, {
        children: this.props.children || null,
        value: this.props.history
      }));
    };
    return Router2;
  })(React.Component);
  /* @__PURE__ */ (function(_React$Component) {
    _inheritsLoose(MemoryRouter2, _React$Component);
    function MemoryRouter2() {
      var _this;
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
      _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
      _this.history = createMemoryHistory(_this.props);
      return _this;
    }
    var _proto = MemoryRouter2.prototype;
    _proto.render = function render() {
      return /* @__PURE__ */ React.createElement(Router, {
        history: this.history,
        children: this.props.children
      });
    };
    return MemoryRouter2;
  })(React.Component);
  var Lifecycle = /* @__PURE__ */ (function(_React$Component) {
    _inheritsLoose(Lifecycle2, _React$Component);
    function Lifecycle2() {
      return _React$Component.apply(this, arguments) || this;
    }
    var _proto = Lifecycle2.prototype;
    _proto.componentDidMount = function componentDidMount() {
      if (this.props.onMount) this.props.onMount.call(this, this);
    };
    _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
      if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);
    };
    _proto.componentWillUnmount = function componentWillUnmount() {
      if (this.props.onUnmount) this.props.onUnmount.call(this, this);
    };
    _proto.render = function render() {
      return null;
    };
    return Lifecycle2;
  })(React.Component);
  var cache = {};
  var cacheLimit = 1e4;
  var cacheCount = 0;
  function compilePath(path) {
    if (cache[path]) return cache[path];
    var generator = pathToRegexp.compile(path);
    if (cacheCount < cacheLimit) {
      cache[path] = generator;
      cacheCount++;
    }
    return generator;
  }
  function generatePath(path, params) {
    if (path === void 0) {
      path = "/";
    }
    if (params === void 0) {
      params = {};
    }
    return path === "/" ? path : compilePath(path)(params, {
      pretty: true
    });
  }
  function Redirect(_ref) {
    var computedMatch = _ref.computedMatch, to = _ref.to, _ref$push = _ref.push, push = _ref$push === void 0 ? false : _ref$push;
    return /* @__PURE__ */ React.createElement(context.Consumer, null, function(context2) {
      !context2 ? invariant() : void 0;
      var history = context2.history, staticContext = context2.staticContext;
      var method = push ? history.push : history.replace;
      var location = createLocation(computedMatch ? typeof to === "string" ? generatePath(to, computedMatch.params) : _extends({}, to, {
        pathname: generatePath(to.pathname, computedMatch.params)
      }) : to);
      if (staticContext) {
        method(location);
        return null;
      }
      return /* @__PURE__ */ React.createElement(Lifecycle, {
        onMount: function onMount() {
          method(location);
        },
        onUpdate: function onUpdate(self2, prevProps) {
          var prevLocation = createLocation(prevProps.to);
          if (!locationsAreEqual(prevLocation, _extends({}, location, {
            key: prevLocation.key
          }))) {
            method(location);
          }
        },
        to
      });
    });
  }
  var cache$1 = {};
  var cacheLimit$1 = 1e4;
  var cacheCount$1 = 0;
  function compilePath$1(path, options) {
    var cacheKey = "" + options.end + options.strict + options.sensitive;
    var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {});
    if (pathCache[path]) return pathCache[path];
    var keys = [];
    var regexp = pathToRegexp(path, keys, options);
    var result = {
      regexp,
      keys
    };
    if (cacheCount$1 < cacheLimit$1) {
      pathCache[path] = result;
      cacheCount$1++;
    }
    return result;
  }
  function matchPath(pathname, options) {
    if (options === void 0) {
      options = {};
    }
    if (typeof options === "string" || Array.isArray(options)) {
      options = {
        path: options
      };
    }
    var _options = options, path = _options.path, _options$exact = _options.exact, exact = _options$exact === void 0 ? false : _options$exact, _options$strict = _options.strict, strict = _options$strict === void 0 ? false : _options$strict, _options$sensitive = _options.sensitive, sensitive = _options$sensitive === void 0 ? false : _options$sensitive;
    var paths = [].concat(path);
    return paths.reduce(function(matched, path2) {
      if (!path2 && path2 !== "") return null;
      if (matched) return matched;
      var _compilePath = compilePath$1(path2, {
        end: exact,
        strict,
        sensitive
      }), regexp = _compilePath.regexp, keys = _compilePath.keys;
      var match = regexp.exec(pathname);
      if (!match) return null;
      var url = match[0], values = match.slice(1);
      var isExact = pathname === url;
      if (exact && !isExact) return null;
      return {
        path: path2,
        // the path used to match
        url: path2 === "/" && url === "" ? "/" : url,
        // the matched portion of the URL
        isExact,
        // whether or not we matched exactly
        params: keys.reduce(function(memo, key, index2) {
          memo[key.name] = values[index2];
          return memo;
        }, {})
      };
    }, null);
  }
  function isEmptyChildren(children) {
    return React.Children.count(children) === 0;
  }
  var Route = /* @__PURE__ */ (function(_React$Component) {
    _inheritsLoose(Route2, _React$Component);
    function Route2() {
      return _React$Component.apply(this, arguments) || this;
    }
    var _proto = Route2.prototype;
    _proto.render = function render() {
      var _this = this;
      return /* @__PURE__ */ React.createElement(context.Consumer, null, function(context$1) {
        !context$1 ? invariant() : void 0;
        var location = _this.props.location || context$1.location;
        var match = _this.props.computedMatch ? _this.props.computedMatch : _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;
        var props = _extends({}, context$1, {
          location,
          match
        });
        var _this$props = _this.props, children = _this$props.children, component = _this$props.component, render2 = _this$props.render;
        if (Array.isArray(children) && isEmptyChildren(children)) {
          children = null;
        }
        return /* @__PURE__ */ React.createElement(context.Provider, {
          value: props
        }, props.match ? children ? typeof children === "function" ? children(props) : children : component ? /* @__PURE__ */ React.createElement(component, props) : render2 ? render2(props) : null : typeof children === "function" ? children(props) : null);
      });
    };
    return Route2;
  })(React.Component);
  function addLeadingSlash(path) {
    return path.charAt(0) === "/" ? path : "/" + path;
  }
  function addBasename(basename, location) {
    if (!basename) return location;
    return _extends({}, location, {
      pathname: addLeadingSlash(basename) + location.pathname
    });
  }
  function stripBasename(basename, location) {
    if (!basename) return location;
    var base = addLeadingSlash(basename);
    if (location.pathname.indexOf(base) !== 0) return location;
    return _extends({}, location, {
      pathname: location.pathname.substr(base.length)
    });
  }
  function createURL(location) {
    return typeof location === "string" ? location : createPath(location);
  }
  function staticHandler(methodName) {
    return function() {
      invariant();
    };
  }
  function noop() {
  }
  /* @__PURE__ */ (function(_React$Component) {
    _inheritsLoose(StaticRouter2, _React$Component);
    function StaticRouter2() {
      var _this;
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
      _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
      _this.handlePush = function(location) {
        return _this.navigateTo(location, "PUSH");
      };
      _this.handleReplace = function(location) {
        return _this.navigateTo(location, "REPLACE");
      };
      _this.handleListen = function() {
        return noop;
      };
      _this.handleBlock = function() {
        return noop;
      };
      return _this;
    }
    var _proto = StaticRouter2.prototype;
    _proto.navigateTo = function navigateTo(location, action) {
      var _this$props = this.props, _this$props$basename = _this$props.basename, basename = _this$props$basename === void 0 ? "" : _this$props$basename, _this$props$context = _this$props.context, context2 = _this$props$context === void 0 ? {} : _this$props$context;
      context2.action = action;
      context2.location = addBasename(basename, createLocation(location));
      context2.url = createURL(context2.location);
    };
    _proto.render = function render() {
      var _this$props2 = this.props, _this$props2$basename = _this$props2.basename, basename = _this$props2$basename === void 0 ? "" : _this$props2$basename, _this$props2$context = _this$props2.context, context2 = _this$props2$context === void 0 ? {} : _this$props2$context, _this$props2$location = _this$props2.location, location = _this$props2$location === void 0 ? "/" : _this$props2$location, rest = _objectWithoutPropertiesLoose(_this$props2, ["basename", "context", "location"]);
      var history = {
        createHref: function createHref(path) {
          return addLeadingSlash(basename + createURL(path));
        },
        action: "POP",
        location: stripBasename(basename, createLocation(location)),
        push: this.handlePush,
        replace: this.handleReplace,
        go: staticHandler(),
        goBack: staticHandler(),
        goForward: staticHandler(),
        listen: this.handleListen,
        block: this.handleBlock
      };
      return /* @__PURE__ */ React.createElement(Router, _extends({}, rest, {
        history,
        staticContext: context2
      }));
    };
    return StaticRouter2;
  })(React.Component);
  var Switch = /* @__PURE__ */ (function(_React$Component) {
    _inheritsLoose(Switch2, _React$Component);
    function Switch2() {
      return _React$Component.apply(this, arguments) || this;
    }
    var _proto = Switch2.prototype;
    _proto.render = function render() {
      var _this = this;
      return /* @__PURE__ */ React.createElement(context.Consumer, null, function(context2) {
        !context2 ? invariant() : void 0;
        var location = _this.props.location || context2.location;
        var element, match;
        React.Children.forEach(_this.props.children, function(child) {
          if (match == null && /* @__PURE__ */ React.isValidElement(child)) {
            element = child;
            var path = child.props.path || child.props.from;
            match = path ? matchPath(location.pathname, _extends({}, child.props, {
              path
            })) : context2.match;
          }
        });
        return match ? /* @__PURE__ */ React.cloneElement(element, {
          location,
          computedMatch: match
        }) : null;
      });
    };
    return Switch2;
  })(React.Component);
  var useContext = React.useContext;
  function useHistory() {
    return useContext(historyContext);
  }
  function useLocation() {
    return useContext(context).location;
  }
  function useParams() {
    var match = useContext(context).match;
    return match ? match.params : {};
  }
  function useRouteMatch(path) {
    useLocation();
    var match = useContext(context).match;
    return match;
  }
  /* @__PURE__ */ (function(_React$Component) {
    _inheritsLoose(BrowserRouter2, _React$Component);
    function BrowserRouter2() {
      var _this;
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
      _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
      _this.history = createBrowserHistory(_this.props);
      return _this;
    }
    var _proto = BrowserRouter2.prototype;
    _proto.render = function render() {
      return /* @__PURE__ */ React.createElement(Router, {
        history: this.history,
        children: this.props.children
      });
    };
    return BrowserRouter2;
  })(React.Component);
  var HashRouter = /* @__PURE__ */ (function(_React$Component) {
    _inheritsLoose(HashRouter2, _React$Component);
    function HashRouter2() {
      var _this;
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
      _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
      _this.history = createHashHistory(_this.props);
      return _this;
    }
    var _proto = HashRouter2.prototype;
    _proto.render = function render() {
      return /* @__PURE__ */ React.createElement(Router, {
        history: this.history,
        children: this.props.children
      });
    };
    return HashRouter2;
  })(React.Component);
  var resolveToLocation = function resolveToLocation2(to, currentLocation) {
    return typeof to === "function" ? to(currentLocation) : to;
  };
  var normalizeToLocation = function normalizeToLocation2(to, currentLocation) {
    return typeof to === "string" ? createLocation(to, null, null, currentLocation) : to;
  };
  var forwardRefShim = function forwardRefShim2(C) {
    return C;
  };
  var forwardRef = React.forwardRef;
  if (typeof forwardRef === "undefined") {
    forwardRef = forwardRefShim;
  }
  function isModifiedEvent(event) {
    return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
  }
  var LinkAnchor = forwardRef(function(_ref, forwardedRef) {
    var innerRef = _ref.innerRef, navigate = _ref.navigate, _onClick = _ref.onClick, rest = _objectWithoutPropertiesLoose(_ref, ["innerRef", "navigate", "onClick"]);
    var target = rest.target;
    var props = _extends({}, rest, {
      onClick: function onClick(event) {
        try {
          if (_onClick) _onClick(event);
        } catch (ex) {
          event.preventDefault();
          throw ex;
        }
        if (!event.defaultPrevented && // onClick prevented default
        event.button === 0 && // ignore everything but left clicks
        (!target || target === "_self") && // let browser handle "target=_blank" etc.
        !isModifiedEvent(event)) {
          event.preventDefault();
          navigate();
        }
      }
    });
    if (forwardRefShim !== forwardRef) {
      props.ref = forwardedRef || innerRef;
    } else {
      props.ref = innerRef;
    }
    return /* @__PURE__ */ React.createElement("a", props);
  });
  var Link = forwardRef(function(_ref2, forwardedRef) {
    var _ref2$component = _ref2.component, component = _ref2$component === void 0 ? LinkAnchor : _ref2$component, replace = _ref2.replace, to = _ref2.to, innerRef = _ref2.innerRef, rest = _objectWithoutPropertiesLoose(_ref2, ["component", "replace", "to", "innerRef"]);
    return /* @__PURE__ */ React.createElement(context.Consumer, null, function(context2) {
      !context2 ? invariant() : void 0;
      var history = context2.history;
      var location = normalizeToLocation(resolveToLocation(to, context2.location), context2.location);
      var href = location ? history.createHref(location) : "";
      var props = _extends({}, rest, {
        href,
        navigate: function navigate() {
          var location2 = resolveToLocation(to, context2.location);
          var isDuplicateNavigation = createPath(context2.location) === createPath(normalizeToLocation(location2));
          var method = replace || isDuplicateNavigation ? history.replace : history.push;
          method(location2);
        }
      });
      if (forwardRefShim !== forwardRef) {
        props.ref = forwardedRef || innerRef;
      } else {
        props.innerRef = innerRef;
      }
      return /* @__PURE__ */ React.createElement(component, props);
    });
  });
  var forwardRefShim$1 = function forwardRefShim3(C) {
    return C;
  };
  var forwardRef$1 = React.forwardRef;
  if (typeof forwardRef$1 === "undefined") {
    forwardRef$1 = forwardRefShim$1;
  }
  function joinClassnames() {
    for (var _len = arguments.length, classnames2 = new Array(_len), _key = 0; _key < _len; _key++) {
      classnames2[_key] = arguments[_key];
    }
    return classnames2.filter(function(i) {
      return i;
    }).join(" ");
  }
  forwardRef$1(function(_ref, forwardedRef) {
    var _ref$ariaCurrent = _ref["aria-current"], ariaCurrent = _ref$ariaCurrent === void 0 ? "page" : _ref$ariaCurrent, _ref$activeClassName = _ref.activeClassName, activeClassName = _ref$activeClassName === void 0 ? "active" : _ref$activeClassName, activeStyle = _ref.activeStyle, classNameProp = _ref.className, exact = _ref.exact, isActiveProp = _ref.isActive, locationProp = _ref.location, sensitive = _ref.sensitive, strict = _ref.strict, styleProp = _ref.style, to = _ref.to, innerRef = _ref.innerRef, rest = _objectWithoutPropertiesLoose(_ref, ["aria-current", "activeClassName", "activeStyle", "className", "exact", "isActive", "location", "sensitive", "strict", "style", "to", "innerRef"]);
    return /* @__PURE__ */ React.createElement(context.Consumer, null, function(context2) {
      !context2 ? invariant() : void 0;
      var currentLocation = locationProp || context2.location;
      var toLocation = normalizeToLocation(resolveToLocation(to, currentLocation), currentLocation);
      var path = toLocation.pathname;
      var escapedPath = path && path.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
      var match = escapedPath ? matchPath(currentLocation.pathname, {
        path: escapedPath,
        exact,
        sensitive,
        strict
      }) : null;
      var isActive = !!(isActiveProp ? isActiveProp(match, currentLocation) : match);
      var className = typeof classNameProp === "function" ? classNameProp(isActive) : classNameProp;
      var style = typeof styleProp === "function" ? styleProp(isActive) : styleProp;
      if (isActive) {
        className = joinClassnames(className, activeClassName);
        style = _extends({}, style, activeStyle);
      }
      var props = _extends({
        "aria-current": isActive && ariaCurrent || null,
        className,
        style,
        to: toLocation
      }, rest);
      if (forwardRefShim$1 !== forwardRef$1) {
        props.ref = forwardedRef || innerRef;
      } else {
        props.innerRef = innerRef;
      }
      return /* @__PURE__ */ React.createElement(Link, props);
    });
  });
  const GlobalConfigContext = React.createContext({
    globalConfig: {},
    setConfigValue: () => {
    }
  });
  function GlobalConfigProvider({ children, config = {} }) {
    const [globalConfig, setGlobalConfig] = reactExports.useState(Object.keys(config).length > 0 ? config : window.envatoElements);
    const setConfigValue = (key, value) => {
      setGlobalConfig((globalConfig2) => ({
        ...globalConfig2,
        [key]: value
      }));
      if (window.envatoElements) {
        window.envatoElements[key] = value;
      }
    };
    const contextValue = {
      globalConfig,
      setConfigValue: reactExports.useCallback((key, value) => setConfigValue(key, value), [])
    };
    return /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalConfigContext.Provider, { value: contextValue, children });
  }
  const APIErrorContext = React.createContext({
    errors: [],
    addError: () => {
    },
    removeError: () => {
    }
  });
  function APIErrorProvider({ children }) {
    const [errors2, setErrors] = reactExports.useState([]);
    const removeError = (errorToRemove) => {
      setErrors((errors22) => errors22.filter((error) => error !== errorToRemove));
    };
    const addError = (code, message2, debug) => {
      setErrors((errors22) => [...errors22, { code, message: message2, debug }]);
    };
    const contextValue = {
      errors: errors2,
      addError: reactExports.useCallback((code, message2, debug) => addError(code, message2, debug), []),
      removeError: reactExports.useCallback((error) => removeError(error), [])
    };
    return /* @__PURE__ */ jsxRuntimeExports.jsx(APIErrorContext.Provider, { value: contextValue, children });
  }
  var lib$1 = { exports: {} };
  var Modal$1 = {};
  var ModalPortal = { exports: {} };
  var focusManager = {};
  var tabbable = { exports: {} };
  var hasRequiredTabbable;
  function requireTabbable() {
    if (hasRequiredTabbable) return tabbable.exports;
    hasRequiredTabbable = 1;
    (function(module, exports) {
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      exports.default = findTabbableDescendants;
      /*!
       * Adapted from jQuery UI core
       *
       * http://jqueryui.com
       *
       * Copyright 2014 jQuery Foundation and other contributors
       * Released under the MIT license.
       * http://jquery.org/license
       *
       * http://api.jqueryui.com/category/ui-core/
       */
      var DISPLAY_NONE = "none";
      var DISPLAY_CONTENTS = "contents";
      var tabbableNode = /^(input|select|textarea|button|object|iframe)$/;
      function isNotOverflowing(element, style) {
        return style.getPropertyValue("overflow") !== "visible" || // if 'overflow: visible' set, check if there is actually any overflow
        element.scrollWidth <= 0 && element.scrollHeight <= 0;
      }
      function hidesContents(element) {
        var zeroSize = element.offsetWidth <= 0 && element.offsetHeight <= 0;
        if (zeroSize && !element.innerHTML) return true;
        try {
          var style = window.getComputedStyle(element);
          var displayValue = style.getPropertyValue("display");
          return zeroSize ? displayValue !== DISPLAY_CONTENTS && isNotOverflowing(element, style) : displayValue === DISPLAY_NONE;
        } catch (exception) {
          console.warn("Failed to inspect element style");
          return false;
        }
      }
      function visible(element) {
        var parentElement = element;
        var rootNode = element.getRootNode && element.getRootNode();
        while (parentElement) {
          if (parentElement === document.body) break;
          if (rootNode && parentElement === rootNode) parentElement = rootNode.host.parentNode;
          if (hidesContents(parentElement)) return false;
          parentElement = parentElement.parentNode;
        }
        return true;
      }
      function focusable(element, isTabIndexNotNaN) {
        var nodeName = element.nodeName.toLowerCase();
        var res = tabbableNode.test(nodeName) && !element.disabled || (nodeName === "a" ? element.href || isTabIndexNotNaN : isTabIndexNotNaN);
        return res && visible(element);
      }
      function tabbable2(element) {
        var tabIndex = element.getAttribute("tabindex");
        if (tabIndex === null) tabIndex = void 0;
        var isTabIndexNaN = isNaN(tabIndex);
        return (isTabIndexNaN || tabIndex >= 0) && focusable(element, !isTabIndexNaN);
      }
      function findTabbableDescendants(element) {
        var descendants = [].slice.call(element.querySelectorAll("*"), 0).reduce(function(finished, el) {
          return finished.concat(!el.shadowRoot ? [el] : findTabbableDescendants(el.shadowRoot));
        }, []);
        return descendants.filter(tabbable2);
      }
      module.exports = exports["default"];
    })(tabbable, tabbable.exports);
    return tabbable.exports;
  }
  var hasRequiredFocusManager;
  function requireFocusManager() {
    if (hasRequiredFocusManager) return focusManager;
    hasRequiredFocusManager = 1;
    Object.defineProperty(focusManager, "__esModule", {
      value: true
    });
    focusManager.resetState = resetState;
    focusManager.log = log;
    focusManager.handleBlur = handleBlur;
    focusManager.handleFocus = handleFocus;
    focusManager.markForFocusLater = markForFocusLater;
    focusManager.returnFocus = returnFocus;
    focusManager.popWithoutFocus = popWithoutFocus;
    focusManager.setupScopedFocus = setupScopedFocus;
    focusManager.teardownScopedFocus = teardownScopedFocus;
    var _tabbable = requireTabbable();
    var _tabbable2 = _interopRequireDefault(_tabbable);
    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }
    var focusLaterElements = [];
    var modalElement = null;
    var needToFocus = false;
    function resetState() {
      focusLaterElements = [];
    }
    function log() {
    }
    function handleBlur() {
      needToFocus = true;
    }
    function handleFocus() {
      if (needToFocus) {
        needToFocus = false;
        if (!modalElement) {
          return;
        }
        setTimeout(function() {
          if (modalElement.contains(document.activeElement)) {
            return;
          }
          var el = (0, _tabbable2.default)(modalElement)[0] || modalElement;
          el.focus();
        }, 0);
      }
    }
    function markForFocusLater() {
      focusLaterElements.push(document.activeElement);
    }
    function returnFocus() {
      var preventScroll = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
      var toFocus = null;
      try {
        if (focusLaterElements.length !== 0) {
          toFocus = focusLaterElements.pop();
          toFocus.focus({ preventScroll });
        }
        return;
      } catch (e) {
        console.warn(["You tried to return focus to", toFocus, "but it is not in the DOM anymore"].join(" "));
      }
    }
    function popWithoutFocus() {
      focusLaterElements.length > 0 && focusLaterElements.pop();
    }
    function setupScopedFocus(element) {
      modalElement = element;
      if (window.addEventListener) {
        window.addEventListener("blur", handleBlur, false);
        document.addEventListener("focus", handleFocus, true);
      } else {
        window.attachEvent("onBlur", handleBlur);
        document.attachEvent("onFocus", handleFocus);
      }
    }
    function teardownScopedFocus() {
      modalElement = null;
      if (window.addEventListener) {
        window.removeEventListener("blur", handleBlur);
        document.removeEventListener("focus", handleFocus);
      } else {
        window.detachEvent("onBlur", handleBlur);
        document.detachEvent("onFocus", handleFocus);
      }
    }
    return focusManager;
  }
  var scopeTab = { exports: {} };
  var hasRequiredScopeTab;
  function requireScopeTab() {
    if (hasRequiredScopeTab) return scopeTab.exports;
    hasRequiredScopeTab = 1;
    (function(module, exports) {
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      exports.default = scopeTab2;
      var _tabbable = requireTabbable();
      var _tabbable2 = _interopRequireDefault(_tabbable);
      function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : { default: obj };
      }
      function getActiveElement() {
        var el = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document;
        return el.activeElement.shadowRoot ? getActiveElement(el.activeElement.shadowRoot) : el.activeElement;
      }
      function scopeTab2(node, event) {
        var tabbable2 = (0, _tabbable2.default)(node);
        if (!tabbable2.length) {
          event.preventDefault();
          return;
        }
        var target = void 0;
        var shiftKey = event.shiftKey;
        var head = tabbable2[0];
        var tail = tabbable2[tabbable2.length - 1];
        var activeElement = getActiveElement();
        if (node === activeElement) {
          if (!shiftKey) return;
          target = tail;
        }
        if (tail === activeElement && !shiftKey) {
          target = head;
        }
        if (head === activeElement && shiftKey) {
          target = tail;
        }
        if (target) {
          event.preventDefault();
          target.focus();
          return;
        }
        var checkSafari = /(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);
        var isSafariDesktop = checkSafari != null && checkSafari[1] != "Chrome" && /\biPod\b|\biPad\b/g.exec(navigator.userAgent) == null;
        if (!isSafariDesktop) return;
        var x = tabbable2.indexOf(activeElement);
        if (x > -1) {
          x += shiftKey ? -1 : 1;
        }
        target = tabbable2[x];
        if (typeof target === "undefined") {
          event.preventDefault();
          target = shiftKey ? tail : head;
          target.focus();
          return;
        }
        event.preventDefault();
        target.focus();
      }
      module.exports = exports["default"];
    })(scopeTab, scopeTab.exports);
    return scopeTab.exports;
  }
  var ariaAppHider = {};
  var warning_1;
  var hasRequiredWarning;
  function requireWarning() {
    if (hasRequiredWarning) return warning_1;
    hasRequiredWarning = 1;
    var warning2 = function() {
    };
    warning_1 = warning2;
    return warning_1;
  }
  var safeHTMLElement = {};
  var exenv = { exports: {} };
  /*!
    Copyright (c) 2015 Jed Watson.
    Based on code that is Copyright 2013-2015, Facebook, Inc.
    All rights reserved.
  */
  var hasRequiredExenv;
  function requireExenv() {
    if (hasRequiredExenv) return exenv.exports;
    hasRequiredExenv = 1;
    (function(module) {
      (function() {
        var canUseDOM2 = !!(typeof window !== "undefined" && window.document && window.document.createElement);
        var ExecutionEnvironment = {
          canUseDOM: canUseDOM2,
          canUseWorkers: typeof Worker !== "undefined",
          canUseEventListeners: canUseDOM2 && !!(window.addEventListener || window.attachEvent),
          canUseViewport: canUseDOM2 && !!window.screen
        };
        if (module.exports) {
          module.exports = ExecutionEnvironment;
        } else {
          window.ExecutionEnvironment = ExecutionEnvironment;
        }
      })();
    })(exenv);
    return exenv.exports;
  }
  var hasRequiredSafeHTMLElement;
  function requireSafeHTMLElement() {
    if (hasRequiredSafeHTMLElement) return safeHTMLElement;
    hasRequiredSafeHTMLElement = 1;
    Object.defineProperty(safeHTMLElement, "__esModule", {
      value: true
    });
    safeHTMLElement.canUseDOM = safeHTMLElement.SafeNodeList = safeHTMLElement.SafeHTMLCollection = void 0;
    var _exenv = requireExenv();
    var _exenv2 = _interopRequireDefault(_exenv);
    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }
    var EE = _exenv2.default;
    var SafeHTMLElement = EE.canUseDOM ? window.HTMLElement : {};
    safeHTMLElement.SafeHTMLCollection = EE.canUseDOM ? window.HTMLCollection : {};
    safeHTMLElement.SafeNodeList = EE.canUseDOM ? window.NodeList : {};
    safeHTMLElement.canUseDOM = EE.canUseDOM;
    safeHTMLElement.default = SafeHTMLElement;
    return safeHTMLElement;
  }
  var hasRequiredAriaAppHider;
  function requireAriaAppHider() {
    if (hasRequiredAriaAppHider) return ariaAppHider;
    hasRequiredAriaAppHider = 1;
    Object.defineProperty(ariaAppHider, "__esModule", {
      value: true
    });
    ariaAppHider.resetState = resetState;
    ariaAppHider.log = log;
    ariaAppHider.assertNodeList = assertNodeList;
    ariaAppHider.setElement = setElement;
    ariaAppHider.validateElement = validateElement;
    ariaAppHider.hide = hide;
    ariaAppHider.show = show;
    ariaAppHider.documentNotReadyOrSSRTesting = documentNotReadyOrSSRTesting;
    var _warning = requireWarning();
    var _warning2 = _interopRequireDefault(_warning);
    var _safeHTMLElement = requireSafeHTMLElement();
    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }
    var globalElement = null;
    function resetState() {
      if (globalElement) {
        if (globalElement.removeAttribute) {
          globalElement.removeAttribute("aria-hidden");
        } else if (globalElement.length != null) {
          globalElement.forEach(function(element) {
            return element.removeAttribute("aria-hidden");
          });
        } else {
          document.querySelectorAll(globalElement).forEach(function(element) {
            return element.removeAttribute("aria-hidden");
          });
        }
      }
      globalElement = null;
    }
    function log() {
    }
    function assertNodeList(nodeList, selector) {
      if (!nodeList || !nodeList.length) {
        throw new Error("react-modal: No elements were found for selector " + selector + ".");
      }
    }
    function setElement(element) {
      var useElement = element;
      if (typeof useElement === "string" && _safeHTMLElement.canUseDOM) {
        var el = document.querySelectorAll(useElement);
        assertNodeList(el, useElement);
        useElement = el;
      }
      globalElement = useElement || globalElement;
      return globalElement;
    }
    function validateElement(appElement) {
      var el = appElement || globalElement;
      if (el) {
        return Array.isArray(el) || el instanceof HTMLCollection || el instanceof NodeList ? el : [el];
      } else {
        (0, _warning2.default)(false, ["react-modal: App element is not defined.", "Please use `Modal.setAppElement(el)` or set `appElement={el}`.", "This is needed so screen readers don't see main content", "when modal is opened. It is not recommended, but you can opt-out", "by setting `ariaHideApp={false}`."].join(" "));
        return [];
      }
    }
    function hide(appElement) {
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = void 0;
      try {
        for (var _iterator = validateElement(appElement)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var el = _step.value;
          el.setAttribute("aria-hidden", "true");
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
    }
    function show(appElement) {
      var _iteratorNormalCompletion2 = true;
      var _didIteratorError2 = false;
      var _iteratorError2 = void 0;
      try {
        for (var _iterator2 = validateElement(appElement)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
          var el = _step2.value;
          el.removeAttribute("aria-hidden");
        }
      } catch (err) {
        _didIteratorError2 = true;
        _iteratorError2 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion2 && _iterator2.return) {
            _iterator2.return();
          }
        } finally {
          if (_didIteratorError2) {
            throw _iteratorError2;
          }
        }
      }
    }
    function documentNotReadyOrSSRTesting() {
      globalElement = null;
    }
    return ariaAppHider;
  }
  var classList = {};
  var hasRequiredClassList;
  function requireClassList() {
    if (hasRequiredClassList) return classList;
    hasRequiredClassList = 1;
    Object.defineProperty(classList, "__esModule", {
      value: true
    });
    classList.resetState = resetState;
    classList.log = log;
    var htmlClassList = {};
    var docBodyClassList = {};
    function removeClass(at, cls) {
      at.classList.remove(cls);
    }
    function resetState() {
      var htmlElement = document.getElementsByTagName("html")[0];
      for (var cls in htmlClassList) {
        removeClass(htmlElement, htmlClassList[cls]);
      }
      var body = document.body;
      for (var _cls in docBodyClassList) {
        removeClass(body, docBodyClassList[_cls]);
      }
      htmlClassList = {};
      docBodyClassList = {};
    }
    function log() {
    }
    var incrementReference = function incrementReference2(poll, className) {
      if (!poll[className]) {
        poll[className] = 0;
      }
      poll[className] += 1;
      return className;
    };
    var decrementReference = function decrementReference2(poll, className) {
      if (poll[className]) {
        poll[className] -= 1;
      }
      return className;
    };
    var trackClass = function trackClass2(classListRef, poll, classes) {
      classes.forEach(function(className) {
        incrementReference(poll, className);
        classListRef.add(className);
      });
    };
    var untrackClass = function untrackClass2(classListRef, poll, classes) {
      classes.forEach(function(className) {
        decrementReference(poll, className);
        poll[className] === 0 && classListRef.remove(className);
      });
    };
    classList.add = function add2(element, classString) {
      return trackClass(element.classList, element.nodeName.toLowerCase() == "html" ? htmlClassList : docBodyClassList, classString.split(" "));
    };
    classList.remove = function remove2(element, classString) {
      return untrackClass(element.classList, element.nodeName.toLowerCase() == "html" ? htmlClassList : docBodyClassList, classString.split(" "));
    };
    return classList;
  }
  var portalOpenInstances = {};
  var hasRequiredPortalOpenInstances;
  function requirePortalOpenInstances() {
    if (hasRequiredPortalOpenInstances) return portalOpenInstances;
    hasRequiredPortalOpenInstances = 1;
    Object.defineProperty(portalOpenInstances, "__esModule", {
      value: true
    });
    portalOpenInstances.log = log;
    portalOpenInstances.resetState = resetState;
    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }
    var PortalOpenInstances = function PortalOpenInstances2() {
      var _this = this;
      _classCallCheck(this, PortalOpenInstances2);
      this.register = function(openInstance) {
        if (_this.openInstances.indexOf(openInstance) !== -1) {
          return;
        }
        _this.openInstances.push(openInstance);
        _this.emit("register");
      };
      this.deregister = function(openInstance) {
        var index2 = _this.openInstances.indexOf(openInstance);
        if (index2 === -1) {
          return;
        }
        _this.openInstances.splice(index2, 1);
        _this.emit("deregister");
      };
      this.subscribe = function(callback) {
        _this.subscribers.push(callback);
      };
      this.emit = function(eventType) {
        _this.subscribers.forEach(function(subscriber) {
          return subscriber(
            eventType,
            // shallow copy to avoid accidental mutation
            _this.openInstances.slice()
          );
        });
      };
      this.openInstances = [];
      this.subscribers = [];
    };
    var portalOpenInstances$1 = new PortalOpenInstances();
    function log() {
      console.log("portalOpenInstances ----------");
      console.log(portalOpenInstances$1.openInstances.length);
      portalOpenInstances$1.openInstances.forEach(function(p) {
        return console.log(p);
      });
      console.log("end portalOpenInstances ----------");
    }
    function resetState() {
      portalOpenInstances$1 = new PortalOpenInstances();
    }
    portalOpenInstances.default = portalOpenInstances$1;
    return portalOpenInstances;
  }
  var bodyTrap = {};
  var hasRequiredBodyTrap;
  function requireBodyTrap() {
    if (hasRequiredBodyTrap) return bodyTrap;
    hasRequiredBodyTrap = 1;
    Object.defineProperty(bodyTrap, "__esModule", {
      value: true
    });
    bodyTrap.resetState = resetState;
    bodyTrap.log = log;
    var _portalOpenInstances = requirePortalOpenInstances();
    var _portalOpenInstances2 = _interopRequireDefault(_portalOpenInstances);
    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }
    var before = void 0, after = void 0, instances = [];
    function resetState() {
      var _arr = [before, after];
      for (var _i = 0; _i < _arr.length; _i++) {
        var item2 = _arr[_i];
        if (!item2) continue;
        item2.parentNode && item2.parentNode.removeChild(item2);
      }
      before = after = null;
      instances = [];
    }
    function log() {
      console.log("bodyTrap ----------");
      console.log(instances.length);
      var _arr2 = [before, after];
      for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
        var item2 = _arr2[_i2];
        var check = item2 || {};
        console.log(check.nodeName, check.className, check.id);
      }
      console.log("edn bodyTrap ----------");
    }
    function focusContent() {
      if (instances.length === 0) {
        return;
      }
      instances[instances.length - 1].focusContent();
    }
    function bodyTrap$1(eventType, openInstances) {
      if (!before && !after) {
        before = document.createElement("div");
        before.setAttribute("data-react-modal-body-trap", "");
        before.style.position = "absolute";
        before.style.opacity = "0";
        before.setAttribute("tabindex", "0");
        before.addEventListener("focus", focusContent);
        after = before.cloneNode();
        after.addEventListener("focus", focusContent);
      }
      instances = openInstances;
      if (instances.length > 0) {
        if (document.body.firstChild !== before) {
          document.body.insertBefore(before, document.body.firstChild);
        }
        if (document.body.lastChild !== after) {
          document.body.appendChild(after);
        }
      } else {
        if (before.parentElement) {
          before.parentElement.removeChild(before);
        }
        if (after.parentElement) {
          after.parentElement.removeChild(after);
        }
      }
    }
    _portalOpenInstances2.default.subscribe(bodyTrap$1);
    return bodyTrap;
  }
  var hasRequiredModalPortal;
  function requireModalPortal() {
    if (hasRequiredModalPortal) return ModalPortal.exports;
    hasRequiredModalPortal = 1;
    (function(module, exports) {
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      var _extends2 = Object.assign || function(target) {
        for (var i = 1; i < arguments.length; i++) {
          var source = arguments[i];
          for (var key in source) {
            if (Object.prototype.hasOwnProperty.call(source, key)) {
              target[key] = source[key];
            }
          }
        }
        return target;
      };
      var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
        return typeof obj;
      } : function(obj) {
        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
      };
      var _createClass = /* @__PURE__ */ (function() {
        function defineProperties(target, props) {
          for (var i = 0; i < props.length; i++) {
            var descriptor = props[i];
            descriptor.enumerable = descriptor.enumerable || false;
            descriptor.configurable = true;
            if ("value" in descriptor) descriptor.writable = true;
            Object.defineProperty(target, descriptor.key, descriptor);
          }
        }
        return function(Constructor, protoProps, staticProps) {
          if (protoProps) defineProperties(Constructor.prototype, protoProps);
          if (staticProps) defineProperties(Constructor, staticProps);
          return Constructor;
        };
      })();
      var _react = requireReact();
      var _propTypes = /* @__PURE__ */ requirePropTypes();
      var _propTypes2 = _interopRequireDefault(_propTypes);
      var _focusManager = requireFocusManager();
      var focusManager2 = _interopRequireWildcard(_focusManager);
      var _scopeTab = requireScopeTab();
      var _scopeTab2 = _interopRequireDefault(_scopeTab);
      var _ariaAppHider = requireAriaAppHider();
      var ariaAppHider2 = _interopRequireWildcard(_ariaAppHider);
      var _classList = requireClassList();
      var classList2 = _interopRequireWildcard(_classList);
      var _safeHTMLElement = requireSafeHTMLElement();
      var _safeHTMLElement2 = _interopRequireDefault(_safeHTMLElement);
      var _portalOpenInstances = requirePortalOpenInstances();
      var _portalOpenInstances2 = _interopRequireDefault(_portalOpenInstances);
      requireBodyTrap();
      function _interopRequireWildcard(obj) {
        if (obj && obj.__esModule) {
          return obj;
        } else {
          var newObj = {};
          if (obj != null) {
            for (var key in obj) {
              if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
            }
          }
          newObj.default = obj;
          return newObj;
        }
      }
      function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : { default: obj };
      }
      function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
          throw new TypeError("Cannot call a class as a function");
        }
      }
      function _possibleConstructorReturn(self2, call) {
        if (!self2) {
          throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }
        return call && (typeof call === "object" || typeof call === "function") ? call : self2;
      }
      function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
          throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }
        subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
      }
      var CLASS_NAMES = {
        overlay: "ReactModal__Overlay",
        content: "ReactModal__Content"
      };
      var isTabKey = function isTabKey2(event) {
        return event.code === "Tab" || event.keyCode === 9;
      };
      var isEscKey = function isEscKey2(event) {
        return event.code === "Escape" || event.keyCode === 27;
      };
      var ariaHiddenInstances = 0;
      var ModalPortal2 = (function(_Component) {
        _inherits(ModalPortal22, _Component);
        function ModalPortal22(props) {
          _classCallCheck(this, ModalPortal22);
          var _this = _possibleConstructorReturn(this, (ModalPortal22.__proto__ || Object.getPrototypeOf(ModalPortal22)).call(this, props));
          _this.setOverlayRef = function(overlay) {
            _this.overlay = overlay;
            _this.props.overlayRef && _this.props.overlayRef(overlay);
          };
          _this.setContentRef = function(content) {
            _this.content = content;
            _this.props.contentRef && _this.props.contentRef(content);
          };
          _this.afterClose = function() {
            var _this$props = _this.props, appElement = _this$props.appElement, ariaHideApp = _this$props.ariaHideApp, htmlOpenClassName = _this$props.htmlOpenClassName, bodyOpenClassName = _this$props.bodyOpenClassName, parentSelector = _this$props.parentSelector;
            var parentDocument = parentSelector && parentSelector().ownerDocument || document;
            bodyOpenClassName && classList2.remove(parentDocument.body, bodyOpenClassName);
            htmlOpenClassName && classList2.remove(parentDocument.getElementsByTagName("html")[0], htmlOpenClassName);
            if (ariaHideApp && ariaHiddenInstances > 0) {
              ariaHiddenInstances -= 1;
              if (ariaHiddenInstances === 0) {
                ariaAppHider2.show(appElement);
              }
            }
            if (_this.props.shouldFocusAfterRender) {
              if (_this.props.shouldReturnFocusAfterClose) {
                focusManager2.returnFocus(_this.props.preventScroll);
                focusManager2.teardownScopedFocus();
              } else {
                focusManager2.popWithoutFocus();
              }
            }
            if (_this.props.onAfterClose) {
              _this.props.onAfterClose();
            }
            _portalOpenInstances2.default.deregister(_this);
          };
          _this.open = function() {
            _this.beforeOpen();
            if (_this.state.afterOpen && _this.state.beforeClose) {
              clearTimeout(_this.closeTimer);
              _this.setState({ beforeClose: false });
            } else {
              if (_this.props.shouldFocusAfterRender) {
                focusManager2.setupScopedFocus(_this.node);
                focusManager2.markForFocusLater();
              }
              _this.setState({ isOpen: true }, function() {
                _this.openAnimationFrame = requestAnimationFrame(function() {
                  _this.setState({ afterOpen: true });
                  if (_this.props.isOpen && _this.props.onAfterOpen) {
                    _this.props.onAfterOpen({
                      overlayEl: _this.overlay,
                      contentEl: _this.content
                    });
                  }
                });
              });
            }
          };
          _this.close = function() {
            if (_this.props.closeTimeoutMS > 0) {
              _this.closeWithTimeout();
            } else {
              _this.closeWithoutTimeout();
            }
          };
          _this.focusContent = function() {
            return _this.content && !_this.contentHasFocus() && _this.content.focus({ preventScroll: true });
          };
          _this.closeWithTimeout = function() {
            var closesAt = Date.now() + _this.props.closeTimeoutMS;
            _this.setState({ beforeClose: true, closesAt }, function() {
              _this.closeTimer = setTimeout(_this.closeWithoutTimeout, _this.state.closesAt - Date.now());
            });
          };
          _this.closeWithoutTimeout = function() {
            _this.setState({
              beforeClose: false,
              isOpen: false,
              afterOpen: false,
              closesAt: null
            }, _this.afterClose);
          };
          _this.handleKeyDown = function(event) {
            if (isTabKey(event)) {
              (0, _scopeTab2.default)(_this.content, event);
            }
            if (_this.props.shouldCloseOnEsc && isEscKey(event)) {
              event.stopPropagation();
              _this.requestClose(event);
            }
          };
          _this.handleOverlayOnClick = function(event) {
            if (_this.shouldClose === null) {
              _this.shouldClose = true;
            }
            if (_this.shouldClose && _this.props.shouldCloseOnOverlayClick) {
              if (_this.ownerHandlesClose()) {
                _this.requestClose(event);
              } else {
                _this.focusContent();
              }
            }
            _this.shouldClose = null;
          };
          _this.handleContentOnMouseUp = function() {
            _this.shouldClose = false;
          };
          _this.handleOverlayOnMouseDown = function(event) {
            if (!_this.props.shouldCloseOnOverlayClick && event.target == _this.overlay) {
              event.preventDefault();
            }
          };
          _this.handleContentOnClick = function() {
            _this.shouldClose = false;
          };
          _this.handleContentOnMouseDown = function() {
            _this.shouldClose = false;
          };
          _this.requestClose = function(event) {
            return _this.ownerHandlesClose() && _this.props.onRequestClose(event);
          };
          _this.ownerHandlesClose = function() {
            return _this.props.onRequestClose;
          };
          _this.shouldBeClosed = function() {
            return !_this.state.isOpen && !_this.state.beforeClose;
          };
          _this.contentHasFocus = function() {
            return document.activeElement === _this.content || _this.content.contains(document.activeElement);
          };
          _this.buildClassName = function(which, additional) {
            var classNames = (typeof additional === "undefined" ? "undefined" : _typeof(additional)) === "object" ? additional : {
              base: CLASS_NAMES[which],
              afterOpen: CLASS_NAMES[which] + "--after-open",
              beforeClose: CLASS_NAMES[which] + "--before-close"
            };
            var className = classNames.base;
            if (_this.state.afterOpen) {
              className = className + " " + classNames.afterOpen;
            }
            if (_this.state.beforeClose) {
              className = className + " " + classNames.beforeClose;
            }
            return typeof additional === "string" && additional ? className + " " + additional : className;
          };
          _this.attributesFromObject = function(prefix2, items) {
            return Object.keys(items).reduce(function(acc, name) {
              acc[prefix2 + "-" + name] = items[name];
              return acc;
            }, {});
          };
          _this.state = {
            afterOpen: false,
            beforeClose: false
          };
          _this.shouldClose = null;
          _this.moveFromContentToOverlay = null;
          return _this;
        }
        _createClass(ModalPortal22, [{
          key: "componentDidMount",
          value: function componentDidMount() {
            if (this.props.isOpen) {
              this.open();
            }
          }
        }, {
          key: "componentDidUpdate",
          value: function componentDidUpdate(prevProps, prevState) {
            if (this.props.isOpen && !prevProps.isOpen) {
              this.open();
            } else if (!this.props.isOpen && prevProps.isOpen) {
              this.close();
            }
            if (this.props.shouldFocusAfterRender && this.state.isOpen && !prevState.isOpen) {
              this.focusContent();
            }
          }
        }, {
          key: "componentWillUnmount",
          value: function componentWillUnmount() {
            if (this.state.isOpen) {
              this.afterClose();
            }
            clearTimeout(this.closeTimer);
            cancelAnimationFrame(this.openAnimationFrame);
          }
        }, {
          key: "beforeOpen",
          value: function beforeOpen() {
            var _props = this.props, appElement = _props.appElement, ariaHideApp = _props.ariaHideApp, htmlOpenClassName = _props.htmlOpenClassName, bodyOpenClassName = _props.bodyOpenClassName, parentSelector = _props.parentSelector;
            var parentDocument = parentSelector && parentSelector().ownerDocument || document;
            bodyOpenClassName && classList2.add(parentDocument.body, bodyOpenClassName);
            htmlOpenClassName && classList2.add(parentDocument.getElementsByTagName("html")[0], htmlOpenClassName);
            if (ariaHideApp) {
              ariaHiddenInstances += 1;
              ariaAppHider2.hide(appElement);
            }
            _portalOpenInstances2.default.register(this);
          }
          // Don't steal focus from inner elements
        }, {
          key: "render",
          value: function render() {
            var _props2 = this.props, id = _props2.id, className = _props2.className, overlayClassName = _props2.overlayClassName, defaultStyles = _props2.defaultStyles, children = _props2.children;
            var contentStyles = className ? {} : defaultStyles.content;
            var overlayStyles = overlayClassName ? {} : defaultStyles.overlay;
            if (this.shouldBeClosed()) {
              return null;
            }
            var overlayProps = {
              ref: this.setOverlayRef,
              className: this.buildClassName("overlay", overlayClassName),
              style: _extends2({}, overlayStyles, this.props.style.overlay),
              onClick: this.handleOverlayOnClick,
              onMouseDown: this.handleOverlayOnMouseDown
            };
            var contentProps = _extends2({
              id,
              ref: this.setContentRef,
              style: _extends2({}, contentStyles, this.props.style.content),
              className: this.buildClassName("content", className),
              tabIndex: "-1",
              onKeyDown: this.handleKeyDown,
              onMouseDown: this.handleContentOnMouseDown,
              onMouseUp: this.handleContentOnMouseUp,
              onClick: this.handleContentOnClick,
              role: this.props.role,
              "aria-label": this.props.contentLabel
            }, this.attributesFromObject("aria", _extends2({ modal: true }, this.props.aria)), this.attributesFromObject("data", this.props.data || {}), {
              "data-testid": this.props.testId
            });
            var contentElement = this.props.contentElement(contentProps, children);
            return this.props.overlayElement(overlayProps, contentElement);
          }
        }]);
        return ModalPortal22;
      })(_react.Component);
      ModalPortal2.defaultProps = {
        style: {
          overlay: {},
          content: {}
        },
        defaultStyles: {}
      };
      ModalPortal2.propTypes = {
        isOpen: _propTypes2.default.bool.isRequired,
        defaultStyles: _propTypes2.default.shape({
          content: _propTypes2.default.object,
          overlay: _propTypes2.default.object
        }),
        style: _propTypes2.default.shape({
          content: _propTypes2.default.object,
          overlay: _propTypes2.default.object
        }),
        className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),
        overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),
        parentSelector: _propTypes2.default.func,
        bodyOpenClassName: _propTypes2.default.string,
        htmlOpenClassName: _propTypes2.default.string,
        ariaHideApp: _propTypes2.default.bool,
        appElement: _propTypes2.default.oneOfType([_propTypes2.default.instanceOf(_safeHTMLElement2.default), _propTypes2.default.instanceOf(_safeHTMLElement.SafeHTMLCollection), _propTypes2.default.instanceOf(_safeHTMLElement.SafeNodeList), _propTypes2.default.arrayOf(_propTypes2.default.instanceOf(_safeHTMLElement2.default))]),
        onAfterOpen: _propTypes2.default.func,
        onAfterClose: _propTypes2.default.func,
        onRequestClose: _propTypes2.default.func,
        closeTimeoutMS: _propTypes2.default.number,
        shouldFocusAfterRender: _propTypes2.default.bool,
        shouldCloseOnOverlayClick: _propTypes2.default.bool,
        shouldReturnFocusAfterClose: _propTypes2.default.bool,
        preventScroll: _propTypes2.default.bool,
        role: _propTypes2.default.string,
        contentLabel: _propTypes2.default.string,
        aria: _propTypes2.default.object,
        data: _propTypes2.default.object,
        children: _propTypes2.default.node,
        shouldCloseOnEsc: _propTypes2.default.bool,
        overlayRef: _propTypes2.default.func,
        contentRef: _propTypes2.default.func,
        id: _propTypes2.default.string,
        overlayElement: _propTypes2.default.func,
        contentElement: _propTypes2.default.func,
        testId: _propTypes2.default.string
      };
      exports.default = ModalPortal2;
      module.exports = exports["default"];
    })(ModalPortal, ModalPortal.exports);
    return ModalPortal.exports;
  }
  function componentWillMount() {
    var state = this.constructor.getDerivedStateFromProps(this.props, this.state);
    if (state !== null && state !== void 0) {
      this.setState(state);
    }
  }
  function componentWillReceiveProps(nextProps) {
    function updater(prevState) {
      var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);
      return state !== null && state !== void 0 ? state : null;
    }
    this.setState(updater.bind(this));
  }
  function componentWillUpdate(nextProps, nextState) {
    try {
      var prevProps = this.props;
      var prevState = this.state;
      this.props = nextProps;
      this.state = nextState;
      this.__reactInternalSnapshotFlag = true;
      this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(
        prevProps,
        prevState
      );
    } finally {
      this.props = prevProps;
      this.state = prevState;
    }
  }
  componentWillMount.__suppressDeprecationWarning = true;
  componentWillReceiveProps.__suppressDeprecationWarning = true;
  componentWillUpdate.__suppressDeprecationWarning = true;
  function polyfill(Component) {
    var prototype = Component.prototype;
    if (!prototype || !prototype.isReactComponent) {
      throw new Error("Can only polyfill class components");
    }
    if (typeof Component.getDerivedStateFromProps !== "function" && typeof prototype.getSnapshotBeforeUpdate !== "function") {
      return Component;
    }
    var foundWillMountName = null;
    var foundWillReceivePropsName = null;
    var foundWillUpdateName = null;
    if (typeof prototype.componentWillMount === "function") {
      foundWillMountName = "componentWillMount";
    } else if (typeof prototype.UNSAFE_componentWillMount === "function") {
      foundWillMountName = "UNSAFE_componentWillMount";
    }
    if (typeof prototype.componentWillReceiveProps === "function") {
      foundWillReceivePropsName = "componentWillReceiveProps";
    } else if (typeof prototype.UNSAFE_componentWillReceiveProps === "function") {
      foundWillReceivePropsName = "UNSAFE_componentWillReceiveProps";
    }
    if (typeof prototype.componentWillUpdate === "function") {
      foundWillUpdateName = "componentWillUpdate";
    } else if (typeof prototype.UNSAFE_componentWillUpdate === "function") {
      foundWillUpdateName = "UNSAFE_componentWillUpdate";
    }
    if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
      var componentName = Component.displayName || Component.name;
      var newApiName = typeof Component.getDerivedStateFromProps === "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
      throw Error(
        "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n" + componentName + " uses " + newApiName + " but also contains the following legacy lifecycles:" + (foundWillMountName !== null ? "\n  " + foundWillMountName : "") + (foundWillReceivePropsName !== null ? "\n  " + foundWillReceivePropsName : "") + (foundWillUpdateName !== null ? "\n  " + foundWillUpdateName : "") + "\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks"
      );
    }
    if (typeof Component.getDerivedStateFromProps === "function") {
      prototype.componentWillMount = componentWillMount;
      prototype.componentWillReceiveProps = componentWillReceiveProps;
    }
    if (typeof prototype.getSnapshotBeforeUpdate === "function") {
      if (typeof prototype.componentDidUpdate !== "function") {
        throw new Error(
          "Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype"
        );
      }
      prototype.componentWillUpdate = componentWillUpdate;
      var componentDidUpdate = prototype.componentDidUpdate;
      prototype.componentDidUpdate = function componentDidUpdatePolyfill(prevProps, prevState, maybeSnapshot) {
        var snapshot = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : maybeSnapshot;
        componentDidUpdate.call(this, prevProps, prevState, snapshot);
      };
    }
    return Component;
  }
  const reactLifecyclesCompat_es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    polyfill
  }, Symbol.toStringTag, { value: "Module" }));
  const require$$6 = /* @__PURE__ */ getAugmentedNamespace(reactLifecyclesCompat_es);
  var hasRequiredModal;
  function requireModal() {
    if (hasRequiredModal) return Modal$1;
    hasRequiredModal = 1;
    Object.defineProperty(Modal$1, "__esModule", {
      value: true
    });
    Modal$1.bodyOpenClassName = Modal$1.portalClassName = void 0;
    var _extends2 = Object.assign || function(target) {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i];
        for (var key in source) {
          if (Object.prototype.hasOwnProperty.call(source, key)) {
            target[key] = source[key];
          }
        }
      }
      return target;
    };
    var _createClass = /* @__PURE__ */ (function() {
      function defineProperties(target, props) {
        for (var i = 0; i < props.length; i++) {
          var descriptor = props[i];
          descriptor.enumerable = descriptor.enumerable || false;
          descriptor.configurable = true;
          if ("value" in descriptor) descriptor.writable = true;
          Object.defineProperty(target, descriptor.key, descriptor);
        }
      }
      return function(Constructor, protoProps, staticProps) {
        if (protoProps) defineProperties(Constructor.prototype, protoProps);
        if (staticProps) defineProperties(Constructor, staticProps);
        return Constructor;
      };
    })();
    var _react = requireReact();
    var _react2 = _interopRequireDefault(_react);
    var _reactDom = requireReactDom();
    var _reactDom2 = _interopRequireDefault(_reactDom);
    var _propTypes = /* @__PURE__ */ requirePropTypes();
    var _propTypes2 = _interopRequireDefault(_propTypes);
    var _ModalPortal = requireModalPortal();
    var _ModalPortal2 = _interopRequireDefault(_ModalPortal);
    var _ariaAppHider = requireAriaAppHider();
    var ariaAppHider2 = _interopRequireWildcard(_ariaAppHider);
    var _safeHTMLElement = requireSafeHTMLElement();
    var _safeHTMLElement2 = _interopRequireDefault(_safeHTMLElement);
    var _reactLifecyclesCompat = require$$6;
    function _interopRequireWildcard(obj) {
      if (obj && obj.__esModule) {
        return obj;
      } else {
        var newObj = {};
        if (obj != null) {
          for (var key in obj) {
            if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
          }
        }
        newObj.default = obj;
        return newObj;
      }
    }
    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }
    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }
    function _possibleConstructorReturn(self2, call) {
      if (!self2) {
        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
      }
      return call && (typeof call === "object" || typeof call === "function") ? call : self2;
    }
    function _inherits(subClass, superClass) {
      if (typeof superClass !== "function" && superClass !== null) {
        throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
      }
      subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
      if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }
    var portalClassName = Modal$1.portalClassName = "ReactModalPortal";
    var bodyOpenClassName = Modal$1.bodyOpenClassName = "ReactModal__Body--open";
    var isReact16 = _safeHTMLElement.canUseDOM && _reactDom2.default.createPortal !== void 0;
    var createHTMLElement = function createHTMLElement2(name) {
      return document.createElement(name);
    };
    var getCreatePortal = function getCreatePortal2() {
      return isReact16 ? _reactDom2.default.createPortal : _reactDom2.default.unstable_renderSubtreeIntoContainer;
    };
    function getParentElement(parentSelector2) {
      return parentSelector2();
    }
    var Modal2 = (function(_Component) {
      _inherits(Modal22, _Component);
      function Modal22() {
        var _ref;
        var _temp, _this, _ret;
        _classCallCheck(this, Modal22);
        for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
          args[_key] = arguments[_key];
        }
        return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Modal22.__proto__ || Object.getPrototypeOf(Modal22)).call.apply(_ref, [this].concat(args))), _this), _this.removePortal = function() {
          !isReact16 && _reactDom2.default.unmountComponentAtNode(_this.node);
          var parent = getParentElement(_this.props.parentSelector);
          if (parent && parent.contains(_this.node)) {
            parent.removeChild(_this.node);
          } else {
            console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.');
          }
        }, _this.portalRef = function(ref) {
          _this.portal = ref;
        }, _this.renderPortal = function(props) {
          var createPortal = getCreatePortal();
          var portal = createPortal(_this, _react2.default.createElement(_ModalPortal2.default, _extends2({ defaultStyles: Modal22.defaultStyles }, props)), _this.node);
          _this.portalRef(portal);
        }, _temp), _possibleConstructorReturn(_this, _ret);
      }
      _createClass(Modal22, [{
        key: "componentDidMount",
        value: function componentDidMount() {
          if (!_safeHTMLElement.canUseDOM) return;
          if (!isReact16) {
            this.node = createHTMLElement("div");
          }
          this.node.className = this.props.portalClassName;
          var parent = getParentElement(this.props.parentSelector);
          parent.appendChild(this.node);
          !isReact16 && this.renderPortal(this.props);
        }
      }, {
        key: "getSnapshotBeforeUpdate",
        value: function getSnapshotBeforeUpdate(prevProps) {
          var prevParent = getParentElement(prevProps.parentSelector);
          var nextParent = getParentElement(this.props.parentSelector);
          return { prevParent, nextParent };
        }
      }, {
        key: "componentDidUpdate",
        value: function componentDidUpdate(prevProps, _, snapshot) {
          if (!_safeHTMLElement.canUseDOM) return;
          var _props = this.props, isOpen = _props.isOpen, portalClassName2 = _props.portalClassName;
          if (prevProps.portalClassName !== portalClassName2) {
            this.node.className = portalClassName2;
          }
          var prevParent = snapshot.prevParent, nextParent = snapshot.nextParent;
          if (nextParent !== prevParent) {
            prevParent.removeChild(this.node);
            nextParent.appendChild(this.node);
          }
          if (!prevProps.isOpen && !isOpen) return;
          !isReact16 && this.renderPortal(this.props);
        }
      }, {
        key: "componentWillUnmount",
        value: function componentWillUnmount() {
          if (!_safeHTMLElement.canUseDOM || !this.node || !this.portal) return;
          var state = this.portal.state;
          var now = Date.now();
          var closesAt = state.isOpen && this.props.closeTimeoutMS && (state.closesAt || now + this.props.closeTimeoutMS);
          if (closesAt) {
            if (!state.beforeClose) {
              this.portal.closeWithTimeout();
            }
            setTimeout(this.removePortal, closesAt - now);
          } else {
            this.removePortal();
          }
        }
      }, {
        key: "render",
        value: function render() {
          if (!_safeHTMLElement.canUseDOM || !isReact16) {
            return null;
          }
          if (!this.node && isReact16) {
            this.node = createHTMLElement("div");
          }
          var createPortal = getCreatePortal();
          return createPortal(_react2.default.createElement(_ModalPortal2.default, _extends2({
            ref: this.portalRef,
            defaultStyles: Modal22.defaultStyles
          }, this.props)), this.node);
        }
      }], [{
        key: "setAppElement",
        value: function setAppElement(element) {
          ariaAppHider2.setElement(element);
        }
        /* eslint-disable react/no-unused-prop-types */
        /* eslint-enable react/no-unused-prop-types */
      }]);
      return Modal22;
    })(_react.Component);
    Modal2.propTypes = {
      isOpen: _propTypes2.default.bool.isRequired,
      style: _propTypes2.default.shape({
        content: _propTypes2.default.object,
        overlay: _propTypes2.default.object
      }),
      portalClassName: _propTypes2.default.string,
      bodyOpenClassName: _propTypes2.default.string,
      htmlOpenClassName: _propTypes2.default.string,
      className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({
        base: _propTypes2.default.string.isRequired,
        afterOpen: _propTypes2.default.string.isRequired,
        beforeClose: _propTypes2.default.string.isRequired
      })]),
      overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({
        base: _propTypes2.default.string.isRequired,
        afterOpen: _propTypes2.default.string.isRequired,
        beforeClose: _propTypes2.default.string.isRequired
      })]),
      appElement: _propTypes2.default.oneOfType([_propTypes2.default.instanceOf(_safeHTMLElement2.default), _propTypes2.default.instanceOf(_safeHTMLElement.SafeHTMLCollection), _propTypes2.default.instanceOf(_safeHTMLElement.SafeNodeList), _propTypes2.default.arrayOf(_propTypes2.default.instanceOf(_safeHTMLElement2.default))]),
      onAfterOpen: _propTypes2.default.func,
      onRequestClose: _propTypes2.default.func,
      closeTimeoutMS: _propTypes2.default.number,
      ariaHideApp: _propTypes2.default.bool,
      shouldFocusAfterRender: _propTypes2.default.bool,
      shouldCloseOnOverlayClick: _propTypes2.default.bool,
      shouldReturnFocusAfterClose: _propTypes2.default.bool,
      preventScroll: _propTypes2.default.bool,
      parentSelector: _propTypes2.default.func,
      aria: _propTypes2.default.object,
      data: _propTypes2.default.object,
      role: _propTypes2.default.string,
      contentLabel: _propTypes2.default.string,
      shouldCloseOnEsc: _propTypes2.default.bool,
      overlayRef: _propTypes2.default.func,
      contentRef: _propTypes2.default.func,
      id: _propTypes2.default.string,
      overlayElement: _propTypes2.default.func,
      contentElement: _propTypes2.default.func
    };
    Modal2.defaultProps = {
      isOpen: false,
      portalClassName,
      bodyOpenClassName,
      role: "dialog",
      ariaHideApp: true,
      closeTimeoutMS: 0,
      shouldFocusAfterRender: true,
      shouldCloseOnEsc: true,
      shouldCloseOnOverlayClick: true,
      shouldReturnFocusAfterClose: true,
      preventScroll: false,
      parentSelector: function parentSelector() {
        return document.body;
      },
      overlayElement: function overlayElement(props, contentEl) {
        return _react2.default.createElement(
          "div",
          props,
          contentEl
        );
      },
      contentElement: function contentElement(props, children) {
        return _react2.default.createElement(
          "div",
          props,
          children
        );
      }
    };
    Modal2.defaultStyles = {
      overlay: {
        position: "fixed",
        top: 0,
        left: 0,
        right: 0,
        bottom: 0,
        backgroundColor: "rgba(255, 255, 255, 0.75)"
      },
      content: {
        position: "absolute",
        top: "40px",
        left: "40px",
        right: "40px",
        bottom: "40px",
        border: "1px solid #ccc",
        background: "#fff",
        overflow: "auto",
        WebkitOverflowScrolling: "touch",
        borderRadius: "4px",
        outline: "none",
        padding: "20px"
      }
    };
    (0, _reactLifecyclesCompat.polyfill)(Modal2);
    Modal$1.default = Modal2;
    return Modal$1;
  }
  var hasRequiredLib$1;
  function requireLib$1() {
    if (hasRequiredLib$1) return lib$1.exports;
    hasRequiredLib$1 = 1;
    (function(module, exports) {
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      var _Modal = requireModal();
      var _Modal2 = _interopRequireDefault(_Modal);
      function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : { default: obj };
      }
      exports.default = _Modal2.default;
      module.exports = exports["default"];
    })(lib$1, lib$1.exports);
    return lib$1.exports;
  }
  var libExports = requireLib$1();
  const Modal = /* @__PURE__ */ getDefaultExportFromCjs(libExports);
  const modalInner$2 = "_modalInner_1byqo_9";
  const closeButton$2 = "_closeButton_1byqo_23";
  const dismissIcon$2 = "_dismissIcon_1byqo_39";
  const styles$w = {
    modalInner: modalInner$2,
    closeButton: closeButton$2,
    dismissIcon: dismissIcon$2
  };
  const customStyles$2 = {
    overlay: {
      backgroundColor: "rgba(32, 32, 32, 0.81)",
      zIndex: 199999
    },
    content: {
      top: "50%",
      left: "50%",
      right: "auto",
      bottom: "auto",
      marginRight: "-50%",
      transform: "translate(-50%, -50%)",
      padding: "40px",
      borderRadius: "10px"
    }
  };
  const ModalWrapper = ({ isOpen, onCloseCallback = null, children }) => {
    const [modalIsOpen, setModalIsOpen] = React.useState(false);
    const closeModal = () => {
      setModalIsOpen(false);
      if (onCloseCallback) {
        onCloseCallback();
      }
    };
    reactExports.useEffect(() => {
      if (isOpen) {
        setModalIsOpen(true);
      }
    }, [isOpen]);
    reactExports.useEffect(() => {
      if (typeof window !== "undefined" && window.envatoElements && window.envatoElements.modalAppHolder) {
        Modal.setAppElement(window.envatoElements.modalAppHolder);
      }
    });
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      Modal,
      {
        isOpen: modalIsOpen,
        onRequestClose: closeModal,
        style: customStyles$2,
        contentLabel: "Envato Elements",
        "data-testid": "modal-wrapper",
        children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$w.modalInner, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: closeModal, "data-testid": "modal-close-button", className: styles$w.closeButton, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `dashicons dashicons-no-alt ${styles$w.dismissIcon}` }) }),
          typeof children === "function" ? children({ closeModal }) : children
        ] })
      }
    );
  };
  const wrapper$6 = "_wrapper_quh2h_8";
  const title$1 = "_title_quh2h_12";
  const subtitle = "_subtitle_quh2h_20";
  const styles$v = {
    wrapper: wrapper$6,
    title: title$1,
    subtitle
  };
  const MainHeading = ({ title: title2, subtitle: subtitle2 }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$v.wrapper, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: styles$v.title, children: title2 }),
    subtitle2 ? /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles$v.subtitle, children: subtitle2 }) : null
  ] });
  const wrapper$5 = "_wrapper_176kt_1";
  const styles$u = {
    wrapper: wrapper$5
  };
  const ButtonWrapper = ({ children }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$u.wrapper, children });
  const button = "_button_1q6vq_8";
  const attention = "_attention_1q6vq_8";
  const warning = "_warning_1q6vq_8";
  const ghost = "_ghost_1q6vq_8";
  const secondary = "_secondary_1q6vq_8";
  const primary = "_primary_1q6vq_8";
  const styles$t = {
    button,
    attention,
    warning,
    ghost,
    secondary,
    primary
  };
  const ButtonElement = ({ type, dataTestId, element, children, ...additionalProps }) => {
    if (element === "button") {
      return /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: styles$t[type], "data-testid": dataTestId, ...additionalProps, children });
    }
    if (element === "Link") {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { className: styles$t[type], "data-testid": dataTestId, ...additionalProps, children });
    }
    if (element === "a") {
      return /* @__PURE__ */ jsxRuntimeExports.jsx("a", { className: styles$t[type], "data-testid": dataTestId, ...additionalProps, children });
    }
    if (element === "label") {
      return /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: styles$t[type], "data-testid": dataTestId, ...additionalProps, children });
    }
  };
  ButtonElement.propTypes = {
    type: PropTypes.oneOf(["ghost", "primary", "secondary", "warning", "attention"]),
    dataTestId: PropTypes.string,
    element: PropTypes.oneOf(["button", "a", "Link", "label"]).isRequired,
    children: PropTypes.node
  };
  ButtonElement.defaultProps = {
    type: "ghost",
    dataTestId: null,
    children: null
  };
  const Icon = ({ icon: icon2, className = "", style = {} }) => {
    const iconMap = {
      // Actions
      "plus": "fa-solid fa-plus",
      "cross": "fa-solid fa-xmark",
      "eye": "fa-solid fa-eye",
      "trash": "fa-solid fa-trash-can",
      "download": "fa-solid fa-download",
      "upload": "fa-solid fa-upload",
      "expand": "fa-solid fa-expand",
      "info": "fa-solid fa-circle-info",
      "updateSpinning": "fa-solid fa-spinner fa-spin",
      "checkmark": "fa-solid fa-check",
      // Navigation
      "arrow-left-alt": "fa-solid fa-arrow-left",
      "arrow-right-alt": "fa-solid fa-arrow-right",
      "arrow-up-alt": "fa-solid fa-arrow-up",
      "arrow-down-alt": "fa-solid fa-arrow-down",
      // UI
      "admin-generic": "fa-solid fa-gear",
      "search": "fa-solid fa-magnifying-glass",
      "edit": "fa-solid fa-pen",
      "yes-alt": "fa-solid fa-circle-check",
      "no": "fa-solid fa-circle-xmark",
      "warning": "fa-solid fa-triangle-exclamation",
      // Files
      "media-default": "fa-solid fa-file",
      "media-document": "fa-solid fa-file-lines",
      "media-archive": "fa-solid fa-file-zipper",
      // Default fallback
      "default": "fa-solid fa-circle"
    };
    const faClass = iconMap[icon2] || iconMap["default"];
    return /* @__PURE__ */ jsxRuntimeExports.jsx("i", { className: `${faClass} ${className}`, style, "aria-hidden": "true" });
  };
  const icon$1 = "_icon_nm6v0_1";
  const styles$s = {
    icon: icon$1
  };
  const ButtonIconAndLabel = ({ label: label2, icon: icon2 }) => {
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
      icon2 && /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { icon: icon2, className: styles$s.icon }),
      label2
    ] });
  };
  const ExternalLinkButton = ({ type, label: label2, icon: icon2, href, openNewWindow, ...additionalProps }) => {
    const openNewWindowProps = openNewWindow ? { target: "_blank", rel: "noopener noreferrer" } : null;
    return /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonElement, { href, type, element: "a", ...openNewWindowProps, ...additionalProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonIconAndLabel, { label: label2, icon: icon2 }) });
  };
  ExternalLinkButton.propTypes = {
    type: PropTypes.string,
    label: PropTypes.string,
    icon: PropTypes.string,
    href: PropTypes.string.isRequired
  };
  ExternalLinkButton.defaultProps = {
    type: "ghost",
    label: null,
    icon: null
  };
  const getImportedPhotoUrl = (photoId) => {
    return `/wp-content/uploads/envato-elements/photos/${photoId}`;
  };
  const getImportedTemplateUrl = (params) => {
    const templateId = typeof params === "object" ? params.importedTemplateId : params;
    return `/wp-admin/post.php?post=${templateId}&action=elementor`;
  };
  const getImportedKitUrl = (params) => {
    const kitId = typeof params === "object" ? params.importedTemplateKitId : params;
    return `/template-kits/installed-kits/kit/${kitId}`;
  };
  const tokenUrl = () => {
    var _a;
    return ((_a = window.envatoElements) == null ? void 0 : _a.tokenUrl) || "https://elements.envato.com/token";
  };
  const backgroundImage = "_backgroundImage_16jzp_8";
  const successIcon = "_successIcon_16jzp_25";
  const connectedTitle = "_connectedTitle_16jzp_31";
  const envatoLogo = "_envatoLogo_16jzp_36";
  const downloadText = "_downloadText_16jzp_43";
  const unlimitedText = "_unlimitedText_16jzp_51";
  const styles$r = {
    backgroundImage,
    successIcon,
    connectedTitle,
    envatoLogo,
    downloadText,
    unlimitedText
  };
  const Step1Welcome = ({ goToNextStep }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(MainHeading, { title: "Envato Elements Subscription Required" }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$r.downloadText, children: [
      "To download and use this premium content, you",
      /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
      " need connect your Envato Elements subscription."
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$r.unlimitedText, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: "Unlimited Digital Assets" }),
      /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
      "One subscription, 2,100,000+ assets. ",
      /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
      "All the creative assets you need under one subscription."
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs(ButtonWrapper, { children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        ExternalLinkButton,
        {
          type: "primary",
          label: "Get Started",
          icon: "arrow",
          href: tokenUrl(),
          openNewWindow: true,
          onClick: goToNextStep
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLinkButton, { type: "ghost", icon: "arrow", label: "Find Out More", href: "https://elements.envato.com/?utm_source=extensions&utm_medium=referral&utm_campaign=subscription_required_modal", openNewWindow: true })
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$r.backgroundImage })
  ] });
  const wrapper$4 = "_wrapper_kfxbj_1";
  const formWrapper = "_formWrapper_kfxbj_6";
  const inputWrapper = "_inputWrapper_kfxbj_10";
  const buttonWrapper = "_buttonWrapper_kfxbj_14";
  const instructions = "_instructions_kfxbj_22";
  const errors = "_errors_kfxbj_27";
  const styles$q = {
    wrapper: wrapper$4,
    formWrapper,
    inputWrapper,
    buttonWrapper,
    instructions,
    errors
  };
  const InputWithButton = ({ Input, Button: Button2, instructions: instructions2, errorMessage }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$q.wrapper, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$q.formWrapper, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$q.inputWrapper, children: Input }),
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$q.buttonWrapper, children: Button2 })
    ] }),
    errorMessage ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$q.errors, children: errorMessage }) : null,
    instructions2 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$q.instructions, children: instructions2 }) : null
  ] });
  const apiCall = async (endpoint, method = "POST", data = {}) => {
    var _a, _b, _c;
    const apiUrl = ((_a = window.envatoElements) == null ? void 0 : _a.api_url) || `/wp-json/${((_b = window.envatoElements) == null ? void 0 : _b.api_namespace) || "envato-elements/v2"}/`;
    const url = `${apiUrl}${endpoint}`;
    const options = {
      method,
      credentials: "same-origin",
      headers: {
        "X-WP-Nonce": ((_c = window.envatoElements) == null ? void 0 : _c.nonce) || ""
      }
    };
    if (method === "POST" && !(data instanceof FormData)) {
      options.headers["Content-Type"] = "application/json";
      options.body = JSON.stringify(data);
    } else if (data instanceof FormData) {
      options.body = data;
    }
    const response = await fetch(url, options);
    const result = await response.json();
    if (!response.ok || result.error) {
      const error = result.error || {};
      throw new Error(error.message || "API call failed");
    }
    return result;
  };
  const verifyExtensionsToken = ({ token }) => {
    const [loading, setLoading] = reactExports.useState(true);
    const [data, setData] = reactExports.useState(null);
    const [error, setError] = reactExports.useState(null);
    reactExports.useEffect(() => {
      if (!token) {
        setLoading(false);
        return;
      }
      const verify = async () => {
        try {
          setLoading(true);
          setError(null);
          const result = await apiCall("verifyExtensionsToken", "POST", { token });
          setData(result);
          setLoading(false);
        } catch (err) {
          setError(err.message);
          setLoading(false);
        }
      };
      verify();
    }, [token]);
    return { loading, data, error };
  };
  const ActionPerformer = ({ actionHook, LoadingButton, SuccessButton, ErrorButton, errorCallback, completeCallback }) => {
    const { loading, data, error } = actionHook();
    if (!loading && !error) {
      setTimeout(() => {
        completeCallback(data);
      }, 500);
      return SuccessButton;
    }
    if (error) {
      setTimeout(() => {
        errorCallback(data);
      }, 100);
      return ErrorButton;
    }
    return LoadingButton;
  };
  const ButtonActionProvider = ({ DefaultButton, CompletedButton, LoadingButton, ErrorButton, SuccessButton, actionHook, isAlreadyCompleted = false, completedCallback = null, errorCallback = null, actionConfirmationMessage = null }) => {
    const [isProcessing, setIsProcessing] = reactExports.useState(false);
    const [isCompleted, setIsCompleted] = reactExports.useState(isAlreadyCompleted);
    const [error, setError] = reactExports.useState(null);
    reactExports.useEffect(() => {
      if (isCompleted && completedCallback && !isAlreadyCompleted) {
        completedCallback(isCompleted);
      }
    }, [isCompleted]);
    reactExports.useEffect(() => {
      if (error && errorCallback) {
        errorCallback(error);
      }
    }, [error]);
    reactExports.useEffect(() => {
      setIsCompleted(isAlreadyCompleted);
    }, [isAlreadyCompleted]);
    if (isCompleted) {
      return CompletedButton;
    }
    if (isProcessing) {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        ActionPerformer,
        {
          actionHook,
          LoadingButton,
          ErrorButton,
          SuccessButton,
          errorCallback: (data) => {
            setTimeout(() => {
              setIsProcessing(false);
            }, 500);
            setError(data);
          },
          completeCallback: (data) => {
            setIsProcessing(false);
            setIsCompleted(data);
          }
        }
      );
    }
    return React.cloneElement(DefaultButton, {
      onClick: (event) => {
        if (actionConfirmationMessage) {
          if (!confirm(actionConfirmationMessage)) {
            event.preventDefault();
            return false;
          }
        }
        setIsProcessing(true);
      }
    });
  };
  function useGlobalConfig() {
    const { globalConfig, setConfigValue } = reactExports.useContext(GlobalConfigContext);
    const appendToGlobalConfig = (key, objectToAppend) => {
      const existingItems = globalConfig[key] || [];
      setConfigValue(key, {
        ...existingItems,
        ...objectToAppend
      });
    };
    const getDownloadedItemId = (humaneId) => {
      return globalConfig.downloaded_items ? globalConfig.downloaded_items[humaneId] : null;
    };
    const addDownloadedItem = ({ humaneId, importedId }) => {
      appendToGlobalConfig("downloaded_items", { [humaneId]: importedId });
    };
    const removeDownloadedItem = ({ importedId }) => {
      const downloadedHumanmeIds = Object.keys(globalConfig.downloaded_items);
      downloadedHumanmeIds.forEach((humaneId) => {
        if (globalConfig.downloaded_items[humaneId] === importedId) {
          delete globalConfig.downloaded_items[humaneId];
        }
      });
    };
    const subscriptionStatus = globalConfig.subscription_status;
    const setSubscriptionStatus = (status2) => {
      setConfigValue("subscription_status", status2);
    };
    const bannerHasBeenDismissed = (bannerId) => {
      appendToGlobalConfig("dismissed_banners", { [bannerId]: true });
    };
    const isBannerDismissed = (bannerId) => {
      return globalConfig.dismissed_banners ? globalConfig.dismissed_banners[bannerId] : null;
    };
    const getConfigProjectName = () => {
      return globalConfig.project_name;
    };
    const setConfigProjectName = (projectName) => {
      setConfigValue("project_name", projectName);
    };
    const getMagicButtonMode = () => {
      return globalConfig.magicButtonMode;
    };
    const setMagicButtonMode = (mode) => {
      setConfigValue("magicButtonMode", mode);
    };
    const getElementsTokenUrl = () => {
      return globalConfig.elements_token_url;
    };
    const getApiUrl = () => {
      return globalConfig.api_url;
    };
    const getApiNonce = () => {
      return globalConfig.api_nonce;
    };
    const getStartPage = () => {
      return globalConfig.start_page;
    };
    const setStartPage = (startPage) => {
      setConfigValue("start_page", startPage);
    };
    return {
      // downloads:
      getDownloadedItemId,
      addDownloadedItem,
      removeDownloadedItem,
      // subscriptions:
      subscriptionStatus,
      setSubscriptionStatus,
      // banner management:
      bannerHasBeenDismissed,
      isBannerDismissed,
      // project name
      getConfigProjectName,
      setConfigProjectName,
      // magic button modes
      getMagicButtonMode,
      setMagicButtonMode,
      // elements token url helper:
      getElementsTokenUrl,
      // api url and nonce
      getApiUrl,
      getApiNonce,
      // start page
      getStartPage,
      setStartPage
    };
  }
  const Button = ({ type, label: label2, icon: icon2, onClick, disabled, dataTestId }) => {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonElement, { element: "button", type, onClick, disabled, dataTestId, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonIconAndLabel, { label: label2, icon: icon2 }) });
  };
  Button.propTypes = {
    type: PropTypes.string,
    label: PropTypes.string,
    icon: PropTypes.string,
    onClick: PropTypes.func,
    disabled: PropTypes.bool,
    dataTestId: PropTypes.string
  };
  Button.defaultProps = {
    type: "ghost",
    label: null,
    icon: null,
    onClick: null,
    disabled: false,
    dataTestId: null
  };
  const input$1 = "_input_ovyfn_8";
  const copy$1 = "_copy_ovyfn_33";
  const styles$p = {
    input: input$1,
    copy: copy$1
  };
  const ExtensionsToken = ({ trackingParams = {}, customActionHook = null, completedCallback = null }) => {
    const [token, setToken] = reactExports.useState("");
    const [error, setError] = reactExports.useState(null);
    const [saved, setSaved] = reactExports.useState(false);
    const { setSubscriptionStatus } = useGlobalConfig();
    reactExports.useEffect(() => {
      if (saved) {
        if (completedCallback) {
          completedCallback();
        }
      }
    }, [saved]);
    reactExports.useEffect(() => {
      setSaved(false);
      setError(null);
    }, [token]);
    const tokenIsCorrectLength = token.length === 36;
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      InputWithButton,
      {
        Input: /* @__PURE__ */ jsxRuntimeExports.jsx(
          "input",
          {
            type: "text",
            value: token,
            "data-testid": "token-input",
            onChange: (e) => {
              setToken(e.target.value);
            },
            className: `${styles$p.input} ${tokenIsCorrectLength ? styles$p.success : ""}`,
            spellCheck: "false",
            autoComplete: "false",
            placeholder: "Enter token here"
          }
        ),
        Button: /* @__PURE__ */ jsxRuntimeExports.jsx(
          ButtonActionProvider,
          {
            DefaultButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: tokenIsCorrectLength ? "primary" : "ghost", label: "Verify Token", icon: "arrow", dataTestId: "elements-token-submit" }),
            LoadingButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "ghost", label: "Verifying...", icon: "updateSpinning", disabled: true, dataTestId: "elements-token-submit" }),
            ErrorButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "warning", label: "Error", icon: "cross", disabled: true, dataTestId: "elements-token-submit" }),
            SuccessButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "ghost", label: "Success!", icon: "updateSpinning", disabled: true, dataTestId: "elements-token-submit" }),
            CompletedButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "ghost", label: "Success!", icon: "updateSpinning", disabled: true, dataTestId: "elements-token-submit" }),
            actionHook: customActionHook || (() => verifyExtensionsToken({ token })),
            isAlreadyCompleted: false,
            completedCallback: (data) => {
              if (data && data.status) {
                setSubscriptionStatus(data.status);
              }
              setSaved(true);
            },
            errorCallback: (data) => {
              setError(data && data.error ? data.error : {
                code: "unknown_error",
                message: "Sorry something went wrong, please try again."
              });
            }
          }
        ),
        instructions: /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: styles$p.copy, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: tokenUrl(), target: "_blank", rel: "noopener noreferrer", children: "Follow this link" }),
          " ",
          "to sign into Envato Elements and generate a token."
        ] }),
        errorMessage: error ? error.message : null
      }
    );
  };
  const Step2Token = ({ goToNextStep }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(MainHeading, { title: "Connect your Envato Elements subscription" }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: styles$r.copy, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: "Verify your Envato Elements Subscription" }),
      " ",
      /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
      "Enter your Token below to verify your Subscription:"
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(ExtensionsToken, { completedCallback: goToNextStep })
  ] });
  const setProjectName = async ({ projectName }) => {
    return await apiCall("setProjectName", "POST", { projectName });
  };
  const input = "_input_vthwb_8";
  const styles$o = {
    input
  };
  const ProjectButton = ({ text: text2, disabled = false, onClick = null }) => {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      Button,
      {
        type: "ghost",
        label: text2,
        icon: "arrow",
        disabled,
        onClick,
        dataTestId: "project-name-submit"
      }
    );
  };
  const ProjectName = ({ customActionHook = null, completedCallback = null }) => {
    const { getConfigProjectName, setConfigProjectName } = useGlobalConfig();
    const [stateProjectName, setStateProjectName] = reactExports.useState(getConfigProjectName());
    const [error, setError] = reactExports.useState(null);
    const [saved, setSaved] = reactExports.useState(false);
    reactExports.useEffect(() => {
      if (saved) {
        setConfigProjectName(stateProjectName);
        if (completedCallback) {
          completedCallback();
        }
      }
    }, [saved]);
    reactExports.useEffect(() => {
      setSaved(false);
      setError(null);
    }, [stateProjectName]);
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      InputWithButton,
      {
        Input: /* @__PURE__ */ jsxRuntimeExports.jsx(
          "input",
          {
            type: "text",
            value: stateProjectName,
            "data-testid": "project-name-input",
            onChange: (e) => {
              setStateProjectName(e.target.value);
            },
            className: styles$o.input,
            spellCheck: "false",
            autoComplete: "false",
            placeholder: "My New Project"
          }
        ),
        Button: /* @__PURE__ */ jsxRuntimeExports.jsx(
          ButtonActionProvider,
          {
            DefaultButton: /* @__PURE__ */ jsxRuntimeExports.jsx(ProjectButton, { text: "Update Project Name" }),
            LoadingButton: /* @__PURE__ */ jsxRuntimeExports.jsx(ProjectButton, { text: "Saving", disabled: true }),
            ErrorButton: /* @__PURE__ */ jsxRuntimeExports.jsx(ProjectButton, { text: "Error", disabled: true }),
            SuccessButton: /* @__PURE__ */ jsxRuntimeExports.jsx(ProjectButton, { text: "Success!", disabled: true }),
            CompletedButton: /* @__PURE__ */ jsxRuntimeExports.jsx(ProjectButton, { text: "Update Project Name" }),
            actionHook: customActionHook || (() => setProjectName({ projectName: stateProjectName })),
            isAlreadyCompleted: saved,
            completedCallback: (data) => {
              setSaved(true);
            },
            errorCallback: (data) => {
              setError(data && data.error ? data.error : {
                code: "unknown_error",
                message: "Sorry something went wrong, please try again."
              });
            }
          }
        ),
        instructions: null,
        errorMessage: error ? error.message : null
      }
    );
  };
  const Step3ProjectName = ({ goToNextStep }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      MainHeading,
      {
        title: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `dashicons dashicons-yes-alt ${styles$r.successIcon}` }),
          "Success"
        ] })
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles$r.copy, children: "Your Token has been verified" }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: styles$r.copy, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: "Your Project needs a name" }),
      " ",
      /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
      "All downloaded items will be licensed to this project name in Envato Elements:"
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(ProjectName, { completedCallback: goToNextStep })
  ] });
  const Step4Connected = ({ closeModal }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      MainHeading,
      {
        title: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: styles$r.connectedTitle, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: styles$r.envatoLogo, width: "25", height: "28", viewBox: "0 0 25 28", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M21.9598 1.18968C18.0589 -3.24393 5.45609 5.35184 5.54921 16.4308C5.54921 16.5668 5.49361 16.6972 5.39465 16.7934C5.29569 16.8896 5.16146 16.9436 5.02151 16.9436C4.92987 16.9428 4.83995 16.9193 4.76028 16.8753C4.6806 16.8314 4.61381 16.7683 4.56623 16.6922C3.83042 15.1412 3.44917 13.4537 3.44874 11.7459C3.46175 10.463 3.6853 9.1903 4.11096 7.97582C4.1447 7.8713 4.14084 7.75874 4.10002 7.65664C4.0592 7.55453 3.98384 7.46896 3.88632 7.41399C3.78881 7.35901 3.67496 7.33791 3.56346 7.35414C3.45197 7.37037 3.34948 7.42297 3.27283 7.5033C1.66754 9.1766 0.595346 11.2658 0.185822 13.5184C-0.223701 15.7711 0.046972 18.0908 0.965133 20.1972C1.88329 22.3035 3.40965 24.1065 5.35974 25.3881C7.30984 26.6698 9.60022 27.3753 11.9541 27.4194H12.2335C29.4098 27.0273 25.4365 5.15078 21.9598 1.18968Z" }) }),
          "Connected"
        ] })
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles$r.copy, children: "You're all connected and ready to start importing premium Template Kits & Photos." }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: closeModal, type: "primary", label: "Get Started", icon: "arrow", dataTestId: "complete-signup-wizard" })
  ] });
  const TokenProjectSignup = ({ onCloseCallback, showWelcomeMessaging = false }) => {
    const [currentStep, setCurrentStep] = reactExports.useState(showWelcomeMessaging ? 0 : 1);
    const goToNextStep = () => {
      setCurrentStep(currentStep + 1);
    };
    return /* @__PURE__ */ jsxRuntimeExports.jsx(ModalWrapper, { isOpen: true, onCloseCallback, children: ({ closeModal }) => {
      if (currentStep === 0) {
        return /* @__PURE__ */ jsxRuntimeExports.jsx(Step1Welcome, { goToNextStep });
      }
      if (currentStep === 1) {
        return /* @__PURE__ */ jsxRuntimeExports.jsx(Step2Token, { goToNextStep });
      }
      if (currentStep === 2) {
        return /* @__PURE__ */ jsxRuntimeExports.jsx(Step3ProjectName, { goToNextStep });
      }
      if (currentStep === 3) {
        return /* @__PURE__ */ jsxRuntimeExports.jsx(Step4Connected, { closeModal });
      }
    } });
  };
  const InternalLinkButton = ({ type, label: label2, icon: icon2, href }) => {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonElement, { element: "Link", to: href, type, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonIconAndLabel, { label: label2, icon: icon2 }) });
  };
  InternalLinkButton.propTypes = {
    type: PropTypes.string,
    label: PropTypes.string,
    icon: PropTypes.string,
    href: PropTypes.string.isRequired
  };
  InternalLinkButton.defaultProps = {
    type: "ghost",
    label: null,
    icon: null
  };
  const ExternalLink = ({ href, text: text2 = "Link" }) => /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href, target: "_blank", rel: "noopener noreferrer", children: text2 });
  function useAPIError() {
    const { errors: errors2, addError, removeError } = reactExports.useContext(APIErrorContext);
    return { errors: errors2, addError, removeError };
  }
  const resetUserSettings = () => {
    const [loading, setLoading] = reactExports.useState(false);
    const [data, setData] = reactExports.useState(null);
    const [error, setError] = reactExports.useState(null);
    const reset = async () => {
      try {
        setLoading(true);
        setError(null);
        const result = await apiCall("resetUserSettings", "POST");
        setData(result);
        setLoading(false);
      } catch (err) {
        setError(err.message);
        setLoading(false);
      }
    };
    return { loading, data, error, reset };
  };
  const ResetUserSettings = ({ customActionHook = null, completeCallback = null, errorCallback = null }) => {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      ButtonActionProvider,
      {
        actionConfirmationMessage: "Really reset all plugin settings and data?",
        DefaultButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "ghost", label: "Clear Cache & Reset Plugin", icon: "update" }),
        LoadingButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "ghost", label: "Resetting...", icon: "updateSpinning", disabled: true }),
        ErrorButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "ghost", label: "Something went wrong!", icon: "update", disabled: true }),
        SuccessButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "ghost", label: "Resetting...", icon: "updateSpinning", disabled: true }),
        CompletedButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "ghost", label: "Resetting...", icon: "updateSpinning" }),
        actionHook: () => customActionHook ? customActionHook() : resetUserSettings(),
        isAlreadyCompleted: false,
        completedCallback: () => {
          if (completeCallback) {
            completeCallback();
          }
          window.location.reload();
        },
        errorCallback
      }
    );
  };
  const debugWrapper = "_debugWrapper_1q962_8";
  const debugInformation = "_debugInformation_1q962_14";
  const debugText = "_debugText_1q962_18";
  const copy = "_copy_1q962_27";
  const styles$n = {
    debugWrapper,
    debugInformation,
    debugText,
    copy
  };
  const APIErrorDebugInformation = ({ error }) => {
    const [showDebugInformation, setShowDebugInformation] = reactExports.useState(false);
    return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$n.debugWrapper, children: [
      error.debug && showDebugInformation ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$n.debugInformation, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        "textarea",
        {
          className: styles$n.debugText,
          onClick: (e) => {
            e.target.focus();
            e.target.select();
          },
          defaultValue: typeof error.debug === "object" ? JSON.stringify(error.debug, null, "	") : error.debug
        }
      ) }) : null,
      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$n.debugActions, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs(ButtonWrapper, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button,
            {
              icon: "update",
              label: "Refresh Page",
              onClick: (e) => {
                e.preventDefault();
                window.location.reload();
                return false;
              }
            }
          ),
          error.debug ? /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button,
            {
              icon: "eye",
              label: showDebugInformation ? "Hide Debug Details" : "Show Debug Details",
              className: styles$n.buttonDebug,
              onClick: () => {
                setShowDebugInformation(!showDebugInformation);
              }
            }
          ) : null,
          /* @__PURE__ */ jsxRuntimeExports.jsx(ResetUserSettings, {})
        ] }),
        "If this error continues please contact ",
        /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: "mailto:extensions@envato.com", children: "extensions@envato.com" }),
        "."
      ] })
    ] });
  };
  const APIErrorMessage = () => {
    const { errors: errors2, removeError } = useAPIError();
    const shouldOpenErrorModal = errors2.length > 0;
    if (!shouldOpenErrorModal) {
      return null;
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: errors2.map((error) => {
      if (error.code === "invalid_subscription") {
        return /* @__PURE__ */ jsxRuntimeExports.jsx(TokenProjectSignup, { showWelcomeMessaging: true, onCloseCallback: () => {
          removeError(error);
        } }, error.code);
      }
      if (error.code === "zip_failure") {
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(ModalWrapper, { isOpen: true, onCloseCallback: () => {
          removeError(error);
        }, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(MainHeading, { title: "Template Kit Install Error" }),
          /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles$n.copy, children: "There was an issue installing this template kit. Please try again." }),
          error.message,
          /* @__PURE__ */ jsxRuntimeExports.jsx(APIErrorDebugInformation, { error })
        ] }, error.code);
      }
      if (error.code === "missing_permissions") {
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(ModalWrapper, { isOpen: true, onCloseCallback: () => {
          removeError(error);
        }, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(MainHeading, { title: "Error" }),
          /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles$n.copy, children: error.message }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(APIErrorDebugInformation, { error })
        ] }, error.code);
      }
      if (error.code === "generic_api_error") {
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(ModalWrapper, { isOpen: true, onCloseCallback: () => {
          removeError(error);
        }, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(MainHeading, { title: "Unexpected Error" }),
          /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles$n.copy, children: "Sorry there was an unexpected error from API call:" }),
          error.message,
          /* @__PURE__ */ jsxRuntimeExports.jsx(APIErrorDebugInformation, { error })
        ] }, error.code);
      }
      return null;
    }) });
  };
  const FirstPageRedirector = () => {
    const { getStartPage } = useGlobalConfig();
    const possibleStartPageRoutes = {
      welcome: "/welcome",
      "premium-kits": "/template-kits/premium-kits",
      "free-kits": "/template-kits/free-kits",
      "installed-kits": "/template-kits/installed-kits",
      photos: "/photos"
    };
    const preferredStartPage = getStartPage();
    if (possibleStartPageRoutes[preferredStartPage]) {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(Redirect, { to: possibleStartPageRoutes[preferredStartPage] });
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsx(Redirect, { to: "/welcome" });
  };
  const searchText = "_searchText_455nc_8";
  const searchTextInput = "_searchTextInput_455nc_14";
  const searchTextSubmit = "_searchTextSubmit_455nc_36";
  const styles$m = {
    searchText,
    searchTextInput,
    searchTextSubmit
  };
  const TextInput = ({ searchParams, placeholderText = "Search...", onSearchSubmitted }) => {
    const [searchText2, setSearchText] = reactExports.useState(searchParams.text || "");
    reactExports.useEffect(() => {
      setSearchText(searchParams.text || "");
    }, [searchParams]);
    return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$m.searchText, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
      "form",
      {
        onSubmit: (e) => {
          e.preventDefault();
          onSearchSubmitted({ text: searchText2 });
          return false;
        },
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            "input",
            {
              type: "text",
              value: searchText2,
              placeholder: placeholderText,
              "data-cy": "elements-search-text",
              onChange: (e) => {
                setSearchText(e.target.value);
              },
              className: styles$m.searchTextInput,
              style: { width: "100%" }
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            "button",
            {
              type: "submit",
              name: "go",
              className: `dashicons dashicons-search ${styles$m.searchTextSubmit}`,
              "data-cy": "elements-search-submit-licensed"
            }
          )
        ]
      }
    ) });
  };
  const filter = "_filter_1c7nm_8";
  const filterLabel = "_filterLabel_1c7nm_11";
  const filterAttributes = "_filterAttributes_1c7nm_17";
  const filterAttributesContent = "_filterAttributesContent_1c7nm_21";
  const filterAttributeCheckbox = "_filterAttributeCheckbox_1c7nm_104";
  const filterAttribute = "_filterAttribute_1c7nm_17";
  const filterAttributeActive = "_filterAttributeActive_1c7nm_199";
  const styles$l = {
    filter,
    filterLabel,
    filterAttributes,
    filterAttributesContent,
    filterAttributeCheckbox,
    "filterAttributeCheckbox--pink": "_filterAttributeCheckbox--pink_1c7nm_130",
    "filterAttributeCheckbox--red": "_filterAttributeCheckbox--red_1c7nm_133",
    "filterAttributeCheckbox--orange": "_filterAttributeCheckbox--orange_1c7nm_136",
    "filterAttributeCheckbox--yellow": "_filterAttributeCheckbox--yellow_1c7nm_139",
    "filterAttributeCheckbox--green": "_filterAttributeCheckbox--green_1c7nm_142",
    "filterAttributeCheckbox--teal": "_filterAttributeCheckbox--teal_1c7nm_145",
    "filterAttributeCheckbox--blue": "_filterAttributeCheckbox--blue_1c7nm_148",
    "filterAttributeCheckbox--purple": "_filterAttributeCheckbox--purple_1c7nm_151",
    "filterAttributeCheckbox--brown": "_filterAttributeCheckbox--brown_1c7nm_154",
    "filterAttributeCheckbox--black": "_filterAttributeCheckbox--black_1c7nm_157",
    "filterAttributeCheckbox--grey": "_filterAttributeCheckbox--grey_1c7nm_160",
    "filterAttributeCheckbox--white": "_filterAttributeCheckbox--white_1c7nm_163",
    filterAttribute,
    filterAttributeActive
  };
  const Filter = ({ label: label2, name, attributes, searchFilterChange, value, columns = 3, variant = "text", updateTitleWithCurrent = true }) => {
    value = decodeURIComponent(value);
    let filterLabel2 = label2;
    if (updateTitleWithCurrent) {
      attributes.filter((attribute) => {
        if (attribute.key && value === attribute.key) {
          filterLabel2 = attribute.value || attribute.key;
        }
        return false;
      });
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$l.filter, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$l.filterLabel, children: [
      filterLabel2,
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$l.filterAttributes, "data-columns": columns, "data-variant": variant, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$l.filterAttributesContent, children: attributes.map(
        (attribute) => attribute.key && attribute.key.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${styles$l.filterAttribute} ${value === attribute.key ? styles$l.filterAttributeActive : ""}`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { htmlFor: `filter${name}${attribute.key}`, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            "input",
            {
              type: "checkbox",
              className: `${styles$l.filterAttributeCheckbox} ${variant === "colors" ? styles$l[`filterAttributeCheckbox--${attribute.key.toLowerCase()}`] : ""}`,
              name: attribute.key,
              checked: value === attribute.key,
              "data-testid": `filter${name}${attribute.key}`,
              id: `filter${name}${attribute.key}`,
              onChange: (e) => {
                const newsearchArguments = {};
                newsearchArguments[name] = value === attribute.key ? "" : attribute.key;
                newsearchArguments.page = 1;
                searchFilterChange(newsearchArguments, true);
              }
            }
          ),
          attribute.value || attribute.key
        ] }) }, attribute.key) : null
      ) }) })
    ] }) });
  };
  var reactPaginate$1 = { exports: {} };
  var reactPaginate = reactPaginate$1.exports;
  var hasRequiredReactPaginate;
  function requireReactPaginate() {
    if (hasRequiredReactPaginate) return reactPaginate$1.exports;
    hasRequiredReactPaginate = 1;
    (function(module, exports) {
      !(function(e, a) {
        module.exports = a(requireReact());
      })(reactPaginate, (function(e) {
        return (function(e2) {
          var a = {};
          function t(r) {
            if (a[r]) return a[r].exports;
            var n = a[r] = { i: r, l: false, exports: {} };
            return e2[r].call(n.exports, n, n.exports, t), n.l = true, n.exports;
          }
          return t.m = e2, t.c = a, t.d = function(e3, a2, r) {
            t.o(e3, a2) || Object.defineProperty(e3, a2, { enumerable: true, get: r });
          }, t.r = function(e3) {
            "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e3, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e3, "__esModule", { value: true });
          }, t.t = function(e3, a2) {
            if (1 & a2 && (e3 = t(e3)), 8 & a2) return e3;
            if (4 & a2 && "object" == typeof e3 && e3 && e3.__esModule) return e3;
            var r = /* @__PURE__ */ Object.create(null);
            if (t.r(r), Object.defineProperty(r, "default", { enumerable: true, value: e3 }), 2 & a2 && "string" != typeof e3) for (var n in e3) t.d(r, n, (function(a3) {
              return e3[a3];
            }).bind(null, n));
            return r;
          }, t.n = function(e3) {
            var a2 = e3 && e3.__esModule ? function() {
              return e3.default;
            } : function() {
              return e3;
            };
            return t.d(a2, "a", a2), a2;
          }, t.o = function(e3, a2) {
            return Object.prototype.hasOwnProperty.call(e3, a2);
          }, t.p = "", t(t.s = 4);
        })([function(e2, a, t) {
          e2.exports = t(2)();
        }, function(a, t) {
          a.exports = e;
        }, function(e2, a, t) {
          var r = t(3);
          function n() {
          }
          function i() {
          }
          i.resetWarningCache = n, e2.exports = function() {
            function e3(e4, a3, t3, n2, i2, s) {
              if (s !== r) {
                var o = new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
                throw o.name = "Invariant Violation", o;
              }
            }
            function a2() {
              return e3;
            }
            e3.isRequired = e3;
            var t2 = { array: e3, bool: e3, func: e3, number: e3, object: e3, string: e3, symbol: e3, any: e3, arrayOf: a2, element: e3, elementType: e3, instanceOf: a2, node: e3, objectOf: a2, oneOf: a2, oneOfType: a2, shape: a2, exact: a2, checkPropTypes: i, resetWarningCache: n };
            return t2.PropTypes = t2, t2;
          };
        }, function(e2, a, t) {
          e2.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
        }, function(e2, a, t) {
          t.r(a);
          var r = t(1), n = t.n(r), i = t(0), s = t.n(i);
          function o() {
            return (o = Object.assign || function(e3) {
              for (var a2 = 1; a2 < arguments.length; a2++) {
                var t2 = arguments[a2];
                for (var r2 in t2) Object.prototype.hasOwnProperty.call(t2, r2) && (e3[r2] = t2[r2]);
              }
              return e3;
            }).apply(this, arguments);
          }
          var l = function(e3) {
            var a2 = e3.pageClassName, t2 = e3.pageLinkClassName, r2 = e3.page, i2 = e3.selected, s2 = e3.activeClassName, l2 = e3.activeLinkClassName, u2 = e3.getEventListener, c2 = e3.pageSelectedHandler, p2 = e3.href, f2 = e3.extraAriaContext, g2 = e3.pageLabelBuilder, d2 = e3.ariaLabel || "Page " + r2 + (f2 ? " " + f2 : ""), b2 = null;
            return i2 && (b2 = "page", d2 = e3.ariaLabel || "Page " + r2 + " is your current page", a2 = void 0 !== a2 ? a2 + " " + s2 : s2, void 0 !== t2 ? void 0 !== l2 && (t2 = t2 + " " + l2) : t2 = l2), n.a.createElement("li", { className: a2 }, n.a.createElement("a", o({ role: "button", className: t2, href: p2, tabIndex: "0", "aria-label": d2, "aria-current": b2, onKeyPress: c2 }, u2(c2)), g2(r2)));
          };
          l.propTypes = { pageSelectedHandler: s.a.func.isRequired, selected: s.a.bool.isRequired, pageClassName: s.a.string, pageLinkClassName: s.a.string, activeClassName: s.a.string, activeLinkClassName: s.a.string, extraAriaContext: s.a.string, href: s.a.string, ariaLabel: s.a.string, page: s.a.number.isRequired, getEventListener: s.a.func.isRequired, pageLabelBuilder: s.a.func.isRequired };
          var u = l;
          function c() {
            return (c = Object.assign || function(e3) {
              for (var a2 = 1; a2 < arguments.length; a2++) {
                var t2 = arguments[a2];
                for (var r2 in t2) Object.prototype.hasOwnProperty.call(t2, r2) && (e3[r2] = t2[r2]);
              }
              return e3;
            }).apply(this, arguments);
          }
          var p = function(e3) {
            var a2 = e3.breakLabel, t2 = e3.breakClassName, r2 = e3.breakLinkClassName, i2 = e3.breakHandler, s2 = e3.getEventListener, o2 = t2 || "break";
            return n.a.createElement("li", { className: o2 }, n.a.createElement("a", c({ className: r2, role: "button", tabIndex: "0", onKeyPress: i2 }, s2(i2)), a2));
          };
          p.propTypes = { breakLabel: s.a.oneOfType([s.a.string, s.a.node]), breakClassName: s.a.string, breakLinkClassName: s.a.string, breakHandler: s.a.func.isRequired, getEventListener: s.a.func.isRequired };
          var f = p;
          function g(e3) {
            return (g = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e4) {
              return typeof e4;
            } : function(e4) {
              return e4 && "function" == typeof Symbol && e4.constructor === Symbol && e4 !== Symbol.prototype ? "symbol" : typeof e4;
            })(e3);
          }
          function d() {
            return (d = Object.assign || function(e3) {
              for (var a2 = 1; a2 < arguments.length; a2++) {
                var t2 = arguments[a2];
                for (var r2 in t2) Object.prototype.hasOwnProperty.call(t2, r2) && (e3[r2] = t2[r2]);
              }
              return e3;
            }).apply(this, arguments);
          }
          function b(e3, a2) {
            for (var t2 = 0; t2 < a2.length; t2++) {
              var r2 = a2[t2];
              r2.enumerable = r2.enumerable || false, r2.configurable = true, "value" in r2 && (r2.writable = true), Object.defineProperty(e3, r2.key, r2);
            }
          }
          function v(e3, a2) {
            return (v = Object.setPrototypeOf || function(e4, a3) {
              return e4.__proto__ = a3, e4;
            })(e3, a2);
          }
          function m(e3) {
            var a2 = (function() {
              if ("undefined" == typeof Reflect || !Reflect.construct) return false;
              if (Reflect.construct.sham) return false;
              if ("function" == typeof Proxy) return true;
              try {
                return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {
                }))), true;
              } catch (e4) {
                return false;
              }
            })();
            return function() {
              var t2, r2 = C(e3);
              if (a2) {
                var n2 = C(this).constructor;
                t2 = Reflect.construct(r2, arguments, n2);
              } else t2 = r2.apply(this, arguments);
              return h(this, t2);
            };
          }
          function h(e3, a2) {
            if (a2 && ("object" === g(a2) || "function" == typeof a2)) return a2;
            if (void 0 !== a2) throw new TypeError("Derived constructors may only return object or undefined");
            return y(e3);
          }
          function y(e3) {
            if (void 0 === e3) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
            return e3;
          }
          function C(e3) {
            return (C = Object.setPrototypeOf ? Object.getPrototypeOf : function(e4) {
              return e4.__proto__ || Object.getPrototypeOf(e4);
            })(e3);
          }
          function P(e3, a2, t2) {
            return a2 in e3 ? Object.defineProperty(e3, a2, { value: t2, enumerable: true, configurable: true, writable: true }) : e3[a2] = t2, e3;
          }
          var k = (function(e3) {
            !(function(e4, a3) {
              if ("function" != typeof a3 && null !== a3) throw new TypeError("Super expression must either be null or a function");
              e4.prototype = Object.create(a3 && a3.prototype, { constructor: { value: e4, writable: true, configurable: true } }), a3 && v(e4, a3);
            })(s2, e3);
            var a2, t2, i2 = m(s2);
            function s2(e4) {
              var a3, t3;
              return (function(e5, a4) {
                if (!(e5 instanceof a4)) throw new TypeError("Cannot call a class as a function");
              })(this, s2), P(y(a3 = i2.call(this, e4)), "handlePreviousPage", (function(e5) {
                var t4 = a3.state.selected;
                e5.preventDefault ? e5.preventDefault() : e5.returnValue = false, t4 > 0 && a3.handlePageSelected(t4 - 1, e5);
              })), P(y(a3), "handleNextPage", (function(e5) {
                var t4 = a3.state.selected, r2 = a3.props.pageCount;
                e5.preventDefault ? e5.preventDefault() : e5.returnValue = false, t4 < r2 - 1 && a3.handlePageSelected(t4 + 1, e5);
              })), P(y(a3), "handlePageSelected", (function(e5, t4) {
                t4.preventDefault ? t4.preventDefault() : t4.returnValue = false, a3.state.selected !== e5 ? (a3.setState({ selected: e5 }), a3.callCallback(e5)) : a3.callActiveCallback(e5);
              })), P(y(a3), "getEventListener", (function(e5) {
                return P({}, a3.props.eventListener, e5);
              })), P(y(a3), "handleBreakClick", (function(e5, t4) {
                t4.preventDefault ? t4.preventDefault() : t4.returnValue = false;
                var r2 = a3.state.selected;
                a3.handlePageSelected(r2 < e5 ? a3.getForwardJump() : a3.getBackwardJump(), t4);
              })), P(y(a3), "callCallback", (function(e5) {
                void 0 !== a3.props.onPageChange && "function" == typeof a3.props.onPageChange && a3.props.onPageChange({ selected: e5 });
              })), P(y(a3), "callActiveCallback", (function(e5) {
                void 0 !== a3.props.onPageActive && "function" == typeof a3.props.onPageActive && a3.props.onPageActive({ selected: e5 });
              })), P(y(a3), "pagination", (function() {
                var e5 = [], t4 = a3.props, r2 = t4.pageRangeDisplayed, i3 = t4.pageCount, s3 = t4.marginPagesDisplayed, o2 = t4.breakLabel, l2 = t4.breakClassName, u2 = t4.breakLinkClassName, c2 = a3.state.selected;
                if (i3 <= r2) for (var p2 = 0; p2 < i3; p2++) e5.push(a3.getPageElement(p2));
                else {
                  var g2, d2, b2, v2 = r2 / 2, m2 = r2 - v2;
                  c2 > i3 - r2 / 2 ? v2 = r2 - (m2 = i3 - c2) : c2 < r2 / 2 && (m2 = r2 - (v2 = c2));
                  var h2 = function(e6) {
                    return a3.getPageElement(e6);
                  };
                  for (g2 = 0; g2 < i3; g2++) (d2 = g2 + 1) <= s3 || d2 > i3 - s3 || g2 >= c2 - v2 && g2 <= c2 + m2 ? e5.push(h2(g2)) : o2 && e5[e5.length - 1] !== b2 && (b2 = n.a.createElement(f, { key: g2, breakLabel: o2, breakClassName: l2, breakLinkClassName: u2, breakHandler: a3.handleBreakClick.bind(null, g2), getEventListener: a3.getEventListener }), e5.push(b2));
                }
                return e5;
              })), void 0 !== e4.initialPage && void 0 !== e4.forcePage && console.warn("(react-paginate): Both initialPage (".concat(e4.initialPage, ") and forcePage (").concat(e4.forcePage, ") props are provided, which is discouraged.") + " Use exclusively forcePage prop for a controlled component.\nSee https://reactjs.org/docs/forms.html#controlled-components"), t3 = e4.initialPage ? e4.initialPage : e4.forcePage ? e4.forcePage : 0, a3.state = { selected: t3 }, a3;
            }
            return a2 = s2, (t2 = [{ key: "componentDidMount", value: function() {
              var e4 = this.props, a3 = e4.initialPage, t3 = e4.disableInitialCallback, r2 = e4.extraAriaContext, n2 = e4.pageCount;
              void 0 === a3 || t3 || this.callCallback(a3), r2 && console.warn("DEPRECATED (react-paginate): The extraAriaContext prop is deprecated. You should now use the ariaLabelBuilder instead."), Number.isInteger(n2) || console.warn("(react-paginate): The pageCount prop value provided is not an integer (".concat(this.props.pageCount, "). Did you forget a Math.ceil()?"));
            } }, { key: "componentDidUpdate", value: function(e4) {
              void 0 !== this.props.forcePage && this.props.forcePage !== e4.forcePage && this.setState({ selected: this.props.forcePage }), Number.isInteger(e4.pageCount) && !Number.isInteger(this.props.pageCount) && console.warn("(react-paginate): The pageCount prop value provided is not an integer (".concat(this.props.pageCount, "). Did you forget a Math.ceil()?"));
            } }, { key: "getForwardJump", value: function() {
              var e4 = this.state.selected, a3 = this.props, t3 = a3.pageCount, r2 = e4 + a3.pageRangeDisplayed;
              return r2 >= t3 ? t3 - 1 : r2;
            } }, { key: "getBackwardJump", value: function() {
              var e4 = this.state.selected - this.props.pageRangeDisplayed;
              return e4 < 0 ? 0 : e4;
            } }, { key: "hrefBuilder", value: function(e4) {
              var a3 = this.props, t3 = a3.hrefBuilder, r2 = a3.pageCount;
              if (t3 && e4 !== this.state.selected && e4 >= 0 && e4 < r2) return t3(e4 + 1);
            } }, { key: "ariaLabelBuilder", value: function(e4) {
              var a3 = e4 === this.state.selected;
              if (this.props.ariaLabelBuilder && e4 >= 0 && e4 < this.props.pageCount) {
                var t3 = this.props.ariaLabelBuilder(e4 + 1, a3);
                return this.props.extraAriaContext && !a3 && (t3 = t3 + " " + this.props.extraAriaContext), t3;
              }
            } }, { key: "getPageElement", value: function(e4) {
              var a3 = this.state.selected, t3 = this.props, r2 = t3.pageClassName, i3 = t3.pageLinkClassName, s3 = t3.activeClassName, o2 = t3.activeLinkClassName, l2 = t3.extraAriaContext, c2 = t3.pageLabelBuilder;
              return n.a.createElement(u, { key: e4, pageSelectedHandler: this.handlePageSelected.bind(null, e4), selected: a3 === e4, pageClassName: r2, pageLinkClassName: i3, activeClassName: s3, activeLinkClassName: o2, extraAriaContext: l2, href: this.hrefBuilder(e4), ariaLabel: this.ariaLabelBuilder(e4), page: e4 + 1, pageLabelBuilder: c2, getEventListener: this.getEventListener });
            } }, { key: "render", value: function() {
              var e4 = this.props.renderOnZeroPageCount;
              if (0 === this.props.pageCount && void 0 !== e4) return e4 ? e4(this.props) : e4;
              var a3 = this.props, t3 = a3.disabledClassName, r2 = a3.pageCount, i3 = a3.className, s3 = a3.containerClassName, o2 = a3.previousLabel, l2 = a3.previousClassName, u2 = a3.previousLinkClassName, c2 = a3.previousAriaLabel, p2 = a3.prevRel, f2 = a3.nextLabel, g2 = a3.nextClassName, b2 = a3.nextLinkClassName, v2 = a3.nextAriaLabel, m2 = a3.nextRel, h2 = this.state.selected, y2 = l2 + (0 === h2 ? " ".concat(t3) : ""), C2 = g2 + (h2 === r2 - 1 ? " ".concat(t3) : ""), P2 = 0 === h2 ? "true" : "false", k2 = h2 === r2 - 1 ? "true" : "false";
              return n.a.createElement("ul", { className: i3 || s3 }, n.a.createElement("li", { className: y2 }, n.a.createElement("a", d({ className: u2, href: this.hrefBuilder(h2 - 1), tabIndex: "0", role: "button", onKeyPress: this.handlePreviousPage, "aria-disabled": P2, "aria-label": c2, rel: p2 }, this.getEventListener(this.handlePreviousPage)), o2)), this.pagination(), n.a.createElement("li", { className: C2 }, n.a.createElement("a", d({ className: b2, href: this.hrefBuilder(h2 + 1), tabIndex: "0", role: "button", onKeyPress: this.handleNextPage, "aria-disabled": k2, "aria-label": v2, rel: m2 }, this.getEventListener(this.handleNextPage)), f2)));
            } }]) && b(a2.prototype, t2), s2;
          })(r.Component);
          P(k, "propTypes", { pageCount: s.a.number.isRequired, pageRangeDisplayed: s.a.number.isRequired, marginPagesDisplayed: s.a.number.isRequired, previousLabel: s.a.node, previousAriaLabel: s.a.string, prevRel: s.a.string, nextLabel: s.a.node, nextAriaLabel: s.a.string, nextRel: s.a.string, breakLabel: s.a.oneOfType([s.a.string, s.a.node]), hrefBuilder: s.a.func, onPageChange: s.a.func, onPageActive: s.a.func, initialPage: s.a.number, forcePage: s.a.number, disableInitialCallback: s.a.bool, containerClassName: s.a.string, className: s.a.string, pageClassName: s.a.string, pageLinkClassName: s.a.string, pageLabelBuilder: s.a.func, activeClassName: s.a.string, activeLinkClassName: s.a.string, previousClassName: s.a.string, nextClassName: s.a.string, previousLinkClassName: s.a.string, nextLinkClassName: s.a.string, disabledClassName: s.a.string, breakClassName: s.a.string, breakLinkClassName: s.a.string, extraAriaContext: s.a.string, ariaLabelBuilder: s.a.func, eventListener: s.a.string, renderOnZeroPageCount: s.a.func }), P(k, "defaultProps", { pageCount: 10, pageRangeDisplayed: 2, marginPagesDisplayed: 3, activeClassName: "selected", previousLabel: "Previous", previousClassName: "previous", previousAriaLabel: "Previous page", prevRel: "prev", nextLabel: "Next", nextClassName: "next", nextAriaLabel: "Next page", nextRel: "next", breakLabel: "...", disabledClassName: "disabled", disableInitialCallback: false, pageLabelBuilder: function(e3) {
            return e3;
          }, eventListener: "onClick", renderOnZeroPageCount: void 0 });
          a.default = k;
        }]);
      }));
    })(reactPaginate$1);
    return reactPaginate$1.exports;
  }
  var reactPaginateExports = requireReactPaginate();
  const ReactPaginate = /* @__PURE__ */ getDefaultExportFromCjs(reactPaginateExports);
  const pagination = "_pagination_clge9_1";
  const paginationActive = "_paginationActive_clge9_29";
  const paginationDisabled = "_paginationDisabled_clge9_37";
  const previous = "_previous_clge9_44";
  const next = "_next_clge9_45";
  const styles$k = {
    pagination,
    paginationActive,
    paginationDisabled,
    previous,
    next
  };
  const Pagination = ({ currentPage, totalHits, perPage, searchParams, onSearchSubmitted }) => {
    return currentPage && totalHits && perPage && totalHits > perPage ? /* @__PURE__ */ jsxRuntimeExports.jsx(
      ReactPaginate,
      {
        previousLabel: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `dashicons dashicons-arrow-left-alt2 ${styles$k.previous}` }),
        nextLabel: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `dashicons dashicons-arrow-right-alt2 ${styles$k.next}` }),
        breakLabel: "...",
        breakClassName: "break-me",
        pageCount: Math.min(40, Math.ceil(totalHits / perPage)),
        marginPagesDisplayed: 2,
        pageRangeDisplayed: 5,
        forcePage: parseInt(currentPage, 10) - 1,
        onPageChange: (data) => {
          window.scrollTo(0, 0);
          onSearchSubmitted({ ...searchParams, page: data.selected + 1 });
        },
        containerClassName: styles$k.pagination,
        activeClassName: styles$k.paginationActive,
        disabledClassName: styles$k.paginationDisabled
      }
    ) : null;
  };
  const wrapper$3 = "_wrapper_lvsav_1";
  const inner$2 = "_inner_lvsav_5";
  const cardSpacing = "_cardSpacing_lvsav_15";
  const styles$j = {
    wrapper: wrapper$3,
    inner: inner$2,
    cardSpacing
  };
  const GridWrapper = ({ children, includeLastItemSpacer = false }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$j.wrapper, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$j.inner, children: [
    children,
    includeLastItemSpacer ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$j.cardSpacing }) : null
  ] }) });
  const item = "_item_1fr49_8";
  const widthTwenty = "_widthTwenty_1fr49_22";
  const widthTwentyFive = "_widthTwentyFive_1fr49_26";
  const widthThirtyThree = "_widthThirtyThree_1fr49_30";
  const widthFourty = "_widthFourty_1fr49_34";
  const widthFifty = "_widthFifty_1fr49_38";
  const widthSixty = "_widthSixty_1fr49_42";
  const widthFull = "_widthFull_1fr49_46";
  const styles$i = {
    item,
    widthTwenty,
    widthTwentyFive,
    widthThirtyThree,
    widthFourty,
    widthFifty,
    widthSixty,
    widthFull
  };
  const GridItem = ({ colWidthPercentage = 20, children, className, ...rest }) => {
    const gridItemClasses = [styles$i.item];
    if (colWidthPercentage === 20) {
      gridItemClasses.push(styles$i.widthTwenty);
    }
    if (colWidthPercentage === 25) {
      gridItemClasses.push(styles$i.widthTwentyFive);
    }
    if (colWidthPercentage === 33) {
      gridItemClasses.push(styles$i.widthThirtyThree);
    }
    if (colWidthPercentage === 40) {
      gridItemClasses.push(styles$i.widthFourty);
    }
    if (colWidthPercentage === 50) {
      gridItemClasses.push(styles$i.widthFifty);
    }
    if (colWidthPercentage === 60) {
      gridItemClasses.push(styles$i.widthSixty);
    }
    if (colWidthPercentage === 100) {
      gridItemClasses.push(styles$i.widthFull);
    }
    if (className) {
      gridItemClasses.push(className);
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: gridItemClasses.join(" "), ...rest, children });
  };
  const wrapper$2 = "_wrapper_9isnm_8";
  const inner$1 = "_inner_9isnm_27";
  const images = "_images_9isnm_39";
  const meta = "_meta_9isnm_45";
  const cardTitle = "_cardTitle_9isnm_50";
  const cardDescription = "_cardDescription_9isnm_64";
  const styles$h = {
    wrapper: wrapper$2,
    inner: inner$1,
    images,
    meta,
    cardTitle,
    cardDescription
  };
  const ItemCard = ({ Images, Buttons, title: title2, description }) => {
    return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$h.wrapper, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$h.inner, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$h.images, children: Images }),
      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$h.meta, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: styles$h.cardTitle, children: title2 }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles$h.cardDescription, children: description }),
        Buttons
      ] })
    ] }) });
  };
  var lib = {};
  var slider = {};
  var innerSlider = {};
  var initialState = {};
  var hasRequiredInitialState;
  function requireInitialState() {
    if (hasRequiredInitialState) return initialState;
    hasRequiredInitialState = 1;
    (function(exports) {
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      exports["default"] = void 0;
      var initialState2 = {
        animating: false,
        autoplaying: null,
        currentDirection: 0,
        currentLeft: null,
        currentSlide: 0,
        direction: 1,
        dragging: false,
        edgeDragged: false,
        initialized: false,
        lazyLoadedList: [],
        listHeight: null,
        listWidth: null,
        scrolling: false,
        slideCount: null,
        slideHeight: null,
        slideWidth: null,
        swipeLeft: null,
        swiped: false,
        // used by swipeEvent. differentites between touch and swipe.
        swiping: false,
        touchObject: {
          startX: 0,
          startY: 0,
          curX: 0,
          curY: 0
        },
        trackStyle: {},
        trackWidth: 0,
        targetSlide: 0
      };
      var _default = initialState2;
      exports["default"] = _default;
    })(initialState);
    return initialState;
  }
  var lodash_debounce;
  var hasRequiredLodash_debounce;
  function requireLodash_debounce() {
    if (hasRequiredLodash_debounce) return lodash_debounce;
    hasRequiredLodash_debounce = 1;
    var FUNC_ERROR_TEXT = "Expected a function";
    var NAN = 0 / 0;
    var symbolTag = "[object Symbol]";
    var reTrim = /^\s+|\s+$/g;
    var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
    var reIsBinary = /^0b[01]+$/i;
    var reIsOctal = /^0o[0-7]+$/i;
    var freeParseInt = parseInt;
    var freeGlobal = typeof commonjsGlobal$1 == "object" && commonjsGlobal$1 && commonjsGlobal$1.Object === Object && commonjsGlobal$1;
    var freeSelf = typeof self == "object" && self && self.Object === Object && self;
    var root = freeGlobal || freeSelf || Function("return this")();
    var objectProto = Object.prototype;
    var objectToString = objectProto.toString;
    var nativeMax = Math.max, nativeMin = Math.min;
    var now = function() {
      return root.Date.now();
    };
    function debounce(func, wait, options) {
      var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
      if (typeof func != "function") {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      wait = toNumber(wait) || 0;
      if (isObject(options)) {
        leading = !!options.leading;
        maxing = "maxWait" in options;
        maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
        trailing = "trailing" in options ? !!options.trailing : trailing;
      }
      function invokeFunc(time) {
        var args = lastArgs, thisArg = lastThis;
        lastArgs = lastThis = void 0;
        lastInvokeTime = time;
        result = func.apply(thisArg, args);
        return result;
      }
      function leadingEdge(time) {
        lastInvokeTime = time;
        timerId = setTimeout(timerExpired, wait);
        return leading ? invokeFunc(time) : result;
      }
      function remainingWait(time) {
        var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, result2 = wait - timeSinceLastCall;
        return maxing ? nativeMin(result2, maxWait - timeSinceLastInvoke) : result2;
      }
      function shouldInvoke(time) {
        var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
        return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
      }
      function timerExpired() {
        var time = now();
        if (shouldInvoke(time)) {
          return trailingEdge(time);
        }
        timerId = setTimeout(timerExpired, remainingWait(time));
      }
      function trailingEdge(time) {
        timerId = void 0;
        if (trailing && lastArgs) {
          return invokeFunc(time);
        }
        lastArgs = lastThis = void 0;
        return result;
      }
      function cancel() {
        if (timerId !== void 0) {
          clearTimeout(timerId);
        }
        lastInvokeTime = 0;
        lastArgs = lastCallTime = lastThis = timerId = void 0;
      }
      function flush() {
        return timerId === void 0 ? result : trailingEdge(now());
      }
      function debounced() {
        var time = now(), isInvoking = shouldInvoke(time);
        lastArgs = arguments;
        lastThis = this;
        lastCallTime = time;
        if (isInvoking) {
          if (timerId === void 0) {
            return leadingEdge(lastCallTime);
          }
          if (maxing) {
            timerId = setTimeout(timerExpired, wait);
            return invokeFunc(lastCallTime);
          }
        }
        if (timerId === void 0) {
          timerId = setTimeout(timerExpired, wait);
        }
        return result;
      }
      debounced.cancel = cancel;
      debounced.flush = flush;
      return debounced;
    }
    function isObject(value) {
      var type = typeof value;
      return !!value && (type == "object" || type == "function");
    }
    function isObjectLike(value) {
      return !!value && typeof value == "object";
    }
    function isSymbol(value) {
      return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
    }
    function toNumber(value) {
      if (typeof value == "number") {
        return value;
      }
      if (isSymbol(value)) {
        return NAN;
      }
      if (isObject(value)) {
        var other = typeof value.valueOf == "function" ? value.valueOf() : value;
        value = isObject(other) ? other + "" : other;
      }
      if (typeof value != "string") {
        return value === 0 ? value : +value;
      }
      value = value.replace(reTrim, "");
      var isBinary = reIsBinary.test(value);
      return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
    }
    lodash_debounce = debounce;
    return lodash_debounce;
  }
  var classnames = { exports: {} };
  /*!
  	Copyright (c) 2018 Jed Watson.
  	Licensed under the MIT License (MIT), see
  	http://jedwatson.github.io/classnames
  */
  var hasRequiredClassnames;
  function requireClassnames() {
    if (hasRequiredClassnames) return classnames.exports;
    hasRequiredClassnames = 1;
    (function(module) {
      (function() {
        var hasOwn = {}.hasOwnProperty;
        function classNames() {
          var classes = "";
          for (var i = 0; i < arguments.length; i++) {
            var arg = arguments[i];
            if (arg) {
              classes = appendClass(classes, parseValue(arg));
            }
          }
          return classes;
        }
        function parseValue(arg) {
          if (typeof arg === "string" || typeof arg === "number") {
            return arg;
          }
          if (typeof arg !== "object") {
            return "";
          }
          if (Array.isArray(arg)) {
            return classNames.apply(null, arg);
          }
          if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
            return arg.toString();
          }
          var classes = "";
          for (var key in arg) {
            if (hasOwn.call(arg, key) && arg[key]) {
              classes = appendClass(classes, key);
            }
          }
          return classes;
        }
        function appendClass(value, newClass) {
          if (!newClass) {
            return value;
          }
          if (value) {
            return value + " " + newClass;
          }
          return value + newClass;
        }
        if (module.exports) {
          classNames.default = classNames;
          module.exports = classNames;
        } else {
          window.classNames = classNames;
        }
      })();
    })(classnames);
    return classnames.exports;
  }
  var innerSliderUtils = {};
  var hasRequiredInnerSliderUtils;
  function requireInnerSliderUtils() {
    if (hasRequiredInnerSliderUtils) return innerSliderUtils;
    hasRequiredInnerSliderUtils = 1;
    Object.defineProperty(innerSliderUtils, "__esModule", {
      value: true
    });
    innerSliderUtils.clamp = clamp2;
    innerSliderUtils.canUseDOM = innerSliderUtils.slidesOnLeft = innerSliderUtils.slidesOnRight = innerSliderUtils.siblingDirection = innerSliderUtils.getTotalSlides = innerSliderUtils.getPostClones = innerSliderUtils.getPreClones = innerSliderUtils.getTrackLeft = innerSliderUtils.getTrackAnimateCSS = innerSliderUtils.getTrackCSS = innerSliderUtils.checkSpecKeys = innerSliderUtils.getSlideCount = innerSliderUtils.checkNavigable = innerSliderUtils.getNavigableIndexes = innerSliderUtils.swipeEnd = innerSliderUtils.swipeMove = innerSliderUtils.swipeStart = innerSliderUtils.keyHandler = innerSliderUtils.changeSlide = innerSliderUtils.slideHandler = innerSliderUtils.initializedState = innerSliderUtils.extractObject = innerSliderUtils.canGoNext = innerSliderUtils.getSwipeDirection = innerSliderUtils.getHeight = innerSliderUtils.getWidth = innerSliderUtils.lazySlidesOnRight = innerSliderUtils.lazySlidesOnLeft = innerSliderUtils.lazyEndIndex = innerSliderUtils.lazyStartIndex = innerSliderUtils.getRequiredLazySlides = innerSliderUtils.getOnDemandLazySlides = innerSliderUtils.safePreventDefault = void 0;
    var _react = _interopRequireDefault(requireReact());
    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { "default": obj };
    }
    function ownKeys(object, enumerableOnly) {
      var keys = Object.keys(object);
      if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        if (enumerableOnly) symbols = symbols.filter(function(sym) {
          return Object.getOwnPropertyDescriptor(object, sym).enumerable;
        });
        keys.push.apply(keys, symbols);
      }
      return keys;
    }
    function _objectSpread(target) {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i] != null ? arguments[i] : {};
        if (i % 2) {
          ownKeys(Object(source), true).forEach(function(key) {
            _defineProperty(target, key, source[key]);
          });
        } else if (Object.getOwnPropertyDescriptors) {
          Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
        } else {
          ownKeys(Object(source)).forEach(function(key) {
            Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
          });
        }
      }
      return target;
    }
    function _defineProperty(obj, key, value) {
      if (key in obj) {
        Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key] = value;
      }
      return obj;
    }
    function clamp2(number, lowerBound, upperBound) {
      return Math.max(lowerBound, Math.min(number, upperBound));
    }
    var safePreventDefault = function safePreventDefault2(event) {
      var passiveEvents = ["onTouchStart", "onTouchMove", "onWheel"];
      if (!passiveEvents.includes(event._reactName)) {
        event.preventDefault();
      }
    };
    innerSliderUtils.safePreventDefault = safePreventDefault;
    var getOnDemandLazySlides = function getOnDemandLazySlides2(spec) {
      var onDemandSlides = [];
      var startIndex = lazyStartIndex(spec);
      var endIndex = lazyEndIndex(spec);
      for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {
        if (spec.lazyLoadedList.indexOf(slideIndex) < 0) {
          onDemandSlides.push(slideIndex);
        }
      }
      return onDemandSlides;
    };
    innerSliderUtils.getOnDemandLazySlides = getOnDemandLazySlides;
    var getRequiredLazySlides = function getRequiredLazySlides2(spec) {
      var requiredSlides = [];
      var startIndex = lazyStartIndex(spec);
      var endIndex = lazyEndIndex(spec);
      for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {
        requiredSlides.push(slideIndex);
      }
      return requiredSlides;
    };
    innerSliderUtils.getRequiredLazySlides = getRequiredLazySlides;
    var lazyStartIndex = function lazyStartIndex2(spec) {
      return spec.currentSlide - lazySlidesOnLeft(spec);
    };
    innerSliderUtils.lazyStartIndex = lazyStartIndex;
    var lazyEndIndex = function lazyEndIndex2(spec) {
      return spec.currentSlide + lazySlidesOnRight(spec);
    };
    innerSliderUtils.lazyEndIndex = lazyEndIndex;
    var lazySlidesOnLeft = function lazySlidesOnLeft2(spec) {
      return spec.centerMode ? Math.floor(spec.slidesToShow / 2) + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : 0;
    };
    innerSliderUtils.lazySlidesOnLeft = lazySlidesOnLeft;
    var lazySlidesOnRight = function lazySlidesOnRight2(spec) {
      return spec.centerMode ? Math.floor((spec.slidesToShow - 1) / 2) + 1 + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : spec.slidesToShow;
    };
    innerSliderUtils.lazySlidesOnRight = lazySlidesOnRight;
    var getWidth = function getWidth2(elem) {
      return elem && elem.offsetWidth || 0;
    };
    innerSliderUtils.getWidth = getWidth;
    var getHeight = function getHeight2(elem) {
      return elem && elem.offsetHeight || 0;
    };
    innerSliderUtils.getHeight = getHeight;
    var getSwipeDirection = function getSwipeDirection2(touchObject) {
      var verticalSwiping = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
      var xDist, yDist, r, swipeAngle;
      xDist = touchObject.startX - touchObject.curX;
      yDist = touchObject.startY - touchObject.curY;
      r = Math.atan2(yDist, xDist);
      swipeAngle = Math.round(r * 180 / Math.PI);
      if (swipeAngle < 0) {
        swipeAngle = 360 - Math.abs(swipeAngle);
      }
      if (swipeAngle <= 45 && swipeAngle >= 0 || swipeAngle <= 360 && swipeAngle >= 315) {
        return "left";
      }
      if (swipeAngle >= 135 && swipeAngle <= 225) {
        return "right";
      }
      if (verticalSwiping === true) {
        if (swipeAngle >= 35 && swipeAngle <= 135) {
          return "up";
        } else {
          return "down";
        }
      }
      return "vertical";
    };
    innerSliderUtils.getSwipeDirection = getSwipeDirection;
    var canGoNext = function canGoNext2(spec) {
      var canGo = true;
      if (!spec.infinite) {
        if (spec.centerMode && spec.currentSlide >= spec.slideCount - 1) {
          canGo = false;
        } else if (spec.slideCount <= spec.slidesToShow || spec.currentSlide >= spec.slideCount - spec.slidesToShow) {
          canGo = false;
        }
      }
      return canGo;
    };
    innerSliderUtils.canGoNext = canGoNext;
    var extractObject = function extractObject2(spec, keys) {
      var newObject = {};
      keys.forEach(function(key) {
        return newObject[key] = spec[key];
      });
      return newObject;
    };
    innerSliderUtils.extractObject = extractObject;
    var initializedState = function initializedState2(spec) {
      var slideCount = _react["default"].Children.count(spec.children);
      var listNode = spec.listRef;
      var listWidth = Math.ceil(getWidth(listNode));
      var trackNode = spec.trackRef && spec.trackRef.node;
      var trackWidth = Math.ceil(getWidth(trackNode));
      var slideWidth;
      if (!spec.vertical) {
        var centerPaddingAdj = spec.centerMode && parseInt(spec.centerPadding) * 2;
        if (typeof spec.centerPadding === "string" && spec.centerPadding.slice(-1) === "%") {
          centerPaddingAdj *= listWidth / 100;
        }
        slideWidth = Math.ceil((listWidth - centerPaddingAdj) / spec.slidesToShow);
      } else {
        slideWidth = listWidth;
      }
      var slideHeight = listNode && getHeight(listNode.querySelector('[data-index="0"]'));
      var listHeight = slideHeight * spec.slidesToShow;
      var currentSlide = spec.currentSlide === void 0 ? spec.initialSlide : spec.currentSlide;
      if (spec.rtl && spec.currentSlide === void 0) {
        currentSlide = slideCount - 1 - spec.initialSlide;
      }
      var lazyLoadedList = spec.lazyLoadedList || [];
      var slidesToLoad = getOnDemandLazySlides(_objectSpread(_objectSpread({}, spec), {}, {
        currentSlide,
        lazyLoadedList
      }));
      lazyLoadedList = lazyLoadedList.concat(slidesToLoad);
      var state = {
        slideCount,
        slideWidth,
        listWidth,
        trackWidth,
        currentSlide,
        slideHeight,
        listHeight,
        lazyLoadedList
      };
      if (spec.autoplaying === null && spec.autoplay) {
        state["autoplaying"] = "playing";
      }
      return state;
    };
    innerSliderUtils.initializedState = initializedState;
    var slideHandler = function slideHandler2(spec) {
      var waitForAnimate = spec.waitForAnimate, animating = spec.animating, fade = spec.fade, infinite = spec.infinite, index2 = spec.index, slideCount = spec.slideCount, lazyLoad = spec.lazyLoad, currentSlide = spec.currentSlide, centerMode = spec.centerMode, slidesToScroll = spec.slidesToScroll, slidesToShow = spec.slidesToShow, useCSS = spec.useCSS;
      var lazyLoadedList = spec.lazyLoadedList;
      if (waitForAnimate && animating) return {};
      var animationSlide = index2, finalSlide, animationLeft, finalLeft;
      var state = {}, nextState = {};
      var targetSlide = infinite ? index2 : clamp2(index2, 0, slideCount - 1);
      if (fade) {
        if (!infinite && (index2 < 0 || index2 >= slideCount)) return {};
        if (index2 < 0) {
          animationSlide = index2 + slideCount;
        } else if (index2 >= slideCount) {
          animationSlide = index2 - slideCount;
        }
        if (lazyLoad && lazyLoadedList.indexOf(animationSlide) < 0) {
          lazyLoadedList = lazyLoadedList.concat(animationSlide);
        }
        state = {
          animating: true,
          currentSlide: animationSlide,
          lazyLoadedList,
          targetSlide: animationSlide
        };
        nextState = {
          animating: false,
          targetSlide: animationSlide
        };
      } else {
        finalSlide = animationSlide;
        if (animationSlide < 0) {
          finalSlide = animationSlide + slideCount;
          if (!infinite) finalSlide = 0;
          else if (slideCount % slidesToScroll !== 0) finalSlide = slideCount - slideCount % slidesToScroll;
        } else if (!canGoNext(spec) && animationSlide > currentSlide) {
          animationSlide = finalSlide = currentSlide;
        } else if (centerMode && animationSlide >= slideCount) {
          animationSlide = infinite ? slideCount : slideCount - 1;
          finalSlide = infinite ? 0 : slideCount - 1;
        } else if (animationSlide >= slideCount) {
          finalSlide = animationSlide - slideCount;
          if (!infinite) finalSlide = slideCount - slidesToShow;
          else if (slideCount % slidesToScroll !== 0) finalSlide = 0;
        }
        if (!infinite && animationSlide + slidesToShow >= slideCount) {
          finalSlide = slideCount - slidesToShow;
        }
        animationLeft = getTrackLeft(_objectSpread(_objectSpread({}, spec), {}, {
          slideIndex: animationSlide
        }));
        finalLeft = getTrackLeft(_objectSpread(_objectSpread({}, spec), {}, {
          slideIndex: finalSlide
        }));
        if (!infinite) {
          if (animationLeft === finalLeft) animationSlide = finalSlide;
          animationLeft = finalLeft;
        }
        if (lazyLoad) {
          lazyLoadedList = lazyLoadedList.concat(getOnDemandLazySlides(_objectSpread(_objectSpread({}, spec), {}, {
            currentSlide: animationSlide
          })));
        }
        if (!useCSS) {
          state = {
            currentSlide: finalSlide,
            trackStyle: getTrackCSS(_objectSpread(_objectSpread({}, spec), {}, {
              left: finalLeft
            })),
            lazyLoadedList,
            targetSlide
          };
        } else {
          state = {
            animating: true,
            currentSlide: finalSlide,
            trackStyle: getTrackAnimateCSS(_objectSpread(_objectSpread({}, spec), {}, {
              left: animationLeft
            })),
            lazyLoadedList,
            targetSlide
          };
          nextState = {
            animating: false,
            currentSlide: finalSlide,
            trackStyle: getTrackCSS(_objectSpread(_objectSpread({}, spec), {}, {
              left: finalLeft
            })),
            swipeLeft: null,
            targetSlide
          };
        }
      }
      return {
        state,
        nextState
      };
    };
    innerSliderUtils.slideHandler = slideHandler;
    var changeSlide = function changeSlide2(spec, options) {
      var indexOffset, previousInt, slideOffset, unevenOffset, targetSlide;
      var slidesToScroll = spec.slidesToScroll, slidesToShow = spec.slidesToShow, slideCount = spec.slideCount, currentSlide = spec.currentSlide, previousTargetSlide = spec.targetSlide, lazyLoad = spec.lazyLoad, infinite = spec.infinite;
      unevenOffset = slideCount % slidesToScroll !== 0;
      indexOffset = unevenOffset ? 0 : (slideCount - currentSlide) % slidesToScroll;
      if (options.message === "previous") {
        slideOffset = indexOffset === 0 ? slidesToScroll : slidesToShow - indexOffset;
        targetSlide = currentSlide - slideOffset;
        if (lazyLoad && !infinite) {
          previousInt = currentSlide - slideOffset;
          targetSlide = previousInt === -1 ? slideCount - 1 : previousInt;
        }
        if (!infinite) {
          targetSlide = previousTargetSlide - slidesToScroll;
        }
      } else if (options.message === "next") {
        slideOffset = indexOffset === 0 ? slidesToScroll : indexOffset;
        targetSlide = currentSlide + slideOffset;
        if (lazyLoad && !infinite) {
          targetSlide = (currentSlide + slidesToScroll) % slideCount + indexOffset;
        }
        if (!infinite) {
          targetSlide = previousTargetSlide + slidesToScroll;
        }
      } else if (options.message === "dots") {
        targetSlide = options.index * options.slidesToScroll;
      } else if (options.message === "children") {
        targetSlide = options.index;
        if (infinite) {
          var direction = siblingDirection(_objectSpread(_objectSpread({}, spec), {}, {
            targetSlide
          }));
          if (targetSlide > options.currentSlide && direction === "left") {
            targetSlide = targetSlide - slideCount;
          } else if (targetSlide < options.currentSlide && direction === "right") {
            targetSlide = targetSlide + slideCount;
          }
        }
      } else if (options.message === "index") {
        targetSlide = Number(options.index);
      }
      return targetSlide;
    };
    innerSliderUtils.changeSlide = changeSlide;
    var keyHandler = function keyHandler2(e, accessibility, rtl) {
      if (e.target.tagName.match("TEXTAREA|INPUT|SELECT") || !accessibility) return "";
      if (e.keyCode === 37) return rtl ? "next" : "previous";
      if (e.keyCode === 39) return rtl ? "previous" : "next";
      return "";
    };
    innerSliderUtils.keyHandler = keyHandler;
    var swipeStart = function swipeStart2(e, swipe, draggable) {
      e.target.tagName === "IMG" && safePreventDefault(e);
      if (!swipe || !draggable && e.type.indexOf("mouse") !== -1) return "";
      return {
        dragging: true,
        touchObject: {
          startX: e.touches ? e.touches[0].pageX : e.clientX,
          startY: e.touches ? e.touches[0].pageY : e.clientY,
          curX: e.touches ? e.touches[0].pageX : e.clientX,
          curY: e.touches ? e.touches[0].pageY : e.clientY
        }
      };
    };
    innerSliderUtils.swipeStart = swipeStart;
    var swipeMove = function swipeMove2(e, spec) {
      var scrolling = spec.scrolling, animating = spec.animating, vertical = spec.vertical, swipeToSlide = spec.swipeToSlide, verticalSwiping = spec.verticalSwiping, rtl = spec.rtl, currentSlide = spec.currentSlide, edgeFriction = spec.edgeFriction, edgeDragged = spec.edgeDragged, onEdge = spec.onEdge, swiped = spec.swiped, swiping = spec.swiping, slideCount = spec.slideCount, slidesToScroll = spec.slidesToScroll, infinite = spec.infinite, touchObject = spec.touchObject, swipeEvent = spec.swipeEvent, listHeight = spec.listHeight, listWidth = spec.listWidth;
      if (scrolling) return;
      if (animating) return safePreventDefault(e);
      if (vertical && swipeToSlide && verticalSwiping) safePreventDefault(e);
      var swipeLeft, state = {};
      var curLeft = getTrackLeft(spec);
      touchObject.curX = e.touches ? e.touches[0].pageX : e.clientX;
      touchObject.curY = e.touches ? e.touches[0].pageY : e.clientY;
      touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curX - touchObject.startX, 2)));
      var verticalSwipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curY - touchObject.startY, 2)));
      if (!verticalSwiping && !swiping && verticalSwipeLength > 10) {
        return {
          scrolling: true
        };
      }
      if (verticalSwiping) touchObject.swipeLength = verticalSwipeLength;
      var positionOffset = (!rtl ? 1 : -1) * (touchObject.curX > touchObject.startX ? 1 : -1);
      if (verticalSwiping) positionOffset = touchObject.curY > touchObject.startY ? 1 : -1;
      var dotCount = Math.ceil(slideCount / slidesToScroll);
      var swipeDirection = getSwipeDirection(spec.touchObject, verticalSwiping);
      var touchSwipeLength = touchObject.swipeLength;
      if (!infinite) {
        if (currentSlide === 0 && (swipeDirection === "right" || swipeDirection === "down") || currentSlide + 1 >= dotCount && (swipeDirection === "left" || swipeDirection === "up") || !canGoNext(spec) && (swipeDirection === "left" || swipeDirection === "up")) {
          touchSwipeLength = touchObject.swipeLength * edgeFriction;
          if (edgeDragged === false && onEdge) {
            onEdge(swipeDirection);
            state["edgeDragged"] = true;
          }
        }
      }
      if (!swiped && swipeEvent) {
        swipeEvent(swipeDirection);
        state["swiped"] = true;
      }
      if (!vertical) {
        if (!rtl) {
          swipeLeft = curLeft + touchSwipeLength * positionOffset;
        } else {
          swipeLeft = curLeft - touchSwipeLength * positionOffset;
        }
      } else {
        swipeLeft = curLeft + touchSwipeLength * (listHeight / listWidth) * positionOffset;
      }
      if (verticalSwiping) {
        swipeLeft = curLeft + touchSwipeLength * positionOffset;
      }
      state = _objectSpread(_objectSpread({}, state), {}, {
        touchObject,
        swipeLeft,
        trackStyle: getTrackCSS(_objectSpread(_objectSpread({}, spec), {}, {
          left: swipeLeft
        }))
      });
      if (Math.abs(touchObject.curX - touchObject.startX) < Math.abs(touchObject.curY - touchObject.startY) * 0.8) {
        return state;
      }
      if (touchObject.swipeLength > 10) {
        state["swiping"] = true;
        safePreventDefault(e);
      }
      return state;
    };
    innerSliderUtils.swipeMove = swipeMove;
    var swipeEnd = function swipeEnd2(e, spec) {
      var dragging = spec.dragging, swipe = spec.swipe, touchObject = spec.touchObject, listWidth = spec.listWidth, touchThreshold = spec.touchThreshold, verticalSwiping = spec.verticalSwiping, listHeight = spec.listHeight, swipeToSlide = spec.swipeToSlide, scrolling = spec.scrolling, onSwipe = spec.onSwipe, targetSlide = spec.targetSlide, currentSlide = spec.currentSlide, infinite = spec.infinite;
      if (!dragging) {
        if (swipe) safePreventDefault(e);
        return {};
      }
      var minSwipe = verticalSwiping ? listHeight / touchThreshold : listWidth / touchThreshold;
      var swipeDirection = getSwipeDirection(touchObject, verticalSwiping);
      var state = {
        dragging: false,
        edgeDragged: false,
        scrolling: false,
        swiping: false,
        swiped: false,
        swipeLeft: null,
        touchObject: {}
      };
      if (scrolling) {
        return state;
      }
      if (!touchObject.swipeLength) {
        return state;
      }
      if (touchObject.swipeLength > minSwipe) {
        safePreventDefault(e);
        if (onSwipe) {
          onSwipe(swipeDirection);
        }
        var slideCount, newSlide;
        var activeSlide = infinite ? currentSlide : targetSlide;
        switch (swipeDirection) {
          case "left":
          case "up":
            newSlide = activeSlide + getSlideCount(spec);
            slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;
            state["currentDirection"] = 0;
            break;
          case "right":
          case "down":
            newSlide = activeSlide - getSlideCount(spec);
            slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;
            state["currentDirection"] = 1;
            break;
          default:
            slideCount = activeSlide;
        }
        state["triggerSlideHandler"] = slideCount;
      } else {
        var currentLeft = getTrackLeft(spec);
        state["trackStyle"] = getTrackAnimateCSS(_objectSpread(_objectSpread({}, spec), {}, {
          left: currentLeft
        }));
      }
      return state;
    };
    innerSliderUtils.swipeEnd = swipeEnd;
    var getNavigableIndexes = function getNavigableIndexes2(spec) {
      var max = spec.infinite ? spec.slideCount * 2 : spec.slideCount;
      var breakpoint = spec.infinite ? spec.slidesToShow * -1 : 0;
      var counter = spec.infinite ? spec.slidesToShow * -1 : 0;
      var indexes = [];
      while (breakpoint < max) {
        indexes.push(breakpoint);
        breakpoint = counter + spec.slidesToScroll;
        counter += Math.min(spec.slidesToScroll, spec.slidesToShow);
      }
      return indexes;
    };
    innerSliderUtils.getNavigableIndexes = getNavigableIndexes;
    var checkNavigable = function checkNavigable2(spec, index2) {
      var navigables = getNavigableIndexes(spec);
      var prevNavigable = 0;
      if (index2 > navigables[navigables.length - 1]) {
        index2 = navigables[navigables.length - 1];
      } else {
        for (var n in navigables) {
          if (index2 < navigables[n]) {
            index2 = prevNavigable;
            break;
          }
          prevNavigable = navigables[n];
        }
      }
      return index2;
    };
    innerSliderUtils.checkNavigable = checkNavigable;
    var getSlideCount = function getSlideCount2(spec) {
      var centerOffset = spec.centerMode ? spec.slideWidth * Math.floor(spec.slidesToShow / 2) : 0;
      if (spec.swipeToSlide) {
        var swipedSlide;
        var slickList = spec.listRef;
        var slides = slickList.querySelectorAll && slickList.querySelectorAll(".slick-slide") || [];
        Array.from(slides).every(function(slide) {
          if (!spec.vertical) {
            if (slide.offsetLeft - centerOffset + getWidth(slide) / 2 > spec.swipeLeft * -1) {
              swipedSlide = slide;
              return false;
            }
          } else {
            if (slide.offsetTop + getHeight(slide) / 2 > spec.swipeLeft * -1) {
              swipedSlide = slide;
              return false;
            }
          }
          return true;
        });
        if (!swipedSlide) {
          return 0;
        }
        var currentIndex = spec.rtl === true ? spec.slideCount - spec.currentSlide : spec.currentSlide;
        var slidesTraversed = Math.abs(swipedSlide.dataset.index - currentIndex) || 1;
        return slidesTraversed;
      } else {
        return spec.slidesToScroll;
      }
    };
    innerSliderUtils.getSlideCount = getSlideCount;
    var checkSpecKeys = function checkSpecKeys2(spec, keysArray) {
      return keysArray.reduce(function(value, key) {
        return value && spec.hasOwnProperty(key);
      }, true) ? null : console.error("Keys Missing:", spec);
    };
    innerSliderUtils.checkSpecKeys = checkSpecKeys;
    var getTrackCSS = function getTrackCSS2(spec) {
      checkSpecKeys(spec, ["left", "variableWidth", "slideCount", "slidesToShow", "slideWidth"]);
      var trackWidth, trackHeight;
      var trackChildren = spec.slideCount + 2 * spec.slidesToShow;
      if (!spec.vertical) {
        trackWidth = getTotalSlides(spec) * spec.slideWidth;
      } else {
        trackHeight = trackChildren * spec.slideHeight;
      }
      var style = {
        opacity: 1,
        transition: "",
        WebkitTransition: ""
      };
      if (spec.useTransform) {
        var WebkitTransform = !spec.vertical ? "translate3d(" + spec.left + "px, 0px, 0px)" : "translate3d(0px, " + spec.left + "px, 0px)";
        var transform = !spec.vertical ? "translate3d(" + spec.left + "px, 0px, 0px)" : "translate3d(0px, " + spec.left + "px, 0px)";
        var msTransform = !spec.vertical ? "translateX(" + spec.left + "px)" : "translateY(" + spec.left + "px)";
        style = _objectSpread(_objectSpread({}, style), {}, {
          WebkitTransform,
          transform,
          msTransform
        });
      } else {
        if (spec.vertical) {
          style["top"] = spec.left;
        } else {
          style["left"] = spec.left;
        }
      }
      if (spec.fade) style = {
        opacity: 1
      };
      if (trackWidth) style.width = trackWidth;
      if (trackHeight) style.height = trackHeight;
      if (window && !window.addEventListener && window.attachEvent) {
        if (!spec.vertical) {
          style.marginLeft = spec.left + "px";
        } else {
          style.marginTop = spec.left + "px";
        }
      }
      return style;
    };
    innerSliderUtils.getTrackCSS = getTrackCSS;
    var getTrackAnimateCSS = function getTrackAnimateCSS2(spec) {
      checkSpecKeys(spec, ["left", "variableWidth", "slideCount", "slidesToShow", "slideWidth", "speed", "cssEase"]);
      var style = getTrackCSS(spec);
      if (spec.useTransform) {
        style.WebkitTransition = "-webkit-transform " + spec.speed + "ms " + spec.cssEase;
        style.transition = "transform " + spec.speed + "ms " + spec.cssEase;
      } else {
        if (spec.vertical) {
          style.transition = "top " + spec.speed + "ms " + spec.cssEase;
        } else {
          style.transition = "left " + spec.speed + "ms " + spec.cssEase;
        }
      }
      return style;
    };
    innerSliderUtils.getTrackAnimateCSS = getTrackAnimateCSS;
    var getTrackLeft = function getTrackLeft2(spec) {
      if (spec.unslick) {
        return 0;
      }
      checkSpecKeys(spec, ["slideIndex", "trackRef", "infinite", "centerMode", "slideCount", "slidesToShow", "slidesToScroll", "slideWidth", "listWidth", "variableWidth", "slideHeight"]);
      var slideIndex = spec.slideIndex, trackRef = spec.trackRef, infinite = spec.infinite, centerMode = spec.centerMode, slideCount = spec.slideCount, slidesToShow = spec.slidesToShow, slidesToScroll = spec.slidesToScroll, slideWidth = spec.slideWidth, listWidth = spec.listWidth, variableWidth = spec.variableWidth, slideHeight = spec.slideHeight, fade = spec.fade, vertical = spec.vertical;
      var slideOffset = 0;
      var targetLeft;
      var targetSlide;
      var verticalOffset = 0;
      if (fade || spec.slideCount === 1) {
        return 0;
      }
      var slidesToOffset = 0;
      if (infinite) {
        slidesToOffset = -getPreClones(spec);
        if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {
          slidesToOffset = -(slideIndex > slideCount ? slidesToShow - (slideIndex - slideCount) : slideCount % slidesToScroll);
        }
        if (centerMode) {
          slidesToOffset += parseInt(slidesToShow / 2);
        }
      } else {
        if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {
          slidesToOffset = slidesToShow - slideCount % slidesToScroll;
        }
        if (centerMode) {
          slidesToOffset = parseInt(slidesToShow / 2);
        }
      }
      slideOffset = slidesToOffset * slideWidth;
      verticalOffset = slidesToOffset * slideHeight;
      if (!vertical) {
        targetLeft = slideIndex * slideWidth * -1 + slideOffset;
      } else {
        targetLeft = slideIndex * slideHeight * -1 + verticalOffset;
      }
      if (variableWidth === true) {
        var targetSlideIndex;
        var trackElem = trackRef && trackRef.node;
        targetSlideIndex = slideIndex + getPreClones(spec);
        targetSlide = trackElem && trackElem.childNodes[targetSlideIndex];
        targetLeft = targetSlide ? targetSlide.offsetLeft * -1 : 0;
        if (centerMode === true) {
          targetSlideIndex = infinite ? slideIndex + getPreClones(spec) : slideIndex;
          targetSlide = trackElem && trackElem.children[targetSlideIndex];
          targetLeft = 0;
          for (var slide = 0; slide < targetSlideIndex; slide++) {
            targetLeft -= trackElem && trackElem.children[slide] && trackElem.children[slide].offsetWidth;
          }
          targetLeft -= parseInt(spec.centerPadding);
          targetLeft += targetSlide && (listWidth - targetSlide.offsetWidth) / 2;
        }
      }
      return targetLeft;
    };
    innerSliderUtils.getTrackLeft = getTrackLeft;
    var getPreClones = function getPreClones2(spec) {
      if (spec.unslick || !spec.infinite) {
        return 0;
      }
      if (spec.variableWidth) {
        return spec.slideCount;
      }
      return spec.slidesToShow + (spec.centerMode ? 1 : 0);
    };
    innerSliderUtils.getPreClones = getPreClones;
    var getPostClones = function getPostClones2(spec) {
      if (spec.unslick || !spec.infinite) {
        return 0;
      }
      return spec.slideCount;
    };
    innerSliderUtils.getPostClones = getPostClones;
    var getTotalSlides = function getTotalSlides2(spec) {
      return spec.slideCount === 1 ? 1 : getPreClones(spec) + spec.slideCount + getPostClones(spec);
    };
    innerSliderUtils.getTotalSlides = getTotalSlides;
    var siblingDirection = function siblingDirection2(spec) {
      if (spec.targetSlide > spec.currentSlide) {
        if (spec.targetSlide > spec.currentSlide + slidesOnRight(spec)) {
          return "left";
        }
        return "right";
      } else {
        if (spec.targetSlide < spec.currentSlide - slidesOnLeft(spec)) {
          return "right";
        }
        return "left";
      }
    };
    innerSliderUtils.siblingDirection = siblingDirection;
    var slidesOnRight = function slidesOnRight2(_ref) {
      var slidesToShow = _ref.slidesToShow, centerMode = _ref.centerMode, rtl = _ref.rtl, centerPadding = _ref.centerPadding;
      if (centerMode) {
        var right = (slidesToShow - 1) / 2 + 1;
        if (parseInt(centerPadding) > 0) right += 1;
        if (rtl && slidesToShow % 2 === 0) right += 1;
        return right;
      }
      if (rtl) {
        return 0;
      }
      return slidesToShow - 1;
    };
    innerSliderUtils.slidesOnRight = slidesOnRight;
    var slidesOnLeft = function slidesOnLeft2(_ref2) {
      var slidesToShow = _ref2.slidesToShow, centerMode = _ref2.centerMode, rtl = _ref2.rtl, centerPadding = _ref2.centerPadding;
      if (centerMode) {
        var left = (slidesToShow - 1) / 2 + 1;
        if (parseInt(centerPadding) > 0) left += 1;
        if (!rtl && slidesToShow % 2 === 0) left += 1;
        return left;
      }
      if (rtl) {
        return slidesToShow - 1;
      }
      return 0;
    };
    innerSliderUtils.slidesOnLeft = slidesOnLeft;
    var canUseDOM2 = function canUseDOM3() {
      return !!(typeof window !== "undefined" && window.document && window.document.createElement);
    };
    innerSliderUtils.canUseDOM = canUseDOM2;
    return innerSliderUtils;
  }
  var track = {};
  var hasRequiredTrack;
  function requireTrack() {
    if (hasRequiredTrack) return track;
    hasRequiredTrack = 1;
    Object.defineProperty(track, "__esModule", {
      value: true
    });
    track.Track = void 0;
    var _react = _interopRequireDefault(requireReact());
    var _classnames = _interopRequireDefault(requireClassnames());
    var _innerSliderUtils = requireInnerSliderUtils();
    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { "default": obj };
    }
    function _typeof(obj) {
      "@babel/helpers - typeof";
      if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
        _typeof = function _typeof2(obj2) {
          return typeof obj2;
        };
      } else {
        _typeof = function _typeof2(obj2) {
          return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
        };
      }
      return _typeof(obj);
    }
    function _extends2() {
      _extends2 = Object.assign || function(target) {
        for (var i = 1; i < arguments.length; i++) {
          var source = arguments[i];
          for (var key in source) {
            if (Object.prototype.hasOwnProperty.call(source, key)) {
              target[key] = source[key];
            }
          }
        }
        return target;
      };
      return _extends2.apply(this, arguments);
    }
    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }
    function _defineProperties(target, props) {
      for (var i = 0; i < props.length; i++) {
        var descriptor = props[i];
        descriptor.enumerable = descriptor.enumerable || false;
        descriptor.configurable = true;
        if ("value" in descriptor) descriptor.writable = true;
        Object.defineProperty(target, descriptor.key, descriptor);
      }
    }
    function _createClass(Constructor, protoProps, staticProps) {
      if (protoProps) _defineProperties(Constructor.prototype, protoProps);
      return Constructor;
    }
    function _inherits(subClass, superClass) {
      if (typeof superClass !== "function" && superClass !== null) {
        throw new TypeError("Super expression must either be null or a function");
      }
      subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
      if (superClass) _setPrototypeOf2(subClass, superClass);
    }
    function _setPrototypeOf2(o, p) {
      _setPrototypeOf2 = Object.setPrototypeOf || function _setPrototypeOf3(o2, p2) {
        o2.__proto__ = p2;
        return o2;
      };
      return _setPrototypeOf2(o, p);
    }
    function _createSuper(Derived) {
      var hasNativeReflectConstruct = _isNativeReflectConstruct();
      return function _createSuperInternal() {
        var Super = _getPrototypeOf(Derived), result;
        if (hasNativeReflectConstruct) {
          var NewTarget = _getPrototypeOf(this).constructor;
          result = Reflect.construct(Super, arguments, NewTarget);
        } else {
          result = Super.apply(this, arguments);
        }
        return _possibleConstructorReturn(this, result);
      };
    }
    function _possibleConstructorReturn(self2, call) {
      if (call && (_typeof(call) === "object" || typeof call === "function")) {
        return call;
      }
      return _assertThisInitialized(self2);
    }
    function _assertThisInitialized(self2) {
      if (self2 === void 0) {
        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
      }
      return self2;
    }
    function _isNativeReflectConstruct() {
      if (typeof Reflect === "undefined" || !Reflect.construct) return false;
      if (Reflect.construct.sham) return false;
      if (typeof Proxy === "function") return true;
      try {
        Date.prototype.toString.call(Reflect.construct(Date, [], function() {
        }));
        return true;
      } catch (e) {
        return false;
      }
    }
    function _getPrototypeOf(o) {
      _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
        return o2.__proto__ || Object.getPrototypeOf(o2);
      };
      return _getPrototypeOf(o);
    }
    function ownKeys(object, enumerableOnly) {
      var keys = Object.keys(object);
      if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        if (enumerableOnly) symbols = symbols.filter(function(sym) {
          return Object.getOwnPropertyDescriptor(object, sym).enumerable;
        });
        keys.push.apply(keys, symbols);
      }
      return keys;
    }
    function _objectSpread(target) {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i] != null ? arguments[i] : {};
        if (i % 2) {
          ownKeys(Object(source), true).forEach(function(key) {
            _defineProperty(target, key, source[key]);
          });
        } else if (Object.getOwnPropertyDescriptors) {
          Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
        } else {
          ownKeys(Object(source)).forEach(function(key) {
            Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
          });
        }
      }
      return target;
    }
    function _defineProperty(obj, key, value) {
      if (key in obj) {
        Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key] = value;
      }
      return obj;
    }
    var getSlideClasses = function getSlideClasses2(spec) {
      var slickActive, slickCenter, slickCloned;
      var centerOffset, index2;
      if (spec.rtl) {
        index2 = spec.slideCount - 1 - spec.index;
      } else {
        index2 = spec.index;
      }
      slickCloned = index2 < 0 || index2 >= spec.slideCount;
      if (spec.centerMode) {
        centerOffset = Math.floor(spec.slidesToShow / 2);
        slickCenter = (index2 - spec.currentSlide) % spec.slideCount === 0;
        if (index2 > spec.currentSlide - centerOffset - 1 && index2 <= spec.currentSlide + centerOffset) {
          slickActive = true;
        }
      } else {
        slickActive = spec.currentSlide <= index2 && index2 < spec.currentSlide + spec.slidesToShow;
      }
      var focusedSlide;
      if (spec.targetSlide < 0) {
        focusedSlide = spec.targetSlide + spec.slideCount;
      } else if (spec.targetSlide >= spec.slideCount) {
        focusedSlide = spec.targetSlide - spec.slideCount;
      } else {
        focusedSlide = spec.targetSlide;
      }
      var slickCurrent = index2 === focusedSlide;
      return {
        "slick-slide": true,
        "slick-active": slickActive,
        "slick-center": slickCenter,
        "slick-cloned": slickCloned,
        "slick-current": slickCurrent
        // dubious in case of RTL
      };
    };
    var getSlideStyle = function getSlideStyle2(spec) {
      var style = {};
      if (spec.variableWidth === void 0 || spec.variableWidth === false) {
        style.width = spec.slideWidth;
      }
      if (spec.fade) {
        style.position = "relative";
        if (spec.vertical) {
          style.top = -spec.index * parseInt(spec.slideHeight);
        } else {
          style.left = -spec.index * parseInt(spec.slideWidth);
        }
        style.opacity = spec.currentSlide === spec.index ? 1 : 0;
        if (spec.useCSS) {
          style.transition = "opacity " + spec.speed + "ms " + spec.cssEase + ", visibility " + spec.speed + "ms " + spec.cssEase;
        }
      }
      return style;
    };
    var getKey = function getKey2(child, fallbackKey) {
      return child.key || fallbackKey;
    };
    var renderSlides = function renderSlides2(spec) {
      var key;
      var slides = [];
      var preCloneSlides = [];
      var postCloneSlides = [];
      var childrenCount = _react["default"].Children.count(spec.children);
      var startIndex = (0, _innerSliderUtils.lazyStartIndex)(spec);
      var endIndex = (0, _innerSliderUtils.lazyEndIndex)(spec);
      _react["default"].Children.forEach(spec.children, function(elem, index2) {
        var child;
        var childOnClickOptions = {
          message: "children",
          index: index2,
          slidesToScroll: spec.slidesToScroll,
          currentSlide: spec.currentSlide
        };
        if (!spec.lazyLoad || spec.lazyLoad && spec.lazyLoadedList.indexOf(index2) >= 0) {
          child = elem;
        } else {
          child = /* @__PURE__ */ _react["default"].createElement("div", null);
        }
        var childStyle = getSlideStyle(_objectSpread(_objectSpread({}, spec), {}, {
          index: index2
        }));
        var slideClass = child.props.className || "";
        var slideClasses = getSlideClasses(_objectSpread(_objectSpread({}, spec), {}, {
          index: index2
        }));
        slides.push(/* @__PURE__ */ _react["default"].cloneElement(child, {
          key: "original" + getKey(child, index2),
          "data-index": index2,
          className: (0, _classnames["default"])(slideClasses, slideClass),
          tabIndex: "-1",
          "aria-hidden": !slideClasses["slick-active"],
          style: _objectSpread(_objectSpread({
            outline: "none"
          }, child.props.style || {}), childStyle),
          onClick: function onClick(e) {
            child.props && child.props.onClick && child.props.onClick(e);
            if (spec.focusOnSelect) {
              spec.focusOnSelect(childOnClickOptions);
            }
          }
        }));
        if (spec.infinite && spec.fade === false) {
          var preCloneNo = childrenCount - index2;
          if (preCloneNo <= (0, _innerSliderUtils.getPreClones)(spec) && childrenCount !== spec.slidesToShow) {
            key = -preCloneNo;
            if (key >= startIndex) {
              child = elem;
            }
            slideClasses = getSlideClasses(_objectSpread(_objectSpread({}, spec), {}, {
              index: key
            }));
            preCloneSlides.push(/* @__PURE__ */ _react["default"].cloneElement(child, {
              key: "precloned" + getKey(child, key),
              "data-index": key,
              tabIndex: "-1",
              className: (0, _classnames["default"])(slideClasses, slideClass),
              "aria-hidden": !slideClasses["slick-active"],
              style: _objectSpread(_objectSpread({}, child.props.style || {}), childStyle),
              onClick: function onClick(e) {
                child.props && child.props.onClick && child.props.onClick(e);
                if (spec.focusOnSelect) {
                  spec.focusOnSelect(childOnClickOptions);
                }
              }
            }));
          }
          if (childrenCount !== spec.slidesToShow) {
            key = childrenCount + index2;
            if (key < endIndex) {
              child = elem;
            }
            slideClasses = getSlideClasses(_objectSpread(_objectSpread({}, spec), {}, {
              index: key
            }));
            postCloneSlides.push(/* @__PURE__ */ _react["default"].cloneElement(child, {
              key: "postcloned" + getKey(child, key),
              "data-index": key,
              tabIndex: "-1",
              className: (0, _classnames["default"])(slideClasses, slideClass),
              "aria-hidden": !slideClasses["slick-active"],
              style: _objectSpread(_objectSpread({}, child.props.style || {}), childStyle),
              onClick: function onClick(e) {
                child.props && child.props.onClick && child.props.onClick(e);
                if (spec.focusOnSelect) {
                  spec.focusOnSelect(childOnClickOptions);
                }
              }
            }));
          }
        }
      });
      if (spec.rtl) {
        return preCloneSlides.concat(slides, postCloneSlides).reverse();
      } else {
        return preCloneSlides.concat(slides, postCloneSlides);
      }
    };
    var Track = /* @__PURE__ */ (function(_React$PureComponent) {
      _inherits(Track2, _React$PureComponent);
      var _super = _createSuper(Track2);
      function Track2() {
        var _this;
        _classCallCheck(this, Track2);
        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
          args[_key] = arguments[_key];
        }
        _this = _super.call.apply(_super, [this].concat(args));
        _defineProperty(_assertThisInitialized(_this), "node", null);
        _defineProperty(_assertThisInitialized(_this), "handleRef", function(ref) {
          _this.node = ref;
        });
        return _this;
      }
      _createClass(Track2, [{
        key: "render",
        value: function render() {
          var slides = renderSlides(this.props);
          var _this$props = this.props, onMouseEnter = _this$props.onMouseEnter, onMouseOver = _this$props.onMouseOver, onMouseLeave = _this$props.onMouseLeave;
          var mouseEvents = {
            onMouseEnter,
            onMouseOver,
            onMouseLeave
          };
          return /* @__PURE__ */ _react["default"].createElement("div", _extends2({
            ref: this.handleRef,
            className: "slick-track",
            style: this.props.trackStyle
          }, mouseEvents), slides);
        }
      }]);
      return Track2;
    })(_react["default"].PureComponent);
    track.Track = Track;
    return track;
  }
  var dots = {};
  var hasRequiredDots;
  function requireDots() {
    if (hasRequiredDots) return dots;
    hasRequiredDots = 1;
    Object.defineProperty(dots, "__esModule", {
      value: true
    });
    dots.Dots = void 0;
    var _react = _interopRequireDefault(requireReact());
    var _classnames = _interopRequireDefault(requireClassnames());
    var _innerSliderUtils = requireInnerSliderUtils();
    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { "default": obj };
    }
    function _typeof(obj) {
      "@babel/helpers - typeof";
      if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
        _typeof = function _typeof2(obj2) {
          return typeof obj2;
        };
      } else {
        _typeof = function _typeof2(obj2) {
          return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
        };
      }
      return _typeof(obj);
    }
    function ownKeys(object, enumerableOnly) {
      var keys = Object.keys(object);
      if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        if (enumerableOnly) symbols = symbols.filter(function(sym) {
          return Object.getOwnPropertyDescriptor(object, sym).enumerable;
        });
        keys.push.apply(keys, symbols);
      }
      return keys;
    }
    function _objectSpread(target) {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i] != null ? arguments[i] : {};
        if (i % 2) {
          ownKeys(Object(source), true).forEach(function(key) {
            _defineProperty(target, key, source[key]);
          });
        } else if (Object.getOwnPropertyDescriptors) {
          Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
        } else {
          ownKeys(Object(source)).forEach(function(key) {
            Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
          });
        }
      }
      return target;
    }
    function _defineProperty(obj, key, value) {
      if (key in obj) {
        Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key] = value;
      }
      return obj;
    }
    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }
    function _defineProperties(target, props) {
      for (var i = 0; i < props.length; i++) {
        var descriptor = props[i];
        descriptor.enumerable = descriptor.enumerable || false;
        descriptor.configurable = true;
        if ("value" in descriptor) descriptor.writable = true;
        Object.defineProperty(target, descriptor.key, descriptor);
      }
    }
    function _createClass(Constructor, protoProps, staticProps) {
      if (protoProps) _defineProperties(Constructor.prototype, protoProps);
      return Constructor;
    }
    function _inherits(subClass, superClass) {
      if (typeof superClass !== "function" && superClass !== null) {
        throw new TypeError("Super expression must either be null or a function");
      }
      subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
      if (superClass) _setPrototypeOf2(subClass, superClass);
    }
    function _setPrototypeOf2(o, p) {
      _setPrototypeOf2 = Object.setPrototypeOf || function _setPrototypeOf3(o2, p2) {
        o2.__proto__ = p2;
        return o2;
      };
      return _setPrototypeOf2(o, p);
    }
    function _createSuper(Derived) {
      var hasNativeReflectConstruct = _isNativeReflectConstruct();
      return function _createSuperInternal() {
        var Super = _getPrototypeOf(Derived), result;
        if (hasNativeReflectConstruct) {
          var NewTarget = _getPrototypeOf(this).constructor;
          result = Reflect.construct(Super, arguments, NewTarget);
        } else {
          result = Super.apply(this, arguments);
        }
        return _possibleConstructorReturn(this, result);
      };
    }
    function _possibleConstructorReturn(self2, call) {
      if (call && (_typeof(call) === "object" || typeof call === "function")) {
        return call;
      }
      return _assertThisInitialized(self2);
    }
    function _assertThisInitialized(self2) {
      if (self2 === void 0) {
        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
      }
      return self2;
    }
    function _isNativeReflectConstruct() {
      if (typeof Reflect === "undefined" || !Reflect.construct) return false;
      if (Reflect.construct.sham) return false;
      if (typeof Proxy === "function") return true;
      try {
        Date.prototype.toString.call(Reflect.construct(Date, [], function() {
        }));
        return true;
      } catch (e) {
        return false;
      }
    }
    function _getPrototypeOf(o) {
      _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
        return o2.__proto__ || Object.getPrototypeOf(o2);
      };
      return _getPrototypeOf(o);
    }
    var getDotCount = function getDotCount2(spec) {
      var dots2;
      if (spec.infinite) {
        dots2 = Math.ceil(spec.slideCount / spec.slidesToScroll);
      } else {
        dots2 = Math.ceil((spec.slideCount - spec.slidesToShow) / spec.slidesToScroll) + 1;
      }
      return dots2;
    };
    var Dots = /* @__PURE__ */ (function(_React$PureComponent) {
      _inherits(Dots2, _React$PureComponent);
      var _super = _createSuper(Dots2);
      function Dots2() {
        _classCallCheck(this, Dots2);
        return _super.apply(this, arguments);
      }
      _createClass(Dots2, [{
        key: "clickHandler",
        value: function clickHandler(options, e) {
          e.preventDefault();
          this.props.clickHandler(options);
        }
      }, {
        key: "render",
        value: function render() {
          var _this$props = this.props, onMouseEnter = _this$props.onMouseEnter, onMouseOver = _this$props.onMouseOver, onMouseLeave = _this$props.onMouseLeave, infinite = _this$props.infinite, slidesToScroll = _this$props.slidesToScroll, slidesToShow = _this$props.slidesToShow, slideCount = _this$props.slideCount, currentSlide = _this$props.currentSlide;
          var dotCount = getDotCount({
            slideCount,
            slidesToScroll,
            slidesToShow,
            infinite
          });
          var mouseEvents = {
            onMouseEnter,
            onMouseOver,
            onMouseLeave
          };
          var dots2 = [];
          for (var i = 0; i < dotCount; i++) {
            var _rightBound = (i + 1) * slidesToScroll - 1;
            var rightBound = infinite ? _rightBound : (0, _innerSliderUtils.clamp)(_rightBound, 0, slideCount - 1);
            var _leftBound = rightBound - (slidesToScroll - 1);
            var leftBound = infinite ? _leftBound : (0, _innerSliderUtils.clamp)(_leftBound, 0, slideCount - 1);
            var className = (0, _classnames["default"])({
              "slick-active": infinite ? currentSlide >= leftBound && currentSlide <= rightBound : currentSlide === leftBound
            });
            var dotOptions = {
              message: "dots",
              index: i,
              slidesToScroll,
              currentSlide
            };
            var onClick = this.clickHandler.bind(this, dotOptions);
            dots2 = dots2.concat(/* @__PURE__ */ _react["default"].createElement("li", {
              key: i,
              className
            }, /* @__PURE__ */ _react["default"].cloneElement(this.props.customPaging(i), {
              onClick
            })));
          }
          return /* @__PURE__ */ _react["default"].cloneElement(this.props.appendDots(dots2), _objectSpread({
            className: this.props.dotsClass
          }, mouseEvents));
        }
      }]);
      return Dots2;
    })(_react["default"].PureComponent);
    dots.Dots = Dots;
    return dots;
  }
  var arrows = {};
  var hasRequiredArrows;
  function requireArrows() {
    if (hasRequiredArrows) return arrows;
    hasRequiredArrows = 1;
    Object.defineProperty(arrows, "__esModule", {
      value: true
    });
    arrows.NextArrow = arrows.PrevArrow = void 0;
    var _react = _interopRequireDefault(requireReact());
    var _classnames = _interopRequireDefault(requireClassnames());
    var _innerSliderUtils = requireInnerSliderUtils();
    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { "default": obj };
    }
    function _typeof(obj) {
      "@babel/helpers - typeof";
      if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
        _typeof = function _typeof2(obj2) {
          return typeof obj2;
        };
      } else {
        _typeof = function _typeof2(obj2) {
          return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
        };
      }
      return _typeof(obj);
    }
    function _extends2() {
      _extends2 = Object.assign || function(target) {
        for (var i = 1; i < arguments.length; i++) {
          var source = arguments[i];
          for (var key in source) {
            if (Object.prototype.hasOwnProperty.call(source, key)) {
              target[key] = source[key];
            }
          }
        }
        return target;
      };
      return _extends2.apply(this, arguments);
    }
    function ownKeys(object, enumerableOnly) {
      var keys = Object.keys(object);
      if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        if (enumerableOnly) symbols = symbols.filter(function(sym) {
          return Object.getOwnPropertyDescriptor(object, sym).enumerable;
        });
        keys.push.apply(keys, symbols);
      }
      return keys;
    }
    function _objectSpread(target) {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i] != null ? arguments[i] : {};
        if (i % 2) {
          ownKeys(Object(source), true).forEach(function(key) {
            _defineProperty(target, key, source[key]);
          });
        } else if (Object.getOwnPropertyDescriptors) {
          Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
        } else {
          ownKeys(Object(source)).forEach(function(key) {
            Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
          });
        }
      }
      return target;
    }
    function _defineProperty(obj, key, value) {
      if (key in obj) {
        Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key] = value;
      }
      return obj;
    }
    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }
    function _defineProperties(target, props) {
      for (var i = 0; i < props.length; i++) {
        var descriptor = props[i];
        descriptor.enumerable = descriptor.enumerable || false;
        descriptor.configurable = true;
        if ("value" in descriptor) descriptor.writable = true;
        Object.defineProperty(target, descriptor.key, descriptor);
      }
    }
    function _createClass(Constructor, protoProps, staticProps) {
      if (protoProps) _defineProperties(Constructor.prototype, protoProps);
      return Constructor;
    }
    function _inherits(subClass, superClass) {
      if (typeof superClass !== "function" && superClass !== null) {
        throw new TypeError("Super expression must either be null or a function");
      }
      subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
      if (superClass) _setPrototypeOf2(subClass, superClass);
    }
    function _setPrototypeOf2(o, p) {
      _setPrototypeOf2 = Object.setPrototypeOf || function _setPrototypeOf3(o2, p2) {
        o2.__proto__ = p2;
        return o2;
      };
      return _setPrototypeOf2(o, p);
    }
    function _createSuper(Derived) {
      var hasNativeReflectConstruct = _isNativeReflectConstruct();
      return function _createSuperInternal() {
        var Super = _getPrototypeOf(Derived), result;
        if (hasNativeReflectConstruct) {
          var NewTarget = _getPrototypeOf(this).constructor;
          result = Reflect.construct(Super, arguments, NewTarget);
        } else {
          result = Super.apply(this, arguments);
        }
        return _possibleConstructorReturn(this, result);
      };
    }
    function _possibleConstructorReturn(self2, call) {
      if (call && (_typeof(call) === "object" || typeof call === "function")) {
        return call;
      }
      return _assertThisInitialized(self2);
    }
    function _assertThisInitialized(self2) {
      if (self2 === void 0) {
        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
      }
      return self2;
    }
    function _isNativeReflectConstruct() {
      if (typeof Reflect === "undefined" || !Reflect.construct) return false;
      if (Reflect.construct.sham) return false;
      if (typeof Proxy === "function") return true;
      try {
        Date.prototype.toString.call(Reflect.construct(Date, [], function() {
        }));
        return true;
      } catch (e) {
        return false;
      }
    }
    function _getPrototypeOf(o) {
      _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
        return o2.__proto__ || Object.getPrototypeOf(o2);
      };
      return _getPrototypeOf(o);
    }
    var PrevArrow = /* @__PURE__ */ (function(_React$PureComponent) {
      _inherits(PrevArrow2, _React$PureComponent);
      var _super = _createSuper(PrevArrow2);
      function PrevArrow2() {
        _classCallCheck(this, PrevArrow2);
        return _super.apply(this, arguments);
      }
      _createClass(PrevArrow2, [{
        key: "clickHandler",
        value: function clickHandler(options, e) {
          if (e) {
            e.preventDefault();
          }
          this.props.clickHandler(options, e);
        }
      }, {
        key: "render",
        value: function render() {
          var prevClasses = {
            "slick-arrow": true,
            "slick-prev": true
          };
          var prevHandler = this.clickHandler.bind(this, {
            message: "previous"
          });
          if (!this.props.infinite && (this.props.currentSlide === 0 || this.props.slideCount <= this.props.slidesToShow)) {
            prevClasses["slick-disabled"] = true;
            prevHandler = null;
          }
          var prevArrowProps = {
            key: "0",
            "data-role": "none",
            className: (0, _classnames["default"])(prevClasses),
            style: {
              display: "block"
            },
            onClick: prevHandler
          };
          var customProps = {
            currentSlide: this.props.currentSlide,
            slideCount: this.props.slideCount
          };
          var prevArrow;
          if (this.props.prevArrow) {
            prevArrow = /* @__PURE__ */ _react["default"].cloneElement(this.props.prevArrow, _objectSpread(_objectSpread({}, prevArrowProps), customProps));
          } else {
            prevArrow = /* @__PURE__ */ _react["default"].createElement("button", _extends2({
              key: "0",
              type: "button"
            }, prevArrowProps), " ", "Previous");
          }
          return prevArrow;
        }
      }]);
      return PrevArrow2;
    })(_react["default"].PureComponent);
    arrows.PrevArrow = PrevArrow;
    var NextArrow = /* @__PURE__ */ (function(_React$PureComponent2) {
      _inherits(NextArrow2, _React$PureComponent2);
      var _super2 = _createSuper(NextArrow2);
      function NextArrow2() {
        _classCallCheck(this, NextArrow2);
        return _super2.apply(this, arguments);
      }
      _createClass(NextArrow2, [{
        key: "clickHandler",
        value: function clickHandler(options, e) {
          if (e) {
            e.preventDefault();
          }
          this.props.clickHandler(options, e);
        }
      }, {
        key: "render",
        value: function render() {
          var nextClasses = {
            "slick-arrow": true,
            "slick-next": true
          };
          var nextHandler = this.clickHandler.bind(this, {
            message: "next"
          });
          if (!(0, _innerSliderUtils.canGoNext)(this.props)) {
            nextClasses["slick-disabled"] = true;
            nextHandler = null;
          }
          var nextArrowProps = {
            key: "1",
            "data-role": "none",
            className: (0, _classnames["default"])(nextClasses),
            style: {
              display: "block"
            },
            onClick: nextHandler
          };
          var customProps = {
            currentSlide: this.props.currentSlide,
            slideCount: this.props.slideCount
          };
          var nextArrow;
          if (this.props.nextArrow) {
            nextArrow = /* @__PURE__ */ _react["default"].cloneElement(this.props.nextArrow, _objectSpread(_objectSpread({}, nextArrowProps), customProps));
          } else {
            nextArrow = /* @__PURE__ */ _react["default"].createElement("button", _extends2({
              key: "1",
              type: "button"
            }, nextArrowProps), " ", "Next");
          }
          return nextArrow;
        }
      }]);
      return NextArrow2;
    })(_react["default"].PureComponent);
    arrows.NextArrow = NextArrow;
    return arrows;
  }
  var MapShim = (function() {
    if (typeof Map !== "undefined") {
      return Map;
    }
    function getIndex(arr, key) {
      var result = -1;
      arr.some(function(entry, index2) {
        if (entry[0] === key) {
          result = index2;
          return true;
        }
        return false;
      });
      return result;
    }
    return (
      /** @class */
      (function() {
        function class_1() {
          this.__entries__ = [];
        }
        Object.defineProperty(class_1.prototype, "size", {
          /**
           * @returns {boolean}
           */
          get: function() {
            return this.__entries__.length;
          },
          enumerable: true,
          configurable: true
        });
        class_1.prototype.get = function(key) {
          var index2 = getIndex(this.__entries__, key);
          var entry = this.__entries__[index2];
          return entry && entry[1];
        };
        class_1.prototype.set = function(key, value) {
          var index2 = getIndex(this.__entries__, key);
          if (~index2) {
            this.__entries__[index2][1] = value;
          } else {
            this.__entries__.push([key, value]);
          }
        };
        class_1.prototype.delete = function(key) {
          var entries = this.__entries__;
          var index2 = getIndex(entries, key);
          if (~index2) {
            entries.splice(index2, 1);
          }
        };
        class_1.prototype.has = function(key) {
          return !!~getIndex(this.__entries__, key);
        };
        class_1.prototype.clear = function() {
          this.__entries__.splice(0);
        };
        class_1.prototype.forEach = function(callback, ctx) {
          if (ctx === void 0) {
            ctx = null;
          }
          for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
            var entry = _a[_i];
            callback.call(ctx, entry[1], entry[0]);
          }
        };
        return class_1;
      })()
    );
  })();
  var isBrowser = typeof window !== "undefined" && typeof document !== "undefined" && window.document === document;
  var global$1 = (function() {
    if (typeof global !== "undefined" && global.Math === Math) {
      return global;
    }
    if (typeof self !== "undefined" && self.Math === Math) {
      return self;
    }
    if (typeof window !== "undefined" && window.Math === Math) {
      return window;
    }
    return Function("return this")();
  })();
  var requestAnimationFrame$1 = (function() {
    if (typeof requestAnimationFrame === "function") {
      return requestAnimationFrame.bind(global$1);
    }
    return function(callback) {
      return setTimeout(function() {
        return callback(Date.now());
      }, 1e3 / 60);
    };
  })();
  var trailingTimeout = 2;
  function throttle(callback, delay) {
    var leadingCall = false, trailingCall = false, lastCallTime = 0;
    function resolvePending() {
      if (leadingCall) {
        leadingCall = false;
        callback();
      }
      if (trailingCall) {
        proxy();
      }
    }
    function timeoutCallback() {
      requestAnimationFrame$1(resolvePending);
    }
    function proxy() {
      var timeStamp = Date.now();
      if (leadingCall) {
        if (timeStamp - lastCallTime < trailingTimeout) {
          return;
        }
        trailingCall = true;
      } else {
        leadingCall = true;
        trailingCall = false;
        setTimeout(timeoutCallback, delay);
      }
      lastCallTime = timeStamp;
    }
    return proxy;
  }
  var REFRESH_DELAY = 20;
  var transitionKeys = ["top", "right", "bottom", "left", "width", "height", "size", "weight"];
  var mutationObserverSupported = typeof MutationObserver !== "undefined";
  var ResizeObserverController = (
    /** @class */
    (function() {
      function ResizeObserverController2() {
        this.connected_ = false;
        this.mutationEventsAdded_ = false;
        this.mutationsObserver_ = null;
        this.observers_ = [];
        this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
        this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
      }
      ResizeObserverController2.prototype.addObserver = function(observer) {
        if (!~this.observers_.indexOf(observer)) {
          this.observers_.push(observer);
        }
        if (!this.connected_) {
          this.connect_();
        }
      };
      ResizeObserverController2.prototype.removeObserver = function(observer) {
        var observers2 = this.observers_;
        var index2 = observers2.indexOf(observer);
        if (~index2) {
          observers2.splice(index2, 1);
        }
        if (!observers2.length && this.connected_) {
          this.disconnect_();
        }
      };
      ResizeObserverController2.prototype.refresh = function() {
        var changesDetected = this.updateObservers_();
        if (changesDetected) {
          this.refresh();
        }
      };
      ResizeObserverController2.prototype.updateObservers_ = function() {
        var activeObservers = this.observers_.filter(function(observer) {
          return observer.gatherActive(), observer.hasActive();
        });
        activeObservers.forEach(function(observer) {
          return observer.broadcastActive();
        });
        return activeObservers.length > 0;
      };
      ResizeObserverController2.prototype.connect_ = function() {
        if (!isBrowser || this.connected_) {
          return;
        }
        document.addEventListener("transitionend", this.onTransitionEnd_);
        window.addEventListener("resize", this.refresh);
        if (mutationObserverSupported) {
          this.mutationsObserver_ = new MutationObserver(this.refresh);
          this.mutationsObserver_.observe(document, {
            attributes: true,
            childList: true,
            characterData: true,
            subtree: true
          });
        } else {
          document.addEventListener("DOMSubtreeModified", this.refresh);
          this.mutationEventsAdded_ = true;
        }
        this.connected_ = true;
      };
      ResizeObserverController2.prototype.disconnect_ = function() {
        if (!isBrowser || !this.connected_) {
          return;
        }
        document.removeEventListener("transitionend", this.onTransitionEnd_);
        window.removeEventListener("resize", this.refresh);
        if (this.mutationsObserver_) {
          this.mutationsObserver_.disconnect();
        }
        if (this.mutationEventsAdded_) {
          document.removeEventListener("DOMSubtreeModified", this.refresh);
        }
        this.mutationsObserver_ = null;
        this.mutationEventsAdded_ = false;
        this.connected_ = false;
      };
      ResizeObserverController2.prototype.onTransitionEnd_ = function(_a) {
        var _b = _a.propertyName, propertyName = _b === void 0 ? "" : _b;
        var isReflowProperty = transitionKeys.some(function(key) {
          return !!~propertyName.indexOf(key);
        });
        if (isReflowProperty) {
          this.refresh();
        }
      };
      ResizeObserverController2.getInstance = function() {
        if (!this.instance_) {
          this.instance_ = new ResizeObserverController2();
        }
        return this.instance_;
      };
      ResizeObserverController2.instance_ = null;
      return ResizeObserverController2;
    })()
  );
  var defineConfigurable = (function(target, props) {
    for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
      var key = _a[_i];
      Object.defineProperty(target, key, {
        value: props[key],
        enumerable: false,
        writable: false,
        configurable: true
      });
    }
    return target;
  });
  var getWindowOf = (function(target) {
    var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
    return ownerGlobal || global$1;
  });
  var emptyRect = createRectInit(0, 0, 0, 0);
  function toFloat(value) {
    return parseFloat(value) || 0;
  }
  function getBordersSize(styles2) {
    var positions = [];
    for (var _i = 1; _i < arguments.length; _i++) {
      positions[_i - 1] = arguments[_i];
    }
    return positions.reduce(function(size, position) {
      var value = styles2["border-" + position + "-width"];
      return size + toFloat(value);
    }, 0);
  }
  function getPaddings(styles2) {
    var positions = ["top", "right", "bottom", "left"];
    var paddings = {};
    for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
      var position = positions_1[_i];
      var value = styles2["padding-" + position];
      paddings[position] = toFloat(value);
    }
    return paddings;
  }
  function getSVGContentRect(target) {
    var bbox = target.getBBox();
    return createRectInit(0, 0, bbox.width, bbox.height);
  }
  function getHTMLElementContentRect(target) {
    var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
    if (!clientWidth && !clientHeight) {
      return emptyRect;
    }
    var styles2 = getWindowOf(target).getComputedStyle(target);
    var paddings = getPaddings(styles2);
    var horizPad = paddings.left + paddings.right;
    var vertPad = paddings.top + paddings.bottom;
    var width = toFloat(styles2.width), height = toFloat(styles2.height);
    if (styles2.boxSizing === "border-box") {
      if (Math.round(width + horizPad) !== clientWidth) {
        width -= getBordersSize(styles2, "left", "right") + horizPad;
      }
      if (Math.round(height + vertPad) !== clientHeight) {
        height -= getBordersSize(styles2, "top", "bottom") + vertPad;
      }
    }
    if (!isDocumentElement(target)) {
      var vertScrollbar = Math.round(width + horizPad) - clientWidth;
      var horizScrollbar = Math.round(height + vertPad) - clientHeight;
      if (Math.abs(vertScrollbar) !== 1) {
        width -= vertScrollbar;
      }
      if (Math.abs(horizScrollbar) !== 1) {
        height -= horizScrollbar;
      }
    }
    return createRectInit(paddings.left, paddings.top, width, height);
  }
  var isSVGGraphicsElement = (function() {
    if (typeof SVGGraphicsElement !== "undefined") {
      return function(target) {
        return target instanceof getWindowOf(target).SVGGraphicsElement;
      };
    }
    return function(target) {
      return target instanceof getWindowOf(target).SVGElement && typeof target.getBBox === "function";
    };
  })();
  function isDocumentElement(target) {
    return target === getWindowOf(target).document.documentElement;
  }
  function getContentRect(target) {
    if (!isBrowser) {
      return emptyRect;
    }
    if (isSVGGraphicsElement(target)) {
      return getSVGContentRect(target);
    }
    return getHTMLElementContentRect(target);
  }
  function createReadOnlyRect(_a) {
    var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
    var Constr = typeof DOMRectReadOnly !== "undefined" ? DOMRectReadOnly : Object;
    var rect = Object.create(Constr.prototype);
    defineConfigurable(rect, {
      x,
      y,
      width,
      height,
      top: y,
      right: x + width,
      bottom: height + y,
      left: x
    });
    return rect;
  }
  function createRectInit(x, y, width, height) {
    return { x, y, width, height };
  }
  var ResizeObservation = (
    /** @class */
    (function() {
      function ResizeObservation2(target) {
        this.broadcastWidth = 0;
        this.broadcastHeight = 0;
        this.contentRect_ = createRectInit(0, 0, 0, 0);
        this.target = target;
      }
      ResizeObservation2.prototype.isActive = function() {
        var rect = getContentRect(this.target);
        this.contentRect_ = rect;
        return rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight;
      };
      ResizeObservation2.prototype.broadcastRect = function() {
        var rect = this.contentRect_;
        this.broadcastWidth = rect.width;
        this.broadcastHeight = rect.height;
        return rect;
      };
      return ResizeObservation2;
    })()
  );
  var ResizeObserverEntry = (
    /** @class */
    /* @__PURE__ */ (function() {
      function ResizeObserverEntry2(target, rectInit) {
        var contentRect = createReadOnlyRect(rectInit);
        defineConfigurable(this, { target, contentRect });
      }
      return ResizeObserverEntry2;
    })()
  );
  var ResizeObserverSPI = (
    /** @class */
    (function() {
      function ResizeObserverSPI2(callback, controller, callbackCtx) {
        this.activeObservations_ = [];
        this.observations_ = new MapShim();
        if (typeof callback !== "function") {
          throw new TypeError("The callback provided as parameter 1 is not a function.");
        }
        this.callback_ = callback;
        this.controller_ = controller;
        this.callbackCtx_ = callbackCtx;
      }
      ResizeObserverSPI2.prototype.observe = function(target) {
        if (!arguments.length) {
          throw new TypeError("1 argument required, but only 0 present.");
        }
        if (typeof Element === "undefined" || !(Element instanceof Object)) {
          return;
        }
        if (!(target instanceof getWindowOf(target).Element)) {
          throw new TypeError('parameter 1 is not of type "Element".');
        }
        var observations = this.observations_;
        if (observations.has(target)) {
          return;
        }
        observations.set(target, new ResizeObservation(target));
        this.controller_.addObserver(this);
        this.controller_.refresh();
      };
      ResizeObserverSPI2.prototype.unobserve = function(target) {
        if (!arguments.length) {
          throw new TypeError("1 argument required, but only 0 present.");
        }
        if (typeof Element === "undefined" || !(Element instanceof Object)) {
          return;
        }
        if (!(target instanceof getWindowOf(target).Element)) {
          throw new TypeError('parameter 1 is not of type "Element".');
        }
        var observations = this.observations_;
        if (!observations.has(target)) {
          return;
        }
        observations.delete(target);
        if (!observations.size) {
          this.controller_.removeObserver(this);
        }
      };
      ResizeObserverSPI2.prototype.disconnect = function() {
        this.clearActive();
        this.observations_.clear();
        this.controller_.removeObserver(this);
      };
      ResizeObserverSPI2.prototype.gatherActive = function() {
        var _this = this;
        this.clearActive();
        this.observations_.forEach(function(observation) {
          if (observation.isActive()) {
            _this.activeObservations_.push(observation);
          }
        });
      };
      ResizeObserverSPI2.prototype.broadcastActive = function() {
        if (!this.hasActive()) {
          return;
        }
        var ctx = this.callbackCtx_;
        var entries = this.activeObservations_.map(function(observation) {
          return new ResizeObserverEntry(observation.target, observation.broadcastRect());
        });
        this.callback_.call(ctx, entries, ctx);
        this.clearActive();
      };
      ResizeObserverSPI2.prototype.clearActive = function() {
        this.activeObservations_.splice(0);
      };
      ResizeObserverSPI2.prototype.hasActive = function() {
        return this.activeObservations_.length > 0;
      };
      return ResizeObserverSPI2;
    })()
  );
  var observers = typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : new MapShim();
  var ResizeObserver = (
    /** @class */
    /* @__PURE__ */ (function() {
      function ResizeObserver2(callback) {
        if (!(this instanceof ResizeObserver2)) {
          throw new TypeError("Cannot call a class as a function.");
        }
        if (!arguments.length) {
          throw new TypeError("1 argument required, but only 0 present.");
        }
        var controller = ResizeObserverController.getInstance();
        var observer = new ResizeObserverSPI(callback, controller, this);
        observers.set(this, observer);
      }
      return ResizeObserver2;
    })()
  );
  [
    "observe",
    "unobserve",
    "disconnect"
  ].forEach(function(method) {
    ResizeObserver.prototype[method] = function() {
      var _a;
      return (_a = observers.get(this))[method].apply(_a, arguments);
    };
  });
  var index = (function() {
    if (typeof global$1.ResizeObserver !== "undefined") {
      return global$1.ResizeObserver;
    }
    return ResizeObserver;
  })();
  const ResizeObserver_es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    default: index
  }, Symbol.toStringTag, { value: "Module" }));
  const require$$8 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
  var hasRequiredInnerSlider;
  function requireInnerSlider() {
    if (hasRequiredInnerSlider) return innerSlider;
    hasRequiredInnerSlider = 1;
    Object.defineProperty(innerSlider, "__esModule", {
      value: true
    });
    innerSlider.InnerSlider = void 0;
    var _react = _interopRequireDefault(requireReact());
    var _initialState = _interopRequireDefault(requireInitialState());
    var _lodash = _interopRequireDefault(requireLodash_debounce());
    var _classnames = _interopRequireDefault(requireClassnames());
    var _innerSliderUtils = requireInnerSliderUtils();
    var _track = requireTrack();
    var _dots = requireDots();
    var _arrows = requireArrows();
    var _resizeObserverPolyfill = _interopRequireDefault(require$$8);
    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { "default": obj };
    }
    function _typeof(obj) {
      "@babel/helpers - typeof";
      if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
        _typeof = function _typeof2(obj2) {
          return typeof obj2;
        };
      } else {
        _typeof = function _typeof2(obj2) {
          return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
        };
      }
      return _typeof(obj);
    }
    function _extends2() {
      _extends2 = Object.assign || function(target) {
        for (var i = 1; i < arguments.length; i++) {
          var source = arguments[i];
          for (var key in source) {
            if (Object.prototype.hasOwnProperty.call(source, key)) {
              target[key] = source[key];
            }
          }
        }
        return target;
      };
      return _extends2.apply(this, arguments);
    }
    function _objectWithoutProperties(source, excluded) {
      if (source == null) return {};
      var target = _objectWithoutPropertiesLoose2(source, excluded);
      var key, i;
      if (Object.getOwnPropertySymbols) {
        var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
        for (i = 0; i < sourceSymbolKeys.length; i++) {
          key = sourceSymbolKeys[i];
          if (excluded.indexOf(key) >= 0) continue;
          if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
          target[key] = source[key];
        }
      }
      return target;
    }
    function _objectWithoutPropertiesLoose2(source, excluded) {
      if (source == null) return {};
      var target = {};
      var sourceKeys = Object.keys(source);
      var key, i;
      for (i = 0; i < sourceKeys.length; i++) {
        key = sourceKeys[i];
        if (excluded.indexOf(key) >= 0) continue;
        target[key] = source[key];
      }
      return target;
    }
    function ownKeys(object, enumerableOnly) {
      var keys = Object.keys(object);
      if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        if (enumerableOnly) symbols = symbols.filter(function(sym) {
          return Object.getOwnPropertyDescriptor(object, sym).enumerable;
        });
        keys.push.apply(keys, symbols);
      }
      return keys;
    }
    function _objectSpread(target) {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i] != null ? arguments[i] : {};
        if (i % 2) {
          ownKeys(Object(source), true).forEach(function(key) {
            _defineProperty(target, key, source[key]);
          });
        } else if (Object.getOwnPropertyDescriptors) {
          Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
        } else {
          ownKeys(Object(source)).forEach(function(key) {
            Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
          });
        }
      }
      return target;
    }
    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }
    function _defineProperties(target, props) {
      for (var i = 0; i < props.length; i++) {
        var descriptor = props[i];
        descriptor.enumerable = descriptor.enumerable || false;
        descriptor.configurable = true;
        if ("value" in descriptor) descriptor.writable = true;
        Object.defineProperty(target, descriptor.key, descriptor);
      }
    }
    function _createClass(Constructor, protoProps, staticProps) {
      if (protoProps) _defineProperties(Constructor.prototype, protoProps);
      return Constructor;
    }
    function _inherits(subClass, superClass) {
      if (typeof superClass !== "function" && superClass !== null) {
        throw new TypeError("Super expression must either be null or a function");
      }
      subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
      if (superClass) _setPrototypeOf2(subClass, superClass);
    }
    function _setPrototypeOf2(o, p) {
      _setPrototypeOf2 = Object.setPrototypeOf || function _setPrototypeOf3(o2, p2) {
        o2.__proto__ = p2;
        return o2;
      };
      return _setPrototypeOf2(o, p);
    }
    function _createSuper(Derived) {
      var hasNativeReflectConstruct = _isNativeReflectConstruct();
      return function _createSuperInternal() {
        var Super = _getPrototypeOf(Derived), result;
        if (hasNativeReflectConstruct) {
          var NewTarget = _getPrototypeOf(this).constructor;
          result = Reflect.construct(Super, arguments, NewTarget);
        } else {
          result = Super.apply(this, arguments);
        }
        return _possibleConstructorReturn(this, result);
      };
    }
    function _possibleConstructorReturn(self2, call) {
      if (call && (_typeof(call) === "object" || typeof call === "function")) {
        return call;
      }
      return _assertThisInitialized(self2);
    }
    function _assertThisInitialized(self2) {
      if (self2 === void 0) {
        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
      }
      return self2;
    }
    function _isNativeReflectConstruct() {
      if (typeof Reflect === "undefined" || !Reflect.construct) return false;
      if (Reflect.construct.sham) return false;
      if (typeof Proxy === "function") return true;
      try {
        Date.prototype.toString.call(Reflect.construct(Date, [], function() {
        }));
        return true;
      } catch (e) {
        return false;
      }
    }
    function _getPrototypeOf(o) {
      _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
        return o2.__proto__ || Object.getPrototypeOf(o2);
      };
      return _getPrototypeOf(o);
    }
    function _defineProperty(obj, key, value) {
      if (key in obj) {
        Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key] = value;
      }
      return obj;
    }
    var InnerSlider = /* @__PURE__ */ (function(_React$Component) {
      _inherits(InnerSlider2, _React$Component);
      var _super = _createSuper(InnerSlider2);
      function InnerSlider2(props) {
        var _this;
        _classCallCheck(this, InnerSlider2);
        _this = _super.call(this, props);
        _defineProperty(_assertThisInitialized(_this), "listRefHandler", function(ref) {
          return _this.list = ref;
        });
        _defineProperty(_assertThisInitialized(_this), "trackRefHandler", function(ref) {
          return _this.track = ref;
        });
        _defineProperty(_assertThisInitialized(_this), "adaptHeight", function() {
          if (_this.props.adaptiveHeight && _this.list) {
            var elem = _this.list.querySelector('[data-index="'.concat(_this.state.currentSlide, '"]'));
            _this.list.style.height = (0, _innerSliderUtils.getHeight)(elem) + "px";
          }
        });
        _defineProperty(_assertThisInitialized(_this), "componentDidMount", function() {
          _this.props.onInit && _this.props.onInit();
          if (_this.props.lazyLoad) {
            var slidesToLoad = (0, _innerSliderUtils.getOnDemandLazySlides)(_objectSpread(_objectSpread({}, _this.props), _this.state));
            if (slidesToLoad.length > 0) {
              _this.setState(function(prevState) {
                return {
                  lazyLoadedList: prevState.lazyLoadedList.concat(slidesToLoad)
                };
              });
              if (_this.props.onLazyLoad) {
                _this.props.onLazyLoad(slidesToLoad);
              }
            }
          }
          var spec = _objectSpread({
            listRef: _this.list,
            trackRef: _this.track
          }, _this.props);
          _this.updateState(spec, true, function() {
            _this.adaptHeight();
            _this.props.autoplay && _this.autoPlay("update");
          });
          if (_this.props.lazyLoad === "progressive") {
            _this.lazyLoadTimer = setInterval(_this.progressiveLazyLoad, 1e3);
          }
          _this.ro = new _resizeObserverPolyfill["default"](function() {
            if (_this.state.animating) {
              _this.onWindowResized(false);
              _this.callbackTimers.push(setTimeout(function() {
                return _this.onWindowResized();
              }, _this.props.speed));
            } else {
              _this.onWindowResized();
            }
          });
          _this.ro.observe(_this.list);
          document.querySelectorAll && Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"), function(slide) {
            slide.onfocus = _this.props.pauseOnFocus ? _this.onSlideFocus : null;
            slide.onblur = _this.props.pauseOnFocus ? _this.onSlideBlur : null;
          });
          if (window.addEventListener) {
            window.addEventListener("resize", _this.onWindowResized);
          } else {
            window.attachEvent("onresize", _this.onWindowResized);
          }
        });
        _defineProperty(_assertThisInitialized(_this), "componentWillUnmount", function() {
          if (_this.animationEndCallback) {
            clearTimeout(_this.animationEndCallback);
          }
          if (_this.lazyLoadTimer) {
            clearInterval(_this.lazyLoadTimer);
          }
          if (_this.callbackTimers.length) {
            _this.callbackTimers.forEach(function(timer) {
              return clearTimeout(timer);
            });
            _this.callbackTimers = [];
          }
          if (window.addEventListener) {
            window.removeEventListener("resize", _this.onWindowResized);
          } else {
            window.detachEvent("onresize", _this.onWindowResized);
          }
          if (_this.autoplayTimer) {
            clearInterval(_this.autoplayTimer);
          }
          _this.ro.disconnect();
        });
        _defineProperty(_assertThisInitialized(_this), "componentDidUpdate", function(prevProps) {
          _this.checkImagesLoad();
          _this.props.onReInit && _this.props.onReInit();
          if (_this.props.lazyLoad) {
            var slidesToLoad = (0, _innerSliderUtils.getOnDemandLazySlides)(_objectSpread(_objectSpread({}, _this.props), _this.state));
            if (slidesToLoad.length > 0) {
              _this.setState(function(prevState) {
                return {
                  lazyLoadedList: prevState.lazyLoadedList.concat(slidesToLoad)
                };
              });
              if (_this.props.onLazyLoad) {
                _this.props.onLazyLoad(slidesToLoad);
              }
            }
          }
          _this.adaptHeight();
          var spec = _objectSpread(_objectSpread({
            listRef: _this.list,
            trackRef: _this.track
          }, _this.props), _this.state);
          var setTrackStyle = _this.didPropsChange(prevProps);
          setTrackStyle && _this.updateState(spec, setTrackStyle, function() {
            if (_this.state.currentSlide >= _react["default"].Children.count(_this.props.children)) {
              _this.changeSlide({
                message: "index",
                index: _react["default"].Children.count(_this.props.children) - _this.props.slidesToShow,
                currentSlide: _this.state.currentSlide
              });
            }
            if (_this.props.autoplay) {
              _this.autoPlay("update");
            } else {
              _this.pause("paused");
            }
          });
        });
        _defineProperty(_assertThisInitialized(_this), "onWindowResized", function(setTrackStyle) {
          if (_this.debouncedResize) _this.debouncedResize.cancel();
          _this.debouncedResize = (0, _lodash["default"])(function() {
            return _this.resizeWindow(setTrackStyle);
          }, 50);
          _this.debouncedResize();
        });
        _defineProperty(_assertThisInitialized(_this), "resizeWindow", function() {
          var setTrackStyle = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
          var isTrackMounted = Boolean(_this.track && _this.track.node);
          if (!isTrackMounted) return;
          var spec = _objectSpread(_objectSpread({
            listRef: _this.list,
            trackRef: _this.track
          }, _this.props), _this.state);
          _this.updateState(spec, setTrackStyle, function() {
            if (_this.props.autoplay) _this.autoPlay("update");
            else _this.pause("paused");
          });
          _this.setState({
            animating: false
          });
          clearTimeout(_this.animationEndCallback);
          delete _this.animationEndCallback;
        });
        _defineProperty(_assertThisInitialized(_this), "updateState", function(spec, setTrackStyle, callback) {
          var updatedState = (0, _innerSliderUtils.initializedState)(spec);
          spec = _objectSpread(_objectSpread(_objectSpread({}, spec), updatedState), {}, {
            slideIndex: updatedState.currentSlide
          });
          var targetLeft = (0, _innerSliderUtils.getTrackLeft)(spec);
          spec = _objectSpread(_objectSpread({}, spec), {}, {
            left: targetLeft
          });
          var trackStyle = (0, _innerSliderUtils.getTrackCSS)(spec);
          if (setTrackStyle || _react["default"].Children.count(_this.props.children) !== _react["default"].Children.count(spec.children)) {
            updatedState["trackStyle"] = trackStyle;
          }
          _this.setState(updatedState, callback);
        });
        _defineProperty(_assertThisInitialized(_this), "ssrInit", function() {
          if (_this.props.variableWidth) {
            var _trackWidth = 0, _trackLeft = 0;
            var childrenWidths = [];
            var preClones = (0, _innerSliderUtils.getPreClones)(_objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {
              slideCount: _this.props.children.length
            }));
            var postClones = (0, _innerSliderUtils.getPostClones)(_objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {
              slideCount: _this.props.children.length
            }));
            _this.props.children.forEach(function(child) {
              childrenWidths.push(child.props.style.width);
              _trackWidth += child.props.style.width;
            });
            for (var i = 0; i < preClones; i++) {
              _trackLeft += childrenWidths[childrenWidths.length - 1 - i];
              _trackWidth += childrenWidths[childrenWidths.length - 1 - i];
            }
            for (var _i = 0; _i < postClones; _i++) {
              _trackWidth += childrenWidths[_i];
            }
            for (var _i2 = 0; _i2 < _this.state.currentSlide; _i2++) {
              _trackLeft += childrenWidths[_i2];
            }
            var _trackStyle = {
              width: _trackWidth + "px",
              left: -_trackLeft + "px"
            };
            if (_this.props.centerMode) {
              var currentWidth = "".concat(childrenWidths[_this.state.currentSlide], "px");
              _trackStyle.left = "calc(".concat(_trackStyle.left, " + (100% - ").concat(currentWidth, ") / 2 ) ");
            }
            return {
              trackStyle: _trackStyle
            };
          }
          var childrenCount = _react["default"].Children.count(_this.props.children);
          var spec = _objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {
            slideCount: childrenCount
          });
          var slideCount = (0, _innerSliderUtils.getPreClones)(spec) + (0, _innerSliderUtils.getPostClones)(spec) + childrenCount;
          var trackWidth = 100 / _this.props.slidesToShow * slideCount;
          var slideWidth = 100 / slideCount;
          var trackLeft = -slideWidth * ((0, _innerSliderUtils.getPreClones)(spec) + _this.state.currentSlide) * trackWidth / 100;
          if (_this.props.centerMode) {
            trackLeft += (100 - slideWidth * trackWidth / 100) / 2;
          }
          var trackStyle = {
            width: trackWidth + "%",
            left: trackLeft + "%"
          };
          return {
            slideWidth: slideWidth + "%",
            trackStyle
          };
        });
        _defineProperty(_assertThisInitialized(_this), "checkImagesLoad", function() {
          var images2 = _this.list && _this.list.querySelectorAll && _this.list.querySelectorAll(".slick-slide img") || [];
          var imagesCount = images2.length, loadedCount = 0;
          Array.prototype.forEach.call(images2, function(image2) {
            var handler = function handler2() {
              return ++loadedCount && loadedCount >= imagesCount && _this.onWindowResized();
            };
            if (!image2.onclick) {
              image2.onclick = function() {
                return image2.parentNode.focus();
              };
            } else {
              var prevClickHandler = image2.onclick;
              image2.onclick = function() {
                prevClickHandler();
                image2.parentNode.focus();
              };
            }
            if (!image2.onload) {
              if (_this.props.lazyLoad) {
                image2.onload = function() {
                  _this.adaptHeight();
                  _this.callbackTimers.push(setTimeout(_this.onWindowResized, _this.props.speed));
                };
              } else {
                image2.onload = handler;
                image2.onerror = function() {
                  handler();
                  _this.props.onLazyLoadError && _this.props.onLazyLoadError();
                };
              }
            }
          });
        });
        _defineProperty(_assertThisInitialized(_this), "progressiveLazyLoad", function() {
          var slidesToLoad = [];
          var spec = _objectSpread(_objectSpread({}, _this.props), _this.state);
          for (var index2 = _this.state.currentSlide; index2 < _this.state.slideCount + (0, _innerSliderUtils.getPostClones)(spec); index2++) {
            if (_this.state.lazyLoadedList.indexOf(index2) < 0) {
              slidesToLoad.push(index2);
              break;
            }
          }
          for (var _index = _this.state.currentSlide - 1; _index >= -(0, _innerSliderUtils.getPreClones)(spec); _index--) {
            if (_this.state.lazyLoadedList.indexOf(_index) < 0) {
              slidesToLoad.push(_index);
              break;
            }
          }
          if (slidesToLoad.length > 0) {
            _this.setState(function(state) {
              return {
                lazyLoadedList: state.lazyLoadedList.concat(slidesToLoad)
              };
            });
            if (_this.props.onLazyLoad) {
              _this.props.onLazyLoad(slidesToLoad);
            }
          } else {
            if (_this.lazyLoadTimer) {
              clearInterval(_this.lazyLoadTimer);
              delete _this.lazyLoadTimer;
            }
          }
        });
        _defineProperty(_assertThisInitialized(_this), "slideHandler", function(index2) {
          var dontAnimate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
          var _this$props = _this.props, asNavFor = _this$props.asNavFor, beforeChange = _this$props.beforeChange, onLazyLoad = _this$props.onLazyLoad, speed = _this$props.speed, afterChange = _this$props.afterChange;
          var currentSlide = _this.state.currentSlide;
          var _slideHandler = (0, _innerSliderUtils.slideHandler)(_objectSpread(_objectSpread(_objectSpread({
            index: index2
          }, _this.props), _this.state), {}, {
            trackRef: _this.track,
            useCSS: _this.props.useCSS && !dontAnimate
          })), state = _slideHandler.state, nextState = _slideHandler.nextState;
          if (!state) return;
          beforeChange && beforeChange(currentSlide, state.currentSlide);
          var slidesToLoad = state.lazyLoadedList.filter(function(value) {
            return _this.state.lazyLoadedList.indexOf(value) < 0;
          });
          onLazyLoad && slidesToLoad.length > 0 && onLazyLoad(slidesToLoad);
          if (!_this.props.waitForAnimate && _this.animationEndCallback) {
            clearTimeout(_this.animationEndCallback);
            afterChange && afterChange(currentSlide);
            delete _this.animationEndCallback;
          }
          _this.setState(state, function() {
            if (asNavFor && _this.asNavForIndex !== index2) {
              _this.asNavForIndex = index2;
              asNavFor.innerSlider.slideHandler(index2);
            }
            if (!nextState) return;
            _this.animationEndCallback = setTimeout(function() {
              var animating = nextState.animating, firstBatch = _objectWithoutProperties(nextState, ["animating"]);
              _this.setState(firstBatch, function() {
                _this.callbackTimers.push(setTimeout(function() {
                  return _this.setState({
                    animating
                  });
                }, 10));
                afterChange && afterChange(state.currentSlide);
                delete _this.animationEndCallback;
              });
            }, speed);
          });
        });
        _defineProperty(_assertThisInitialized(_this), "changeSlide", function(options) {
          var dontAnimate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
          var spec = _objectSpread(_objectSpread({}, _this.props), _this.state);
          var targetSlide = (0, _innerSliderUtils.changeSlide)(spec, options);
          if (targetSlide !== 0 && !targetSlide) return;
          if (dontAnimate === true) {
            _this.slideHandler(targetSlide, dontAnimate);
          } else {
            _this.slideHandler(targetSlide);
          }
          _this.props.autoplay && _this.autoPlay("update");
          if (_this.props.focusOnSelect) {
            var nodes = _this.list.querySelectorAll(".slick-current");
            nodes[0] && nodes[0].focus();
          }
        });
        _defineProperty(_assertThisInitialized(_this), "clickHandler", function(e) {
          if (_this.clickable === false) {
            e.stopPropagation();
            e.preventDefault();
          }
          _this.clickable = true;
        });
        _defineProperty(_assertThisInitialized(_this), "keyHandler", function(e) {
          var dir = (0, _innerSliderUtils.keyHandler)(e, _this.props.accessibility, _this.props.rtl);
          dir !== "" && _this.changeSlide({
            message: dir
          });
        });
        _defineProperty(_assertThisInitialized(_this), "selectHandler", function(options) {
          _this.changeSlide(options);
        });
        _defineProperty(_assertThisInitialized(_this), "disableBodyScroll", function() {
          var preventDefault = function preventDefault2(e) {
            e = e || window.event;
            if (e.preventDefault) e.preventDefault();
            e.returnValue = false;
          };
          window.ontouchmove = preventDefault;
        });
        _defineProperty(_assertThisInitialized(_this), "enableBodyScroll", function() {
          window.ontouchmove = null;
        });
        _defineProperty(_assertThisInitialized(_this), "swipeStart", function(e) {
          if (_this.props.verticalSwiping) {
            _this.disableBodyScroll();
          }
          var state = (0, _innerSliderUtils.swipeStart)(e, _this.props.swipe, _this.props.draggable);
          state !== "" && _this.setState(state);
        });
        _defineProperty(_assertThisInitialized(_this), "swipeMove", function(e) {
          var state = (0, _innerSliderUtils.swipeMove)(e, _objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {
            trackRef: _this.track,
            listRef: _this.list,
            slideIndex: _this.state.currentSlide
          }));
          if (!state) return;
          if (state["swiping"]) {
            _this.clickable = false;
          }
          _this.setState(state);
        });
        _defineProperty(_assertThisInitialized(_this), "swipeEnd", function(e) {
          var state = (0, _innerSliderUtils.swipeEnd)(e, _objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {
            trackRef: _this.track,
            listRef: _this.list,
            slideIndex: _this.state.currentSlide
          }));
          if (!state) return;
          var triggerSlideHandler = state["triggerSlideHandler"];
          delete state["triggerSlideHandler"];
          _this.setState(state);
          if (triggerSlideHandler === void 0) return;
          _this.slideHandler(triggerSlideHandler);
          if (_this.props.verticalSwiping) {
            _this.enableBodyScroll();
          }
        });
        _defineProperty(_assertThisInitialized(_this), "touchEnd", function(e) {
          _this.swipeEnd(e);
          _this.clickable = true;
        });
        _defineProperty(_assertThisInitialized(_this), "slickPrev", function() {
          _this.callbackTimers.push(setTimeout(function() {
            return _this.changeSlide({
              message: "previous"
            });
          }, 0));
        });
        _defineProperty(_assertThisInitialized(_this), "slickNext", function() {
          _this.callbackTimers.push(setTimeout(function() {
            return _this.changeSlide({
              message: "next"
            });
          }, 0));
        });
        _defineProperty(_assertThisInitialized(_this), "slickGoTo", function(slide) {
          var dontAnimate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
          slide = Number(slide);
          if (isNaN(slide)) return "";
          _this.callbackTimers.push(setTimeout(function() {
            return _this.changeSlide({
              message: "index",
              index: slide,
              currentSlide: _this.state.currentSlide
            }, dontAnimate);
          }, 0));
        });
        _defineProperty(_assertThisInitialized(_this), "play", function() {
          var nextIndex;
          if (_this.props.rtl) {
            nextIndex = _this.state.currentSlide - _this.props.slidesToScroll;
          } else {
            if ((0, _innerSliderUtils.canGoNext)(_objectSpread(_objectSpread({}, _this.props), _this.state))) {
              nextIndex = _this.state.currentSlide + _this.props.slidesToScroll;
            } else {
              return false;
            }
          }
          _this.slideHandler(nextIndex);
        });
        _defineProperty(_assertThisInitialized(_this), "autoPlay", function(playType) {
          if (_this.autoplayTimer) {
            clearInterval(_this.autoplayTimer);
          }
          var autoplaying = _this.state.autoplaying;
          if (playType === "update") {
            if (autoplaying === "hovered" || autoplaying === "focused" || autoplaying === "paused") {
              return;
            }
          } else if (playType === "leave") {
            if (autoplaying === "paused" || autoplaying === "focused") {
              return;
            }
          } else if (playType === "blur") {
            if (autoplaying === "paused" || autoplaying === "hovered") {
              return;
            }
          }
          _this.autoplayTimer = setInterval(_this.play, _this.props.autoplaySpeed + 50);
          _this.setState({
            autoplaying: "playing"
          });
        });
        _defineProperty(_assertThisInitialized(_this), "pause", function(pauseType) {
          if (_this.autoplayTimer) {
            clearInterval(_this.autoplayTimer);
            _this.autoplayTimer = null;
          }
          var autoplaying = _this.state.autoplaying;
          if (pauseType === "paused") {
            _this.setState({
              autoplaying: "paused"
            });
          } else if (pauseType === "focused") {
            if (autoplaying === "hovered" || autoplaying === "playing") {
              _this.setState({
                autoplaying: "focused"
              });
            }
          } else {
            if (autoplaying === "playing") {
              _this.setState({
                autoplaying: "hovered"
              });
            }
          }
        });
        _defineProperty(_assertThisInitialized(_this), "onDotsOver", function() {
          return _this.props.autoplay && _this.pause("hovered");
        });
        _defineProperty(_assertThisInitialized(_this), "onDotsLeave", function() {
          return _this.props.autoplay && _this.state.autoplaying === "hovered" && _this.autoPlay("leave");
        });
        _defineProperty(_assertThisInitialized(_this), "onTrackOver", function() {
          return _this.props.autoplay && _this.pause("hovered");
        });
        _defineProperty(_assertThisInitialized(_this), "onTrackLeave", function() {
          return _this.props.autoplay && _this.state.autoplaying === "hovered" && _this.autoPlay("leave");
        });
        _defineProperty(_assertThisInitialized(_this), "onSlideFocus", function() {
          return _this.props.autoplay && _this.pause("focused");
        });
        _defineProperty(_assertThisInitialized(_this), "onSlideBlur", function() {
          return _this.props.autoplay && _this.state.autoplaying === "focused" && _this.autoPlay("blur");
        });
        _defineProperty(_assertThisInitialized(_this), "render", function() {
          var className = (0, _classnames["default"])("slick-slider", _this.props.className, {
            "slick-vertical": _this.props.vertical,
            "slick-initialized": true
          });
          var spec = _objectSpread(_objectSpread({}, _this.props), _this.state);
          var trackProps = (0, _innerSliderUtils.extractObject)(spec, ["fade", "cssEase", "speed", "infinite", "centerMode", "focusOnSelect", "currentSlide", "lazyLoad", "lazyLoadedList", "rtl", "slideWidth", "slideHeight", "listHeight", "vertical", "slidesToShow", "slidesToScroll", "slideCount", "trackStyle", "variableWidth", "unslick", "centerPadding", "targetSlide", "useCSS"]);
          var pauseOnHover = _this.props.pauseOnHover;
          trackProps = _objectSpread(_objectSpread({}, trackProps), {}, {
            onMouseEnter: pauseOnHover ? _this.onTrackOver : null,
            onMouseLeave: pauseOnHover ? _this.onTrackLeave : null,
            onMouseOver: pauseOnHover ? _this.onTrackOver : null,
            focusOnSelect: _this.props.focusOnSelect && _this.clickable ? _this.selectHandler : null
          });
          var dots2;
          if (_this.props.dots === true && _this.state.slideCount >= _this.props.slidesToShow) {
            var dotProps = (0, _innerSliderUtils.extractObject)(spec, ["dotsClass", "slideCount", "slidesToShow", "currentSlide", "slidesToScroll", "clickHandler", "children", "customPaging", "infinite", "appendDots"]);
            var pauseOnDotsHover = _this.props.pauseOnDotsHover;
            dotProps = _objectSpread(_objectSpread({}, dotProps), {}, {
              clickHandler: _this.changeSlide,
              onMouseEnter: pauseOnDotsHover ? _this.onDotsLeave : null,
              onMouseOver: pauseOnDotsHover ? _this.onDotsOver : null,
              onMouseLeave: pauseOnDotsHover ? _this.onDotsLeave : null
            });
            dots2 = /* @__PURE__ */ _react["default"].createElement(_dots.Dots, dotProps);
          }
          var prevArrow, nextArrow;
          var arrowProps = (0, _innerSliderUtils.extractObject)(spec, ["infinite", "centerMode", "currentSlide", "slideCount", "slidesToShow", "prevArrow", "nextArrow"]);
          arrowProps.clickHandler = _this.changeSlide;
          if (_this.props.arrows) {
            prevArrow = /* @__PURE__ */ _react["default"].createElement(_arrows.PrevArrow, arrowProps);
            nextArrow = /* @__PURE__ */ _react["default"].createElement(_arrows.NextArrow, arrowProps);
          }
          var verticalHeightStyle = null;
          if (_this.props.vertical) {
            verticalHeightStyle = {
              height: _this.state.listHeight
            };
          }
          var centerPaddingStyle = null;
          if (_this.props.vertical === false) {
            if (_this.props.centerMode === true) {
              centerPaddingStyle = {
                padding: "0px " + _this.props.centerPadding
              };
            }
          } else {
            if (_this.props.centerMode === true) {
              centerPaddingStyle = {
                padding: _this.props.centerPadding + " 0px"
              };
            }
          }
          var listStyle = _objectSpread(_objectSpread({}, verticalHeightStyle), centerPaddingStyle);
          var touchMove = _this.props.touchMove;
          var listProps = {
            className: "slick-list",
            style: listStyle,
            onClick: _this.clickHandler,
            onMouseDown: touchMove ? _this.swipeStart : null,
            onMouseMove: _this.state.dragging && touchMove ? _this.swipeMove : null,
            onMouseUp: touchMove ? _this.swipeEnd : null,
            onMouseLeave: _this.state.dragging && touchMove ? _this.swipeEnd : null,
            onTouchStart: touchMove ? _this.swipeStart : null,
            onTouchMove: _this.state.dragging && touchMove ? _this.swipeMove : null,
            onTouchEnd: touchMove ? _this.touchEnd : null,
            onTouchCancel: _this.state.dragging && touchMove ? _this.swipeEnd : null,
            onKeyDown: _this.props.accessibility ? _this.keyHandler : null
          };
          var innerSliderProps = {
            className,
            dir: "ltr",
            style: _this.props.style
          };
          if (_this.props.unslick) {
            listProps = {
              className: "slick-list"
            };
            innerSliderProps = {
              className
            };
          }
          return /* @__PURE__ */ _react["default"].createElement("div", innerSliderProps, !_this.props.unslick ? prevArrow : "", /* @__PURE__ */ _react["default"].createElement("div", _extends2({
            ref: _this.listRefHandler
          }, listProps), /* @__PURE__ */ _react["default"].createElement(_track.Track, _extends2({
            ref: _this.trackRefHandler
          }, trackProps), _this.props.children)), !_this.props.unslick ? nextArrow : "", !_this.props.unslick ? dots2 : "");
        });
        _this.list = null;
        _this.track = null;
        _this.state = _objectSpread(_objectSpread({}, _initialState["default"]), {}, {
          currentSlide: _this.props.initialSlide,
          slideCount: _react["default"].Children.count(_this.props.children)
        });
        _this.callbackTimers = [];
        _this.clickable = true;
        _this.debouncedResize = null;
        var ssrState = _this.ssrInit();
        _this.state = _objectSpread(_objectSpread({}, _this.state), ssrState);
        return _this;
      }
      _createClass(InnerSlider2, [{
        key: "didPropsChange",
        value: function didPropsChange(prevProps) {
          var setTrackStyle = false;
          for (var _i3 = 0, _Object$keys = Object.keys(this.props); _i3 < _Object$keys.length; _i3++) {
            var key = _Object$keys[_i3];
            if (!prevProps.hasOwnProperty(key)) {
              setTrackStyle = true;
              break;
            }
            if (_typeof(prevProps[key]) === "object" || typeof prevProps[key] === "function") {
              continue;
            }
            if (prevProps[key] !== this.props[key]) {
              setTrackStyle = true;
              break;
            }
          }
          return setTrackStyle || _react["default"].Children.count(this.props.children) !== _react["default"].Children.count(prevProps.children);
        }
      }]);
      return InnerSlider2;
    })(_react["default"].Component);
    innerSlider.InnerSlider = InnerSlider;
    return innerSlider;
  }
  var camel2hyphen_1;
  var hasRequiredCamel2hyphen;
  function requireCamel2hyphen() {
    if (hasRequiredCamel2hyphen) return camel2hyphen_1;
    hasRequiredCamel2hyphen = 1;
    var camel2hyphen = function(str) {
      return str.replace(/[A-Z]/g, function(match) {
        return "-" + match.toLowerCase();
      }).toLowerCase();
    };
    camel2hyphen_1 = camel2hyphen;
    return camel2hyphen_1;
  }
  var json2mq_1;
  var hasRequiredJson2mq;
  function requireJson2mq() {
    if (hasRequiredJson2mq) return json2mq_1;
    hasRequiredJson2mq = 1;
    var camel2hyphen = requireCamel2hyphen();
    var isDimension = function(feature) {
      var re = /[height|width]$/;
      return re.test(feature);
    };
    var obj2mq = function(obj) {
      var mq = "";
      var features2 = Object.keys(obj);
      features2.forEach(function(feature, index2) {
        var value = obj[feature];
        feature = camel2hyphen(feature);
        if (isDimension(feature) && typeof value === "number") {
          value = value + "px";
        }
        if (value === true) {
          mq += feature;
        } else if (value === false) {
          mq += "not " + feature;
        } else {
          mq += "(" + feature + ": " + value + ")";
        }
        if (index2 < features2.length - 1) {
          mq += " and ";
        }
      });
      return mq;
    };
    var json2mq = function(query) {
      var mq = "";
      if (typeof query === "string") {
        return query;
      }
      if (query instanceof Array) {
        query.forEach(function(q, index2) {
          mq += obj2mq(q);
          if (index2 < query.length - 1) {
            mq += ", ";
          }
        });
        return mq;
      }
      return obj2mq(query);
    };
    json2mq_1 = json2mq;
    return json2mq_1;
  }
  var defaultProps = {};
  var hasRequiredDefaultProps;
  function requireDefaultProps() {
    if (hasRequiredDefaultProps) return defaultProps;
    hasRequiredDefaultProps = 1;
    (function(exports) {
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      exports["default"] = void 0;
      var _react = _interopRequireDefault(requireReact());
      function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : { "default": obj };
      }
      var defaultProps2 = {
        accessibility: true,
        adaptiveHeight: false,
        afterChange: null,
        appendDots: function appendDots(dots2) {
          return /* @__PURE__ */ _react["default"].createElement("ul", {
            style: {
              display: "block"
            }
          }, dots2);
        },
        arrows: true,
        autoplay: false,
        autoplaySpeed: 3e3,
        beforeChange: null,
        centerMode: false,
        centerPadding: "50px",
        className: "",
        cssEase: "ease",
        customPaging: function customPaging(i) {
          return /* @__PURE__ */ _react["default"].createElement("button", null, i + 1);
        },
        dots: false,
        dotsClass: "slick-dots",
        draggable: true,
        easing: "linear",
        edgeFriction: 0.35,
        fade: false,
        focusOnSelect: false,
        infinite: true,
        initialSlide: 0,
        lazyLoad: null,
        nextArrow: null,
        onEdge: null,
        onInit: null,
        onLazyLoadError: null,
        onReInit: null,
        pauseOnDotsHover: false,
        pauseOnFocus: false,
        pauseOnHover: true,
        prevArrow: null,
        responsive: null,
        rows: 1,
        rtl: false,
        slide: "div",
        slidesPerRow: 1,
        slidesToScroll: 1,
        slidesToShow: 1,
        speed: 500,
        swipe: true,
        swipeEvent: null,
        swipeToSlide: false,
        touchMove: true,
        touchThreshold: 5,
        useCSS: true,
        useTransform: true,
        variableWidth: false,
        vertical: false,
        waitForAnimate: true
      };
      var _default = defaultProps2;
      exports["default"] = _default;
    })(defaultProps);
    return defaultProps;
  }
  var QueryHandler_1;
  var hasRequiredQueryHandler;
  function requireQueryHandler() {
    if (hasRequiredQueryHandler) return QueryHandler_1;
    hasRequiredQueryHandler = 1;
    function QueryHandler(options) {
      this.options = options;
      !options.deferSetup && this.setup();
    }
    QueryHandler.prototype = {
      constructor: QueryHandler,
      /**
       * coordinates setup of the handler
       *
       * @function
       */
      setup: function() {
        if (this.options.setup) {
          this.options.setup();
        }
        this.initialised = true;
      },
      /**
       * coordinates setup and triggering of the handler
       *
       * @function
       */
      on: function() {
        !this.initialised && this.setup();
        this.options.match && this.options.match();
      },
      /**
       * coordinates the unmatch event for the handler
       *
       * @function
       */
      off: function() {
        this.options.unmatch && this.options.unmatch();
      },
      /**
       * called when a handler is to be destroyed.
       * delegates to the destroy or unmatch callbacks, depending on availability.
       *
       * @function
       */
      destroy: function() {
        this.options.destroy ? this.options.destroy() : this.off();
      },
      /**
       * determines equality by reference.
       * if object is supplied compare options, if function, compare match callback
       *
       * @function
       * @param {object || function} [target] the target for comparison
       */
      equals: function(target) {
        return this.options === target || this.options.match === target;
      }
    };
    QueryHandler_1 = QueryHandler;
    return QueryHandler_1;
  }
  var Util;
  var hasRequiredUtil;
  function requireUtil() {
    if (hasRequiredUtil) return Util;
    hasRequiredUtil = 1;
    function each(collection, fn) {
      var i = 0, length = collection.length, cont;
      for (i; i < length; i++) {
        cont = fn(collection[i], i);
        if (cont === false) {
          break;
        }
      }
    }
    function isArray(target) {
      return Object.prototype.toString.apply(target) === "[object Array]";
    }
    function isFunction(target) {
      return typeof target === "function";
    }
    Util = {
      isFunction,
      isArray,
      each
    };
    return Util;
  }
  var MediaQuery_1;
  var hasRequiredMediaQuery;
  function requireMediaQuery() {
    if (hasRequiredMediaQuery) return MediaQuery_1;
    hasRequiredMediaQuery = 1;
    var QueryHandler = requireQueryHandler();
    var each = requireUtil().each;
    function MediaQuery(query, isUnconditional) {
      this.query = query;
      this.isUnconditional = isUnconditional;
      this.handlers = [];
      this.mql = window.matchMedia(query);
      var self2 = this;
      this.listener = function(mql) {
        self2.mql = mql.currentTarget || mql;
        self2.assess();
      };
      this.mql.addListener(this.listener);
    }
    MediaQuery.prototype = {
      constuctor: MediaQuery,
      /**
       * add a handler for this query, triggering if already active
       *
       * @param {object} handler
       * @param {function} handler.match callback for when query is activated
       * @param {function} [handler.unmatch] callback for when query is deactivated
       * @param {function} [handler.setup] callback for immediate execution when a query handler is registered
       * @param {boolean} [handler.deferSetup=false] should the setup callback be deferred until the first time the handler is matched?
       */
      addHandler: function(handler) {
        var qh = new QueryHandler(handler);
        this.handlers.push(qh);
        this.matches() && qh.on();
      },
      /**
       * removes the given handler from the collection, and calls it's destroy methods
       *
       * @param {object || function} handler the handler to remove
       */
      removeHandler: function(handler) {
        var handlers = this.handlers;
        each(handlers, function(h, i) {
          if (h.equals(handler)) {
            h.destroy();
            return !handlers.splice(i, 1);
          }
        });
      },
      /**
       * Determine whether the media query should be considered a match
       *
       * @return {Boolean} true if media query can be considered a match, false otherwise
       */
      matches: function() {
        return this.mql.matches || this.isUnconditional;
      },
      /**
       * Clears all handlers and unbinds events
       */
      clear: function() {
        each(this.handlers, function(handler) {
          handler.destroy();
        });
        this.mql.removeListener(this.listener);
        this.handlers.length = 0;
      },
      /*
          * Assesses the query, turning on all handlers if it matches, turning them off if it doesn't match
          */
      assess: function() {
        var action = this.matches() ? "on" : "off";
        each(this.handlers, function(handler) {
          handler[action]();
        });
      }
    };
    MediaQuery_1 = MediaQuery;
    return MediaQuery_1;
  }
  var MediaQueryDispatch_1;
  var hasRequiredMediaQueryDispatch;
  function requireMediaQueryDispatch() {
    if (hasRequiredMediaQueryDispatch) return MediaQueryDispatch_1;
    hasRequiredMediaQueryDispatch = 1;
    var MediaQuery = requireMediaQuery();
    var Util2 = requireUtil();
    var each = Util2.each;
    var isFunction = Util2.isFunction;
    var isArray = Util2.isArray;
    function MediaQueryDispatch() {
      if (!window.matchMedia) {
        throw new Error("matchMedia not present, legacy browsers require a polyfill");
      }
      this.queries = {};
      this.browserIsIncapable = !window.matchMedia("only all").matches;
    }
    MediaQueryDispatch.prototype = {
      constructor: MediaQueryDispatch,
      /**
       * Registers a handler for the given media query
       *
       * @param {string} q the media query
       * @param {object || Array || Function} options either a single query handler object, a function, or an array of query handlers
       * @param {function} options.match fired when query matched
       * @param {function} [options.unmatch] fired when a query is no longer matched
       * @param {function} [options.setup] fired when handler first triggered
       * @param {boolean} [options.deferSetup=false] whether setup should be run immediately or deferred until query is first matched
       * @param {boolean} [shouldDegrade=false] whether this particular media query should always run on incapable browsers
       */
      register: function(q, options, shouldDegrade) {
        var queries = this.queries, isUnconditional = shouldDegrade && this.browserIsIncapable;
        if (!queries[q]) {
          queries[q] = new MediaQuery(q, isUnconditional);
        }
        if (isFunction(options)) {
          options = { match: options };
        }
        if (!isArray(options)) {
          options = [options];
        }
        each(options, function(handler) {
          if (isFunction(handler)) {
            handler = { match: handler };
          }
          queries[q].addHandler(handler);
        });
        return this;
      },
      /**
       * unregisters a query and all it's handlers, or a specific handler for a query
       *
       * @param {string} q the media query to target
       * @param {object || function} [handler] specific handler to unregister
       */
      unregister: function(q, handler) {
        var query = this.queries[q];
        if (query) {
          if (handler) {
            query.removeHandler(handler);
          } else {
            query.clear();
            delete this.queries[q];
          }
        }
        return this;
      }
    };
    MediaQueryDispatch_1 = MediaQueryDispatch;
    return MediaQueryDispatch_1;
  }
  var src;
  var hasRequiredSrc;
  function requireSrc() {
    if (hasRequiredSrc) return src;
    hasRequiredSrc = 1;
    var MediaQueryDispatch = requireMediaQueryDispatch();
    src = new MediaQueryDispatch();
    return src;
  }
  var hasRequiredSlider;
  function requireSlider() {
    if (hasRequiredSlider) return slider;
    hasRequiredSlider = 1;
    (function(exports) {
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      exports["default"] = void 0;
      var _react = _interopRequireDefault(requireReact());
      var _innerSlider = requireInnerSlider();
      var _json2mq = _interopRequireDefault(requireJson2mq());
      var _defaultProps = _interopRequireDefault(requireDefaultProps());
      var _innerSliderUtils = requireInnerSliderUtils();
      function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : { "default": obj };
      }
      function _typeof(obj) {
        "@babel/helpers - typeof";
        if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
          _typeof = function _typeof2(obj2) {
            return typeof obj2;
          };
        } else {
          _typeof = function _typeof2(obj2) {
            return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
          };
        }
        return _typeof(obj);
      }
      function _extends2() {
        _extends2 = Object.assign || function(target) {
          for (var i = 1; i < arguments.length; i++) {
            var source = arguments[i];
            for (var key in source) {
              if (Object.prototype.hasOwnProperty.call(source, key)) {
                target[key] = source[key];
              }
            }
          }
          return target;
        };
        return _extends2.apply(this, arguments);
      }
      function ownKeys(object, enumerableOnly) {
        var keys = Object.keys(object);
        if (Object.getOwnPropertySymbols) {
          var symbols = Object.getOwnPropertySymbols(object);
          if (enumerableOnly) symbols = symbols.filter(function(sym) {
            return Object.getOwnPropertyDescriptor(object, sym).enumerable;
          });
          keys.push.apply(keys, symbols);
        }
        return keys;
      }
      function _objectSpread(target) {
        for (var i = 1; i < arguments.length; i++) {
          var source = arguments[i] != null ? arguments[i] : {};
          if (i % 2) {
            ownKeys(Object(source), true).forEach(function(key) {
              _defineProperty(target, key, source[key]);
            });
          } else if (Object.getOwnPropertyDescriptors) {
            Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
          } else {
            ownKeys(Object(source)).forEach(function(key) {
              Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
            });
          }
        }
        return target;
      }
      function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
          throw new TypeError("Cannot call a class as a function");
        }
      }
      function _defineProperties(target, props) {
        for (var i = 0; i < props.length; i++) {
          var descriptor = props[i];
          descriptor.enumerable = descriptor.enumerable || false;
          descriptor.configurable = true;
          if ("value" in descriptor) descriptor.writable = true;
          Object.defineProperty(target, descriptor.key, descriptor);
        }
      }
      function _createClass(Constructor, protoProps, staticProps) {
        if (protoProps) _defineProperties(Constructor.prototype, protoProps);
        return Constructor;
      }
      function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
          throw new TypeError("Super expression must either be null or a function");
        }
        subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
        if (superClass) _setPrototypeOf2(subClass, superClass);
      }
      function _setPrototypeOf2(o, p) {
        _setPrototypeOf2 = Object.setPrototypeOf || function _setPrototypeOf22(o2, p2) {
          o2.__proto__ = p2;
          return o2;
        };
        return _setPrototypeOf2(o, p);
      }
      function _createSuper(Derived) {
        var hasNativeReflectConstruct = _isNativeReflectConstruct();
        return function _createSuperInternal() {
          var Super = _getPrototypeOf(Derived), result;
          if (hasNativeReflectConstruct) {
            var NewTarget = _getPrototypeOf(this).constructor;
            result = Reflect.construct(Super, arguments, NewTarget);
          } else {
            result = Super.apply(this, arguments);
          }
          return _possibleConstructorReturn(this, result);
        };
      }
      function _possibleConstructorReturn(self2, call) {
        if (call && (_typeof(call) === "object" || typeof call === "function")) {
          return call;
        }
        return _assertThisInitialized(self2);
      }
      function _assertThisInitialized(self2) {
        if (self2 === void 0) {
          throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }
        return self2;
      }
      function _isNativeReflectConstruct() {
        if (typeof Reflect === "undefined" || !Reflect.construct) return false;
        if (Reflect.construct.sham) return false;
        if (typeof Proxy === "function") return true;
        try {
          Date.prototype.toString.call(Reflect.construct(Date, [], function() {
          }));
          return true;
        } catch (e) {
          return false;
        }
      }
      function _getPrototypeOf(o) {
        _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
          return o2.__proto__ || Object.getPrototypeOf(o2);
        };
        return _getPrototypeOf(o);
      }
      function _defineProperty(obj, key, value) {
        if (key in obj) {
          Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
        } else {
          obj[key] = value;
        }
        return obj;
      }
      var enquire = (0, _innerSliderUtils.canUseDOM)() && requireSrc();
      var Slider = /* @__PURE__ */ (function(_React$Component) {
        _inherits(Slider2, _React$Component);
        var _super = _createSuper(Slider2);
        function Slider2(props) {
          var _this;
          _classCallCheck(this, Slider2);
          _this = _super.call(this, props);
          _defineProperty(_assertThisInitialized(_this), "innerSliderRefHandler", function(ref) {
            return _this.innerSlider = ref;
          });
          _defineProperty(_assertThisInitialized(_this), "slickPrev", function() {
            return _this.innerSlider.slickPrev();
          });
          _defineProperty(_assertThisInitialized(_this), "slickNext", function() {
            return _this.innerSlider.slickNext();
          });
          _defineProperty(_assertThisInitialized(_this), "slickGoTo", function(slide) {
            var dontAnimate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
            return _this.innerSlider.slickGoTo(slide, dontAnimate);
          });
          _defineProperty(_assertThisInitialized(_this), "slickPause", function() {
            return _this.innerSlider.pause("paused");
          });
          _defineProperty(_assertThisInitialized(_this), "slickPlay", function() {
            return _this.innerSlider.autoPlay("play");
          });
          _this.state = {
            breakpoint: null
          };
          _this._responsiveMediaHandlers = [];
          return _this;
        }
        _createClass(Slider2, [{
          key: "media",
          value: function media(query, handler) {
            enquire.register(query, handler);
            this._responsiveMediaHandlers.push({
              query,
              handler
            });
          }
          // handles responsive breakpoints
        }, {
          key: "componentDidMount",
          value: function componentDidMount() {
            var _this2 = this;
            if (this.props.responsive) {
              var breakpoints = this.props.responsive.map(function(breakpt) {
                return breakpt.breakpoint;
              });
              breakpoints.sort(function(x, y) {
                return x - y;
              });
              breakpoints.forEach(function(breakpoint, index2) {
                var bQuery;
                if (index2 === 0) {
                  bQuery = (0, _json2mq["default"])({
                    minWidth: 0,
                    maxWidth: breakpoint
                  });
                } else {
                  bQuery = (0, _json2mq["default"])({
                    minWidth: breakpoints[index2 - 1] + 1,
                    maxWidth: breakpoint
                  });
                }
                (0, _innerSliderUtils.canUseDOM)() && _this2.media(bQuery, function() {
                  _this2.setState({
                    breakpoint
                  });
                });
              });
              var query = (0, _json2mq["default"])({
                minWidth: breakpoints.slice(-1)[0]
              });
              (0, _innerSliderUtils.canUseDOM)() && this.media(query, function() {
                _this2.setState({
                  breakpoint: null
                });
              });
            }
          }
        }, {
          key: "componentWillUnmount",
          value: function componentWillUnmount() {
            this._responsiveMediaHandlers.forEach(function(obj) {
              enquire.unregister(obj.query, obj.handler);
            });
          }
        }, {
          key: "render",
          value: function render() {
            var _this3 = this;
            var settings;
            var newProps;
            if (this.state.breakpoint) {
              newProps = this.props.responsive.filter(function(resp) {
                return resp.breakpoint === _this3.state.breakpoint;
              });
              settings = newProps[0].settings === "unslick" ? "unslick" : _objectSpread(_objectSpread(_objectSpread({}, _defaultProps["default"]), this.props), newProps[0].settings);
            } else {
              settings = _objectSpread(_objectSpread({}, _defaultProps["default"]), this.props);
            }
            if (settings.centerMode) {
              if (settings.slidesToScroll > 1 && false) ;
              settings.slidesToScroll = 1;
            }
            if (settings.fade) {
              if (settings.slidesToShow > 1 && false) ;
              if (settings.slidesToScroll > 1 && false) ;
              settings.slidesToShow = 1;
              settings.slidesToScroll = 1;
            }
            var children = _react["default"].Children.toArray(this.props.children);
            children = children.filter(function(child) {
              if (typeof child === "string") {
                return !!child.trim();
              }
              return !!child;
            });
            if (settings.variableWidth && (settings.rows > 1 || settings.slidesPerRow > 1)) {
              console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1");
              settings.variableWidth = false;
            }
            var newChildren = [];
            var currentWidth = null;
            for (var i = 0; i < children.length; i += settings.rows * settings.slidesPerRow) {
              var newSlide = [];
              for (var j = i; j < i + settings.rows * settings.slidesPerRow; j += settings.slidesPerRow) {
                var row = [];
                for (var k = j; k < j + settings.slidesPerRow; k += 1) {
                  if (settings.variableWidth && children[k].props.style) {
                    currentWidth = children[k].props.style.width;
                  }
                  if (k >= children.length) break;
                  row.push(/* @__PURE__ */ _react["default"].cloneElement(children[k], {
                    key: 100 * i + 10 * j + k,
                    tabIndex: -1,
                    style: {
                      width: "".concat(100 / settings.slidesPerRow, "%"),
                      display: "inline-block"
                    }
                  }));
                }
                newSlide.push(/* @__PURE__ */ _react["default"].createElement("div", {
                  key: 10 * i + j
                }, row));
              }
              if (settings.variableWidth) {
                newChildren.push(/* @__PURE__ */ _react["default"].createElement("div", {
                  key: i,
                  style: {
                    width: currentWidth
                  }
                }, newSlide));
              } else {
                newChildren.push(/* @__PURE__ */ _react["default"].createElement("div", {
                  key: i
                }, newSlide));
              }
            }
            if (settings === "unslick") {
              var className = "regular slider " + (this.props.className || "");
              return /* @__PURE__ */ _react["default"].createElement("div", {
                className
              }, children);
            } else if (newChildren.length <= settings.slidesToShow) {
              settings.unslick = true;
            }
            return /* @__PURE__ */ _react["default"].createElement(_innerSlider.InnerSlider, _extends2({
              style: this.props.style,
              ref: this.innerSliderRefHandler
            }, settings), newChildren);
          }
        }]);
        return Slider2;
      })(_react["default"].Component);
      exports["default"] = Slider;
    })(slider);
    return slider;
  }
  var hasRequiredLib;
  function requireLib() {
    if (hasRequiredLib) return lib;
    hasRequiredLib = 1;
    (function(exports) {
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      exports["default"] = void 0;
      var _slider = _interopRequireDefault(requireSlider());
      function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : { "default": obj };
      }
      var _default = _slider["default"];
      exports["default"] = _default;
    })(lib);
    return lib;
  }
  requireLib();
  const noResults = "_noResults_1f6iv_1";
  const styles$g = {
    noResults
  };
  const NoResultsFound = () => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$g.noResults, children: "Sorry no results found." });
  const LoadingAnimation = () => {
    return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { padding: "20px", textAlign: "center" }, children: "Loading..." });
  };
  const ErrorLoadingData = () => {
    return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { padding: "20px", textAlign: "center", color: "red" }, children: "Error loading data" });
  };
  const importElementorTemplateImage = ({ id, url, templateKitName }) => {
    const [loading, setLoading] = reactExports.useState(true);
    const [data, setData] = reactExports.useState(null);
    const [error, setError] = reactExports.useState(null);
    reactExports.useEffect(() => {
      if (!id || !url) {
        console.warn("Missing image id or url:", { id, url });
        setLoading(false);
        return;
      }
      const importImage = async () => {
        try {
          setLoading(true);
          setError(null);
          console.log("Importing image:", { id, url, templateKitName });
          const result = await apiCall("importElementorTemplateImage", "POST", { id, url, templateKitName });
          console.log("Image import result:", result);
          setData(result);
          setLoading(false);
        } catch (err) {
          console.error("Image import API error:", err);
          setError(err.message);
          setLoading(false);
        }
      };
      importImage();
    }, [id, url, templateKitName]);
    return { loading, data, error };
  };
  const ImportImageInBackground = ({ image: image2, templateKitName, completeCallback }) => {
    const { loading, error, data } = importElementorTemplateImage({ ...image2, templateKitName });
    reactExports.useEffect(() => {
      if (!loading && !error && data && data.id) {
        console.log("Image imported successfully:", data.id);
        completeCallback();
      } else if (!loading && error) {
        console.error("Image import failed:", error);
        completeCallback();
      }
    }, [loading, error, data, completeCallback]);
    return null;
  };
  const extractImagesFromTemplateData = (templateData) => {
    const images2 = [];
    const recusiveIterate = (obj) => {
      if (obj) {
        Object.keys(obj).forEach((key) => {
          if (obj[key] && obj[key].url && obj[key].id) {
            images2.push(obj[key]);
          }
          if (typeof obj[key] === "object" || Array.isArray(obj[key])) {
            recusiveIterate(obj[key]);
          }
        });
      }
    };
    recusiveIterate(templateData.content);
    return images2;
  };
  const ImportElementorTemplateImages = ({ templateData, progressCallback, completeCallback }) => {
    const [importImageIndex, setImportImageIndex] = reactExports.useState(0);
    const [imagesToImport, setImagesToImport] = reactExports.useState(null);
    reactExports.useEffect(() => {
      console.log("Extracting images from template data...");
      const images2 = extractImagesFromTemplateData(templateData);
      console.log("Found images:", images2.length);
      setImagesToImport(images2);
    }, [templateData]);
    const importNextImage = () => {
      console.log("Image imported, moving to next...");
      setImportImageIndex((oldStep) => oldStep + 1);
    };
    reactExports.useEffect(() => {
      if (imagesToImport && imagesToImport.length > 0) {
        const progress = Math.round(importImageIndex / (imagesToImport.length + 2) * 100) / 100;
        console.log("Image import progress:", { importImageIndex, total: imagesToImport.length, progress });
        progressCallback(progress);
        if (importImageIndex === imagesToImport.length) {
          console.log("All images imported!");
          setImportImageIndex(null);
          completeCallback();
        }
      }
    }, [importImageIndex, imagesToImport, progressCallback, completeCallback]);
    reactExports.useEffect(() => {
      if (imagesToImport !== null && imagesToImport.length === 0) {
        console.log("No images to import, moving to next step");
        progressCallback(0.5);
        completeCallback();
      }
    }, [imagesToImport, progressCallback, completeCallback]);
    if (imagesToImport === null) {
      return null;
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: imagesToImport.map((image2, index2) => {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(React.Fragment, { children: importImageIndex === index2 || importImageIndex > index2 ? /* @__PURE__ */ jsxRuntimeExports.jsx(ImportImageInBackground, { image: image2, templateKitName: templateData.template_kit_name, completeCallback: importNextImage }, `importImageBackground${index2}`) : null }, `importImage${index2}`);
    }) });
  };
  ImportElementorTemplateImages.propTypes = {
    templateData: PropTypes.shape(
      {
        author: PropTypes.string,
        file: PropTypes.string
      }
    ).isRequired,
    completeCallback: PropTypes.func.isRequired
  };
  const itemCard = "_itemCard_x2x92_8";
  const itemDelete = "_itemDelete_x2x92_8";
  const itemImageLink = "_itemImageLink_x2x92_13";
  const itemImage = "_itemImage_x2x92_13";
  const styles$f = {
    itemCard,
    itemDelete,
    itemImageLink,
    itemImage
  };
  const fetchInstalledTemplateKits = () => {
    const [loading, setLoading] = reactExports.useState(true);
    const [data, setData] = reactExports.useState(null);
    const [error, setError] = reactExports.useState(null);
    const [refetchTrigger, setRefetchTrigger] = reactExports.useState(0);
    const fetchKits = reactExports.useCallback(async () => {
      var _a, _b;
      try {
        setLoading(true);
        setError(null);
        const response = await fetch(
          `/wp-json/${((_a = window.envatoElements) == null ? void 0 : _a.api_namespace) || "envato-elements/v2"}/fetchInstalledTemplateKits`,
          {
            method: "POST",
            credentials: "same-origin",
            headers: {
              "Content-Type": "application/json",
              "X-WP-Nonce": ((_b = window.envatoElements) == null ? void 0 : _b.nonce) || ""
            }
          }
        );
        const result = await response.json();
        if (!response.ok || result.code === "error") {
          throw new Error(result.message || "Failed to fetch installed template kits");
        }
        setData(result);
        setLoading(false);
      } catch (err) {
        setError(err.message || "Fetch failed");
        setLoading(false);
      }
    }, []);
    reactExports.useEffect(() => {
      fetchKits();
    }, [fetchKits, refetchTrigger]);
    const refetch = reactExports.useCallback(() => {
      setRefetchTrigger((prev) => prev + 1);
    }, []);
    return { loading, data, error, refetch };
  };
  const deleteTemplateKit = async ({ templateKitId }) => {
    return await apiCall("deleteTemplateKit", "POST", { templateKitId });
  };
  const DeleteTemplateKit = ({ templateKitId, customActionHook = null, completeCallback = null, errorCallback = null }) => {
    const { removeDownloadedItem } = useGlobalConfig();
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      ButtonActionProvider,
      {
        DefaultButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "warning", label: "", icon: "trash" }),
        actionConfirmationMessage: "Really delete this Template Kit?",
        LoadingButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "warning", label: "", icon: "trash", disabled: true }),
        ErrorButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "warning", label: "", icon: "trash", disabled: true }),
        SuccessButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "warning", label: "", icon: "trash", disabled: true }),
        CompletedButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "warning", label: "", icon: "trash" }),
        actionHook: () => customActionHook ? customActionHook() : deleteTemplateKit({ templateKitId }),
        isAlreadyCompleted: false,
        completedCallback: () => {
          removeDownloadedItem({ importedId: templateKitId });
          if (completeCallback) {
            completeCallback();
          }
        },
        errorCallback
      }
    );
  };
  const KitCard = ({ item: item2, onDelete }) => {
    const { url } = useRouteMatch();
    useHistory();
    const [kitDeleted, setKitDeleted] = reactExports.useState(false);
    if (kitDeleted) {
      return null;
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsx(GridItem, { colWidthPercentage: 20, className: styles$f.itemCard, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      ItemCard,
      {
        Images: /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { to: `${url}/kit/${item2.id}`, className: styles$f.itemImageLink, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: item2.screenshot_url, alt: item2.title, className: styles$f.itemImage }) }),
        Buttons: /* @__PURE__ */ jsxRuntimeExports.jsxs(ButtonWrapper, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(InternalLinkButton, { type: "primary", label: "View Installed Kit", icon: "plus", href: `${url}/kit/${item2.id}` }),
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$f.itemDelete, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            DeleteTemplateKit,
            {
              templateKitId: item2.id,
              completeCallback: () => {
                console.log("Delete completed, refetching data...");
                setKitDeleted(true);
                if (onDelete) {
                  onDelete(item2.id);
                }
              }
            }
          ) })
        ] }),
        title: item2.title,
        description: `Contains ${item2.template_count} templates`
      }
    ) });
  };
  const uploadCard = "_uploadCard_1gs8e_2";
  const uploadCardButton = "_uploadCardButton_1gs8e_14";
  const icon = "_icon_1gs8e_19";
  const message = "_message_1gs8e_34";
  const formInput = "_formInput_1gs8e_39";
  const styles$e = {
    uploadCard,
    uploadCardButton,
    icon,
    message,
    formInput
  };
  const uploadTemplateKitZipFile = ({ file }) => {
    const [loading, setLoading] = reactExports.useState(true);
    const [data, setData] = reactExports.useState(null);
    const [error, setError] = reactExports.useState(null);
    reactExports.useEffect(() => {
      if (!file) {
        setLoading(false);
        return;
      }
      const uploadFile = async () => {
        var _a, _b;
        try {
          setLoading(true);
          setError(null);
          const formData = new FormData();
          formData.append("file", file);
          const response = await fetch(
            `/wp-json/${((_a = window.envatoElements) == null ? void 0 : _a.api_namespace) || "envato-elements/v2"}/uploadTemplateKitZipFile`,
            {
              method: "POST",
              credentials: "same-origin",
              headers: {
                "X-WP-Nonce": ((_b = window.envatoElements) == null ? void 0 : _b.nonce) || ""
              },
              body: formData
            }
          );
          const result = await response.json();
          if (!response.ok || result.code === "error") {
            throw new Error(result.message || "Failed to upload template kit");
          }
          setData(result);
          setLoading(false);
        } catch (err) {
          setError(err.message || "Upload failed");
          setLoading(false);
        }
      };
      uploadFile();
    }, [file]);
    return { loading, data, error };
  };
  const DoTheFileUpload = ({ chosenFile }) => {
    const history = useHistory();
    const { loading, data, error } = uploadTemplateKitZipFile({ file: chosenFile });
    reactExports.useEffect(() => {
      if (!loading && !error && data && data.templateKitId) {
        const kitUrl = getImportedKitUrl({ importedTemplateKitId: data.templateKitId });
        console.log("Navigating to:", kitUrl, "with templateKitId:", data.templateKitId);
        history.push(kitUrl);
      }
    }, [loading, error, data, history]);
    if (error) {
      return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { color: "red", padding: "10px" }, children: [
        "Error: ",
        error
      ] });
    }
    if (loading) {
      return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { padding: "10px" }, children: "Uploading..." });
    }
    return null;
  };
  const UploadKitCard = ({ item: item2 }) => {
    const [chosenFile, setChosenFile] = reactExports.useState(null);
    return /* @__PURE__ */ jsxRuntimeExports.jsx(GridItem, { colWidthPercentage: 33, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$e.uploadCard, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { htmlFor: "upload-template-kit-zip-file", className: styles$e.uploadCardButton, children: [
        chosenFile ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingAnimation, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$e.icon }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$e.message, children: "Upload Template Kit ZIP File" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          "input",
          {
            type: "file",
            name: "upload-template-kit-zip-file",
            id: "upload-template-kit-zip-file",
            className: styles$e.formInput,
            onChange: (e) => {
              setChosenFile(e.target.files[0]);
            }
          }
        )
      ] }),
      chosenFile ? /* @__PURE__ */ jsxRuntimeExports.jsx(DoTheFileUpload, { chosenFile }) : null
    ] }) });
  };
  const sectionTitle = "_sectionTitle_15l8g_8";
  const styles$d = {
    sectionTitle
  };
  const KitListWrapper = () => {
    const { loading, data, error, refetch } = fetchInstalledTemplateKits();
    const handleKitDeleted = (kitId) => {
      setTimeout(() => {
        refetch();
      }, 500);
    };
    const uploadSection = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: styles$d.sectionTitle, children: "Upload Theme Kit" }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(GridWrapper, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(GridItem, { colWidthPercentage: 100, children: /* @__PURE__ */ jsxRuntimeExports.jsx(UploadKitCard, {}) }) })
    ] });
    if (loading) {
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        uploadSection,
        /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: styles$d.sectionTitle, children: "Installed Kits" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingAnimation, {})
      ] });
    }
    if (error) {
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        uploadSection,
        /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: styles$d.sectionTitle, children: "Installed Kits" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorLoadingData, { message: error })
      ] });
    }
    const installedKits = Array.isArray(data) ? data : [];
    if (installedKits.length === 0) {
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        uploadSection,
        /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: styles$d.sectionTitle, children: "Installed Kits" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { padding: "20px", textAlign: "center" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "No template kits installed yet. Upload a template kit ZIP file to get started." }) })
      ] });
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
      uploadSection,
      /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: styles$d.sectionTitle, children: "Installed Kits" }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(GridWrapper, { children: installedKits.map((kit) => /* @__PURE__ */ jsxRuntimeExports.jsx(KitCard, { item: kit, onDelete: handleKitDeleted }, kit.id)) })
    ] });
  };
  const fetchIndividualTemplates = ({ templateKitId, templateId, refresh }) => {
    const [loading, setLoading] = reactExports.useState(true);
    const [data, setData] = reactExports.useState(null);
    const [error, setError] = reactExports.useState(null);
    reactExports.useEffect(() => {
      const fetch2 = async () => {
        try {
          setLoading(true);
          setError(null);
          const result = await apiCall("fetchIndividualTemplates", "POST", {
            id: templateKitId,
            templateId
          });
          setData(result);
          setLoading(false);
        } catch (err) {
          setError(err.message);
          setLoading(false);
        }
      };
      fetch2();
    }, [templateKitId, templateId, refresh]);
    return { loading, data, error };
  };
  const getSingleTemplateImportData = ({ templateKitId, templateId }) => {
    const [loading, setLoading] = reactExports.useState(true);
    const [data, setData] = reactExports.useState(null);
    const [error, setError] = reactExports.useState(null);
    reactExports.useEffect(() => {
      if (!templateKitId || templateId === null || templateId === void 0) {
        setLoading(false);
        return;
      }
      const fetch2 = async () => {
        try {
          setLoading(true);
          setError(null);
          console.log("Fetching template data:", { templateKitId, templateId });
          const result = await apiCall("getSingleTemplateImportData", "POST", { templateKitId, templateId });
          console.log("Template data fetched:", result);
          setData(result);
          setLoading(false);
        } catch (err) {
          console.error("Fetch template data error:", err);
          setError(err.message);
          setLoading(false);
        }
      };
      fetch2();
    }, [templateKitId, templateId]);
    return { loading, data, error };
  };
  const importSingleTemplate = ({ templateKitId, templateId, importAgain = false, insertToPage = false }) => {
    const [loading, setLoading] = reactExports.useState(true);
    const [data, setData] = reactExports.useState(null);
    const [error, setError] = reactExports.useState(null);
    reactExports.useEffect(() => {
      if (!templateKitId || templateId === null || templateId === void 0) {
        setLoading(false);
        return;
      }
      const importTemplate = async () => {
        try {
          setLoading(true);
          setError(null);
          console.log("Importing template:", { templateKitId, templateId, importAgain, insertToPage });
          const result = await apiCall("importSingleTemplate", "POST", {
            templateKitId,
            templateId,
            importAgain,
            insertToPage
          });
          console.log("Import result:", result);
          setData(result);
          setLoading(false);
        } catch (err) {
          console.error("Import error:", err);
          setError(err.message);
          setLoading(false);
        }
      };
      importTemplate();
    }, [templateKitId, templateId, importAgain, insertToPage]);
    return { loading, data, error };
  };
  const activateGlobalKit = async (importedTemplateId) => {
    try {
      const result = await apiCall("activateGlobalKit", "POST", { importedTemplateId });
      return result;
    } catch (err) {
      console.error("Failed to activate global kit:", err);
      throw err;
    }
  };
  const ImportTemplateInBackground = ({ templateKitId, templateId, importAgain, insertToPage, completeCallback }) => {
    const { loading, error, data } = importSingleTemplate({ templateKitId, templateId, importAgain, insertToPage });
    reactExports.useEffect(() => {
      if (!loading && !error && data && data.imported_template_id) {
        completeCallback(data);
      } else if (!loading && error) {
        console.error("Failed to import template:", error);
      }
    }, [loading, error, data, completeCallback]);
    return null;
  };
  const GetTemplateData = ({ templateKitId, templateId, completeCallback }) => {
    const { loading, error, data } = getSingleTemplateImportData({ templateKitId, templateId });
    reactExports.useEffect(() => {
      if (!loading && !error && data && data.template_data) {
        completeCallback(data.template_data);
      } else if (!loading && error) {
        console.error("Failed to get template data:", error);
      }
    }, [loading, error, data, completeCallback]);
    return null;
  };
  const ImportSingleTemplate = ({ templateKitId, templateId, existingImports = [] }) => {
    const { getMagicButtonMode } = useGlobalConfig();
    const magicButtonMode = getMagicButtonMode();
    const isElementorMagicMode = magicButtonMode && magicButtonMode.mode === "elementorMagicButton";
    const [importedTemplateId, setImportedTemplateId] = reactExports.useState(isElementorMagicMode ? null : existingImports.length ? existingImports[0].imported_template_id : null);
    const [templateDataToImport, setTemplateDataToImport] = reactExports.useState(null);
    const [importProgress, setImportProgress] = reactExports.useState(0);
    const [importState, setImportState] = reactExports.useState("idle");
    const [importTemplateAgain, setImportTemplateAgain] = reactExports.useState(false);
    const StartImportButton = importedTemplateId ? /* @__PURE__ */ jsxRuntimeExports.jsx(
      Button,
      {
        type: "ghost",
        label: "Import Again",
        icon: "plus",
        onClick: () => {
          setImportProgress(0);
          setImportTemplateAgain(true);
          setImportState("importingFetchJsonData");
        }
      }
    ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
      Button,
      {
        type: "primary",
        label: isElementorMagicMode ? "Insert Template" : "Import Template",
        icon: "plus",
        onClick: () => {
          setImportProgress(0);
          setImportState("importingFetchJsonData");
        }
      }
    );
    const ImportingButton = /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", label: `Importing ${Math.round(importProgress * 100)}%`, icon: "updateSpinning", disabled: true });
    const ImportedTemplateButton = /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLinkButton, { href: getImportedTemplateUrl({ importedTemplateId }), type: "primary", label: "View Template", icon: "eye", openNewWindow: true });
    const ActivateGlobalKitButton = templateId === 0 && importedTemplateId ? /* @__PURE__ */ jsxRuntimeExports.jsx(
      Button,
      {
        type: "secondary",
        label: "Activate Global Styles",
        icon: "yes",
        onClick: async () => {
          try {
            await activateGlobalKit(importedTemplateId);
            alert("Global Kit Styles activated successfully! Colors and typography are now active.");
          } catch (err) {
            alert("Failed to activate global kit styles");
          }
        }
      }
    ) : null;
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
      importedTemplateId ? ImportedTemplateButton : null,
      ActivateGlobalKitButton,
      importState === "idle" ? StartImportButton : null,
      importState === "importingFetchJsonData" || importState === "importingImages" || importState === "importingTemplate" ? ImportingButton : null,
      importState === "importingFetchJsonData" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
        GetTemplateData,
        {
          templateKitId,
          templateId,
          completeCallback: (data) => {
            setTemplateDataToImport(data);
            setImportState("importingImages");
          }
        }
      ) : null,
      importState === "importingImages" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
        ImportElementorTemplateImages,
        {
          templateData: templateDataToImport,
          progressCallback: (importProgress2) => {
            setImportProgress(importProgress2);
          },
          completeCallback: () => {
            setImportState("importingTemplate");
          }
        }
      ) : null,
      importState === "importingTemplate" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
        ImportTemplateInBackground,
        {
          templateKitId,
          templateId,
          importAgain: importTemplateAgain,
          insertToPage: isElementorMagicMode,
          completeCallback: async (data) => {
            if (data && data.imported_template_id) {
              setImportProgress(1);
              if (templateId === 0) {
                try {
                  await activateGlobalKit(data.imported_template_id);
                } catch (err) {
                  console.error("Failed to activate global kit:", err);
                }
              }
              setTimeout(() => {
                setImportedTemplateId(data.imported_template_id);
                setImportState("idle");
                if (isElementorMagicMode && magicButtonMode.insertCallback && typeof magicButtonMode.insertCallback === "function") {
                  magicButtonMode.insertCallback(data);
                  setTimeout(() => {
                    if (magicButtonMode.closeCallback && typeof magicButtonMode.closeCallback === "function") {
                      magicButtonMode.closeCallback();
                    }
                  }, 500);
                }
              }, 300);
            }
          }
        }
      ) : null
    ] });
  };
  const svgWrapper = "_svgWrapper_deyrs_1";
  const svgEnvatoLogo = "_svgEnvatoLogo_deyrs_8";
  const styles$c = {
    svgWrapper,
    svgEnvatoLogo
  };
  const ModalEnvatoIcon = () => {
    return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.svgWrapper, children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 72 72", className: styles$c.svgEnvatoLogo, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      "path",
      {
        fill: "#1a4200",
        d: "M39.137058 70.157119c1.685122 0 3.051217-1.365967 3.051217-3.051217 0-1.685122-1.366095-3.051217-3.051217-3.051217-1.685121 0-3.051217 1.366095-3.051217 3.051217 0 1.68525 1.366096 3.051217 3.051217 3.051217zm17.560977-23.85614-17.212984 1.84103c-.321858.03862-.47635-.373356-.231738-.566471l16.852503-13.118945c1.094318-.901204 1.789532-2.291632 1.493422-3.785054-.296109-2.291632-2.188636-3.785054-4.570388-3.47607L34.721548 29.87333c-.321858.0515-.502099-.360481-.231738-.566471l18.139936-13.852782c3.579064-2.780856 3.875174-8.2524479.592219-11.4324082-2.986845-2.9868582-7.763223-2.8838635-10.737194.1029947L13.24716 33.864373c-1.094318 1.197313-1.596417 2.780856-1.287433 4.480268.502099 2.690736 3.17996 4.480268 5.870696 3.978169l15.758184-3.218583c.347607-.06437.527847.38623.231738.579345L16.337 50.871367c-2.188636 1.390428-3.17996 3.875175-2.484746 6.359921.695214 3.282955 3.978169 5.175482 7.158129 4.377273l26.134897-6.437166c.296109-.07725.514973.270361.321858.502099l-4.081164 5.033864c-1.094318 1.390428.695214 3.282955 2.188637 2.188637l13.42793-11.033304c2.381751-1.982647.798208-5.870696-2.291632-5.574586z"
      }
    ) }) });
  };
  const modalInner$1 = "_modalInner_1gai2_9";
  const modalHeader$1 = "_modalHeader_1gai2_24";
  const modalLogo$1 = "_modalLogo_1gai2_32";
  const headerTitle$1 = "_headerTitle_1gai2_36";
  const headerActions$1 = "_headerActions_1gai2_44";
  const closeButton$1 = "_closeButton_1gai2_51";
  const dismissIcon$1 = "_dismissIcon_1gai2_78";
  const kitInner = "_kitInner_1gai2_102";
  const styles$b = {
    modalInner: modalInner$1,
    modalHeader: modalHeader$1,
    modalLogo: modalLogo$1,
    headerTitle: headerTitle$1,
    headerActions: headerActions$1,
    closeButton: closeButton$1,
    dismissIcon: dismissIcon$1,
    kitInner
  };
  const customStyles$1 = {
    overlay: {
      backgroundColor: "rgba(32, 32, 32, 0.81)",
      zIndex: 199999
    },
    content: {
      background: "#f1f1f1",
      border: "0",
      top: "50%",
      left: "50%",
      right: "auto",
      bottom: "auto",
      marginRight: "-50%",
      padding: "0",
      transform: "translate(-50%, -50%)",
      borderRadius: "4px"
    }
  };
  const TemplateModalWrapper = ({ isOpen, onCloseCallback = null, children, templatePreviewTitle, templateId, templateKitId, existingImports }) => {
    const [modalIsOpen, setModalIsOpen] = React.useState(false);
    const closeModal = () => {
      setModalIsOpen(false);
      if (onCloseCallback) {
        onCloseCallback();
      }
    };
    reactExports.useEffect(() => {
      if (isOpen) {
        setModalIsOpen(true);
      }
    }, [isOpen]);
    if (typeof window !== "undefined" && window.envatoElements && window.envatoElements.modalAppHolder) {
      Modal.setAppElement(window.envatoElements.modalAppHolder);
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      Modal,
      {
        isOpen: modalIsOpen,
        onRequestClose: closeModal,
        style: customStyles$1,
        contentLabel: "Envato Elements",
        "data-testid": "modal-wrapper",
        children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$b.modalInner, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$b.modalHeader, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$b.modalLogo, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ModalEnvatoIcon, {}) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$b.headerTitle, children: templatePreviewTitle }),
            /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$b.headerActions, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                ImportSingleTemplate,
                {
                  templateKitId,
                  templateId,
                  existingImports
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: closeModal, "data-testid": "modal-close-button", className: styles$b.closeButton, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `dashicons dashicons-no-alt ${styles$b.dismissIcon}` }) })
            ] })
          ] }),
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$b.kitInner, children: typeof children === "function" ? children({ closeModal }) : children })
        ] })
      }
    );
  };
  const wrapper$1 = "_wrapper_lbo6s_8";
  const notice = "_notice_lbo6s_22";
  const requirements = "_requirements_lbo6s_29";
  const requirement = "_requirement_lbo6s_29";
  const checkbox = "_checkbox_lbo6s_38";
  const text = "_text_lbo6s_42";
  const status = "_status_lbo6s_46";
  const installingIcon = "_installingIcon_lbo6s_56";
  const cssPreview = "_cssPreview_lbo6s_60";
  const styles$a = {
    wrapper: wrapper$1,
    notice,
    requirements,
    requirement,
    checkbox,
    text,
    status,
    installingIcon,
    cssPreview
  };
  const installRequirement = ({ requirement: requirement2 }) => {
    const [loading, setLoading] = reactExports.useState(true);
    const [data, setData] = reactExports.useState(null);
    const [error, setError] = reactExports.useState(null);
    const hasInstalled = reactExports.useRef(false);
    reactExports.useEffect(() => {
      if (!requirement2 || hasInstalled.current) {
        setLoading(false);
        return;
      }
      const install = async () => {
        try {
          hasInstalled.current = true;
          setLoading(true);
          setError(null);
          const result = await apiCall("installRequirement", "POST", { requirement: requirement2 });
          setData(result);
          setLoading(false);
        } catch (err) {
          setError(err.message);
          setLoading(false);
        }
      };
      install();
    }, []);
    return { loading, data, error };
  };
  const InstallRequirementInBackground = ({ requirement: requirement2, completeCallback }) => {
    if (!requirement2) {
      reactExports.useEffect(() => {
        completeCallback();
      }, []);
      return "Skipped";
    }
    console.log("InstallRequirementInBackground starting with:", requirement2);
    const { loading, data, error } = installRequirement({ requirement: requirement2 });
    reactExports.useEffect(() => {
      console.log("InstallRequirement state:", { loading, error, data });
      if (!loading) {
        console.log("Calling completeCallback with error:", error);
        completeCallback(error);
      }
    }, [loading]);
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
      loading ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `dashicons dashicons-update ${styles$a.installingIcon}` }),
        "Installing..."
      ] }) : null,
      error ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "dashicons dashicons-no" }),
        data && data.error ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: data.error.data && data.error.data.url ? /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: data.error.data.url, target: "_blank", rel: "noopener noreferrer", children: data.error.message }) : data.error.message }) : "Error"
      ] }) : null,
      !loading && !error ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "dashicons dashicons-yes-alt" }),
        "Success!"
      ] }) : null
    ] });
  };
  const RequiredCSSPreview = ({ previewCss }) => {
    const [openRequiredCSSModal, setOpenRequiredCSSModal] = reactExports.useState(false);
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
      openRequiredCSSModal ? /* @__PURE__ */ jsxRuntimeExports.jsx(ModalWrapper, { isOpen: true, onCloseCallback: () => setOpenRequiredCSSModal(false), children: /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: styles$a.cssPreview, children: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { children: previewCss }) }) }) : null,
      " ",
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        "a",
        {
          href: "#",
          onClick: (event) => {
            event.preventDefault();
            setOpenRequiredCSSModal(true);
            return false;
          },
          children: "Preview CSS"
        }
      )
    ] });
  };
  const MissingRequirements = ({ plugins, theme, settings, requiredCss, templateKitId, completeCallback }) => {
    const [openRequirementsModal, setOpenRequirementsModal] = reactExports.useState(false);
    const [installingIndex, setInstallingIndex] = reactExports.useState(null);
    const [requirementsToInstall, setRequirementsToInstall] = reactExports.useState({});
    const installNextRequirement = () => {
      setInstallingIndex((oldStep) => oldStep + 1);
    };
    const missingRequirements = [];
    plugins.forEach((plugin) => {
      if (plugin.status !== "activated") {
        missingRequirements.push({
          plugin
        });
      }
    });
    settings.forEach((setting) => {
      missingRequirements.push({
        setting
      });
    });
    requiredCss.forEach((requiredCss2) => {
      missingRequirements.push({
        requiredCss: { ...requiredCss2, templateKitId }
      });
    });
    const missingCount = missingRequirements.length;
    if (missingCount === 0) {
      return null;
    }
    const isRequirementSelectedForInstall = (index2) => {
      return typeof requirementsToInstall[index2] === "undefined" || requirementsToInstall[index2];
    };
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
      openRequirementsModal ? /* @__PURE__ */ jsxRuntimeExports.jsx(ModalWrapper, { isOpen: true, onCloseCallback: completeCallback, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(MainHeading, { title: "Missing Requirements" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles$a.notice, children: "Please install and activate these missing requirements for this Template Kit to work correctly. We recommend checking with your web developer before applying these changes." }),
        /* @__PURE__ */ jsxRuntimeExports.jsxs("ul", { className: styles$a.requirements, children: [
          missingRequirements.map((requirement2, index2) => {
            return /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: styles$a.requirement, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.checkbox, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                "input",
                {
                  type: "checkbox",
                  id: `requirement${index2}`,
                  name: "installRequirement[]",
                  value: "1",
                  disabled: installingIndex !== null,
                  checked: isRequirementSelectedForInstall(index2),
                  onChange: (e) => {
                    const isChecked = !!e.target.checked;
                    setRequirementsToInstall((oldRequirements) => ({ ...oldRequirements, [index2]: isChecked }));
                  }
                }
              ) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.text, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { htmlFor: `requirement${index2}`, children: [
                requirement2.theme ? `Theme: ${requirement2.theme.name}` : null,
                requirement2.plugin ? `Plugin: ${requirement2.plugin.name}` : null,
                requirement2.setting ? `Setting: ${requirement2.setting.name}` : null,
                requirement2.requiredCss ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
                  requirement2.requiredCss.name,
                  ": ",
                  requirement2.requiredCss.description,
                  /* @__PURE__ */ jsxRuntimeExports.jsx(RequiredCSSPreview, { previewCss: requirement2.requiredCss.css_preview })
                ] }) : null
              ] }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.status, children: installingIndex === index2 || installingIndex > index2 ? /* @__PURE__ */ jsxRuntimeExports.jsx(InstallRequirementInBackground, { requirement: isRequirementSelectedForInstall(index2) ? requirement2 : null, completeCallback: installNextRequirement }, `installRequirement${index2}`) : null })
            ] }, `requirement${index2}`);
          }),
          theme && theme.name ? /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: styles$a.requirement, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.checkbox, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "dashicons dashicons-warning" }) }),
            /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$a.text, children: [
              'FYI: This Template Kit has only been tested with the "',
              theme.name,
              '" WordPress theme. ',
              /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
              "If the imported templates don’t look correct please read ",
              /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { href: "https://help.market.envato.com/hc/en-us/sections/360007560992-Template-Kits", text: "this article" }),
              "."
            ] })
          ] }) : null
        ] }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.footer, children: installingIndex === null ? /* @__PURE__ */ jsxRuntimeExports.jsx(
          Button,
          {
            type: "primary",
            icon: "plus",
            label: "Install Above Selected Requirements",
            onClick: () => {
              console.log("Install button clicked, starting installation...", { missingRequirements, requirementsToInstall });
              setInstallingIndex(0);
            }
          }
        ) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: installingIndex >= missingCount ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles$a.notice, children: "Once the above is completed you can close this window." }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button,
            {
              type: "primary",
              icon: "plus",
              label: "Close",
              onClick: completeCallback
            }
          )
        ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles$a.notice, children: "Installing..." }) }) })
      ] }) }) : null,
      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$a.wrapper, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$a.textWrapper, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: "Attention!" }),
          " There are ",
          missingCount,
          " requirements that need installing for this Template Kit to work correctly."
        ] }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.buttonWrapper, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "attention", label: "Install Requirements", icon: "info", onClick: () => {
          setOpenRequirementsModal(true);
        } }) })
      ] })
    ] });
  };
  MissingRequirements.propTypes = {
    plugins: PropTypes.arrayOf(PropTypes.shape({
      author: PropTypes.string,
      file: PropTypes.string,
      name: PropTypes.string,
      slug: PropTypes.string,
      status: PropTypes.string,
      url: PropTypes.string,
      version: PropTypes.string
    })),
    settings: PropTypes.arrayOf(PropTypes.shape({
      name: PropTypes.string,
      setting_name: PropTypes.string
    })),
    RequiredCss: PropTypes.arrayOf(PropTypes.shape({
      name: PropTypes.string,
      description: PropTypes.string,
      file: PropTypes.string
    })),
    templateKitId: PropTypes.number.isRequired,
    completeCallback: PropTypes.func.isRequired
  };
  MissingRequirements.defaultProps = {
    plugins: [],
    settings: [],
    requiredCss: []
  };
  const previewTemplate = "_previewTemplate_12783_1";
  const missingRequirementsWrapper = "_missingRequirementsWrapper_12783_7";
  const styles$9 = {
    previewTemplate,
    missingRequirementsWrapper
  };
  const TemplatePreviewModal = ({ onCloseCallback, templateId, templateKitId, existingImports, templateScreenShotUrl, templatePreviewTitle, installRequirements }) => {
    const { id } = useParams();
    const [refresh, setRefresh] = reactExports.useState(null);
    const kitIdToUse = templateKitId || parseInt(id);
    const installedKit = fetchIndividualTemplates({ templateKitId: kitIdToUse, refresh });
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(TemplateModalWrapper, { templateId, templateKitId, existingImports, templatePreviewTitle, isOpen: true, onCloseCallback, children: [
      installRequirements && !installedKit.loading && !installedKit.error && installedKit.data ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$9.missingRequirementsWrapper, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        MissingRequirements,
        {
          settings: installedKit.data.requirements.settings,
          theme: installedKit.data.requirements.theme,
          plugins: installedKit.data.requirements.plugins,
          requiredCss: installedKit.data.requirements.css,
          templateKitId: id,
          completeCallback: () => {
            setRefresh((/* @__PURE__ */ new Date()).getTime());
          }
        }
      ) }) : null,
      /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: styles$9.previewTemplate, src: templateScreenShotUrl, alt: templatePreviewTitle })
    ] });
  };
  const imageWrapper = "_imageWrapper_v6qq9_8";
  const expandButton = "_expandButton_v6qq9_15";
  const image = "_image_v6qq9_8";
  const unmetRequirementsMessage = "_unmetRequirementsMessage_v6qq9_37";
  const styles$8 = {
    imageWrapper,
    expandButton,
    image,
    unmetRequirementsMessage
  };
  const TemplateItemCardWrapper = ({ template }) => {
    const [isActivationModelOpen, setOpenActivationModal] = reactExports.useState(false);
    const cardRef = reactExports.useRef(null);
    const templateId = template.id;
    const templateKitId = template.template_kit_id;
    const templateName = template.name;
    const templateScreenShotUrl = template.screenshot_url;
    const templateExistingImports = template.imports;
    const [blockImport, setBlockImport] = reactExports.useState(template.unmet_requirements && template.unmet_requirements.length > 0);
    const description = template.metadata.additional_template_information ? template.metadata.additional_template_information.join(" ") : "";
    return /* @__PURE__ */ jsxRuntimeExports.jsx(GridItem, { colWidthPercentage: 20, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      ItemCard,
      {
        Images: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$8.imageWrapper, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: templateScreenShotUrl, alt: templateName, className: styles$8.image }),
          /* @__PURE__ */ jsxRuntimeExports.jsxs(
            "div",
            {
              className: styles$8.expandButton,
              ref: cardRef,
              onClick: (e) => {
                if (e.target === cardRef.current) {
                  setOpenActivationModal(true);
                }
              },
              children: [
                isActivationModelOpen ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                  TemplatePreviewModal,
                  {
                    templateScreenShotUrl,
                    templatePreviewTitle: templateName,
                    templateKitId,
                    templateId,
                    existingImports: templateExistingImports,
                    onCloseCallback: () => {
                      setOpenActivationModal(false);
                    },
                    installRequirements: blockImport
                  }
                ) : null,
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  Button,
                  {
                    type: "ghost",
                    icon: "expand",
                    onClick: () => {
                      setOpenActivationModal(true);
                    }
                  }
                )
              ]
            }
          )
        ] }),
        Buttons: /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: blockImport && templateExistingImports.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles$8.unmetRequirementsMessage, children: template.unmet_requirements.join(" ") }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "warning", label: "Ignore Requirements", icon: "cross", onClick: () => setBlockImport(false) })
        ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonWrapper, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          ImportSingleTemplate,
          {
            templateKitId,
            templateId,
            existingImports: templateExistingImports
          }
        ) }) }),
        title: templateName,
        description
      }
    ) }, templateId);
  };
  const TemplateList = ({ templates }) => {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(GridWrapper, { includeLastItemSpacer: true, children: templates.map((template) => /* @__PURE__ */ jsxRuntimeExports.jsx(TemplateItemCardWrapper, { template }, template.id)) });
  };
  const searchWrapper = "_searchWrapper_17qln_8";
  const searchInput = "_searchInput_17qln_14";
  const searchIcon = "_searchIcon_17qln_40";
  const styles$7 = {
    searchWrapper,
    searchInput,
    searchIcon
  };
  const TemplateSearch = ({ searchTerm, onSearchChange }) => {
    return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$7.searchWrapper, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        "input",
        {
          type: "text",
          className: styles$7.searchInput,
          placeholder: "Search templates...",
          value: searchTerm,
          onChange: (e) => onSearchChange(e.target.value)
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { icon: "search", className: styles$7.searchIcon })
    ] });
  };
  const TemplateListWrapper = ({ kitId }) => {
    const templateKitIdToFetch = kitId || "all";
    const [refresh, setRefresh] = reactExports.useState(null);
    const [searchTerm, setSearchTerm] = reactExports.useState("");
    const { loading, data, error } = fetchIndividualTemplates({ templateKitId: templateKitIdToFetch, refresh });
    if (loading) {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingAnimation, {});
    }
    if (error) {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorLoadingData, { message: error });
    }
    const templates = (data == null ? void 0 : data.templates) || [];
    const templatesArray = Array.isArray(templates) ? templates : Object.values(templates);
    let filteredTemplates = templatesArray;
    if (searchTerm.trim()) {
      const lowerSearch = searchTerm.toLowerCase();
      filteredTemplates = templatesArray.filter(
        (template) => {
          var _a, _b, _c, _d, _e;
          return ((_a = template.name) == null ? void 0 : _a.toLowerCase().includes(lowerSearch)) || ((_c = (_b = template.metadata) == null ? void 0 : _b.template_type) == null ? void 0 : _c.toLowerCase().includes(lowerSearch)) || ((_e = (_d = template.metadata) == null ? void 0 : _d.additional_template_information) == null ? void 0 : _e.some(
            (info) => info.toLowerCase().includes(lowerSearch)
          ));
        }
      );
    }
    if (templatesArray.length === 0) {
      return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { padding: "20px", textAlign: "center" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "No templates found in this kit." }) });
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
      (data == null ? void 0 : data.requirements) && kitId && /* @__PURE__ */ jsxRuntimeExports.jsx(
        MissingRequirements,
        {
          settings: data.requirements.settings || [],
          theme: data.requirements.theme,
          plugins: data.requirements.plugins || [],
          requiredCss: data.requirements.css || [],
          templateKitId: parseInt(kitId),
          completeCallback: () => {
            setRefresh((/* @__PURE__ */ new Date()).getTime());
          }
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(TemplateSearch, { searchTerm, onSearchChange: setSearchTerm }),
      filteredTemplates.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(TemplateList, { templates: filteredTemplates }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { padding: "20px", textAlign: "center" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { children: [
        'No templates found matching "',
        searchTerm,
        '"'
      ] }) })
    ] });
  };
  const backButton = "_backButton_5jqhb_8";
  const arrow = "_arrow_5jqhb_33";
  const label = "_label_5jqhb_38";
  const styles$6 = {
    backButton,
    arrow,
    label
  };
  const BackButton = ({ to = "/template-kits/installed-kits", label: label2 = "Back to All Kits" }) => {
    const history = useHistory();
    const handleClick = () => {
      history.push(to);
    };
    return /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { className: styles$6.backButton, onClick: handleClick, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { icon: "arrow-left-alt", className: styles$6.arrow }),
      /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$6.label, children: label2 })
    ] });
  };
  const wrapper = "_wrapper_19g8j_8";
  const searchFilter = "_searchFilter_19g8j_12";
  const viewToggle = "_viewToggle_19g8j_27";
  const viewToggleGridIcon = "_viewToggleGridIcon_19g8j_45";
  const viewToggleMasonryIcon = "_viewToggleMasonryIcon_19g8j_46";
  const viewToggleGrid = "_viewToggleGrid_19g8j_45";
  const viewToggleMasonry = "_viewToggleMasonry_19g8j_46";
  const styles$5 = {
    wrapper,
    searchFilter,
    viewToggle,
    viewToggleGridIcon,
    viewToggleMasonryIcon,
    viewToggleGrid,
    viewToggleMasonry
  };
  const SearchUi = ({ searchParams, onSearchSubmitted, aggregations, layout, setLayout }) => {
    return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$5.wrapper, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        TextInput,
        {
          searchParams,
          onSearchSubmitted: (args) => {
            onSearchSubmitted({ ...args });
          }
        }
      ),
      Object.keys(aggregations).length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$5.searchFilter, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs(
          "button",
          {
            type: "button",
            className: `${styles$5.viewToggle} ${layout === "masonry" ? styles$5.viewToggleMasonry : styles$5.viewToggleGrid}`,
            onClick: (e) => {
              e.preventDefault();
              setLayout(layout === "masonry" ? "square" : "masonry");
              return false;
            },
            children: [
              "View",
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                "svg",
                {
                  xmlns: "http://www.w3.org/2000/svg",
                  width: "20",
                  height: "20",
                  fill: "none",
                  viewBox: "0 0 20 20",
                  className: styles$5.viewToggleGridIcon,
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                    "path",
                    {
                      fill: "#888",
                      fillRule: "evenodd",
                      d: "M2 1h16c.55 0 1 .45 1 1v16c0 .55-.45 1-1 1H2c-.55 0-1-.45-1-1V2c0-.55.45-1 1-1zm7.01 7.99v-6H3v6h6.01zm8 0v-6h-6v6h6zm-8 8.01v-6H3v6h6.01zm8 0v-6h-6v6h6z",
                      clipRule: "evenodd"
                    }
                  )
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsxs(
                "svg",
                {
                  xmlns: "http://www.w3.org/2000/svg",
                  width: "20",
                  height: "20",
                  fill: "none",
                  viewBox: "0 0 20 20",
                  className: styles$5.viewToggleMasonryIcon,
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "path",
                      {
                        fill: "#888",
                        fillRule: "evenodd",
                        d: "M1 18V2c0-.55.45-1 1-1h16c.55 0 1 .45 1 1v16c0 .55-.45 1-1 1H2c-.55 0-1-.45-1-1zm10-7H3v6h8v-6zM6 3H3v6h3V3zm11 8h-4v6h4v-6zm0-8H8v6h9V3z",
                        clipRule: "evenodd"
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx("mask", { id: "a", width: "18", height: "18", x: "1", y: "1", maskUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "path",
                      {
                        fill: "#fff",
                        fillRule: "evenodd",
                        d: "M1 18V2c0-.55.45-1 1-1h16c.55 0 1 .45 1 1v16c0 .55-.45 1-1 1H2c-.55 0-1-.45-1-1zm10-7H3v6h8v-6zM6 3H3v6h3V3zm11 8h-4v6h4v-6zm0-8H8v6h9V3z",
                        clipRule: "evenodd"
                      }
                    ) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx("g", { mask: "url(#a)", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "path",
                      {
                        fill: "#0878B0",
                        d: "M-0.241 20.816H21.605V41.581H-0.241z",
                        transform: "rotate(-90 -.241 20.816)"
                      }
                    ) })
                  ]
                }
              )
            ]
          }
        ),
        aggregations.orientation ? /* @__PURE__ */ jsxRuntimeExports.jsx(
          Filter,
          {
            searchFilterChange: (args) => {
              onSearchSubmitted({ ...searchParams, ...args });
            },
            label: "Orientation",
            name: "orientation",
            variant: "checkbox",
            value: searchParams.orientation,
            attributes: aggregations.orientation.buckets,
            columns: 1
          }
        ) : null,
        aggregations.background ? /* @__PURE__ */ jsxRuntimeExports.jsx(
          Filter,
          {
            searchFilterChange: (args) => {
              onSearchSubmitted({ ...searchParams, ...args });
            },
            label: "Background",
            name: "background",
            variant: "checkbox",
            value: searchParams.background,
            attributes: aggregations.background.buckets,
            columns: 1
          }
        ) : null,
        aggregations.colors ? /* @__PURE__ */ jsxRuntimeExports.jsx(
          Filter,
          {
            searchFilterChange: (args) => {
              onSearchSubmitted({ ...searchParams, ...args });
            },
            label: "Colors",
            columns: 2,
            variant: "colors",
            name: "colors",
            value: searchParams.colors,
            attributes: aggregations.colors.buckets
          }
        ) : null
      ] }) }) : null
    ] });
  };
  const importPhoto = ({ photoId }) => {
    const [loading, setLoading] = reactExports.useState(true);
    const [data, setData] = reactExports.useState(null);
    const [error, setError] = reactExports.useState(null);
    reactExports.useEffect(() => {
      if (!photoId) {
        setLoading(false);
        return;
      }
      const importImg = async () => {
        try {
          setLoading(true);
          setError(null);
          const result = await apiCall("importPhoto", "POST", { photoId });
          setData(result);
          setLoading(false);
        } catch (err) {
          setError(err.message);
          setLoading(false);
        }
      };
      importImg();
    }, [photoId]);
    return { loading, data, error };
  };
  const ImportPhotoButton = ({ photoId, photoTitle, showLabel = false, customActionHook = null, completeCallback = null, errorCallback = null }) => {
    const { getDownloadedItemId, addDownloadedItem } = useGlobalConfig();
    const importedPhotoId = getDownloadedItemId(photoId);
    let isAlreadyCompleted = !!importedPhotoId;
    if (typeof window.envatoElements.photoImportCompleteCallback !== "undefined") {
      isAlreadyCompleted = false;
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      ButtonActionProvider,
      {
        DefaultButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", icon: "download", label: showLabel ? "Import Photo" : null }),
        LoadingButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", icon: "updateSpinning", label: showLabel ? "Importing...." : null, disabled: true }),
        ErrorButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "warning", icon: "cross", label: showLabel ? "Error!" : null, disabled: true }),
        SuccessButton: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", label: showLabel ? "Success!" : null, icon: "updateSpinning", disabled: true }),
        CompletedButton: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLinkButton, { type: "primary", icon: "eye", label: showLabel ? "View Imported Photo" : null, href: getImportedPhotoUrl({ importedPhotoId }) }),
        actionHook: () => customActionHook ? customActionHook() : importPhoto({ photoId }),
        isAlreadyCompleted,
        completedCallback: (data) => {
          if (data && data.success && data.imported_photo_id) {
            if (typeof window.envatoElements.photoImportCompleteCallback !== "undefined") {
              window.envatoElements.photoImportCompleteCallback(data);
            }
            addDownloadedItem({
              humaneId: photoId,
              importedId: data.imported_photo_id
            });
          }
        },
        errorCallback
      }
    );
  };
  const modalInner = "_modalInner_qir61_9";
  const modalHeader = "_modalHeader_qir61_24";
  const modalLogo = "_modalLogo_qir61_32";
  const headerTitle = "_headerTitle_qir61_36";
  const headerActions = "_headerActions_qir61_44";
  const closeButton = "_closeButton_qir61_51";
  const dismissIcon = "_dismissIcon_qir61_78";
  const photoInner = "_photoInner_qir61_102";
  const styles$4 = {
    modalInner,
    modalHeader,
    modalLogo,
    headerTitle,
    headerActions,
    closeButton,
    dismissIcon,
    photoInner
  };
  const customStyles = {
    overlay: {
      backgroundColor: "rgba(32, 32, 32, 0.81)",
      zIndex: 199999
    },
    content: {
      background: "#f1f1f1",
      border: "0",
      top: "50%",
      left: "50%",
      right: "auto",
      bottom: "auto",
      marginRight: "-50%",
      padding: "0",
      transform: "translate(-50%, -50%)",
      borderRadius: "4px"
    }
  };
  const PhotoModalWrapper = ({ photoId, photoTitle, isOpen, onCloseCallback = null, children }) => {
    const [modalIsOpen, setModalIsOpen] = React.useState(false);
    const closeModal = () => {
      setModalIsOpen(false);
      if (onCloseCallback) {
        onCloseCallback();
      }
    };
    reactExports.useEffect(() => {
      if (isOpen) {
        setModalIsOpen(true);
      }
    }, [isOpen]);
    if (typeof window !== "undefined" && window.envatoElements && window.envatoElements.modalAppHolder) {
      Modal.setAppElement(window.envatoElements.modalAppHolder);
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      Modal,
      {
        isOpen: modalIsOpen,
        onRequestClose: closeModal,
        style: customStyles,
        contentLabel: "Envato Elements",
        "data-testid": "modal-wrapper",
        children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.modalInner, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.modalHeader, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$4.modalLogo, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ModalEnvatoIcon, {}) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$4.headerTitle, children: photoTitle }),
            /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.headerActions, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(ImportPhotoButton, { photoId, photoTitle, showLabel: true }),
              /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: closeModal, "data-testid": "modal-close-button", className: styles$4.closeButton, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `dashicons dashicons-no-alt ${styles$4.dismissIcon}` }) })
            ] })
          ] }),
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$4.photoInner, children: typeof children === "function" ? children({ closeModal }) : children })
        ] })
      }
    );
  };
  const loadingImageWrapper = "_loadingImageWrapper_80dsb_1";
  const previewPhoto = "_previewPhoto_80dsb_5";
  const styles$3 = {
    loadingImageWrapper,
    previewPhoto
  };
  const PhotoPreviewModal = ({ onCloseCallback, photoUrl, photoTitle, photoId, aspectRatioHeight }) => {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(PhotoModalWrapper, { photoTitle, photoId, isOpen: true, onCloseCallback, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$3.loadingImageWrapper, style: { paddingBottom: `${aspectRatioHeight}%` }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: styles$3.previewPhoto, src: photoUrl, alt: photoTitle }) }) });
  };
  const itemFluid = "_itemFluid_1v9mn_1";
  const itemSquare = "_itemSquare_1v9mn_9";
  const inner = "_inner_1v9mn_28";
  const details = "_details_1v9mn_42";
  const detailsInner = "_detailsInner_1v9mn_60";
  const title = "_title_1v9mn_69";
  const features = "_features_1v9mn_74";
  const featureImported = "_featureImported_1v9mn_83";
  const styles$2 = {
    itemFluid,
    itemSquare,
    inner,
    details,
    detailsInner,
    title,
    features,
    featureImported
  };
  const PhotoItemCard = ({ layout, item: item2 }) => {
    const { getDownloadedItemId } = useGlobalConfig();
    const [isActivationModelOpen, setOpenActivationModal] = reactExports.useState(false);
    const cardRef = reactExports.useRef(null);
    const isPhotoImported = !!getDownloadedItemId(item2.humane_id);
    const imageUrl = item2.cover_image_urls.w600 || item2.cover_image_urls.w400 || item2.cover_image_urls.w100;
    const previewImageUrl = item2.cover_image_urls.w1200 || item2.cover_image_urls.w1000 || item2.cover_image_urls.w600;
    const backgroundImageInlineStyle = {
      backgroundImage: `url('${imageUrl}')`
    };
    const cardStyle = {};
    if (layout === "masonry") {
      cardStyle.width = `${item2.calculatedMasonryWidth}%`;
      backgroundImageInlineStyle.paddingBottom = `${item2.aspectRatioHeight}%`;
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${layout === "square" ? styles$2.itemSquare : styles$2.itemFluid}`, style: cardStyle, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$2.inner, style: backgroundImageInlineStyle, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$2.features, children: isPhotoImported ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$2.featureImported, children: "Imported" }) : null }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        "div",
        {
          className: styles$2.details,
          ref: cardRef,
          onClick: (e) => {
            if (e.target === cardRef.current) {
              setOpenActivationModal(true);
            }
          },
          children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$2.detailsInner, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$2.title, children: item2.title }),
            /* @__PURE__ */ jsxRuntimeExports.jsxs(ButtonWrapper, { children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(ImportPhotoButton, { photoId: item2.humane_id, photoTitle: item2.title, showLabel: false }),
              isActivationModelOpen ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                PhotoPreviewModal,
                {
                  photoUrl: previewImageUrl,
                  photoTitle: item2.title,
                  photoId: item2.humane_id,
                  aspectRatioHeight: item2.aspectRatioHeight,
                  onCloseCallback: () => {
                    setOpenActivationModal(false);
                  }
                }
              ) : null,
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                Button,
                {
                  type: "ghost",
                  icon: "expand",
                  onClick: () => {
                    setOpenActivationModal(true);
                  }
                }
              )
            ] })
          ] })
        }
      )
    ] }) });
  };
  const splitItemsIntoRows = (items, itemsPerRow = 3) => {
    const rows = [];
    for (let i = 0; i < items.length; i += itemsPerRow) {
      rows.push(items.slice(i, i + itemsPerRow));
    }
    return rows;
  };
  const masonryWrapper = "_masonryWrapper_1ot79_1";
  const styles$1 = {
    masonryWrapper
  };
  const SearchResults = ({ searchResults, searchParams, onSearchSubmitted, layout }) => {
    if (searchResults.results.search_query_result.search_payload.total_hits === 0) {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(NoResultsFound, {});
    }
    const getBreakpointsImages = (items) => {
      const breakpoints = [
        {
          breakpoint: "large",
          itemsPerRow: 5,
          gutterWidth: 1.1
        }
      ];
      let sliceIndex = 0;
      const breakpointsImages = breakpoints.map((breakpoint, i) => {
        const itemRows = splitItemsIntoRows(items, breakpoint.itemsPerRow);
        const imagesConfig = itemRows.map(
          (itemRow, rowIndex) => itemRow.items.map((item2, imageIndex) => {
            const numOfGutters = itemRow.items.length - 1;
            const smallLastRow = rowIndex === itemRows.length - 1 && itemRow.size < breakpoint.itemsPerRow * 0.75;
            const rowSize = smallLastRow ? breakpoint.itemsPerRow : itemRow.size;
            const { aspectRatio = 1 } = item2;
            const calculatedMasonryWidth = aspectRatio / rowSize * (100 - numOfGutters * breakpoint.gutterWidth);
            return {
              ...item2,
              calculatedMasonryWidth
            };
          })
        );
        if (sliceIndex < imagesConfig.length) sliceIndex = imagesConfig.length;
        return {
          breakpoint: {
            ...breakpoint,
            // size: idx(gridBreakpoints, (_) => _[breakpoint.breakpoint]) || 0,
            size: breakpoint.breakpoint || 0
          },
          images: imagesConfig.flat()
        };
      });
      return { breakpointsImages, sliceIndex };
    };
    const pagination2 = () => /* @__PURE__ */ jsxRuntimeExports.jsx(
      Pagination,
      {
        currentPage: searchResults.results.current_page,
        totalHits: searchResults.results.search_query_result.search_payload.total_hits,
        perPage: searchResults.results.per_page,
        searchParams,
        onSearchSubmitted
      }
    );
    if (layout === "masonry") {
      const { breakpointsImages } = getBreakpointsImages(searchResults.results.search_query_result.search_payload.items);
      const items = breakpointsImages[0].images;
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$1.masonryWrapper, children: items.map((item2) => /* @__PURE__ */ jsxRuntimeExports.jsx(PhotoItemCard, { layout, item: item2 }, item2.humane_id)) }),
        pagination2()
      ] });
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(GridWrapper, { includeLastItemSpacer: true, children: searchResults.results.search_query_result.search_payload.items.map((item2) => /* @__PURE__ */ jsxRuntimeExports.jsx(GridItem, { colWidthPercentage: 20, children: /* @__PURE__ */ jsxRuntimeExports.jsx(PhotoItemCard, { layout, item: item2 }) }, item2.humane_id)) }),
      pagination2()
    ] });
  };
  const fetchPhotosSearchResults = ({ searchTerm, page }) => {
    const [loading, setLoading] = reactExports.useState(true);
    const [data, setData] = reactExports.useState(null);
    const [error, setError] = reactExports.useState(null);
    reactExports.useEffect(() => {
      const fetch2 = async () => {
        try {
          setLoading(true);
          setError(null);
          const result = await apiCall("fetchPhotosSearchResults", "POST", { searchTerm, page });
          setData(result);
          setLoading(false);
        } catch (err) {
          setError(err.message);
          setLoading(false);
        }
      };
      fetch2();
    }, [searchTerm, page]);
    return { loading, data, error };
  };
  const SearchWrapper = ({ searchParams, onSearchSubmitted }) => {
    const { loading, data, error } = fetchPhotosSearchResults(searchParams);
    const [layout, setLayout] = reactExports.useState("masonry");
    const aggregations = !loading && !error && data && data.results ? data.results.search_query_result.search_payload.aggregations : {};
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        SearchUi,
        {
          searchParams,
          onSearchSubmitted,
          aggregations,
          layout,
          setLayout
        }
      ),
      loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingAnimation, {}) : null,
      error ? /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorLoadingData, {}) : null,
      !loading && !error && data ? /* @__PURE__ */ jsxRuntimeExports.jsx(
        SearchResults,
        {
          searchResults: data,
          searchParams,
          onSearchSubmitted,
          layout
        }
      ) : null
    ] });
  };
  const settingsContainer = "_settingsContainer_1jjrj_8";
  const settingsTitle = "_settingsTitle_1jjrj_14";
  const settingsGroup = "_settingsGroup_1jjrj_25";
  const settingItem = "_settingItem_1jjrj_41";
  const settingLabel = "_settingLabel_1jjrj_49";
  const settingDescription = "_settingDescription_1jjrj_62";
  const settingInput = "_settingInput_1jjrj_72";
  const settingSelect = "_settingSelect_1jjrj_73";
  const settingsActions = "_settingsActions_1jjrj_107";
  const saveButton = "_saveButton_1jjrj_116";
  const savedMessage = "_savedMessage_1jjrj_157";
  const styles = {
    settingsContainer,
    settingsTitle,
    settingsGroup,
    settingItem,
    settingLabel,
    settingDescription,
    settingInput,
    settingSelect,
    settingsActions,
    saveButton,
    savedMessage
  };
  const Settings = ({ onSettingsChange, initialSettings = {} }) => {
    const [settings, setSettings] = reactExports.useState({
      autoImport: false,
      imageQuality: "high",
      downloadPath: "",
      notifications: true,
      theme: "light",
      ...initialSettings
    });
    const [loading, setLoading] = reactExports.useState(false);
    const [saved, setSaved] = reactExports.useState(false);
    reactExports.useEffect(() => {
      setSettings((prev) => ({ ...prev, ...initialSettings }));
    }, [initialSettings]);
    const handleSettingChange = (key, value) => {
      const newSettings = { ...settings, [key]: value };
      setSettings(newSettings);
      setSaved(false);
      if (onSettingsChange) {
        onSettingsChange(newSettings);
      }
    };
    const handleSave = async () => {
      setLoading(true);
      try {
        await new Promise((resolve) => setTimeout(resolve, 1e3));
        setSaved(true);
        setTimeout(() => setSaved(false), 3e3);
      } catch (error) {
        console.error("Error saving settings:", error);
      } finally {
        setLoading(false);
      }
    };
    return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles.settingsContainer, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: styles.settingsTitle, children: "Settings" }),
      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles.settingsGroup, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { children: "Import Settings" }),
        /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles.settingItem, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: styles.settingLabel, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              "input",
              {
                type: "checkbox",
                checked: settings.autoImport,
                onChange: (e) => handleSettingChange("autoImport", e.target.checked)
              }
            ),
            "Auto-import templates"
          ] }),
          /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles.settingDescription, children: "Automatically import templates when selected" })
        ] }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles.settingItem, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: styles.settingLabel, children: [
          "Image Quality:",
          /* @__PURE__ */ jsxRuntimeExports.jsxs(
            "select",
            {
              value: settings.imageQuality,
              onChange: (e) => handleSettingChange("imageQuality", e.target.value),
              className: styles.settingSelect,
              children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "low", children: "Low" }),
                /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "medium", children: "Medium" }),
                /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "high", children: "High" })
              ]
            }
          )
        ] }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles.settingItem, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: styles.settingLabel, children: [
          "Download Path:",
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            "input",
            {
              type: "text",
              value: settings.downloadPath,
              onChange: (e) => handleSettingChange("downloadPath", e.target.value),
              className: styles.settingInput,
              placeholder: "/wp-content/uploads/envato-elements/"
            }
          )
        ] }) })
      ] }),
      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles.settingsGroup, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { children: "Preferences" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles.settingItem, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: styles.settingLabel, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            "input",
            {
              type: "checkbox",
              checked: settings.notifications,
              onChange: (e) => handleSettingChange("notifications", e.target.checked)
            }
          ),
          "Enable notifications"
        ] }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles.settingItem, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: styles.settingLabel, children: [
          "Theme:",
          /* @__PURE__ */ jsxRuntimeExports.jsxs(
            "select",
            {
              value: settings.theme,
              onChange: (e) => handleSettingChange("theme", e.target.value),
              className: styles.settingSelect,
              children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "light", children: "Light" }),
                /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "dark", children: "Dark" }),
                /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "auto", children: "Auto" })
              ]
            }
          )
        ] }) })
      ] }),
      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles.settingsActions, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          "button",
          {
            type: "button",
            onClick: handleSave,
            disabled: loading,
            className: styles.saveButton,
            children: loading ? "Saving..." : "Save Settings"
          }
        ),
        saved && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles.savedMessage, children: "Settings saved!" })
      ] })
    ] });
  };
  Settings.propTypes = {
    onSettingsChange: PropTypes.func,
    initialSettings: PropTypes.object
  };
  const App = () => {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalConfigProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(APIErrorProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(HashRouter, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "envato-elements-wrapper", children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(APIErrorMessage, {}),
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "envato-elements-content", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Switch, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { exact: true, path: "/", component: FirstPageRedirector }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/template-kits/installed-kits/kit/:kitId", children: ({ match }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(BackButton, {}),
          /* @__PURE__ */ jsxRuntimeExports.jsx(TemplateListWrapper, { kitId: match.params.kitId ? parseInt(match.params.kitId) : null })
        ] }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { exact: true, path: "/template-kits/installed-kits", children: /* @__PURE__ */ jsxRuntimeExports.jsx(KitListWrapper, {}) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/photos", component: SearchWrapper }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/settings", component: Settings }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Redirect, { to: "/welcome" })
      ] }) })
    ] }) }) }) });
  };
  if (!window.envatoElements) {
    window.envatoElements = {};
  }
  window.envatoElements.initBackend = function(appHolder) {
    if (appHolder) {
      ReactDOM.render(/* @__PURE__ */ jsxRuntimeExports.jsx(App, {}), appHolder);
    }
  };
  window.envatoElements.initMagicButton = function(modalHolder, config) {
    if (modalHolder) {
      if (!window.envatoElements.magicButtonMode) {
        window.envatoElements.magicButtonMode = config;
      }
      modalHolder.className = "envato-elements-modal-wrapper";
      const closeButton2 = document.createElement("button");
      closeButton2.className = "modal-close-button";
      closeButton2.innerHTML = "×";
      closeButton2.onclick = () => {
        window.envatoElements.closeMagicButton(modalHolder);
      };
      const reactWrapper = document.createElement("div");
      reactWrapper.className = "envato-elements-wrapper";
      modalHolder.innerHTML = "";
      reactWrapper.appendChild(closeButton2);
      modalHolder.appendChild(reactWrapper);
      ReactDOM.render(/* @__PURE__ */ jsxRuntimeExports.jsx(App, {}), reactWrapper);
    }
  };
  window.envatoElements.closeMagicButton = function(modalHolder) {
    if (modalHolder) {
      ReactDOM.unmountComponentAtNode(modalHolder);
      if (modalHolder.parentNode) {
        modalHolder.parentNode.removeChild(modalHolder);
      }
    }
  };
})();
//# sourceMappingURL=main.js.map
