import { StateStoreImpl as Kg } from "@wix/builder-state";
class Io {
  #e;
  #r;
  #i;
  #t;
  #n;
  constructor(s, i) {
    this.#e = s, this.#r = /* @__PURE__ */ new Map(), this.#i = i ?? {}, this.#t = /* @__PURE__ */ new Map(), this.#n = /* @__PURE__ */ new Map();
  }
  subscribeToEvent(s, i, c) {
    return this.#t.has(s) || this.#t.set(s, {}), this.#t.get(s)[i] || (this.#t.get(s)[i] = /* @__PURE__ */ new Set()), this.#t.get(s)[i].add(c), this.#e.props.updateOverrides(s, {
      [i]: (f) => {
        const g = typeof f == "object" ? { ...f, type: f.type, data: f.data, compId: this.scopeId } : f;
        this.#t.get(s)[i].forEach((y) => y(g));
      }
    }), this.#n.forEach((f) => {
      f.props.getOverrides(s) && f.subscribeToEvent(s, i, c);
    }), () => {
      this.#t.get(s)[i].delete(c), this.#t.get(s)[i].size === 0 && this.#e.props.updateOverrides(s, { [i]: void 0 });
    };
  }
  getSdkData(s) {
    return this.#i[s];
  }
  get state() {
    return this.#r;
  }
  get stateStore() {
    return this.#e;
  }
  get props() {
    return this.#e.props;
  }
  get deletedComponents() {
    return this.#e.deletedComponents;
  }
  get styles() {
    return this.#e.styles;
  }
  get scopeId() {
    return this.#e.scopeId;
  }
  get scopedStores() {
    return this.#n;
  }
  createScopedStore(s, i) {
    const c = this.#n.get(s);
    if (c)
      return c;
    const f = new Io(this.#e.createScopedStore(s, i, () => this.#n.delete(s)), this.#i);
    return f.#r = this.#r, this.#n.set(s, f), f;
  }
  disposeScopedStore(s) {
    this.#e.disposeScopedStore(s), this.#n.delete(s);
  }
}
var Fe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Gg(r) {
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
}
function Hg(r) {
  if (r.__esModule) return r;
  var s = r.default;
  if (typeof s == "function") {
    var i = function c() {
      return this instanceof c ? Reflect.construct(s, arguments, this.constructor) : s.apply(this, arguments);
    };
    i.prototype = s.prototype;
  } else i = {};
  return Object.defineProperty(i, "__esModule", { value: !0 }), Object.keys(r).forEach(function(c) {
    var f = Object.getOwnPropertyDescriptor(r, c);
    Object.defineProperty(i, c, f.get ? f : {
      enumerable: !0,
      get: function() {
        return r[c];
      }
    });
  }), i;
}
var To = {}, Qn = {}, In = {}, zr = {}, Vg = {};
const qg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  wixContext: Vg
}, Symbol.toStringTag, { value: "Module" })), Yg = /* @__PURE__ */ Hg(qg);
var Tn = {};
Object.defineProperty(Tn, "__esModule", { value: !0 });
Tn.ThreadMode = void 0;
Tn.defineService = Xg;
Tn.implementService = Cu;
var vu;
(function(r) {
  r[r.MAIN = 0] = "MAIN", r[r.REMOTE = 1] = "REMOTE";
})(vu || (Tn.ThreadMode = vu = {}));
function Xg(r) {
  return r;
}
function Cu(r, s) {
  return s;
}
Cu.withConfig = function() {
  return function(r, s) {
    return s;
  };
};
(function(r) {
  Object.defineProperty(r, "__esModule", { value: !0 }), r.resolveSignalsReadyFromContext = r.resolveServiceGetterFromContext = r.implementService = r.defineService = void 0;
  const s = Yg;
  var i = Tn;
  Object.defineProperty(r, "defineService", { enumerable: !0, get: function() {
    return i.defineService;
  } }), Object.defineProperty(r, "implementService", { enumerable: !0, get: function() {
    return i.implementService;
  } });
  const c = () => s.wixContext?.getService || globalThis?.__wix_context__?.getService;
  r.resolveServiceGetterFromContext = c;
  const f = () => (s.wixContext?.awaitRemoteSignals || globalThis?.__wix_context__?.awaitRemoteSignals || (() => Promise.resolve()))();
  r.resolveSignalsReadyFromContext = f;
})(zr);
Object.defineProperty(In, "__esModule", { value: !0 });
In.implementStaticService = In.defineStaticService = void 0;
const xu = zr;
In.defineStaticService = xu.defineService;
In.implementStaticService = xu.implementService;
(function(r) {
  var s = Fe && Fe.__createBinding || (Object.create ? function(c, f, g, y) {
    y === void 0 && (y = g);
    var v = Object.getOwnPropertyDescriptor(f, g);
    (!v || ("get" in v ? !f.__esModule : v.writable || v.configurable)) && (v = { enumerable: !0, get: function() {
      return f[g];
    } }), Object.defineProperty(c, y, v);
  } : function(c, f, g, y) {
    y === void 0 && (y = g), c[y] = f[g];
  }), i = Fe && Fe.__exportStar || function(c, f) {
    for (var g in c) g !== "default" && !Object.prototype.hasOwnProperty.call(f, g) && s(f, c, g);
  };
  Object.defineProperty(r, "__esModule", { value: !0 }), i(In, r);
})(Qn);
Object.defineProperty(To, "__esModule", { value: !0 });
var Pu = To.StyleUtilsDefinition = void 0;
const zg = Qn;
Pu = To.StyleUtilsDefinition = (0, zg.defineStaticService)("viewer-core/viewer-service-style-utils");
var Du = {}, Zr = {};
Object.defineProperty(Zr, "__esModule", { value: !0 });
Zr.LinkUtilsDefinition = void 0;
const Zg = Qn;
Zr.LinkUtilsDefinition = (0, Zg.defineStaticService)("viewer-core/viewer-service-link-utils");
var jn = {}, Yr = { exports: {} };
Yr.exports;
(function(r, s) {
  (function() {
    var i, c = "4.17.21", f = 200, g = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", y = "Expected a function", v = "Invalid `variable` option passed into `_.template`", E = "__lodash_hash_undefined__", S = 500, x = "__lodash_placeholder__", O = 1, H = 2, P = 4, I = 1, W = 2, q = 1, le = 2, be = 4, pe = 8, Ee = 16, Y = 32, D = 64, k = 128, j = 256, _e = 512, Je = 30, Lt = "...", st = 800, Ft = 16, sn = 1, T = 2, B = 3, te = 1 / 0, oe = 9007199254740991, R = 17976931348623157e292, M = NaN, V = 4294967295, ae = V - 1, we = V >>> 1, Le = [
      ["ary", k],
      ["bind", q],
      ["bindKey", le],
      ["curry", pe],
      ["curryRight", Ee],
      ["flip", _e],
      ["partial", Y],
      ["partialRight", D],
      ["rearg", j]
    ], Ae = "[object Arguments]", De = "[object Array]", Ot = "[object AsyncFunction]", Qe = "[object Boolean]", wt = "[object Date]", $n = "[object DOMException]", Xt = "[object Error]", an = "[object Function]", un = "[object GeneratorFunction]", He = "[object Map]", Wt = "[object Number]", tr = "[object Null]", je = "[object Object]", nr = "[object Promise]", ol = "[object Proxy]", Rn = "[object RegExp]", gt = "[object Set]", Cn = "[object String]", rr = "[object Symbol]", sl = "[object Undefined]", xn = "[object WeakMap]", al = "[object WeakSet]", Pn = "[object ArrayBuffer]", ln = "[object DataView]", Jr = "[object Float32Array]", Qr = "[object Float64Array]", jr = "[object Int8Array]", ei = "[object Int16Array]", ti = "[object Int32Array]", ni = "[object Uint8Array]", ri = "[object Uint8ClampedArray]", ii = "[object Uint16Array]", oi = "[object Uint32Array]", ul = /\b__p \+= '';/g, ll = /\b(__p \+=) '' \+/g, cl = /(__e\(.*?\)|\b__t\)) \+\n'';/g, Ko = /&(?:amp|lt|gt|quot|#39);/g, Go = /[&<>"']/g, fl = RegExp(Ko.source), dl = RegExp(Go.source), hl = /<%-([\s\S]+?)%>/g, pl = /<%([\s\S]+?)%>/g, Ho = /<%=([\s\S]+?)%>/g, _l = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, gl = /^\w*$/, vl = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, si = /[\\^$.*+?()[\]{}|]/g, ml = RegExp(si.source), ai = /^\s+/, bl = /\s/, El = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, wl = /\{\n\/\* \[wrapped with (.+)\] \*/, yl = /,? & /, Al = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, Sl = /[()=,{}\[\]\/\s]/, Ll = /\\(\\)?/g, Ol = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, Vo = /\w*$/, Il = /^[-+]0x[0-9a-f]+$/i, Tl = /^0b[01]+$/i, $l = /^\[object .+?Constructor\]$/, Rl = /^0o[0-7]+$/i, Cl = /^(?:0|[1-9]\d*)$/, xl = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, ir = /($^)/, Pl = /['\n\r\u2028\u2029\\]/g, or = "\\ud800-\\udfff", Dl = "\\u0300-\\u036f", Ul = "\\ufe20-\\ufe2f", Ml = "\\u20d0-\\u20ff", qo = Dl + Ul + Ml, Yo = "\\u2700-\\u27bf", Xo = "a-z\\xdf-\\xf6\\xf8-\\xff", Fl = "\\xac\\xb1\\xd7\\xf7", Wl = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", Bl = "\\u2000-\\u206f", Nl = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", zo = "A-Z\\xc0-\\xd6\\xd8-\\xde", Zo = "\\ufe0e\\ufe0f", Jo = Fl + Wl + Bl + Nl, ui = "['’]", kl = "[" + or + "]", Qo = "[" + Jo + "]", sr = "[" + qo + "]", jo = "\\d+", Kl = "[" + Yo + "]", es = "[" + Xo + "]", ts = "[^" + or + Jo + jo + Yo + Xo + zo + "]", li = "\\ud83c[\\udffb-\\udfff]", Gl = "(?:" + sr + "|" + li + ")", ns = "[^" + or + "]", ci = "(?:\\ud83c[\\udde6-\\uddff]){2}", fi = "[\\ud800-\\udbff][\\udc00-\\udfff]", cn = "[" + zo + "]", rs = "\\u200d", is = "(?:" + es + "|" + ts + ")", Hl = "(?:" + cn + "|" + ts + ")", os = "(?:" + ui + "(?:d|ll|m|re|s|t|ve))?", ss = "(?:" + ui + "(?:D|LL|M|RE|S|T|VE))?", as = Gl + "?", us = "[" + Zo + "]?", Vl = "(?:" + rs + "(?:" + [ns, ci, fi].join("|") + ")" + us + as + ")*", ql = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Yl = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", ls = us + as + Vl, Xl = "(?:" + [Kl, ci, fi].join("|") + ")" + ls, zl = "(?:" + [ns + sr + "?", sr, ci, fi, kl].join("|") + ")", Zl = RegExp(ui, "g"), Jl = RegExp(sr, "g"), di = RegExp(li + "(?=" + li + ")|" + zl + ls, "g"), Ql = RegExp([
      cn + "?" + es + "+" + os + "(?=" + [Qo, cn, "$"].join("|") + ")",
      Hl + "+" + ss + "(?=" + [Qo, cn + is, "$"].join("|") + ")",
      cn + "?" + is + "+" + os,
      cn + "+" + ss,
      Yl,
      ql,
      jo,
      Xl
    ].join("|"), "g"), jl = RegExp("[" + rs + or + qo + Zo + "]"), ec = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, tc = [
      "Array",
      "Buffer",
      "DataView",
      "Date",
      "Error",
      "Float32Array",
      "Float64Array",
      "Function",
      "Int8Array",
      "Int16Array",
      "Int32Array",
      "Map",
      "Math",
      "Object",
      "Promise",
      "RegExp",
      "Set",
      "String",
      "Symbol",
      "TypeError",
      "Uint8Array",
      "Uint8ClampedArray",
      "Uint16Array",
      "Uint32Array",
      "WeakMap",
      "_",
      "clearTimeout",
      "isFinite",
      "parseInt",
      "setTimeout"
    ], nc = -1, ve = {};
    ve[Jr] = ve[Qr] = ve[jr] = ve[ei] = ve[ti] = ve[ni] = ve[ri] = ve[ii] = ve[oi] = !0, ve[Ae] = ve[De] = ve[Pn] = ve[Qe] = ve[ln] = ve[wt] = ve[Xt] = ve[an] = ve[He] = ve[Wt] = ve[je] = ve[Rn] = ve[gt] = ve[Cn] = ve[xn] = !1;
    var ge = {};
    ge[Ae] = ge[De] = ge[Pn] = ge[ln] = ge[Qe] = ge[wt] = ge[Jr] = ge[Qr] = ge[jr] = ge[ei] = ge[ti] = ge[He] = ge[Wt] = ge[je] = ge[Rn] = ge[gt] = ge[Cn] = ge[rr] = ge[ni] = ge[ri] = ge[ii] = ge[oi] = !0, ge[Xt] = ge[an] = ge[xn] = !1;
    var rc = {
      // Latin-1 Supplement block.
      À: "A",
      Á: "A",
      Â: "A",
      Ã: "A",
      Ä: "A",
      Å: "A",
      à: "a",
      á: "a",
      â: "a",
      ã: "a",
      ä: "a",
      å: "a",
      Ç: "C",
      ç: "c",
      Ð: "D",
      ð: "d",
      È: "E",
      É: "E",
      Ê: "E",
      Ë: "E",
      è: "e",
      é: "e",
      ê: "e",
      ë: "e",
      Ì: "I",
      Í: "I",
      Î: "I",
      Ï: "I",
      ì: "i",
      í: "i",
      î: "i",
      ï: "i",
      Ñ: "N",
      ñ: "n",
      Ò: "O",
      Ó: "O",
      Ô: "O",
      Õ: "O",
      Ö: "O",
      Ø: "O",
      ò: "o",
      ó: "o",
      ô: "o",
      õ: "o",
      ö: "o",
      ø: "o",
      Ù: "U",
      Ú: "U",
      Û: "U",
      Ü: "U",
      ù: "u",
      ú: "u",
      û: "u",
      ü: "u",
      Ý: "Y",
      ý: "y",
      ÿ: "y",
      Æ: "Ae",
      æ: "ae",
      Þ: "Th",
      þ: "th",
      ß: "ss",
      // Latin Extended-A block.
      Ā: "A",
      Ă: "A",
      Ą: "A",
      ā: "a",
      ă: "a",
      ą: "a",
      Ć: "C",
      Ĉ: "C",
      Ċ: "C",
      Č: "C",
      ć: "c",
      ĉ: "c",
      ċ: "c",
      č: "c",
      Ď: "D",
      Đ: "D",
      ď: "d",
      đ: "d",
      Ē: "E",
      Ĕ: "E",
      Ė: "E",
      Ę: "E",
      Ě: "E",
      ē: "e",
      ĕ: "e",
      ė: "e",
      ę: "e",
      ě: "e",
      Ĝ: "G",
      Ğ: "G",
      Ġ: "G",
      Ģ: "G",
      ĝ: "g",
      ğ: "g",
      ġ: "g",
      ģ: "g",
      Ĥ: "H",
      Ħ: "H",
      ĥ: "h",
      ħ: "h",
      Ĩ: "I",
      Ī: "I",
      Ĭ: "I",
      Į: "I",
      İ: "I",
      ĩ: "i",
      ī: "i",
      ĭ: "i",
      į: "i",
      ı: "i",
      Ĵ: "J",
      ĵ: "j",
      Ķ: "K",
      ķ: "k",
      ĸ: "k",
      Ĺ: "L",
      Ļ: "L",
      Ľ: "L",
      Ŀ: "L",
      Ł: "L",
      ĺ: "l",
      ļ: "l",
      ľ: "l",
      ŀ: "l",
      ł: "l",
      Ń: "N",
      Ņ: "N",
      Ň: "N",
      Ŋ: "N",
      ń: "n",
      ņ: "n",
      ň: "n",
      ŋ: "n",
      Ō: "O",
      Ŏ: "O",
      Ő: "O",
      ō: "o",
      ŏ: "o",
      ő: "o",
      Ŕ: "R",
      Ŗ: "R",
      Ř: "R",
      ŕ: "r",
      ŗ: "r",
      ř: "r",
      Ś: "S",
      Ŝ: "S",
      Ş: "S",
      Š: "S",
      ś: "s",
      ŝ: "s",
      ş: "s",
      š: "s",
      Ţ: "T",
      Ť: "T",
      Ŧ: "T",
      ţ: "t",
      ť: "t",
      ŧ: "t",
      Ũ: "U",
      Ū: "U",
      Ŭ: "U",
      Ů: "U",
      Ű: "U",
      Ų: "U",
      ũ: "u",
      ū: "u",
      ŭ: "u",
      ů: "u",
      ű: "u",
      ų: "u",
      Ŵ: "W",
      ŵ: "w",
      Ŷ: "Y",
      ŷ: "y",
      Ÿ: "Y",
      Ź: "Z",
      Ż: "Z",
      Ž: "Z",
      ź: "z",
      ż: "z",
      ž: "z",
      Ĳ: "IJ",
      ĳ: "ij",
      Œ: "Oe",
      œ: "oe",
      ŉ: "'n",
      ſ: "s"
    }, ic = {
      "&": "&amp;",
      "<": "&lt;",
      ">": "&gt;",
      '"': "&quot;",
      "'": "&#39;"
    }, oc = {
      "&amp;": "&",
      "&lt;": "<",
      "&gt;": ">",
      "&quot;": '"',
      "&#39;": "'"
    }, sc = {
      "\\": "\\",
      "'": "'",
      "\n": "n",
      "\r": "r",
      "\u2028": "u2028",
      "\u2029": "u2029"
    }, ac = parseFloat, uc = parseInt, cs = typeof Fe == "object" && Fe && Fe.Object === Object && Fe, lc = typeof self == "object" && self && self.Object === Object && self, Ue = cs || lc || Function("return this")(), hi = s && !s.nodeType && s, zt = hi && !0 && r && !r.nodeType && r, fs = zt && zt.exports === hi, pi = fs && cs.process, at = function() {
      try {
        var p = zt && zt.require && zt.require("util").types;
        return p || pi && pi.binding && pi.binding("util");
      } catch {
      }
    }(), ds = at && at.isArrayBuffer, hs = at && at.isDate, ps = at && at.isMap, _s = at && at.isRegExp, gs = at && at.isSet, vs = at && at.isTypedArray;
    function et(p, b, m) {
      switch (m.length) {
        case 0:
          return p.call(b);
        case 1:
          return p.call(b, m[0]);
        case 2:
          return p.call(b, m[0], m[1]);
        case 3:
          return p.call(b, m[0], m[1], m[2]);
      }
      return p.apply(b, m);
    }
    function cc(p, b, m, C) {
      for (var X = -1, ce = p == null ? 0 : p.length; ++X < ce; ) {
        var Re = p[X];
        b(C, Re, m(Re), p);
      }
      return C;
    }
    function ut(p, b) {
      for (var m = -1, C = p == null ? 0 : p.length; ++m < C && b(p[m], m, p) !== !1; )
        ;
      return p;
    }
    function fc(p, b) {
      for (var m = p == null ? 0 : p.length; m-- && b(p[m], m, p) !== !1; )
        ;
      return p;
    }
    function ms(p, b) {
      for (var m = -1, C = p == null ? 0 : p.length; ++m < C; )
        if (!b(p[m], m, p))
          return !1;
      return !0;
    }
    function Bt(p, b) {
      for (var m = -1, C = p == null ? 0 : p.length, X = 0, ce = []; ++m < C; ) {
        var Re = p[m];
        b(Re, m, p) && (ce[X++] = Re);
      }
      return ce;
    }
    function ar(p, b) {
      var m = p == null ? 0 : p.length;
      return !!m && fn(p, b, 0) > -1;
    }
    function _i(p, b, m) {
      for (var C = -1, X = p == null ? 0 : p.length; ++C < X; )
        if (m(b, p[C]))
          return !0;
      return !1;
    }
    function me(p, b) {
      for (var m = -1, C = p == null ? 0 : p.length, X = Array(C); ++m < C; )
        X[m] = b(p[m], m, p);
      return X;
    }
    function Nt(p, b) {
      for (var m = -1, C = b.length, X = p.length; ++m < C; )
        p[X + m] = b[m];
      return p;
    }
    function gi(p, b, m, C) {
      var X = -1, ce = p == null ? 0 : p.length;
      for (C && ce && (m = p[++X]); ++X < ce; )
        m = b(m, p[X], X, p);
      return m;
    }
    function dc(p, b, m, C) {
      var X = p == null ? 0 : p.length;
      for (C && X && (m = p[--X]); X--; )
        m = b(m, p[X], X, p);
      return m;
    }
    function vi(p, b) {
      for (var m = -1, C = p == null ? 0 : p.length; ++m < C; )
        if (b(p[m], m, p))
          return !0;
      return !1;
    }
    var hc = mi("length");
    function pc(p) {
      return p.split("");
    }
    function _c(p) {
      return p.match(Al) || [];
    }
    function bs(p, b, m) {
      var C;
      return m(p, function(X, ce, Re) {
        if (b(X, ce, Re))
          return C = ce, !1;
      }), C;
    }
    function ur(p, b, m, C) {
      for (var X = p.length, ce = m + (C ? 1 : -1); C ? ce-- : ++ce < X; )
        if (b(p[ce], ce, p))
          return ce;
      return -1;
    }
    function fn(p, b, m) {
      return b === b ? Ic(p, b, m) : ur(p, Es, m);
    }
    function gc(p, b, m, C) {
      for (var X = m - 1, ce = p.length; ++X < ce; )
        if (C(p[X], b))
          return X;
      return -1;
    }
    function Es(p) {
      return p !== p;
    }
    function ws(p, b) {
      var m = p == null ? 0 : p.length;
      return m ? Ei(p, b) / m : M;
    }
    function mi(p) {
      return function(b) {
        return b == null ? i : b[p];
      };
    }
    function bi(p) {
      return function(b) {
        return p == null ? i : p[b];
      };
    }
    function ys(p, b, m, C, X) {
      return X(p, function(ce, Re, he) {
        m = C ? (C = !1, ce) : b(m, ce, Re, he);
      }), m;
    }
    function vc(p, b) {
      var m = p.length;
      for (p.sort(b); m--; )
        p[m] = p[m].value;
      return p;
    }
    function Ei(p, b) {
      for (var m, C = -1, X = p.length; ++C < X; ) {
        var ce = b(p[C]);
        ce !== i && (m = m === i ? ce : m + ce);
      }
      return m;
    }
    function wi(p, b) {
      for (var m = -1, C = Array(p); ++m < p; )
        C[m] = b(m);
      return C;
    }
    function mc(p, b) {
      return me(b, function(m) {
        return [m, p[m]];
      });
    }
    function As(p) {
      return p && p.slice(0, Is(p) + 1).replace(ai, "");
    }
    function tt(p) {
      return function(b) {
        return p(b);
      };
    }
    function yi(p, b) {
      return me(b, function(m) {
        return p[m];
      });
    }
    function Dn(p, b) {
      return p.has(b);
    }
    function Ss(p, b) {
      for (var m = -1, C = p.length; ++m < C && fn(b, p[m], 0) > -1; )
        ;
      return m;
    }
    function Ls(p, b) {
      for (var m = p.length; m-- && fn(b, p[m], 0) > -1; )
        ;
      return m;
    }
    function bc(p, b) {
      for (var m = p.length, C = 0; m--; )
        p[m] === b && ++C;
      return C;
    }
    var Ec = bi(rc), wc = bi(ic);
    function yc(p) {
      return "\\" + sc[p];
    }
    function Ac(p, b) {
      return p == null ? i : p[b];
    }
    function dn(p) {
      return jl.test(p);
    }
    function Sc(p) {
      return ec.test(p);
    }
    function Lc(p) {
      for (var b, m = []; !(b = p.next()).done; )
        m.push(b.value);
      return m;
    }
    function Ai(p) {
      var b = -1, m = Array(p.size);
      return p.forEach(function(C, X) {
        m[++b] = [X, C];
      }), m;
    }
    function Os(p, b) {
      return function(m) {
        return p(b(m));
      };
    }
    function kt(p, b) {
      for (var m = -1, C = p.length, X = 0, ce = []; ++m < C; ) {
        var Re = p[m];
        (Re === b || Re === x) && (p[m] = x, ce[X++] = m);
      }
      return ce;
    }
    function lr(p) {
      var b = -1, m = Array(p.size);
      return p.forEach(function(C) {
        m[++b] = C;
      }), m;
    }
    function Oc(p) {
      var b = -1, m = Array(p.size);
      return p.forEach(function(C) {
        m[++b] = [C, C];
      }), m;
    }
    function Ic(p, b, m) {
      for (var C = m - 1, X = p.length; ++C < X; )
        if (p[C] === b)
          return C;
      return -1;
    }
    function Tc(p, b, m) {
      for (var C = m + 1; C--; )
        if (p[C] === b)
          return C;
      return C;
    }
    function hn(p) {
      return dn(p) ? Rc(p) : hc(p);
    }
    function vt(p) {
      return dn(p) ? Cc(p) : pc(p);
    }
    function Is(p) {
      for (var b = p.length; b-- && bl.test(p.charAt(b)); )
        ;
      return b;
    }
    var $c = bi(oc);
    function Rc(p) {
      for (var b = di.lastIndex = 0; di.test(p); )
        ++b;
      return b;
    }
    function Cc(p) {
      return p.match(di) || [];
    }
    function xc(p) {
      return p.match(Ql) || [];
    }
    var Pc = function p(b) {
      b = b == null ? Ue : pn.defaults(Ue.Object(), b, pn.pick(Ue, tc));
      var m = b.Array, C = b.Date, X = b.Error, ce = b.Function, Re = b.Math, he = b.Object, Si = b.RegExp, Dc = b.String, lt = b.TypeError, cr = m.prototype, Uc = ce.prototype, _n = he.prototype, fr = b["__core-js_shared__"], dr = Uc.toString, de = _n.hasOwnProperty, Mc = 0, Ts = function() {
        var e = /[^.]+$/.exec(fr && fr.keys && fr.keys.IE_PROTO || "");
        return e ? "Symbol(src)_1." + e : "";
      }(), hr = _n.toString, Fc = dr.call(he), Wc = Ue._, Bc = Si(
        "^" + dr.call(de).replace(si, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
      ), pr = fs ? b.Buffer : i, Kt = b.Symbol, _r = b.Uint8Array, $s = pr ? pr.allocUnsafe : i, gr = Os(he.getPrototypeOf, he), Rs = he.create, Cs = _n.propertyIsEnumerable, vr = cr.splice, xs = Kt ? Kt.isConcatSpreadable : i, Un = Kt ? Kt.iterator : i, Zt = Kt ? Kt.toStringTag : i, mr = function() {
        try {
          var e = tn(he, "defineProperty");
          return e({}, "", {}), e;
        } catch {
        }
      }(), Nc = b.clearTimeout !== Ue.clearTimeout && b.clearTimeout, kc = C && C.now !== Ue.Date.now && C.now, Kc = b.setTimeout !== Ue.setTimeout && b.setTimeout, br = Re.ceil, Er = Re.floor, Li = he.getOwnPropertySymbols, Gc = pr ? pr.isBuffer : i, Ps = b.isFinite, Hc = cr.join, Vc = Os(he.keys, he), Ce = Re.max, We = Re.min, qc = C.now, Yc = b.parseInt, Ds = Re.random, Xc = cr.reverse, Oi = tn(b, "DataView"), Mn = tn(b, "Map"), Ii = tn(b, "Promise"), gn = tn(b, "Set"), Fn = tn(b, "WeakMap"), Wn = tn(he, "create"), wr = Fn && new Fn(), vn = {}, zc = nn(Oi), Zc = nn(Mn), Jc = nn(Ii), Qc = nn(gn), jc = nn(Fn), yr = Kt ? Kt.prototype : i, Bn = yr ? yr.valueOf : i, Us = yr ? yr.toString : i;
      function u(e) {
        if (Se(e) && !Z(e) && !(e instanceof ie)) {
          if (e instanceof ct)
            return e;
          if (de.call(e, "__wrapped__"))
            return Ma(e);
        }
        return new ct(e);
      }
      var mn = /* @__PURE__ */ function() {
        function e() {
        }
        return function(t) {
          if (!ye(t))
            return {};
          if (Rs)
            return Rs(t);
          e.prototype = t;
          var n = new e();
          return e.prototype = i, n;
        };
      }();
      function Ar() {
      }
      function ct(e, t) {
        this.__wrapped__ = e, this.__actions__ = [], this.__chain__ = !!t, this.__index__ = 0, this.__values__ = i;
      }
      u.templateSettings = {
        /**
         * Used to detect `data` property values to be HTML-escaped.
         *
         * @memberOf _.templateSettings
         * @type {RegExp}
         */
        escape: hl,
        /**
         * Used to detect code to be evaluated.
         *
         * @memberOf _.templateSettings
         * @type {RegExp}
         */
        evaluate: pl,
        /**
         * Used to detect `data` property values to inject.
         *
         * @memberOf _.templateSettings
         * @type {RegExp}
         */
        interpolate: Ho,
        /**
         * Used to reference the data object in the template text.
         *
         * @memberOf _.templateSettings
         * @type {string}
         */
        variable: "",
        /**
         * Used to import variables into the compiled template.
         *
         * @memberOf _.templateSettings
         * @type {Object}
         */
        imports: {
          /**
           * A reference to the `lodash` function.
           *
           * @memberOf _.templateSettings.imports
           * @type {Function}
           */
          _: u
        }
      }, u.prototype = Ar.prototype, u.prototype.constructor = u, ct.prototype = mn(Ar.prototype), ct.prototype.constructor = ct;
      function ie(e) {
        this.__wrapped__ = e, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = V, this.__views__ = [];
      }
      function ef() {
        var e = new ie(this.__wrapped__);
        return e.__actions__ = Ve(this.__actions__), e.__dir__ = this.__dir__, e.__filtered__ = this.__filtered__, e.__iteratees__ = Ve(this.__iteratees__), e.__takeCount__ = this.__takeCount__, e.__views__ = Ve(this.__views__), e;
      }
      function tf() {
        if (this.__filtered__) {
          var e = new ie(this);
          e.__dir__ = -1, e.__filtered__ = !0;
        } else
          e = this.clone(), e.__dir__ *= -1;
        return e;
      }
      function nf() {
        var e = this.__wrapped__.value(), t = this.__dir__, n = Z(e), o = t < 0, a = n ? e.length : 0, l = _d(0, a, this.__views__), d = l.start, h = l.end, _ = h - d, w = o ? h : d - 1, A = this.__iteratees__, L = A.length, $ = 0, U = We(_, this.__takeCount__);
        if (!n || !o && a == _ && U == _)
          return oa(e, this.__actions__);
        var K = [];
        e:
          for (; _-- && $ < U; ) {
            w += t;
            for (var ee = -1, G = e[w]; ++ee < L; ) {
              var re = A[ee], se = re.iteratee, it = re.type, Ke = se(G);
              if (it == T)
                G = Ke;
              else if (!Ke) {
                if (it == sn)
                  continue e;
                break e;
              }
            }
            K[$++] = G;
          }
        return K;
      }
      ie.prototype = mn(Ar.prototype), ie.prototype.constructor = ie;
      function Jt(e) {
        var t = -1, n = e == null ? 0 : e.length;
        for (this.clear(); ++t < n; ) {
          var o = e[t];
          this.set(o[0], o[1]);
        }
      }
      function rf() {
        this.__data__ = Wn ? Wn(null) : {}, this.size = 0;
      }
      function of(e) {
        var t = this.has(e) && delete this.__data__[e];
        return this.size -= t ? 1 : 0, t;
      }
      function sf(e) {
        var t = this.__data__;
        if (Wn) {
          var n = t[e];
          return n === E ? i : n;
        }
        return de.call(t, e) ? t[e] : i;
      }
      function af(e) {
        var t = this.__data__;
        return Wn ? t[e] !== i : de.call(t, e);
      }
      function uf(e, t) {
        var n = this.__data__;
        return this.size += this.has(e) ? 0 : 1, n[e] = Wn && t === i ? E : t, this;
      }
      Jt.prototype.clear = rf, Jt.prototype.delete = of, Jt.prototype.get = sf, Jt.prototype.has = af, Jt.prototype.set = uf;
      function It(e) {
        var t = -1, n = e == null ? 0 : e.length;
        for (this.clear(); ++t < n; ) {
          var o = e[t];
          this.set(o[0], o[1]);
        }
      }
      function lf() {
        this.__data__ = [], this.size = 0;
      }
      function cf(e) {
        var t = this.__data__, n = Sr(t, e);
        if (n < 0)
          return !1;
        var o = t.length - 1;
        return n == o ? t.pop() : vr.call(t, n, 1), --this.size, !0;
      }
      function ff(e) {
        var t = this.__data__, n = Sr(t, e);
        return n < 0 ? i : t[n][1];
      }
      function df(e) {
        return Sr(this.__data__, e) > -1;
      }
      function hf(e, t) {
        var n = this.__data__, o = Sr(n, e);
        return o < 0 ? (++this.size, n.push([e, t])) : n[o][1] = t, this;
      }
      It.prototype.clear = lf, It.prototype.delete = cf, It.prototype.get = ff, It.prototype.has = df, It.prototype.set = hf;
      function Tt(e) {
        var t = -1, n = e == null ? 0 : e.length;
        for (this.clear(); ++t < n; ) {
          var o = e[t];
          this.set(o[0], o[1]);
        }
      }
      function pf() {
        this.size = 0, this.__data__ = {
          hash: new Jt(),
          map: new (Mn || It)(),
          string: new Jt()
        };
      }
      function _f(e) {
        var t = Mr(this, e).delete(e);
        return this.size -= t ? 1 : 0, t;
      }
      function gf(e) {
        return Mr(this, e).get(e);
      }
      function vf(e) {
        return Mr(this, e).has(e);
      }
      function mf(e, t) {
        var n = Mr(this, e), o = n.size;
        return n.set(e, t), this.size += n.size == o ? 0 : 1, this;
      }
      Tt.prototype.clear = pf, Tt.prototype.delete = _f, Tt.prototype.get = gf, Tt.prototype.has = vf, Tt.prototype.set = mf;
      function Qt(e) {
        var t = -1, n = e == null ? 0 : e.length;
        for (this.__data__ = new Tt(); ++t < n; )
          this.add(e[t]);
      }
      function bf(e) {
        return this.__data__.set(e, E), this;
      }
      function Ef(e) {
        return this.__data__.has(e);
      }
      Qt.prototype.add = Qt.prototype.push = bf, Qt.prototype.has = Ef;
      function mt(e) {
        var t = this.__data__ = new It(e);
        this.size = t.size;
      }
      function wf() {
        this.__data__ = new It(), this.size = 0;
      }
      function yf(e) {
        var t = this.__data__, n = t.delete(e);
        return this.size = t.size, n;
      }
      function Af(e) {
        return this.__data__.get(e);
      }
      function Sf(e) {
        return this.__data__.has(e);
      }
      function Lf(e, t) {
        var n = this.__data__;
        if (n instanceof It) {
          var o = n.__data__;
          if (!Mn || o.length < f - 1)
            return o.push([e, t]), this.size = ++n.size, this;
          n = this.__data__ = new Tt(o);
        }
        return n.set(e, t), this.size = n.size, this;
      }
      mt.prototype.clear = wf, mt.prototype.delete = yf, mt.prototype.get = Af, mt.prototype.has = Sf, mt.prototype.set = Lf;
      function Ms(e, t) {
        var n = Z(e), o = !n && rn(e), a = !n && !o && Yt(e), l = !n && !o && !a && yn(e), d = n || o || a || l, h = d ? wi(e.length, Dc) : [], _ = h.length;
        for (var w in e)
          (t || de.call(e, w)) && !(d && // Safari 9 has enumerable `arguments.length` in strict mode.
          (w == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
          a && (w == "offset" || w == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
          l && (w == "buffer" || w == "byteLength" || w == "byteOffset") || // Skip index properties.
          xt(w, _))) && h.push(w);
        return h;
      }
      function Fs(e) {
        var t = e.length;
        return t ? e[Wi(0, t - 1)] : i;
      }
      function Of(e, t) {
        return Fr(Ve(e), jt(t, 0, e.length));
      }
      function If(e) {
        return Fr(Ve(e));
      }
      function Ti(e, t, n) {
        (n !== i && !bt(e[t], n) || n === i && !(t in e)) && $t(e, t, n);
      }
      function Nn(e, t, n) {
        var o = e[t];
        (!(de.call(e, t) && bt(o, n)) || n === i && !(t in e)) && $t(e, t, n);
      }
      function Sr(e, t) {
        for (var n = e.length; n--; )
          if (bt(e[n][0], t))
            return n;
        return -1;
      }
      function Tf(e, t, n, o) {
        return Gt(e, function(a, l, d) {
          t(o, a, n(a), d);
        }), o;
      }
      function Ws(e, t) {
        return e && At(t, xe(t), e);
      }
      function $f(e, t) {
        return e && At(t, Ye(t), e);
      }
      function $t(e, t, n) {
        t == "__proto__" && mr ? mr(e, t, {
          configurable: !0,
          enumerable: !0,
          value: n,
          writable: !0
        }) : e[t] = n;
      }
      function $i(e, t) {
        for (var n = -1, o = t.length, a = m(o), l = e == null; ++n < o; )
          a[n] = l ? i : lo(e, t[n]);
        return a;
      }
      function jt(e, t, n) {
        return e === e && (n !== i && (e = e <= n ? e : n), t !== i && (e = e >= t ? e : t)), e;
      }
      function ft(e, t, n, o, a, l) {
        var d, h = t & O, _ = t & H, w = t & P;
        if (n && (d = a ? n(e, o, a, l) : n(e)), d !== i)
          return d;
        if (!ye(e))
          return e;
        var A = Z(e);
        if (A) {
          if (d = vd(e), !h)
            return Ve(e, d);
        } else {
          var L = Be(e), $ = L == an || L == un;
          if (Yt(e))
            return ua(e, h);
          if (L == je || L == Ae || $ && !a) {
            if (d = _ || $ ? {} : Ia(e), !h)
              return _ ? sd(e, $f(d, e)) : od(e, Ws(d, e));
          } else {
            if (!ge[L])
              return a ? e : {};
            d = md(e, L, h);
          }
        }
        l || (l = new mt());
        var U = l.get(e);
        if (U)
          return U;
        l.set(e, d), nu(e) ? e.forEach(function(G) {
          d.add(ft(G, t, n, G, e, l));
        }) : eu(e) && e.forEach(function(G, re) {
          d.set(re, ft(G, t, n, re, e, l));
        });
        var K = w ? _ ? zi : Xi : _ ? Ye : xe, ee = A ? i : K(e);
        return ut(ee || e, function(G, re) {
          ee && (re = G, G = e[re]), Nn(d, re, ft(G, t, n, re, e, l));
        }), d;
      }
      function Rf(e) {
        var t = xe(e);
        return function(n) {
          return Bs(n, e, t);
        };
      }
      function Bs(e, t, n) {
        var o = n.length;
        if (e == null)
          return !o;
        for (e = he(e); o--; ) {
          var a = n[o], l = t[a], d = e[a];
          if (d === i && !(a in e) || !l(d))
            return !1;
        }
        return !0;
      }
      function Ns(e, t, n) {
        if (typeof e != "function")
          throw new lt(y);
        return Yn(function() {
          e.apply(i, n);
        }, t);
      }
      function kn(e, t, n, o) {
        var a = -1, l = ar, d = !0, h = e.length, _ = [], w = t.length;
        if (!h)
          return _;
        n && (t = me(t, tt(n))), o ? (l = _i, d = !1) : t.length >= f && (l = Dn, d = !1, t = new Qt(t));
        e:
          for (; ++a < h; ) {
            var A = e[a], L = n == null ? A : n(A);
            if (A = o || A !== 0 ? A : 0, d && L === L) {
              for (var $ = w; $--; )
                if (t[$] === L)
                  continue e;
              _.push(A);
            } else l(t, L, o) || _.push(A);
          }
        return _;
      }
      var Gt = ha(yt), ks = ha(Ci, !0);
      function Cf(e, t) {
        var n = !0;
        return Gt(e, function(o, a, l) {
          return n = !!t(o, a, l), n;
        }), n;
      }
      function Lr(e, t, n) {
        for (var o = -1, a = e.length; ++o < a; ) {
          var l = e[o], d = t(l);
          if (d != null && (h === i ? d === d && !rt(d) : n(d, h)))
            var h = d, _ = l;
        }
        return _;
      }
      function xf(e, t, n, o) {
        var a = e.length;
        for (n = Q(n), n < 0 && (n = -n > a ? 0 : a + n), o = o === i || o > a ? a : Q(o), o < 0 && (o += a), o = n > o ? 0 : iu(o); n < o; )
          e[n++] = t;
        return e;
      }
      function Ks(e, t) {
        var n = [];
        return Gt(e, function(o, a, l) {
          t(o, a, l) && n.push(o);
        }), n;
      }
      function Me(e, t, n, o, a) {
        var l = -1, d = e.length;
        for (n || (n = Ed), a || (a = []); ++l < d; ) {
          var h = e[l];
          t > 0 && n(h) ? t > 1 ? Me(h, t - 1, n, o, a) : Nt(a, h) : o || (a[a.length] = h);
        }
        return a;
      }
      var Ri = pa(), Gs = pa(!0);
      function yt(e, t) {
        return e && Ri(e, t, xe);
      }
      function Ci(e, t) {
        return e && Gs(e, t, xe);
      }
      function Or(e, t) {
        return Bt(t, function(n) {
          return Pt(e[n]);
        });
      }
      function en(e, t) {
        t = Vt(t, e);
        for (var n = 0, o = t.length; e != null && n < o; )
          e = e[St(t[n++])];
        return n && n == o ? e : i;
      }
      function Hs(e, t, n) {
        var o = t(e);
        return Z(e) ? o : Nt(o, n(e));
      }
      function Ne(e) {
        return e == null ? e === i ? sl : tr : Zt && Zt in he(e) ? pd(e) : Id(e);
      }
      function xi(e, t) {
        return e > t;
      }
      function Pf(e, t) {
        return e != null && de.call(e, t);
      }
      function Df(e, t) {
        return e != null && t in he(e);
      }
      function Uf(e, t, n) {
        return e >= We(t, n) && e < Ce(t, n);
      }
      function Pi(e, t, n) {
        for (var o = n ? _i : ar, a = e[0].length, l = e.length, d = l, h = m(l), _ = 1 / 0, w = []; d--; ) {
          var A = e[d];
          d && t && (A = me(A, tt(t))), _ = We(A.length, _), h[d] = !n && (t || a >= 120 && A.length >= 120) ? new Qt(d && A) : i;
        }
        A = e[0];
        var L = -1, $ = h[0];
        e:
          for (; ++L < a && w.length < _; ) {
            var U = A[L], K = t ? t(U) : U;
            if (U = n || U !== 0 ? U : 0, !($ ? Dn($, K) : o(w, K, n))) {
              for (d = l; --d; ) {
                var ee = h[d];
                if (!(ee ? Dn(ee, K) : o(e[d], K, n)))
                  continue e;
              }
              $ && $.push(K), w.push(U);
            }
          }
        return w;
      }
      function Mf(e, t, n, o) {
        return yt(e, function(a, l, d) {
          t(o, n(a), l, d);
        }), o;
      }
      function Kn(e, t, n) {
        t = Vt(t, e), e = Ca(e, t);
        var o = e == null ? e : e[St(ht(t))];
        return o == null ? i : et(o, e, n);
      }
      function Vs(e) {
        return Se(e) && Ne(e) == Ae;
      }
      function Ff(e) {
        return Se(e) && Ne(e) == Pn;
      }
      function Wf(e) {
        return Se(e) && Ne(e) == wt;
      }
      function Gn(e, t, n, o, a) {
        return e === t ? !0 : e == null || t == null || !Se(e) && !Se(t) ? e !== e && t !== t : Bf(e, t, n, o, Gn, a);
      }
      function Bf(e, t, n, o, a, l) {
        var d = Z(e), h = Z(t), _ = d ? De : Be(e), w = h ? De : Be(t);
        _ = _ == Ae ? je : _, w = w == Ae ? je : w;
        var A = _ == je, L = w == je, $ = _ == w;
        if ($ && Yt(e)) {
          if (!Yt(t))
            return !1;
          d = !0, A = !1;
        }
        if ($ && !A)
          return l || (l = new mt()), d || yn(e) ? Sa(e, t, n, o, a, l) : dd(e, t, _, n, o, a, l);
        if (!(n & I)) {
          var U = A && de.call(e, "__wrapped__"), K = L && de.call(t, "__wrapped__");
          if (U || K) {
            var ee = U ? e.value() : e, G = K ? t.value() : t;
            return l || (l = new mt()), a(ee, G, n, o, l);
          }
        }
        return $ ? (l || (l = new mt()), hd(e, t, n, o, a, l)) : !1;
      }
      function Nf(e) {
        return Se(e) && Be(e) == He;
      }
      function Di(e, t, n, o) {
        var a = n.length, l = a, d = !o;
        if (e == null)
          return !l;
        for (e = he(e); a--; ) {
          var h = n[a];
          if (d && h[2] ? h[1] !== e[h[0]] : !(h[0] in e))
            return !1;
        }
        for (; ++a < l; ) {
          h = n[a];
          var _ = h[0], w = e[_], A = h[1];
          if (d && h[2]) {
            if (w === i && !(_ in e))
              return !1;
          } else {
            var L = new mt();
            if (o)
              var $ = o(w, A, _, e, t, L);
            if (!($ === i ? Gn(A, w, I | W, o, L) : $))
              return !1;
          }
        }
        return !0;
      }
      function qs(e) {
        if (!ye(e) || yd(e))
          return !1;
        var t = Pt(e) ? Bc : $l;
        return t.test(nn(e));
      }
      function kf(e) {
        return Se(e) && Ne(e) == Rn;
      }
      function Kf(e) {
        return Se(e) && Be(e) == gt;
      }
      function Gf(e) {
        return Se(e) && Gr(e.length) && !!ve[Ne(e)];
      }
      function Ys(e) {
        return typeof e == "function" ? e : e == null ? Xe : typeof e == "object" ? Z(e) ? Zs(e[0], e[1]) : zs(e) : _u(e);
      }
      function Ui(e) {
        if (!qn(e))
          return Vc(e);
        var t = [];
        for (var n in he(e))
          de.call(e, n) && n != "constructor" && t.push(n);
        return t;
      }
      function Hf(e) {
        if (!ye(e))
          return Od(e);
        var t = qn(e), n = [];
        for (var o in e)
          o == "constructor" && (t || !de.call(e, o)) || n.push(o);
        return n;
      }
      function Mi(e, t) {
        return e < t;
      }
      function Xs(e, t) {
        var n = -1, o = qe(e) ? m(e.length) : [];
        return Gt(e, function(a, l, d) {
          o[++n] = t(a, l, d);
        }), o;
      }
      function zs(e) {
        var t = Ji(e);
        return t.length == 1 && t[0][2] ? $a(t[0][0], t[0][1]) : function(n) {
          return n === e || Di(n, e, t);
        };
      }
      function Zs(e, t) {
        return ji(e) && Ta(t) ? $a(St(e), t) : function(n) {
          var o = lo(n, e);
          return o === i && o === t ? co(n, e) : Gn(t, o, I | W);
        };
      }
      function Ir(e, t, n, o, a) {
        e !== t && Ri(t, function(l, d) {
          if (a || (a = new mt()), ye(l))
            Vf(e, t, d, n, Ir, o, a);
          else {
            var h = o ? o(to(e, d), l, d + "", e, t, a) : i;
            h === i && (h = l), Ti(e, d, h);
          }
        }, Ye);
      }
      function Vf(e, t, n, o, a, l, d) {
        var h = to(e, n), _ = to(t, n), w = d.get(_);
        if (w) {
          Ti(e, n, w);
          return;
        }
        var A = l ? l(h, _, n + "", e, t, d) : i, L = A === i;
        if (L) {
          var $ = Z(_), U = !$ && Yt(_), K = !$ && !U && yn(_);
          A = _, $ || U || K ? Z(h) ? A = h : Oe(h) ? A = Ve(h) : U ? (L = !1, A = ua(_, !0)) : K ? (L = !1, A = la(_, !0)) : A = [] : Xn(_) || rn(_) ? (A = h, rn(h) ? A = ou(h) : (!ye(h) || Pt(h)) && (A = Ia(_))) : L = !1;
        }
        L && (d.set(_, A), a(A, _, o, l, d), d.delete(_)), Ti(e, n, A);
      }
      function Js(e, t) {
        var n = e.length;
        if (n)
          return t += t < 0 ? n : 0, xt(t, n) ? e[t] : i;
      }
      function Qs(e, t, n) {
        t.length ? t = me(t, function(l) {
          return Z(l) ? function(d) {
            return en(d, l.length === 1 ? l[0] : l);
          } : l;
        }) : t = [Xe];
        var o = -1;
        t = me(t, tt(N()));
        var a = Xs(e, function(l, d, h) {
          var _ = me(t, function(w) {
            return w(l);
          });
          return { criteria: _, index: ++o, value: l };
        });
        return vc(a, function(l, d) {
          return id(l, d, n);
        });
      }
      function qf(e, t) {
        return js(e, t, function(n, o) {
          return co(e, o);
        });
      }
      function js(e, t, n) {
        for (var o = -1, a = t.length, l = {}; ++o < a; ) {
          var d = t[o], h = en(e, d);
          n(h, d) && Hn(l, Vt(d, e), h);
        }
        return l;
      }
      function Yf(e) {
        return function(t) {
          return en(t, e);
        };
      }
      function Fi(e, t, n, o) {
        var a = o ? gc : fn, l = -1, d = t.length, h = e;
        for (e === t && (t = Ve(t)), n && (h = me(e, tt(n))); ++l < d; )
          for (var _ = 0, w = t[l], A = n ? n(w) : w; (_ = a(h, A, _, o)) > -1; )
            h !== e && vr.call(h, _, 1), vr.call(e, _, 1);
        return e;
      }
      function ea(e, t) {
        for (var n = e ? t.length : 0, o = n - 1; n--; ) {
          var a = t[n];
          if (n == o || a !== l) {
            var l = a;
            xt(a) ? vr.call(e, a, 1) : ki(e, a);
          }
        }
        return e;
      }
      function Wi(e, t) {
        return e + Er(Ds() * (t - e + 1));
      }
      function Xf(e, t, n, o) {
        for (var a = -1, l = Ce(br((t - e) / (n || 1)), 0), d = m(l); l--; )
          d[o ? l : ++a] = e, e += n;
        return d;
      }
      function Bi(e, t) {
        var n = "";
        if (!e || t < 1 || t > oe)
          return n;
        do
          t % 2 && (n += e), t = Er(t / 2), t && (e += e);
        while (t);
        return n;
      }
      function ne(e, t) {
        return no(Ra(e, t, Xe), e + "");
      }
      function zf(e) {
        return Fs(An(e));
      }
      function Zf(e, t) {
        var n = An(e);
        return Fr(n, jt(t, 0, n.length));
      }
      function Hn(e, t, n, o) {
        if (!ye(e))
          return e;
        t = Vt(t, e);
        for (var a = -1, l = t.length, d = l - 1, h = e; h != null && ++a < l; ) {
          var _ = St(t[a]), w = n;
          if (_ === "__proto__" || _ === "constructor" || _ === "prototype")
            return e;
          if (a != d) {
            var A = h[_];
            w = o ? o(A, _, h) : i, w === i && (w = ye(A) ? A : xt(t[a + 1]) ? [] : {});
          }
          Nn(h, _, w), h = h[_];
        }
        return e;
      }
      var ta = wr ? function(e, t) {
        return wr.set(e, t), e;
      } : Xe, Jf = mr ? function(e, t) {
        return mr(e, "toString", {
          configurable: !0,
          enumerable: !1,
          value: ho(t),
          writable: !0
        });
      } : Xe;
      function Qf(e) {
        return Fr(An(e));
      }
      function dt(e, t, n) {
        var o = -1, a = e.length;
        t < 0 && (t = -t > a ? 0 : a + t), n = n > a ? a : n, n < 0 && (n += a), a = t > n ? 0 : n - t >>> 0, t >>>= 0;
        for (var l = m(a); ++o < a; )
          l[o] = e[o + t];
        return l;
      }
      function jf(e, t) {
        var n;
        return Gt(e, function(o, a, l) {
          return n = t(o, a, l), !n;
        }), !!n;
      }
      function Tr(e, t, n) {
        var o = 0, a = e == null ? o : e.length;
        if (typeof t == "number" && t === t && a <= we) {
          for (; o < a; ) {
            var l = o + a >>> 1, d = e[l];
            d !== null && !rt(d) && (n ? d <= t : d < t) ? o = l + 1 : a = l;
          }
          return a;
        }
        return Ni(e, t, Xe, n);
      }
      function Ni(e, t, n, o) {
        var a = 0, l = e == null ? 0 : e.length;
        if (l === 0)
          return 0;
        t = n(t);
        for (var d = t !== t, h = t === null, _ = rt(t), w = t === i; a < l; ) {
          var A = Er((a + l) / 2), L = n(e[A]), $ = L !== i, U = L === null, K = L === L, ee = rt(L);
          if (d)
            var G = o || K;
          else w ? G = K && (o || $) : h ? G = K && $ && (o || !U) : _ ? G = K && $ && !U && (o || !ee) : U || ee ? G = !1 : G = o ? L <= t : L < t;
          G ? a = A + 1 : l = A;
        }
        return We(l, ae);
      }
      function na(e, t) {
        for (var n = -1, o = e.length, a = 0, l = []; ++n < o; ) {
          var d = e[n], h = t ? t(d) : d;
          if (!n || !bt(h, _)) {
            var _ = h;
            l[a++] = d === 0 ? 0 : d;
          }
        }
        return l;
      }
      function ra(e) {
        return typeof e == "number" ? e : rt(e) ? M : +e;
      }
      function nt(e) {
        if (typeof e == "string")
          return e;
        if (Z(e))
          return me(e, nt) + "";
        if (rt(e))
          return Us ? Us.call(e) : "";
        var t = e + "";
        return t == "0" && 1 / e == -te ? "-0" : t;
      }
      function Ht(e, t, n) {
        var o = -1, a = ar, l = e.length, d = !0, h = [], _ = h;
        if (n)
          d = !1, a = _i;
        else if (l >= f) {
          var w = t ? null : cd(e);
          if (w)
            return lr(w);
          d = !1, a = Dn, _ = new Qt();
        } else
          _ = t ? [] : h;
        e:
          for (; ++o < l; ) {
            var A = e[o], L = t ? t(A) : A;
            if (A = n || A !== 0 ? A : 0, d && L === L) {
              for (var $ = _.length; $--; )
                if (_[$] === L)
                  continue e;
              t && _.push(L), h.push(A);
            } else a(_, L, n) || (_ !== h && _.push(L), h.push(A));
          }
        return h;
      }
      function ki(e, t) {
        return t = Vt(t, e), e = Ca(e, t), e == null || delete e[St(ht(t))];
      }
      function ia(e, t, n, o) {
        return Hn(e, t, n(en(e, t)), o);
      }
      function $r(e, t, n, o) {
        for (var a = e.length, l = o ? a : -1; (o ? l-- : ++l < a) && t(e[l], l, e); )
          ;
        return n ? dt(e, o ? 0 : l, o ? l + 1 : a) : dt(e, o ? l + 1 : 0, o ? a : l);
      }
      function oa(e, t) {
        var n = e;
        return n instanceof ie && (n = n.value()), gi(t, function(o, a) {
          return a.func.apply(a.thisArg, Nt([o], a.args));
        }, n);
      }
      function Ki(e, t, n) {
        var o = e.length;
        if (o < 2)
          return o ? Ht(e[0]) : [];
        for (var a = -1, l = m(o); ++a < o; )
          for (var d = e[a], h = -1; ++h < o; )
            h != a && (l[a] = kn(l[a] || d, e[h], t, n));
        return Ht(Me(l, 1), t, n);
      }
      function sa(e, t, n) {
        for (var o = -1, a = e.length, l = t.length, d = {}; ++o < a; ) {
          var h = o < l ? t[o] : i;
          n(d, e[o], h);
        }
        return d;
      }
      function Gi(e) {
        return Oe(e) ? e : [];
      }
      function Hi(e) {
        return typeof e == "function" ? e : Xe;
      }
      function Vt(e, t) {
        return Z(e) ? e : ji(e, t) ? [e] : Ua(fe(e));
      }
      var ed = ne;
      function qt(e, t, n) {
        var o = e.length;
        return n = n === i ? o : n, !t && n >= o ? e : dt(e, t, n);
      }
      var aa = Nc || function(e) {
        return Ue.clearTimeout(e);
      };
      function ua(e, t) {
        if (t)
          return e.slice();
        var n = e.length, o = $s ? $s(n) : new e.constructor(n);
        return e.copy(o), o;
      }
      function Vi(e) {
        var t = new e.constructor(e.byteLength);
        return new _r(t).set(new _r(e)), t;
      }
      function td(e, t) {
        var n = t ? Vi(e.buffer) : e.buffer;
        return new e.constructor(n, e.byteOffset, e.byteLength);
      }
      function nd(e) {
        var t = new e.constructor(e.source, Vo.exec(e));
        return t.lastIndex = e.lastIndex, t;
      }
      function rd(e) {
        return Bn ? he(Bn.call(e)) : {};
      }
      function la(e, t) {
        var n = t ? Vi(e.buffer) : e.buffer;
        return new e.constructor(n, e.byteOffset, e.length);
      }
      function ca(e, t) {
        if (e !== t) {
          var n = e !== i, o = e === null, a = e === e, l = rt(e), d = t !== i, h = t === null, _ = t === t, w = rt(t);
          if (!h && !w && !l && e > t || l && d && _ && !h && !w || o && d && _ || !n && _ || !a)
            return 1;
          if (!o && !l && !w && e < t || w && n && a && !o && !l || h && n && a || !d && a || !_)
            return -1;
        }
        return 0;
      }
      function id(e, t, n) {
        for (var o = -1, a = e.criteria, l = t.criteria, d = a.length, h = n.length; ++o < d; ) {
          var _ = ca(a[o], l[o]);
          if (_) {
            if (o >= h)
              return _;
            var w = n[o];
            return _ * (w == "desc" ? -1 : 1);
          }
        }
        return e.index - t.index;
      }
      function fa(e, t, n, o) {
        for (var a = -1, l = e.length, d = n.length, h = -1, _ = t.length, w = Ce(l - d, 0), A = m(_ + w), L = !o; ++h < _; )
          A[h] = t[h];
        for (; ++a < d; )
          (L || a < l) && (A[n[a]] = e[a]);
        for (; w--; )
          A[h++] = e[a++];
        return A;
      }
      function da(e, t, n, o) {
        for (var a = -1, l = e.length, d = -1, h = n.length, _ = -1, w = t.length, A = Ce(l - h, 0), L = m(A + w), $ = !o; ++a < A; )
          L[a] = e[a];
        for (var U = a; ++_ < w; )
          L[U + _] = t[_];
        for (; ++d < h; )
          ($ || a < l) && (L[U + n[d]] = e[a++]);
        return L;
      }
      function Ve(e, t) {
        var n = -1, o = e.length;
        for (t || (t = m(o)); ++n < o; )
          t[n] = e[n];
        return t;
      }
      function At(e, t, n, o) {
        var a = !n;
        n || (n = {});
        for (var l = -1, d = t.length; ++l < d; ) {
          var h = t[l], _ = o ? o(n[h], e[h], h, n, e) : i;
          _ === i && (_ = e[h]), a ? $t(n, h, _) : Nn(n, h, _);
        }
        return n;
      }
      function od(e, t) {
        return At(e, Qi(e), t);
      }
      function sd(e, t) {
        return At(e, La(e), t);
      }
      function Rr(e, t) {
        return function(n, o) {
          var a = Z(n) ? cc : Tf, l = t ? t() : {};
          return a(n, e, N(o, 2), l);
        };
      }
      function bn(e) {
        return ne(function(t, n) {
          var o = -1, a = n.length, l = a > 1 ? n[a - 1] : i, d = a > 2 ? n[2] : i;
          for (l = e.length > 3 && typeof l == "function" ? (a--, l) : i, d && ke(n[0], n[1], d) && (l = a < 3 ? i : l, a = 1), t = he(t); ++o < a; ) {
            var h = n[o];
            h && e(t, h, o, l);
          }
          return t;
        });
      }
      function ha(e, t) {
        return function(n, o) {
          if (n == null)
            return n;
          if (!qe(n))
            return e(n, o);
          for (var a = n.length, l = t ? a : -1, d = he(n); (t ? l-- : ++l < a) && o(d[l], l, d) !== !1; )
            ;
          return n;
        };
      }
      function pa(e) {
        return function(t, n, o) {
          for (var a = -1, l = he(t), d = o(t), h = d.length; h--; ) {
            var _ = d[e ? h : ++a];
            if (n(l[_], _, l) === !1)
              break;
          }
          return t;
        };
      }
      function ad(e, t, n) {
        var o = t & q, a = Vn(e);
        function l() {
          var d = this && this !== Ue && this instanceof l ? a : e;
          return d.apply(o ? n : this, arguments);
        }
        return l;
      }
      function _a(e) {
        return function(t) {
          t = fe(t);
          var n = dn(t) ? vt(t) : i, o = n ? n[0] : t.charAt(0), a = n ? qt(n, 1).join("") : t.slice(1);
          return o[e]() + a;
        };
      }
      function En(e) {
        return function(t) {
          return gi(hu(du(t).replace(Zl, "")), e, "");
        };
      }
      function Vn(e) {
        return function() {
          var t = arguments;
          switch (t.length) {
            case 0:
              return new e();
            case 1:
              return new e(t[0]);
            case 2:
              return new e(t[0], t[1]);
            case 3:
              return new e(t[0], t[1], t[2]);
            case 4:
              return new e(t[0], t[1], t[2], t[3]);
            case 5:
              return new e(t[0], t[1], t[2], t[3], t[4]);
            case 6:
              return new e(t[0], t[1], t[2], t[3], t[4], t[5]);
            case 7:
              return new e(t[0], t[1], t[2], t[3], t[4], t[5], t[6]);
          }
          var n = mn(e.prototype), o = e.apply(n, t);
          return ye(o) ? o : n;
        };
      }
      function ud(e, t, n) {
        var o = Vn(e);
        function a() {
          for (var l = arguments.length, d = m(l), h = l, _ = wn(a); h--; )
            d[h] = arguments[h];
          var w = l < 3 && d[0] !== _ && d[l - 1] !== _ ? [] : kt(d, _);
          if (l -= w.length, l < n)
            return Ea(
              e,
              t,
              Cr,
              a.placeholder,
              i,
              d,
              w,
              i,
              i,
              n - l
            );
          var A = this && this !== Ue && this instanceof a ? o : e;
          return et(A, this, d);
        }
        return a;
      }
      function ga(e) {
        return function(t, n, o) {
          var a = he(t);
          if (!qe(t)) {
            var l = N(n, 3);
            t = xe(t), n = function(h) {
              return l(a[h], h, a);
            };
          }
          var d = e(t, n, o);
          return d > -1 ? a[l ? t[d] : d] : i;
        };
      }
      function va(e) {
        return Ct(function(t) {
          var n = t.length, o = n, a = ct.prototype.thru;
          for (e && t.reverse(); o--; ) {
            var l = t[o];
            if (typeof l != "function")
              throw new lt(y);
            if (a && !d && Ur(l) == "wrapper")
              var d = new ct([], !0);
          }
          for (o = d ? o : n; ++o < n; ) {
            l = t[o];
            var h = Ur(l), _ = h == "wrapper" ? Zi(l) : i;
            _ && eo(_[0]) && _[1] == (k | pe | Y | j) && !_[4].length && _[9] == 1 ? d = d[Ur(_[0])].apply(d, _[3]) : d = l.length == 1 && eo(l) ? d[h]() : d.thru(l);
          }
          return function() {
            var w = arguments, A = w[0];
            if (d && w.length == 1 && Z(A))
              return d.plant(A).value();
            for (var L = 0, $ = n ? t[L].apply(this, w) : A; ++L < n; )
              $ = t[L].call(this, $);
            return $;
          };
        });
      }
      function Cr(e, t, n, o, a, l, d, h, _, w) {
        var A = t & k, L = t & q, $ = t & le, U = t & (pe | Ee), K = t & _e, ee = $ ? i : Vn(e);
        function G() {
          for (var re = arguments.length, se = m(re), it = re; it--; )
            se[it] = arguments[it];
          if (U)
            var Ke = wn(G), ot = bc(se, Ke);
          if (o && (se = fa(se, o, a, U)), l && (se = da(se, l, d, U)), re -= ot, U && re < w) {
            var Ie = kt(se, Ke);
            return Ea(
              e,
              t,
              Cr,
              G.placeholder,
              n,
              se,
              Ie,
              h,
              _,
              w - re
            );
          }
          var Et = L ? n : this, Ut = $ ? Et[e] : e;
          return re = se.length, h ? se = Td(se, h) : K && re > 1 && se.reverse(), A && _ < re && (se.length = _), this && this !== Ue && this instanceof G && (Ut = ee || Vn(Ut)), Ut.apply(Et, se);
        }
        return G;
      }
      function ma(e, t) {
        return function(n, o) {
          return Mf(n, e, t(o), {});
        };
      }
      function xr(e, t) {
        return function(n, o) {
          var a;
          if (n === i && o === i)
            return t;
          if (n !== i && (a = n), o !== i) {
            if (a === i)
              return o;
            typeof n == "string" || typeof o == "string" ? (n = nt(n), o = nt(o)) : (n = ra(n), o = ra(o)), a = e(n, o);
          }
          return a;
        };
      }
      function qi(e) {
        return Ct(function(t) {
          return t = me(t, tt(N())), ne(function(n) {
            var o = this;
            return e(t, function(a) {
              return et(a, o, n);
            });
          });
        });
      }
      function Pr(e, t) {
        t = t === i ? " " : nt(t);
        var n = t.length;
        if (n < 2)
          return n ? Bi(t, e) : t;
        var o = Bi(t, br(e / hn(t)));
        return dn(t) ? qt(vt(o), 0, e).join("") : o.slice(0, e);
      }
      function ld(e, t, n, o) {
        var a = t & q, l = Vn(e);
        function d() {
          for (var h = -1, _ = arguments.length, w = -1, A = o.length, L = m(A + _), $ = this && this !== Ue && this instanceof d ? l : e; ++w < A; )
            L[w] = o[w];
          for (; _--; )
            L[w++] = arguments[++h];
          return et($, a ? n : this, L);
        }
        return d;
      }
      function ba(e) {
        return function(t, n, o) {
          return o && typeof o != "number" && ke(t, n, o) && (n = o = i), t = Dt(t), n === i ? (n = t, t = 0) : n = Dt(n), o = o === i ? t < n ? 1 : -1 : Dt(o), Xf(t, n, o, e);
        };
      }
      function Dr(e) {
        return function(t, n) {
          return typeof t == "string" && typeof n == "string" || (t = pt(t), n = pt(n)), e(t, n);
        };
      }
      function Ea(e, t, n, o, a, l, d, h, _, w) {
        var A = t & pe, L = A ? d : i, $ = A ? i : d, U = A ? l : i, K = A ? i : l;
        t |= A ? Y : D, t &= ~(A ? D : Y), t & be || (t &= ~(q | le));
        var ee = [
          e,
          t,
          a,
          U,
          L,
          K,
          $,
          h,
          _,
          w
        ], G = n.apply(i, ee);
        return eo(e) && xa(G, ee), G.placeholder = o, Pa(G, e, t);
      }
      function Yi(e) {
        var t = Re[e];
        return function(n, o) {
          if (n = pt(n), o = o == null ? 0 : We(Q(o), 292), o && Ps(n)) {
            var a = (fe(n) + "e").split("e"), l = t(a[0] + "e" + (+a[1] + o));
            return a = (fe(l) + "e").split("e"), +(a[0] + "e" + (+a[1] - o));
          }
          return t(n);
        };
      }
      var cd = gn && 1 / lr(new gn([, -0]))[1] == te ? function(e) {
        return new gn(e);
      } : go;
      function wa(e) {
        return function(t) {
          var n = Be(t);
          return n == He ? Ai(t) : n == gt ? Oc(t) : mc(t, e(t));
        };
      }
      function Rt(e, t, n, o, a, l, d, h) {
        var _ = t & le;
        if (!_ && typeof e != "function")
          throw new lt(y);
        var w = o ? o.length : 0;
        if (w || (t &= ~(Y | D), o = a = i), d = d === i ? d : Ce(Q(d), 0), h = h === i ? h : Q(h), w -= a ? a.length : 0, t & D) {
          var A = o, L = a;
          o = a = i;
        }
        var $ = _ ? i : Zi(e), U = [
          e,
          t,
          n,
          o,
          a,
          A,
          L,
          l,
          d,
          h
        ];
        if ($ && Ld(U, $), e = U[0], t = U[1], n = U[2], o = U[3], a = U[4], h = U[9] = U[9] === i ? _ ? 0 : e.length : Ce(U[9] - w, 0), !h && t & (pe | Ee) && (t &= ~(pe | Ee)), !t || t == q)
          var K = ad(e, t, n);
        else t == pe || t == Ee ? K = ud(e, t, h) : (t == Y || t == (q | Y)) && !a.length ? K = ld(e, t, n, o) : K = Cr.apply(i, U);
        var ee = $ ? ta : xa;
        return Pa(ee(K, U), e, t);
      }
      function ya(e, t, n, o) {
        return e === i || bt(e, _n[n]) && !de.call(o, n) ? t : e;
      }
      function Aa(e, t, n, o, a, l) {
        return ye(e) && ye(t) && (l.set(t, e), Ir(e, t, i, Aa, l), l.delete(t)), e;
      }
      function fd(e) {
        return Xn(e) ? i : e;
      }
      function Sa(e, t, n, o, a, l) {
        var d = n & I, h = e.length, _ = t.length;
        if (h != _ && !(d && _ > h))
          return !1;
        var w = l.get(e), A = l.get(t);
        if (w && A)
          return w == t && A == e;
        var L = -1, $ = !0, U = n & W ? new Qt() : i;
        for (l.set(e, t), l.set(t, e); ++L < h; ) {
          var K = e[L], ee = t[L];
          if (o)
            var G = d ? o(ee, K, L, t, e, l) : o(K, ee, L, e, t, l);
          if (G !== i) {
            if (G)
              continue;
            $ = !1;
            break;
          }
          if (U) {
            if (!vi(t, function(re, se) {
              if (!Dn(U, se) && (K === re || a(K, re, n, o, l)))
                return U.push(se);
            })) {
              $ = !1;
              break;
            }
          } else if (!(K === ee || a(K, ee, n, o, l))) {
            $ = !1;
            break;
          }
        }
        return l.delete(e), l.delete(t), $;
      }
      function dd(e, t, n, o, a, l, d) {
        switch (n) {
          case ln:
            if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
              return !1;
            e = e.buffer, t = t.buffer;
          case Pn:
            return !(e.byteLength != t.byteLength || !l(new _r(e), new _r(t)));
          case Qe:
          case wt:
          case Wt:
            return bt(+e, +t);
          case Xt:
            return e.name == t.name && e.message == t.message;
          case Rn:
          case Cn:
            return e == t + "";
          case He:
            var h = Ai;
          case gt:
            var _ = o & I;
            if (h || (h = lr), e.size != t.size && !_)
              return !1;
            var w = d.get(e);
            if (w)
              return w == t;
            o |= W, d.set(e, t);
            var A = Sa(h(e), h(t), o, a, l, d);
            return d.delete(e), A;
          case rr:
            if (Bn)
              return Bn.call(e) == Bn.call(t);
        }
        return !1;
      }
      function hd(e, t, n, o, a, l) {
        var d = n & I, h = Xi(e), _ = h.length, w = Xi(t), A = w.length;
        if (_ != A && !d)
          return !1;
        for (var L = _; L--; ) {
          var $ = h[L];
          if (!(d ? $ in t : de.call(t, $)))
            return !1;
        }
        var U = l.get(e), K = l.get(t);
        if (U && K)
          return U == t && K == e;
        var ee = !0;
        l.set(e, t), l.set(t, e);
        for (var G = d; ++L < _; ) {
          $ = h[L];
          var re = e[$], se = t[$];
          if (o)
            var it = d ? o(se, re, $, t, e, l) : o(re, se, $, e, t, l);
          if (!(it === i ? re === se || a(re, se, n, o, l) : it)) {
            ee = !1;
            break;
          }
          G || (G = $ == "constructor");
        }
        if (ee && !G) {
          var Ke = e.constructor, ot = t.constructor;
          Ke != ot && "constructor" in e && "constructor" in t && !(typeof Ke == "function" && Ke instanceof Ke && typeof ot == "function" && ot instanceof ot) && (ee = !1);
        }
        return l.delete(e), l.delete(t), ee;
      }
      function Ct(e) {
        return no(Ra(e, i, Ba), e + "");
      }
      function Xi(e) {
        return Hs(e, xe, Qi);
      }
      function zi(e) {
        return Hs(e, Ye, La);
      }
      var Zi = wr ? function(e) {
        return wr.get(e);
      } : go;
      function Ur(e) {
        for (var t = e.name + "", n = vn[t], o = de.call(vn, t) ? n.length : 0; o--; ) {
          var a = n[o], l = a.func;
          if (l == null || l == e)
            return a.name;
        }
        return t;
      }
      function wn(e) {
        var t = de.call(u, "placeholder") ? u : e;
        return t.placeholder;
      }
      function N() {
        var e = u.iteratee || po;
        return e = e === po ? Ys : e, arguments.length ? e(arguments[0], arguments[1]) : e;
      }
      function Mr(e, t) {
        var n = e.__data__;
        return wd(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
      }
      function Ji(e) {
        for (var t = xe(e), n = t.length; n--; ) {
          var o = t[n], a = e[o];
          t[n] = [o, a, Ta(a)];
        }
        return t;
      }
      function tn(e, t) {
        var n = Ac(e, t);
        return qs(n) ? n : i;
      }
      function pd(e) {
        var t = de.call(e, Zt), n = e[Zt];
        try {
          e[Zt] = i;
          var o = !0;
        } catch {
        }
        var a = hr.call(e);
        return o && (t ? e[Zt] = n : delete e[Zt]), a;
      }
      var Qi = Li ? function(e) {
        return e == null ? [] : (e = he(e), Bt(Li(e), function(t) {
          return Cs.call(e, t);
        }));
      } : vo, La = Li ? function(e) {
        for (var t = []; e; )
          Nt(t, Qi(e)), e = gr(e);
        return t;
      } : vo, Be = Ne;
      (Oi && Be(new Oi(new ArrayBuffer(1))) != ln || Mn && Be(new Mn()) != He || Ii && Be(Ii.resolve()) != nr || gn && Be(new gn()) != gt || Fn && Be(new Fn()) != xn) && (Be = function(e) {
        var t = Ne(e), n = t == je ? e.constructor : i, o = n ? nn(n) : "";
        if (o)
          switch (o) {
            case zc:
              return ln;
            case Zc:
              return He;
            case Jc:
              return nr;
            case Qc:
              return gt;
            case jc:
              return xn;
          }
        return t;
      });
      function _d(e, t, n) {
        for (var o = -1, a = n.length; ++o < a; ) {
          var l = n[o], d = l.size;
          switch (l.type) {
            case "drop":
              e += d;
              break;
            case "dropRight":
              t -= d;
              break;
            case "take":
              t = We(t, e + d);
              break;
            case "takeRight":
              e = Ce(e, t - d);
              break;
          }
        }
        return { start: e, end: t };
      }
      function gd(e) {
        var t = e.match(wl);
        return t ? t[1].split(yl) : [];
      }
      function Oa(e, t, n) {
        t = Vt(t, e);
        for (var o = -1, a = t.length, l = !1; ++o < a; ) {
          var d = St(t[o]);
          if (!(l = e != null && n(e, d)))
            break;
          e = e[d];
        }
        return l || ++o != a ? l : (a = e == null ? 0 : e.length, !!a && Gr(a) && xt(d, a) && (Z(e) || rn(e)));
      }
      function vd(e) {
        var t = e.length, n = new e.constructor(t);
        return t && typeof e[0] == "string" && de.call(e, "index") && (n.index = e.index, n.input = e.input), n;
      }
      function Ia(e) {
        return typeof e.constructor == "function" && !qn(e) ? mn(gr(e)) : {};
      }
      function md(e, t, n) {
        var o = e.constructor;
        switch (t) {
          case Pn:
            return Vi(e);
          case Qe:
          case wt:
            return new o(+e);
          case ln:
            return td(e, n);
          case Jr:
          case Qr:
          case jr:
          case ei:
          case ti:
          case ni:
          case ri:
          case ii:
          case oi:
            return la(e, n);
          case He:
            return new o();
          case Wt:
          case Cn:
            return new o(e);
          case Rn:
            return nd(e);
          case gt:
            return new o();
          case rr:
            return rd(e);
        }
      }
      function bd(e, t) {
        var n = t.length;
        if (!n)
          return e;
        var o = n - 1;
        return t[o] = (n > 1 ? "& " : "") + t[o], t = t.join(n > 2 ? ", " : " "), e.replace(El, `{
/* [wrapped with ` + t + `] */
`);
      }
      function Ed(e) {
        return Z(e) || rn(e) || !!(xs && e && e[xs]);
      }
      function xt(e, t) {
        var n = typeof e;
        return t = t ?? oe, !!t && (n == "number" || n != "symbol" && Cl.test(e)) && e > -1 && e % 1 == 0 && e < t;
      }
      function ke(e, t, n) {
        if (!ye(n))
          return !1;
        var o = typeof t;
        return (o == "number" ? qe(n) && xt(t, n.length) : o == "string" && t in n) ? bt(n[t], e) : !1;
      }
      function ji(e, t) {
        if (Z(e))
          return !1;
        var n = typeof e;
        return n == "number" || n == "symbol" || n == "boolean" || e == null || rt(e) ? !0 : gl.test(e) || !_l.test(e) || t != null && e in he(t);
      }
      function wd(e) {
        var t = typeof e;
        return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
      }
      function eo(e) {
        var t = Ur(e), n = u[t];
        if (typeof n != "function" || !(t in ie.prototype))
          return !1;
        if (e === n)
          return !0;
        var o = Zi(n);
        return !!o && e === o[0];
      }
      function yd(e) {
        return !!Ts && Ts in e;
      }
      var Ad = fr ? Pt : mo;
      function qn(e) {
        var t = e && e.constructor, n = typeof t == "function" && t.prototype || _n;
        return e === n;
      }
      function Ta(e) {
        return e === e && !ye(e);
      }
      function $a(e, t) {
        return function(n) {
          return n == null ? !1 : n[e] === t && (t !== i || e in he(n));
        };
      }
      function Sd(e) {
        var t = kr(e, function(o) {
          return n.size === S && n.clear(), o;
        }), n = t.cache;
        return t;
      }
      function Ld(e, t) {
        var n = e[1], o = t[1], a = n | o, l = a < (q | le | k), d = o == k && n == pe || o == k && n == j && e[7].length <= t[8] || o == (k | j) && t[7].length <= t[8] && n == pe;
        if (!(l || d))
          return e;
        o & q && (e[2] = t[2], a |= n & q ? 0 : be);
        var h = t[3];
        if (h) {
          var _ = e[3];
          e[3] = _ ? fa(_, h, t[4]) : h, e[4] = _ ? kt(e[3], x) : t[4];
        }
        return h = t[5], h && (_ = e[5], e[5] = _ ? da(_, h, t[6]) : h, e[6] = _ ? kt(e[5], x) : t[6]), h = t[7], h && (e[7] = h), o & k && (e[8] = e[8] == null ? t[8] : We(e[8], t[8])), e[9] == null && (e[9] = t[9]), e[0] = t[0], e[1] = a, e;
      }
      function Od(e) {
        var t = [];
        if (e != null)
          for (var n in he(e))
            t.push(n);
        return t;
      }
      function Id(e) {
        return hr.call(e);
      }
      function Ra(e, t, n) {
        return t = Ce(t === i ? e.length - 1 : t, 0), function() {
          for (var o = arguments, a = -1, l = Ce(o.length - t, 0), d = m(l); ++a < l; )
            d[a] = o[t + a];
          a = -1;
          for (var h = m(t + 1); ++a < t; )
            h[a] = o[a];
          return h[t] = n(d), et(e, this, h);
        };
      }
      function Ca(e, t) {
        return t.length < 2 ? e : en(e, dt(t, 0, -1));
      }
      function Td(e, t) {
        for (var n = e.length, o = We(t.length, n), a = Ve(e); o--; ) {
          var l = t[o];
          e[o] = xt(l, n) ? a[l] : i;
        }
        return e;
      }
      function to(e, t) {
        if (!(t === "constructor" && typeof e[t] == "function") && t != "__proto__")
          return e[t];
      }
      var xa = Da(ta), Yn = Kc || function(e, t) {
        return Ue.setTimeout(e, t);
      }, no = Da(Jf);
      function Pa(e, t, n) {
        var o = t + "";
        return no(e, bd(o, $d(gd(o), n)));
      }
      function Da(e) {
        var t = 0, n = 0;
        return function() {
          var o = qc(), a = Ft - (o - n);
          if (n = o, a > 0) {
            if (++t >= st)
              return arguments[0];
          } else
            t = 0;
          return e.apply(i, arguments);
        };
      }
      function Fr(e, t) {
        var n = -1, o = e.length, a = o - 1;
        for (t = t === i ? o : t; ++n < t; ) {
          var l = Wi(n, a), d = e[l];
          e[l] = e[n], e[n] = d;
        }
        return e.length = t, e;
      }
      var Ua = Sd(function(e) {
        var t = [];
        return e.charCodeAt(0) === 46 && t.push(""), e.replace(vl, function(n, o, a, l) {
          t.push(a ? l.replace(Ll, "$1") : o || n);
        }), t;
      });
      function St(e) {
        if (typeof e == "string" || rt(e))
          return e;
        var t = e + "";
        return t == "0" && 1 / e == -te ? "-0" : t;
      }
      function nn(e) {
        if (e != null) {
          try {
            return dr.call(e);
          } catch {
          }
          try {
            return e + "";
          } catch {
          }
        }
        return "";
      }
      function $d(e, t) {
        return ut(Le, function(n) {
          var o = "_." + n[0];
          t & n[1] && !ar(e, o) && e.push(o);
        }), e.sort();
      }
      function Ma(e) {
        if (e instanceof ie)
          return e.clone();
        var t = new ct(e.__wrapped__, e.__chain__);
        return t.__actions__ = Ve(e.__actions__), t.__index__ = e.__index__, t.__values__ = e.__values__, t;
      }
      function Rd(e, t, n) {
        (n ? ke(e, t, n) : t === i) ? t = 1 : t = Ce(Q(t), 0);
        var o = e == null ? 0 : e.length;
        if (!o || t < 1)
          return [];
        for (var a = 0, l = 0, d = m(br(o / t)); a < o; )
          d[l++] = dt(e, a, a += t);
        return d;
      }
      function Cd(e) {
        for (var t = -1, n = e == null ? 0 : e.length, o = 0, a = []; ++t < n; ) {
          var l = e[t];
          l && (a[o++] = l);
        }
        return a;
      }
      function xd() {
        var e = arguments.length;
        if (!e)
          return [];
        for (var t = m(e - 1), n = arguments[0], o = e; o--; )
          t[o - 1] = arguments[o];
        return Nt(Z(n) ? Ve(n) : [n], Me(t, 1));
      }
      var Pd = ne(function(e, t) {
        return Oe(e) ? kn(e, Me(t, 1, Oe, !0)) : [];
      }), Dd = ne(function(e, t) {
        var n = ht(t);
        return Oe(n) && (n = i), Oe(e) ? kn(e, Me(t, 1, Oe, !0), N(n, 2)) : [];
      }), Ud = ne(function(e, t) {
        var n = ht(t);
        return Oe(n) && (n = i), Oe(e) ? kn(e, Me(t, 1, Oe, !0), i, n) : [];
      });
      function Md(e, t, n) {
        var o = e == null ? 0 : e.length;
        return o ? (t = n || t === i ? 1 : Q(t), dt(e, t < 0 ? 0 : t, o)) : [];
      }
      function Fd(e, t, n) {
        var o = e == null ? 0 : e.length;
        return o ? (t = n || t === i ? 1 : Q(t), t = o - t, dt(e, 0, t < 0 ? 0 : t)) : [];
      }
      function Wd(e, t) {
        return e && e.length ? $r(e, N(t, 3), !0, !0) : [];
      }
      function Bd(e, t) {
        return e && e.length ? $r(e, N(t, 3), !0) : [];
      }
      function Nd(e, t, n, o) {
        var a = e == null ? 0 : e.length;
        return a ? (n && typeof n != "number" && ke(e, t, n) && (n = 0, o = a), xf(e, t, n, o)) : [];
      }
      function Fa(e, t, n) {
        var o = e == null ? 0 : e.length;
        if (!o)
          return -1;
        var a = n == null ? 0 : Q(n);
        return a < 0 && (a = Ce(o + a, 0)), ur(e, N(t, 3), a);
      }
      function Wa(e, t, n) {
        var o = e == null ? 0 : e.length;
        if (!o)
          return -1;
        var a = o - 1;
        return n !== i && (a = Q(n), a = n < 0 ? Ce(o + a, 0) : We(a, o - 1)), ur(e, N(t, 3), a, !0);
      }
      function Ba(e) {
        var t = e == null ? 0 : e.length;
        return t ? Me(e, 1) : [];
      }
      function kd(e) {
        var t = e == null ? 0 : e.length;
        return t ? Me(e, te) : [];
      }
      function Kd(e, t) {
        var n = e == null ? 0 : e.length;
        return n ? (t = t === i ? 1 : Q(t), Me(e, t)) : [];
      }
      function Gd(e) {
        for (var t = -1, n = e == null ? 0 : e.length, o = {}; ++t < n; ) {
          var a = e[t];
          o[a[0]] = a[1];
        }
        return o;
      }
      function Na(e) {
        return e && e.length ? e[0] : i;
      }
      function Hd(e, t, n) {
        var o = e == null ? 0 : e.length;
        if (!o)
          return -1;
        var a = n == null ? 0 : Q(n);
        return a < 0 && (a = Ce(o + a, 0)), fn(e, t, a);
      }
      function Vd(e) {
        var t = e == null ? 0 : e.length;
        return t ? dt(e, 0, -1) : [];
      }
      var qd = ne(function(e) {
        var t = me(e, Gi);
        return t.length && t[0] === e[0] ? Pi(t) : [];
      }), Yd = ne(function(e) {
        var t = ht(e), n = me(e, Gi);
        return t === ht(n) ? t = i : n.pop(), n.length && n[0] === e[0] ? Pi(n, N(t, 2)) : [];
      }), Xd = ne(function(e) {
        var t = ht(e), n = me(e, Gi);
        return t = typeof t == "function" ? t : i, t && n.pop(), n.length && n[0] === e[0] ? Pi(n, i, t) : [];
      });
      function zd(e, t) {
        return e == null ? "" : Hc.call(e, t);
      }
      function ht(e) {
        var t = e == null ? 0 : e.length;
        return t ? e[t - 1] : i;
      }
      function Zd(e, t, n) {
        var o = e == null ? 0 : e.length;
        if (!o)
          return -1;
        var a = o;
        return n !== i && (a = Q(n), a = a < 0 ? Ce(o + a, 0) : We(a, o - 1)), t === t ? Tc(e, t, a) : ur(e, Es, a, !0);
      }
      function Jd(e, t) {
        return e && e.length ? Js(e, Q(t)) : i;
      }
      var Qd = ne(ka);
      function ka(e, t) {
        return e && e.length && t && t.length ? Fi(e, t) : e;
      }
      function jd(e, t, n) {
        return e && e.length && t && t.length ? Fi(e, t, N(n, 2)) : e;
      }
      function eh(e, t, n) {
        return e && e.length && t && t.length ? Fi(e, t, i, n) : e;
      }
      var th = Ct(function(e, t) {
        var n = e == null ? 0 : e.length, o = $i(e, t);
        return ea(e, me(t, function(a) {
          return xt(a, n) ? +a : a;
        }).sort(ca)), o;
      });
      function nh(e, t) {
        var n = [];
        if (!(e && e.length))
          return n;
        var o = -1, a = [], l = e.length;
        for (t = N(t, 3); ++o < l; ) {
          var d = e[o];
          t(d, o, e) && (n.push(d), a.push(o));
        }
        return ea(e, a), n;
      }
      function ro(e) {
        return e == null ? e : Xc.call(e);
      }
      function rh(e, t, n) {
        var o = e == null ? 0 : e.length;
        return o ? (n && typeof n != "number" && ke(e, t, n) ? (t = 0, n = o) : (t = t == null ? 0 : Q(t), n = n === i ? o : Q(n)), dt(e, t, n)) : [];
      }
      function ih(e, t) {
        return Tr(e, t);
      }
      function oh(e, t, n) {
        return Ni(e, t, N(n, 2));
      }
      function sh(e, t) {
        var n = e == null ? 0 : e.length;
        if (n) {
          var o = Tr(e, t);
          if (o < n && bt(e[o], t))
            return o;
        }
        return -1;
      }
      function ah(e, t) {
        return Tr(e, t, !0);
      }
      function uh(e, t, n) {
        return Ni(e, t, N(n, 2), !0);
      }
      function lh(e, t) {
        var n = e == null ? 0 : e.length;
        if (n) {
          var o = Tr(e, t, !0) - 1;
          if (bt(e[o], t))
            return o;
        }
        return -1;
      }
      function ch(e) {
        return e && e.length ? na(e) : [];
      }
      function fh(e, t) {
        return e && e.length ? na(e, N(t, 2)) : [];
      }
      function dh(e) {
        var t = e == null ? 0 : e.length;
        return t ? dt(e, 1, t) : [];
      }
      function hh(e, t, n) {
        return e && e.length ? (t = n || t === i ? 1 : Q(t), dt(e, 0, t < 0 ? 0 : t)) : [];
      }
      function ph(e, t, n) {
        var o = e == null ? 0 : e.length;
        return o ? (t = n || t === i ? 1 : Q(t), t = o - t, dt(e, t < 0 ? 0 : t, o)) : [];
      }
      function _h(e, t) {
        return e && e.length ? $r(e, N(t, 3), !1, !0) : [];
      }
      function gh(e, t) {
        return e && e.length ? $r(e, N(t, 3)) : [];
      }
      var vh = ne(function(e) {
        return Ht(Me(e, 1, Oe, !0));
      }), mh = ne(function(e) {
        var t = ht(e);
        return Oe(t) && (t = i), Ht(Me(e, 1, Oe, !0), N(t, 2));
      }), bh = ne(function(e) {
        var t = ht(e);
        return t = typeof t == "function" ? t : i, Ht(Me(e, 1, Oe, !0), i, t);
      });
      function Eh(e) {
        return e && e.length ? Ht(e) : [];
      }
      function wh(e, t) {
        return e && e.length ? Ht(e, N(t, 2)) : [];
      }
      function yh(e, t) {
        return t = typeof t == "function" ? t : i, e && e.length ? Ht(e, i, t) : [];
      }
      function io(e) {
        if (!(e && e.length))
          return [];
        var t = 0;
        return e = Bt(e, function(n) {
          if (Oe(n))
            return t = Ce(n.length, t), !0;
        }), wi(t, function(n) {
          return me(e, mi(n));
        });
      }
      function Ka(e, t) {
        if (!(e && e.length))
          return [];
        var n = io(e);
        return t == null ? n : me(n, function(o) {
          return et(t, i, o);
        });
      }
      var Ah = ne(function(e, t) {
        return Oe(e) ? kn(e, t) : [];
      }), Sh = ne(function(e) {
        return Ki(Bt(e, Oe));
      }), Lh = ne(function(e) {
        var t = ht(e);
        return Oe(t) && (t = i), Ki(Bt(e, Oe), N(t, 2));
      }), Oh = ne(function(e) {
        var t = ht(e);
        return t = typeof t == "function" ? t : i, Ki(Bt(e, Oe), i, t);
      }), Ih = ne(io);
      function Th(e, t) {
        return sa(e || [], t || [], Nn);
      }
      function $h(e, t) {
        return sa(e || [], t || [], Hn);
      }
      var Rh = ne(function(e) {
        var t = e.length, n = t > 1 ? e[t - 1] : i;
        return n = typeof n == "function" ? (e.pop(), n) : i, Ka(e, n);
      });
      function Ga(e) {
        var t = u(e);
        return t.__chain__ = !0, t;
      }
      function Ch(e, t) {
        return t(e), e;
      }
      function Wr(e, t) {
        return t(e);
      }
      var xh = Ct(function(e) {
        var t = e.length, n = t ? e[0] : 0, o = this.__wrapped__, a = function(l) {
          return $i(l, e);
        };
        return t > 1 || this.__actions__.length || !(o instanceof ie) || !xt(n) ? this.thru(a) : (o = o.slice(n, +n + (t ? 1 : 0)), o.__actions__.push({
          func: Wr,
          args: [a],
          thisArg: i
        }), new ct(o, this.__chain__).thru(function(l) {
          return t && !l.length && l.push(i), l;
        }));
      });
      function Ph() {
        return Ga(this);
      }
      function Dh() {
        return new ct(this.value(), this.__chain__);
      }
      function Uh() {
        this.__values__ === i && (this.__values__ = ru(this.value()));
        var e = this.__index__ >= this.__values__.length, t = e ? i : this.__values__[this.__index__++];
        return { done: e, value: t };
      }
      function Mh() {
        return this;
      }
      function Fh(e) {
        for (var t, n = this; n instanceof Ar; ) {
          var o = Ma(n);
          o.__index__ = 0, o.__values__ = i, t ? a.__wrapped__ = o : t = o;
          var a = o;
          n = n.__wrapped__;
        }
        return a.__wrapped__ = e, t;
      }
      function Wh() {
        var e = this.__wrapped__;
        if (e instanceof ie) {
          var t = e;
          return this.__actions__.length && (t = new ie(this)), t = t.reverse(), t.__actions__.push({
            func: Wr,
            args: [ro],
            thisArg: i
          }), new ct(t, this.__chain__);
        }
        return this.thru(ro);
      }
      function Bh() {
        return oa(this.__wrapped__, this.__actions__);
      }
      var Nh = Rr(function(e, t, n) {
        de.call(e, n) ? ++e[n] : $t(e, n, 1);
      });
      function kh(e, t, n) {
        var o = Z(e) ? ms : Cf;
        return n && ke(e, t, n) && (t = i), o(e, N(t, 3));
      }
      function Kh(e, t) {
        var n = Z(e) ? Bt : Ks;
        return n(e, N(t, 3));
      }
      var Gh = ga(Fa), Hh = ga(Wa);
      function Vh(e, t) {
        return Me(Br(e, t), 1);
      }
      function qh(e, t) {
        return Me(Br(e, t), te);
      }
      function Yh(e, t, n) {
        return n = n === i ? 1 : Q(n), Me(Br(e, t), n);
      }
      function Ha(e, t) {
        var n = Z(e) ? ut : Gt;
        return n(e, N(t, 3));
      }
      function Va(e, t) {
        var n = Z(e) ? fc : ks;
        return n(e, N(t, 3));
      }
      var Xh = Rr(function(e, t, n) {
        de.call(e, n) ? e[n].push(t) : $t(e, n, [t]);
      });
      function zh(e, t, n, o) {
        e = qe(e) ? e : An(e), n = n && !o ? Q(n) : 0;
        var a = e.length;
        return n < 0 && (n = Ce(a + n, 0)), Hr(e) ? n <= a && e.indexOf(t, n) > -1 : !!a && fn(e, t, n) > -1;
      }
      var Zh = ne(function(e, t, n) {
        var o = -1, a = typeof t == "function", l = qe(e) ? m(e.length) : [];
        return Gt(e, function(d) {
          l[++o] = a ? et(t, d, n) : Kn(d, t, n);
        }), l;
      }), Jh = Rr(function(e, t, n) {
        $t(e, n, t);
      });
      function Br(e, t) {
        var n = Z(e) ? me : Xs;
        return n(e, N(t, 3));
      }
      function Qh(e, t, n, o) {
        return e == null ? [] : (Z(t) || (t = t == null ? [] : [t]), n = o ? i : n, Z(n) || (n = n == null ? [] : [n]), Qs(e, t, n));
      }
      var jh = Rr(function(e, t, n) {
        e[n ? 0 : 1].push(t);
      }, function() {
        return [[], []];
      });
      function ep(e, t, n) {
        var o = Z(e) ? gi : ys, a = arguments.length < 3;
        return o(e, N(t, 4), n, a, Gt);
      }
      function tp(e, t, n) {
        var o = Z(e) ? dc : ys, a = arguments.length < 3;
        return o(e, N(t, 4), n, a, ks);
      }
      function np(e, t) {
        var n = Z(e) ? Bt : Ks;
        return n(e, Kr(N(t, 3)));
      }
      function rp(e) {
        var t = Z(e) ? Fs : zf;
        return t(e);
      }
      function ip(e, t, n) {
        (n ? ke(e, t, n) : t === i) ? t = 1 : t = Q(t);
        var o = Z(e) ? Of : Zf;
        return o(e, t);
      }
      function op(e) {
        var t = Z(e) ? If : Qf;
        return t(e);
      }
      function sp(e) {
        if (e == null)
          return 0;
        if (qe(e))
          return Hr(e) ? hn(e) : e.length;
        var t = Be(e);
        return t == He || t == gt ? e.size : Ui(e).length;
      }
      function ap(e, t, n) {
        var o = Z(e) ? vi : jf;
        return n && ke(e, t, n) && (t = i), o(e, N(t, 3));
      }
      var up = ne(function(e, t) {
        if (e == null)
          return [];
        var n = t.length;
        return n > 1 && ke(e, t[0], t[1]) ? t = [] : n > 2 && ke(t[0], t[1], t[2]) && (t = [t[0]]), Qs(e, Me(t, 1), []);
      }), Nr = kc || function() {
        return Ue.Date.now();
      };
      function lp(e, t) {
        if (typeof t != "function")
          throw new lt(y);
        return e = Q(e), function() {
          if (--e < 1)
            return t.apply(this, arguments);
        };
      }
      function qa(e, t, n) {
        return t = n ? i : t, t = e && t == null ? e.length : t, Rt(e, k, i, i, i, i, t);
      }
      function Ya(e, t) {
        var n;
        if (typeof t != "function")
          throw new lt(y);
        return e = Q(e), function() {
          return --e > 0 && (n = t.apply(this, arguments)), e <= 1 && (t = i), n;
        };
      }
      var oo = ne(function(e, t, n) {
        var o = q;
        if (n.length) {
          var a = kt(n, wn(oo));
          o |= Y;
        }
        return Rt(e, o, t, n, a);
      }), Xa = ne(function(e, t, n) {
        var o = q | le;
        if (n.length) {
          var a = kt(n, wn(Xa));
          o |= Y;
        }
        return Rt(t, o, e, n, a);
      });
      function za(e, t, n) {
        t = n ? i : t;
        var o = Rt(e, pe, i, i, i, i, i, t);
        return o.placeholder = za.placeholder, o;
      }
      function Za(e, t, n) {
        t = n ? i : t;
        var o = Rt(e, Ee, i, i, i, i, i, t);
        return o.placeholder = Za.placeholder, o;
      }
      function Ja(e, t, n) {
        var o, a, l, d, h, _, w = 0, A = !1, L = !1, $ = !0;
        if (typeof e != "function")
          throw new lt(y);
        t = pt(t) || 0, ye(n) && (A = !!n.leading, L = "maxWait" in n, l = L ? Ce(pt(n.maxWait) || 0, t) : l, $ = "trailing" in n ? !!n.trailing : $);
        function U(Ie) {
          var Et = o, Ut = a;
          return o = a = i, w = Ie, d = e.apply(Ut, Et), d;
        }
        function K(Ie) {
          return w = Ie, h = Yn(re, t), A ? U(Ie) : d;
        }
        function ee(Ie) {
          var Et = Ie - _, Ut = Ie - w, gu = t - Et;
          return L ? We(gu, l - Ut) : gu;
        }
        function G(Ie) {
          var Et = Ie - _, Ut = Ie - w;
          return _ === i || Et >= t || Et < 0 || L && Ut >= l;
        }
        function re() {
          var Ie = Nr();
          if (G(Ie))
            return se(Ie);
          h = Yn(re, ee(Ie));
        }
        function se(Ie) {
          return h = i, $ && o ? U(Ie) : (o = a = i, d);
        }
        function it() {
          h !== i && aa(h), w = 0, o = _ = a = h = i;
        }
        function Ke() {
          return h === i ? d : se(Nr());
        }
        function ot() {
          var Ie = Nr(), Et = G(Ie);
          if (o = arguments, a = this, _ = Ie, Et) {
            if (h === i)
              return K(_);
            if (L)
              return aa(h), h = Yn(re, t), U(_);
          }
          return h === i && (h = Yn(re, t)), d;
        }
        return ot.cancel = it, ot.flush = Ke, ot;
      }
      var cp = ne(function(e, t) {
        return Ns(e, 1, t);
      }), fp = ne(function(e, t, n) {
        return Ns(e, pt(t) || 0, n);
      });
      function dp(e) {
        return Rt(e, _e);
      }
      function kr(e, t) {
        if (typeof e != "function" || t != null && typeof t != "function")
          throw new lt(y);
        var n = function() {
          var o = arguments, a = t ? t.apply(this, o) : o[0], l = n.cache;
          if (l.has(a))
            return l.get(a);
          var d = e.apply(this, o);
          return n.cache = l.set(a, d) || l, d;
        };
        return n.cache = new (kr.Cache || Tt)(), n;
      }
      kr.Cache = Tt;
      function Kr(e) {
        if (typeof e != "function")
          throw new lt(y);
        return function() {
          var t = arguments;
          switch (t.length) {
            case 0:
              return !e.call(this);
            case 1:
              return !e.call(this, t[0]);
            case 2:
              return !e.call(this, t[0], t[1]);
            case 3:
              return !e.call(this, t[0], t[1], t[2]);
          }
          return !e.apply(this, t);
        };
      }
      function hp(e) {
        return Ya(2, e);
      }
      var pp = ed(function(e, t) {
        t = t.length == 1 && Z(t[0]) ? me(t[0], tt(N())) : me(Me(t, 1), tt(N()));
        var n = t.length;
        return ne(function(o) {
          for (var a = -1, l = We(o.length, n); ++a < l; )
            o[a] = t[a].call(this, o[a]);
          return et(e, this, o);
        });
      }), so = ne(function(e, t) {
        var n = kt(t, wn(so));
        return Rt(e, Y, i, t, n);
      }), Qa = ne(function(e, t) {
        var n = kt(t, wn(Qa));
        return Rt(e, D, i, t, n);
      }), _p = Ct(function(e, t) {
        return Rt(e, j, i, i, i, t);
      });
      function gp(e, t) {
        if (typeof e != "function")
          throw new lt(y);
        return t = t === i ? t : Q(t), ne(e, t);
      }
      function vp(e, t) {
        if (typeof e != "function")
          throw new lt(y);
        return t = t == null ? 0 : Ce(Q(t), 0), ne(function(n) {
          var o = n[t], a = qt(n, 0, t);
          return o && Nt(a, o), et(e, this, a);
        });
      }
      function mp(e, t, n) {
        var o = !0, a = !0;
        if (typeof e != "function")
          throw new lt(y);
        return ye(n) && (o = "leading" in n ? !!n.leading : o, a = "trailing" in n ? !!n.trailing : a), Ja(e, t, {
          leading: o,
          maxWait: t,
          trailing: a
        });
      }
      function bp(e) {
        return qa(e, 1);
      }
      function Ep(e, t) {
        return so(Hi(t), e);
      }
      function wp() {
        if (!arguments.length)
          return [];
        var e = arguments[0];
        return Z(e) ? e : [e];
      }
      function yp(e) {
        return ft(e, P);
      }
      function Ap(e, t) {
        return t = typeof t == "function" ? t : i, ft(e, P, t);
      }
      function Sp(e) {
        return ft(e, O | P);
      }
      function Lp(e, t) {
        return t = typeof t == "function" ? t : i, ft(e, O | P, t);
      }
      function Op(e, t) {
        return t == null || Bs(e, t, xe(t));
      }
      function bt(e, t) {
        return e === t || e !== e && t !== t;
      }
      var Ip = Dr(xi), Tp = Dr(function(e, t) {
        return e >= t;
      }), rn = Vs(/* @__PURE__ */ function() {
        return arguments;
      }()) ? Vs : function(e) {
        return Se(e) && de.call(e, "callee") && !Cs.call(e, "callee");
      }, Z = m.isArray, $p = ds ? tt(ds) : Ff;
      function qe(e) {
        return e != null && Gr(e.length) && !Pt(e);
      }
      function Oe(e) {
        return Se(e) && qe(e);
      }
      function Rp(e) {
        return e === !0 || e === !1 || Se(e) && Ne(e) == Qe;
      }
      var Yt = Gc || mo, Cp = hs ? tt(hs) : Wf;
      function xp(e) {
        return Se(e) && e.nodeType === 1 && !Xn(e);
      }
      function Pp(e) {
        if (e == null)
          return !0;
        if (qe(e) && (Z(e) || typeof e == "string" || typeof e.splice == "function" || Yt(e) || yn(e) || rn(e)))
          return !e.length;
        var t = Be(e);
        if (t == He || t == gt)
          return !e.size;
        if (qn(e))
          return !Ui(e).length;
        for (var n in e)
          if (de.call(e, n))
            return !1;
        return !0;
      }
      function Dp(e, t) {
        return Gn(e, t);
      }
      function Up(e, t, n) {
        n = typeof n == "function" ? n : i;
        var o = n ? n(e, t) : i;
        return o === i ? Gn(e, t, i, n) : !!o;
      }
      function ao(e) {
        if (!Se(e))
          return !1;
        var t = Ne(e);
        return t == Xt || t == $n || typeof e.message == "string" && typeof e.name == "string" && !Xn(e);
      }
      function Mp(e) {
        return typeof e == "number" && Ps(e);
      }
      function Pt(e) {
        if (!ye(e))
          return !1;
        var t = Ne(e);
        return t == an || t == un || t == Ot || t == ol;
      }
      function ja(e) {
        return typeof e == "number" && e == Q(e);
      }
      function Gr(e) {
        return typeof e == "number" && e > -1 && e % 1 == 0 && e <= oe;
      }
      function ye(e) {
        var t = typeof e;
        return e != null && (t == "object" || t == "function");
      }
      function Se(e) {
        return e != null && typeof e == "object";
      }
      var eu = ps ? tt(ps) : Nf;
      function Fp(e, t) {
        return e === t || Di(e, t, Ji(t));
      }
      function Wp(e, t, n) {
        return n = typeof n == "function" ? n : i, Di(e, t, Ji(t), n);
      }
      function Bp(e) {
        return tu(e) && e != +e;
      }
      function Np(e) {
        if (Ad(e))
          throw new X(g);
        return qs(e);
      }
      function kp(e) {
        return e === null;
      }
      function Kp(e) {
        return e == null;
      }
      function tu(e) {
        return typeof e == "number" || Se(e) && Ne(e) == Wt;
      }
      function Xn(e) {
        if (!Se(e) || Ne(e) != je)
          return !1;
        var t = gr(e);
        if (t === null)
          return !0;
        var n = de.call(t, "constructor") && t.constructor;
        return typeof n == "function" && n instanceof n && dr.call(n) == Fc;
      }
      var uo = _s ? tt(_s) : kf;
      function Gp(e) {
        return ja(e) && e >= -oe && e <= oe;
      }
      var nu = gs ? tt(gs) : Kf;
      function Hr(e) {
        return typeof e == "string" || !Z(e) && Se(e) && Ne(e) == Cn;
      }
      function rt(e) {
        return typeof e == "symbol" || Se(e) && Ne(e) == rr;
      }
      var yn = vs ? tt(vs) : Gf;
      function Hp(e) {
        return e === i;
      }
      function Vp(e) {
        return Se(e) && Be(e) == xn;
      }
      function qp(e) {
        return Se(e) && Ne(e) == al;
      }
      var Yp = Dr(Mi), Xp = Dr(function(e, t) {
        return e <= t;
      });
      function ru(e) {
        if (!e)
          return [];
        if (qe(e))
          return Hr(e) ? vt(e) : Ve(e);
        if (Un && e[Un])
          return Lc(e[Un]());
        var t = Be(e), n = t == He ? Ai : t == gt ? lr : An;
        return n(e);
      }
      function Dt(e) {
        if (!e)
          return e === 0 ? e : 0;
        if (e = pt(e), e === te || e === -te) {
          var t = e < 0 ? -1 : 1;
          return t * R;
        }
        return e === e ? e : 0;
      }
      function Q(e) {
        var t = Dt(e), n = t % 1;
        return t === t ? n ? t - n : t : 0;
      }
      function iu(e) {
        return e ? jt(Q(e), 0, V) : 0;
      }
      function pt(e) {
        if (typeof e == "number")
          return e;
        if (rt(e))
          return M;
        if (ye(e)) {
          var t = typeof e.valueOf == "function" ? e.valueOf() : e;
          e = ye(t) ? t + "" : t;
        }
        if (typeof e != "string")
          return e === 0 ? e : +e;
        e = As(e);
        var n = Tl.test(e);
        return n || Rl.test(e) ? uc(e.slice(2), n ? 2 : 8) : Il.test(e) ? M : +e;
      }
      function ou(e) {
        return At(e, Ye(e));
      }
      function zp(e) {
        return e ? jt(Q(e), -oe, oe) : e === 0 ? e : 0;
      }
      function fe(e) {
        return e == null ? "" : nt(e);
      }
      var Zp = bn(function(e, t) {
        if (qn(t) || qe(t)) {
          At(t, xe(t), e);
          return;
        }
        for (var n in t)
          de.call(t, n) && Nn(e, n, t[n]);
      }), su = bn(function(e, t) {
        At(t, Ye(t), e);
      }), Vr = bn(function(e, t, n, o) {
        At(t, Ye(t), e, o);
      }), Jp = bn(function(e, t, n, o) {
        At(t, xe(t), e, o);
      }), Qp = Ct($i);
      function jp(e, t) {
        var n = mn(e);
        return t == null ? n : Ws(n, t);
      }
      var e_ = ne(function(e, t) {
        e = he(e);
        var n = -1, o = t.length, a = o > 2 ? t[2] : i;
        for (a && ke(t[0], t[1], a) && (o = 1); ++n < o; )
          for (var l = t[n], d = Ye(l), h = -1, _ = d.length; ++h < _; ) {
            var w = d[h], A = e[w];
            (A === i || bt(A, _n[w]) && !de.call(e, w)) && (e[w] = l[w]);
          }
        return e;
      }), t_ = ne(function(e) {
        return e.push(i, Aa), et(au, i, e);
      });
      function n_(e, t) {
        return bs(e, N(t, 3), yt);
      }
      function r_(e, t) {
        return bs(e, N(t, 3), Ci);
      }
      function i_(e, t) {
        return e == null ? e : Ri(e, N(t, 3), Ye);
      }
      function o_(e, t) {
        return e == null ? e : Gs(e, N(t, 3), Ye);
      }
      function s_(e, t) {
        return e && yt(e, N(t, 3));
      }
      function a_(e, t) {
        return e && Ci(e, N(t, 3));
      }
      function u_(e) {
        return e == null ? [] : Or(e, xe(e));
      }
      function l_(e) {
        return e == null ? [] : Or(e, Ye(e));
      }
      function lo(e, t, n) {
        var o = e == null ? i : en(e, t);
        return o === i ? n : o;
      }
      function c_(e, t) {
        return e != null && Oa(e, t, Pf);
      }
      function co(e, t) {
        return e != null && Oa(e, t, Df);
      }
      var f_ = ma(function(e, t, n) {
        t != null && typeof t.toString != "function" && (t = hr.call(t)), e[t] = n;
      }, ho(Xe)), d_ = ma(function(e, t, n) {
        t != null && typeof t.toString != "function" && (t = hr.call(t)), de.call(e, t) ? e[t].push(n) : e[t] = [n];
      }, N), h_ = ne(Kn);
      function xe(e) {
        return qe(e) ? Ms(e) : Ui(e);
      }
      function Ye(e) {
        return qe(e) ? Ms(e, !0) : Hf(e);
      }
      function p_(e, t) {
        var n = {};
        return t = N(t, 3), yt(e, function(o, a, l) {
          $t(n, t(o, a, l), o);
        }), n;
      }
      function __(e, t) {
        var n = {};
        return t = N(t, 3), yt(e, function(o, a, l) {
          $t(n, a, t(o, a, l));
        }), n;
      }
      var g_ = bn(function(e, t, n) {
        Ir(e, t, n);
      }), au = bn(function(e, t, n, o) {
        Ir(e, t, n, o);
      }), v_ = Ct(function(e, t) {
        var n = {};
        if (e == null)
          return n;
        var o = !1;
        t = me(t, function(l) {
          return l = Vt(l, e), o || (o = l.length > 1), l;
        }), At(e, zi(e), n), o && (n = ft(n, O | H | P, fd));
        for (var a = t.length; a--; )
          ki(n, t[a]);
        return n;
      });
      function m_(e, t) {
        return uu(e, Kr(N(t)));
      }
      var b_ = Ct(function(e, t) {
        return e == null ? {} : qf(e, t);
      });
      function uu(e, t) {
        if (e == null)
          return {};
        var n = me(zi(e), function(o) {
          return [o];
        });
        return t = N(t), js(e, n, function(o, a) {
          return t(o, a[0]);
        });
      }
      function E_(e, t, n) {
        t = Vt(t, e);
        var o = -1, a = t.length;
        for (a || (a = 1, e = i); ++o < a; ) {
          var l = e == null ? i : e[St(t[o])];
          l === i && (o = a, l = n), e = Pt(l) ? l.call(e) : l;
        }
        return e;
      }
      function w_(e, t, n) {
        return e == null ? e : Hn(e, t, n);
      }
      function y_(e, t, n, o) {
        return o = typeof o == "function" ? o : i, e == null ? e : Hn(e, t, n, o);
      }
      var lu = wa(xe), cu = wa(Ye);
      function A_(e, t, n) {
        var o = Z(e), a = o || Yt(e) || yn(e);
        if (t = N(t, 4), n == null) {
          var l = e && e.constructor;
          a ? n = o ? new l() : [] : ye(e) ? n = Pt(l) ? mn(gr(e)) : {} : n = {};
        }
        return (a ? ut : yt)(e, function(d, h, _) {
          return t(n, d, h, _);
        }), n;
      }
      function S_(e, t) {
        return e == null ? !0 : ki(e, t);
      }
      function L_(e, t, n) {
        return e == null ? e : ia(e, t, Hi(n));
      }
      function O_(e, t, n, o) {
        return o = typeof o == "function" ? o : i, e == null ? e : ia(e, t, Hi(n), o);
      }
      function An(e) {
        return e == null ? [] : yi(e, xe(e));
      }
      function I_(e) {
        return e == null ? [] : yi(e, Ye(e));
      }
      function T_(e, t, n) {
        return n === i && (n = t, t = i), n !== i && (n = pt(n), n = n === n ? n : 0), t !== i && (t = pt(t), t = t === t ? t : 0), jt(pt(e), t, n);
      }
      function $_(e, t, n) {
        return t = Dt(t), n === i ? (n = t, t = 0) : n = Dt(n), e = pt(e), Uf(e, t, n);
      }
      function R_(e, t, n) {
        if (n && typeof n != "boolean" && ke(e, t, n) && (t = n = i), n === i && (typeof t == "boolean" ? (n = t, t = i) : typeof e == "boolean" && (n = e, e = i)), e === i && t === i ? (e = 0, t = 1) : (e = Dt(e), t === i ? (t = e, e = 0) : t = Dt(t)), e > t) {
          var o = e;
          e = t, t = o;
        }
        if (n || e % 1 || t % 1) {
          var a = Ds();
          return We(e + a * (t - e + ac("1e-" + ((a + "").length - 1))), t);
        }
        return Wi(e, t);
      }
      var C_ = En(function(e, t, n) {
        return t = t.toLowerCase(), e + (n ? fu(t) : t);
      });
      function fu(e) {
        return fo(fe(e).toLowerCase());
      }
      function du(e) {
        return e = fe(e), e && e.replace(xl, Ec).replace(Jl, "");
      }
      function x_(e, t, n) {
        e = fe(e), t = nt(t);
        var o = e.length;
        n = n === i ? o : jt(Q(n), 0, o);
        var a = n;
        return n -= t.length, n >= 0 && e.slice(n, a) == t;
      }
      function P_(e) {
        return e = fe(e), e && dl.test(e) ? e.replace(Go, wc) : e;
      }
      function D_(e) {
        return e = fe(e), e && ml.test(e) ? e.replace(si, "\\$&") : e;
      }
      var U_ = En(function(e, t, n) {
        return e + (n ? "-" : "") + t.toLowerCase();
      }), M_ = En(function(e, t, n) {
        return e + (n ? " " : "") + t.toLowerCase();
      }), F_ = _a("toLowerCase");
      function W_(e, t, n) {
        e = fe(e), t = Q(t);
        var o = t ? hn(e) : 0;
        if (!t || o >= t)
          return e;
        var a = (t - o) / 2;
        return Pr(Er(a), n) + e + Pr(br(a), n);
      }
      function B_(e, t, n) {
        e = fe(e), t = Q(t);
        var o = t ? hn(e) : 0;
        return t && o < t ? e + Pr(t - o, n) : e;
      }
      function N_(e, t, n) {
        e = fe(e), t = Q(t);
        var o = t ? hn(e) : 0;
        return t && o < t ? Pr(t - o, n) + e : e;
      }
      function k_(e, t, n) {
        return n || t == null ? t = 0 : t && (t = +t), Yc(fe(e).replace(ai, ""), t || 0);
      }
      function K_(e, t, n) {
        return (n ? ke(e, t, n) : t === i) ? t = 1 : t = Q(t), Bi(fe(e), t);
      }
      function G_() {
        var e = arguments, t = fe(e[0]);
        return e.length < 3 ? t : t.replace(e[1], e[2]);
      }
      var H_ = En(function(e, t, n) {
        return e + (n ? "_" : "") + t.toLowerCase();
      });
      function V_(e, t, n) {
        return n && typeof n != "number" && ke(e, t, n) && (t = n = i), n = n === i ? V : n >>> 0, n ? (e = fe(e), e && (typeof t == "string" || t != null && !uo(t)) && (t = nt(t), !t && dn(e)) ? qt(vt(e), 0, n) : e.split(t, n)) : [];
      }
      var q_ = En(function(e, t, n) {
        return e + (n ? " " : "") + fo(t);
      });
      function Y_(e, t, n) {
        return e = fe(e), n = n == null ? 0 : jt(Q(n), 0, e.length), t = nt(t), e.slice(n, n + t.length) == t;
      }
      function X_(e, t, n) {
        var o = u.templateSettings;
        n && ke(e, t, n) && (t = i), e = fe(e), t = Vr({}, t, o, ya);
        var a = Vr({}, t.imports, o.imports, ya), l = xe(a), d = yi(a, l), h, _, w = 0, A = t.interpolate || ir, L = "__p += '", $ = Si(
          (t.escape || ir).source + "|" + A.source + "|" + (A === Ho ? Ol : ir).source + "|" + (t.evaluate || ir).source + "|$",
          "g"
        ), U = "//# sourceURL=" + (de.call(t, "sourceURL") ? (t.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++nc + "]") + `
`;
        e.replace($, function(G, re, se, it, Ke, ot) {
          return se || (se = it), L += e.slice(w, ot).replace(Pl, yc), re && (h = !0, L += `' +
__e(` + re + `) +
'`), Ke && (_ = !0, L += `';
` + Ke + `;
__p += '`), se && (L += `' +
((__t = (` + se + `)) == null ? '' : __t) +
'`), w = ot + G.length, G;
        }), L += `';
`;
        var K = de.call(t, "variable") && t.variable;
        if (!K)
          L = `with (obj) {
` + L + `
}
`;
        else if (Sl.test(K))
          throw new X(v);
        L = (_ ? L.replace(ul, "") : L).replace(ll, "$1").replace(cl, "$1;"), L = "function(" + (K || "obj") + `) {
` + (K ? "" : `obj || (obj = {});
`) + "var __t, __p = ''" + (h ? ", __e = _.escape" : "") + (_ ? `, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
` : `;
`) + L + `return __p
}`;
        var ee = pu(function() {
          return ce(l, U + "return " + L).apply(i, d);
        });
        if (ee.source = L, ao(ee))
          throw ee;
        return ee;
      }
      function z_(e) {
        return fe(e).toLowerCase();
      }
      function Z_(e) {
        return fe(e).toUpperCase();
      }
      function J_(e, t, n) {
        if (e = fe(e), e && (n || t === i))
          return As(e);
        if (!e || !(t = nt(t)))
          return e;
        var o = vt(e), a = vt(t), l = Ss(o, a), d = Ls(o, a) + 1;
        return qt(o, l, d).join("");
      }
      function Q_(e, t, n) {
        if (e = fe(e), e && (n || t === i))
          return e.slice(0, Is(e) + 1);
        if (!e || !(t = nt(t)))
          return e;
        var o = vt(e), a = Ls(o, vt(t)) + 1;
        return qt(o, 0, a).join("");
      }
      function j_(e, t, n) {
        if (e = fe(e), e && (n || t === i))
          return e.replace(ai, "");
        if (!e || !(t = nt(t)))
          return e;
        var o = vt(e), a = Ss(o, vt(t));
        return qt(o, a).join("");
      }
      function eg(e, t) {
        var n = Je, o = Lt;
        if (ye(t)) {
          var a = "separator" in t ? t.separator : a;
          n = "length" in t ? Q(t.length) : n, o = "omission" in t ? nt(t.omission) : o;
        }
        e = fe(e);
        var l = e.length;
        if (dn(e)) {
          var d = vt(e);
          l = d.length;
        }
        if (n >= l)
          return e;
        var h = n - hn(o);
        if (h < 1)
          return o;
        var _ = d ? qt(d, 0, h).join("") : e.slice(0, h);
        if (a === i)
          return _ + o;
        if (d && (h += _.length - h), uo(a)) {
          if (e.slice(h).search(a)) {
            var w, A = _;
            for (a.global || (a = Si(a.source, fe(Vo.exec(a)) + "g")), a.lastIndex = 0; w = a.exec(A); )
              var L = w.index;
            _ = _.slice(0, L === i ? h : L);
          }
        } else if (e.indexOf(nt(a), h) != h) {
          var $ = _.lastIndexOf(a);
          $ > -1 && (_ = _.slice(0, $));
        }
        return _ + o;
      }
      function tg(e) {
        return e = fe(e), e && fl.test(e) ? e.replace(Ko, $c) : e;
      }
      var ng = En(function(e, t, n) {
        return e + (n ? " " : "") + t.toUpperCase();
      }), fo = _a("toUpperCase");
      function hu(e, t, n) {
        return e = fe(e), t = n ? i : t, t === i ? Sc(e) ? xc(e) : _c(e) : e.match(t) || [];
      }
      var pu = ne(function(e, t) {
        try {
          return et(e, i, t);
        } catch (n) {
          return ao(n) ? n : new X(n);
        }
      }), rg = Ct(function(e, t) {
        return ut(t, function(n) {
          n = St(n), $t(e, n, oo(e[n], e));
        }), e;
      });
      function ig(e) {
        var t = e == null ? 0 : e.length, n = N();
        return e = t ? me(e, function(o) {
          if (typeof o[1] != "function")
            throw new lt(y);
          return [n(o[0]), o[1]];
        }) : [], ne(function(o) {
          for (var a = -1; ++a < t; ) {
            var l = e[a];
            if (et(l[0], this, o))
              return et(l[1], this, o);
          }
        });
      }
      function og(e) {
        return Rf(ft(e, O));
      }
      function ho(e) {
        return function() {
          return e;
        };
      }
      function sg(e, t) {
        return e == null || e !== e ? t : e;
      }
      var ag = va(), ug = va(!0);
      function Xe(e) {
        return e;
      }
      function po(e) {
        return Ys(typeof e == "function" ? e : ft(e, O));
      }
      function lg(e) {
        return zs(ft(e, O));
      }
      function cg(e, t) {
        return Zs(e, ft(t, O));
      }
      var fg = ne(function(e, t) {
        return function(n) {
          return Kn(n, e, t);
        };
      }), dg = ne(function(e, t) {
        return function(n) {
          return Kn(e, n, t);
        };
      });
      function _o(e, t, n) {
        var o = xe(t), a = Or(t, o);
        n == null && !(ye(t) && (a.length || !o.length)) && (n = t, t = e, e = this, a = Or(t, xe(t)));
        var l = !(ye(n) && "chain" in n) || !!n.chain, d = Pt(e);
        return ut(a, function(h) {
          var _ = t[h];
          e[h] = _, d && (e.prototype[h] = function() {
            var w = this.__chain__;
            if (l || w) {
              var A = e(this.__wrapped__), L = A.__actions__ = Ve(this.__actions__);
              return L.push({ func: _, args: arguments, thisArg: e }), A.__chain__ = w, A;
            }
            return _.apply(e, Nt([this.value()], arguments));
          });
        }), e;
      }
      function hg() {
        return Ue._ === this && (Ue._ = Wc), this;
      }
      function go() {
      }
      function pg(e) {
        return e = Q(e), ne(function(t) {
          return Js(t, e);
        });
      }
      var _g = qi(me), gg = qi(ms), vg = qi(vi);
      function _u(e) {
        return ji(e) ? mi(St(e)) : Yf(e);
      }
      function mg(e) {
        return function(t) {
          return e == null ? i : en(e, t);
        };
      }
      var bg = ba(), Eg = ba(!0);
      function vo() {
        return [];
      }
      function mo() {
        return !1;
      }
      function wg() {
        return {};
      }
      function yg() {
        return "";
      }
      function Ag() {
        return !0;
      }
      function Sg(e, t) {
        if (e = Q(e), e < 1 || e > oe)
          return [];
        var n = V, o = We(e, V);
        t = N(t), e -= V;
        for (var a = wi(o, t); ++n < e; )
          t(n);
        return a;
      }
      function Lg(e) {
        return Z(e) ? me(e, St) : rt(e) ? [e] : Ve(Ua(fe(e)));
      }
      function Og(e) {
        var t = ++Mc;
        return fe(e) + t;
      }
      var Ig = xr(function(e, t) {
        return e + t;
      }, 0), Tg = Yi("ceil"), $g = xr(function(e, t) {
        return e / t;
      }, 1), Rg = Yi("floor");
      function Cg(e) {
        return e && e.length ? Lr(e, Xe, xi) : i;
      }
      function xg(e, t) {
        return e && e.length ? Lr(e, N(t, 2), xi) : i;
      }
      function Pg(e) {
        return ws(e, Xe);
      }
      function Dg(e, t) {
        return ws(e, N(t, 2));
      }
      function Ug(e) {
        return e && e.length ? Lr(e, Xe, Mi) : i;
      }
      function Mg(e, t) {
        return e && e.length ? Lr(e, N(t, 2), Mi) : i;
      }
      var Fg = xr(function(e, t) {
        return e * t;
      }, 1), Wg = Yi("round"), Bg = xr(function(e, t) {
        return e - t;
      }, 0);
      function Ng(e) {
        return e && e.length ? Ei(e, Xe) : 0;
      }
      function kg(e, t) {
        return e && e.length ? Ei(e, N(t, 2)) : 0;
      }
      return u.after = lp, u.ary = qa, u.assign = Zp, u.assignIn = su, u.assignInWith = Vr, u.assignWith = Jp, u.at = Qp, u.before = Ya, u.bind = oo, u.bindAll = rg, u.bindKey = Xa, u.castArray = wp, u.chain = Ga, u.chunk = Rd, u.compact = Cd, u.concat = xd, u.cond = ig, u.conforms = og, u.constant = ho, u.countBy = Nh, u.create = jp, u.curry = za, u.curryRight = Za, u.debounce = Ja, u.defaults = e_, u.defaultsDeep = t_, u.defer = cp, u.delay = fp, u.difference = Pd, u.differenceBy = Dd, u.differenceWith = Ud, u.drop = Md, u.dropRight = Fd, u.dropRightWhile = Wd, u.dropWhile = Bd, u.fill = Nd, u.filter = Kh, u.flatMap = Vh, u.flatMapDeep = qh, u.flatMapDepth = Yh, u.flatten = Ba, u.flattenDeep = kd, u.flattenDepth = Kd, u.flip = dp, u.flow = ag, u.flowRight = ug, u.fromPairs = Gd, u.functions = u_, u.functionsIn = l_, u.groupBy = Xh, u.initial = Vd, u.intersection = qd, u.intersectionBy = Yd, u.intersectionWith = Xd, u.invert = f_, u.invertBy = d_, u.invokeMap = Zh, u.iteratee = po, u.keyBy = Jh, u.keys = xe, u.keysIn = Ye, u.map = Br, u.mapKeys = p_, u.mapValues = __, u.matches = lg, u.matchesProperty = cg, u.memoize = kr, u.merge = g_, u.mergeWith = au, u.method = fg, u.methodOf = dg, u.mixin = _o, u.negate = Kr, u.nthArg = pg, u.omit = v_, u.omitBy = m_, u.once = hp, u.orderBy = Qh, u.over = _g, u.overArgs = pp, u.overEvery = gg, u.overSome = vg, u.partial = so, u.partialRight = Qa, u.partition = jh, u.pick = b_, u.pickBy = uu, u.property = _u, u.propertyOf = mg, u.pull = Qd, u.pullAll = ka, u.pullAllBy = jd, u.pullAllWith = eh, u.pullAt = th, u.range = bg, u.rangeRight = Eg, u.rearg = _p, u.reject = np, u.remove = nh, u.rest = gp, u.reverse = ro, u.sampleSize = ip, u.set = w_, u.setWith = y_, u.shuffle = op, u.slice = rh, u.sortBy = up, u.sortedUniq = ch, u.sortedUniqBy = fh, u.split = V_, u.spread = vp, u.tail = dh, u.take = hh, u.takeRight = ph, u.takeRightWhile = _h, u.takeWhile = gh, u.tap = Ch, u.throttle = mp, u.thru = Wr, u.toArray = ru, u.toPairs = lu, u.toPairsIn = cu, u.toPath = Lg, u.toPlainObject = ou, u.transform = A_, u.unary = bp, u.union = vh, u.unionBy = mh, u.unionWith = bh, u.uniq = Eh, u.uniqBy = wh, u.uniqWith = yh, u.unset = S_, u.unzip = io, u.unzipWith = Ka, u.update = L_, u.updateWith = O_, u.values = An, u.valuesIn = I_, u.without = Ah, u.words = hu, u.wrap = Ep, u.xor = Sh, u.xorBy = Lh, u.xorWith = Oh, u.zip = Ih, u.zipObject = Th, u.zipObjectDeep = $h, u.zipWith = Rh, u.entries = lu, u.entriesIn = cu, u.extend = su, u.extendWith = Vr, _o(u, u), u.add = Ig, u.attempt = pu, u.camelCase = C_, u.capitalize = fu, u.ceil = Tg, u.clamp = T_, u.clone = yp, u.cloneDeep = Sp, u.cloneDeepWith = Lp, u.cloneWith = Ap, u.conformsTo = Op, u.deburr = du, u.defaultTo = sg, u.divide = $g, u.endsWith = x_, u.eq = bt, u.escape = P_, u.escapeRegExp = D_, u.every = kh, u.find = Gh, u.findIndex = Fa, u.findKey = n_, u.findLast = Hh, u.findLastIndex = Wa, u.findLastKey = r_, u.floor = Rg, u.forEach = Ha, u.forEachRight = Va, u.forIn = i_, u.forInRight = o_, u.forOwn = s_, u.forOwnRight = a_, u.get = lo, u.gt = Ip, u.gte = Tp, u.has = c_, u.hasIn = co, u.head = Na, u.identity = Xe, u.includes = zh, u.indexOf = Hd, u.inRange = $_, u.invoke = h_, u.isArguments = rn, u.isArray = Z, u.isArrayBuffer = $p, u.isArrayLike = qe, u.isArrayLikeObject = Oe, u.isBoolean = Rp, u.isBuffer = Yt, u.isDate = Cp, u.isElement = xp, u.isEmpty = Pp, u.isEqual = Dp, u.isEqualWith = Up, u.isError = ao, u.isFinite = Mp, u.isFunction = Pt, u.isInteger = ja, u.isLength = Gr, u.isMap = eu, u.isMatch = Fp, u.isMatchWith = Wp, u.isNaN = Bp, u.isNative = Np, u.isNil = Kp, u.isNull = kp, u.isNumber = tu, u.isObject = ye, u.isObjectLike = Se, u.isPlainObject = Xn, u.isRegExp = uo, u.isSafeInteger = Gp, u.isSet = nu, u.isString = Hr, u.isSymbol = rt, u.isTypedArray = yn, u.isUndefined = Hp, u.isWeakMap = Vp, u.isWeakSet = qp, u.join = zd, u.kebabCase = U_, u.last = ht, u.lastIndexOf = Zd, u.lowerCase = M_, u.lowerFirst = F_, u.lt = Yp, u.lte = Xp, u.max = Cg, u.maxBy = xg, u.mean = Pg, u.meanBy = Dg, u.min = Ug, u.minBy = Mg, u.stubArray = vo, u.stubFalse = mo, u.stubObject = wg, u.stubString = yg, u.stubTrue = Ag, u.multiply = Fg, u.nth = Jd, u.noConflict = hg, u.noop = go, u.now = Nr, u.pad = W_, u.padEnd = B_, u.padStart = N_, u.parseInt = k_, u.random = R_, u.reduce = ep, u.reduceRight = tp, u.repeat = K_, u.replace = G_, u.result = E_, u.round = Wg, u.runInContext = p, u.sample = rp, u.size = sp, u.snakeCase = H_, u.some = ap, u.sortedIndex = ih, u.sortedIndexBy = oh, u.sortedIndexOf = sh, u.sortedLastIndex = ah, u.sortedLastIndexBy = uh, u.sortedLastIndexOf = lh, u.startCase = q_, u.startsWith = Y_, u.subtract = Bg, u.sum = Ng, u.sumBy = kg, u.template = X_, u.times = Sg, u.toFinite = Dt, u.toInteger = Q, u.toLength = iu, u.toLower = z_, u.toNumber = pt, u.toSafeInteger = zp, u.toString = fe, u.toUpper = Z_, u.trim = J_, u.trimEnd = Q_, u.trimStart = j_, u.truncate = eg, u.unescape = tg, u.uniqueId = Og, u.upperCase = ng, u.upperFirst = fo, u.each = Ha, u.eachRight = Va, u.first = Na, _o(u, function() {
        var e = {};
        return yt(u, function(t, n) {
          de.call(u.prototype, n) || (e[n] = t);
        }), e;
      }(), { chain: !1 }), u.VERSION = c, ut(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(e) {
        u[e].placeholder = u;
      }), ut(["drop", "take"], function(e, t) {
        ie.prototype[e] = function(n) {
          n = n === i ? 1 : Ce(Q(n), 0);
          var o = this.__filtered__ && !t ? new ie(this) : this.clone();
          return o.__filtered__ ? o.__takeCount__ = We(n, o.__takeCount__) : o.__views__.push({
            size: We(n, V),
            type: e + (o.__dir__ < 0 ? "Right" : "")
          }), o;
        }, ie.prototype[e + "Right"] = function(n) {
          return this.reverse()[e](n).reverse();
        };
      }), ut(["filter", "map", "takeWhile"], function(e, t) {
        var n = t + 1, o = n == sn || n == B;
        ie.prototype[e] = function(a) {
          var l = this.clone();
          return l.__iteratees__.push({
            iteratee: N(a, 3),
            type: n
          }), l.__filtered__ = l.__filtered__ || o, l;
        };
      }), ut(["head", "last"], function(e, t) {
        var n = "take" + (t ? "Right" : "");
        ie.prototype[e] = function() {
          return this[n](1).value()[0];
        };
      }), ut(["initial", "tail"], function(e, t) {
        var n = "drop" + (t ? "" : "Right");
        ie.prototype[e] = function() {
          return this.__filtered__ ? new ie(this) : this[n](1);
        };
      }), ie.prototype.compact = function() {
        return this.filter(Xe);
      }, ie.prototype.find = function(e) {
        return this.filter(e).head();
      }, ie.prototype.findLast = function(e) {
        return this.reverse().find(e);
      }, ie.prototype.invokeMap = ne(function(e, t) {
        return typeof e == "function" ? new ie(this) : this.map(function(n) {
          return Kn(n, e, t);
        });
      }), ie.prototype.reject = function(e) {
        return this.filter(Kr(N(e)));
      }, ie.prototype.slice = function(e, t) {
        e = Q(e);
        var n = this;
        return n.__filtered__ && (e > 0 || t < 0) ? new ie(n) : (e < 0 ? n = n.takeRight(-e) : e && (n = n.drop(e)), t !== i && (t = Q(t), n = t < 0 ? n.dropRight(-t) : n.take(t - e)), n);
      }, ie.prototype.takeRightWhile = function(e) {
        return this.reverse().takeWhile(e).reverse();
      }, ie.prototype.toArray = function() {
        return this.take(V);
      }, yt(ie.prototype, function(e, t) {
        var n = /^(?:filter|find|map|reject)|While$/.test(t), o = /^(?:head|last)$/.test(t), a = u[o ? "take" + (t == "last" ? "Right" : "") : t], l = o || /^find/.test(t);
        a && (u.prototype[t] = function() {
          var d = this.__wrapped__, h = o ? [1] : arguments, _ = d instanceof ie, w = h[0], A = _ || Z(d), L = function(re) {
            var se = a.apply(u, Nt([re], h));
            return o && $ ? se[0] : se;
          };
          A && n && typeof w == "function" && w.length != 1 && (_ = A = !1);
          var $ = this.__chain__, U = !!this.__actions__.length, K = l && !$, ee = _ && !U;
          if (!l && A) {
            d = ee ? d : new ie(this);
            var G = e.apply(d, h);
            return G.__actions__.push({ func: Wr, args: [L], thisArg: i }), new ct(G, $);
          }
          return K && ee ? e.apply(this, h) : (G = this.thru(L), K ? o ? G.value()[0] : G.value() : G);
        });
      }), ut(["pop", "push", "shift", "sort", "splice", "unshift"], function(e) {
        var t = cr[e], n = /^(?:push|sort|unshift)$/.test(e) ? "tap" : "thru", o = /^(?:pop|shift)$/.test(e);
        u.prototype[e] = function() {
          var a = arguments;
          if (o && !this.__chain__) {
            var l = this.value();
            return t.apply(Z(l) ? l : [], a);
          }
          return this[n](function(d) {
            return t.apply(Z(d) ? d : [], a);
          });
        };
      }), yt(ie.prototype, function(e, t) {
        var n = u[t];
        if (n) {
          var o = n.name + "";
          de.call(vn, o) || (vn[o] = []), vn[o].push({ name: t, func: n });
        }
      }), vn[Cr(i, le).name] = [{
        name: "wrapper",
        func: i
      }], ie.prototype.clone = ef, ie.prototype.reverse = tf, ie.prototype.value = nf, u.prototype.at = xh, u.prototype.chain = Ph, u.prototype.commit = Dh, u.prototype.next = Uh, u.prototype.plant = Fh, u.prototype.reverse = Wh, u.prototype.toJSON = u.prototype.valueOf = u.prototype.value = Bh, u.prototype.first = u.prototype.head, Un && (u.prototype[Un] = Mh), u;
    }, pn = Pc();
    zt ? ((zt.exports = pn)._ = pn, hi._ = pn) : Ue._ = pn;
  }).call(Fe);
})(Yr, Yr.exports);
var $o = Yr.exports;
const yo = /* @__PURE__ */ Gg($o);
var bo = {}, Eo = {}, er = {};
(function(r) {
  Object.defineProperty(r, "__esModule", { value: !0 }), r.isScrollTopOrBottomAnchor = r.isSamePageAnchorUrl = r.isPageUrl = r.isAbsoluteUrl = r.isDocumentUrl = r.isMailtoUrl = r.isWhatsappLink = r.isPhoneUrl = r.LEGACY_DOCUMENT_URL_REGEXP = r.DOCUMENT_URL_REGEXP = r.ABSOLUTE_URL_REGEXP = r.SAME_PAGE_WITH_ANCHOR_REGEXP = r.PAGE_URL_REGEXP = r.WHATSAPP_LINK_PREFIX = r.PHONE_URL_REGEXP = r.MAILTO_URL_REGEXP = void 0, r.MAILTO_URL_REGEXP = /mailto:([^?]+)(\?(.*))?/, r.PHONE_URL_REGEXP = /^tel:(.*)/, r.WHATSAPP_LINK_PREFIX = "https://api.whatsapp.com/send?phone=", r.PAGE_URL_REGEXP = /^\/([^ ?#]*)?[#]?([^ ?#]*)[?]?(.*)/, r.SAME_PAGE_WITH_ANCHOR_REGEXP = /^#([^ ?]*)[?]?(.*)/, r.ABSOLUTE_URL_REGEXP = /^(http|https):\/\/(.*)/, r.DOCUMENT_URL_REGEXP = /^wix:document:\/\/v1\/(.+)\/(.+)/, r.LEGACY_DOCUMENT_URL_REGEXP = /^document:\/\/(.*)/;
  const s = (S) => r.PHONE_URL_REGEXP.test(S);
  r.isPhoneUrl = s;
  const i = (S) => S.startsWith(r.WHATSAPP_LINK_PREFIX);
  r.isWhatsappLink = i;
  const c = (S) => r.MAILTO_URL_REGEXP.test(S);
  r.isMailtoUrl = c;
  const f = (S) => r.DOCUMENT_URL_REGEXP.test(S) || r.LEGACY_DOCUMENT_URL_REGEXP.test(S);
  r.isDocumentUrl = f;
  const g = (S) => r.ABSOLUTE_URL_REGEXP.test(S);
  r.isAbsoluteUrl = g;
  const y = (S) => r.PAGE_URL_REGEXP.test(S);
  r.isPageUrl = y;
  const v = (S) => r.SAME_PAGE_WITH_ANCHOR_REGEXP.test(S);
  r.isSamePageAnchorUrl = v;
  const E = (S) => ["SCROLL_TO_TOP", "SCROLL_TO_BOTTOM"].includes(S);
  r.isScrollTopOrBottomAnchor = E;
})(er);
var mu;
function Ro() {
  return mu || (mu = 1, function(r) {
    Object.defineProperty(r, "__esModule", { value: !0 }), r.getDocumentLinkProps = r.replaceUrls = r.replacePhoneNumbers = r.replaceEmails = r.getUrlWithProtocol = r.PatternType = void 0, r.findFirstMatch = pe;
    const s = er, i = Co(), c = /(?:\+|\()?\d(?:[-.() \t\u00a0\u1680\u180e\u2000\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]{0,5}\d){6,16}\)?(?![<@)\w])|\*\d{4}(?![<@)\w])/, f = /(?:^|[\s:;,<>])(?:\+|\()?\d(?:[-.() \t\u00a0\u1680\u180e\u2000\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]{0,5}\d){6,16}\)?(?![<@)\w])|\*\d{4}(?![<@)\w])/, g = /(^|[\s:;,<>])([A-Z0-9][A-Z0-9._%+-]+@[A-Z0-9][A-Z0-9.-]+\.[A-Z]{2,})(?=$|[\s:;,<>])/i, y = /(^|[\s:;,<>])((?:https?:\/\/|www\.)[a-z0-9](?:\.?[a-z0-9\-%_])*(?:(?:\\|\/)[a-z0-9\-._~:/\\?#[\]@!$&'()*+,;=%]*)?)(?=$|[^a-z0-9\-._~:/\\?#[\]@!$&'()*+,;=%])/i, v = new RegExp(f, "g"), E = /([A-Z0-9][A-Z0-9._%+-]+@[A-Z0-9][A-Z0-9.-]+\.[A-Z]{2,})/gi, S = /((?:https?:\/\/|www\.)[a-z0-9](?:\.?[a-z0-9\-%_])*(?:(?:\\|\/)[a-z0-9\-._~:/\\?#[\]@!$&'()*+,;=%]*)?)/gi;
    r.PatternType = {
      PHONE: "PHONE",
      MAIL: "MAIL",
      URL: "URL"
    };
    const x = (Y) => {
      const D = Y.match(c);
      return D && {
        key: D[0],
        value: D[0].match(/[*\d]/g).join(""),
        index: D.index,
        pattern: r.PatternType.PHONE
      };
    }, O = (Y) => {
      const D = Y.match(g);
      if (D) {
        const k = D[1].length, j = D[2];
        return {
          key: j,
          value: j,
          index: D.index + k,
          pattern: r.PatternType.MAIL
        };
      } else
        return null;
    }, H = (Y) => Y.toLowerCase().indexOf("http") === 0 ? Y : `http://${Y}`;
    r.getUrlWithProtocol = H;
    const P = (Y) => {
      const D = Y.match(y);
      if (D) {
        const k = D[2], j = D[1].length, _e = (0, r.getUrlWithProtocol)(k);
        return {
          key: k,
          value: _e,
          index: D.index + j,
          pattern: r.PatternType.URL
        };
      } else
        return null;
    }, I = (Y, D) => Y.replace(E, D);
    r.replaceEmails = I;
    const W = [" ", ":", ";", ",", "<", ">"], q = (Y, D) => Y.replace(v, (k) => {
      const j = W.find((_e) => _e === k[0]);
      return j ? j + D(k.substring(1, k.length)) : D(k);
    });
    r.replacePhoneNumbers = q;
    const le = (Y, D) => Y.replace(S, D);
    r.replaceUrls = le;
    const be = {
      [r.PatternType.PHONE]: x,
      [r.PatternType.MAIL]: O,
      [r.PatternType.URL]: P
    };
    function pe(Y, D = {}) {
      if (!Y)
        return null;
      const k = Object.keys(D).filter((_e) => D[_e]).map((_e) => be[_e](Y)).filter((_e) => _e !== null);
      return k[0] ? k.reduce((_e, Je) => Je.index < _e.index ? Je : _e, k[0]) : null;
    }
    const Ee = (Y, D, k = "filesusr.com/", j = "", _e = !1) => {
      const [, Je, Lt] = s.DOCUMENT_URL_REGEXP.exec(Y) || s.LEGACY_DOCUMENT_URL_REGEXP.exec(Y);
      return {
        type: "DocumentLink",
        href: (0, i.resolveDocumentLink)({ docId: Je, name: Lt || "", indexable: !1 }, D, k, j, _e),
        target: "_blank",
        docInfo: {
          docId: Je,
          name: Lt
        }
      };
    };
    r.getDocumentLinkProps = Ee;
  }(Eo)), Eo;
}
var bu;
function Co() {
  return bu || (bu = 1, function(r) {
    Object.defineProperty(r, "__esModule", { value: !0 }), r.hasLinkDataWithCurrentRouteAnchors = r.getDocumentLink = r.resolveDocumentLink = r.getBaseUrlFilesPath = r.resolveDynamicPageLink = r.resolveAddressLink = r.resolveWhatsAppLink = r.resolvePhoneLink = r.resolveEmailLink = r.getPostSignupUrl = r.getImpliedLink = r.convertDataQueryLinksToHtmlAnchors = r.toQueryString = r.ALLOWED_FILE_EXTENSIONS_FROM_USER_DOMAIN = void 0, r.getImpliedLinks = q;
    const s = Ro(), i = er;
    r.ALLOWED_FILE_EXTENSIONS_FROM_USER_DOMAIN = [
      "pdf",
      "docx",
      "zip",
      "pptx",
      "xlsx",
      "doc",
      "txt",
      "rar",
      "xls",
      "ppt",
      "ppsx",
      "epub",
      "rtf",
      "pub",
      "vcf",
      "csv"
    ];
    const c = {
      [s.PatternType.PHONE]: "tel:",
      [s.PatternType.MAIL]: "mailto:",
      [s.PatternType.URL]: ""
    }, f = ({ pattern: T, value: B }) => ({ ...T === s.PatternType.URL ? { target: "_blank" } : {}, href: `${c[T]}${B}` }), g = (T) => {
      switch (T) {
        case "linkPopupId":
          return "data-popupid";
        case "anchorDataId":
          return "data-anchor";
        case "anchorCompId":
          return "data-anchor-comp-id";
        default:
          return T;
      }
    }, y = (T) => Object.keys(T).map((B) => `${B}=${encodeURIComponent(T[B])}`).join("&");
    r.toQueryString = y;
    const v = (T) => T ? (T.linkPopupId && (T.role = "button", T["aria-haspopup"] = "dialog", T.tabindex = "0", delete T.href), Object.keys(T).map((B) => `${g(B)}="${T[B]}"`).join(" ")) : "", E = (T) => T.filter((B) => B !== "").map((B) => B.trim()).join(" "), S = (T, B) => T.replace(/<a ([^>]*)dataquery="#([^"]+)"([^>]*)>/g, (te, oe, R, M) => {
      const V = B[R], ae = E([oe, v(V), M]);
      return `<a${ae ? ` ${ae}` : ""}>`;
    });
    r.convertDataQueryLinksToHtmlAnchors = S;
    const x = (T, B) => {
      const te = (0, s.findFirstMatch)(T, { MAIL: !0, URL: !0, PHONE: B });
      return te && f(te);
    };
    r.getImpliedLink = x;
    const O = (T) => (B) => {
      let te = "";
      const oe = B.trim();
      switch (T) {
        case "email":
          te = `href="mailto:${oe}"`;
          break;
        case "phone":
          te = `href="tel:${oe}"`;
          break;
        case "url":
          te = `href="${(0, s.getUrlWithProtocol)(oe)}" target="_blank"`;
          break;
      }
      return `<a data-auto-recognition="true" ${te}>${B}</a>`;
    }, H = O("email"), P = O("url"), I = O("phone"), W = (T, B) => (te, oe) => {
      if (!oe || !B && oe.startsWith("&lt;"))
        return te;
      let R = (0, s.replaceEmails)(oe, H);
      return R = (0, s.replaceUrls)(R, P), T && (R = (0, s.replacePhoneNumbers)(R, I)), te.split(oe).join(R);
    };
    function q(T, B, { parseEscaped: te } = { parseEscaped: !1 }) {
      return T.replace(/>((?![<>]).+?)<|(?:<a.*>.*<\/a>)/g, W(B, te));
    }
    const le = (T) => {
      const B = "{ifcontext}";
      if (!T.includes(B))
        return T;
      const [, te] = T.split("?"), oe = new URLSearchParams(te);
      let R, M = "";
      return oe.forEach((V, ae) => {
        ae.toLowerCase() === "ifcontext" && (R = V.replace("#", ""), /^[a-zA-Z0-9]+$/.test(R) ? M = T.replace(B, R) : M = T.replace(B, "illegalContextValue"));
      }), M || T;
    };
    r.getPostSignupUrl = le;
    const be = ({ recipient: T, subject: B, body: te, bcc: oe = void 0, cc: R = void 0 }) => {
      const M = Object.entries({ subject: B, body: te, bcc: oe, cc: R }).filter(([, ae]) => ae).map(([ae, we]) => `${ae}=${we}`).join("&"), V = M.length > 0 ? `?${M}` : "";
      return `mailto:${T}${V}`;
    };
    r.resolveEmailLink = be;
    const pe = ({ phoneNumber: T }) => `tel:${T}`;
    r.resolvePhoneLink = pe;
    const Ee = ({ phoneNumber: T }) => {
      const B = T.replace(new RegExp("[+|-]", "g"), "");
      return `${i.WHATSAPP_LINK_PREFIX}${B}`;
    };
    r.resolveWhatsAppLink = Ee;
    const Y = ({ address: T }) => `http://maps.google.com/maps?daddr=${encodeURI(T)}`;
    r.resolveAddressLink = Y;
    const D = (T) => T && T.replace(/^\//, ""), k = (T, { innerRoute: B }, te) => {
      const { prefix: oe } = te, R = D(B);
      return R ? `${T}/${oe}/${R}` : `${T}/${oe}`;
    };
    r.resolveDynamicPageLink = k;
    const j = (T) => {
      const B = new URL(T).hostname;
      return B.endsWith(".wixsite.com") || B.endsWith(".editorx.io") || B.endsWith(".wixstudio.io");
    }, _e = (T, B, te) => {
      const oe = new URL(B).hostname.startsWith("editor.wix");
      return !T || oe || j(B) ? !1 : r.ALLOWED_FILE_EXTENSIONS_FROM_USER_DOMAIN.some((R) => te.endsWith(R));
    }, Je = (T, B, te) => T.endsWith(".pdf") ? te ? "?index=true" : "" : `?${(0, r.toQueryString)({ dn: B })}`, Lt = (T) => {
      const B = T.endsWith("/") ? T : `${T}/`;
      return new URL("_files", B);
    };
    r.getBaseUrlFilesPath = Lt;
    const st = ({ docId: T, name: B, indexable: te }, oe, R, M, V) => {
      const we = _e(V, M, T) ? (0, r.getBaseUrlFilesPath)(M) : `https://${oe}.${R}`, Le = T.includes("/") ? T : `ugd/${T}`, Ae = Le.startsWith("/") ? Le : `/${Le}`, De = Je(T, B, te);
      return `${we}${Ae}${De}`;
    };
    r.resolveDocumentLink = st;
    const Ft = (T, B = "") => `wix:document://v1/${T}/${B}`;
    r.getDocumentLink = Ft;
    const sn = (T) => {
      const B = T?.items || T?.linkList || T?.menuRef || [], te = T?.anchorDataId || T?.link?.anchorDataId || "", oe = T?.innerRoute || T?.link?.innerRoute;
      return ["SCROLL_TO_TOP", "SCROLL_TO_BOTTOM"].includes(te) || oe === "CURRENT_INNER_ROUTE" || B.some((V) => (0, r.hasLinkDataWithCurrentRouteAnchors)(V));
    };
    r.hasLinkDataWithCurrentRouteAnchors = sn;
  }(bo)), bo;
}
var Jg = Fe && Fe.__importDefault || function(r) {
  return r && r.__esModule ? r : { default: r };
};
Object.defineProperty(jn, "__esModule", { value: !0 });
jn.createExternalLinkUtils = void 0;
const Qg = Jg($o), zn = Co(), Mt = er, jg = Ro(), ev = {
  top: "SCROLL_TO_TOP",
  bottom: "SCROLL_TO_BOTTOM"
}, tv = (r) => ({
  subject: encodeURIComponent(r.get("subject") || ""),
  body: encodeURIComponent(r.get("body") || ""),
  bcc: encodeURIComponent(r.get("bcc") || ""),
  cc: encodeURIComponent(r.get("cc") || "")
}), nv = (r) => {
  const [, s, i] = Mt.MAILTO_URL_REGEXP.exec(r), c = tv(new URLSearchParams(i));
  return {
    type: "EmailLink",
    href: (0, zn.resolveEmailLink)({ recipient: s, ...c }),
    target: "_self"
  };
}, rv = (r) => {
  const [, s] = Mt.PHONE_URL_REGEXP.exec(r);
  return {
    type: "PhoneLink",
    href: (0, zn.resolvePhoneLink)({ phoneNumber: s }),
    target: "_self"
  };
}, iv = (r, s = "_blank", i = "noopener") => ({
  type: "ExternalLink",
  href: r,
  target: s,
  rel: i
});
class xo extends Error {
  constructor() {
    super("Unsupported link type"), this.name = "UnsupportedLinkTypeError", Error.captureStackTrace && Error.captureStackTrace(this, xo);
  }
}
const ov = ({ metaSiteId: r = "unknown", isMobileView: s = !1 }) => {
  const i = `https://${r}.filesusr.com/`, c = (f) => f.startsWith(i);
  return {
    isDynamicPage: () => !1,
    isAbsoluteUrl: Mt.isAbsoluteUrl,
    getImpliedLink: (f) => (0, zn.getImpliedLink)(f, s),
    getImpliedLinks: (f, g) => (0, zn.getImpliedLinks)(f, s, g),
    getLink: ({ href: f = "", anchorDataId: g = "", docInfo: y, type: v } = {}) => {
      if ((0, Mt.isMailtoUrl)(f))
        return f;
      if (c(f))
        return (0, zn.getDocumentLink)(y.docId, y.name);
      const E = typeof g == "string" ? g : g?.id;
      return (0, Mt.isScrollTopOrBottomAnchor)(E) ? `#${Qg.default.invert(ev)[E]}` : f;
    },
    getLinkProps: (f, g, y) => {
      if ((0, Mt.isMailtoUrl)(f))
        return nv(f);
      if ((0, Mt.isPhoneUrl)(f))
        return rv(f);
      if ((0, Mt.isAbsoluteUrl)(f))
        return iv(f, g, y);
      if ((0, Mt.isDocumentUrl)(f))
        return (0, jg.getDocumentLinkProps)(f, r);
      throw new xo();
    },
    getLinkUrlFromDataItem: () => {
      throw new Error("getLinkUrlFromDataItem is not implemented");
    }
  };
};
jn.createExternalLinkUtils = ov;
var Uu = {};
(function(r) {
  var s = Fe && Fe.__importDefault || function(I) {
    return I && I.__esModule ? I : { default: I };
  };
  Object.defineProperty(r, "__esModule", { value: !0 }), r.isAbsoluteLink = r.createInternalLinkUtils = void 0;
  const i = s($o), c = Co(), f = er, g = jn, y = Ro(), v = {
    top: "SCROLL_TO_TOP",
    bottom: "SCROLL_TO_BOTTOM"
  }, E = (I, W) => {
    if (I) {
      const [q] = W.replace("#", "/#").split(/[/]+/);
      return Object.values(I).filter((be) => be.prefix === q).length === 1;
    }
    return !1;
  }, S = (I, W) => {
    const q = decodeURIComponent(W), le = `./${q}`;
    if (I[le])
      return [q, ""];
    {
      const [be, ...pe] = W.split("/"), Ee = pe.length > 0 ? `/${pe.join("/")}` : "";
      return [be, Ee];
    }
  }, x = (I, W) => {
    const q = i.default.findKey(I.routes, (le) => le.type === "Dynamic" ? (le.pageIds || []).includes(W) : le.pageId === W);
    if (q)
      return O(q);
    throw new Error(`No url route for pageId: ${W}`);
  }, O = (I) => I.replace(/^\.\//, "/"), H = ({ routingInfo: I, metaSiteId: W, userFileDomainUrl: q, popupPages: le, getCompIdByWixCodeNickname: be, getRoleForCompId: pe, routersConfig: Ee, multilingualInfo: Y, isMobileView: D, isPremiumDomain: k }) => {
    const j = (0, g.createExternalLinkUtils)({ metaSiteId: W, isMobileView: D }), _e = `https://${W}.${q}/`, Je = (R) => le ? le[R] : !1, Lt = (R) => R.startsWith(_e) || k && R.startsWith((0, c.getBaseUrlFilesPath)(I.externalBaseUrl).href), st = (R) => R.replace(I.externalBaseUrl, ""), Ft = (R) => {
      const [, M = "", V = "", ae = ""] = f.PAGE_URL_REGEXP.exec(R), we = M.replace(/\/+$/, ""), Le = new URLSearchParams(ae);
      return !Y?.isOriginalLanguage && Y?.currentLanguage?.resolutionMethod === "QueryParam" && Le.set("lang", Y.currentLanguage.languageCode), { relativePageUrlPrefix: we, anchor: V, queryString: Le.toString() };
    }, sn = (R) => {
      const { relativePageUrlPrefix: M } = Ft(R);
      return E(Ee, M);
    }, T = () => {
      const R = i.default.findKey(I.routes, (M) => M.pageId === I.mainPageId);
      return O(R);
    }, B = (R, M = "_self", V) => {
      const { relativePageUrlPrefix: ae = "", anchor: we = "", queryString: Le } = Ft(R), Ae = v[we] || we;
      if (Je(ae))
        return {
          type: "PageLink",
          href: "",
          target: "_self",
          linkPopupId: ae
        };
      const De = I.externalBaseUrl;
      let Ot, Qe, wt;
      if (E(Ee, ae))
        wt = `./${ae}` === I.relativeUrl, Ot = "DynamicPageLink", Qe = `${De}/${ae}`;
      else {
        const [un, He] = S(I.routes, ae), Wt = I.pagesUriSEOs[un] || un, tr = `./${Wt}`, je = tr === "./" ? { pageId: I.mainPageId } : I.routes[tr], nr = je?.pageId === I.mainPageId;
        Ot = "PageLink", Qe = nr && !He ? De : `${De}/${Wt}${He}`, wt = je && je.pageId === I.pageId;
      }
      const $n = Ae && be && be(Ae), Xt = wt && $n, an = Ae && !Xt;
      return {
        href: `${Qe}${Le ? `?${new URLSearchParams(Le).toString()}` : ""}`,
        target: M,
        rel: V,
        type: Ot,
        // if we have an anchor on the current page, we set the anchor compId
        ...Xt && { anchorCompId: $n },
        // if we have an anchor on another page, we set the anchor data item Id
        ...an && { anchorDataId: Ae }
      };
    }, te = (R) => {
      const [M, V] = R.split("?");
      if (V) {
        const ae = encodeURIComponent(`?${V}`);
        return M ? `${M}${ae}` : ae;
      }
      return M;
    }, oe = {
      AnchorLink: (R) => {
        const { anchorDataId: M, pageId: V } = R, we = (0, f.isScrollTopOrBottomAnchor)(M) ? I.pageId : V.replace(/^#/, ""), Le = M.startsWith("#") ? M : `#${M}`;
        return `${x(I, we)}${Le}`;
      },
      DocumentLink: (R) => {
        const { docId: M, name: V } = R;
        return (0, c.getDocumentLink)(M, V);
      },
      ExternalLink: (R) => {
        const { url: M } = R;
        return M;
      },
      DynamicPageLink: (R) => {
        const { routerId: M, innerRoute: V, anchorDataId: ae = "" } = R, we = `/${Ee[M].prefix}`, Le = V && te(V), Ae = Le ? `/${Le}${ae}` : ae;
        return `${we}${Ae}`;
      },
      TpaPageLink: (R) => {
        const { pageId: M, path: V = "" } = R, ae = M.replace(/^#/, ""), we = I.pageIdToPrefix[ae], Le = I.pages[ae].pageUriSEO, Ae = we ? `/${we}/${Le}` : `/${Le}`, De = te(V);
        if (V.startsWith(Ae))
          return De;
        const Qe = De ? `/${De}` : "";
        return `${Ae}${Qe}`;
      },
      PageLink: (R) => {
        const { pageId: M } = R, V = ((typeof M == "string" ? M : M.id) || "").replace(/^#/, "");
        return Je(V) ? `/${V}` : V === I.mainPageId ? "/" : x(I, V);
      },
      PhoneLink: (R) => (0, c.resolvePhoneLink)(R),
      EmailLink: (R) => (0, c.resolveEmailLink)(R)
    };
    return {
      isDynamicPage: sn,
      isAbsoluteUrl: j.isAbsoluteUrl,
      getImpliedLink: j.getImpliedLink,
      getImpliedLinks: j.getImpliedLinks,
      getLink: ({ href: R = "", linkPopupId: M, anchorCompId: V = "", anchorDataId: ae = "", docInfo: we, type: Le } = {}) => {
        if (M)
          return `/${M}`;
        if (Lt(R))
          return (0, c.getDocumentLink)(we.docId, we.name);
        const Ae = { href: R, linkPopupId: M, anchorDataId: ae, docInfo: we, type: Le };
        if ((0, r.isAbsoluteLink)(W, Ae))
          return j.getLink(Ae);
        const [De] = R.split("?"), Ot = pe?.(V, "wixCode") || ae, Qe = Ot ? `#${Ot}` : "";
        return `${De === I.externalBaseUrl ? T() : st(De)}${Qe}`;
      },
      getLinkProps: (R, M, V) => {
        if ((0, f.isSamePageAnchorUrl)(R)) {
          const we = `${O(I.relativeUrl)}${R}`;
          return B(we, M);
        }
        return (0, f.isPageUrl)(R) ? B(R, M, V) : (0, f.isDocumentUrl)(R) ? (0, y.getDocumentLinkProps)(R, W, q, I.externalBaseUrl, k) : j.getLinkProps(R, M, V);
      },
      getLinkUrlFromDataItem: (R) => {
        const M = oe[R.type];
        if (M)
          return M(R);
        throw new Error("Provided link type is not supported");
      }
    };
  };
  r.createInternalLinkUtils = H;
  const P = (I, { href: W = "", anchorDataId: q = "", type: le }) => {
    const be = typeof q == "string" ? q : q?.id;
    return (0, f.isMailtoUrl)(W) || le === "ExternalLink" || W.startsWith(`https://${I}.filesusr.com/`) || (0, f.isScrollTopOrBottomAnchor)(be);
  };
  r.isAbsoluteLink = P;
})(Uu);
(function(r) {
  var s = Fe && Fe.__createBinding || (Object.create ? function(c, f, g, y) {
    y === void 0 && (y = g);
    var v = Object.getOwnPropertyDescriptor(f, g);
    (!v || ("get" in v ? !f.__esModule : v.writable || v.configurable)) && (v = { enumerable: !0, get: function() {
      return f[g];
    } }), Object.defineProperty(c, y, v);
  } : function(c, f, g, y) {
    y === void 0 && (y = g), c[y] = f[g];
  }), i = Fe && Fe.__exportStar || function(c, f) {
    for (var g in c) g !== "default" && !Object.prototype.hasOwnProperty.call(f, g) && s(f, c, g);
  };
  Object.defineProperty(r, "__esModule", { value: !0 }), i(Zr, r), i(jn, r), i(Uu, r);
})(Du);
var Po = {};
Object.defineProperty(Po, "__esModule", { value: !0 });
var Mu = Po.UrlDefinition = void 0;
const sv = zr;
Mu = Po.UrlDefinition = (0, sv.defineService)("viewer-core/viewer-service-url");
var Do = {};
Object.defineProperty(Do, "__esModule", { value: !0 });
var Fu = Do.EnvironmentDefinition = void 0;
const av = Qn;
Fu = Do.EnvironmentDefinition = (0, av.defineStaticService)("viewer-core/viewer-service-environment");
var Uo = {};
Object.defineProperty(Uo, "__esModule", { value: !0 });
var Wu = Uo.FedopsLoggerDefinition = void 0;
const uv = Qn;
Wu = Uo.FedopsLoggerDefinition = (0, uv.defineStaticService)("viewer-core/fedops-logger");
const lv = {
  DatePicker: "portal-",
  ComboBoxInput: "listModal_",
  RichTextBox: "linkModal_",
  VideoBox: "VideoBox_dummy_"
}, Bu = (r) => `${r}-overrides`;
function h0(r, s) {
  r.forEach((i) => {
    const c = s.props.getOverrides(Bu(i));
    if (c)
      for (const [f, g] of Object.entries(c)) {
        if (!c || !g || s.scopeId)
          return;
        s.createScopedStore(f, g);
      }
  });
}
const Zn = {}, cv = (r, s) => {
  if (s && Zn[r]) {
    const { resolver: i } = Zn[r];
    i && i(s);
  }
}, fv = (r, s) => {
  const i = (c) => async (...f) => (await Zn[r].promise)[c](...f);
  return new Proxy({}, {
    get: (c, f) => {
      if (!Zn[r]) {
        let g;
        const y = new Promise((v) => {
          g = v;
        });
        Zn[r] = { promise: y, resolver: g }, s.updateOverrides(r, { ref: (v) => cv(r, v) });
      }
      return i(f);
    }
  });
}, Ge = void 0, dv = (r, { store: s, createSelector: i, $w: c, getService: f, slots: g = {} }, y, v, E = {}) => {
  const S = (D, k) => s.styles.updateOverrides(D, k), x = () => s.props.getOverrides(r), O = () => (E.children || []).map(c), H = () => c(E.parent), P = x().compId || x().id || "", I = x().fullNameCompType?.split(".").pop() || "", q = `${lv[I] || "portal-"}${P}`, le = f(Du.LinkUtilsDefinition), be = f(Pu), pe = f(Fu), Ee = f(Mu), Y = f(Wu);
  return {
    get props() {
      return x();
    },
    setProps: v,
    restore() {
      s.deletedComponents.updateOverrides(r, !1);
    },
    remove() {
      s.deletedComponents.updateOverrides(r, !0);
    },
    setStyles(D) {
      s.styles.updateOverrides(P, D);
    },
    registerEvent(D, k) {
      return s.subscribeToEvent(r, D, k);
    },
    sdkData: s.getSdkData(r),
    effectsTriggersApi: Ge,
    compId: r,
    // Relevant when App Controller exists and only used by TB (and not by editor-elements)
    // https://github.com/wix-private/editor-elements/blob/27e295166e3604d88dcedf131cab81b7f82db9ba/packages/editor-elements-website/docs/development/component-deep-dive/velo/prop-factories.md#undocumented-apis
    controllerCompId: "",
    createEvent(D) {
      const k = y.value, j = D.compId || s.scopeId ? { type: "COMPONENT_SCOPE", itemId: D.compId || s.scopeId } : { type: "GLOBAL_SCOPE" };
      return {
        ...D,
        target: k,
        context: j
      };
    },
    compRef: fv(r, s.props),
    getChildren: O,
    getSlot: () => g[r],
    handlers: Ge,
    role: Ge,
    runAnimation: Ge,
    create$w: (D) => {
      const k = D?.context;
      if (c.at = (j) => j && j.type === "COMPONENT_SCOPE" && j.itemId !== s.scopeId ? i(s.createScopedStore(j.itemId), f) : c, k && k.type === "COMPONENT_SCOPE" && k.itemId !== s.scopeId) {
        const j = s.props.getOverrides(Bu(r))?.[k.itemId];
        return i(s.createScopedStore(k.itemId, j), f);
      }
      return c;
    },
    metaData: {
      compId: P,
      role: r,
      compType: I,
      isGlobal: () => !1,
      hiddenOnLoad: x().isHidden || !1,
      collapsedOnLoad: x().isCollapsed || !1,
      isRendered: () => !!globalThis.window?.document?.getElementById(P),
      getParent: H,
      getChildren: O,
      wixCodeId: r,
      isRepeaterTemplate: !!s.scopeId
    },
    portal: {
      setStyles: (D) => {
        S(q, D);
      },
      runAnimation: Ge
    },
    getSdkInstance: () => y.value,
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    createSdkState: (D, k = "defaultNS") => {
      const j = { ...D };
      return s.state.set(k, j), [
        j,
        (_e) => {
          Object.assign(j, _e);
        }
      ];
    },
    platformUtils: {
      linkUtils: le,
      essentials: {
        // @ts-expect-error not implemented
        experiments: {
          get: (D) => pe.experiments[D]
        }
      }
    },
    envData: {
      location: {
        externalBaseUrl: Ee.externalBaseUrl
      },
      site: {
        viewMode: pe.viewMode
      },
      router: {
        routingInfo: Ge
      }
    },
    $wScope: Ge,
    styleUtils: be,
    linkUtils: le,
    sessionService: Ge,
    appsPublicApisUtils: Ge,
    biUtils: Ge,
    locationManager: Ge,
    // @ts-expect-error - The essentials object is intentionally missing some properties that are not needed
    essentials: {
      createFedopsLogger: Y.createFedopsLogger
    },
    warmupData: Ge,
    consentPolicyManager: Ge,
    clientSpecMapApi: Ge,
    commonConfig: Ge
  };
}, p0 = (r, s, i, c = {}) => {
  const { store: f, getService: g } = i, y = (O) => {
    f.props.updateOverrides(s, O);
  }, v = () => f.props.getOverrides(s), E = (O) => {
    O instanceof Promise || typeof O.then == "function" ? (console.warn("setProps should not be called with a promise"), O.then(y)) : y(O);
  }, S = { value: null }, x = dv(s, i, S, E, c);
  return S.value = r(v, E, g, x), S.value;
};
function hv(r) {
  return {
    factory: r
  };
}
function $e(r) {
  return typeof r == "number" && !Number.isNaN(r);
}
function Ao(r) {
  return typeof r == "string";
}
function pv(r) {
  return r === !0 || r === !1;
}
function _v(r) {
  return r instanceof Date && !Number.isNaN(r.getTime());
}
function gv(r) {
  return typeof r == "function";
}
function Nu(r) {
  return Array.isArray(r);
}
function vv(r) {
  return typeof r == "object" && r !== null && !Nu(r);
}
function mv(r) {
  return Number.isInteger(r);
}
function Pe(r) {
  return r == null;
}
function Mo(r, s) {
  return s.includes(r);
}
function Fo(r, s) {
  return r > s;
}
function Wo(r, s) {
  return r < s;
}
const J = {
  /* prettier-ignore */
  warning_not_null: ({ propertyName: r, functionName: s }) => `The ${r} parameter that is passed to the ${s} method cannot be set to null.`,
  /* prettier-ignore */
  warning_non_images_in_gallery: ({ galleryId: r }) => `Gallery "${r}" cannot contain items that are not images. To also display video and text, choose a gallery that supports those types.`,
  /* prettier-ignore */
  warning_invalid_effect_name: ({ propertyName: r, compName: s, effectName: i, infoLink: c }) => `The "${r}" function called on "${s}" was executed without the "${i}" effect because it is an invalid effectName value. Read more about effects: "${c}"')`,
  /* prettier-ignore */
  warning_invalid_effect_option: ({ propertyName: r, compName: s, effectName: i, effectOption: c, effectOptionRef: f }) => `The "${r}" function called on "${s}" was executed without the "${i}" effect because it was called with the following invalid effectOptions keys: ${c}. Read more about the effectOptions object: "https://www.wix.com/code/reference/$w.EffectOptions.html#${f}"`,
  /* prettier-ignore */
  warning_effect_options_not_set: ({ propertyName: r, compName: s, infoLink: i }) => `The "${r}" function called on "${s}" was executed without the specified effect options because it was called without an effect. Read more about effects: "${i}"')`,
  /* prettier-ignore */
  warning_invalid_effect_options: ({ propertyName: r, compName: s, effectName: i, wrongProperty: c, wrongValue: f, infoLink: g }) => `The "${r}" function called on "${s}" was executed without the "${i}" effect because it was called with the following invalid effectOptions ${c}: ${f}. Read more about the effectOptions object: "${g}"')`,
  /* prettier-ignore */
  warning_deprecated_effect_name: ({ propertyName: r, compName: s, effectName: i, infoLink: c }) => `The "${r}" function  called on "${s}" was called with the following deprecated effect: "${i}". Read more about effects: "${c}"')`,
  /* prettier-ignore */
  warning_deprecated_effect_with_options: ({ propertyName: r, compName: s, effectName: i, infoLink: c }) => `The "${r}" function  called on "${s}" was executed without the specified effect options because it was called with the following deprecated effect: "${i}". Read more about effects: "${c}"`,
  /* prettier-ignore */
  warning_invalid_type_effect_options: ({ propertyName: r, compName: s, effectName: i, wrongValue: c, infoLink: f }) => `The "${r}" function called on "${s}" was executed without the "${i}" effect because the it was called with the following invalid effectOptions "${c}". The effectOptions must be of type Object. Read more about the effectOptions object: "${f}"'`,
  /* prettier-ignore */
  error_bad_image_format_with_index: ({ propertyName: r, wrongValue: s, index: i }) => `The "${r}" property of the item at index ${i} cannot be set to "${s}". It must be a valid URL starting with "http://", "https://", or "wix:image://".`,
  /* prettier-ignore */
  error_invalid_type_for_file_limit: ({ propertyName: r }) => `The ${r} property is not yet supported for Document or Audio file types.`,
  /* prettier-ignore */
  warning_not_null_for_comp_name: ({ propertyName: r, functionName: s, compName: i }) => `The ${r} parameter of "${i}" that is passed to the ${s} method cannot be set to null.`,
  /* prettier-ignore */
  warning_not_null_with_index: ({ propertyName: r, functionName: s, index: i }) => `The ${r} parameter of item at index ${i} that is passed to the ${s} method cannot be set to null or undefined.`,
  /* prettier-ignore */
  warning_invalid_option: ({ propertyName: r, wrongValue: s, index: i }) => `The ${r} parameter at index ${i} that is passed to the options function cannot be set to ${JSON.stringify(s)}. Options must contain either a non-null value or a non-null label.`,
  /* prettier-ignore */
  warning_duplicates_found: ({ propertyName: r, duplicateOptions: s }) => `The ${r} parameter provided to the options function includes duplicate options. To avoid confusion, these duplicates have been automatically removed: ${JSON.stringify(s)}.`,
  /* prettier-ignore */
  warning_invalid_option_value: ({ propertyName: r, wrongValue: s, functionName: i }) => `The ${r} parameter that is passed to the ${i} cannot be set to ${JSON.stringify(s)}. Ensure that the value is one of the available options in the array.`,
  /* prettier-ignore */
  warning_color_casting_performed: ({ propertyName: r, compName: s, infoLink: i }) => ` The value of "${r}" property of "${s}" expects an rgbColor value, but was set to an rgbaColor value. The color value has been set, but the alpha opacity information has been ignored. Read more about rgbColor values: "${i}"`,
  /* prettier-ignore */
  warning_value_changed: ({ propertyName: r, compName: s, newValue: i, changedProperty: c }) => `The ${r} of ${s} was set to ${i}, which is less than ${s}'s ${c} value. ${s} cannot have a ${c} value which is greater than its ${r} value. The value of ${c} has therefore been set to ${i}.`,
  /* prettier-ignore */
  warning_at_least: ({ propertyName: r, wrongValue: s, minValue: i }) => `The value of ${r} property should not be set to the value ${s}. It should be at least ${i}.`,
  /* prettier-ignore */
  warning_at_most: ({ propertyName: r, wrongValue: s, maxValue: i }) => `The value of ${r} property should not be set to the value ${s}. It should be at most ${i}.`,
  /* prettier-ignore */
  error_mandatory_val: ({ propertyName: r, functionName: s }) => `The ${r} parameter is required for ${s} method.`,
  /* prettier-ignore */
  error_mandatory_multiple_vals: ({ propertyNames: r, functionName: s }) => `The following parameters: ${[...r]}, are required for ${s} method.`,
  /* prettier-ignore */
  error_mandatory_val_with_index: ({ propertyName: r, functionName: s, index: i }) => `The ${r} parameter of item at index ${i} is required for ${s} method.`,
  /* prettier-ignore */
  error_unknown_val: ({ propertyName: r, functionName: s }) => `The ${r} parameter is not allowed for ${s} method.`,
  /* prettier-ignore */
  error_unknown_multiple_vals: ({ propertyNames: r, functionName: s }) => `The following parameters: ${[...r]} are unknown for ${s} method.`,
  /* prettier-ignore */
  error_unknown_val_with_index: ({ propertyName: r, functionName: s, index: i }) => `The ${r} parameter of item at index ${i} is not allowed for ${s} method.`,
  /* prettier-ignore */
  error_unknown_multiple_vals_with_index: ({ propertyNames: r, functionName: s, index: i }) => `The following parameters: ${[...r]} of item at index ${i} are unknown for ${s} method.`,
  /* prettier-ignore */
  error_length_in_range: ({ propertyName: r, functionName: s, value: i, minimum: c, maximum: f }) => `The value of ${r} parameter that is passed to the ${s} method cannot be set to the value "${i}". Its length must be between ${c} and ${f}.`,
  /* prettier-ignore */
  error_length_in_range_with_index: ({ propertyName: r, functionName: s, value: i, minimum: c, maximum: f, index: g }) => `The ${r} parameter of item at index ${g} that is passed to the ${s} method cannot be set to the value "${i}". Its length must be between ${c} and ${f}.`,
  /* prettier-ignore */
  error_length_accept_single_value: ({ propertyName: r, functionName: s, value: i, expectedValue: c }) => `The value of ${r} parameter that is passed to the ${s} method cannot be set to the value "${i}". Its length must be ${c}.`,
  /* prettier-ignore */
  error_length_accept_single_value_with_index: ({ propertyName: r, functionName: s, value: i, expectedValue: c, index: f }) => `The ${r} parameter of item at index ${f} that is passed to the ${s} method cannot be set to the value "${i}". Its length must be ${c}.`,
  /* prettier-ignore */
  error_length_less_than: ({ propertyName: r, functionName: s, value: i, minimum: c }) => `The value of ${r} parameter that is passed to the ${s} method cannot be set to the value "${i}" because its length is shorter than ${c}.`,
  /* prettier-ignore */
  error_length_less_than_with_index: ({ propertyName: r, functionName: s, value: i, minimum: c, index: f }) => `The ${r} parameter of item at index ${f} that is passed to the ${s} method cannot be set to the value "${i}" because its length is shorter than ${c}.`,
  /* prettier-ignore */
  error_length_exceeds: ({ propertyName: r, functionName: s, value: i, maximum: c }) => `The value of ${r} parameter that is passed to the ${s} method cannot be set to the value "${i}" because its length exceeds ${c}.`,
  /* prettier-ignore */
  error_length_exceeds_with_index: ({ propertyName: r, functionName: s, value: i, maximum: c, index: f }) => `The ${r} parameter of item at index ${f} that is passed to the ${s} method cannot be set to the value "${i}" because its length exceeds ${c}.`,
  /* prettier-ignore */
  error_range: ({ propertyName: r, functionName: s, value: i, minimum: c, maximum: f }) => `The value of ${r} parameter that is passed to the ${s} method cannot be set to the value "${i}". It must be between ${c} and ${f}.`,
  /* prettier-ignore */
  error_range_with_index: ({ propertyName: r, functionName: s, value: i, minimum: c, maximum: f, index: g }) => `The ${r} parameter of item at index ${g} that is passed to the ${s} method cannot be set to the value "${i}". It must be between ${c} and ${f}.`,
  /* prettier-ignore */
  error_accept_single_value: ({ propertyName: r, functionName: s, value: i, expectedValue: c }) => `The value of ${r} parameter that is passed to the ${s} method cannot be set to the value "${i}". It must be ${c}.`,
  /* prettier-ignore */
  error_accept_single_value_with_index: ({ propertyName: r, functionName: s, value: i, expectedValue: c, index: f }) => `The ${r} parameter of item at index ${f} that is passed to the ${s} method cannot be set to the value "${i}". It must be ${c}.`,
  /* prettier-ignore */
  error_larger_than: ({ propertyName: r, functionName: s, value: i, minimum: c }) => `The value of ${r} parameter that is passed to the ${s} method cannot be set to the value ${i}. It must be larger than ${c}.`,
  /* prettier-ignore */
  error_at_least: ({ propertyName: r, functionName: s, value: i, minimum: c }) => `The value of ${r} parameter that is passed to the ${s} method cannot be set to the value ${i}. It must be at least ${c}.`,
  /* prettier-ignore */
  error_larger_than_with_index: ({ propertyName: r, functionName: s, value: i, minimum: c, index: f }) => `The value of ${r} parameter of item at ${f} that is passed to the ${s} method cannot be set to the value ${i}. It must be larger than ${c}.`,
  /* prettier-ignore */
  error_less_than: ({ propertyName: r, functionName: s, value: i, maximum: c }) => `The value of ${r} parameter that is passed to the ${s} method cannot be set to the value ${i}. It must be less than ${c}.`,
  /* prettier-ignore */
  error_less_than_with_index: ({ propertyName: r, functionName: s, value: i, maximum: c, index: f }) => `The value of ${r} parameter of item at index ${f} that is passed to the ${s} method cannot be set to the value ${i}. It must be less than ${c}.`,
  /* prettier-ignore */
  error_type: ({ propertyName: r, functionName: s, value: i, expectedType: c }) => `The ${r} parameter that is passed to the ${s} method cannot be set to the value ${i}. It must be of type ${c}.`,
  /* prettier-ignore */
  error_type_with_index: ({ propertyName: r, functionName: s, value: i, expectedType: c, index: f }) => `The ${r} parameter of item at index ${f} that is passed to the ${s} method cannot be set to the value ${i}. It must be of type ${c}.`,
  /* prettier-ignore */
  error_bad_format: ({ propertyName: r, functionName: s, value: i }) => `The value of ${r} parameter that is passed to the ${s} method cannot be set to the value ${i}. Bad format`,
  /* prettier-ignore */
  error_effects_input: ({ functionName: r, wrongEffects: s, allowedEffects: i }) => `Passed  effects: "${s.join('", "')}" to the ${r} method are wrong for this element. Allowed effects are: "${i.join('", "')}".`,
  /* prettier-ignore */
  error_slide_input: ({ propertyName: r, functionName: s, slideShowId: i, value: c, minimum: f, maximum: g }) => `The "${r}" parameter that is passed to the "${s}" method cannot be set to the value ${c}. It must be a slide from the "${i}" slideshow or an index between ${f} and ${g}`,
  /* prettier-ignore */
  error_state_input: ({ propertyName: r, functionName: s, stateBoxId: i, value: c }) => `The "${r}" parameter that is passed to the "${s}" method cannot be set to the value ${c}. It must be a state from the "${i}" statebox`,
  /* prettier-ignore */
  error_bad_format_with_index: ({ propertyName: r, functionName: s, value: i, index: c }) => `The "${r}" property of the item at index ${c} that is passed to the ${s} method cannot be set to "${i}". Bad format`,
  /* prettier-ignore */
  error_bad_format_with_hint: ({ propertyName: r, functionName: s, wrongValue: i, hint: c }) => `The value of ${r} parameter that is passed to the ${s} method cannot be set to the value ${i}. Bad format, must be ${c} format.`,
  /* prettier-ignore */
  error_object_bad_format: ({ keyName: r, propertyName: s, functionName: i, wrongValue: c, message: f }) => `The value of ${r} in ${s} parameter that is passed to the ${i} method cannot be set to the value ${c}. ${f}`,
  /* prettier-ignore */
  error_object_bad_format_with_index: ({ keyName: r, propertyName: s, index: i, functionName: c, wrongValue: f, message: g }) => `The value of ${r} of item at index ${i} in ${s} parameter that is passed to the ${c} method cannot be set to the value ${f}. ${g}`,
  /* prettier-ignore */
  error_bad_svg_format: ({ propertyName: r, value: s }) => `The "${r}" property cannot be set to "${s}". It must be a valid SVG XML string or an SVG source starting with "http://", "https://", or "wix:vector://v1/".`,
  /* prettier-ignore */
  error_target_w_photo: ({ target: r }) => `The target parameter that is passed to the target method cannot be set to the value ${r}. It must be of type from (_blank,_self).`,
  /* prettier-ignore */
  error_invalid_rel: ({ rel: r, validKeywords: s }) => `The rel parameter that is passed to the rel method cannot be set to the value ${r}. It must be a space-separated list of unique keywords (${s.join()}).`,
  /* prettier-ignore */
  error_menu_items_target: ({ target: r, label: s, index: i }) => `The target parameter of the item with the label ${s} nested under the item at index ${i} that is passed to the target method cannot be set to the value ${r}. It must be of type from (_blank, _self).`,
  /* prettier-ignore */
  error_menu_items_id_pattern: ({ id: r, label: s, index: i }) => `The id parameter of the item with the label ${s} nested under the item at index ${i} that is passed to the id method cannot be set to the value ${r}. It must consist of letters, numbers, or dashes.`,
  /* prettier-ignore */
  error_menu_items_id_uniqueness: ({ id: r }) => `The menuItems parameter that is passed to the menuItems method cannot be set to the given value, as the id value ${r} already exists. Each menu item id must be unique.`,
  /* prettier-ignore */
  error_menu_items_depth: ({ labelValue: r, maxLevels: s }) => `The menuItems parameter with the label "${r}" that is passed to the menuItems method cannot be nested at this level. Menus can be ${s} levels deep.`,
  /* prettier-ignore */
  error_menu_items_label: ({ index: r }) => `The value of the label parameter of the item at index ${r} that is passed to the label cannot be set to the value undefined, null, or an empty string, unless a label can be inferred from the item link's page title.`,
  /* prettier-ignore */
  error_bad_menu_item_format: ({ propertyName: r, value: s }) => `The "${r}" property cannot be set to "${s}". It must be a valid URL starting with "http://", "https://", "image://", "wix:image://v1" or "wix:vector://v1/svgshape.v2".`,
  /* prettier-ignore */
  error_bad_menu_item_format_with_index: ({ propertyName: r, value: s, index: i }) => `The "${r}" property of the item at index ${i} cannot be set to "${s}". It must be a valid URL starting with "http://", "https://", "image://", "wix:image://v1" or "wix:vector://v1/svgshape.v2"`,
  /* prettier-ignore */
  error_invalid_css_value: ({ propertyName: r, compName: s, cssProperty: i, exampleFormat: c, infoLink: f }) => ` The "${r}" property of "${s}" was set to an invalid "${i}" value. The value is expected in the following format:"${c}". Read more about "${i}" values: "${f}"`,
  /* prettier-ignore */
  error_invalid_css_value_multiple_expected_formats: ({ propertyName: r, compName: s, cssProperty: i, exampleFormats: c, infoLink: f }) => ` The "${r}" property of "${s}" was set to an invalid "${i}" value. The value is expected in one of the following formats:"${c}". Read more about "${i}" values: "${f}"`,
  /* prettier-ignore */
  error_invalid_location: ({ propertyName: r, index: s, wrongValue: i }) => `The ${r} parameter at index ${s} that is passed to the markers function cannot be set to ${i}. You need to set either location object {longitude, latitude}, or a valid address - placeId.`,
  /* prettier-ignore */
  error_invalid_markers: ({ wrongValue: r }) => `The markers property cannot be set to ${r}. You need to set at least one marker in the array.`,
  /* prettier-ignore */
  error_only_getter: ({ propertyName: r, compType: s }) => `Cannot set property ${r} of ${s} which has only a getter.`,
  /* prettier-ignore */
  error_invalid_url: ({ url: r, type: s, prefix: i }) => `The "src" property cannot be set to "${r}". It must be a valid URL starting with "http://", "https://", or a valid ${s} URL starting with ${i}.`,
  /* prettier-ignore */
  error_supported_link_type_with_index: ({ functionName: r, wrongValue: s, index: i }) => `The link property of item at index ${i} that is passed to the ${r} method cannot be set to the value "${s}" as this is not a supported link type.`,
  /* prettier-ignore */
  error_invalid_target_with_index: ({ functionName: r, wrongValue: s, index: i }) => `The target parameter of item at index ${i} that is passed to the ${r} method cannot be set to the value ${s}. It must be of type from (_blank,_self).`,
  /* prettier-ignore */
  warning_unsupported_function_for_type: ({ functionName: r, type: s }) => `'${r}' is not supported for an element of type: ${s}.`,
  /* prettier-ignore */
  error_bad_iana_timezone: ({ timeZoneIANA: r }) => `Invalid IANA time zone specified: "${r}"`,
  /* prettier-ignore */
  error_invalid_option_fields: ({ propertyName: r, wrongValue: s, fields: i, index: c }) => `The ${r} at index ${c} cannot be set to ${JSON.stringify(s)}. Options must contain at least a non-null ${i[0]} or a non-null ${i[1]}.`,
  /* prettier-ignore */
  error_item_external_link: ({ propertyName: r, functionName: s, index: i }) => `The ${r} of the ${s} parameter of item at index ${i} that is passed to the items method cannot be an external link. It must be a link to a page on your site.`,
  /* prettier-ignore */
  error_unsupported_property_with_hint: ({ propertyName: r, hint: s }) => `The ${r} parameter cannot be set when ${s}`,
  /* prettier-ignore */
  error_item_not_found: ({ propertyName: r, functionName: s, value: i }) => `The ${r} parameter with value ${i} that is passed to the ${s} method is not found.`,
  /* prettier-ignore */
  error_array_length: ({ propertyName: r, functionName: s, value: i, arrayLength: c }) => `The value of ${r} parameter that is passed to the ${s} method cannot be set to the value ${i}. Its length must be at least ${c}.`,
  /* prettier-ignore */
  error_unsupported_chars: ({ propertyName: r, functionName: s }) => `The ${r} parameter that is passed to the ${s} method contains invalid characters.`,
  /* prettier-ignore */
  error_values_not_unique: ({ propertyName: r, functionName: s, wrongValue: i }) => `The ${r} parameter that is passed to the ${s} method cannot be set to ${JSON.stringify(i)}. Options must contain unique value properties.`,
  /* prettier-ignore */
  error_invalid_indice_value: ({ propertyName: r, invalidValue: s }) => `The ${r} parameter cannot be set to ${JSON.stringify(s)}. Ensure that the options array contains at least one option before applying ${r}.`,
  /* prettier-ignore */
  error_none_value_unavailable: ({ propertyName: r, functionName: s, value: i }) => `The ${r} parameter that is passed to the ${s} method cannot be set to ${i} value. Add none item to the ${s} list, or set ${r} to existing value`,
  /* prettier-ignore */
  warning_item_value_not_found: ({ propertyName: r, functionName: s, value: i }) => `The ${r} parameter with value ${i} that is passed to the ${s} method is not found.`,
  /* prettier-ignore */
  error_bad_link_format: ({ url: r, propertyName: s }) => `The ${s} property that is passed to the ${s} method cannot be set to the value "${r}" as this is not a supported link type.`,
  /* prettier-ignore */
  warning_icon_not_animated: ({ propertyName: r }) => `The animated icon is not set in the settings panel, so the ${r} method will not have any effect.`
}, bv = ({ compName: r, functionName: s, propertyName: i, index: c }) => $e(c) ? J.warning_not_null_with_index({
  propertyName: i,
  functionName: s,
  index: c
}) : r ? J.warning_not_null_for_comp_name({
  compName: r,
  functionName: s,
  propertyName: i
}) : J.warning_not_null({ functionName: s, propertyName: i }), Ev = ({ functionName: r, propertyName: s, index: i }) => $e(i) ? J.error_mandatory_val_with_index({
  functionName: r,
  propertyName: s,
  index: i
}) : J.error_mandatory_val({ functionName: r, propertyName: s }), wv = ({ functionName: r, propertyNames: s, index: i }) => s && s.length > 1 ? $e(i) ? J.error_unknown_multiple_vals_with_index({
  functionName: r,
  propertyNames: s,
  index: i
}) : J.error_unknown_multiple_vals({ functionName: r, propertyNames: s }) : $e(i) ? J.error_unknown_val_with_index({
  functionName: r,
  propertyName: s[0],
  index: i
}) : J.error_unknown_val({
  functionName: r,
  propertyName: s[0]
}), yv = ({ functionName: r, propertyName: s, value: i, maximum: c, minimum: f, index: g }) => f && c ? f === c ? $e(g) ? J.error_length_accept_single_value_with_index({
  functionName: r,
  propertyName: s,
  value: i,
  expectedValue: f,
  index: g
}) : J.error_length_accept_single_value({
  functionName: r,
  propertyName: s,
  value: i,
  expectedValue: f
}) : $e(g) ? J.error_length_in_range_with_index({
  functionName: r,
  propertyName: s,
  value: i,
  maximum: c,
  minimum: f,
  index: g
}) : J.error_length_in_range({
  functionName: r,
  propertyName: s,
  value: i,
  maximum: c,
  minimum: f
}) : !f && c ? $e(g) ? J.error_length_exceeds_with_index({
  functionName: r,
  propertyName: s,
  value: i,
  maximum: c,
  index: g
}) : J.error_length_exceeds({
  functionName: r,
  propertyName: s,
  value: i,
  maximum: c
}) : $e(g) ? J.error_length_less_than_with_index({
  functionName: r,
  propertyName: s,
  value: i,
  minimum: f,
  index: g
}) : J.error_length_less_than({
  functionName: r,
  propertyName: s,
  value: i,
  minimum: f
}), ku = ({ functionName: r, propertyName: s, value: i, minimum: c, maximum: f, index: g }) => c && f ? c === f ? $e(g) ? J.error_accept_single_value_with_index({
  functionName: r,
  propertyName: s,
  expectedValue: c,
  value: i,
  index: g
}) : J.error_accept_single_value({
  functionName: r,
  propertyName: s,
  expectedValue: c,
  value: i
}) : $e(g) ? J.error_range_with_index({
  functionName: r,
  propertyName: s,
  value: i,
  maximum: f,
  minimum: c,
  index: g
}) : J.error_range({
  functionName: r,
  propertyName: s,
  value: i,
  maximum: f,
  minimum: c
}) : !c && f ? $e(g) ? J.error_less_than_with_index({
  functionName: r,
  propertyName: s,
  maximum: f,
  value: i,
  index: g
}) : J.error_less_than({
  functionName: r,
  propertyName: s,
  maximum: f,
  value: i
}) : $e(g) ? J.error_larger_than_with_index({
  functionName: r,
  propertyName: s,
  value: i,
  minimum: c,
  index: g
}) : J.error_larger_than({
  functionName: r,
  propertyName: s,
  value: i,
  // TS should know that minimum can't be undefined here
  minimum: c
}), Ku = ({ functionName: r, propertyName: s, types: i, value: c, index: f }) => {
  const g = i.map((y) => y === "nil" ? "null" : y).join(",");
  return $e(f) ? J.error_type_with_index({
    functionName: r,
    index: f,
    propertyName: s,
    value: c,
    expectedType: g
  }) : J.error_type({
    functionName: r,
    propertyName: s,
    value: c,
    expectedType: g
  });
}, Bo = ({ functionName: r, propertyName: s, value: i, enum: c, index: f }) => {
  const g = `from (${c.join(",")})`;
  return $e(f) ? J.error_type_with_index({
    functionName: r,
    propertyName: s,
    value: i,
    expectedType: g,
    index: f
  }) : J.error_type({
    functionName: r,
    propertyName: s,
    value: i,
    expectedType: g
  });
}, Av = ({ functionName: r, propertyName: s, value: i, index: c }) => $e(c) ? J.error_bad_format_with_index({
  functionName: r,
  propertyName: s,
  value: i,
  index: c
}) : J.error_bad_format({ functionName: r, propertyName: s, value: i }), Sv = (r) => "aria" + r.charAt(0).toUpperCase() + r.slice(1);
function on(r, s) {
  const { modifyAriaSourceKeys: i } = s ?? {};
  return (c) => {
    const f = {};
    for (let g = 0; g < r.length; g++) {
      const y = r[g](c), v = Object.keys(y);
      for (let E = 0; E < v.length; E++) {
        const S = v[E], x = Object.getOwnPropertyDescriptor(y, S);
        Object.defineProperty(f, i && x.get ? Sv(S) : S, x);
      }
    }
    return f;
  };
}
const Lv = "Wix code SDK error:", Ov = "Wix code SDK warning:", _t = (r) => {
  console.error(`${Lv} ${r}`);
}, On = (r) => {
  console.warn(`${Ov} ${r}`);
};
function Iv(r, s, i, c) {
  const { minimum: f, maximum: g, enum: y } = s;
  return $e(r) ? y && !Mo(r, y) ? (i(Bo({
    value: r,
    enum: y,
    ...c
  }), { ...c, value: r }), ue.Invalid) : $e(f) && Wo(r, f) || $e(g) && Fo(r, g) ? (i(ku({
    value: r,
    minimum: f,
    maximum: g,
    ...c
  }), { ...c, value: r }), ue.Invalid) : ue.Valid : ue.InvalidType;
}
function Tv(r, s, i, c) {
  const { minimum: f, maximum: g, enum: y } = s;
  return mv(r) ? y && !Mo(r, y) ? (i(Bo({
    value: r,
    enum: y,
    ...c
  }), { ...c, value: r }), ue.Invalid) : $e(f) && Wo(r, f) || $e(g) && Fo(r, g) ? (i(ku({
    value: r,
    minimum: f,
    maximum: g,
    ...c
  }), { ...c, value: r }), ue.Invalid) : ue.Valid : ue.InvalidType;
}
function $v(r, s, i, c) {
  const { minLength: f, maxLength: g, enum: y, pattern: v } = s;
  return Ao(r) ? y && !Mo(r, y) ? (i(Bo({
    value: r,
    enum: y,
    ...c
  }), { ...c, value: r }), ue.Invalid) : f && Wo(r.length, f) || g && Fo(r.length, g) ? (i(yv({
    value: r,
    minimum: f,
    maximum: g,
    ...c
  }), { ...c, value: r }), ue.Invalid) : v && !new RegExp(v).test(r) ? (i(Av({
    value: r,
    ...c
  }), { ...c, value: r }), ue.Invalid) : ue.Valid : ue.InvalidType;
}
function Rv(r) {
  return pv(r) ? ue.Valid : ue.InvalidType;
}
function Cv(r) {
  return _v(r) ? ue.Valid : ue.InvalidType;
}
function xv(r) {
  return Pe(r) ? ue.Valid : ue.InvalidType;
}
function Pv(r) {
  return gv(r) ? ue.Valid : ue.InvalidType;
}
function Eu(r) {
  return Array.isArray(r);
}
function Dv(r, s, i, c, f, g = !1) {
  if (!Nu(r))
    return ue.InvalidType;
  let y = ue.Valid;
  if (s.items) {
    const v = Eu(s.items) ? Math.min(r.length, s.items.length) : r.length;
    for (let E = 0; E < v; E++) {
      const S = r[E];
      let x, O;
      Eu(s.items) ? (x = s.items[E], O = s.items[E].name) : (x = s.items, O = s.name), i(S, x, {
        functionName: f.functionName,
        propertyName: O || f.propertyName,
        index: g ? void 0 : E
      }) || (y = ue.Invalid);
    }
  }
  return y;
}
const wu = Object.prototype.hasOwnProperty, yu = Object.getOwnPropertyNames, Uv = () => {
};
function Gu(r, s, i, c, f, g) {
  if (!vv(r))
    return ue.InvalidType;
  if (s.oneOf)
    return s.oneOf.map((v) => Gu(r, v, i, Uv, f, g)).filter((v) => v === ue.Valid).length === 1 ? ue.Valid : ue.Invalid;
  if (s.required) {
    for (let v = 0; v < s.required.length; v++)
      if (!wu.call(r, s.required[v]))
        return c(Ev({
          functionName: g.functionName,
          index: g.index,
          propertyName: s.required[v]
        }), { ...g, value: r }), ue.Invalid;
  }
  const y = yu(s.properties ?? {});
  if (s.additionalProperties === !1) {
    const v = yu(r).filter((E) => !y.includes(E));
    if (v.length) {
      const E = wv({
        functionName: g.functionName,
        index: g.index,
        propertyNames: v
      });
      return c(E), ue.Invalid;
    }
  }
  for (let v = 0; v < y.length; v++) {
    const E = y[v];
    if (wu.call(r, E)) {
      const S = s.properties[E], x = r[E];
      if (!i(x, S, {
        functionName: g.functionName,
        index: g.index,
        propertyName: E
      }))
        return ue.Invalid;
    }
  }
  return ue.Valid;
}
const ue = {
  Valid: "valid",
  Invalid: "invalid",
  InvalidType: "invalid-type"
};
function So({ reportError: r, reportWarning: s }, i, { suppressIndexErrors: c = !1 } = {}) {
  function f(v, E, S) {
    return g(v, E, {
      functionName: S,
      propertyName: S,
      /**
       * This intentional? In such a case all errors related to "index"
       * will never be fired
       */
      index: void 0
    });
  }
  function g(v, E, S) {
    E.warnIfNil && Pe(v) && s(bv({
      ...S,
      compName: i
    }), { ...S, value: v });
    let x = 0;
    for (; x < E.type.length; x++) {
      const O = y[E.type[x]], H = O(v, E, S);
      if (H !== ue.InvalidType)
        return H === ue.Valid;
    }
    return x === E.type.length && r(Ku({
      value: v,
      types: E.type,
      ...S
    }), { ...S, value: v }), !1;
  }
  const y = {
    object: (v, E, S) => Gu(v, E, g, r, s, S),
    array: (v, E, S) => Dv(v, E, g, r, S, c),
    number: (v, E, S) => Iv(v, E, r, S),
    integer: (v, E, S) => Tv(v, E, r, S),
    string: (v, E, S) => $v(v, E, r, S),
    boolean: (v) => Rv(v),
    date: (v) => Cv(v),
    nil: (v) => xv(v),
    function: (v) => Pv(v)
  };
  return f;
}
function Xr(r, { suppressIndexErrors: s = !1 } = {}) {
  return So({ reportError: _t, reportWarning: On }, r, {
    suppressIndexErrors: s
  });
}
function Te(r, s, i = {}) {
  return (c) => {
    const f = r(c), g = Xr(c.metaData.role), y = Xr(c.metaData.role, {
      suppressIndexErrors: !0
    });
    return Object.keys(f).reduce((E, S) => {
      const x = Object.getOwnPropertyDescriptor(f, S), O = {
        // retrieve value from sdk
        enumerable: !0,
        configurable: !0
      };
      return x.value ? typeof x.value == "function" ? O.value = (...H) => {
        const P = s.properties[S] && s.properties[S].args, I = i[S];
        let W = !0;
        return P && (W = y(H, { type: ["array"], items: P }, S)), W && I && (W = I.every((q) => q(H, c))), W ? x.value(...H) : void 0;
      } : O.value = x.value : (x.get && (O.get = () => f[S]), x.set && (O.set = (H) => {
        const P = i[S];
        let I = !0;
        s.properties[S] && (I = g(H, s.properties[S], S)), I && P && (I = P.every((W) => W(H, c))), I && (f[S] = H);
      })), Object.defineProperty(E, S, O), E;
    }, {});
  };
}
const Hu = ({ handlers: r, metaData: s }) => {
  const { compId: i, connection: c, compType: f, isGlobal: g, getParent: y, role: v, wixCodeId: E } = s, S = `$w.${f}`;
  return {
    get id() {
      return E || v;
    },
    get role() {
      return v;
    },
    get connectionConfig() {
      return c?.config;
    },
    get uniqueId() {
      return i;
    },
    get parent() {
      return y();
    },
    get global() {
      return g();
    },
    get type() {
      return S;
    },
    scrollTo() {
      return new Promise((x) => r.scrollToComponent(i, x));
    },
    toJSON() {
      return { id: v, type: S, global: g() };
    }
  };
}, Sn = (r, s) => {
  const i = /^[a-zA-Z_-][a-zA-Z0-9_-]*$/;
  return typeof r != "string" ? (Mv(r, s, "className", "string"), !1) : i.test(r) ? !0 : (Wv(r, s), !1);
}, Mv = (r, s, i, c) => {
  _t(J.error_type({
    propertyName: r,
    functionName: s,
    value: i,
    expectedType: c
  }));
}, Fv = (r, s) => {
  _t(J.error_mandatory_multiple_vals({
    propertyNames: r,
    functionName: s
  }));
}, qr = (r, s) => {
  _t(J.error_mandatory_val({
    propertyName: r,
    functionName: s
  }));
}, Wv = (r, s) => {
  _t(J.error_unsupported_chars({
    propertyName: r,
    functionName: s
  }));
}, Vu = (r) => {
  const { setProps: s, props: i } = r;
  return {
    customClassList: {
      get value() {
        return i.customClassNames ? i.customClassNames?.join(" ") : "";
      },
      values() {
        return i.customClassNames ? i.customClassNames : [];
      },
      add(...c) {
        const f = i.customClassNames ? new Set(i.customClassNames) : /* @__PURE__ */ new Set([]);
        if (!c.length) {
          qr("className", "customClassList.add");
          return;
        }
        for (const g of c)
          if (Sn(g, "customClassList.add"))
            f.add(g);
          else
            return;
        s({ customClassNames: Array.from(f) });
      },
      remove(...c) {
        if (!c.length) {
          qr("className", "customClassList.remove");
          return;
        }
        const f = new Set(i.customClassNames);
        for (const g of c)
          if (Sn(g, "customClassList.remove"))
            f.delete(g);
          else
            return;
        s({ customClassNames: Array.from(f) });
      },
      contains(c) {
        if (!c) {
          qr("className", "customClassList.contains");
          return;
        }
        if (Sn(c, "customClassList.contains"))
          return i.customClassNames ? i.customClassNames.includes(c) : !1;
      },
      replace(c, f) {
        return !c || !f ? (Fv(["currentClassName, newClassName"], "customClassList.replace"), !1) : Sn(f, "customClassList.replace") && Sn(c, "customClassList.replace") && this.contains(c) ? (this.remove(c), this.add(f), !0) : !1;
      },
      toggle(c) {
        return c ? Sn(c, "customClassList.toggle") ? this.contains(c) ? (this.remove(c), !1) : (this.add(c), !0) : !1 : (qr("className", "customClassList.toggle"), !1);
      }
    }
  };
}, F = {
  CLICK: "click",
  DBL_CLICK: "dblClick",
  MOUSE_IN: "mouseenter",
  MOUSE_OUT: "mouseleave",
  CHANGE: "change",
  BLUR: "blur",
  FOCUS: "focus",
  IMAGE_CHANGED: "imageChanged",
  IMAGE_EXPANDED: "imageExpanded",
  ON_INPUT: "onInput",
  ITEM_CLICKED: "itemClicked",
  CELL_SELECT: "cellSelect",
  CELL_EDIT: "cellEdit",
  ROW_SELECT: "rowSelect",
  FETCH_DATA: "fetchData",
  DATA_CHANGE: "dataChange",
  ON_TIMEOUT: "onTimeout",
  ON_VERIFY: "onVerified",
  ON_ERROR: "onError",
  ON_PLAY: "onPlay",
  ON_PAUSE: "onPause",
  ON_PROGRESS: "onProgress",
  ON_ENDED: "onEnded",
  AUTOPLAY_OFF: "autoplayOff",
  AUTOPLAY_ON: "autoplayOn",
  PLAY_ENDED: "playEnded",
  PLAY_PROGRESS: "playProgress",
  KEY_PRESS: "keyPress",
  KEY_UP: "keyUp",
  KEY_DOWN: "keyDown",
  SCREEN_IN: "screenIn",
  VIEWPORT_ENTER: "viewportEnter",
  VIEWPORT_LEAVE: "viewportLeave",
  SCROLL: "scroll",
  VALIDATE: "validate",
  SET_CUSTOM_VALIDITY: "setCustomValidity",
  SYNC_VALIDATION_DATA: "syncValidationData",
  UPDATE_VALIDITY_INDICATION: "updateValidityIndication",
  MESSAGE: "message",
  UPLOAD_COMPLETE: "uploadComplete",
  ITEM_READY: "itemReady",
  ITEM_REMOVED: "itemRemoved",
  TAG_CLICK: "tagClick",
  QUICK_ACTION_BAR_ITEM_CLICKED: "quickActionBarItemClicked",
  GOOGLE_MAP_MARKER_CLICKED: "markerClicked",
  GOOGLE_MAP_CLICKED: "mapClicked",
  ICON_MOUSE_IN: "iconMouseIn",
  ON_STATE_CHANGE: "onStateChange",
  ITEM_MOUSE_IN: "itemMouseIn",
  ITEM_MOUSE_OUT: "itemMouseOut",
  ITEM_MOUSE_CLICK: "itemMouseClick",
  ITEM_MOUSE_DOUBLE_CLICK: "itemMouseDblClick",
  ON_COLOR_CHANGE: "onColorChange",
  ON_FONT_CHANGE: "onFontChange",
  ON_OPACITY_CHANGE: "onOpacityChange"
}, Bv = {
  [F.CLICK]: "onClick",
  [F.DBL_CLICK]: "onDblClick",
  [F.MOUSE_IN]: "onMouseIn",
  [F.MOUSE_OUT]: "onMouseOut",
  [F.CHANGE]: "onChange",
  [F.ON_INPUT]: "onInput",
  [F.BLUR]: "onBlur",
  [F.FOCUS]: "onFocus",
  [F.IMAGE_CHANGED]: "onCurrentItemChanged",
  [F.IMAGE_EXPANDED]: void 0,
  [F.ITEM_CLICKED]: "onItemClicked",
  [F.CELL_SELECT]: "onCellSelect",
  [F.CELL_EDIT]: void 0,
  [F.ROW_SELECT]: "onRowSelect",
  [F.FETCH_DATA]: void 0,
  [F.DATA_CHANGE]: "onDataChange",
  [F.ON_TIMEOUT]: "onTimeout",
  [F.ON_VERIFY]: "onVerified",
  [F.ON_ERROR]: "onError",
  [F.ON_PLAY]: "onPlay",
  [F.ON_PAUSE]: "onPause",
  [F.ON_PROGRESS]: "onProgress",
  [F.ON_ENDED]: "onEnded",
  [F.AUTOPLAY_OFF]: "onPause",
  [F.AUTOPLAY_ON]: "onPlay",
  [F.PLAY_ENDED]: void 0,
  [F.PLAY_PROGRESS]: void 0,
  [F.KEY_PRESS]: "onKeyPress",
  [F.KEY_UP]: "onKeyUp",
  [F.KEY_DOWN]: "onKeyDown",
  [F.SCREEN_IN]: void 0,
  [F.VIEWPORT_ENTER]: "onViewportEnter",
  [F.VIEWPORT_LEAVE]: "onViewportLeave",
  [F.SCROLL]: void 0,
  [F.VALIDATE]: void 0,
  [F.SET_CUSTOM_VALIDITY]: void 0,
  [F.SYNC_VALIDATION_DATA]: void 0,
  [F.UPDATE_VALIDITY_INDICATION]: void 0,
  [F.MESSAGE]: "onMessage",
  [F.UPLOAD_COMPLETE]: void 0,
  [F.ITEM_READY]: "onItemReady",
  [F.ITEM_REMOVED]: "onItemRemoved",
  [F.TAG_CLICK]: void 0,
  [F.QUICK_ACTION_BAR_ITEM_CLICKED]: "onItemClicked",
  [F.GOOGLE_MAP_MARKER_CLICKED]: "onMarkerClicked",
  [F.GOOGLE_MAP_CLICKED]: "onMapClicked",
  [F.ICON_MOUSE_IN]: void 0,
  [F.ON_STATE_CHANGE]: "onStateChange",
  [F.ITEM_MOUSE_IN]: "onItemMouseIn",
  [F.ITEM_MOUSE_OUT]: "onItemMouseOut",
  [F.ITEM_MOUSE_CLICK]: "onItemClick",
  [F.ITEM_MOUSE_DOUBLE_CLICK]: "onItemDblClick",
  [F.ON_COLOR_CHANGE]: "onColorChange",
  [F.ON_FONT_CHANGE]: "onFontChange",
  [F.ON_OPACITY_CHANGE]: "onOpacityChange"
}, Nv = {
  dblclick: "dblClick",
  keydown: "keyPress",
  input: "onInput"
}, kv = (r) => {
  const { target: s, type: i, context: c } = r;
  return { target: s, type: Nv[i] ?? i, context: c };
}, Kv = (r) => {
  const { clientX: s, clientY: i, pageX: c, pageY: f, screenX: g, screenY: y, nativeEvent: v } = r, { offsetX: E, offsetY: S } = v;
  return {
    clientX: s,
    clientY: i,
    pageX: c,
    pageY: f,
    screenX: g,
    screenY: y,
    offsetX: E,
    offsetY: S
  };
}, Gv = (r, s, i) => Xr(i)(r, {
  type: ["function"]
}, s), qu = {
  onMouseEnter: "onMouseIn",
  onMouseLeave: "onMouseOut"
}, Au = (r) => r.replace(/^on/i, ""), Hv = (r) => Object.entries(qu).find(([i, c]) => Au(c.toLowerCase()) === Au(r.toLowerCase()))?.[0] ?? r, Yu = (r) => r.createSdkState({ listeners: [] }, "eventListeners"), Lo = (r, s, i, c) => {
  const { create$w: f, createEvent: g, registerEvent: y, getSdkInstance: v, metaData: E } = s, S = qu[r] ?? r;
  if (!Gv(i, S, E.role))
    return v();
  const [x, O] = Yu(s), H = y(
    r,
    /**
     * `eventPayload` adds extra data into native React events
     * which will be sanitized by the platform
     */
    (I, W) => {
      const q = g({ type: I.type, compId: I.compId }), le = f({ context: q.context }), be = c?.({
        componentEvent: I,
        eventPayload: W
      });
      i({
        ...kv(q),
        ...be
      }, le);
    }
  ), P = {
    eventName: r,
    compId: E.compId,
    cb: i,
    unregister: H
  };
  return O({
    listeners: [...x.listeners, P]
  }), v();
}, Vv = (r, s) => {
  const i = Hv(Bv[s] ?? s);
  return r.toLowerCase() === i.toLowerCase();
}, qv = (r, s, i) => {
  const { metaData: c, getSdkInstance: f } = s, [g, y] = Yu(s), v = g.listeners.filter((E) => Vv(E.eventName, r) && E.cb === i && E.compId === c.compId);
  for (const E of v)
    E.unregister();
  return y({
    listeners: g.listeners.filter((E) => !v.includes(E))
  }), f();
}, Su = (r, s, i, c) => Lo(r, s, i, ({ componentEvent: f, eventPayload: g }) => ({
  ...Kv(f),
  ...g && c?.(g)
})), Xu = (r) => (s) => {
  const { metaData: i, getSdkInstance: c, create$w: f, createEvent: g } = s, y = (v, E) => Xr(i.role)(v, {
    type: ["function"]
  }, E);
  return {
    onViewportEnter: (v) => y(v, "onViewportEnter") ? (r?.("onViewportEnter", () => {
      const E = g({ type: "viewportEnter" }), S = f();
      v(E, S);
    }), Lo("onViewportEnter", s, v)) : c(),
    onViewportLeave: (v) => y(v, "onViewportLeave") ? (r?.("onViewportLeave", () => {
      const E = g({ type: "viewportLeave" }), S = f();
      v(E, S);
    }), Lo("onViewportLeave", s, v)) : c()
  };
}, z = {
  duration: 1200,
  delay: 0
}, Lu = {
  arc: {
    ...z,
    direction: "left"
  },
  bounce: {
    ...z,
    direction: "topLeft",
    intensity: "medium"
  },
  puff: {
    ...z
  },
  zoom: {
    ...z
  },
  fade: {
    ...z
  },
  flip: {
    ...z,
    direction: "right"
  },
  float: {
    ...z,
    direction: "right"
  },
  fly: {
    ...z,
    direction: "right"
  },
  fold: {
    ...z,
    direction: "left"
  },
  glide: {
    ...z,
    angle: 0,
    distance: 0
  },
  roll: {
    ...z,
    direction: "left"
  },
  slide: {
    ...z,
    direction: "left"
  },
  spin: {
    ...z,
    direction: "cw",
    cycles: 5
  },
  turn: {
    ...z,
    direction: "right"
  },
  ArcIn: {
    ...z,
    direction: "right"
  },
  ArcOut: {
    ...z,
    direction: "right"
  },
  BounceIn: {
    ...z,
    direction: "topLeft",
    intensity: "medium"
  },
  BounceOut: {
    ...z,
    direction: "topLeft",
    intensity: "medium"
  },
  ExpandIn: {
    ...z,
    direction: "right"
  },
  CollapseOut: {
    ...z
  },
  Conceal: {
    ...z,
    direction: "right"
  },
  Reveal: {
    ...z,
    direction: "left"
  },
  FadeIn: {
    ...z
  },
  FadeOut: {
    ...z
  },
  FlipIn: {
    ...z,
    direction: "left"
  },
  FlipOut: {
    ...z,
    direction: "left"
  },
  FloatIn: {
    ...z,
    direction: "right"
  },
  FloatOut: {
    ...z,
    direction: "right"
  },
  FlyIn: {
    ...z,
    direction: "right"
  },
  FlyOut: {
    ...z,
    direction: "right"
  },
  FoldIn: {
    ...z,
    direction: "left"
  },
  FoldOut: {
    ...z,
    direction: "left"
  },
  GlideIn: {
    ...z,
    angle: 0,
    distance: 150
  },
  GlideOut: {
    ...z,
    angle: 0,
    distance: 150
  },
  DropIn: {
    ...z
  },
  PopOut: {
    ...z
  },
  SlideIn: {
    ...z,
    direction: "left"
  },
  SlideOut: {
    ...z,
    direction: "left"
  },
  SpinIn: {
    ...z,
    direction: "cw",
    cycles: 2
  },
  SpinOut: {
    ...z,
    direction: "cw",
    cycles: 2
  },
  TurnIn: {
    ...z,
    direction: "right"
  },
  TurnOut: {
    ...z,
    direction: "right"
  }
}, Oo = {
  HIDE: {
    suffix: "out",
    deprecatedValues: [
      "ArcOut",
      "BounceOut",
      "CollapseOut",
      "Conceal",
      "FadeOut",
      "FlipOut",
      "FloatOut",
      "FlyOut",
      "FoldOut",
      "GlideOut",
      "PopOut",
      "SlideOut",
      "SpinOut",
      "TurnOut"
    ]
  },
  SHOW: {
    suffix: "in",
    deprecatedValues: [
      "ArcIn",
      "BounceIn",
      "DropIn",
      "ExpandIn",
      "FadeIn",
      "FlipIn",
      "FloatIn",
      "FlyIn",
      "FoldIn",
      "GlideIn",
      "Reveal",
      "SlideIn",
      "SpinIn",
      "TurnIn"
    ]
  }
}, Jn = (r) => `https://www.wix.com/corvid/reference/$w/hiddenmixin/${r}`, ze = { type: ["number", "nil"], minimum: 0, maximum: 4e3 }, Ze = { type: ["number", "nil"], minimum: 0, maximum: 8e3 }, Ln = {
  type: ["string", "nil"],
  enum: ["left", "right", "top", "bottom"]
}, zu = {
  arc: {
    type: ["object"],
    properties: {
      duration: ze,
      delay: Ze,
      direction: {
        type: ["string", "nil"],
        enum: ["left", "right"]
      }
    }
  },
  bounce: {
    type: ["object"],
    properties: {
      duration: ze,
      delay: Ze,
      direction: {
        type: ["string", "nil"],
        enum: ["topLeft", "topRight", "bottomRight", "bottomLeft", "center"]
      },
      intensity: {
        type: ["string", "nil"],
        enum: ["soft", "medium", "hard"]
      }
    }
  },
  puff: {
    type: ["object"],
    properties: {
      duration: ze,
      delay: Ze
    }
  },
  zoom: {
    type: ["object"],
    properties: {
      duration: ze,
      delay: Ze
    }
  },
  fade: {
    type: ["object"],
    properties: {
      duration: ze,
      delay: Ze
    }
  },
  flip: {
    type: ["object"],
    properties: {
      duration: ze,
      delay: Ze,
      direction: Ln
    }
  },
  float: {
    type: ["object"],
    properties: {
      duration: ze,
      delay: Ze,
      direction: Ln
    }
  },
  fly: {
    type: ["object"],
    properties: {
      duration: ze,
      delay: Ze,
      direction: Ln
    }
  },
  fold: {
    type: ["object"],
    properties: {
      duration: ze,
      delay: Ze,
      direction: Ln
    }
  },
  glide: {
    type: ["object"],
    properties: {
      duration: ze,
      delay: Ze,
      angle: {
        type: ["number", "nil"],
        minimum: 0,
        maximum: 360
      },
      distance: {
        type: ["number", "nil"],
        minimum: 0,
        maximum: 300
      }
    }
  },
  roll: {
    type: ["object"],
    properties: {
      duration: ze,
      delay: Ze,
      direction: Ln
    }
  },
  slide: {
    type: ["object"],
    properties: {
      duration: ze,
      delay: Ze,
      direction: Ln
    }
  },
  spin: {
    type: ["object"],
    properties: {
      duration: ze,
      delay: Ze,
      direction: {
        type: ["string", "nil"],
        enum: ["cw", "ccw"]
      },
      cycles: {
        type: ["number", "nil"],
        minimum: 1,
        maximum: 15
      }
    }
  },
  turn: {
    type: ["object"],
    properties: {
      duration: ze,
      delay: Ze,
      direction: {
        type: ["string", "nil"],
        enum: ["right", "left"]
      }
    }
  }
}, Yv = ({ effectName: r, propertyName: s, compName: i }) => (c, f) => {
  On(J.warning_invalid_type_effect_options({
    propertyName: s,
    compName: i,
    effectName: r,
    wrongValue: `${f?.value}`,
    infoLink: Jn(s)
  }));
}, Xv = ({ effectName: r, propertyName: s, compName: i }) => (c, f) => {
  On(J.warning_invalid_effect_options({
    propertyName: s,
    compName: i,
    effectName: r,
    wrongProperty: "value",
    wrongValue: `the key "${f?.propertyName}" cannot be set to the value "${f?.value}"`,
    infoLink: Jn(s)
  }));
}, zv = ({ propertyName: r, compName: s }) => (i, c) => {
  if (!i)
    return !1;
  if (c === void 0)
    return !0;
  const f = Yv({
    effectName: i,
    propertyName: r,
    compName: s
  });
  if (!So({
    reportError: f,
    reportWarning: () => ({})
  }, s)(c, { type: ["object"] }, r))
    return !1;
  const y = Xv({
    effectName: i,
    propertyName: r,
    compName: s
  });
  return !!So({
    reportError: y,
    reportWarning: () => ({})
  }, s)(c, zu[i], r);
}, Ou = (r) => Object.keys(r).length === 0, Zv = ({ compName: r }) => ({ effectName: s, effectOptions: i, propertyName: c }) => {
  const f = zv({
    propertyName: c,
    compName: r
  });
  if (!s && !i)
    return !1;
  if (!s && i && !Ou(i))
    return On(J.warning_effect_options_not_set({
      propertyName: c,
      compName: r,
      infoLink: Jn(c)
    })), !1;
  const y = Oo[c === "hide" ? "HIDE" : "SHOW"]?.deprecatedValues;
  return s && i && y && y.find((v) => v === s) && !Ou(i) ? (On(J.warning_deprecated_effect_with_options({
    compName: r,
    effectName: s,
    propertyName: c,
    infoLink: Jn(c)
  })), !1) : y.find((v) => v === s) ? !0 : s && !(s in zu) ? (On(J.warning_invalid_effect_name({
    propertyName: c,
    compName: r,
    effectName: s,
    infoLink: Jn(c)
  })), !1) : !!f(s, i);
}, Jv = ({ viewportState: r, hasPortal: s = !1 } = {}) => ({ setStyles: i, portal: c, metaData: f, getSdkInstance: g, runAnimation: y, createSdkState: v, styleUtils: E, setProps: S }) => {
  const x = Zv({
    compName: f.role
  }), [O, H] = v({
    hidden: f.hiddenOnLoad,
    collapsed: f.collapsedOnLoad
  }, "hidden-collapsed");
  return {
    hide: async (P, I) => {
      if (S({ hidden: !0 }), O.collapsed || O.hidden) {
        H({ hidden: !0 });
        return;
      }
      if (x({
        effectName: P,
        effectOptions: I,
        propertyName: "hide"
      })) {
        const W = {
          animationDirection: Oo.HIDE.suffix,
          effectName: P,
          effectOptions: {
            ...Lu?.[P] || z,
            ...I
          }
        };
        await Promise.all([
          y(W),
          s ? c.runAnimation(W) : void 0
        ]);
      } else
        i(E.getHiddenStyles()), s && c.setStyles(E.getHiddenStyles());
      H({ hidden: !0 }), r?.onViewportLeave?.forEach((W) => W());
    },
    show: async (P, I) => {
      if (S({ hidden: !1 }), O.collapsed || !O.hidden) {
        H({ hidden: !1 });
        return;
      }
      if (x({
        effectName: P,
        effectOptions: I,
        propertyName: "show"
      })) {
        const W = {
          animationDirection: Oo.SHOW.suffix,
          effectName: P,
          effectOptions: {
            ...Lu?.[P] || z,
            ...I
          }
        };
        await Promise.all([
          y(W),
          s ? c.runAnimation(W) : void 0
        ]);
      } else
        i(E.getShownStyles()), s && c.setStyles(E.getShownStyles());
      H({ hidden: !1 }), r?.onViewportEnter?.forEach((W) => W());
    },
    collapse: async () => {
      S({ collapsed: !0 }), O.collapsed || (i(E.getCollapsedStyles()), s && c.setStyles(E.getCollapsedStyles()), H({ collapsed: !0 }), O.hidden || r?.onViewportLeave?.forEach((P) => P()));
    },
    expand: async () => {
      if (S({ collapsed: !1 }), O.collapsed) {
        const P = {
          ...E.getExpandedStyles(),
          visibility: O.hidden ? "hidden" : null
        };
        i(P), s && c.setStyles(P), H({ collapsed: !1 }), O.hidden || r?.onViewportEnter?.forEach((I) => I());
      }
    },
    get collapsed() {
      return O.collapsed;
    },
    get hidden() {
      return !!O.hidden;
    },
    get isVisible() {
      if (!f.isRendered())
        return !1;
      let P = g();
      for (; P; ) {
        if (P.hidden || P.collapsed)
          return !1;
        P = P.parent;
      }
      return !0;
    },
    get isAnimatable() {
      return !0;
    }
  };
}, Qv = (r, s = !1) => {
  const [i, c] = r.createSdkState({
    onViewportEnter: [],
    onViewportLeave: []
  }, "viewport"), f = (v, E) => {
    c({ [v]: [...i[v], E] });
  }, g = Jv({
    viewportState: i,
    hasPortal: s
  }), y = Xu(f);
  return on([
    g,
    y
  ])(r);
}, jv = (r) => (s) => Qv(s, r), wo = (r, s, i) => {
  const c = s.filter((f) => !r.includes(f));
  c.length && _t(J.error_effects_input({
    functionName: i,
    wrongEffects: c,
    allowedEffects: r
  }));
}, Zu = (r) => {
  const s = () => r.effectsTriggersApi?.getEffects() || [];
  return {
    effects: {
      get effects() {
        return s();
      },
      get activeEffects() {
        return r.effectsTriggersApi?.getActiveEffects() || [];
      },
      applyEffects: (i) => {
        wo(s(), i, "applyEffects"), r.effectsTriggersApi?.applyEffects(...i);
      },
      removeEffects: (i) => {
        wo(s(), i, "removeEffects"), r.effectsTriggersApi?.removeEffects(...i);
      },
      toggleEffects: (i) => {
        wo(s(), i, "toggleEffects"), r.effectsTriggersApi?.toggleEffects(...i);
      },
      removeAllEffects: () => r.effectsTriggersApi?.removeAllEffects()
    }
  };
}, em = (r) => ({
  delete: () => {
    r.setProps({ deleted: !0 }), r.remove();
  },
  restore: () => {
    r.setProps({ deleted: !1 }), r.restore();
  },
  get deleted() {
    return !!r.props.deleted;
  }
}), tm = ({ role: r, compType: s, isGlobal: i, isRendered: c }) => ({
  id: r,
  type: `$w.${s}`,
  global: i(),
  rendered: c()
}), Ju = (r) => ({
  onMouseIn: (s) => Su("onMouseEnter", r, s),
  onMouseOut: (s) => Su("onMouseLeave", r, s),
  removeEventHandler: (s, i) => {
    const { getSdkInstance: c } = r;
    return typeof s != "string" ? (_t(J.error_type({
      propertyName: "type",
      functionName: "removeEventHandler",
      value: s,
      expectedType: "string"
    })), c()) : typeof i != "function" ? (_t(J.error_type({
      propertyName: "handler",
      functionName: "removeEventHandler",
      value: i,
      expectedType: "function"
    })), c()) : qv(s, r, i);
  },
  get rendered() {
    return r.metaData.isRendered();
  },
  toJSON() {
    return tm(r.metaData);
  }
}), Qu = Xu();
on([
  Hu,
  Qu,
  Ju,
  Zu,
  Vu
]);
const nm = ({ useHiddenCollapsed: r = !0, hasPortal: s = !1 } = {}) => on([
  Hu,
  Ju,
  Zu,
  em,
  r ? jv(s) : Qu,
  Vu
]), rm = ({ setProps: r, props: s }) => ({
  get label() {
    return s.ariaAttributes?.label;
  },
  set label(i) {
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        label: Pe(i) ? void 0 : i
      }
    });
  }
}), im = Te(rm, {
  properties: {
    label: {
      type: ["string"],
      minLength: 1,
      maxLength: 1e3
    }
  }
}), om = ({ setProps: r, props: s }) => ({
  get hidden() {
    return s.ariaAttributes?.hidden;
  },
  set hidden(i) {
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        hidden: Pe(i) ? void 0 : String(i)
      }
    });
  }
}), sm = Te(om, {
  properties: {
    hidden: {
      type: ["boolean", "string"],
      enum: ["false", "true"]
    }
  }
}), am = ({ setProps: r, props: s }) => ({
  get pressed() {
    return s.ariaAttributes?.pressed;
  },
  set pressed(i) {
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        pressed: Pe(i) ? void 0 : String(i)
      }
    });
  }
}), um = Te(am, {
  properties: {
    pressed: {
      type: ["string", "boolean"],
      enum: ["false", "true", "mixed"]
    }
  }
}), lm = ({ setProps: r, props: s }) => ({
  get haspopup() {
    return s.ariaAttributes?.haspopup;
  },
  set haspopup(i) {
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        haspopup: Pe(i) ? void 0 : String(i)
      }
    });
  }
}), cm = Te(lm, {
  properties: {
    haspopup: {
      type: ["string", "boolean"],
      enum: ["false", "true", "menu", "dialog", "grid", "listbox", "tree"]
    }
  }
}), fm = ({ setProps: r, props: s }) => ({
  get atomic() {
    return s.ariaAttributes?.atomic;
  },
  set atomic(i) {
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        atomic: Pe(i) ? void 0 : String(i)
      }
    });
  }
}), dm = Te(fm, {
  properties: {
    atomic: {
      type: ["boolean", "string"],
      enum: ["false", "true"]
    }
  }
}), hm = ({ setProps: r, props: s }) => ({
  get busy() {
    return s.ariaAttributes?.busy;
  },
  set busy(i) {
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        busy: Pe(i) ? void 0 : String(i)
      }
    });
  }
}), pm = Te(hm, {
  properties: {
    busy: {
      type: ["boolean", "string"],
      enum: ["false", "true"]
    }
  }
});
var Iu;
(function(r) {
  r.ARIA_LABEL_NOT_STRING = "aria-label must be string", r.ARIA_LABEL_EMPTY_STRING = "aria-label can't be an empty string", r.REMOVING_MISSING_ATTRIBUTE = "Cannot remove a non existing attribute";
})(Iu || (Iu = {}));
const _m = (r) => `The parameter that is passed to the ‘${r}’ property must be a selector function of a text element.`, gm = (r) => `The parameter that is passed to the ‘${r}’ property must be a selector function of an element.`, Tu = (r) => `The parameter that is passed to the ‘${r}’ property must be a string or ‘null’.`, vm = ({ setProps: r, props: s }) => ({
  get current() {
    return s.ariaAttributes?.current;
  },
  set current(i) {
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        current: Pe(i) ? void 0 : String(i)
      }
    });
  }
}), mm = Te(vm, {
  properties: {
    current: {
      type: ["string", "boolean"],
      enum: ["step", "page", "true", "false", "location", "date", "time"]
    }
  }
}), bm = (r) => ju(r) && (r.type === "$w.Text" || r.type === "$w.CollapsibleText"), ju = (r) => !!(r.id && r.uniqueId && r.type), el = (r, s, i, c, f) => f ? i(f) ? !0 : (_t(c), !1) : s ? !0 : (_t(Ku({
  value: f,
  types: ["object"],
  propertyName: r,
  functionName: `set ${r}`,
  index: void 0
})), !1), tl = (r, s = !0) => (i) => el(r, s, ju, gm(r), i), No = (r, s = !0) => (i) => el(r, s, bm, _m(r), i), Em = ({ setProps: r, props: s, create$w: i }) => ({
  get describedBy() {
    return s.ariaAttributes?.describedBy ? i()(`#${s.ariaAttributes.describedBy}`) : void 0;
  },
  set describedBy(c) {
    if (!c) {
      r({
        ariaAttributes: {
          ...s.ariaAttributes,
          describedBy: void 0
        }
      });
      return;
    }
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        describedBy: c.uniqueId
      }
    });
  }
}), wm = {
  describedBy: [No("describedBy")]
}, ym = Te(Em, {
  properties: {
    describedBy: {
      type: ["object", "nil"]
    }
  }
}, wm), Am = ({ setProps: r, props: s, create$w: i }) => ({
  get errorMessage() {
    return s.ariaAttributes?.errorMessage ? i()(`#${s.ariaAttributes.errorMessage}`) : void 0;
  },
  set errorMessage(c) {
    if (!c) {
      r({
        ariaAttributes: {
          ...s.ariaAttributes,
          errorMessage: void 0
        }
      });
      return;
    }
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        errorMessage: c.uniqueId
      }
    });
  }
}), Sm = {
  errorMessage: [No("errorMessage")]
}, Lm = Te(Am, {
  properties: {
    errorMessage: {
      type: ["object", "nil"]
    }
  }
}, Sm), Om = ({ setProps: r, props: s }) => ({
  get expanded() {
    return s.ariaAttributes?.expanded;
  },
  set expanded(i) {
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        expanded: Pe(i) ? void 0 : String(i)
      }
    });
  }
}), Im = Te(Om, {
  properties: {
    expanded: {
      type: ["boolean", "string"],
      enum: ["false", "true"]
    }
  }
}), Tm = ({ setProps: r, props: s, create$w: i }) => ({
  get labelledBy() {
    return s.ariaAttributes?.labelledBy ? i()(`#${s.ariaAttributes.labelledBy}`) : void 0;
  },
  set labelledBy(c) {
    if (!c) {
      r({
        ariaAttributes: {
          ...s.ariaAttributes,
          labelledBy: void 0
        }
      });
      return;
    }
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        labelledBy: c.uniqueId
      }
    });
  }
}), $m = {
  labelledBy: [No("labelledBy")]
}, Rm = Te(Tm, {
  properties: {
    labelledBy: {
      type: ["object", "nil"]
    }
  }
}, $m), Cm = ({ setProps: r, props: s }) => ({
  get live() {
    return s.ariaAttributes?.live;
  },
  set live(i) {
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        live: Pe(i) ? void 0 : i
      }
    });
  }
}), xm = Te(Cm, {
  properties: {
    live: {
      type: ["string"],
      enum: ["polite", "assertive"]
    }
  }
}), Pm = ({ setProps: r, props: s, create$w: i }) => ({
  get owns() {
    return s.ariaAttributes?.owns ? i()(`#${s.ariaAttributes.owns}`) : void 0;
  },
  set owns(c) {
    if (!c) {
      r({
        ariaAttributes: {
          ...s.ariaAttributes,
          owns: void 0
        }
      });
      return;
    }
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        owns: c.uniqueId
      }
    });
  }
}), Dm = {
  owns: [tl("owns")]
}, Um = Te(Pm, {
  properties: {
    owns: {
      type: ["object", "nil"]
    }
  }
}, Dm), Mm = ({ setProps: r, props: s, create$w: i }) => ({
  get controls() {
    return s.ariaAttributes?.controls ? i()(`#${s.ariaAttributes.controls}`) : void 0;
  },
  set controls(c) {
    if (!c) {
      r({
        ariaAttributes: {
          ...s.ariaAttributes,
          controls: void 0
        }
      });
      return;
    }
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        controls: c.uniqueId
      }
    });
  }
}), Fm = {
  controls: [tl("controls")]
}, Wm = Te(Mm, {
  properties: {
    controls: {
      type: ["object", "nil"]
    }
  }
}, Fm), Bm = ({ setProps: r, props: s }) => ({
  get roleDescription() {
    return s.ariaAttributes?.roleDescription;
  },
  set roleDescription(i) {
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        roleDescription: Pe(i) ? void 0 : i
      }
    });
  }
}), Nm = Te(Bm, {
  properties: {
    roleDescription: {
      type: ["string"],
      minLength: 1,
      maxLength: 100
    }
  }
}), km = ({ setProps: r, props: s }) => ({
  get relevant() {
    return s.ariaAttributes?.relevant;
  },
  set relevant(i) {
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        relevant: Pe(i) ? void 0 : i
      }
    });
  }
}), Km = Te(km, {
  properties: {
    relevant: {
      type: ["string"],
      enum: ["additions", "additions text", "all", "removals", "text"]
    }
  }
}), Gm = ({ setProps: r, props: s }) => ({
  get role() {
    return s.role;
  },
  set role(i) {
    r({
      role: Pe(i) ? void 0 : i
    });
  }
}), Hm = Te(Gm, {
  properties: {
    role: {
      type: ["string"]
    }
  }
}), Vm = ({ setProps: r, props: s }) => ({
  screenReader: {
    get prefix() {
      return s.screenReader?.prefix;
    },
    set prefix(i) {
      if (i !== null && !Ao(i)) {
        _t(Tu("prefix"));
        return;
      }
      r({ screenReader: { ...s.screenReader, prefix: i } });
    },
    get suffix() {
      return s.screenReader?.suffix;
    },
    set suffix(i) {
      if (i !== null && !Ao(i)) {
        _t(Tu("suffix"));
        return;
      }
      r({ screenReader: { ...s.screenReader, suffix: i } });
    },
    get hasHint() {
      return s.screenReader?.hasHint;
    },
    set hasHint(i) {
      r({
        screenReader: {
          ...s.screenReader,
          hasHint: Pe(i) ? void 0 : i
        }
      });
    }
  }
}), qm = ({ setProps: r, props: s }) => ({
  get tabIndex() {
    return s.tabIndex;
  },
  set tabIndex(i) {
    r({
      tabIndex: Pe(i) ? void 0 : i
    });
  }
}), Ym = Te(qm, {
  properties: {
    tabIndex: {
      type: ["number"],
      enum: [0, -1]
    }
  }
}), Xm = ({ setProps: r, props: s }) => ({
  get required() {
    return s.ariaAttributes?.required;
  },
  set required(i) {
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        required: Pe(i) ? void 0 : String(i)
      }
    });
  }
}), zm = Te(Xm, {
  properties: {
    required: {
      type: ["string", "boolean"],
      enum: ["false", "true"]
    }
  }
}), Zm = ({ setProps: r, props: s }) => ({
  get valueText() {
    return s.ariaAttributes?.valueText;
  },
  set valueText(i) {
    r({
      ariaAttributes: {
        ...s.ariaAttributes,
        valueText: Pe(i) ? void 0 : String(i)
      }
    });
  }
}), Jm = Te(Zm, {
  properties: {
    valueText: {
      type: ["string"],
      minLength: 1,
      maxLength: 1e3
    }
  }
}), Qm = ({ setProps: r, props: s }) => ({
  get lang() {
    return s.lang;
  },
  set lang(i) {
    r({
      lang: i
    });
  }
}), jm = Te(Qm, {
  properties: {
    lang: {
      type: ["string"]
    }
  }
}), $u = {
  enableAriaLabel: im,
  enableAriaDescribedBy: ym,
  enableAriaLabelledBy: Rm,
  enableAriaAtomic: dm,
  enableAriaBusy: pm,
  enableAriaCurrent: mm,
  enableAriaExpanded: Im,
  enableAriaLive: xm,
  enableAriaOwns: Um,
  enableAriaControls: Wm,
  enableAriaRoleDescription: Nm,
  enableAriaRelevant: Km,
  enableAriaErrorMessage: Lm,
  enableAriaHidden: sm,
  enableAriaPressed: um,
  enableAriaHaspopup: cm,
  enableAriaRequired: zm,
  enableAriaValueText: Jm
}, Ru = {
  enableScreenReader: Vm,
  enableRole: Hm,
  enableTabIndex: Ym,
  enableLang: jm
}, e0 = (r) => {
  const s = [];
  return Object.entries(r).forEach(([i, c]) => c && $u[i] && s.push($u[i])), (i) => {
    const c = on(s, {
      modifyAriaSourceKeys: !0
    })(i);
    return c.ariaAttributes = on(s)(i), c;
  };
}, t0 = ({ enableAriaLabel: r = !0, enableAriaDescribedBy: s = !0, enableAriaLabelledBy: i = !0, enableAriaAtomic: c = !1, enableAriaBusy: f = !1, enableAriaHidden: g = !1, enableAriaPressed: y = !1, enableAriaHaspopup: v = !1, enableAriaCurrent: E = !1, enableAriaExpanded: S = !1, enableAriaLive: x = !1, enableAriaOwns: O = !1, enableAriaControls: H = !1, enableAriaRoleDescription: P = !1, enableAriaRelevant: I = !1, enableRole: W = !1, enableTabIndex: q = !1, enableLang: le = !1, enableAriaErrorMessage: be = !1, enableScreenReader: pe = !1, enableAriaRequired: Ee = !1, enableAriaValueText: Y = !1 } = {}) => (D) => {
  const k = [], j = {
    enableAriaLabel: r,
    enableAriaDescribedBy: s,
    enableAriaLabelledBy: i,
    enableAriaAtomic: c,
    enableAriaBusy: f,
    enableAriaCurrent: E,
    enableAriaExpanded: S,
    enableAriaLive: x,
    enableAriaOwns: O,
    enableAriaControls: H,
    enableAriaRoleDescription: P,
    enableAriaRelevant: I,
    enableAriaErrorMessage: be,
    enableAriaHidden: g,
    enableAriaPressed: y,
    enableAriaHaspopup: v,
    enableAriaRequired: Ee,
    enableAriaValueText: Y
  }, _e = {
    enableScreenReader: pe,
    enableRole: W,
    enableTabIndex: q,
    enableLang: le
  };
  if (Object.values(j).some((st) => st)) {
    const st = e0(j);
    k.push(st);
  }
  return Object.entries(_e).forEach(([st, Ft]) => Ft && Ru[st] && k.push(Ru[st])), { accessibility: on(k)(D) };
}, nl = (r) => r.map((s) => s._id), n0 = (r, s) => s.filter((i) => !nl(r).includes(i._id)), r0 = (r, s) => r.filter((i) => !nl(s).includes(i._id)), i0 = (r) => ({
  selectors: /* @__PURE__ */ new Map(),
  items: r?.map((s) => ({ _id: s })) ?? [],
  onItemReadyCallbacks: /* @__PURE__ */ new Set(),
  onItemRemovedCallbacks: /* @__PURE__ */ new Set(),
  isItemsSet: r.length > 0
}), o0 = (r) => {
  const s = i0(r.props.items), i = (v) => {
    if (!s.selectors.has(v)) {
      const E = r.create$w({
        context: { type: "COMPONENT_SCOPE", itemId: v, _internal: { repeaterCompId: r.props.id } }
      });
      s.selectors.set(v, E);
    }
    return s.selectors.get(v);
  }, c = (v) => {
    s.selectors.delete(v);
  }, f = (v, E) => {
    E.forEach((S, x) => {
      s[v].forEach((O) => O(i(S._id), S, x));
    });
  }, g = (v) => {
    v.length && (f("onItemRemovedCallbacks", v), v.forEach((E) => c(E._id)));
  }, y = (v) => {
    !v.length || !s.isItemsSet || f("onItemReadyCallbacks", v);
  };
  return {
    get data() {
      return s.items;
    },
    set data(v) {
      const E = s.items;
      g(r0(E, v)), y(n0(E, v)), s.items = v, s.isItemsSet = !0, r.setProps({ items: v.map((S) => S._id) });
    },
    forEachItem: (v) => {
      s.items.forEach((E, S) => v(i(E._id), E, S));
    },
    forItems: (v, E) => {
      if (!Array.isArray(v) || !v.length)
        return;
      const S = new Set(v);
      s.items.forEach((x, O) => {
        S.has(x._id) && E(i(x._id), x, O);
      });
    },
    onItemReady: (v) => (s.onItemReadyCallbacks.add(v), s.isItemsSet && f("onItemReadyCallbacks", s.items), () => {
      s.onItemReadyCallbacks.delete(v);
    }),
    onItemRemoved: (v) => (s.onItemRemovedCallbacks.add(v), () => {
      s.onItemRemovedCallbacks.delete(v);
    }),
    setCss(v) {
      r.setStyles(v);
    }
  };
}, _0 = (r, s, i, c) => {
  const f = t0({
    enableAriaLabel: !1,
    enableAriaLabelledBy: !0,
    enableAriaDescribedBy: !0,
    enableAriaControls: !1,
    enableAriaOwns: !1,
    enableAriaErrorMessage: !1,
    enableTabIndex: !1
  }), g = on([o0, nm(), f]);
  return hv(g).factory({ getProps: r, setProps: s, getService: i, ...c });
};
function s0(r) {
  const s = {};
  for (const i in r)
    typeof r[i] == "function" && (s[i] = r[i]);
  return s;
}
const a0 = (r, s) => s0(r(s)), u0 = (r) => `on${r.charAt(0).toUpperCase()}${r.slice(1)}`, l0 = (r, s, i) => {
  let c = r?.props;
  const f = [], g = {}, y = {
    get props() {
      return s();
    },
    set props(O) {
      throw new Error("$widget.props is read only.");
    },
    onPropsChanged: (O) => {
      f.push(O);
    },
    fireEvent: (O, H) => {
      g[O] && g[O].forEach((P) => P({ data: H }));
    }
  }, v = (O, H) => {
    f.forEach((P) => P(O, H)), i(H);
  }, E = (O, H) => {
    g[O] || (g[O] = []), g[O].push(H);
  }, S = (O, H) => O.reduce((P, I) => {
    const W = u0(I);
    return P[W] = (q) => H(I, q), P;
  }, {});
  return {
    $widget: y,
    invokeOnPropsChanged: v,
    widgetSdk: (() => {
      const O = {};
      c = c || {}, Object.keys(c).forEach((P) => Object.defineProperty(O, P, {
        get: () => s()?.[P],
        set: (I) => {
          const W = { ...s() };
          v(W, { ...W, [P]: I });
        }
      })), Object.keys(c).forEach((P) => {
        O[P] = c[P].default;
      });
      const H = r ? S(r.events || [], E) : {};
      return Object.assign(O, H);
    })()
  };
}, c0 = (r) => {
  const s = [], i = () => {
    const f = s.map((g) => g());
    if (f.some((g) => g instanceof Promise))
      return Promise.all(f);
  }, c = r;
  return c.onReady = (f) => {
    s.push(f);
  }, { $w: c, invokeOnReady: i };
}, rl = ({ initialStore: r, elementProps: s, sdkData: i, createSelector: c }) => (f, g, y) => {
  const v = structuredClone(r), E = s ? yo.merge({}, v, s) : v, S = f.elementProps ? yo.merge({}, E, f.elementProps) : E, x = new Kg(S);
  x.subscribeToChanges(y);
  const O = new Io(x, i), H = c(O, g, f.slots), { $w: P, invokeOnReady: I } = c0(H);
  return {
    stateStore: x,
    $w: P,
    invokeOnReady: I
  };
};
var ko = {};
Object.defineProperty(ko, "__esModule", { value: !0 });
var il = ko.WixClientDefinition = void 0;
const f0 = zr;
il = ko.WixClientDefinition = (0, f0.defineService)("viewer-core/viewer-service-wix-client");
const g0 = ({ initialStore: r, elementProps: s, sdkData: i, createSelector: c, userCodeModule: f, userCodeDeps: g }) => {
  const y = rl({ initialStore: r, elementProps: s, sdkData: i, createSelector: c });
  return (v, E, S) => {
    const { stateStore: x, $w: O, invokeOnReady: H } = y(v, E, S), P = () => x.props.getOverrides(v.nickname), I = (Ee) => x.props.updateOverrides(v.nickname, Ee), { $widget: W, invokeOnPropsChanged: q, widgetSdk: le } = l0(i.widgetApi, P, I), pe = a0(f, (() => {
      const Y = { client: E(il).getWixClient() }, D = yo.mapValues(g, (k) => E(k));
      return {
        $w: O,
        $widget: W,
        console,
        $ns: D,
        // todo - implement $ns and rest of globals
        $wixContext: Y
      };
    })());
    return {
      stateStore: x,
      velo: { invokeOnPropsChanged: q, invokeOnReady: H },
      sdk: Object.assign(le, pe)
    };
  };
}, v0 = (r) => {
  const { initialStore: s, elementProps: i, sdkData: c, createSelector: f } = r, g = rl({ initialStore: s, elementProps: i, sdkData: c, createSelector: f });
  return (y, v) => {
    const { stateStore: E, invokeOnReady: S } = g(y, v);
    return { stateStore: E, velo: { invokeOnReady: S, onPropsChange: () => {
    } }, sdk: {} };
  };
};
export {
  lv as COMPONENTS_WITH_PORTAL_PREFIXES,
  Io as Store,
  l0 as create$widgetApi,
  p0 as createComponentSDK,
  v0 as createControllerState,
  h0 as createScopedRepeater,
  rl as createStateFactory,
  g0 as createVeloState,
  Bu as getRepeaterOverridesKey,
  _0 as repeaterSdk,
  a0 as runVeloCode
};
//# sourceMappingURL=builder-velo.mjs.map