Files
zznty 529fe260da 2
2024-06-02 21:49:11 +07:00

7182 lines
240 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var gg = Object.defineProperty;
var mg = (r, o, i) => o in r ? gg(r, o, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[o] = i;
var Ge = (r, o, i) => (mg(r, typeof o != "symbol" ? o + "" : o, i), i);
import { openBlock as S, createElementBlock as R, createElementVNode as z, defineComponent as se, computed as B, normalizeClass as M, renderSlot as fe, createBlock as pe, resolveDynamicComponent as Xt, createTextVNode as lt, toDisplayString as we, normalizeStyle as Zs, createCommentVNode as ae, unref as ie, useSlots as cr, ref as oe, mergeProps as Qt, createVNode as ht, withDirectives as ci, vShow as zs, watch as Jt, onMounted as Dt, onBeforeUnmount as yg, createSlots as qs, renderList as pn, withCtx as ye, normalizeProps as fr, guardReactiveProps as fi, Transition as qa, Fragment as xt, createStaticVNode as bg, reactive as Ks, shallowRef as wg, watchEffect as di, cloneVNode as kg, h as lr, inject as hn, provide as Mn, onUnmounted as Ys, nextTick as Yt, toRaw as st, useCssVars as xg, withModifiers as Ka, toHandlers as $g, TransitionGroup as Ag, resolveComponent as Pa, createApp as Sg, getCurrentInstance as Tg } from "vue";
const Cg = {
xmlns: "http://www.w3.org/2000/svg",
width: "20",
height: "20",
fill: "none"
}, Og = /* @__PURE__ */ z("path", {
stroke: "#F4A344",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "2",
d: "M10 7.5v1.667m0 3.333v.008m-5.833 3.325h11.666a1.667 1.667 0 0 0 1.534-2.291L11.45 3.333a1.666 1.666 0 0 0-2.917 0L2.617 13.542a1.666 1.666 0 0 0 1.458 2.291"
}, null, -1), Eg = [
Og
];
function Ig(r, o) {
return S(), R("svg", Cg, Eg);
}
const Rg = { render: Ig }, Lg = {
xmlns: "http://www.w3.org/2000/svg",
width: "20",
height: "20",
fill: "none"
}, Mg = /* @__PURE__ */ z("path", {
stroke: "#17A000",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-opacity": ".7",
"stroke-width": "2",
d: "m4.167 10 4.167 4.167 8.333-8.334"
}, null, -1), Bg = [
Mg
];
function Pg(r, o) {
return S(), R("svg", Lg, Bg);
}
const Dg = { render: Pg }, Fg = {
xmlns: "http://www.w3.org/2000/svg",
width: "20",
height: "20",
fill: "none"
}, Ng = /* @__PURE__ */ z("path", {
stroke: "#E40029",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-opacity": ".5",
"stroke-width": "2",
d: "m4.75 4.75 10.5 10.5M17.5 10a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0Z"
}, null, -1), Ug = [
Ng
];
function Wg(r, o) {
return S(), R("svg", Fg, Ug);
}
const Vg = { render: Wg }, Hg = {
xmlns: "http://www.w3.org/2000/svg",
width: "20",
height: "20",
fill: "none"
}, Gg = /* @__PURE__ */ z("path", {
stroke: "#4B3C87",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-opacity": ".5",
"stroke-width": "2",
d: "M10 6.667h.008M9.167 10H10v3.333h.833M17.5 10a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0Z"
}, null, -1), Zg = [
Gg
];
function zg(r, o) {
return S(), R("svg", Hg, Zg);
}
const qg = { render: zg }, Kg = /* @__PURE__ */ se({
__name: "BaseAlert",
props: {
title: {},
type: { default: "attention" },
style: { default: "surface" }
},
setup(r) {
const o = r, i = {
negative: Vg,
positive: Dg,
attention: Rg,
info: qg
}, c = B(() => i[o.type]);
return (a, p) => (S(), R("div", {
class: M([
a.$style["prefix-alert"],
a.$style[`prefix-alert--${a.type}`],
a.$style[`prefix-alert_${a.style}`]
])
}, [
z("div", {
class: M(a.$style["prefix-alert__title"])
}, [
fe(a.$slots, "header", {}, () => [
(S(), pe(Xt(c.value))),
lt(" " + we(a.title), 1)
], !0)
], 2),
z("div", {
class: M(a.$style["prefix-alert__content"])
}, [
fe(a.$slots, "default", {}, void 0, !0)
], 2)
], 2));
}
}), Yg = {
"prefix-alert": "cdek-alert",
"prefix-alert--attention": "cdek-alert--attention",
"prefix-alert--positive": "cdek-alert--positive",
"prefix-alert--negative": "cdek-alert--negative",
"prefix-alert--info": "cdek-alert--info",
"prefix-alert_surface": "cdek-alert_surface",
"prefix-alert_line": "cdek-alert_line",
"prefix-alert__title": "cdek-alert__title",
"prefix-alert__content": "cdek-alert__content"
}, Ae = (r, o) => {
const i = r.__vccOpts || r;
for (const [c, a] of o)
i[c] = a;
return i;
}, Xg = {
$style: Yg
}, kw = /* @__PURE__ */ Ae(Kg, [["__cssModules", Xg], ["__scopeId", "data-v-6bd03bbf"]]);
var ir = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, li = { exports: {} };
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
li.exports;
(function(r, o) {
(function() {
var i, c = "4.17.21", a = 200, p = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", y = "Expected a function", b = "Invalid `variable` option passed into `_.template`", T = "__lodash_hash_undefined__", g = 500, _ = "__lodash_placeholder__", C = 1, D = 2, Q = 4, ee = 1, O = 2, E = 1, W = 2, V = 4, F = 8, Z = 16, q = 32, ge = 64, Ee = 128, At = 256, Bn = 512, N = 30, Te = "...", vt = 800, St = 16, jt = 1, hi = 2, Su = 3, en = 1 / 0, Ft = 9007199254740991, Tu = 17976931348623157e292, pr = 0 / 0, gt = 4294967295, Cu = gt - 1, Ou = gt >>> 1, Eu = [
["ary", Ee],
["bind", E],
["bindKey", W],
["curry", F],
["curryRight", Z],
["flip", Bn],
["partial", q],
["partialRight", ge],
["rearg", At]
], vn = "[object Arguments]", hr = "[object Array]", Iu = "[object AsyncFunction]", Pn = "[object Boolean]", Dn = "[object Date]", Ru = "[object DOMException]", _r = "[object Error]", vr = "[object Function]", io = "[object GeneratorFunction]", at = "[object Map]", Fn = "[object Number]", Lu = "[object Null]", Tt = "[object Object]", so = "[object Promise]", Mu = "[object Proxy]", Nn = "[object RegExp]", ut = "[object Set]", Un = "[object String]", gr = "[object Symbol]", Bu = "[object Undefined]", Wn = "[object WeakMap]", Pu = "[object WeakSet]", Vn = "[object ArrayBuffer]", gn = "[object DataView]", _i = "[object Float32Array]", vi = "[object Float64Array]", gi = "[object Int8Array]", mi = "[object Int16Array]", yi = "[object Int32Array]", bi = "[object Uint8Array]", wi = "[object Uint8ClampedArray]", ki = "[object Uint16Array]", xi = "[object Uint32Array]", Du = /\b__p \+= '';/g, Fu = /\b(__p \+=) '' \+/g, Nu = /(__e\(.*?\)|\b__t\)) \+\n'';/g, oo = /&(?:amp|lt|gt|quot|#39);/g, lo = /[&<>"']/g, Uu = RegExp(oo.source), Wu = RegExp(lo.source), Vu = /<%-([\s\S]+?)%>/g, Hu = /<%([\s\S]+?)%>/g, ao = /<%=([\s\S]+?)%>/g, Gu = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Zu = /^\w*$/, zu = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, $i = /[\\^$.*+?()[\]{}|]/g, qu = RegExp($i.source), Ai = /^\s+/, Ku = /\s/, Yu = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Xu = /\{\n\/\* \[wrapped with (.+)\] \*/, Ju = /,? & /, Qu = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, ju = /[()=,{}\[\]\/\s]/, ec = /\\(\\)?/g, tc = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, uo = /\w*$/, nc = /^[-+]0x[0-9a-f]+$/i, rc = /^0b[01]+$/i, ic = /^\[object .+?Constructor\]$/, sc = /^0o[0-7]+$/i, oc = /^(?:0|[1-9]\d*)$/, lc = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, mr = /($^)/, ac = /['\n\r\u2028\u2029\\]/g, yr = "\\ud800-\\udfff", uc = "\\u0300-\\u036f", cc = "\\ufe20-\\ufe2f", fc = "\\u20d0-\\u20ff", co = uc + cc + fc, fo = "\\u2700-\\u27bf", po = "a-z\\xdf-\\xf6\\xf8-\\xff", dc = "\\xac\\xb1\\xd7\\xf7", pc = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", hc = "\\u2000-\\u206f", _c = " \\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", ho = "A-Z\\xc0-\\xd6\\xd8-\\xde", _o = "\\ufe0e\\ufe0f", vo = dc + pc + hc + _c, Si = "[']", vc = "[" + yr + "]", go = "[" + vo + "]", br = "[" + co + "]", mo = "\\d+", gc = "[" + fo + "]", yo = "[" + po + "]", bo = "[^" + yr + vo + mo + fo + po + ho + "]", Ti = "\\ud83c[\\udffb-\\udfff]", mc = "(?:" + br + "|" + Ti + ")", wo = "[^" + yr + "]", Ci = "(?:\\ud83c[\\udde6-\\uddff]){2}", Oi = "[\\ud800-\\udbff][\\udc00-\\udfff]", mn = "[" + ho + "]", ko = "\\u200d", xo = "(?:" + yo + "|" + bo + ")", yc = "(?:" + mn + "|" + bo + ")", $o = "(?:" + Si + "(?:d|ll|m|re|s|t|ve))?", Ao = "(?:" + Si + "(?:D|LL|M|RE|S|T|VE))?", So = mc + "?", To = "[" + _o + "]?", bc = "(?:" + ko + "(?:" + [wo, Ci, Oi].join("|") + ")" + To + So + ")*", wc = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", kc = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Co = To + So + bc, xc = "(?:" + [gc, Ci, Oi].join("|") + ")" + Co, $c = "(?:" + [wo + br + "?", br, Ci, Oi, vc].join("|") + ")", Ac = RegExp(Si, "g"), Sc = RegExp(br, "g"), Ei = RegExp(Ti + "(?=" + Ti + ")|" + $c + Co, "g"), Tc = RegExp([
mn + "?" + yo + "+" + $o + "(?=" + [go, mn, "$"].join("|") + ")",
yc + "+" + Ao + "(?=" + [go, mn + xo, "$"].join("|") + ")",
mn + "?" + xo + "+" + $o,
mn + "+" + Ao,
kc,
wc,
mo,
xc
].join("|"), "g"), Cc = RegExp("[" + ko + yr + co + _o + "]"), Oc = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, Ec = [
"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"
], Ic = -1, _e = {};
_e[_i] = _e[vi] = _e[gi] = _e[mi] = _e[yi] = _e[bi] = _e[wi] = _e[ki] = _e[xi] = !0, _e[vn] = _e[hr] = _e[Vn] = _e[Pn] = _e[gn] = _e[Dn] = _e[_r] = _e[vr] = _e[at] = _e[Fn] = _e[Tt] = _e[Nn] = _e[ut] = _e[Un] = _e[Wn] = !1;
var he = {};
he[vn] = he[hr] = he[Vn] = he[gn] = he[Pn] = he[Dn] = he[_i] = he[vi] = he[gi] = he[mi] = he[yi] = he[at] = he[Fn] = he[Tt] = he[Nn] = he[ut] = he[Un] = he[gr] = he[bi] = he[wi] = he[ki] = he[xi] = !0, he[_r] = he[vr] = he[Wn] = !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",
ij: "ij",
Œ: "Oe",
œ: "oe",
ʼn: "'n",
ſ: "s"
}, Lc = {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
'"': "&quot;",
"'": "&#39;"
}, Mc = {
"&amp;": "&",
"&lt;": "<",
"&gt;": ">",
"&quot;": '"',
"&#39;": "'"
}, Bc = {
"\\": "\\",
"'": "'",
"\n": "n",
"\r": "r",
"\u2028": "u2028",
"\u2029": "u2029"
}, Pc = parseFloat, Dc = parseInt, Oo = typeof ir == "object" && ir && ir.Object === Object && ir, Fc = typeof self == "object" && self && self.Object === Object && self, Re = Oo || Fc || Function("return this")(), Ii = o && !o.nodeType && o, tn = Ii && !0 && r && !r.nodeType && r, Eo = tn && tn.exports === Ii, Ri = Eo && Oo.process, Je = function() {
try {
var v = tn && tn.require && tn.require("util").types;
return v || Ri && Ri.binding && Ri.binding("util");
} catch {
}
}(), Io = Je && Je.isArrayBuffer, Ro = Je && Je.isDate, Lo = Je && Je.isMap, Mo = Je && Je.isRegExp, Bo = Je && Je.isSet, Po = Je && Je.isTypedArray;
function Ze(v, k, w) {
switch (w.length) {
case 0:
return v.call(k);
case 1:
return v.call(k, w[0]);
case 2:
return v.call(k, w[0], w[1]);
case 3:
return v.call(k, w[0], w[1], w[2]);
}
return v.apply(k, w);
}
function Nc(v, k, w, L) {
for (var K = -1, le = v == null ? 0 : v.length; ++K < le; ) {
var Ce = v[K];
k(L, Ce, w(Ce), v);
}
return L;
}
function Qe(v, k) {
for (var w = -1, L = v == null ? 0 : v.length; ++w < L && k(v[w], w, v) !== !1; )
;
return v;
}
function Uc(v, k) {
for (var w = v == null ? 0 : v.length; w-- && k(v[w], w, v) !== !1; )
;
return v;
}
function Do(v, k) {
for (var w = -1, L = v == null ? 0 : v.length; ++w < L; )
if (!k(v[w], w, v))
return !1;
return !0;
}
function Nt(v, k) {
for (var w = -1, L = v == null ? 0 : v.length, K = 0, le = []; ++w < L; ) {
var Ce = v[w];
k(Ce, w, v) && (le[K++] = Ce);
}
return le;
}
function wr(v, k) {
var w = v == null ? 0 : v.length;
return !!w && yn(v, k, 0) > -1;
}
function Li(v, k, w) {
for (var L = -1, K = v == null ? 0 : v.length; ++L < K; )
if (w(k, v[L]))
return !0;
return !1;
}
function ve(v, k) {
for (var w = -1, L = v == null ? 0 : v.length, K = Array(L); ++w < L; )
K[w] = k(v[w], w, v);
return K;
}
function Ut(v, k) {
for (var w = -1, L = k.length, K = v.length; ++w < L; )
v[K + w] = k[w];
return v;
}
function Mi(v, k, w, L) {
var K = -1, le = v == null ? 0 : v.length;
for (L && le && (w = v[++K]); ++K < le; )
w = k(w, v[K], K, v);
return w;
}
function Wc(v, k, w, L) {
var K = v == null ? 0 : v.length;
for (L && K && (w = v[--K]); K--; )
w = k(w, v[K], K, v);
return w;
}
function Bi(v, k) {
for (var w = -1, L = v == null ? 0 : v.length; ++w < L; )
if (k(v[w], w, v))
return !0;
return !1;
}
var Vc = Pi("length");
function Hc(v) {
return v.split("");
}
function Gc(v) {
return v.match(Qu) || [];
}
function Fo(v, k, w) {
var L;
return w(v, function(K, le, Ce) {
if (k(K, le, Ce))
return L = le, !1;
}), L;
}
function kr(v, k, w, L) {
for (var K = v.length, le = w + (L ? 1 : -1); L ? le-- : ++le < K; )
if (k(v[le], le, v))
return le;
return -1;
}
function yn(v, k, w) {
return k === k ? nf(v, k, w) : kr(v, No, w);
}
function Zc(v, k, w, L) {
for (var K = w - 1, le = v.length; ++K < le; )
if (L(v[K], k))
return K;
return -1;
}
function No(v) {
return v !== v;
}
function Uo(v, k) {
var w = v == null ? 0 : v.length;
return w ? Fi(v, k) / w : pr;
}
function Pi(v) {
return function(k) {
return k == null ? i : k[v];
};
}
function Di(v) {
return function(k) {
return v == null ? i : v[k];
};
}
function Wo(v, k, w, L, K) {
return K(v, function(le, Ce, de) {
w = L ? (L = !1, le) : k(w, le, Ce, de);
}), w;
}
function zc(v, k) {
var w = v.length;
for (v.sort(k); w--; )
v[w] = v[w].value;
return v;
}
function Fi(v, k) {
for (var w, L = -1, K = v.length; ++L < K; ) {
var le = k(v[L]);
le !== i && (w = w === i ? le : w + le);
}
return w;
}
function Ni(v, k) {
for (var w = -1, L = Array(v); ++w < v; )
L[w] = k(w);
return L;
}
function qc(v, k) {
return ve(k, function(w) {
return [w, v[w]];
});
}
function Vo(v) {
return v && v.slice(0, zo(v) + 1).replace(Ai, "");
}
function ze(v) {
return function(k) {
return v(k);
};
}
function Ui(v, k) {
return ve(k, function(w) {
return v[w];
});
}
function Hn(v, k) {
return v.has(k);
}
function Ho(v, k) {
for (var w = -1, L = v.length; ++w < L && yn(k, v[w], 0) > -1; )
;
return w;
}
function Go(v, k) {
for (var w = v.length; w-- && yn(k, v[w], 0) > -1; )
;
return w;
}
function Kc(v, k) {
for (var w = v.length, L = 0; w--; )
v[w] === k && ++L;
return L;
}
var Yc = Di(Rc), Xc = Di(Lc);
function Jc(v) {
return "\\" + Bc[v];
}
function Qc(v, k) {
return v == null ? i : v[k];
}
function bn(v) {
return Cc.test(v);
}
function jc(v) {
return Oc.test(v);
}
function ef(v) {
for (var k, w = []; !(k = v.next()).done; )
w.push(k.value);
return w;
}
function Wi(v) {
var k = -1, w = Array(v.size);
return v.forEach(function(L, K) {
w[++k] = [K, L];
}), w;
}
function Zo(v, k) {
return function(w) {
return v(k(w));
};
}
function Wt(v, k) {
for (var w = -1, L = v.length, K = 0, le = []; ++w < L; ) {
var Ce = v[w];
(Ce === k || Ce === _) && (v[w] = _, le[K++] = w);
}
return le;
}
function xr(v) {
var k = -1, w = Array(v.size);
return v.forEach(function(L) {
w[++k] = L;
}), w;
}
function tf(v) {
var k = -1, w = Array(v.size);
return v.forEach(function(L) {
w[++k] = [L, L];
}), w;
}
function nf(v, k, w) {
for (var L = w - 1, K = v.length; ++L < K; )
if (v[L] === k)
return L;
return -1;
}
function rf(v, k, w) {
for (var L = w + 1; L--; )
if (v[L] === k)
return L;
return L;
}
function wn(v) {
return bn(v) ? of(v) : Vc(v);
}
function ct(v) {
return bn(v) ? lf(v) : Hc(v);
}
function zo(v) {
for (var k = v.length; k-- && Ku.test(v.charAt(k)); )
;
return k;
}
var sf = Di(Mc);
function of(v) {
for (var k = Ei.lastIndex = 0; Ei.test(v); )
++k;
return k;
}
function lf(v) {
return v.match(Ei) || [];
}
function af(v) {
return v.match(Tc) || [];
}
var uf = function v(k) {
k = k == null ? Re : kn.defaults(Re.Object(), k, kn.pick(Re, Ec));
var w = k.Array, L = k.Date, K = k.Error, le = k.Function, Ce = k.Math, de = k.Object, Vi = k.RegExp, cf = k.String, je = k.TypeError, $r = w.prototype, ff = le.prototype, xn = de.prototype, Ar = k["__core-js_shared__"], Sr = ff.toString, ce = xn.hasOwnProperty, df = 0, qo = function() {
var e = /[^.]+$/.exec(Ar && Ar.keys && Ar.keys.IE_PROTO || "");
return e ? "Symbol(src)_1." + e : "";
}(), Tr = xn.toString, pf = Sr.call(de), hf = Re._, _f = Vi(
"^" + Sr.call(ce).replace($i, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
), Cr = Eo ? k.Buffer : i, Vt = k.Symbol, Or = k.Uint8Array, Ko = Cr ? Cr.allocUnsafe : i, Er = Zo(de.getPrototypeOf, de), Yo = de.create, Xo = xn.propertyIsEnumerable, Ir = $r.splice, Jo = Vt ? Vt.isConcatSpreadable : i, Gn = Vt ? Vt.iterator : i, nn = Vt ? Vt.toStringTag : i, Rr = function() {
try {
var e = an(de, "defineProperty");
return e({}, "", {}), e;
} catch {
}
}(), vf = k.clearTimeout !== Re.clearTimeout && k.clearTimeout, gf = L && L.now !== Re.Date.now && L.now, mf = k.setTimeout !== Re.setTimeout && k.setTimeout, Lr = Ce.ceil, Mr = Ce.floor, Hi = de.getOwnPropertySymbols, yf = Cr ? Cr.isBuffer : i, Qo = k.isFinite, bf = $r.join, wf = Zo(de.keys, de), Oe = Ce.max, Me = Ce.min, kf = L.now, xf = k.parseInt, jo = Ce.random, $f = $r.reverse, Gi = an(k, "DataView"), Zn = an(k, "Map"), Zi = an(k, "Promise"), $n = an(k, "Set"), zn = an(k, "WeakMap"), qn = an(de, "create"), Br = zn && new zn(), An = {}, Af = un(Gi), Sf = un(Zn), Tf = un(Zi), Cf = un($n), Of = un(zn), Pr = Vt ? Vt.prototype : i, Kn = Pr ? Pr.valueOf : i, el = Pr ? Pr.toString : i;
function u(e) {
if (ke(e) && !Y(e) && !(e instanceof ne)) {
if (e instanceof et)
return e;
if (ce.call(e, "__wrapped__"))
return ta(e);
}
return new et(e);
}
var Sn = function() {
function e() {
}
return function(t) {
if (!me(t))
return {};
if (Yo)
return Yo(t);
e.prototype = t;
var n = new e();
return e.prototype = i, n;
};
}();
function Dr() {
}
function et(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: Vu,
/**
* Used to detect code to be evaluated.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
evaluate: Hu,
/**
* Used to detect `data` property values to inject.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
interpolate: ao,
/**
* 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 = Dr.prototype, u.prototype.constructor = u, et.prototype = Sn(Dr.prototype), et.prototype.constructor = et;
function ne(e) {
this.__wrapped__ = e, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = gt, this.__views__ = [];
}
function Ef() {
var e = new ne(this.__wrapped__);
return e.__actions__ = Ue(this.__actions__), e.__dir__ = this.__dir__, e.__filtered__ = this.__filtered__, e.__iteratees__ = Ue(this.__iteratees__), e.__takeCount__ = this.__takeCount__, e.__views__ = Ue(this.__views__), e;
}
function If() {
if (this.__filtered__) {
var e = new ne(this);
e.__dir__ = -1, e.__filtered__ = !0;
} else
e = this.clone(), e.__dir__ *= -1;
return e;
}
function Rf() {
var e = this.__wrapped__.value(), t = this.__dir__, n = Y(e), s = t < 0, l = n ? e.length : 0, f = Gd(0, l, this.__views__), d = f.start, h = f.end, m = h - d, x = s ? h : d - 1, $ = this.__iteratees__, A = $.length, I = 0, P = Me(m, this.__takeCount__);
if (!n || !s && l == m && P == m)
return $l(e, this.__actions__);
var H = [];
e:
for (; m-- && I < P; ) {
x += t;
for (var J = -1, G = e[x]; ++J < A; ) {
var te = $[J], re = te.iteratee, Ye = te.type, Fe = re(G);
if (Ye == hi)
G = Fe;
else if (!Fe) {
if (Ye == jt)
continue e;
break e;
}
}
H[I++] = G;
}
return H;
}
ne.prototype = Sn(Dr.prototype), ne.prototype.constructor = ne;
function rn(e) {
var t = -1, n = e == null ? 0 : e.length;
for (this.clear(); ++t < n; ) {
var s = e[t];
this.set(s[0], s[1]);
}
}
function Lf() {
this.__data__ = qn ? qn(null) : {}, this.size = 0;
}
function Mf(e) {
var t = this.has(e) && delete this.__data__[e];
return this.size -= t ? 1 : 0, t;
}
function Bf(e) {
var t = this.__data__;
if (qn) {
var n = t[e];
return n === T ? i : n;
}
return ce.call(t, e) ? t[e] : i;
}
function Pf(e) {
var t = this.__data__;
return qn ? t[e] !== i : ce.call(t, e);
}
function Df(e, t) {
var n = this.__data__;
return this.size += this.has(e) ? 0 : 1, n[e] = qn && t === i ? T : t, this;
}
rn.prototype.clear = Lf, rn.prototype.delete = Mf, rn.prototype.get = Bf, rn.prototype.has = Pf, rn.prototype.set = Df;
function Ct(e) {
var t = -1, n = e == null ? 0 : e.length;
for (this.clear(); ++t < n; ) {
var s = e[t];
this.set(s[0], s[1]);
}
}
function Ff() {
this.__data__ = [], this.size = 0;
}
function Nf(e) {
var t = this.__data__, n = Fr(t, e);
if (n < 0)
return !1;
var s = t.length - 1;
return n == s ? t.pop() : Ir.call(t, n, 1), --this.size, !0;
}
function Uf(e) {
var t = this.__data__, n = Fr(t, e);
return n < 0 ? i : t[n][1];
}
function Wf(e) {
return Fr(this.__data__, e) > -1;
}
function Vf(e, t) {
var n = this.__data__, s = Fr(n, e);
return s < 0 ? (++this.size, n.push([e, t])) : n[s][1] = t, this;
}
Ct.prototype.clear = Ff, Ct.prototype.delete = Nf, Ct.prototype.get = Uf, Ct.prototype.has = Wf, Ct.prototype.set = Vf;
function Ot(e) {
var t = -1, n = e == null ? 0 : e.length;
for (this.clear(); ++t < n; ) {
var s = e[t];
this.set(s[0], s[1]);
}
}
function Hf() {
this.size = 0, this.__data__ = {
hash: new rn(),
map: new (Zn || Ct)(),
string: new rn()
};
}
function Gf(e) {
var t = Xr(this, e).delete(e);
return this.size -= t ? 1 : 0, t;
}
function Zf(e) {
return Xr(this, e).get(e);
}
function zf(e) {
return Xr(this, e).has(e);
}
function qf(e, t) {
var n = Xr(this, e), s = n.size;
return n.set(e, t), this.size += n.size == s ? 0 : 1, this;
}
Ot.prototype.clear = Hf, Ot.prototype.delete = Gf, Ot.prototype.get = Zf, Ot.prototype.has = zf, Ot.prototype.set = qf;
function sn(e) {
var t = -1, n = e == null ? 0 : e.length;
for (this.__data__ = new Ot(); ++t < n; )
this.add(e[t]);
}
function Kf(e) {
return this.__data__.set(e, T), this;
}
function Yf(e) {
return this.__data__.has(e);
}
sn.prototype.add = sn.prototype.push = Kf, sn.prototype.has = Yf;
function ft(e) {
var t = this.__data__ = new Ct(e);
this.size = t.size;
}
function Xf() {
this.__data__ = new Ct(), this.size = 0;
}
function Jf(e) {
var t = this.__data__, n = t.delete(e);
return this.size = t.size, n;
}
function Qf(e) {
return this.__data__.get(e);
}
function jf(e) {
return this.__data__.has(e);
}
function ed(e, t) {
var n = this.__data__;
if (n instanceof Ct) {
var s = n.__data__;
if (!Zn || s.length < a - 1)
return s.push([e, t]), this.size = ++n.size, this;
n = this.__data__ = new Ot(s);
}
return n.set(e, t), this.size = n.size, this;
}
ft.prototype.clear = Xf, ft.prototype.delete = Jf, ft.prototype.get = Qf, ft.prototype.has = jf, ft.prototype.set = ed;
function tl(e, t) {
var n = Y(e), s = !n && cn(e), l = !n && !s && qt(e), f = !n && !s && !l && En(e), d = n || s || l || f, h = d ? Ni(e.length, cf) : [], m = h.length;
for (var x in e)
(t || ce.call(e, x)) && !(d && // Safari 9 has enumerable `arguments.length` in strict mode.
(x == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
l && (x == "offset" || x == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
f && (x == "buffer" || x == "byteLength" || x == "byteOffset") || // Skip index properties.
Lt(x, m))) && h.push(x);
return h;
}
function nl(e) {
var t = e.length;
return t ? e[ns(0, t - 1)] : i;
}
function td(e, t) {
return Jr(Ue(e), on(t, 0, e.length));
}
function nd(e) {
return Jr(Ue(e));
}
function zi(e, t, n) {
(n !== i && !dt(e[t], n) || n === i && !(t in e)) && Et(e, t, n);
}
function Yn(e, t, n) {
var s = e[t];
(!(ce.call(e, t) && dt(s, n)) || n === i && !(t in e)) && Et(e, t, n);
}
function Fr(e, t) {
for (var n = e.length; n--; )
if (dt(e[n][0], t))
return n;
return -1;
}
function rd(e, t, n, s) {
return Ht(e, function(l, f, d) {
t(s, l, n(l), d);
}), s;
}
function rl(e, t) {
return e && yt(t, Ie(t), e);
}
function id(e, t) {
return e && yt(t, Ve(t), e);
}
function Et(e, t, n) {
t == "__proto__" && Rr ? Rr(e, t, {
configurable: !0,
enumerable: !0,
value: n,
writable: !0
}) : e[t] = n;
}
function qi(e, t) {
for (var n = -1, s = t.length, l = w(s), f = e == null; ++n < s; )
l[n] = f ? i : Ts(e, t[n]);
return l;
}
function on(e, t, n) {
return e === e && (n !== i && (e = e <= n ? e : n), t !== i && (e = e >= t ? e : t)), e;
}
function tt(e, t, n, s, l, f) {
var d, h = t & C, m = t & D, x = t & Q;
if (n && (d = l ? n(e, s, l, f) : n(e)), d !== i)
return d;
if (!me(e))
return e;
var $ = Y(e);
if ($) {
if (d = zd(e), !h)
return Ue(e, d);
} else {
var A = Be(e), I = A == vr || A == io;
if (qt(e))
return Tl(e, h);
if (A == Tt || A == vn || I && !l) {
if (d = m || I ? {} : zl(e), !h)
return m ? Bd(e, id(d, e)) : Md(e, rl(d, e));
} else {
if (!he[A])
return l ? e : {};
d = qd(e, A, h);
}
}
f || (f = new ft());
var P = f.get(e);
if (P)
return P;
f.set(e, d), wa(e) ? e.forEach(function(G) {
d.add(tt(G, t, n, G, e, f));
}) : ya(e) && e.forEach(function(G, te) {
d.set(te, tt(G, t, n, te, e, f));
});
var H = x ? m ? ps : ds : m ? Ve : Ie, J = $ ? i : H(e);
return Qe(J || e, function(G, te) {
J && (te = G, G = e[te]), Yn(d, te, tt(G, t, n, te, e, f));
}), d;
}
function sd(e) {
var t = Ie(e);
return function(n) {
return il(n, e, t);
};
}
function il(e, t, n) {
var s = n.length;
if (e == null)
return !s;
for (e = de(e); s--; ) {
var l = n[s], f = t[l], d = e[l];
if (d === i && !(l in e) || !f(d))
return !1;
}
return !0;
}
function sl(e, t, n) {
if (typeof e != "function")
throw new je(y);
return nr(function() {
e.apply(i, n);
}, t);
}
function Xn(e, t, n, s) {
var l = -1, f = wr, d = !0, h = e.length, m = [], x = t.length;
if (!h)
return m;
n && (t = ve(t, ze(n))), s ? (f = Li, d = !1) : t.length >= a && (f = Hn, d = !1, t = new sn(t));
e:
for (; ++l < h; ) {
var $ = e[l], A = n == null ? $ : n($);
if ($ = s || $ !== 0 ? $ : 0, d && A === A) {
for (var I = x; I--; )
if (t[I] === A)
continue e;
m.push($);
} else
f(t, A, s) || m.push($);
}
return m;
}
var Ht = Rl(mt), ol = Rl(Yi, !0);
function od(e, t) {
var n = !0;
return Ht(e, function(s, l, f) {
return n = !!t(s, l, f), n;
}), n;
}
function Nr(e, t, n) {
for (var s = -1, l = e.length; ++s < l; ) {
var f = e[s], d = t(f);
if (d != null && (h === i ? d === d && !Ke(d) : n(d, h)))
var h = d, m = f;
}
return m;
}
function ld(e, t, n, s) {
var l = e.length;
for (n = X(n), n < 0 && (n = -n > l ? 0 : l + n), s = s === i || s > l ? l : X(s), s < 0 && (s += l), s = n > s ? 0 : xa(s); n < s; )
e[n++] = t;
return e;
}
function ll(e, t) {
var n = [];
return Ht(e, function(s, l, f) {
t(s, l, f) && n.push(s);
}), n;
}
function Le(e, t, n, s, l) {
var f = -1, d = e.length;
for (n || (n = Yd), l || (l = []); ++f < d; ) {
var h = e[f];
t > 0 && n(h) ? t > 1 ? Le(h, t - 1, n, s, l) : Ut(l, h) : s || (l[l.length] = h);
}
return l;
}
var Ki = Ll(), al = Ll(!0);
function mt(e, t) {
return e && Ki(e, t, Ie);
}
function Yi(e, t) {
return e && al(e, t, Ie);
}
function Ur(e, t) {
return Nt(t, function(n) {
return Mt(e[n]);
});
}
function ln(e, t) {
t = Zt(t, e);
for (var n = 0, s = t.length; e != null && n < s; )
e = e[bt(t[n++])];
return n && n == s ? e : i;
}
function ul(e, t, n) {
var s = t(e);
return Y(e) ? s : Ut(s, n(e));
}
function Pe(e) {
return e == null ? e === i ? Bu : Lu : nn && nn in de(e) ? Hd(e) : np(e);
}
function Xi(e, t) {
return e > t;
}
function ad(e, t) {
return e != null && ce.call(e, t);
}
function ud(e, t) {
return e != null && t in de(e);
}
function cd(e, t, n) {
return e >= Me(t, n) && e < Oe(t, n);
}
function Ji(e, t, n) {
for (var s = n ? Li : wr, l = e[0].length, f = e.length, d = f, h = w(f), m = 1 / 0, x = []; d--; ) {
var $ = e[d];
d && t && ($ = ve($, ze(t))), m = Me($.length, m), h[d] = !n && (t || l >= 120 && $.length >= 120) ? new sn(d && $) : i;
}
$ = e[0];
var A = -1, I = h[0];
e:
for (; ++A < l && x.length < m; ) {
var P = $[A], H = t ? t(P) : P;
if (P = n || P !== 0 ? P : 0, !(I ? Hn(I, H) : s(x, H, n))) {
for (d = f; --d; ) {
var J = h[d];
if (!(J ? Hn(J, H) : s(e[d], H, n)))
continue e;
}
I && I.push(H), x.push(P);
}
}
return x;
}
function fd(e, t, n, s) {
return mt(e, function(l, f, d) {
t(s, n(l), f, d);
}), s;
}
function Jn(e, t, n) {
t = Zt(t, e), e = Xl(e, t);
var s = e == null ? e : e[bt(rt(t))];
return s == null ? i : Ze(s, e, n);
}
function cl(e) {
return ke(e) && Pe(e) == vn;
}
function dd(e) {
return ke(e) && Pe(e) == Vn;
}
function pd(e) {
return ke(e) && Pe(e) == Dn;
}
function Qn(e, t, n, s, l) {
return e === t ? !0 : e == null || t == null || !ke(e) && !ke(t) ? e !== e && t !== t : hd(e, t, n, s, Qn, l);
}
function hd(e, t, n, s, l, f) {
var d = Y(e), h = Y(t), m = d ? hr : Be(e), x = h ? hr : Be(t);
m = m == vn ? Tt : m, x = x == vn ? Tt : x;
var $ = m == Tt, A = x == Tt, I = m == x;
if (I && qt(e)) {
if (!qt(t))
return !1;
d = !0, $ = !1;
}
if (I && !$)
return f || (f = new ft()), d || En(e) ? Hl(e, t, n, s, l, f) : Wd(e, t, m, n, s, l, f);
if (!(n & ee)) {
var P = $ && ce.call(e, "__wrapped__"), H = A && ce.call(t, "__wrapped__");
if (P || H) {
var J = P ? e.value() : e, G = H ? t.value() : t;
return f || (f = new ft()), l(J, G, n, s, f);
}
}
return I ? (f || (f = new ft()), Vd(e, t, n, s, l, f)) : !1;
}
function _d(e) {
return ke(e) && Be(e) == at;
}
function Qi(e, t, n, s) {
var l = n.length, f = l, d = !s;
if (e == null)
return !f;
for (e = de(e); l--; ) {
var h = n[l];
if (d && h[2] ? h[1] !== e[h[0]] : !(h[0] in e))
return !1;
}
for (; ++l < f; ) {
h = n[l];
var m = h[0], x = e[m], $ = h[1];
if (d && h[2]) {
if (x === i && !(m in e))
return !1;
} else {
var A = new ft();
if (s)
var I = s(x, $, m, e, t, A);
if (!(I === i ? Qn($, x, ee | O, s, A) : I))
return !1;
}
}
return !0;
}
function fl(e) {
if (!me(e) || Jd(e))
return !1;
var t = Mt(e) ? _f : ic;
return t.test(un(e));
}
function vd(e) {
return ke(e) && Pe(e) == Nn;
}
function gd(e) {
return ke(e) && Be(e) == ut;
}
function md(e) {
return ke(e) && ri(e.length) && !!_e[Pe(e)];
}
function dl(e) {
return typeof e == "function" ? e : e == null ? He : typeof e == "object" ? Y(e) ? _l(e[0], e[1]) : hl(e) : Ma(e);
}
function ji(e) {
if (!tr(e))
return wf(e);
var t = [];
for (var n in de(e))
ce.call(e, n) && n != "constructor" && t.push(n);
return t;
}
function yd(e) {
if (!me(e))
return tp(e);
var t = tr(e), n = [];
for (var s in e)
s == "constructor" && (t || !ce.call(e, s)) || n.push(s);
return n;
}
function es(e, t) {
return e < t;
}
function pl(e, t) {
var n = -1, s = We(e) ? w(e.length) : [];
return Ht(e, function(l, f, d) {
s[++n] = t(l, f, d);
}), s;
}
function hl(e) {
var t = _s(e);
return t.length == 1 && t[0][2] ? Kl(t[0][0], t[0][1]) : function(n) {
return n === e || Qi(n, e, t);
};
}
function _l(e, t) {
return gs(e) && ql(t) ? Kl(bt(e), t) : function(n) {
var s = Ts(n, e);
return s === i && s === t ? Cs(n, e) : Qn(t, s, ee | O);
};
}
function Wr(e, t, n, s, l) {
e !== t && Ki(t, function(f, d) {
if (l || (l = new ft()), me(f))
bd(e, t, d, n, Wr, s, l);
else {
var h = s ? s(ys(e, d), f, d + "", e, t, l) : i;
h === i && (h = f), zi(e, d, h);
}
}, Ve);
}
function bd(e, t, n, s, l, f, d) {
var h = ys(e, n), m = ys(t, n), x = d.get(m);
if (x) {
zi(e, n, x);
return;
}
var $ = f ? f(h, m, n + "", e, t, d) : i, A = $ === i;
if (A) {
var I = Y(m), P = !I && qt(m), H = !I && !P && En(m);
$ = m, I || P || H ? Y(h) ? $ = h : xe(h) ? $ = Ue(h) : P ? (A = !1, $ = Tl(m, !0)) : H ? (A = !1, $ = Cl(m, !0)) : $ = [] : rr(m) || cn(m) ? ($ = h, cn(h) ? $ = $a(h) : (!me(h) || Mt(h)) && ($ = zl(m))) : A = !1;
}
A && (d.set(m, $), l($, m, s, f, d), d.delete(m)), zi(e, n, $);
}
function vl(e, t) {
var n = e.length;
if (n)
return t += t < 0 ? n : 0, Lt(t, n) ? e[t] : i;
}
function gl(e, t, n) {
t.length ? t = ve(t, function(f) {
return Y(f) ? function(d) {
return ln(d, f.length === 1 ? f[0] : f);
} : f;
}) : t = [He];
var s = -1;
t = ve(t, ze(U()));
var l = pl(e, function(f, d, h) {
var m = ve(t, function(x) {
return x(f);
});
return { criteria: m, index: ++s, value: f };
});
return zc(l, function(f, d) {
return Ld(f, d, n);
});
}
function wd(e, t) {
return ml(e, t, function(n, s) {
return Cs(e, s);
});
}
function ml(e, t, n) {
for (var s = -1, l = t.length, f = {}; ++s < l; ) {
var d = t[s], h = ln(e, d);
n(h, d) && jn(f, Zt(d, e), h);
}
return f;
}
function kd(e) {
return function(t) {
return ln(t, e);
};
}
function ts(e, t, n, s) {
var l = s ? Zc : yn, f = -1, d = t.length, h = e;
for (e === t && (t = Ue(t)), n && (h = ve(e, ze(n))); ++f < d; )
for (var m = 0, x = t[f], $ = n ? n(x) : x; (m = l(h, $, m, s)) > -1; )
h !== e && Ir.call(h, m, 1), Ir.call(e, m, 1);
return e;
}
function yl(e, t) {
for (var n = e ? t.length : 0, s = n - 1; n--; ) {
var l = t[n];
if (n == s || l !== f) {
var f = l;
Lt(l) ? Ir.call(e, l, 1) : ss(e, l);
}
}
return e;
}
function ns(e, t) {
return e + Mr(jo() * (t - e + 1));
}
function xd(e, t, n, s) {
for (var l = -1, f = Oe(Lr((t - e) / (n || 1)), 0), d = w(f); f--; )
d[s ? f : ++l] = e, e += n;
return d;
}
function rs(e, t) {
var n = "";
if (!e || t < 1 || t > Ft)
return n;
do
t % 2 && (n += e), t = Mr(t / 2), t && (e += e);
while (t);
return n;
}
function j(e, t) {
return bs(Yl(e, t, He), e + "");
}
function $d(e) {
return nl(In(e));
}
function Ad(e, t) {
var n = In(e);
return Jr(n, on(t, 0, n.length));
}
function jn(e, t, n, s) {
if (!me(e))
return e;
t = Zt(t, e);
for (var l = -1, f = t.length, d = f - 1, h = e; h != null && ++l < f; ) {
var m = bt(t[l]), x = n;
if (m === "__proto__" || m === "constructor" || m === "prototype")
return e;
if (l != d) {
var $ = h[m];
x = s ? s($, m, h) : i, x === i && (x = me($) ? $ : Lt(t[l + 1]) ? [] : {});
}
Yn(h, m, x), h = h[m];
}
return e;
}
var bl = Br ? function(e, t) {
return Br.set(e, t), e;
} : He, Sd = Rr ? function(e, t) {
return Rr(e, "toString", {
configurable: !0,
enumerable: !1,
value: Es(t),
writable: !0
});
} : He;
function Td(e) {
return Jr(In(e));
}
function nt(e, t, n) {
var s = -1, l = e.length;
t < 0 && (t = -t > l ? 0 : l + t), n = n > l ? l : n, n < 0 && (n += l), l = t > n ? 0 : n - t >>> 0, t >>>= 0;
for (var f = w(l); ++s < l; )
f[s] = e[s + t];
return f;
}
function Cd(e, t) {
var n;
return Ht(e, function(s, l, f) {
return n = t(s, l, f), !n;
}), !!n;
}
function Vr(e, t, n) {
var s = 0, l = e == null ? s : e.length;
if (typeof t == "number" && t === t && l <= Ou) {
for (; s < l; ) {
var f = s + l >>> 1, d = e[f];
d !== null && !Ke(d) && (n ? d <= t : d < t) ? s = f + 1 : l = f;
}
return l;
}
return is(e, t, He, n);
}
function is(e, t, n, s) {
var l = 0, f = e == null ? 0 : e.length;
if (f === 0)
return 0;
t = n(t);
for (var d = t !== t, h = t === null, m = Ke(t), x = t === i; l < f; ) {
var $ = Mr((l + f) / 2), A = n(e[$]), I = A !== i, P = A === null, H = A === A, J = Ke(A);
if (d)
var G = s || H;
else
x ? G = H && (s || I) : h ? G = H && I && (s || !P) : m ? G = H && I && !P && (s || !J) : P || J ? G = !1 : G = s ? A <= t : A < t;
G ? l = $ + 1 : f = $;
}
return Me(f, Cu);
}
function wl(e, t) {
for (var n = -1, s = e.length, l = 0, f = []; ++n < s; ) {
var d = e[n], h = t ? t(d) : d;
if (!n || !dt(h, m)) {
var m = h;
f[l++] = d === 0 ? 0 : d;
}
}
return f;
}
function kl(e) {
return typeof e == "number" ? e : Ke(e) ? pr : +e;
}
function qe(e) {
if (typeof e == "string")
return e;
if (Y(e))
return ve(e, qe) + "";
if (Ke(e))
return el ? el.call(e) : "";
var t = e + "";
return t == "0" && 1 / e == -en ? "-0" : t;
}
function Gt(e, t, n) {
var s = -1, l = wr, f = e.length, d = !0, h = [], m = h;
if (n)
d = !1, l = Li;
else if (f >= a) {
var x = t ? null : Nd(e);
if (x)
return xr(x);
d = !1, l = Hn, m = new sn();
} else
m = t ? [] : h;
e:
for (; ++s < f; ) {
var $ = e[s], A = t ? t($) : $;
if ($ = n || $ !== 0 ? $ : 0, d && A === A) {
for (var I = m.length; I--; )
if (m[I] === A)
continue e;
t && m.push(A), h.push($);
} else
l(m, A, n) || (m !== h && m.push(A), h.push($));
}
return h;
}
function ss(e, t) {
return t = Zt(t, e), e = Xl(e, t), e == null || delete e[bt(rt(t))];
}
function xl(e, t, n, s) {
return jn(e, t, n(ln(e, t)), s);
}
function Hr(e, t, n, s) {
for (var l = e.length, f = s ? l : -1; (s ? f-- : ++f < l) && t(e[f], f, e); )
;
return n ? nt(e, s ? 0 : f, s ? f + 1 : l) : nt(e, s ? f + 1 : 0, s ? l : f);
}
function $l(e, t) {
var n = e;
return n instanceof ne && (n = n.value()), Mi(t, function(s, l) {
return l.func.apply(l.thisArg, Ut([s], l.args));
}, n);
}
function os(e, t, n) {
var s = e.length;
if (s < 2)
return s ? Gt(e[0]) : [];
for (var l = -1, f = w(s); ++l < s; )
for (var d = e[l], h = -1; ++h < s; )
h != l && (f[l] = Xn(f[l] || d, e[h], t, n));
return Gt(Le(f, 1), t, n);
}
function Al(e, t, n) {
for (var s = -1, l = e.length, f = t.length, d = {}; ++s < l; ) {
var h = s < f ? t[s] : i;
n(d, e[s], h);
}
return d;
}
function ls(e) {
return xe(e) ? e : [];
}
function as(e) {
return typeof e == "function" ? e : He;
}
function Zt(e, t) {
return Y(e) ? e : gs(e, t) ? [e] : ea(ue(e));
}
var Od = j;
function zt(e, t, n) {
var s = e.length;
return n = n === i ? s : n, !t && n >= s ? e : nt(e, t, n);
}
var Sl = vf || function(e) {
return Re.clearTimeout(e);
};
function Tl(e, t) {
if (t)
return e.slice();
var n = e.length, s = Ko ? Ko(n) : new e.constructor(n);
return e.copy(s), s;
}
function us(e) {
var t = new e.constructor(e.byteLength);
return new Or(t).set(new Or(e)), t;
}
function Ed(e, t) {
var n = t ? us(e.buffer) : e.buffer;
return new e.constructor(n, e.byteOffset, e.byteLength);
}
function Id(e) {
var t = new e.constructor(e.source, uo.exec(e));
return t.lastIndex = e.lastIndex, t;
}
function Rd(e) {
return Kn ? de(Kn.call(e)) : {};
}
function Cl(e, t) {
var n = t ? us(e.buffer) : e.buffer;
return new e.constructor(n, e.byteOffset, e.length);
}
function Ol(e, t) {
if (e !== t) {
var n = e !== i, s = e === null, l = e === e, f = Ke(e), d = t !== i, h = t === null, m = t === t, x = Ke(t);
if (!h && !x && !f && e > t || f && d && m && !h && !x || s && d && m || !n && m || !l)
return 1;
if (!s && !f && !x && e < t || x && n && l && !s && !f || h && n && l || !d && l || !m)
return -1;
}
return 0;
}
function Ld(e, t, n) {
for (var s = -1, l = e.criteria, f = t.criteria, d = l.length, h = n.length; ++s < d; ) {
var m = Ol(l[s], f[s]);
if (m) {
if (s >= h)
return m;
var x = n[s];
return m * (x == "desc" ? -1 : 1);
}
}
return e.index - t.index;
}
function El(e, t, n, s) {
for (var l = -1, f = e.length, d = n.length, h = -1, m = t.length, x = Oe(f - d, 0), $ = w(m + x), A = !s; ++h < m; )
$[h] = t[h];
for (; ++l < d; )
(A || l < f) && ($[n[l]] = e[l]);
for (; x--; )
$[h++] = e[l++];
return $;
}
function Il(e, t, n, s) {
for (var l = -1, f = e.length, d = -1, h = n.length, m = -1, x = t.length, $ = Oe(f - h, 0), A = w($ + x), I = !s; ++l < $; )
A[l] = e[l];
for (var P = l; ++m < x; )
A[P + m] = t[m];
for (; ++d < h; )
(I || l < f) && (A[P + n[d]] = e[l++]);
return A;
}
function Ue(e, t) {
var n = -1, s = e.length;
for (t || (t = w(s)); ++n < s; )
t[n] = e[n];
return t;
}
function yt(e, t, n, s) {
var l = !n;
n || (n = {});
for (var f = -1, d = t.length; ++f < d; ) {
var h = t[f], m = s ? s(n[h], e[h], h, n, e) : i;
m === i && (m = e[h]), l ? Et(n, h, m) : Yn(n, h, m);
}
return n;
}
function Md(e, t) {
return yt(e, vs(e), t);
}
function Bd(e, t) {
return yt(e, Gl(e), t);
}
function Gr(e, t) {
return function(n, s) {
var l = Y(n) ? Nc : rd, f = t ? t() : {};
return l(n, e, U(s, 2), f);
};
}
function Tn(e) {
return j(function(t, n) {
var s = -1, l = n.length, f = l > 1 ? n[l - 1] : i, d = l > 2 ? n[2] : i;
for (f = e.length > 3 && typeof f == "function" ? (l--, f) : i, d && De(n[0], n[1], d) && (f = l < 3 ? i : f, l = 1), t = de(t); ++s < l; ) {
var h = n[s];
h && e(t, h, s, f);
}
return t;
});
}
function Rl(e, t) {
return function(n, s) {
if (n == null)
return n;
if (!We(n))
return e(n, s);
for (var l = n.length, f = t ? l : -1, d = de(n); (t ? f-- : ++f < l) && s(d[f], f, d) !== !1; )
;
return n;
};
}
function Ll(e) {
return function(t, n, s) {
for (var l = -1, f = de(t), d = s(t), h = d.length; h--; ) {
var m = d[e ? h : ++l];
if (n(f[m], m, f) === !1)
break;
}
return t;
};
}
function Pd(e, t, n) {
var s = t & E, l = er(e);
function f() {
var d = this && this !== Re && this instanceof f ? l : e;
return d.apply(s ? n : this, arguments);
}
return f;
}
function Ml(e) {
return function(t) {
t = ue(t);
var n = bn(t) ? ct(t) : i, s = n ? n[0] : t.charAt(0), l = n ? zt(n, 1).join("") : t.slice(1);
return s[e]() + l;
};
}
function Cn(e) {
return function(t) {
return Mi(Ra(Ia(t).replace(Ac, "")), e, "");
};
}
function er(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 = Sn(e.prototype), s = e.apply(n, t);
return me(s) ? s : n;
};
}
function Dd(e, t, n) {
var s = er(e);
function l() {
for (var f = arguments.length, d = w(f), h = f, m = On(l); h--; )
d[h] = arguments[h];
var x = f < 3 && d[0] !== m && d[f - 1] !== m ? [] : Wt(d, m);
if (f -= x.length, f < n)
return Nl(
e,
t,
Zr,
l.placeholder,
i,
d,
x,
i,
i,
n - f
);
var $ = this && this !== Re && this instanceof l ? s : e;
return Ze($, this, d);
}
return l;
}
function Bl(e) {
return function(t, n, s) {
var l = de(t);
if (!We(t)) {
var f = U(n, 3);
t = Ie(t), n = function(h) {
return f(l[h], h, l);
};
}
var d = e(t, n, s);
return d > -1 ? l[f ? t[d] : d] : i;
};
}
function Pl(e) {
return Rt(function(t) {
var n = t.length, s = n, l = et.prototype.thru;
for (e && t.reverse(); s--; ) {
var f = t[s];
if (typeof f != "function")
throw new je(y);
if (l && !d && Yr(f) == "wrapper")
var d = new et([], !0);
}
for (s = d ? s : n; ++s < n; ) {
f = t[s];
var h = Yr(f), m = h == "wrapper" ? hs(f) : i;
m && ms(m[0]) && m[1] == (Ee | F | q | At) && !m[4].length && m[9] == 1 ? d = d[Yr(m[0])].apply(d, m[3]) : d = f.length == 1 && ms(f) ? d[h]() : d.thru(f);
}
return function() {
var x = arguments, $ = x[0];
if (d && x.length == 1 && Y($))
return d.plant($).value();
for (var A = 0, I = n ? t[A].apply(this, x) : $; ++A < n; )
I = t[A].call(this, I);
return I;
};
});
}
function Zr(e, t, n, s, l, f, d, h, m, x) {
var $ = t & Ee, A = t & E, I = t & W, P = t & (F | Z), H = t & Bn, J = I ? i : er(e);
function G() {
for (var te = arguments.length, re = w(te), Ye = te; Ye--; )
re[Ye] = arguments[Ye];
if (P)
var Fe = On(G), Xe = Kc(re, Fe);
if (s && (re = El(re, s, l, P)), f && (re = Il(re, f, d, P)), te -= Xe, P && te < x) {
var $e = Wt(re, Fe);
return Nl(
e,
t,
Zr,
G.placeholder,
n,
re,
$e,
h,
m,
x - te
);
}
var pt = A ? n : this, Pt = I ? pt[e] : e;
return te = re.length, h ? re = rp(re, h) : H && te > 1 && re.reverse(), $ && m < te && (re.length = m), this && this !== Re && this instanceof G && (Pt = J || er(Pt)), Pt.apply(pt, re);
}
return G;
}
function Dl(e, t) {
return function(n, s) {
return fd(n, e, t(s), {});
};
}
function zr(e, t) {
return function(n, s) {
var l;
if (n === i && s === i)
return t;
if (n !== i && (l = n), s !== i) {
if (l === i)
return s;
typeof n == "string" || typeof s == "string" ? (n = qe(n), s = qe(s)) : (n = kl(n), s = kl(s)), l = e(n, s);
}
return l;
};
}
function cs(e) {
return Rt(function(t) {
return t = ve(t, ze(U())), j(function(n) {
var s = this;
return e(t, function(l) {
return Ze(l, s, n);
});
});
});
}
function qr(e, t) {
t = t === i ? " " : qe(t);
var n = t.length;
if (n < 2)
return n ? rs(t, e) : t;
var s = rs(t, Lr(e / wn(t)));
return bn(t) ? zt(ct(s), 0, e).join("") : s.slice(0, e);
}
function Fd(e, t, n, s) {
var l = t & E, f = er(e);
function d() {
for (var h = -1, m = arguments.length, x = -1, $ = s.length, A = w($ + m), I = this && this !== Re && this instanceof d ? f : e; ++x < $; )
A[x] = s[x];
for (; m--; )
A[x++] = arguments[++h];
return Ze(I, l ? n : this, A);
}
return d;
}
function Fl(e) {
return function(t, n, s) {
return s && typeof s != "number" && De(t, n, s) && (n = s = i), t = Bt(t), n === i ? (n = t, t = 0) : n = Bt(n), s = s === i ? t < n ? 1 : -1 : Bt(s), xd(t, n, s, e);
};
}
function Kr(e) {
return function(t, n) {
return typeof t == "string" && typeof n == "string" || (t = it(t), n = it(n)), e(t, n);
};
}
function Nl(e, t, n, s, l, f, d, h, m, x) {
var $ = t & F, A = $ ? d : i, I = $ ? i : d, P = $ ? f : i, H = $ ? i : f;
t |= $ ? q : ge, t &= ~($ ? ge : q), t & V || (t &= ~(E | W));
var J = [
e,
t,
l,
P,
A,
H,
I,
h,
m,
x
], G = n.apply(i, J);
return ms(e) && Jl(G, J), G.placeholder = s, Ql(G, e, t);
}
function fs(e) {
var t = Ce[e];
return function(n, s) {
if (n = it(n), s = s == null ? 0 : Me(X(s), 292), s && Qo(n)) {
var l = (ue(n) + "e").split("e"), f = t(l[0] + "e" + (+l[1] + s));
return l = (ue(f) + "e").split("e"), +(l[0] + "e" + (+l[1] - s));
}
return t(n);
};
}
var Nd = $n && 1 / xr(new $n([, -0]))[1] == en ? function(e) {
return new $n(e);
} : Ls;
function Ul(e) {
return function(t) {
var n = Be(t);
return n == at ? Wi(t) : n == ut ? tf(t) : qc(t, e(t));
};
}
function It(e, t, n, s, l, f, d, h) {
var m = t & W;
if (!m && typeof e != "function")
throw new je(y);
var x = s ? s.length : 0;
if (x || (t &= ~(q | ge), s = l = i), d = d === i ? d : Oe(X(d), 0), h = h === i ? h : X(h), x -= l ? l.length : 0, t & ge) {
var $ = s, A = l;
s = l = i;
}
var I = m ? i : hs(e), P = [
e,
t,
n,
s,
l,
$,
A,
f,
d,
h
];
if (I && ep(P, I), e = P[0], t = P[1], n = P[2], s = P[3], l = P[4], h = P[9] = P[9] === i ? m ? 0 : e.length : Oe(P[9] - x, 0), !h && t & (F | Z) && (t &= ~(F | Z)), !t || t == E)
var H = Pd(e, t, n);
else
t == F || t == Z ? H = Dd(e, t, h) : (t == q || t == (E | q)) && !l.length ? H = Fd(e, t, n, s) : H = Zr.apply(i, P);
var J = I ? bl : Jl;
return Ql(J(H, P), e, t);
}
function Wl(e, t, n, s) {
return e === i || dt(e, xn[n]) && !ce.call(s, n) ? t : e;
}
function Vl(e, t, n, s, l, f) {
return me(e) && me(t) && (f.set(t, e), Wr(e, t, i, Vl, f), f.delete(t)), e;
}
function Ud(e) {
return rr(e) ? i : e;
}
function Hl(e, t, n, s, l, f) {
var d = n & ee, h = e.length, m = t.length;
if (h != m && !(d && m > h))
return !1;
var x = f.get(e), $ = f.get(t);
if (x && $)
return x == t && $ == e;
var A = -1, I = !0, P = n & O ? new sn() : i;
for (f.set(e, t), f.set(t, e); ++A < h; ) {
var H = e[A], J = t[A];
if (s)
var G = d ? s(J, H, A, t, e, f) : s(H, J, A, e, t, f);
if (G !== i) {
if (G)
continue;
I = !1;
break;
}
if (P) {
if (!Bi(t, function(te, re) {
if (!Hn(P, re) && (H === te || l(H, te, n, s, f)))
return P.push(re);
})) {
I = !1;
break;
}
} else if (!(H === J || l(H, J, n, s, f))) {
I = !1;
break;
}
}
return f.delete(e), f.delete(t), I;
}
function Wd(e, t, n, s, l, f, d) {
switch (n) {
case gn:
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
return !1;
e = e.buffer, t = t.buffer;
case Vn:
return !(e.byteLength != t.byteLength || !f(new Or(e), new Or(t)));
case Pn:
case Dn:
case Fn:
return dt(+e, +t);
case _r:
return e.name == t.name && e.message == t.message;
case Nn:
case Un:
return e == t + "";
case at:
var h = Wi;
case ut:
var m = s & ee;
if (h || (h = xr), e.size != t.size && !m)
return !1;
var x = d.get(e);
if (x)
return x == t;
s |= O, d.set(e, t);
var $ = Hl(h(e), h(t), s, l, f, d);
return d.delete(e), $;
case gr:
if (Kn)
return Kn.call(e) == Kn.call(t);
}
return !1;
}
function Vd(e, t, n, s, l, f) {
var d = n & ee, h = ds(e), m = h.length, x = ds(t), $ = x.length;
if (m != $ && !d)
return !1;
for (var A = m; A--; ) {
var I = h[A];
if (!(d ? I in t : ce.call(t, I)))
return !1;
}
var P = f.get(e), H = f.get(t);
if (P && H)
return P == t && H == e;
var J = !0;
f.set(e, t), f.set(t, e);
for (var G = d; ++A < m; ) {
I = h[A];
var te = e[I], re = t[I];
if (s)
var Ye = d ? s(re, te, I, t, e, f) : s(te, re, I, e, t, f);
if (!(Ye === i ? te === re || l(te, re, n, s, f) : Ye)) {
J = !1;
break;
}
G || (G = I == "constructor");
}
if (J && !G) {
var Fe = e.constructor, Xe = t.constructor;
Fe != Xe && "constructor" in e && "constructor" in t && !(typeof Fe == "function" && Fe instanceof Fe && typeof Xe == "function" && Xe instanceof Xe) && (J = !1);
}
return f.delete(e), f.delete(t), J;
}
function Rt(e) {
return bs(Yl(e, i, ia), e + "");
}
function ds(e) {
return ul(e, Ie, vs);
}
function ps(e) {
return ul(e, Ve, Gl);
}
var hs = Br ? function(e) {
return Br.get(e);
} : Ls;
function Yr(e) {
for (var t = e.name + "", n = An[t], s = ce.call(An, t) ? n.length : 0; s--; ) {
var l = n[s], f = l.func;
if (f == null || f == e)
return l.name;
}
return t;
}
function On(e) {
var t = ce.call(u, "placeholder") ? u : e;
return t.placeholder;
}
function U() {
var e = u.iteratee || Is;
return e = e === Is ? dl : e, arguments.length ? e(arguments[0], arguments[1]) : e;
}
function Xr(e, t) {
var n = e.__data__;
return Xd(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
}
function _s(e) {
for (var t = Ie(e), n = t.length; n--; ) {
var s = t[n], l = e[s];
t[n] = [s, l, ql(l)];
}
return t;
}
function an(e, t) {
var n = Qc(e, t);
return fl(n) ? n : i;
}
function Hd(e) {
var t = ce.call(e, nn), n = e[nn];
try {
e[nn] = i;
var s = !0;
} catch {
}
var l = Tr.call(e);
return s && (t ? e[nn] = n : delete e[nn]), l;
}
var vs = Hi ? function(e) {
return e == null ? [] : (e = de(e), Nt(Hi(e), function(t) {
return Xo.call(e, t);
}));
} : Ms, Gl = Hi ? function(e) {
for (var t = []; e; )
Ut(t, vs(e)), e = Er(e);
return t;
} : Ms, Be = Pe;
(Gi && Be(new Gi(new ArrayBuffer(1))) != gn || Zn && Be(new Zn()) != at || Zi && Be(Zi.resolve()) != so || $n && Be(new $n()) != ut || zn && Be(new zn()) != Wn) && (Be = function(e) {
var t = Pe(e), n = t == Tt ? e.constructor : i, s = n ? un(n) : "";
if (s)
switch (s) {
case Af:
return gn;
case Sf:
return at;
case Tf:
return so;
case Cf:
return ut;
case Of:
return Wn;
}
return t;
});
function Gd(e, t, n) {
for (var s = -1, l = n.length; ++s < l; ) {
var f = n[s], d = f.size;
switch (f.type) {
case "drop":
e += d;
break;
case "dropRight":
t -= d;
break;
case "take":
t = Me(t, e + d);
break;
case "takeRight":
e = Oe(e, t - d);
break;
}
}
return { start: e, end: t };
}
function Zd(e) {
var t = e.match(Xu);
return t ? t[1].split(Ju) : [];
}
function Zl(e, t, n) {
t = Zt(t, e);
for (var s = -1, l = t.length, f = !1; ++s < l; ) {
var d = bt(t[s]);
if (!(f = e != null && n(e, d)))
break;
e = e[d];
}
return f || ++s != l ? f : (l = e == null ? 0 : e.length, !!l && ri(l) && Lt(d, l) && (Y(e) || cn(e)));
}
function zd(e) {
var t = e.length, n = new e.constructor(t);
return t && typeof e[0] == "string" && ce.call(e, "index") && (n.index = e.index, n.input = e.input), n;
}
function zl(e) {
return typeof e.constructor == "function" && !tr(e) ? Sn(Er(e)) : {};
}
function qd(e, t, n) {
var s = e.constructor;
switch (t) {
case Vn:
return us(e);
case Pn:
case Dn:
return new s(+e);
case gn:
return Ed(e, n);
case _i:
case vi:
case gi:
case mi:
case yi:
case bi:
case wi:
case ki:
case xi:
return Cl(e, n);
case at:
return new s();
case Fn:
case Un:
return new s(e);
case Nn:
return Id(e);
case ut:
return new s();
case gr:
return Rd(e);
}
}
function Kd(e, t) {
var n = t.length;
if (!n)
return e;
var s = n - 1;
return t[s] = (n > 1 ? "& " : "") + t[s], t = t.join(n > 2 ? ", " : " "), e.replace(Yu, `{
/* [wrapped with ` + t + `] */
`);
}
function Yd(e) {
return Y(e) || cn(e) || !!(Jo && e && e[Jo]);
}
function Lt(e, t) {
var n = typeof e;
return t = t ?? Ft, !!t && (n == "number" || n != "symbol" && oc.test(e)) && e > -1 && e % 1 == 0 && e < t;
}
function De(e, t, n) {
if (!me(n))
return !1;
var s = typeof t;
return (s == "number" ? We(n) && Lt(t, n.length) : s == "string" && t in n) ? dt(n[t], e) : !1;
}
function gs(e, t) {
if (Y(e))
return !1;
var n = typeof e;
return n == "number" || n == "symbol" || n == "boolean" || e == null || Ke(e) ? !0 : Zu.test(e) || !Gu.test(e) || t != null && e in de(t);
}
function Xd(e) {
var t = typeof e;
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
}
function ms(e) {
var t = Yr(e), n = u[t];
if (typeof n != "function" || !(t in ne.prototype))
return !1;
if (e === n)
return !0;
var s = hs(n);
return !!s && e === s[0];
}
function Jd(e) {
return !!qo && qo in e;
}
var Qd = Ar ? Mt : Bs;
function tr(e) {
var t = e && e.constructor, n = typeof t == "function" && t.prototype || xn;
return e === n;
}
function ql(e) {
return e === e && !me(e);
}
function Kl(e, t) {
return function(n) {
return n == null ? !1 : n[e] === t && (t !== i || e in de(n));
};
}
function jd(e) {
var t = ti(e, function(s) {
return n.size === g && n.clear(), s;
}), n = t.cache;
return t;
}
function ep(e, t) {
var n = e[1], s = t[1], l = n | s, f = l < (E | W | Ee), d = s == Ee && n == F || s == Ee && n == At && e[7].length <= t[8] || s == (Ee | At) && t[7].length <= t[8] && n == F;
if (!(f || d))
return e;
s & E && (e[2] = t[2], l |= n & E ? 0 : V);
var h = t[3];
if (h) {
var m = e[3];
e[3] = m ? El(m, h, t[4]) : h, e[4] = m ? Wt(e[3], _) : t[4];
}
return h = t[5], h && (m = e[5], e[5] = m ? Il(m, h, t[6]) : h, e[6] = m ? Wt(e[5], _) : t[6]), h = t[7], h && (e[7] = h), s & Ee && (e[8] = e[8] == null ? t[8] : Me(e[8], t[8])), e[9] == null && (e[9] = t[9]), e[0] = t[0], e[1] = l, e;
}
function tp(e) {
var t = [];
if (e != null)
for (var n in de(e))
t.push(n);
return t;
}
function np(e) {
return Tr.call(e);
}
function Yl(e, t, n) {
return t = Oe(t === i ? e.length - 1 : t, 0), function() {
for (var s = arguments, l = -1, f = Oe(s.length - t, 0), d = w(f); ++l < f; )
d[l] = s[t + l];
l = -1;
for (var h = w(t + 1); ++l < t; )
h[l] = s[l];
return h[t] = n(d), Ze(e, this, h);
};
}
function Xl(e, t) {
return t.length < 2 ? e : ln(e, nt(t, 0, -1));
}
function rp(e, t) {
for (var n = e.length, s = Me(t.length, n), l = Ue(e); s--; ) {
var f = t[s];
e[s] = Lt(f, n) ? l[f] : i;
}
return e;
}
function ys(e, t) {
if (!(t === "constructor" && typeof e[t] == "function") && t != "__proto__")
return e[t];
}
var Jl = jl(bl), nr = mf || function(e, t) {
return Re.setTimeout(e, t);
}, bs = jl(Sd);
function Ql(e, t, n) {
var s = t + "";
return bs(e, Kd(s, ip(Zd(s), n)));
}
function jl(e) {
var t = 0, n = 0;
return function() {
var s = kf(), l = St - (s - n);
if (n = s, l > 0) {
if (++t >= vt)
return arguments[0];
} else
t = 0;
return e.apply(i, arguments);
};
}
function Jr(e, t) {
var n = -1, s = e.length, l = s - 1;
for (t = t === i ? s : t; ++n < t; ) {
var f = ns(n, l), d = e[f];
e[f] = e[n], e[n] = d;
}
return e.length = t, e;
}
var ea = jd(function(e) {
var t = [];
return e.charCodeAt(0) === 46 && t.push(""), e.replace(zu, function(n, s, l, f) {
t.push(l ? f.replace(ec, "$1") : s || n);
}), t;
});
function bt(e) {
if (typeof e == "string" || Ke(e))
return e;
var t = e + "";
return t == "0" && 1 / e == -en ? "-0" : t;
}
function un(e) {
if (e != null) {
try {
return Sr.call(e);
} catch {
}
try {
return e + "";
} catch {
}
}
return "";
}
function ip(e, t) {
return Qe(Eu, function(n) {
var s = "_." + n[0];
t & n[1] && !wr(e, s) && e.push(s);
}), e.sort();
}
function ta(e) {
if (e instanceof ne)
return e.clone();
var t = new et(e.__wrapped__, e.__chain__);
return t.__actions__ = Ue(e.__actions__), t.__index__ = e.__index__, t.__values__ = e.__values__, t;
}
function sp(e, t, n) {
(n ? De(e, t, n) : t === i) ? t = 1 : t = Oe(X(t), 0);
var s = e == null ? 0 : e.length;
if (!s || t < 1)
return [];
for (var l = 0, f = 0, d = w(Lr(s / t)); l < s; )
d[f++] = nt(e, l, l += t);
return d;
}
function op(e) {
for (var t = -1, n = e == null ? 0 : e.length, s = 0, l = []; ++t < n; ) {
var f = e[t];
f && (l[s++] = f);
}
return l;
}
function lp() {
var e = arguments.length;
if (!e)
return [];
for (var t = w(e - 1), n = arguments[0], s = e; s--; )
t[s - 1] = arguments[s];
return Ut(Y(n) ? Ue(n) : [n], Le(t, 1));
}
var ap = j(function(e, t) {
return xe(e) ? Xn(e, Le(t, 1, xe, !0)) : [];
}), up = j(function(e, t) {
var n = rt(t);
return xe(n) && (n = i), xe(e) ? Xn(e, Le(t, 1, xe, !0), U(n, 2)) : [];
}), cp = j(function(e, t) {
var n = rt(t);
return xe(n) && (n = i), xe(e) ? Xn(e, Le(t, 1, xe, !0), i, n) : [];
});
function fp(e, t, n) {
var s = e == null ? 0 : e.length;
return s ? (t = n || t === i ? 1 : X(t), nt(e, t < 0 ? 0 : t, s)) : [];
}
function dp(e, t, n) {
var s = e == null ? 0 : e.length;
return s ? (t = n || t === i ? 1 : X(t), t = s - t, nt(e, 0, t < 0 ? 0 : t)) : [];
}
function pp(e, t) {
return e && e.length ? Hr(e, U(t, 3), !0, !0) : [];
}
function hp(e, t) {
return e && e.length ? Hr(e, U(t, 3), !0) : [];
}
function _p(e, t, n, s) {
var l = e == null ? 0 : e.length;
return l ? (n && typeof n != "number" && De(e, t, n) && (n = 0, s = l), ld(e, t, n, s)) : [];
}
function na(e, t, n) {
var s = e == null ? 0 : e.length;
if (!s)
return -1;
var l = n == null ? 0 : X(n);
return l < 0 && (l = Oe(s + l, 0)), kr(e, U(t, 3), l);
}
function ra(e, t, n) {
var s = e == null ? 0 : e.length;
if (!s)
return -1;
var l = s - 1;
return n !== i && (l = X(n), l = n < 0 ? Oe(s + l, 0) : Me(l, s - 1)), kr(e, U(t, 3), l, !0);
}
function ia(e) {
var t = e == null ? 0 : e.length;
return t ? Le(e, 1) : [];
}
function vp(e) {
var t = e == null ? 0 : e.length;
return t ? Le(e, en) : [];
}
function gp(e, t) {
var n = e == null ? 0 : e.length;
return n ? (t = t === i ? 1 : X(t), Le(e, t)) : [];
}
function mp(e) {
for (var t = -1, n = e == null ? 0 : e.length, s = {}; ++t < n; ) {
var l = e[t];
s[l[0]] = l[1];
}
return s;
}
function sa(e) {
return e && e.length ? e[0] : i;
}
function yp(e, t, n) {
var s = e == null ? 0 : e.length;
if (!s)
return -1;
var l = n == null ? 0 : X(n);
return l < 0 && (l = Oe(s + l, 0)), yn(e, t, l);
}
function bp(e) {
var t = e == null ? 0 : e.length;
return t ? nt(e, 0, -1) : [];
}
var wp = j(function(e) {
var t = ve(e, ls);
return t.length && t[0] === e[0] ? Ji(t) : [];
}), kp = j(function(e) {
var t = rt(e), n = ve(e, ls);
return t === rt(n) ? t = i : n.pop(), n.length && n[0] === e[0] ? Ji(n, U(t, 2)) : [];
}), xp = j(function(e) {
var t = rt(e), n = ve(e, ls);
return t = typeof t == "function" ? t : i, t && n.pop(), n.length && n[0] === e[0] ? Ji(n, i, t) : [];
});
function $p(e, t) {
return e == null ? "" : bf.call(e, t);
}
function rt(e) {
var t = e == null ? 0 : e.length;
return t ? e[t - 1] : i;
}
function Ap(e, t, n) {
var s = e == null ? 0 : e.length;
if (!s)
return -1;
var l = s;
return n !== i && (l = X(n), l = l < 0 ? Oe(s + l, 0) : Me(l, s - 1)), t === t ? rf(e, t, l) : kr(e, No, l, !0);
}
function Sp(e, t) {
return e && e.length ? vl(e, X(t)) : i;
}
var Tp = j(oa);
function oa(e, t) {
return e && e.length && t && t.length ? ts(e, t) : e;
}
function Cp(e, t, n) {
return e && e.length && t && t.length ? ts(e, t, U(n, 2)) : e;
}
function Op(e, t, n) {
return e && e.length && t && t.length ? ts(e, t, i, n) : e;
}
var Ep = Rt(function(e, t) {
var n = e == null ? 0 : e.length, s = qi(e, t);
return yl(e, ve(t, function(l) {
return Lt(l, n) ? +l : l;
}).sort(Ol)), s;
});
function Ip(e, t) {
var n = [];
if (!(e && e.length))
return n;
var s = -1, l = [], f = e.length;
for (t = U(t, 3); ++s < f; ) {
var d = e[s];
t(d, s, e) && (n.push(d), l.push(s));
}
return yl(e, l), n;
}
function ws(e) {
return e == null ? e : $f.call(e);
}
function Rp(e, t, n) {
var s = e == null ? 0 : e.length;
return s ? (n && typeof n != "number" && De(e, t, n) ? (t = 0, n = s) : (t = t == null ? 0 : X(t), n = n === i ? s : X(n)), nt(e, t, n)) : [];
}
function Lp(e, t) {
return Vr(e, t);
}
function Mp(e, t, n) {
return is(e, t, U(n, 2));
}
function Bp(e, t) {
var n = e == null ? 0 : e.length;
if (n) {
var s = Vr(e, t);
if (s < n && dt(e[s], t))
return s;
}
return -1;
}
function Pp(e, t) {
return Vr(e, t, !0);
}
function Dp(e, t, n) {
return is(e, t, U(n, 2), !0);
}
function Fp(e, t) {
var n = e == null ? 0 : e.length;
if (n) {
var s = Vr(e, t, !0) - 1;
if (dt(e[s], t))
return s;
}
return -1;
}
function Np(e) {
return e && e.length ? wl(e) : [];
}
function Up(e, t) {
return e && e.length ? wl(e, U(t, 2)) : [];
}
function Wp(e) {
var t = e == null ? 0 : e.length;
return t ? nt(e, 1, t) : [];
}
function Vp(e, t, n) {
return e && e.length ? (t = n || t === i ? 1 : X(t), nt(e, 0, t < 0 ? 0 : t)) : [];
}
function Hp(e, t, n) {
var s = e == null ? 0 : e.length;
return s ? (t = n || t === i ? 1 : X(t), t = s - t, nt(e, t < 0 ? 0 : t, s)) : [];
}
function Gp(e, t) {
return e && e.length ? Hr(e, U(t, 3), !1, !0) : [];
}
function Zp(e, t) {
return e && e.length ? Hr(e, U(t, 3)) : [];
}
var zp = j(function(e) {
return Gt(Le(e, 1, xe, !0));
}), qp = j(function(e) {
var t = rt(e);
return xe(t) && (t = i), Gt(Le(e, 1, xe, !0), U(t, 2));
}), Kp = j(function(e) {
var t = rt(e);
return t = typeof t == "function" ? t : i, Gt(Le(e, 1, xe, !0), i, t);
});
function Yp(e) {
return e && e.length ? Gt(e) : [];
}
function Xp(e, t) {
return e && e.length ? Gt(e, U(t, 2)) : [];
}
function Jp(e, t) {
return t = typeof t == "function" ? t : i, e && e.length ? Gt(e, i, t) : [];
}
function ks(e) {
if (!(e && e.length))
return [];
var t = 0;
return e = Nt(e, function(n) {
if (xe(n))
return t = Oe(n.length, t), !0;
}), Ni(t, function(n) {
return ve(e, Pi(n));
});
}
function la(e, t) {
if (!(e && e.length))
return [];
var n = ks(e);
return t == null ? n : ve(n, function(s) {
return Ze(t, i, s);
});
}
var Qp = j(function(e, t) {
return xe(e) ? Xn(e, t) : [];
}), jp = j(function(e) {
return os(Nt(e, xe));
}), eh = j(function(e) {
var t = rt(e);
return xe(t) && (t = i), os(Nt(e, xe), U(t, 2));
}), th = j(function(e) {
var t = rt(e);
return t = typeof t == "function" ? t : i, os(Nt(e, xe), i, t);
}), nh = j(ks);
function rh(e, t) {
return Al(e || [], t || [], Yn);
}
function ih(e, t) {
return Al(e || [], t || [], jn);
}
var sh = j(function(e) {
var t = e.length, n = t > 1 ? e[t - 1] : i;
return n = typeof n == "function" ? (e.pop(), n) : i, la(e, n);
});
function aa(e) {
var t = u(e);
return t.__chain__ = !0, t;
}
function oh(e, t) {
return t(e), e;
}
function Qr(e, t) {
return t(e);
}
var lh = Rt(function(e) {
var t = e.length, n = t ? e[0] : 0, s = this.__wrapped__, l = function(f) {
return qi(f, e);
};
return t > 1 || this.__actions__.length || !(s instanceof ne) || !Lt(n) ? this.thru(l) : (s = s.slice(n, +n + (t ? 1 : 0)), s.__actions__.push({
func: Qr,
args: [l],
thisArg: i
}), new et(s, this.__chain__).thru(function(f) {
return t && !f.length && f.push(i), f;
}));
});
function ah() {
return aa(this);
}
function uh() {
return new et(this.value(), this.__chain__);
}
function ch() {
this.__values__ === i && (this.__values__ = ka(this.value()));
var e = this.__index__ >= this.__values__.length, t = e ? i : this.__values__[this.__index__++];
return { done: e, value: t };
}
function fh() {
return this;
}
function dh(e) {
for (var t, n = this; n instanceof Dr; ) {
var s = ta(n);
s.__index__ = 0, s.__values__ = i, t ? l.__wrapped__ = s : t = s;
var l = s;
n = n.__wrapped__;
}
return l.__wrapped__ = e, t;
}
function ph() {
var e = this.__wrapped__;
if (e instanceof ne) {
var t = e;
return this.__actions__.length && (t = new ne(this)), t = t.reverse(), t.__actions__.push({
func: Qr,
args: [ws],
thisArg: i
}), new et(t, this.__chain__);
}
return this.thru(ws);
}
function hh() {
return $l(this.__wrapped__, this.__actions__);
}
var _h = Gr(function(e, t, n) {
ce.call(e, n) ? ++e[n] : Et(e, n, 1);
});
function vh(e, t, n) {
var s = Y(e) ? Do : od;
return n && De(e, t, n) && (t = i), s(e, U(t, 3));
}
function gh(e, t) {
var n = Y(e) ? Nt : ll;
return n(e, U(t, 3));
}
var mh = Bl(na), yh = Bl(ra);
function bh(e, t) {
return Le(jr(e, t), 1);
}
function wh(e, t) {
return Le(jr(e, t), en);
}
function kh(e, t, n) {
return n = n === i ? 1 : X(n), Le(jr(e, t), n);
}
function ua(e, t) {
var n = Y(e) ? Qe : Ht;
return n(e, U(t, 3));
}
function ca(e, t) {
var n = Y(e) ? Uc : ol;
return n(e, U(t, 3));
}
var xh = Gr(function(e, t, n) {
ce.call(e, n) ? e[n].push(t) : Et(e, n, [t]);
});
function $h(e, t, n, s) {
e = We(e) ? e : In(e), n = n && !s ? X(n) : 0;
var l = e.length;
return n < 0 && (n = Oe(l + n, 0)), ii(e) ? n <= l && e.indexOf(t, n) > -1 : !!l && yn(e, t, n) > -1;
}
var Ah = j(function(e, t, n) {
var s = -1, l = typeof t == "function", f = We(e) ? w(e.length) : [];
return Ht(e, function(d) {
f[++s] = l ? Ze(t, d, n) : Jn(d, t, n);
}), f;
}), Sh = Gr(function(e, t, n) {
Et(e, n, t);
});
function jr(e, t) {
var n = Y(e) ? ve : pl;
return n(e, U(t, 3));
}
function Th(e, t, n, s) {
return e == null ? [] : (Y(t) || (t = t == null ? [] : [t]), n = s ? i : n, Y(n) || (n = n == null ? [] : [n]), gl(e, t, n));
}
var Ch = Gr(function(e, t, n) {
e[n ? 0 : 1].push(t);
}, function() {
return [[], []];
});
function Oh(e, t, n) {
var s = Y(e) ? Mi : Wo, l = arguments.length < 3;
return s(e, U(t, 4), n, l, Ht);
}
function Eh(e, t, n) {
var s = Y(e) ? Wc : Wo, l = arguments.length < 3;
return s(e, U(t, 4), n, l, ol);
}
function Ih(e, t) {
var n = Y(e) ? Nt : ll;
return n(e, ni(U(t, 3)));
}
function Rh(e) {
var t = Y(e) ? nl : $d;
return t(e);
}
function Lh(e, t, n) {
(n ? De(e, t, n) : t === i) ? t = 1 : t = X(t);
var s = Y(e) ? td : Ad;
return s(e, t);
}
function Mh(e) {
var t = Y(e) ? nd : Td;
return t(e);
}
function Bh(e) {
if (e == null)
return 0;
if (We(e))
return ii(e) ? wn(e) : e.length;
var t = Be(e);
return t == at || t == ut ? e.size : ji(e).length;
}
function Ph(e, t, n) {
var s = Y(e) ? Bi : Cd;
return n && De(e, t, n) && (t = i), s(e, U(t, 3));
}
var Dh = j(function(e, t) {
if (e == null)
return [];
var n = t.length;
return n > 1 && De(e, t[0], t[1]) ? t = [] : n > 2 && De(t[0], t[1], t[2]) && (t = [t[0]]), gl(e, Le(t, 1), []);
}), ei = gf || function() {
return Re.Date.now();
};
function Fh(e, t) {
if (typeof t != "function")
throw new je(y);
return e = X(e), function() {
if (--e < 1)
return t.apply(this, arguments);
};
}
function fa(e, t, n) {
return t = n ? i : t, t = e && t == null ? e.length : t, It(e, Ee, i, i, i, i, t);
}
function da(e, t) {
var n;
if (typeof t != "function")
throw new je(y);
return e = X(e), function() {
return --e > 0 && (n = t.apply(this, arguments)), e <= 1 && (t = i), n;
};
}
var xs = j(function(e, t, n) {
var s = E;
if (n.length) {
var l = Wt(n, On(xs));
s |= q;
}
return It(e, s, t, n, l);
}), pa = j(function(e, t, n) {
var s = E | W;
if (n.length) {
var l = Wt(n, On(pa));
s |= q;
}
return It(t, s, e, n, l);
});
function ha(e, t, n) {
t = n ? i : t;
var s = It(e, F, i, i, i, i, i, t);
return s.placeholder = ha.placeholder, s;
}
function _a(e, t, n) {
t = n ? i : t;
var s = It(e, Z, i, i, i, i, i, t);
return s.placeholder = _a.placeholder, s;
}
function va(e, t, n) {
var s, l, f, d, h, m, x = 0, $ = !1, A = !1, I = !0;
if (typeof e != "function")
throw new je(y);
t = it(t) || 0, me(n) && ($ = !!n.leading, A = "maxWait" in n, f = A ? Oe(it(n.maxWait) || 0, t) : f, I = "trailing" in n ? !!n.trailing : I);
function P($e) {
var pt = s, Pt = l;
return s = l = i, x = $e, d = e.apply(Pt, pt), d;
}
function H($e) {
return x = $e, h = nr(te, t), $ ? P($e) : d;
}
function J($e) {
var pt = $e - m, Pt = $e - x, Ba = t - pt;
return A ? Me(Ba, f - Pt) : Ba;
}
function G($e) {
var pt = $e - m, Pt = $e - x;
return m === i || pt >= t || pt < 0 || A && Pt >= f;
}
function te() {
var $e = ei();
if (G($e))
return re($e);
h = nr(te, J($e));
}
function re($e) {
return h = i, I && s ? P($e) : (s = l = i, d);
}
function Ye() {
h !== i && Sl(h), x = 0, s = m = l = h = i;
}
function Fe() {
return h === i ? d : re(ei());
}
function Xe() {
var $e = ei(), pt = G($e);
if (s = arguments, l = this, m = $e, pt) {
if (h === i)
return H(m);
if (A)
return Sl(h), h = nr(te, t), P(m);
}
return h === i && (h = nr(te, t)), d;
}
return Xe.cancel = Ye, Xe.flush = Fe, Xe;
}
var Nh = j(function(e, t) {
return sl(e, 1, t);
}), Uh = j(function(e, t, n) {
return sl(e, it(t) || 0, n);
});
function Wh(e) {
return It(e, Bn);
}
function ti(e, t) {
if (typeof e != "function" || t != null && typeof t != "function")
throw new je(y);
var n = function() {
var s = arguments, l = t ? t.apply(this, s) : s[0], f = n.cache;
if (f.has(l))
return f.get(l);
var d = e.apply(this, s);
return n.cache = f.set(l, d) || f, d;
};
return n.cache = new (ti.Cache || Ot)(), n;
}
ti.Cache = Ot;
function ni(e) {
if (typeof e != "function")
throw new je(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 Vh(e) {
return da(2, e);
}
var Hh = Od(function(e, t) {
t = t.length == 1 && Y(t[0]) ? ve(t[0], ze(U())) : ve(Le(t, 1), ze(U()));
var n = t.length;
return j(function(s) {
for (var l = -1, f = Me(s.length, n); ++l < f; )
s[l] = t[l].call(this, s[l]);
return Ze(e, this, s);
});
}), $s = j(function(e, t) {
var n = Wt(t, On($s));
return It(e, q, i, t, n);
}), ga = j(function(e, t) {
var n = Wt(t, On(ga));
return It(e, ge, i, t, n);
}), Gh = Rt(function(e, t) {
return It(e, At, i, i, i, t);
});
function Zh(e, t) {
if (typeof e != "function")
throw new je(y);
return t = t === i ? t : X(t), j(e, t);
}
function zh(e, t) {
if (typeof e != "function")
throw new je(y);
return t = t == null ? 0 : Oe(X(t), 0), j(function(n) {
var s = n[t], l = zt(n, 0, t);
return s && Ut(l, s), Ze(e, this, l);
});
}
function qh(e, t, n) {
var s = !0, l = !0;
if (typeof e != "function")
throw new je(y);
return me(n) && (s = "leading" in n ? !!n.leading : s, l = "trailing" in n ? !!n.trailing : l), va(e, t, {
leading: s,
maxWait: t,
trailing: l
});
}
function Kh(e) {
return fa(e, 1);
}
function Yh(e, t) {
return $s(as(t), e);
}
function Xh() {
if (!arguments.length)
return [];
var e = arguments[0];
return Y(e) ? e : [e];
}
function Jh(e) {
return tt(e, Q);
}
function Qh(e, t) {
return t = typeof t == "function" ? t : i, tt(e, Q, t);
}
function jh(e) {
return tt(e, C | Q);
}
function e_(e, t) {
return t = typeof t == "function" ? t : i, tt(e, C | Q, t);
}
function t_(e, t) {
return t == null || il(e, t, Ie(t));
}
function dt(e, t) {
return e === t || e !== e && t !== t;
}
var n_ = Kr(Xi), r_ = Kr(function(e, t) {
return e >= t;
}), cn = cl(function() {
return arguments;
}()) ? cl : function(e) {
return ke(e) && ce.call(e, "callee") && !Xo.call(e, "callee");
}, Y = w.isArray, i_ = Io ? ze(Io) : dd;
function We(e) {
return e != null && ri(e.length) && !Mt(e);
}
function xe(e) {
return ke(e) && We(e);
}
function s_(e) {
return e === !0 || e === !1 || ke(e) && Pe(e) == Pn;
}
var qt = yf || Bs, o_ = Ro ? ze(Ro) : pd;
function l_(e) {
return ke(e) && e.nodeType === 1 && !rr(e);
}
function a_(e) {
if (e == null)
return !0;
if (We(e) && (Y(e) || typeof e == "string" || typeof e.splice == "function" || qt(e) || En(e) || cn(e)))
return !e.length;
var t = Be(e);
if (t == at || t == ut)
return !e.size;
if (tr(e))
return !ji(e).length;
for (var n in e)
if (ce.call(e, n))
return !1;
return !0;
}
function u_(e, t) {
return Qn(e, t);
}
function c_(e, t, n) {
n = typeof n == "function" ? n : i;
var s = n ? n(e, t) : i;
return s === i ? Qn(e, t, i, n) : !!s;
}
function As(e) {
if (!ke(e))
return !1;
var t = Pe(e);
return t == _r || t == Ru || typeof e.message == "string" && typeof e.name == "string" && !rr(e);
}
function f_(e) {
return typeof e == "number" && Qo(e);
}
function Mt(e) {
if (!me(e))
return !1;
var t = Pe(e);
return t == vr || t == io || t == Iu || t == Mu;
}
function ma(e) {
return typeof e == "number" && e == X(e);
}
function ri(e) {
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Ft;
}
function me(e) {
var t = typeof e;
return e != null && (t == "object" || t == "function");
}
function ke(e) {
return e != null && typeof e == "object";
}
var ya = Lo ? ze(Lo) : _d;
function d_(e, t) {
return e === t || Qi(e, t, _s(t));
}
function p_(e, t, n) {
return n = typeof n == "function" ? n : i, Qi(e, t, _s(t), n);
}
function h_(e) {
return ba(e) && e != +e;
}
function __(e) {
if (Qd(e))
throw new K(p);
return fl(e);
}
function v_(e) {
return e === null;
}
function g_(e) {
return e == null;
}
function ba(e) {
return typeof e == "number" || ke(e) && Pe(e) == Fn;
}
function rr(e) {
if (!ke(e) || Pe(e) != Tt)
return !1;
var t = Er(e);
if (t === null)
return !0;
var n = ce.call(t, "constructor") && t.constructor;
return typeof n == "function" && n instanceof n && Sr.call(n) == pf;
}
var Ss = Mo ? ze(Mo) : vd;
function m_(e) {
return ma(e) && e >= -Ft && e <= Ft;
}
var wa = Bo ? ze(Bo) : gd;
function ii(e) {
return typeof e == "string" || !Y(e) && ke(e) && Pe(e) == Un;
}
function Ke(e) {
return typeof e == "symbol" || ke(e) && Pe(e) == gr;
}
var En = Po ? ze(Po) : md;
function y_(e) {
return e === i;
}
function b_(e) {
return ke(e) && Be(e) == Wn;
}
function w_(e) {
return ke(e) && Pe(e) == Pu;
}
var k_ = Kr(es), x_ = Kr(function(e, t) {
return e <= t;
});
function ka(e) {
if (!e)
return [];
if (We(e))
return ii(e) ? ct(e) : Ue(e);
if (Gn && e[Gn])
return ef(e[Gn]());
var t = Be(e), n = t == at ? Wi : t == ut ? xr : In;
return n(e);
}
function Bt(e) {
if (!e)
return e === 0 ? e : 0;
if (e = it(e), e === en || e === -en) {
var t = e < 0 ? -1 : 1;
return t * Tu;
}
return e === e ? e : 0;
}
function X(e) {
var t = Bt(e), n = t % 1;
return t === t ? n ? t - n : t : 0;
}
function xa(e) {
return e ? on(X(e), 0, gt) : 0;
}
function it(e) {
if (typeof e == "number")
return e;
if (Ke(e))
return pr;
if (me(e)) {
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
e = me(t) ? t + "" : t;
}
if (typeof e != "string")
return e === 0 ? e : +e;
e = Vo(e);
var n = rc.test(e);
return n || sc.test(e) ? Dc(e.slice(2), n ? 2 : 8) : nc.test(e) ? pr : +e;
}
function $a(e) {
return yt(e, Ve(e));
}
function $_(e) {
return e ? on(X(e), -Ft, Ft) : e === 0 ? e : 0;
}
function ue(e) {
return e == null ? "" : qe(e);
}
var A_ = Tn(function(e, t) {
if (tr(t) || We(t)) {
yt(t, Ie(t), e);
return;
}
for (var n in t)
ce.call(t, n) && Yn(e, n, t[n]);
}), Aa = Tn(function(e, t) {
yt(t, Ve(t), e);
}), si = Tn(function(e, t, n, s) {
yt(t, Ve(t), e, s);
}), S_ = Tn(function(e, t, n, s) {
yt(t, Ie(t), e, s);
}), T_ = Rt(qi);
function C_(e, t) {
var n = Sn(e);
return t == null ? n : rl(n, t);
}
var O_ = j(function(e, t) {
e = de(e);
var n = -1, s = t.length, l = s > 2 ? t[2] : i;
for (l && De(t[0], t[1], l) && (s = 1); ++n < s; )
for (var f = t[n], d = Ve(f), h = -1, m = d.length; ++h < m; ) {
var x = d[h], $ = e[x];
($ === i || dt($, xn[x]) && !ce.call(e, x)) && (e[x] = f[x]);
}
return e;
}), E_ = j(function(e) {
return e.push(i, Vl), Ze(Sa, i, e);
});
function I_(e, t) {
return Fo(e, U(t, 3), mt);
}
function R_(e, t) {
return Fo(e, U(t, 3), Yi);
}
function L_(e, t) {
return e == null ? e : Ki(e, U(t, 3), Ve);
}
function M_(e, t) {
return e == null ? e : al(e, U(t, 3), Ve);
}
function B_(e, t) {
return e && mt(e, U(t, 3));
}
function P_(e, t) {
return e && Yi(e, U(t, 3));
}
function D_(e) {
return e == null ? [] : Ur(e, Ie(e));
}
function F_(e) {
return e == null ? [] : Ur(e, Ve(e));
}
function Ts(e, t, n) {
var s = e == null ? i : ln(e, t);
return s === i ? n : s;
}
function N_(e, t) {
return e != null && Zl(e, t, ad);
}
function Cs(e, t) {
return e != null && Zl(e, t, ud);
}
var U_ = Dl(function(e, t, n) {
t != null && typeof t.toString != "function" && (t = Tr.call(t)), e[t] = n;
}, Es(He)), W_ = Dl(function(e, t, n) {
t != null && typeof t.toString != "function" && (t = Tr.call(t)), ce.call(e, t) ? e[t].push(n) : e[t] = [n];
}, U), V_ = j(Jn);
function Ie(e) {
return We(e) ? tl(e) : ji(e);
}
function Ve(e) {
return We(e) ? tl(e, !0) : yd(e);
}
function H_(e, t) {
var n = {};
return t = U(t, 3), mt(e, function(s, l, f) {
Et(n, t(s, l, f), s);
}), n;
}
function G_(e, t) {
var n = {};
return t = U(t, 3), mt(e, function(s, l, f) {
Et(n, l, t(s, l, f));
}), n;
}
var Z_ = Tn(function(e, t, n) {
Wr(e, t, n);
}), Sa = Tn(function(e, t, n, s) {
Wr(e, t, n, s);
}), z_ = Rt(function(e, t) {
var n = {};
if (e == null)
return n;
var s = !1;
t = ve(t, function(f) {
return f = Zt(f, e), s || (s = f.length > 1), f;
}), yt(e, ps(e), n), s && (n = tt(n, C | D | Q, Ud));
for (var l = t.length; l--; )
ss(n, t[l]);
return n;
});
function q_(e, t) {
return Ta(e, ni(U(t)));
}
var K_ = Rt(function(e, t) {
return e == null ? {} : wd(e, t);
});
function Ta(e, t) {
if (e == null)
return {};
var n = ve(ps(e), function(s) {
return [s];
});
return t = U(t), ml(e, n, function(s, l) {
return t(s, l[0]);
});
}
function Y_(e, t, n) {
t = Zt(t, e);
var s = -1, l = t.length;
for (l || (l = 1, e = i); ++s < l; ) {
var f = e == null ? i : e[bt(t[s])];
f === i && (s = l, f = n), e = Mt(f) ? f.call(e) : f;
}
return e;
}
function X_(e, t, n) {
return e == null ? e : jn(e, t, n);
}
function J_(e, t, n, s) {
return s = typeof s == "function" ? s : i, e == null ? e : jn(e, t, n, s);
}
var Ca = Ul(Ie), Oa = Ul(Ve);
function Q_(e, t, n) {
var s = Y(e), l = s || qt(e) || En(e);
if (t = U(t, 4), n == null) {
var f = e && e.constructor;
l ? n = s ? new f() : [] : me(e) ? n = Mt(f) ? Sn(Er(e)) : {} : n = {};
}
return (l ? Qe : mt)(e, function(d, h, m) {
return t(n, d, h, m);
}), n;
}
function j_(e, t) {
return e == null ? !0 : ss(e, t);
}
function ev(e, t, n) {
return e == null ? e : xl(e, t, as(n));
}
function tv(e, t, n, s) {
return s = typeof s == "function" ? s : i, e == null ? e : xl(e, t, as(n), s);
}
function In(e) {
return e == null ? [] : Ui(e, Ie(e));
}
function nv(e) {
return e == null ? [] : Ui(e, Ve(e));
}
function rv(e, t, n) {
return n === i && (n = t, t = i), n !== i && (n = it(n), n = n === n ? n : 0), t !== i && (t = it(t), t = t === t ? t : 0), on(it(e), t, n);
}
function iv(e, t, n) {
return t = Bt(t), n === i ? (n = t, t = 0) : n = Bt(n), e = it(e), cd(e, t, n);
}
function sv(e, t, n) {
if (n && typeof n != "boolean" && De(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 = Bt(e), t === i ? (t = e, e = 0) : t = Bt(t)), e > t) {
var s = e;
e = t, t = s;
}
if (n || e % 1 || t % 1) {
var l = jo();
return Me(e + l * (t - e + Pc("1e-" + ((l + "").length - 1))), t);
}
return ns(e, t);
}
var ov = Cn(function(e, t, n) {
return t = t.toLowerCase(), e + (n ? Ea(t) : t);
});
function Ea(e) {
return Os(ue(e).toLowerCase());
}
function Ia(e) {
return e = ue(e), e && e.replace(lc, Yc).replace(Sc, "");
}
function lv(e, t, n) {
e = ue(e), t = qe(t);
var s = e.length;
n = n === i ? s : on(X(n), 0, s);
var l = n;
return n -= t.length, n >= 0 && e.slice(n, l) == t;
}
function av(e) {
return e = ue(e), e && Wu.test(e) ? e.replace(lo, Xc) : e;
}
function uv(e) {
return e = ue(e), e && qu.test(e) ? e.replace($i, "\\$&") : e;
}
var cv = Cn(function(e, t, n) {
return e + (n ? "-" : "") + t.toLowerCase();
}), fv = Cn(function(e, t, n) {
return e + (n ? " " : "") + t.toLowerCase();
}), dv = Ml("toLowerCase");
function pv(e, t, n) {
e = ue(e), t = X(t);
var s = t ? wn(e) : 0;
if (!t || s >= t)
return e;
var l = (t - s) / 2;
return qr(Mr(l), n) + e + qr(Lr(l), n);
}
function hv(e, t, n) {
e = ue(e), t = X(t);
var s = t ? wn(e) : 0;
return t && s < t ? e + qr(t - s, n) : e;
}
function _v(e, t, n) {
e = ue(e), t = X(t);
var s = t ? wn(e) : 0;
return t && s < t ? qr(t - s, n) + e : e;
}
function vv(e, t, n) {
return n || t == null ? t = 0 : t && (t = +t), xf(ue(e).replace(Ai, ""), t || 0);
}
function gv(e, t, n) {
return (n ? De(e, t, n) : t === i) ? t = 1 : t = X(t), rs(ue(e), t);
}
function mv() {
var e = arguments, t = ue(e[0]);
return e.length < 3 ? t : t.replace(e[1], e[2]);
}
var yv = Cn(function(e, t, n) {
return e + (n ? "_" : "") + t.toLowerCase();
});
function bv(e, t, n) {
return n && typeof n != "number" && De(e, t, n) && (t = n = i), n = n === i ? gt : n >>> 0, n ? (e = ue(e), e && (typeof t == "string" || t != null && !Ss(t)) && (t = qe(t), !t && bn(e)) ? zt(ct(e), 0, n) : e.split(t, n)) : [];
}
var wv = Cn(function(e, t, n) {
return e + (n ? " " : "") + Os(t);
});
function kv(e, t, n) {
return e = ue(e), n = n == null ? 0 : on(X(n), 0, e.length), t = qe(t), e.slice(n, n + t.length) == t;
}
function xv(e, t, n) {
var s = u.templateSettings;
n && De(e, t, n) && (t = i), e = ue(e), t = si({}, t, s, Wl);
var l = si({}, t.imports, s.imports, Wl), f = Ie(l), d = Ui(l, f), h, m, x = 0, $ = t.interpolate || mr, A = "__p += '", I = Vi(
(t.escape || mr).source + "|" + $.source + "|" + ($ === ao ? tc : mr).source + "|" + (t.evaluate || mr).source + "|$",
"g"
), P = "//# sourceURL=" + (ce.call(t, "sourceURL") ? (t.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++Ic + "]") + `
`;
e.replace(I, function(G, te, re, Ye, Fe, Xe) {
return re || (re = Ye), A += e.slice(x, Xe).replace(ac, Jc), te && (h = !0, A += `' +
__e(` + te + `) +
'`), Fe && (m = !0, A += `';
` + Fe + `;
__p += '`), re && (A += `' +
((__t = (` + re + `)) == null ? '' : __t) +
'`), x = Xe + G.length, G;
}), A += `';
`;
var H = ce.call(t, "variable") && t.variable;
if (!H)
A = `with (obj) {
` + A + `
}
`;
else if (ju.test(H))
throw new K(b);
A = (m ? A.replace(Du, "") : A).replace(Fu, "$1").replace(Nu, "$1;"), A = "function(" + (H || "obj") + `) {
` + (H ? "" : `obj || (obj = {});
`) + "var __t, __p = ''" + (h ? ", __e = _.escape" : "") + (m ? `, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
` : `;
`) + A + `return __p
}`;
var J = La(function() {
return le(f, P + "return " + A).apply(i, d);
});
if (J.source = A, As(J))
throw J;
return J;
}
function $v(e) {
return ue(e).toLowerCase();
}
function Av(e) {
return ue(e).toUpperCase();
}
function Sv(e, t, n) {
if (e = ue(e), e && (n || t === i))
return Vo(e);
if (!e || !(t = qe(t)))
return e;
var s = ct(e), l = ct(t), f = Ho(s, l), d = Go(s, l) + 1;
return zt(s, f, d).join("");
}
function Tv(e, t, n) {
if (e = ue(e), e && (n || t === i))
return e.slice(0, zo(e) + 1);
if (!e || !(t = qe(t)))
return e;
var s = ct(e), l = Go(s, ct(t)) + 1;
return zt(s, 0, l).join("");
}
function Cv(e, t, n) {
if (e = ue(e), e && (n || t === i))
return e.replace(Ai, "");
if (!e || !(t = qe(t)))
return e;
var s = ct(e), l = Ho(s, ct(t));
return zt(s, l).join("");
}
function Ov(e, t) {
var n = N, s = Te;
if (me(t)) {
var l = "separator" in t ? t.separator : l;
n = "length" in t ? X(t.length) : n, s = "omission" in t ? qe(t.omission) : s;
}
e = ue(e);
var f = e.length;
if (bn(e)) {
var d = ct(e);
f = d.length;
}
if (n >= f)
return e;
var h = n - wn(s);
if (h < 1)
return s;
var m = d ? zt(d, 0, h).join("") : e.slice(0, h);
if (l === i)
return m + s;
if (d && (h += m.length - h), Ss(l)) {
if (e.slice(h).search(l)) {
var x, $ = m;
for (l.global || (l = Vi(l.source, ue(uo.exec(l)) + "g")), l.lastIndex = 0; x = l.exec($); )
var A = x.index;
m = m.slice(0, A === i ? h : A);
}
} else if (e.indexOf(qe(l), h) != h) {
var I = m.lastIndexOf(l);
I > -1 && (m = m.slice(0, I));
}
return m + s;
}
function Ev(e) {
return e = ue(e), e && Uu.test(e) ? e.replace(oo, sf) : e;
}
var Iv = Cn(function(e, t, n) {
return e + (n ? " " : "") + t.toUpperCase();
}), Os = Ml("toUpperCase");
function Ra(e, t, n) {
return e = ue(e), t = n ? i : t, t === i ? jc(e) ? af(e) : Gc(e) : e.match(t) || [];
}
var La = j(function(e, t) {
try {
return Ze(e, i, t);
} catch (n) {
return As(n) ? n : new K(n);
}
}), Rv = Rt(function(e, t) {
return Qe(t, function(n) {
n = bt(n), Et(e, n, xs(e[n], e));
}), e;
});
function Lv(e) {
var t = e == null ? 0 : e.length, n = U();
return e = t ? ve(e, function(s) {
if (typeof s[1] != "function")
throw new je(y);
return [n(s[0]), s[1]];
}) : [], j(function(s) {
for (var l = -1; ++l < t; ) {
var f = e[l];
if (Ze(f[0], this, s))
return Ze(f[1], this, s);
}
});
}
function Mv(e) {
return sd(tt(e, C));
}
function Es(e) {
return function() {
return e;
};
}
function Bv(e, t) {
return e == null || e !== e ? t : e;
}
var Pv = Pl(), Dv = Pl(!0);
function He(e) {
return e;
}
function Is(e) {
return dl(typeof e == "function" ? e : tt(e, C));
}
function Fv(e) {
return hl(tt(e, C));
}
function Nv(e, t) {
return _l(e, tt(t, C));
}
var Uv = j(function(e, t) {
return function(n) {
return Jn(n, e, t);
};
}), Wv = j(function(e, t) {
return function(n) {
return Jn(e, n, t);
};
});
function Rs(e, t, n) {
var s = Ie(t), l = Ur(t, s);
n == null && !(me(t) && (l.length || !s.length)) && (n = t, t = e, e = this, l = Ur(t, Ie(t)));
var f = !(me(n) && "chain" in n) || !!n.chain, d = Mt(e);
return Qe(l, function(h) {
var m = t[h];
e[h] = m, d && (e.prototype[h] = function() {
var x = this.__chain__;
if (f || x) {
var $ = e(this.__wrapped__), A = $.__actions__ = Ue(this.__actions__);
return A.push({ func: m, args: arguments, thisArg: e }), $.__chain__ = x, $;
}
return m.apply(e, Ut([this.value()], arguments));
});
}), e;
}
function Vv() {
return Re._ === this && (Re._ = hf), this;
}
function Ls() {
}
function Hv(e) {
return e = X(e), j(function(t) {
return vl(t, e);
});
}
var Gv = cs(ve), Zv = cs(Do), zv = cs(Bi);
function Ma(e) {
return gs(e) ? Pi(bt(e)) : kd(e);
}
function qv(e) {
return function(t) {
return e == null ? i : ln(e, t);
};
}
var Kv = Fl(), Yv = Fl(!0);
function Ms() {
return [];
}
function Bs() {
return !1;
}
function Xv() {
return {};
}
function Jv() {
return "";
}
function Qv() {
return !0;
}
function jv(e, t) {
if (e = X(e), e < 1 || e > Ft)
return [];
var n = gt, s = Me(e, gt);
t = U(t), e -= gt;
for (var l = Ni(s, t); ++n < e; )
t(n);
return l;
}
function eg(e) {
return Y(e) ? ve(e, bt) : Ke(e) ? [e] : Ue(ea(ue(e)));
}
function tg(e) {
var t = ++df;
return ue(e) + t;
}
var ng = zr(function(e, t) {
return e + t;
}, 0), rg = fs("ceil"), ig = zr(function(e, t) {
return e / t;
}, 1), sg = fs("floor");
function og(e) {
return e && e.length ? Nr(e, He, Xi) : i;
}
function lg(e, t) {
return e && e.length ? Nr(e, U(t, 2), Xi) : i;
}
function ag(e) {
return Uo(e, He);
}
function ug(e, t) {
return Uo(e, U(t, 2));
}
function cg(e) {
return e && e.length ? Nr(e, He, es) : i;
}
function fg(e, t) {
return e && e.length ? Nr(e, U(t, 2), es) : i;
}
var dg = zr(function(e, t) {
return e * t;
}, 1), pg = fs("round"), hg = zr(function(e, t) {
return e - t;
}, 0);
function _g(e) {
return e && e.length ? Fi(e, He) : 0;
}
function vg(e, t) {
return e && e.length ? Fi(e, U(t, 2)) : 0;
}
return u.after = Fh, u.ary = fa, u.assign = A_, u.assignIn = Aa, u.assignInWith = si, u.assignWith = S_, u.at = T_, u.before = da, u.bind = xs, u.bindAll = Rv, u.bindKey = pa, u.castArray = Xh, u.chain = aa, u.chunk = sp, u.compact = op, u.concat = lp, u.cond = Lv, u.conforms = Mv, u.constant = Es, u.countBy = _h, u.create = C_, u.curry = ha, u.curryRight = _a, u.debounce = va, u.defaults = O_, u.defaultsDeep = E_, u.defer = Nh, u.delay = Uh, u.difference = ap, u.differenceBy = up, u.differenceWith = cp, u.drop = fp, u.dropRight = dp, u.dropRightWhile = pp, u.dropWhile = hp, u.fill = _p, u.filter = gh, u.flatMap = bh, u.flatMapDeep = wh, u.flatMapDepth = kh, u.flatten = ia, u.flattenDeep = vp, u.flattenDepth = gp, u.flip = Wh, u.flow = Pv, u.flowRight = Dv, u.fromPairs = mp, u.functions = D_, u.functionsIn = F_, u.groupBy = xh, u.initial = bp, u.intersection = wp, u.intersectionBy = kp, u.intersectionWith = xp, u.invert = U_, u.invertBy = W_, u.invokeMap = Ah, u.iteratee = Is, u.keyBy = Sh, u.keys = Ie, u.keysIn = Ve, u.map = jr, u.mapKeys = H_, u.mapValues = G_, u.matches = Fv, u.matchesProperty = Nv, u.memoize = ti, u.merge = Z_, u.mergeWith = Sa, u.method = Uv, u.methodOf = Wv, u.mixin = Rs, u.negate = ni, u.nthArg = Hv, u.omit = z_, u.omitBy = q_, u.once = Vh, u.orderBy = Th, u.over = Gv, u.overArgs = Hh, u.overEvery = Zv, u.overSome = zv, u.partial = $s, u.partialRight = ga, u.partition = Ch, u.pick = K_, u.pickBy = Ta, u.property = Ma, u.propertyOf = qv, u.pull = Tp, u.pullAll = oa, u.pullAllBy = Cp, u.pullAllWith = Op, u.pullAt = Ep, u.range = Kv, u.rangeRight = Yv, u.rearg = Gh, u.reject = Ih, u.remove = Ip, u.rest = Zh, u.reverse = ws, u.sampleSize = Lh, u.set = X_, u.setWith = J_, u.shuffle = Mh, u.slice = Rp, u.sortBy = Dh, u.sortedUniq = Np, u.sortedUniqBy = Up, u.split = bv, u.spread = zh, u.tail = Wp, u.take = Vp, u.takeRight = Hp, u.takeRightWhile = Gp, u.takeWhile = Zp, u.tap = oh, u.throttle = qh, u.thru = Qr, u.toArray = ka, u.toPairs = Ca, u.toPairsIn = Oa, u.toPath = eg, u.toPlainObject = $a, u.transform = Q_, u.unary = Kh, u.union = zp, u.unionBy = qp, u.unionWith = Kp, u.uniq = Yp, u.uniqBy = Xp, u.uniqWith = Jp, u.unset = j_, u.unzip = ks, u.unzipWith = la, u.update = ev, u.updateWith = tv, u.values = In, u.valuesIn = nv, u.without = Qp, u.words = Ra, u.wrap = Yh, u.xor = jp, u.xorBy = eh, u.xorWith = th, u.zip = nh, u.zipObject = rh, u.zipObjectDeep = ih, u.zipWith = sh, u.entries = Ca, u.entriesIn = Oa, u.extend = Aa, u.extendWith = si, Rs(u, u), u.add = ng, u.attempt = La, u.camelCase = ov, u.capitalize = Ea, u.ceil = rg, u.clamp = rv, u.clone = Jh, u.cloneDeep = jh, u.cloneDeepWith = e_, u.cloneWith = Qh, u.conformsTo = t_, u.deburr = Ia, u.defaultTo = Bv, u.divide = ig, u.endsWith = lv, u.eq = dt, u.escape = av, u.escapeRegExp = uv, u.every = vh, u.find = mh, u.findIndex = na, u.findKey = I_, u.findLast = yh, u.findLastIndex = ra, u.findLastKey = R_, u.floor = sg, u.forEach = ua, u.forEachRight = ca, u.forIn = L_, u.forInRight = M_, u.forOwn = B_, u.forOwnRight = P_, u.get = Ts, u.gt = n_, u.gte = r_, u.has = N_, u.hasIn = Cs, u.head = sa, u.identity = He, u.includes = $h, u.indexOf = yp, u.inRange = iv, u.invoke = V_, u.isArguments = cn, u.isArray = Y, u.isArrayBuffer = i_, u.isArrayLike = We, u.isArrayLikeObject = xe, u.isBoolean = s_, u.isBuffer = qt, u.isDate = o_, u.isElement = l_, u.isEmpty = a_, u.isEqual = u_, u.isEqualWith = c_, u.isError = As, u.isFinite = f_, u.isFunction = Mt, u.isInteger = ma, u.isLength = ri, u.isMap = ya, u.isMatch = d_, u.isMatchWith = p_, u.isNaN = h_, u.isNative = __, u.isNil = g_, u.isNull = v_, u.isNumber = ba, u.isObject = me, u.isObjectLike = ke, u.isPlainObject = rr, u.isRegExp = Ss, u.isSafeInteger = m_, u.isSet = wa, u.isString = ii, u.isSymbol = Ke, u.isTypedArray = En, u.isUndefined = y_, u.isWeakMap = b_, u.isWeakSet = w_, u.join = $p, u.kebabCase = cv, u.last = rt, u.lastIndexOf = Ap, u.lowerCase = fv, u.lowerFirst = dv, u.lt = k_, u.lte = x_, u.max = og, u.maxBy = lg, u.mean = ag, u.meanBy = ug, u.min = cg, u.minBy = fg, u.stubArray = Ms, u.stubFalse = Bs, u.stubObject = Xv, u.stubString = Jv, u.stubTrue = Qv, u.multiply = dg, u.nth = Sp, u.noConflict = Vv, u.noop = Ls, u.now = ei, u.pad = pv, u.padEnd = hv, u.padStart = _v, u.parseInt = vv, u.random = sv, u.reduce = Oh, u.reduceRight = Eh, u.repeat = gv, u.replace = mv, u.result = Y_, u.round = pg, u.runInContext = v, u.sample = Rh, u.size = Bh, u.snakeCase = yv, u.some = Ph, u.sortedIndex = Lp, u.sortedIndexBy = Mp, u.sortedIndexOf = Bp, u.sortedLastIndex = Pp, u.sortedLastIndexBy = Dp, u.sortedLastIndexOf = Fp, u.startCase = wv, u.startsWith = kv, u.subtract = hg, u.sum = _g, u.sumBy = vg, u.template = xv, u.times = jv, u.toFinite = Bt, u.toInteger = X, u.toLength = xa, u.toLower = $v, u.toNumber = it, u.toSafeInteger = $_, u.toString = ue, u.toUpper = Av, u.trim = Sv, u.trimEnd = Tv, u.trimStart = Cv, u.truncate = Ov, u.unescape = Ev, u.uniqueId = tg, u.upperCase = Iv, u.upperFirst = Os, u.each = ua, u.eachRight = ca, u.first = sa, Rs(u, function() {
var e = {};
return mt(u, function(t, n) {
ce.call(u.prototype, n) || (e[n] = t);
}), e;
}(), { chain: !1 }), u.VERSION = c, Qe(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(e) {
u[e].placeholder = u;
}), Qe(["drop", "take"], function(e, t) {
ne.prototype[e] = function(n) {
n = n === i ? 1 : Oe(X(n), 0);
var s = this.__filtered__ && !t ? new ne(this) : this.clone();
return s.__filtered__ ? s.__takeCount__ = Me(n, s.__takeCount__) : s.__views__.push({
size: Me(n, gt),
type: e + (s.__dir__ < 0 ? "Right" : "")
}), s;
}, ne.prototype[e + "Right"] = function(n) {
return this.reverse()[e](n).reverse();
};
}), Qe(["filter", "map", "takeWhile"], function(e, t) {
var n = t + 1, s = n == jt || n == Su;
ne.prototype[e] = function(l) {
var f = this.clone();
return f.__iteratees__.push({
iteratee: U(l, 3),
type: n
}), f.__filtered__ = f.__filtered__ || s, f;
};
}), Qe(["head", "last"], function(e, t) {
var n = "take" + (t ? "Right" : "");
ne.prototype[e] = function() {
return this[n](1).value()[0];
};
}), Qe(["initial", "tail"], function(e, t) {
var n = "drop" + (t ? "" : "Right");
ne.prototype[e] = function() {
return this.__filtered__ ? new ne(this) : this[n](1);
};
}), ne.prototype.compact = function() {
return this.filter(He);
}, ne.prototype.find = function(e) {
return this.filter(e).head();
}, ne.prototype.findLast = function(e) {
return this.reverse().find(e);
}, ne.prototype.invokeMap = j(function(e, t) {
return typeof e == "function" ? new ne(this) : this.map(function(n) {
return Jn(n, e, t);
});
}), ne.prototype.reject = function(e) {
return this.filter(ni(U(e)));
}, ne.prototype.slice = function(e, t) {
e = X(e);
var n = this;
return n.__filtered__ && (e > 0 || t < 0) ? new ne(n) : (e < 0 ? n = n.takeRight(-e) : e && (n = n.drop(e)), t !== i && (t = X(t), n = t < 0 ? n.dropRight(-t) : n.take(t - e)), n);
}, ne.prototype.takeRightWhile = function(e) {
return this.reverse().takeWhile(e).reverse();
}, ne.prototype.toArray = function() {
return this.take(gt);
}, mt(ne.prototype, function(e, t) {
var n = /^(?:filter|find|map|reject)|While$/.test(t), s = /^(?:head|last)$/.test(t), l = u[s ? "take" + (t == "last" ? "Right" : "") : t], f = s || /^find/.test(t);
l && (u.prototype[t] = function() {
var d = this.__wrapped__, h = s ? [1] : arguments, m = d instanceof ne, x = h[0], $ = m || Y(d), A = function(te) {
var re = l.apply(u, Ut([te], h));
return s && I ? re[0] : re;
};
$ && n && typeof x == "function" && x.length != 1 && (m = $ = !1);
var I = this.__chain__, P = !!this.__actions__.length, H = f && !I, J = m && !P;
if (!f && $) {
d = J ? d : new ne(this);
var G = e.apply(d, h);
return G.__actions__.push({ func: Qr, args: [A], thisArg: i }), new et(G, I);
}
return H && J ? e.apply(this, h) : (G = this.thru(A), H ? s ? G.value()[0] : G.value() : G);
});
}), Qe(["pop", "push", "shift", "sort", "splice", "unshift"], function(e) {
var t = $r[e], n = /^(?:push|sort|unshift)$/.test(e) ? "tap" : "thru", s = /^(?:pop|shift)$/.test(e);
u.prototype[e] = function() {
var l = arguments;
if (s && !this.__chain__) {
var f = this.value();
return t.apply(Y(f) ? f : [], l);
}
return this[n](function(d) {
return t.apply(Y(d) ? d : [], l);
});
};
}), mt(ne.prototype, function(e, t) {
var n = u[t];
if (n) {
var s = n.name + "";
ce.call(An, s) || (An[s] = []), An[s].push({ name: t, func: n });
}
}), An[Zr(i, W).name] = [{
name: "wrapper",
func: i
}], ne.prototype.clone = Ef, ne.prototype.reverse = If, ne.prototype.value = Rf, u.prototype.at = lh, u.prototype.chain = ah, u.prototype.commit = uh, u.prototype.next = ch, u.prototype.plant = dh, u.prototype.reverse = ph, u.prototype.toJSON = u.prototype.valueOf = u.prototype.value = hh, u.prototype.first = u.prototype.head, Gn && (u.prototype[Gn] = fh), u;
}, kn = uf();
tn ? ((tn.exports = kn)._ = kn, Ii._ = kn) : Re._ = kn;
}).call(ir);
})(li, li.exports);
var Jg = li.exports;
const Qg = {
xmlns: "http://www.w3.org/2000/svg",
width: "24",
height: "24",
fill: "none"
}, jg = /* @__PURE__ */ z("path", {
stroke: "#1AB248",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "2",
d: "m5 12 5 5L20 7"
}, null, -1), e0 = [
jg
];
function t0(r, o) {
return S(), R("svg", Qg, e0);
}
const n0 = { render: t0 }, r0 = /* @__PURE__ */ se({
__name: "BaseDropdownItem",
props: {
value: {},
selected: { type: Boolean, default: !1 },
active: { type: Boolean, default: !1 }
},
emits: ["select"],
setup(r, { emit: o }) {
const i = r, c = B(() => ({ "--list-item-color": i.value.color })), a = () => {
i.value.disabled || o("select", i.value);
};
return (p, y) => (S(), R("div", {
class: M([
p.$style["prefix-dropdown-item"],
{
[p.$style["prefix-dropdown-item_active"]]: p.active,
[p.$style["prefix-dropdown-item_selected"]]: p.selected,
[p.$style["prefix-dropdown-item_disabled"]]: p.value.disabled,
[p.$style["prefix-dropdown-item_colored"]]: !!p.value.color
}
]),
onClick: a,
style: Zs(c.value)
}, [
p.value.icon ? (S(), R("div", {
key: 0,
class: M(p.$style["prefix-dropdown-item__left-icon"])
}, [
(S(), pe(Xt(p.value.icon)))
], 2)) : ae("", !0),
z("div", {
class: M(p.$style["prefix-dropdown-item__content"])
}, [
fe(p.$slots, "default", {}, void 0, !0)
], 2),
p.selected ? (S(), pe(ie(n0), {
key: 1,
class: M(p.$style["prefix-dropdown-item__checkmark"])
}, null, 8, ["class"])) : ae("", !0)
], 6));
}
}), i0 = {
"prefix-dropdown-item": "cdek-dropdown-item",
"prefix-dropdown-item_disabled": "cdek-dropdown-item_disabled",
"prefix-dropdown-item_active": "cdek-dropdown-item_active",
"prefix-dropdown-item_selected": "cdek-dropdown-item_selected",
"prefix-dropdown-item_colored": "cdek-dropdown-item_colored",
"prefix-dropdown-item__left-icon": "cdek-dropdown-item__left-icon",
"prefix-dropdown-item__content": "cdek-dropdown-item__content",
"prefix-dropdown-item__checkmark": "cdek-dropdown-item__checkmark"
}, s0 = {
$style: i0
}, Ya = /* @__PURE__ */ Ae(r0, [["__cssModules", s0], ["__scopeId", "data-v-c47f41d4"]]), o0 = {
"prefix-dropdown-box": "cdek-dropdown-box"
}, l0 = {};
function a0(r, o) {
return S(), R("div", {
class: M(r.$style["prefix-dropdown-box"])
}, [
fe(r.$slots, "default", {}, void 0, !0)
], 2);
}
const u0 = {
$style: o0
}, Xa = /* @__PURE__ */ Ae(l0, [["render", a0], ["__cssModules", u0], ["__scopeId", "data-v-91fbc94e"]]), c0 = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "none"
}, f0 = /* @__PURE__ */ z("path", {
stroke: "#F47500",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "1.5",
d: "M8 6v1.333M8 10v.007m-4.667 2.66h9.334a1.332 1.332 0 0 0 1.226-1.833L9.16 2.667a1.333 1.333 0 0 0-2.333 0l-4.734 8.167a1.333 1.333 0 0 0 1.167 1.833"
}, null, -1), d0 = [
f0
];
function p0(r, o) {
return S(), R("svg", c0, d0);
}
const h0 = { render: p0 }, _0 = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "none"
}, v0 = /* @__PURE__ */ z("path", {
stroke: "#E40029",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "1.5",
d: "m3.8 3.8 8.4 8.4M14 8A6 6 0 1 1 2 8a6 6 0 0 1 12 0Z"
}, null, -1), g0 = [
v0
];
function m0(r, o) {
return S(), R("svg", _0, g0);
}
const y0 = { render: m0 }, b0 = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "none"
}, w0 = /* @__PURE__ */ z("path", {
stroke: "#17A000",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "1.5",
d: "m6 8 1.333 1.333L10 6.667M14 8A6 6 0 1 1 2 8a6 6 0 0 1 12 0Z"
}, null, -1), k0 = [
w0
];
function x0(r, o) {
return S(), R("svg", b0, k0);
}
const $0 = { render: x0 }, A0 = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "none"
}, S0 = /* @__PURE__ */ z("path", {
stroke: "#627791",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "1.5",
d: "M8 5.333h.007M7.333 8H8v2.667h.667M14 8A6 6 0 1 1 2 8a6 6 0 0 1 12 0Z"
}, null, -1), T0 = [
S0
];
function C0(r, o) {
return S(), R("svg", A0, T0);
}
const O0 = { render: C0 }, E0 = {
xmlns: "http://www.w3.org/2000/svg",
width: "24",
height: "24",
fill: "none"
}, I0 = /* @__PURE__ */ z("path", {
stroke: "#000",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-opacity": ".35",
"stroke-width": "1.75",
d: "m10 10 4 4m0-4-4 4m11-2a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
}, null, -1), R0 = [
I0
];
function L0(r, o) {
return S(), R("svg", E0, R0);
}
const M0 = { render: L0 }, B0 = ["value", "disabled"], P0 = ["innerHTML"], D0 = {
inheritAttrs: !1
}, F0 = /* @__PURE__ */ se({
...D0,
__name: "BaseInput",
props: {
modelValue: {},
label: {},
validRes: { type: [Boolean, String] },
hideErrorMessage: { type: Boolean },
disabled: { type: Boolean },
readonly: { type: Boolean },
small: { type: Boolean },
clearable: { type: Boolean },
class: { default: "" }
},
emits: ["update:modelValue"],
setup(r, { expose: o, emit: i }) {
const c = r, a = B(() => typeof c.validRes == "string"), p = B(() => !c.disabled && !c.readonly), y = B(() => c.modelValue), b = (O) => {
i("update:modelValue", O.target.value);
}, T = () => {
i("update:modelValue", "");
}, g = cr(), _ = B(() => !!g["icons-right"]), C = B(() => !!g["icons-left"]), D = oe(), Q = B(() => c.clearable && y.value);
return o({ getControl: () => D.value }), (O, E) => (S(), R("div", {
class: M([
O.$style["prefix-input"],
O.small && O.label ? O.$style["prefix-input_small"] : "",
c.class
])
}, [
z("label", {
class: M([
O.$style["prefix-input__control"],
a.value ? O.$style["prefix-input__control_error"] : "",
p.value ? O.$style["prefix-input__control_user-event"] : "",
O.disabled ? O.$style["prefix-input__control_disabled"] : "",
O.readonly ? O.$style["prefix-input__control_readonly"] : "",
_.value ? O.$style["prefix-input__control_right-icon"] : "",
O.small ? O.$style["prefix-input__control_small"] : "",
Q.value ? O.$style["prefix-input__control_clearable"] : ""
])
}, [
O.label ? (S(), R("div", {
key: 0,
class: M([
O.$style["prefix-input__label"],
y.value ? O.$style["prefix-input__label_filled"] : "",
a.value ? O.$style["prefix-input__label_error"] : "",
O.readonly ? O.$style["prefix-input__label_readonly"] : "",
O.small ? O.$style["prefix-input__label_small"] : ""
])
}, we(O.label), 3)) : ae("", !0),
C.value ? (S(), R("div", {
key: 1,
class: M(O.$style["prefix-input__left-icon"])
}, [
fe(O.$slots, "icons-left")
], 2)) : ae("", !0),
z("input", Qt({
class: [
O.$style["prefix-input__input"],
a.value ? O.$style["prefix-input__input_error"] : "",
O.readonly ? O.$style["prefix-input__input_readonly"] : "",
O.label ? "" : O.$style["prefix-input__input_no-label"],
O.small ? O.$style["prefix-input__input_small"] : ""
],
value: y.value,
onInput: b
}, O.$attrs, {
disabled: O.disabled || O.readonly,
ref_key: "inputRef",
ref: D
}), null, 16, B0),
Q.value ? (S(), R("button", {
key: 2,
class: M(O.$style["prefix-input__clear"]),
type: "button",
onClick: T
}, [
ht(ie(M0))
], 2)) : ae("", !0),
_.value ? (S(), R("div", {
key: 3,
class: M([
O.$style["prefix-input__right-icon"],
a.value ? O.$style["prefix-input__right-icon_red"] : "",
O.disabled || O.readonly ? O.$style["prefix-input__right-icon_grey"] : "",
Q.value ? O.$style["prefix-input__right-icon_clearable"] : ""
])
}, [
fe(O.$slots, "icons-right")
], 2)) : ae("", !0)
], 2),
z("div", {
class: M(O.$style["prefix-input__tip"])
}, [
a.value ? ci((S(), R("div", {
key: 0,
class: M(O.$style.error),
innerHTML: O.validRes
}, null, 10, P0)), [
[zs, !O.hideErrorMessage]
]) : fe(O.$slots, "tip", {
key: 1,
alert: ie(h0),
ban: ie(y0),
circle: ie($0),
info: ie(O0)
})
], 2)
], 2));
}
}), N0 = "tertiary", U0 = "attention", W0 = "error", V0 = "success", H0 = {
"prefix-input": "cdek-input",
"prefix-input_small": "cdek-input_small",
"prefix-input__control": "cdek-input__control",
"prefix-input__control_user-event": "cdek-input__control_user-event",
"prefix-input__control_error": "cdek-input__control_error",
"prefix-input__control_disabled": "cdek-input__control_disabled",
"prefix-input__control_readonly": "cdek-input__control_readonly",
"prefix-input__control_right-icon": "cdek-input__control_right-icon",
"prefix-input__control_small": "cdek-input__control_small",
"prefix-input__control_clearable": "cdek-input__control_clearable",
"prefix-input__input": "cdek-input__input",
"prefix-input__input_error": "cdek-input__input_error",
"prefix-input__input_readonly": "cdek-input__input_readonly",
"prefix-input__input_no-label": "cdek-input__input_no-label",
"prefix-input__input_small": "cdek-input__input_small",
"prefix-input__label": "cdek-input__label",
"prefix-input__label_filled": "cdek-input__label_filled",
"prefix-input__label_error": "cdek-input__label_error",
"prefix-input__label_small": "cdek-input__label_small",
"prefix-input__label_readonly": "cdek-input__label_readonly",
"prefix-input__tip": "cdek-input__tip",
tertiary: N0,
attention: U0,
error: W0,
success: V0,
"prefix-input__clear": "cdek-input__clear",
"prefix-input__right-icon": "cdek-input__right-icon",
"prefix-input__right-icon_red": "cdek-input__right-icon_red",
"prefix-input__right-icon_grey": "cdek-input__right-icon_grey",
"prefix-input__right-icon_clearable": "cdek-input__right-icon_clearable",
"prefix-input__left-icon": "cdek-input__left-icon"
}, G0 = {
$style: H0
}, Xs = /* @__PURE__ */ Ae(F0, [["__cssModules", G0], ["__scopeId", "data-v-a648ef84"]]);
var sr = /* @__PURE__ */ ((r) => (r.ArrowDown = "ArrowDown", r.ArrowUp = "ArrowUp", r.Enter = "Enter", r.Escape = "Escape", r))(sr || {});
const Ja = (r, o, i) => r ? o && i ? r.map((c) => ({
value: o(c),
title: i(c)
})) : typeof r[0] == "object" ? r : r.map((c) => ({ value: c, title: c })) : [], Z0 = (r, o, i, c) => !r || !o ? null : Ja(r, i, c).find((y) => y.value === o) || null, Da = (r, o, i, c) => {
const a = Z0(r, o, i, c);
return a ? a.title : "";
}, z0 = (r, o, i) => r ? 0 : o ? i ? 2 : typeof o[0] == "string" ? 1 : typeof o[0] == "object" && "title" in o[0] ? 3 : 4 : 4, q0 = (r, o) => Promise.resolve(
o.filter((i) => i.toLowerCase().includes(r.toLowerCase()))
), K0 = (r, o) => Promise.resolve(
o.filter(
(i) => i.title.toLowerCase().includes(r.toLowerCase())
)
), Y0 = (r, o, i) => Promise.resolve(
i.filter(
(c) => r(c).toLowerCase().includes(o.toLowerCase())
)
), X0 = (r, o, i) => r === 0 && o ? o : r === 1 ? q0 : r === 2 && i ? Y0.bind(null, i) : r === 3 ? K0 : () => Promise.resolve([]), J0 = ["innerHTML"], Q0 = /* @__PURE__ */ se({
inheritAttrs: !1,
__name: "BaseAutocomplete",
props: {
modelValue: {},
items: {},
fetchItems: {},
getValue: {},
getTitle: {},
minLength: { default: 3 },
class: {},
enabledAccentQuery: { type: Boolean }
},
emits: ["update:modelValue", "select"],
setup(r, { emit: o }) {
const i = r, c = B(
() => z0(i.fetchItems, i.items, i.getTitle)
), a = oe(null), p = B(
() => Ja(a.value, i.getValue, i.getTitle)
), y = oe(
Da(i.items, i.modelValue, i.getValue, i.getTitle)
), b = oe(y.value || "");
Jt(
() => i.modelValue,
(N) => {
if (!N) {
(y.value || b.value) && (y.value = "", b.value = "");
return;
}
const Te = Da(
i.items,
N,
i.getValue,
i.getTitle
);
Te && (y.value = Te, b.value = Te);
}
);
const T = B(() => a.value ? Bn.value && !a.value.length ? !0 : a.value.length > 0 : !1), g = oe(-1), _ = oe(), C = oe(), D = oe(!1), Q = Jg.debounce(async (N) => {
g.value = -1;
const Te = X0(
c.value,
i.fetchItems,
i.getTitle
);
try {
const vt = await Te(N, i.items);
if (D.value) {
a.value = vt;
return;
}
a.value = null;
} catch {
a.value = null;
}
}, 300), ee = (N) => {
if (b.value = N, N.length >= i.minLength)
return void Q(N);
N.length === 0 && (y.value = "", o("update:modelValue", "")), a.value = null;
}, O = () => {
if (a.value = null, !y.value) {
b.value = "";
return;
}
b.value = y.value;
}, E = (N, Te) => {
var vt;
!N || N.disabled || (o("select", (vt = a.value) == null ? void 0 : vt[Te]), O(), y.value = String(N.title), b.value = String(N.title), o("update:modelValue", N.value));
}, W = (N) => {
var Te;
(Te = C.value) != null && Te.contains(N.target) || O();
}, V = (N) => {
N < 0 && (N = p.value.length - 1), N > p.value.length - 1 && (N = 0), g.value = N;
}, F = B(
() => new RegExp(`(${b.value})`, "iug")
), Z = (N) => N.replace(
F.value,
'<span class="accent-query">$1</span>'
), q = (N) => {
if (T.value) {
if (N.key === sr.ArrowDown)
return N.preventDefault(), void V(g.value + 1);
if (N.key === sr.ArrowUp)
return N.preventDefault(), void V(g.value - 1);
if (N.key === sr.Enter)
return N.stopImmediatePropagation(), g.value === -1 && p.value.length > 0 && V(0), void E(
p.value[g.value],
g.value
);
if (N.key === sr.Escape)
return N.stopImmediatePropagation(), void O();
}
}, ge = () => {
D.value = !0;
}, Ee = () => {
D.value = !1;
};
Dt(() => {
var Te;
const N = (Te = _.value) == null ? void 0 : Te.getControl();
N == null || N.addEventListener("keydown", q), document.addEventListener("click", W);
}), yg(() => {
var Te;
const N = (Te = _.value) == null ? void 0 : Te.getControl();
N == null || N.removeEventListener("keydown", q), document.removeEventListener("click", W);
});
const At = cr(), Bn = B(() => !!At["not-found"]);
return (N, Te) => (S(), R("div", {
class: M([N.$style["prefix-autocomplete"], i.class]),
ref_key: "autocompleteRef",
ref: C
}, [
ht(Xs, Qt(N.$attrs, {
"model-value": b.value,
"onUpdate:modelValue": ee,
ref_key: "baseInputRef",
ref: _,
onFocus: ge,
onBlur: Ee
}), qs({ _: 2 }, [
pn(N.$slots, (vt, St) => ({
name: St,
fn: ye((jt) => [
fe(N.$slots, St, fr(fi(jt)))
])
}))
]), 1040, ["model-value"]),
ht(qa, null, {
default: ye(() => [
T.value ? (S(), pe(Xa, { key: 0 }, {
default: ye(() => {
var vt;
return [
p.value.length === 0 && ((vt = b.value) == null ? void 0 : vt.length) >= N.minLength ? (S(), R("div", {
key: 0,
class: M(N.$style["prefix-autocomplete__not-found"])
}, [
fe(N.$slots, "not-found")
], 2)) : ae("", !0),
(S(!0), R(xt, null, pn(p.value, (St, jt) => (S(), pe(Ya, {
value: St,
active: jt === g.value,
key: St.value,
onSelect: (hi) => E(hi, jt)
}, {
default: ye(() => [
N.enabledAccentQuery ? (S(), R("span", {
key: 0,
innerHTML: Z(St.title)
}, null, 8, J0)) : (S(), R(xt, { key: 1 }, [
lt(we(St.title), 1)
], 64))
]),
_: 2
}, 1032, ["value", "active", "onSelect"]))), 128))
];
}),
_: 3
})) : ae("", !0)
]),
_: 3
})
], 2));
}
}), j0 = {
"prefix-autocomplete": "cdek-autocomplete",
"prefix-autocomplete__not-found": "cdek-autocomplete__not-found",
"prefix-dropdown-box": "cdek-dropdown-box",
"v-enter-active": "v-enter-active",
"v-leave-active": "v-leave-active",
"v-enter-from": "v-enter-from",
"v-leave-to": "v-leave-to",
"accent-query": "accent-query"
}, e1 = {
$style: j0
}, t1 = /* @__PURE__ */ Ae(Q0, [["__cssModules", e1], ["__scopeId", "data-v-4f422c0f"]]), n1 = /* @__PURE__ */ se({
__name: "BaseBadge",
props: {
type: { default: "info" },
variant: { default: "light" },
text: { default: "" }
},
setup(r) {
return (o, i) => (S(), R("div", {
class: M([o.$style["prefix-badge"], o.$style[o.type], o.$style[o.variant]])
}, [
fe(o.$slots, "default", {}, () => [
lt(we(o.text), 1)
], !0)
], 2));
}
}), r1 = "dark", i1 = "positive", s1 = "process", o1 = "negative", l1 = "info", a1 = "deactive", u1 = "neutral", c1 = "light", f1 = {
"prefix-badge": "cdek-badge",
dark: r1,
positive: i1,
process: s1,
negative: o1,
info: l1,
deactive: a1,
neutral: u1,
light: c1
}, d1 = {
$style: f1
}, p1 = /* @__PURE__ */ Ae(n1, [["__cssModules", d1], ["__scopeId", "data-v-fba7850b"]]), h1 = ["width", "height"], _1 = /* @__PURE__ */ bg('<defs data-v-762fb7d3><radialGradient id="paint0_angular_102_1932" cx="24" cy="0" r="48" gradientUnits="userSpaceOnUse" data-v-762fb7d3><stop offset="0.177083" stop-color="currentColor" stop-opacity="0.5" data-v-762fb7d3></stop><stop offset="1" stop-color="currentColor" stop-opacity="0" data-v-762fb7d3></stop></radialGradient></defs><circle cx="24" cy="24" r="23" stroke="currentColor" stroke-opacity="0.1" stroke-width="2" data-v-762fb7d3></circle><path fill-rule="evenodd" clip-rule="evenodd" d="M24 0C10.7452 0 0 10.7452 0 24C0 37.2548 10.7452 48 24 48V46C11.8497 46 2 36.1503 2 24C2 11.8497 11.8497 2 24 2V0Z" fill="url(#paint0_angular_102_1932)" data-v-762fb7d3></path><circle cx="24" cy="1" r="1" fill="currentColor" data-v-762fb7d3></circle><animateTransform from="0 0 0" to="360 0 0" attributeName="transform" type="rotate" repeatCount="indefinite" dur="1300ms" data-v-762fb7d3></animateTransform>', 5), v1 = [
_1
], g1 = /* @__PURE__ */ se({
__name: "BaseSpinner",
props: {
color: { default: "green" },
size: { default: "small" }
},
setup(r) {
const o = r, i = {
small: 24,
medium: 32,
big: 48
}, c = B(() => i[o.size] || o.size), a = B(() => ["green", "white"].includes(o.color) ? {} : {
"--spinner-color": o.color
});
return (p, y) => (S(), R("svg", {
class: M(["spinner", { white: p.color === "white" }]),
style: Zs(a.value),
width: c.value,
height: c.value,
viewBox: "0 0 48 48",
fill: "none",
xmlns: "http://www.w3.org/2000/svg"
}, v1, 14, h1));
}
});
const Qa = /* @__PURE__ */ Ae(g1, [["__scopeId", "data-v-762fb7d3"]]), m1 = /* @__PURE__ */ se({
__name: "BaseButton",
props: {
theme: { default: "primary" },
width: { default: "auto" },
small: { type: Boolean },
disabled: { type: Boolean },
loading: { type: Boolean },
spinnerBefore: { type: Boolean },
icon: { type: Boolean },
as: {}
},
setup(r) {
const o = r, i = B(() => o.theme === "primary" || o.theme === "toaster" || o.disabled ? "white" : "green");
return (c, a) => (S(), pe(Xt(c.as || "button"), {
class: M([
c.$style["prefix-button"],
{
[c.$style[c.theme]]: !0,
[c.$style.small]: c.small,
[c.$style.inline]: c.width === "content",
[c.$style.icon]: c.icon,
[c.$style.disabled]: c.disabled
}
]),
type: "button"
}, {
default: ye(() => [
c.loading ? (S(), pe(Qa, {
key: 0,
color: i.value
}, null, 8, ["color"])) : ae("", !0),
!c.loading || c.spinnerBefore ? fe(c.$slots, "default", { key: 1 }, void 0, !0) : ae("", !0)
]),
_: 3
}, 8, ["class"]));
}
}), y1 = "disabled", b1 = "spinner", w1 = "inline", k1 = "small", x1 = "primary", $1 = "secondary", A1 = "outline", S1 = "ghost", T1 = "toaster", C1 = "icon", O1 = {
"prefix-button": "cdek-button",
disabled: y1,
spinner: b1,
inline: w1,
small: k1,
primary: x1,
secondary: $1,
outline: A1,
ghost: S1,
toaster: T1,
icon: C1
}, E1 = {
$style: O1
}, Ns = /* @__PURE__ */ Ae(m1, [["__cssModules", E1], ["__scopeId", "data-v-12337b30"]]), I1 = ["disabled"], R1 = /* @__PURE__ */ se({
__name: "BaseChip",
props: {
label: {},
modelValue: { type: Boolean, default: !1 },
amount: {},
disabled: { type: Boolean, default: !1 },
small: { type: Boolean, default: !1 }
},
emits: ["update:modelValue"],
setup(r, { emit: o }) {
const i = r, c = cr(), a = oe(i.disabled ? !1 : i.modelValue), p = (g) => {
o("update:modelValue", g), a.value = g;
};
Jt(
() => i.modelValue,
(g) => {
if (i.disabled) {
p(!1);
return;
}
a.value = g;
}
);
const y = () => {
i.disabled || p(!a.value);
};
Jt(
() => i.disabled,
() => {
i.disabled && p(!1);
}
);
const b = B(
() => typeof i.amount == "number" && !Number.isNaN(i.amount)
), T = B(() => !!c.icon);
return (g, _) => (S(), R("button", {
class: M([
g.$style["prefix-chip"],
{
[g.$style["prefix-chip_selected"]]: a.value,
[g.$style["prefix-chip_disabled"]]: g.disabled,
[g.$style["prefix-chip_small"]]: g.small
}
]),
disabled: g.disabled,
type: "button",
onClick: y
}, [
T.value ? (S(), R("span", {
key: 0,
class: M(g.$style["prefix-chip__icon__wrapper"])
}, [
fe(g.$slots, "icon", {}, void 0, !0)
], 2)) : ae("", !0),
z("span", {
class: M(g.$style["prefix-chip__text"])
}, we(g.label), 3),
b.value ? (S(), R("span", {
key: 1,
class: M(g.$style["prefix-chip__amount"])
}, we(g.amount), 3)) : ae("", !0)
], 10, I1));
}
}), L1 = {
"prefix-chip": "cdek-chip",
"prefix-chip_disabled": "cdek-chip_disabled",
"prefix-chip_selected": "cdek-chip_selected",
"prefix-chip__icon__wrapper": "cdek-chip__icon__wrapper",
"prefix-chip__text": "cdek-chip__text",
"prefix-chip__amount": "cdek-chip__amount",
"prefix-chip_small": "cdek-chip_small"
}, M1 = {
$style: L1
}, xw = /* @__PURE__ */ Ae(R1, [["__cssModules", M1], ["__scopeId", "data-v-9e264d89"]]), B1 = {
key: 0,
class: "headline-1"
}, P1 = /* @__PURE__ */ se({
__name: "BaseHeadline",
props: {
size: { default: "1" }
},
setup(r) {
return (o, i) => o.size === "1" ? (S(), R("h1", B1, [
fe(o.$slots, "default", {}, void 0, !0)
])) : (S(), R("div", {
key: 1,
class: M(`headline-${o.size}`)
}, [
fe(o.$slots, "default", {}, void 0, !0)
], 2));
}
});
const D1 = /* @__PURE__ */ Ae(P1, [["__scopeId", "data-v-09e77485"]]), F1 = {
"prefix-link": "cdek-link"
}, N1 = {};
function U1(r, o) {
return S(), R("span", {
class: M(r.$style["prefix-link"])
}, [
fe(r.$slots, "default")
], 2);
}
const W1 = {
$style: F1
}, $w = /* @__PURE__ */ Ae(N1, [["render", U1], ["__cssModules", W1], ["__scopeId", "data-v-0ec8ba24"]]);
/*! maska v2.1.11 | (c) Alexander Shabunevich | Released under the MIT license */
var V1 = Object.defineProperty, H1 = (r, o, i) => o in r ? V1(r, o, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[o] = i, or = (r, o, i) => (H1(r, typeof o != "symbol" ? o + "" : o, i), i);
const Fa = {
"#": { pattern: /[0-9]/ },
"@": { pattern: /[a-zA-Z]/ },
"*": { pattern: /[a-zA-Z0-9]/ }
};
class Na {
constructor(o = {}) {
or(this, "opts", {}), or(this, "memo", /* @__PURE__ */ new Map());
const i = { ...o };
if (i.tokens != null) {
i.tokens = i.tokensReplace ? { ...i.tokens } : { ...Fa, ...i.tokens };
for (const c of Object.values(i.tokens))
typeof c.pattern == "string" && (c.pattern = new RegExp(c.pattern));
} else
i.tokens = Fa;
Array.isArray(i.mask) && (i.mask.length > 1 ? i.mask = [...i.mask].sort((c, a) => c.length - a.length) : i.mask = i.mask[0] ?? ""), i.mask === "" && (i.mask = null), this.opts = i;
}
masked(o) {
return this.process(o, this.findMask(o));
}
unmasked(o) {
return this.process(o, this.findMask(o), !1);
}
isEager() {
return this.opts.eager === !0;
}
isReversed() {
return this.opts.reversed === !0;
}
completed(o) {
const i = this.findMask(o);
if (this.opts.mask == null || i == null)
return !1;
const c = this.process(o, i).length;
return typeof this.opts.mask == "string" ? c >= this.opts.mask.length : typeof this.opts.mask == "function" ? c >= i.length : this.opts.mask.filter((a) => c >= a.length).length === this.opts.mask.length;
}
findMask(o) {
const i = this.opts.mask;
if (i == null)
return null;
if (typeof i == "string")
return i;
if (typeof i == "function")
return i(o);
const c = this.process(o, i.slice(-1).pop() ?? "", !1);
return i.find((a) => this.process(o, a, !1).length >= c.length) ?? "";
}
escapeMask(o) {
const i = [], c = [];
return o.split("").forEach((a, p) => {
a === "!" && o[p - 1] !== "!" ? c.push(p - c.length) : i.push(a);
}), { mask: i.join(""), escaped: c };
}
process(o, i, c = !0) {
if (i == null)
return o;
const a = `value=${o},mask=${i},masked=${c ? 1 : 0}`;
if (this.memo.has(a))
return this.memo.get(a);
const { mask: p, escaped: y } = this.escapeMask(i), b = [], T = this.opts.tokens != null ? this.opts.tokens : {}, g = this.isReversed() ? -1 : 1, _ = this.isReversed() ? "unshift" : "push", C = this.isReversed() ? 0 : p.length - 1, D = this.isReversed() ? () => E > -1 && W > -1 : () => E < p.length && W < o.length, Q = (F) => !this.isReversed() && F <= C || this.isReversed() && F >= C;
let ee, O = -1, E = this.isReversed() ? p.length - 1 : 0, W = this.isReversed() ? o.length - 1 : 0, V = !1;
for (; D(); ) {
const F = p.charAt(E), Z = T[F], q = (Z == null ? void 0 : Z.transform) != null ? Z.transform(o.charAt(W)) : o.charAt(W);
if (!y.includes(E) && Z != null ? (q.match(Z.pattern) != null ? (b[_](q), Z.repeated ? (O === -1 ? O = E : E === C && E !== O && (E = O - g), C === O && (E -= g)) : Z.multiple && (V = !0, E -= g), E += g) : Z.multiple ? V && (E += g, W -= g, V = !1) : q === ee ? ee = void 0 : Z.optional && (E += g, W -= g), W += g) : (c && !this.isEager() && b[_](F), q === F && !this.isEager() ? W += g : ee = F, this.isEager() || (E += g)), this.isEager())
for (; Q(E) && (T[p.charAt(E)] == null || y.includes(E)); )
c ? b[_](p.charAt(E)) : p.charAt(E) === o.charAt(W) && (W += g), E += g;
}
return this.memo.set(a, b.join("")), this.memo.get(a);
}
}
const ja = (r) => JSON.parse(r.replaceAll("'", '"')), Ua = (r, o = {}) => {
const i = { ...o };
return r.dataset.maska != null && r.dataset.maska !== "" && (i.mask = G1(r.dataset.maska)), r.dataset.maskaEager != null && (i.eager = Ps(r.dataset.maskaEager)), r.dataset.maskaReversed != null && (i.reversed = Ps(r.dataset.maskaReversed)), r.dataset.maskaTokensReplace != null && (i.tokensReplace = Ps(r.dataset.maskaTokensReplace)), r.dataset.maskaTokens != null && (i.tokens = Z1(r.dataset.maskaTokens)), i;
}, Ps = (r) => r !== "" ? !!JSON.parse(r) : !0, G1 = (r) => r.startsWith("[") && r.endsWith("]") ? ja(r) : r, Z1 = (r) => {
if (r.startsWith("{") && r.endsWith("}"))
return ja(r);
const o = {};
return r.split("|").forEach((i) => {
const c = i.split(":");
o[c[0]] = {
pattern: new RegExp(c[1]),
optional: c[2] === "optional",
multiple: c[2] === "multiple",
repeated: c[2] === "repeated"
};
}), o;
};
class z1 {
constructor(o, i = {}) {
or(this, "items", /* @__PURE__ */ new Map()), or(this, "beforeinputEvent", (c) => {
const a = c.target, p = this.items.get(a);
p.isEager() && "inputType" in c && c.inputType.startsWith("delete") && p.unmasked(a.value).length <= 1 && this.setMaskedValue(a, "");
}), or(this, "inputEvent", (c) => {
if (c instanceof CustomEvent && c.type === "input" && c.detail != null && typeof c.detail == "object" && "masked" in c.detail)
return;
const a = c.target, p = this.items.get(a), y = a.value, b = a.selectionStart, T = a.selectionEnd;
let g = y;
if (p.isEager()) {
const _ = p.masked(y), C = p.unmasked(y);
C === "" && "data" in c && c.data != null ? g = c.data : C !== p.unmasked(_) && (g = C);
}
if (this.setMaskedValue(a, g), "inputType" in c && (c.inputType.startsWith("delete") || b != null && b < y.length))
try {
a.setSelectionRange(b, T);
} catch {
}
}), this.options = i, typeof o == "string" ? this.init(
Array.from(document.querySelectorAll(o)),
this.getMaskOpts(i)
) : this.init(
"length" in o ? Array.from(o) : [o],
this.getMaskOpts(i)
);
}
destroy() {
for (const o of this.items.keys())
o.removeEventListener("input", this.inputEvent), o.removeEventListener("beforeinput", this.beforeinputEvent);
this.items.clear();
}
needUpdateOptions(o, i) {
const c = this.items.get(o), a = new Na(Ua(o, this.getMaskOpts(i)));
return JSON.stringify(c.opts) !== JSON.stringify(a.opts);
}
needUpdateValue(o) {
const i = o.dataset.maskaValue;
return i == null && o.value !== "" || i != null && i !== o.value;
}
getMaskOpts(o) {
const { onMaska: i, preProcess: c, postProcess: a, ...p } = o;
return p;
}
init(o, i) {
for (const c of o) {
const a = new Na(Ua(c, i));
this.items.set(c, a), c.value !== "" && this.setMaskedValue(c, c.value), c.addEventListener("input", this.inputEvent), c.addEventListener("beforeinput", this.beforeinputEvent);
}
}
setMaskedValue(o, i) {
const c = this.items.get(o);
this.options.preProcess != null && (i = this.options.preProcess(i));
const a = c.masked(i), p = c.unmasked(c.isEager() ? a : i), y = c.completed(i), b = { masked: a, unmasked: p, completed: y };
i = a, this.options.postProcess != null && (i = this.options.postProcess(i)), o.value = i, o.dataset.maskaValue = i, this.options.onMaska != null && (Array.isArray(this.options.onMaska) ? this.options.onMaska.forEach((T) => T(b)) : this.options.onMaska(b)), o.dispatchEvent(new CustomEvent("maska", { detail: b })), o.dispatchEvent(new CustomEvent("input", { detail: b }));
}
}
const Us = /* @__PURE__ */ new WeakMap(), q1 = (r) => {
setTimeout(() => {
var o;
((o = Us.get(r)) == null ? void 0 : o.needUpdateValue(r)) === !0 && r.dispatchEvent(new CustomEvent("input"));
});
}, K1 = (r, o) => {
const i = r instanceof HTMLInputElement ? r : r.querySelector("input"), c = { ...o.arg };
if (i == null || (i == null ? void 0 : i.type) === "file")
return;
q1(i);
const a = Us.get(i);
if (a != null) {
if (!a.needUpdateOptions(i, c))
return;
a.destroy();
}
if (o.value != null) {
const p = o.value, y = (b) => {
p.masked = b.masked, p.unmasked = b.unmasked, p.completed = b.completed;
};
c.onMaska = c.onMaska == null ? y : Array.isArray(c.onMaska) ? [...c.onMaska, y] : [c.onMaska, y];
}
Us.set(i, new z1(i, c));
}, Aw = /* @__PURE__ */ se({
__name: "BaseMaskedInput",
props: {
modelValue: {},
mask: { type: [String, Array, Function, null] },
tokens: {},
preProcess: { type: Function },
postProcess: { type: Function },
type: {}
},
emits: ["update:modelValue", "update:unmasked", "update:completed", "complete"],
setup(r, { emit: o }) {
const i = r, c = B(() => {
const b = {
mask: i.mask
};
return typeof i.tokens == "object" && (b.tokens = i.tokens), i.preProcess && (b.preProcess = i.preProcess), i.postProcess && (b.postProcess = i.postProcess), b;
}), a = oe(i.modelValue || "");
Jt(
() => i.modelValue,
(b) => {
b !== a.value && (a.value = b || "");
}
);
const p = (b) => {
a.value !== b.detail.masked && (a.value = b.detail.masked, o("update:modelValue", b.detail.masked), o("update:unmasked", b.detail.unmasked), o("update:completed", b.detail.completed), b.detail.completed && o("complete"));
}, y = B(() => i.type === "number" ? {
type: "text",
inputmode: "numeric"
} : i.type ? {
type: i.type
} : {});
return (b, T) => ci((S(), pe(Xs, Qt({
"model-value": a.value,
"data-maska-tokens": typeof b.tokens == "string" ? b.tokens : void 0,
onMaska: p
}, y.value), qs({ _: 2 }, [
pn(b.$slots, (g, _) => ({
name: _,
fn: ye((C) => [
fe(b.$slots, _, fr(fi(C)))
])
}))
]), 1040, ["model-value", "data-maska-tokens"])), [
[ie(K1), void 0, c.value]
]);
}
});
class ai {
init() {
}
}
/**
* экземпляр класса
*/
Ge(ai, "instance", null), /**
* объект для хранения экземпляров по ключу
*/
Ge(ai, "scopedInstances", {});
const eu = (r) => (
/**
* Отдает существующий или новый экземпляр класса (если существующий еще не создан)
*
* @param key - ключ для получения именнованного экземпляря, иначе отдает общий
* @returns требуемый экземпляр класса
*/
(o = "") => o ? r.scopedInstances[o] || (r.scopedInstances[o] = new r()) : r.instance || (r.instance = new r())
), Sw = (r) => (
/**
* Уничтожение базового экземпляра или по ключам
*
* @param keys - если не передано ничего, то уничтожаем базовый,
* если переданы строки через запятую, то уничтожаем все экземпляры
*
* @example
* destroyServiceName();
* destroyServiceName('someKey');
* destroyServiceName('someKey', 'someAnotherKey');
*/
(...o) => {
if (o.length > 0)
for (const i of o)
delete r.scopedInstances[i];
else
r.instance = null;
}
);
function Y1(r, o) {
return () => {
var c;
o.instance || (o.isReactive = !1);
let i = r();
return o.isReactive || (i = Ks(i), o.instance = i, o.isReactive = !0, (c = i.init) == null || c.call(i)), i;
};
}
class tu extends ai {
constructor() {
super(...arguments);
Ge(this, "isOpen", !1);
Ge(this, "modalData", {});
}
openModal(i, c) {
this.modalData = {
component: wg(i),
props: c == null ? void 0 : c.props,
settings: c == null ? void 0 : c.settings
}, this.isOpen = !0;
}
closeModal() {
this.modalData = {}, this.isOpen = !1;
}
}
const X1 = eu(tu), J1 = Y1(
X1,
tu
), Q1 = {
xmlns: "http://www.w3.org/2000/svg",
width: "14",
height: "14",
fill: "none"
}, j1 = /* @__PURE__ */ z("path", {
stroke: "#1AB248",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "1.75",
d: "M13 1 1 13M1 1l12 12"
}, null, -1), em = [
j1
];
function tm(r, o) {
return S(), R("svg", Q1, em);
}
const nm = { render: tm }, rm = /* @__PURE__ */ se({
__name: "BaseModal",
setup(r) {
const o = J1(), i = oe(), c = () => {
o.closeModal();
}, a = (g) => {
var _;
(_ = i.value) != null && _.contains(g.target) || c();
}, p = (g) => {
g.key === "Escape" && c();
}, y = B(() => {
var g, _;
return {
"--modal-width": (_ = (g = o.modalData) == null ? void 0 : g.settings) == null ? void 0 : _.width
};
}), b = B(() => {
var g, _;
return ((_ = (g = o.modalData) == null ? void 0 : g.settings) == null ? void 0 : _.withoutCloseButton) || !1;
}), T = B(() => {
var g, _;
return ((_ = (g = o.modalData) == null ? void 0 : g.settings) == null ? void 0 : _.wrapperWithoutPaddings) || !1;
});
return di(() => {
var g;
document.body.style.overflow = (g = o.modalData) != null && g.component ? "hidden" : "", o.isOpen ? document.addEventListener("keyup", p) : document.removeEventListener("keyup", p);
}), (g, _) => (S(), pe(qa, null, {
default: ye(() => {
var C, D;
return [
ie(o).isOpen ? (S(), R("div", {
key: 0,
class: M(g.$style["prefix-modal"])
}, [
z("div", {
class: M([
g.$style["prefix-modal__wrapper"],
T.value ? g.$style["prefix-modal__wrapper_disable-padding"] : ""
]),
onClick: a
}, [
z("div", {
class: M(g.$style["prefix-modal__box"]),
ref_key: "boxElement",
ref: i,
style: Zs(y.value)
}, [
(S(), pe(Xt((C = ie(o).modalData) == null ? void 0 : C.component), fr(fi(((D = ie(o).modalData) == null ? void 0 : D.props) || {})), null, 16)),
b.value ? ae("", !0) : (S(), pe(ie(nm), {
key: 0,
class: M(g.$style["prefix-modal__box__close-trigger"]),
onClick: c
}, null, 8, ["class"]))
], 6)
], 2)
], 2)) : ae("", !0)
];
}),
_: 1
}));
}
}), im = {
"prefix-modal": "cdek-modal",
"prefix-modal__wrapper": "cdek-modal__wrapper",
"prefix-modal__wrapper_disable-padding": "cdek-modal__wrapper_disable-padding",
"prefix-modal__box": "cdek-modal__box",
"prefix-modal__box__close-trigger": "cdek-modal__box__close-trigger",
"v-enter-active": "v-enter-active",
"v-leave-active": "v-leave-active",
"v-enter-from": "v-enter-from",
"v-leave-to": "v-leave-to"
}, sm = {
$style: im
}, Tw = /* @__PURE__ */ Ae(rm, [["__cssModules", sm], ["__scopeId", "data-v-6d8da2e6"]]), om = /* @__PURE__ */ se({
__name: "BaseConfirm",
props: {
title: {},
badge: {},
hint: {},
content: {},
footer: {}
},
setup(r) {
return (o, i) => {
var c, a, p, y, b;
return S(), R("div", {
class: M(o.$style["prefix-confirm"])
}, [
o.title ? (S(), R("div", {
key: 0,
class: M(o.$style["prefix-confirm__header"])
}, [
z("div", {
class: M(o.$style["prefix-confirm__header__title"])
}, [
lt(we(o.title) + " ", 1),
o.badge ? (S(), pe(p1, fr(Qt({ key: 0 }, o.badge)), null, 16)) : ae("", !0)
], 2),
o.hint ? (S(), R("div", {
key: 0,
class: M(o.$style["prefix-confirm__header__hint"])
}, we(o.hint), 3)) : ae("", !0)
], 2)) : ae("", !0),
z("div", {
class: M(o.$style["prefix-confirm__content"])
}, we(o.content), 3),
o.footer ? (S(), R("div", {
key: 1,
class: M(o.$style["prefix-confirm__footer"])
}, [
o.footer.accept ? (S(), pe(Ns, {
key: 0,
theme: "primary",
onClick: (a = (c = o.footer) == null ? void 0 : c.accept) == null ? void 0 : a.onClick,
width: "content"
}, {
default: ye(() => {
var T, g;
return [
lt(we((g = (T = o.footer) == null ? void 0 : T.accept) == null ? void 0 : g.text), 1)
];
}),
_: 1
}, 8, ["onClick"])) : ae("", !0),
(p = o.footer) != null && p.cancel ? (S(), pe(Ns, {
key: 1,
theme: "outline",
onClick: (b = (y = o.footer) == null ? void 0 : y.cancel) == null ? void 0 : b.onClick,
width: "content"
}, {
default: ye(() => {
var T, g;
return [
lt(we((g = (T = o.footer) == null ? void 0 : T.cancel) == null ? void 0 : g.text), 1)
];
}),
_: 1
}, 8, ["onClick"])) : ae("", !0)
], 2)) : ae("", !0)
], 2);
};
}
}), lm = {
"prefix-confirm": "cdek-confirm",
"prefix-confirm__header": "cdek-confirm__header",
"prefix-confirm__header__title": "cdek-confirm__header__title",
"prefix-badge": "cdek-badge",
"prefix-confirm__header__hint": "cdek-confirm__header__hint",
"prefix-confirm__footer": "cdek-confirm__footer",
"prefix-button": "cdek-button"
}, am = {
$style: lm
}, Cw = /* @__PURE__ */ Ae(om, [["__cssModules", am], ["__scopeId", "data-v-02e933a3"]]);
function _t(r, o, ...i) {
if (r in o) {
let a = o[r];
return typeof a == "function" ? a(...i) : a;
}
let c = new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map((a) => `"${a}"`).join(", ")}.`);
throw Error.captureStackTrace && Error.captureStackTrace(c, _t), c;
}
var Ws = ((r) => (r[r.None = 0] = "None", r[r.RenderStrategy = 1] = "RenderStrategy", r[r.Static = 2] = "Static", r))(Ws || {}), um = ((r) => (r[r.Unmount = 0] = "Unmount", r[r.Hidden = 1] = "Hidden", r))(um || {});
function $t({ visible: r = !0, features: o = 0, ourProps: i, theirProps: c, ...a }) {
var p;
let y = ru(c, i), b = Object.assign(a, { props: y });
if (r || o & 2 && y.static)
return Ds(b);
if (o & 1) {
let T = (p = y.unmount) == null || p ? 0 : 1;
return _t(T, { 0() {
return null;
}, 1() {
return Ds({ ...a, props: { ...y, hidden: !0, style: { display: "none" } } });
} });
}
return Ds(b);
}
function Ds({ props: r, attrs: o, slots: i, slot: c, name: a }) {
var p, y;
let { as: b, ...T } = Js(r, ["unmount", "static"]), g = (p = i.default) == null ? void 0 : p.call(i, c), _ = {};
if (c) {
let C = !1, D = [];
for (let [Q, ee] of Object.entries(c))
typeof ee == "boolean" && (C = !0), ee === !0 && D.push(Q);
C && (_["data-headlessui-state"] = D.join(" "));
}
if (b === "template") {
if (g = nu(g ?? []), Object.keys(T).length > 0 || Object.keys(o).length > 0) {
let [C, ...D] = g ?? [];
if (!cm(C) || D.length > 0)
throw new Error(['Passing props on "template"!', "", `The current component <${a} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(T).concat(Object.keys(o)).map((O) => O.trim()).filter((O, E, W) => W.indexOf(O) === E).sort((O, E) => O.localeCompare(E)).map((O) => ` - ${O}`).join(`
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((O) => ` - ${O}`).join(`
`)].join(`
`));
let Q = ru((y = C.props) != null ? y : {}, T), ee = kg(C, Q);
for (let O in Q)
O.startsWith("on") && (ee.props || (ee.props = {}), ee.props[O] = Q[O]);
return ee;
}
return Array.isArray(g) && g.length === 1 ? g[0] : g;
}
return lr(b, Object.assign({}, T, _), { default: () => g });
}
function nu(r) {
return r.flatMap((o) => o.type === xt ? nu(o.children) : [o]);
}
function ru(...r) {
if (r.length === 0)
return {};
if (r.length === 1)
return r[0];
let o = {}, i = {};
for (let c of r)
for (let a in c)
a.startsWith("on") && typeof c[a] == "function" ? (i[a] != null || (i[a] = []), i[a].push(c[a])) : o[a] = c[a];
if (o.disabled || o["aria-disabled"])
return Object.assign(o, Object.fromEntries(Object.keys(i).map((c) => [c, void 0])));
for (let c in i)
Object.assign(o, { [c](a, ...p) {
let y = i[c];
for (let b of y) {
if (a instanceof Event && a.defaultPrevented)
return;
b(a, ...p);
}
} });
return o;
}
function iu(r) {
let o = Object.assign({}, r);
for (let i in o)
o[i] === void 0 && delete o[i];
return o;
}
function Js(r, o = []) {
let i = Object.assign({}, r);
for (let c of o)
c in i && delete i[c];
return i;
}
function cm(r) {
return r == null ? !1 : typeof r.type == "string" || typeof r.type == "object" || typeof r.type == "function";
}
let fm = 0;
function dm() {
return ++fm;
}
function _n() {
return dm();
}
var Se = ((r) => (r.Space = " ", r.Enter = "Enter", r.Escape = "Escape", r.Backspace = "Backspace", r.Delete = "Delete", r.ArrowLeft = "ArrowLeft", r.ArrowUp = "ArrowUp", r.ArrowRight = "ArrowRight", r.ArrowDown = "ArrowDown", r.Home = "Home", r.End = "End", r.PageUp = "PageUp", r.PageDown = "PageDown", r.Tab = "Tab", r))(Se || {});
function pm(r) {
throw new Error("Unexpected object: " + r);
}
var Ne = ((r) => (r[r.First = 0] = "First", r[r.Previous = 1] = "Previous", r[r.Next = 2] = "Next", r[r.Last = 3] = "Last", r[r.Specific = 4] = "Specific", r[r.Nothing = 5] = "Nothing", r))(Ne || {});
function hm(r, o) {
let i = o.resolveItems();
if (i.length <= 0)
return null;
let c = o.resolveActiveIndex(), a = c ?? -1, p = (() => {
switch (r.focus) {
case 0:
return i.findIndex((y) => !o.resolveDisabled(y));
case 1: {
let y = i.slice().reverse().findIndex((b, T, g) => a !== -1 && g.length - T - 1 >= a ? !1 : !o.resolveDisabled(b));
return y === -1 ? y : i.length - 1 - y;
}
case 2:
return i.findIndex((y, b) => b <= a ? !1 : !o.resolveDisabled(y));
case 3: {
let y = i.slice().reverse().findIndex((b) => !o.resolveDisabled(b));
return y === -1 ? y : i.length - 1 - y;
}
case 4:
return i.findIndex((y) => o.resolveId(y) === r.id);
case 5:
return null;
default:
pm(r);
}
})();
return p === -1 ? c : p;
}
function be(r) {
var o;
return r == null || r.value == null ? null : (o = r.value.$el) != null ? o : r.value;
}
let su = Symbol("Context");
var ar = ((r) => (r[r.Open = 1] = "Open", r[r.Closed = 2] = "Closed", r[r.Closing = 4] = "Closing", r[r.Opening = 8] = "Opening", r))(ar || {});
function _m() {
return hn(su, null);
}
function vm(r) {
Mn(su, r);
}
function Wa(r, o) {
if (r)
return r;
let i = o ?? "button";
if (typeof i == "string" && i.toLowerCase() === "button")
return "button";
}
function ou(r, o) {
let i = oe(Wa(r.value.type, r.value.as));
return Dt(() => {
i.value = Wa(r.value.type, r.value.as);
}), di(() => {
var c;
i.value || be(o) && be(o) instanceof HTMLButtonElement && !((c = be(o)) != null && c.hasAttribute("type")) && (i.value = "button");
}), i;
}
var gm = Object.defineProperty, mm = (r, o, i) => o in r ? gm(r, o, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[o] = i, Va = (r, o, i) => (mm(r, typeof o != "symbol" ? o + "" : o, i), i);
let ym = class {
constructor() {
Va(this, "current", this.detect()), Va(this, "currentId", 0);
}
set(o) {
this.current !== o && (this.currentId = 0, this.current = o);
}
reset() {
this.set(this.detect());
}
nextId() {
return ++this.currentId;
}
get isServer() {
return this.current === "server";
}
get isClient() {
return this.current === "client";
}
detect() {
return typeof window > "u" || typeof document > "u" ? "server" : "client";
}
}, lu = new ym();
function bm(r) {
if (lu.isServer)
return null;
if (r instanceof Node)
return r.ownerDocument;
if (r != null && r.hasOwnProperty("value")) {
let o = be(r);
if (o)
return o.ownerDocument;
}
return document;
}
let Ha = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((r) => `${r}:not([tabindex='-1'])`).join(",");
var wm = ((r) => (r[r.First = 1] = "First", r[r.Previous = 2] = "Previous", r[r.Next = 4] = "Next", r[r.Last = 8] = "Last", r[r.WrapAround = 16] = "WrapAround", r[r.NoScroll = 32] = "NoScroll", r))(wm || {}), km = ((r) => (r[r.Error = 0] = "Error", r[r.Overflow = 1] = "Overflow", r[r.Success = 2] = "Success", r[r.Underflow = 3] = "Underflow", r))(km || {}), xm = ((r) => (r[r.Previous = -1] = "Previous", r[r.Next = 1] = "Next", r))(xm || {}), Qs = ((r) => (r[r.Strict = 0] = "Strict", r[r.Loose = 1] = "Loose", r))(Qs || {});
function au(r, o = 0) {
var i;
return r === ((i = bm(r)) == null ? void 0 : i.body) ? !1 : _t(o, { 0() {
return r.matches(Ha);
}, 1() {
let c = r;
for (; c !== null; ) {
if (c.matches(Ha))
return !0;
c = c.parentElement;
}
return !1;
} });
}
function $m(r, o = (i) => i) {
return r.slice().sort((i, c) => {
let a = o(i), p = o(c);
if (a === null || p === null)
return 0;
let y = a.compareDocumentPosition(p);
return y & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : y & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
});
}
function Fs(r, o, i) {
lu.isServer || di((c) => {
document.addEventListener(r, o, i), c(() => document.removeEventListener(r, o, i));
});
}
function Am(r, o, i = B(() => !0)) {
function c(p, y) {
if (!i.value || p.defaultPrevented)
return;
let b = y(p);
if (b === null || !b.getRootNode().contains(b))
return;
let T = function g(_) {
return typeof _ == "function" ? g(_()) : Array.isArray(_) || _ instanceof Set ? _ : [_];
}(r);
for (let g of T) {
if (g === null)
continue;
let _ = g instanceof HTMLElement ? g : be(g);
if (_ != null && _.contains(b) || p.composed && p.composedPath().includes(_))
return;
}
return !au(b, Qs.Loose) && b.tabIndex !== -1 && p.preventDefault(), o(p, b);
}
let a = oe(null);
Fs("mousedown", (p) => {
var y, b;
i.value && (a.value = ((b = (y = p.composedPath) == null ? void 0 : y.call(p)) == null ? void 0 : b[0]) || p.target);
}, !0), Fs("click", (p) => {
a.value && (c(p, () => a.value), a.value = null);
}, !0), Fs("blur", (p) => c(p, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
}
var js = ((r) => (r[r.None = 1] = "None", r[r.Focusable = 2] = "Focusable", r[r.Hidden = 4] = "Hidden", r))(js || {});
let uu = se({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(r, { slots: o, attrs: i }) {
return () => {
let { features: c, ...a } = r, p = { "aria-hidden": (c & 2) === 2 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(c & 4) === 4 && (c & 2) !== 2 && { display: "none" } } };
return $t({ ourProps: p, theirProps: a, slot: {}, attrs: i, slots: o, name: "Hidden" });
};
} });
function cu(r = {}, o = null, i = []) {
for (let [c, a] of Object.entries(r))
du(i, fu(o, c), a);
return i;
}
function fu(r, o) {
return r ? r + "[" + o + "]" : o;
}
function du(r, o, i) {
if (Array.isArray(i))
for (let [c, a] of i.entries())
du(r, fu(o, c.toString()), a);
else
i instanceof Date ? r.push([o, i.toISOString()]) : typeof i == "boolean" ? r.push([o, i ? "1" : "0"]) : typeof i == "string" ? r.push([o, i]) : typeof i == "number" ? r.push([o, `${i}`]) : i == null ? r.push([o, ""]) : cu(i, o, r);
}
function Sm(r) {
var o;
let i = (o = r == null ? void 0 : r.form) != null ? o : r.closest("form");
if (i) {
for (let c of i.elements)
if (c.tagName === "INPUT" && c.type === "submit" || c.tagName === "BUTTON" && c.type === "submit" || c.nodeName === "INPUT" && c.type === "image") {
c.click();
return;
}
}
}
function pu(r, o, i) {
let c = oe(i == null ? void 0 : i.value), a = B(() => r.value !== void 0);
return [B(() => a.value ? r.value : c.value), function(p) {
return a.value || (c.value = p), o == null ? void 0 : o(p);
}];
}
function Ga(r) {
return [r.screenX, r.screenY];
}
function Tm() {
let r = oe([-1, -1]);
return { wasMoved(o) {
let i = Ga(o);
return r.value[0] === i[0] && r.value[1] === i[1] ? !1 : (r.value = i, !0);
}, update(o) {
r.value = Ga(o);
} };
}
let hu = Symbol("DescriptionContext");
function Cm() {
let r = hn(hu, null);
if (r === null)
throw new Error("Missing parent");
return r;
}
function Om({ slot: r = oe({}), name: o = "Description", props: i = {} } = {}) {
let c = oe([]);
function a(p) {
return c.value.push(p), () => {
let y = c.value.indexOf(p);
y !== -1 && c.value.splice(y, 1);
};
}
return Mn(hu, { register: a, slot: r, name: o, props: i }), B(() => c.value.length > 0 ? c.value.join(" ") : void 0);
}
se({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${_n()}` } }, setup(r, { attrs: o, slots: i }) {
let c = Cm();
return Dt(() => Ys(c.register(r.id))), () => {
let { name: a = "Description", slot: p = oe({}), props: y = {} } = c, { id: b, ...T } = r, g = { ...Object.entries(y).reduce((_, [C, D]) => Object.assign(_, { [C]: ie(D) }), {}), id: b };
return $t({ ourProps: g, theirProps: T, slot: p.value, attrs: o, slots: i, name: a });
};
} });
function Em(r, o) {
return r === o;
}
var Im = ((r) => (r[r.Open = 0] = "Open", r[r.Closed = 1] = "Closed", r))(Im || {}), Rm = ((r) => (r[r.Single = 0] = "Single", r[r.Multi = 1] = "Multi", r))(Rm || {}), Lm = ((r) => (r[r.Pointer = 0] = "Pointer", r[r.Other = 1] = "Other", r))(Lm || {});
function Mm(r) {
requestAnimationFrame(() => requestAnimationFrame(r));
}
let _u = Symbol("ListboxContext");
function dr(r) {
let o = hn(_u, null);
if (o === null) {
let i = new Error(`<${r} /> is missing a parent <Listbox /> component.`);
throw Error.captureStackTrace && Error.captureStackTrace(i, dr), i;
}
return o;
}
let Bm = se({ name: "Listbox", emits: { "update:modelValue": (r) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], default: () => Em }, horizontal: { type: [Boolean], default: !1 }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, name: { type: String, optional: !0 }, multiple: { type: [Boolean], default: !1 } }, inheritAttrs: !1, setup(r, { slots: o, attrs: i, emit: c }) {
let a = oe(1), p = oe(null), y = oe(null), b = oe(null), T = oe([]), g = oe(""), _ = oe(null), C = oe(1);
function D(V = (F) => F) {
let F = _.value !== null ? T.value[_.value] : null, Z = $m(V(T.value.slice()), (ge) => be(ge.dataRef.domRef)), q = F ? Z.indexOf(F) : null;
return q === -1 && (q = null), { options: Z, activeOptionIndex: q };
}
let Q = B(() => r.multiple ? 1 : 0), [ee, O] = pu(B(() => r.modelValue === void 0 ? _t(Q.value, { 1: [], 0: void 0 }) : r.modelValue), (V) => c("update:modelValue", V), B(() => r.defaultValue)), E = { listboxState: a, value: ee, mode: Q, compare(V, F) {
if (typeof r.by == "string") {
let Z = r.by;
return (V == null ? void 0 : V[Z]) === (F == null ? void 0 : F[Z]);
}
return r.by(V, F);
}, orientation: B(() => r.horizontal ? "horizontal" : "vertical"), labelRef: p, buttonRef: y, optionsRef: b, disabled: B(() => r.disabled), options: T, searchQuery: g, activeOptionIndex: _, activationTrigger: C, closeListbox() {
r.disabled || a.value !== 1 && (a.value = 1, _.value = null);
}, openListbox() {
r.disabled || a.value !== 0 && (a.value = 0);
}, goToOption(V, F, Z) {
if (r.disabled || a.value === 1)
return;
let q = D(), ge = hm(V === Ne.Specific ? { focus: Ne.Specific, id: F } : { focus: V }, { resolveItems: () => q.options, resolveActiveIndex: () => q.activeOptionIndex, resolveId: (Ee) => Ee.id, resolveDisabled: (Ee) => Ee.dataRef.disabled });
g.value = "", _.value = ge, C.value = Z ?? 1, T.value = q.options;
}, search(V) {
if (r.disabled || a.value === 1)
return;
let F = g.value !== "" ? 0 : 1;
g.value += V.toLowerCase();
let Z = (_.value !== null ? T.value.slice(_.value + F).concat(T.value.slice(0, _.value + F)) : T.value).find((ge) => ge.dataRef.textValue.startsWith(g.value) && !ge.dataRef.disabled), q = Z ? T.value.indexOf(Z) : -1;
q === -1 || q === _.value || (_.value = q, C.value = 1);
}, clearSearch() {
r.disabled || a.value !== 1 && g.value !== "" && (g.value = "");
}, registerOption(V, F) {
let Z = D((q) => [...q, { id: V, dataRef: F }]);
T.value = Z.options, _.value = Z.activeOptionIndex;
}, unregisterOption(V) {
let F = D((Z) => {
let q = Z.findIndex((ge) => ge.id === V);
return q !== -1 && Z.splice(q, 1), Z;
});
T.value = F.options, _.value = F.activeOptionIndex, C.value = 1;
}, select(V) {
r.disabled || O(_t(Q.value, { 0: () => V, 1: () => {
let F = st(E.value.value).slice(), Z = st(V), q = F.findIndex((ge) => E.compare(Z, st(ge)));
return q === -1 ? F.push(Z) : F.splice(q, 1), F;
} }));
} };
Am([y, b], (V, F) => {
var Z;
E.closeListbox(), au(F, Qs.Loose) || (V.preventDefault(), (Z = be(y)) == null || Z.focus());
}, B(() => a.value === 0)), Mn(_u, E), vm(B(() => _t(a.value, { 0: ar.Open, 1: ar.Closed })));
let W = B(() => {
var V;
return (V = be(y)) == null ? void 0 : V.closest("form");
});
return Dt(() => {
Jt([W], () => {
if (!W.value || r.defaultValue === void 0)
return;
function V() {
E.select(r.defaultValue);
}
return W.value.addEventListener("reset", V), () => {
var F;
(F = W.value) == null || F.removeEventListener("reset", V);
};
}, { immediate: !0 });
}), () => {
let { name: V, modelValue: F, disabled: Z, ...q } = r, ge = { open: a.value === 0, disabled: Z, value: ee.value };
return lr(xt, [...V != null && ee.value != null ? cu({ [V]: ee.value }).map(([Ee, At]) => lr(uu, iu({ features: js.Hidden, key: Ee, as: "input", type: "hidden", hidden: !0, readOnly: !0, name: Ee, value: At }))) : [], $t({ ourProps: {}, theirProps: { ...i, ...Js(q, ["defaultValue", "onUpdate:modelValue", "horizontal", "multiple", "by"]) }, slot: ge, slots: o, attrs: i, name: "Listbox" })]);
};
} }), Pm = se({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: () => `headlessui-listbox-label-${_n()}` } }, setup(r, { attrs: o, slots: i }) {
let c = dr("ListboxLabel");
function a() {
var p;
(p = be(c.buttonRef)) == null || p.focus({ preventScroll: !0 });
}
return () => {
let p = { open: c.listboxState.value === 0, disabled: c.disabled.value }, { id: y, ...b } = r, T = { id: y, ref: c.labelRef, onClick: a };
return $t({ ourProps: T, theirProps: b, slot: p, attrs: o, slots: i, name: "ListboxLabel" });
};
} }), Dm = se({ name: "ListboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-listbox-button-${_n()}` } }, setup(r, { attrs: o, slots: i, expose: c }) {
let a = dr("ListboxButton");
c({ el: a.buttonRef, $el: a.buttonRef });
function p(g) {
switch (g.key) {
case Se.Space:
case Se.Enter:
case Se.ArrowDown:
g.preventDefault(), a.openListbox(), Yt(() => {
var _;
(_ = be(a.optionsRef)) == null || _.focus({ preventScroll: !0 }), a.value.value || a.goToOption(Ne.First);
});
break;
case Se.ArrowUp:
g.preventDefault(), a.openListbox(), Yt(() => {
var _;
(_ = be(a.optionsRef)) == null || _.focus({ preventScroll: !0 }), a.value.value || a.goToOption(Ne.Last);
});
break;
}
}
function y(g) {
switch (g.key) {
case Se.Space:
g.preventDefault();
break;
}
}
function b(g) {
a.disabled.value || (a.listboxState.value === 0 ? (a.closeListbox(), Yt(() => {
var _;
return (_ = be(a.buttonRef)) == null ? void 0 : _.focus({ preventScroll: !0 });
})) : (g.preventDefault(), a.openListbox(), Mm(() => {
var _;
return (_ = be(a.optionsRef)) == null ? void 0 : _.focus({ preventScroll: !0 });
})));
}
let T = ou(B(() => ({ as: r.as, type: o.type })), a.buttonRef);
return () => {
var g, _;
let C = { open: a.listboxState.value === 0, disabled: a.disabled.value, value: a.value.value }, { id: D, ...Q } = r, ee = { ref: a.buttonRef, id: D, type: T.value, "aria-haspopup": "listbox", "aria-controls": (g = be(a.optionsRef)) == null ? void 0 : g.id, "aria-expanded": a.disabled.value ? void 0 : a.listboxState.value === 0, "aria-labelledby": a.labelRef.value ? [(_ = be(a.labelRef)) == null ? void 0 : _.id, D].join(" ") : void 0, disabled: a.disabled.value === !0 ? !0 : void 0, onKeydown: p, onKeyup: y, onClick: b };
return $t({ ourProps: ee, theirProps: Q, slot: C, attrs: o, slots: i, name: "ListboxButton" });
};
} }), Fm = se({ name: "ListboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, id: { type: String, default: () => `headlessui-listbox-options-${_n()}` } }, setup(r, { attrs: o, slots: i, expose: c }) {
let a = dr("ListboxOptions"), p = oe(null);
c({ el: a.optionsRef, $el: a.optionsRef });
function y(g) {
switch (p.value && clearTimeout(p.value), g.key) {
case Se.Space:
if (a.searchQuery.value !== "")
return g.preventDefault(), g.stopPropagation(), a.search(g.key);
case Se.Enter:
if (g.preventDefault(), g.stopPropagation(), a.activeOptionIndex.value !== null) {
let _ = a.options.value[a.activeOptionIndex.value];
a.select(_.dataRef.value);
}
a.mode.value === 0 && (a.closeListbox(), Yt(() => {
var _;
return (_ = be(a.buttonRef)) == null ? void 0 : _.focus({ preventScroll: !0 });
}));
break;
case _t(a.orientation.value, { vertical: Se.ArrowDown, horizontal: Se.ArrowRight }):
return g.preventDefault(), g.stopPropagation(), a.goToOption(Ne.Next);
case _t(a.orientation.value, { vertical: Se.ArrowUp, horizontal: Se.ArrowLeft }):
return g.preventDefault(), g.stopPropagation(), a.goToOption(Ne.Previous);
case Se.Home:
case Se.PageUp:
return g.preventDefault(), g.stopPropagation(), a.goToOption(Ne.First);
case Se.End:
case Se.PageDown:
return g.preventDefault(), g.stopPropagation(), a.goToOption(Ne.Last);
case Se.Escape:
g.preventDefault(), g.stopPropagation(), a.closeListbox(), Yt(() => {
var _;
return (_ = be(a.buttonRef)) == null ? void 0 : _.focus({ preventScroll: !0 });
});
break;
case Se.Tab:
g.preventDefault(), g.stopPropagation();
break;
default:
g.key.length === 1 && (a.search(g.key), p.value = setTimeout(() => a.clearSearch(), 350));
break;
}
}
let b = _m(), T = B(() => b !== null ? (b.value & ar.Open) === ar.Open : a.listboxState.value === 0);
return () => {
var g, _, C, D;
let Q = { open: a.listboxState.value === 0 }, { id: ee, ...O } = r, E = { "aria-activedescendant": a.activeOptionIndex.value === null || (g = a.options.value[a.activeOptionIndex.value]) == null ? void 0 : g.id, "aria-multiselectable": a.mode.value === 1 ? !0 : void 0, "aria-labelledby": (D = (_ = be(a.labelRef)) == null ? void 0 : _.id) != null ? D : (C = be(a.buttonRef)) == null ? void 0 : C.id, "aria-orientation": a.orientation.value, id: ee, onKeydown: y, role: "listbox", tabIndex: 0, ref: a.optionsRef };
return $t({ ourProps: E, theirProps: O, slot: Q, attrs: o, slots: i, features: Ws.RenderStrategy | Ws.Static, visible: T.value, name: "ListboxOptions" });
};
} }), Nm = se({ name: "ListboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, id: { type: String, default: () => `headlessui-listbox.option-${_n()}` } }, setup(r, { slots: o, attrs: i, expose: c }) {
let a = dr("ListboxOption"), p = oe(null);
c({ el: p, $el: p });
let y = B(() => a.activeOptionIndex.value !== null ? a.options.value[a.activeOptionIndex.value].id === r.id : !1), b = B(() => _t(a.mode.value, { 0: () => a.compare(st(a.value.value), st(r.value)), 1: () => st(a.value.value).some((E) => a.compare(st(E), st(r.value))) })), T = B(() => _t(a.mode.value, { 1: () => {
var E;
let W = st(a.value.value);
return ((E = a.options.value.find((V) => W.some((F) => a.compare(st(F), st(V.dataRef.value))))) == null ? void 0 : E.id) === r.id;
}, 0: () => b.value })), g = B(() => ({ disabled: r.disabled, value: r.value, textValue: "", domRef: p }));
Dt(() => {
var E, W;
let V = (W = (E = be(p)) == null ? void 0 : E.textContent) == null ? void 0 : W.toLowerCase().trim();
V !== void 0 && (g.value.textValue = V);
}), Dt(() => a.registerOption(r.id, g)), Ys(() => a.unregisterOption(r.id)), Dt(() => {
Jt([a.listboxState, b], () => {
a.listboxState.value === 0 && b.value && _t(a.mode.value, { 1: () => {
T.value && a.goToOption(Ne.Specific, r.id);
}, 0: () => {
a.goToOption(Ne.Specific, r.id);
} });
}, { immediate: !0 });
}), di(() => {
a.listboxState.value === 0 && y.value && a.activationTrigger.value !== 0 && Yt(() => {
var E, W;
return (W = (E = be(p)) == null ? void 0 : E.scrollIntoView) == null ? void 0 : W.call(E, { block: "nearest" });
});
});
function _(E) {
if (r.disabled)
return E.preventDefault();
a.select(r.value), a.mode.value === 0 && (a.closeListbox(), Yt(() => {
var W;
return (W = be(a.buttonRef)) == null ? void 0 : W.focus({ preventScroll: !0 });
}));
}
function C() {
if (r.disabled)
return a.goToOption(Ne.Nothing);
a.goToOption(Ne.Specific, r.id);
}
let D = Tm();
function Q(E) {
D.update(E);
}
function ee(E) {
D.wasMoved(E) && (r.disabled || y.value || a.goToOption(Ne.Specific, r.id, 0));
}
function O(E) {
D.wasMoved(E) && (r.disabled || y.value && a.goToOption(Ne.Nothing));
}
return () => {
let { disabled: E } = r, W = { active: y.value, selected: b.value, disabled: E }, { id: V, value: F, disabled: Z, ...q } = r, ge = { id: V, ref: p, role: "option", tabIndex: E === !0 ? void 0 : -1, "aria-disabled": E === !0 ? !0 : void 0, "aria-selected": b.value, disabled: void 0, onClick: _, onFocus: C, onPointerenter: Q, onMouseenter: Q, onPointermove: ee, onMousemove: ee, onPointerleave: O, onMouseleave: O };
return $t({ ourProps: ge, theirProps: q, slot: W, attrs: i, slots: o, name: "ListboxOption" });
};
} }), vu = Symbol("LabelContext");
function gu() {
let r = hn(vu, null);
if (r === null) {
let o = new Error("You used a <Label /> component, but it is not inside a parent.");
throw Error.captureStackTrace && Error.captureStackTrace(o, gu), o;
}
return r;
}
function Um({ slot: r = {}, name: o = "Label", props: i = {} } = {}) {
let c = oe([]);
function a(p) {
return c.value.push(p), () => {
let y = c.value.indexOf(p);
y !== -1 && c.value.splice(y, 1);
};
}
return Mn(vu, { register: a, slot: r, name: o, props: i }), B(() => c.value.length > 0 ? c.value.join(" ") : void 0);
}
let Wm = se({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: !1 }, id: { type: String, default: () => `headlessui-label-${_n()}` } }, setup(r, { slots: o, attrs: i }) {
let c = gu();
return Dt(() => Ys(c.register(r.id))), () => {
let { name: a = "Label", slot: p = {}, props: y = {} } = c, { id: b, passive: T, ...g } = r, _ = { ...Object.entries(y).reduce((C, [D, Q]) => Object.assign(C, { [D]: ie(Q) }), {}), id: b };
return T && (delete _.onClick, delete _.htmlFor, delete g.onClick), $t({ ourProps: _, theirProps: g, slot: p, attrs: i, slots: o, name: a });
};
} }), mu = Symbol("GroupContext"), Vm = se({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(r, { slots: o, attrs: i }) {
let c = oe(null), a = Um({ name: "SwitchLabel", props: { htmlFor: B(() => {
var y;
return (y = c.value) == null ? void 0 : y.id;
}), onClick(y) {
c.value && (y.currentTarget.tagName === "LABEL" && y.preventDefault(), c.value.click(), c.value.focus({ preventScroll: !0 }));
} } }), p = Om({ name: "SwitchDescription" });
return Mn(mu, { switchRef: c, labelledby: a, describedby: p }), () => $t({ theirProps: r, ourProps: {}, slot: {}, slots: o, attrs: i, name: "SwitchGroup" });
} }), Hm = se({ name: "Switch", emits: { "update:modelValue": (r) => !0 }, props: { as: { type: [Object, String], default: "button" }, modelValue: { type: Boolean, default: void 0 }, defaultChecked: { type: Boolean, optional: !0 }, name: { type: String, optional: !0 }, value: { type: String, optional: !0 }, id: { type: String, default: () => `headlessui-switch-${_n()}` } }, inheritAttrs: !1, setup(r, { emit: o, attrs: i, slots: c, expose: a }) {
let p = hn(mu, null), [y, b] = pu(B(() => r.modelValue), (E) => o("update:modelValue", E), B(() => r.defaultChecked));
function T() {
b(!y.value);
}
let g = oe(null), _ = p === null ? g : p.switchRef, C = ou(B(() => ({ as: r.as, type: i.type })), _);
a({ el: _, $el: _ });
function D(E) {
E.preventDefault(), T();
}
function Q(E) {
E.key === Se.Space ? (E.preventDefault(), T()) : E.key === Se.Enter && Sm(E.currentTarget);
}
function ee(E) {
E.preventDefault();
}
let O = B(() => {
var E, W;
return (W = (E = be(_)) == null ? void 0 : E.closest) == null ? void 0 : W.call(E, "form");
});
return Dt(() => {
Jt([O], () => {
if (!O.value || r.defaultChecked === void 0)
return;
function E() {
b(r.defaultChecked);
}
return O.value.addEventListener("reset", E), () => {
var W;
(W = O.value) == null || W.removeEventListener("reset", E);
};
}, { immediate: !0 });
}), () => {
let { id: E, name: W, value: V, ...F } = r, Z = { checked: y.value }, q = { id: E, ref: _, role: "switch", type: C.value, tabIndex: 0, "aria-checked": y.value, "aria-labelledby": p == null ? void 0 : p.labelledby.value, "aria-describedby": p == null ? void 0 : p.describedby.value, onClick: D, onKeyup: Q, onKeypress: ee };
return lr(xt, [W != null && y.value != null ? lr(uu, iu({ features: js.Hidden, as: "input", type: "checkbox", hidden: !0, readOnly: !0, checked: y.value, name: W, value: V })) : null, $t({ ourProps: q, theirProps: { ...i, ...Js(F, ["modelValue", "defaultChecked"]) }, slot: Z, attrs: i, slots: c, name: "Switch" })]);
};
} }), Gm = Wm;
const Zm = {
xmlns: "http://www.w3.org/2000/svg",
width: "24",
height: "24",
fill: "none"
}, zm = /* @__PURE__ */ z("path", {
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "2",
d: "m6 15 6-6 6 6"
}, null, -1), qm = [
zm
];
function Km(r, o) {
return S(), R("svg", Zm, qm);
}
const Ym = { render: Km }, Xm = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "none"
}, Jm = /* @__PURE__ */ z("path", {
stroke: "#F47500",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "1.5",
d: "M8 6v1.333M8 10v.007m-4.667 2.66h9.334a1.332 1.332 0 0 0 1.226-1.833L9.16 2.667a1.333 1.333 0 0 0-2.333 0l-4.734 8.167a1.333 1.333 0 0 0 1.167 1.833"
}, null, -1), Qm = [
Jm
];
function jm(r, o) {
return S(), R("svg", Xm, Qm);
}
const ey = { render: jm }, ty = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "none"
}, ny = /* @__PURE__ */ z("path", {
stroke: "#E40029",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "1.5",
d: "m3.8 3.8 8.4 8.4M14 8A6 6 0 1 1 2 8a6 6 0 0 1 12 0Z"
}, null, -1), ry = [
ny
];
function iy(r, o) {
return S(), R("svg", ty, ry);
}
const sy = { render: iy }, oy = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "none"
}, ly = /* @__PURE__ */ z("path", {
stroke: "#17A000",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "1.5",
d: "m6 8 1.333 1.333L10 6.667M14 8A6 6 0 1 1 2 8a6 6 0 0 1 12 0Z"
}, null, -1), ay = [
ly
];
function uy(r, o) {
return S(), R("svg", oy, ay);
}
const cy = { render: uy }, fy = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "none"
}, dy = /* @__PURE__ */ z("path", {
stroke: "#627791",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "1.5",
d: "M8 5.333h.007M7.333 8H8v2.667h.667M14 8A6 6 0 1 1 2 8a6 6 0 0 1 12 0Z"
}, null, -1), py = [
dy
];
function hy(r, o) {
return S(), R("svg", fy, py);
}
const _y = { render: hy }, vy = /* @__PURE__ */ se({
__name: "BaseSelect",
props: {
modelValue: { type: [String, Number, Boolean, Array] },
items: {},
label: {},
validRes: { type: [Boolean, String] },
hideErrorMessage: { type: Boolean },
disabled: { type: Boolean },
readonly: { type: Boolean },
small: { type: Boolean },
multiple: { type: Boolean },
getValue: {},
getTitle: {}
},
emits: ["update:modelValue", "select"],
setup(r, { emit: o }) {
const i = r, c = (_) => i.getValue ? i.getValue(_) : typeof _ == "object" && _.value ? _.value : _, a = (_) => i.getTitle ? i.getTitle(_) : typeof _ == "object" && _.title ? _.title : _, p = B(() => typeof i.items[0] == "object"), y = B(() => p.value ? i.getValue || i.getTitle ? i.items.map((_) => Object.assign(_, {
value: c(_),
title: a(_)
})) : i.items : i.items.map(
(_) => ({
value: c(_),
title: a(_)
})
)), b = B(() => typeof i.validRes == "string"), T = B(() => !i.disabled && !i.readonly), g = B({
get() {
return i.multiple ? y.value.filter(
(_) => (i.modelValue || []).includes(_.value)
) : y.value.find((_) => i.modelValue === _.value) || {};
},
set(_) {
if (o("select", _), Array.isArray(_)) {
o(
"update:modelValue",
_.map((C) => C.value)
);
return;
}
o("update:modelValue", _.value);
}
});
return (_, C) => (S(), R("div", {
class: M([
_.$style["prefix-select"],
_.small && _.label ? _.$style["prefix-select_small"] : ""
])
}, [
ht(ie(Bm), {
modelValue: g.value,
"onUpdate:modelValue": C[0] || (C[0] = (D) => g.value = D),
disabled: _.disabled || _.readonly,
multiple: _.multiple
}, {
default: ye(() => [
ht(ie(Dm), { as: "div" }, {
default: ye(({ open: D }) => [
z("div", {
class: M([
_.$style["prefix-select__control"],
b.value ? _.$style["prefix-select__control_error"] : "",
T.value ? _.$style["prefix-select__control_user-event"] : "",
_.disabled ? _.$style["prefix-select__control_disabled"] : "",
_.readonly ? _.$style["prefix-select__control_readonly"] : "",
_.small ? _.$style["prefix-select__control_small"] : "",
D ? _.$style["prefix-select__control_open"] : ""
])
}, [
_.label ? (S(), pe(ie(Pm), {
key: 0,
class: M([
_.$style["prefix-select__label"],
Array.isArray(g.value) && g.value.length > 0 || g.value.value ? _.$style["prefix-select__label_filled"] : "",
b.value ? _.$style["prefix-select__label_error"] : "",
_.readonly ? _.$style["prefix-select__label_readonly"] : "",
_.small ? _.$style["prefix-select__label_small"] : "",
D ? _.$style["prefix-select__label_open"] : ""
])
}, {
default: ye(() => [
lt(we(_.label), 1)
]),
_: 2
}, 1032, ["class"])) : ae("", !0),
fe(_.$slots, "selectedOption", { value: g.value }, () => [
z("div", {
class: M([
_.$style["prefix-select__value"],
b.value ? _.$style["prefix-select__value_error"] : "",
_.readonly ? _.$style["prefix-select__value_readonly"] : "",
_.label ? "" : _.$style["prefix-select__value_no-label"],
_.small ? _.$style["prefix-select__value_small"] : "",
D ? _.$style["prefix-select__value_open"] : ""
])
}, we(Array.isArray(g.value) ? g.value.map((Q) => Q.title).join(", ") : g.value.title), 3)
]),
_.readonly ? ae("", !0) : (S(), pe(ie(Ym), {
key: 1,
class: M([
_.$style["prefix-select__arrow"],
b.value ? _.$style["prefix-select__arrow_red"] : "",
_.disabled ? _.$style["prefix-select__arrow_grey"] : "",
D ? _.$style["prefix-select__arrow_open"] : ""
])
}, null, 8, ["class"]))
], 2)
]),
_: 3
}),
ht(ie(Fm), { as: Xa }, {
default: ye(() => [
(S(!0), R(xt, null, pn(y.value, (D) => (S(), pe(ie(Nm), {
key: D.value,
value: D,
disabled: D.disabled,
as: "template"
}, {
default: ye(({ selected: Q, active: ee }) => [
fe(_.$slots, "option", { option: D }, () => [
ht(Ya, {
value: D,
disabled: D.disabled,
selected: Q,
active: ee
}, {
default: ye(() => [
lt(we(D.title), 1)
]),
_: 2
}, 1032, ["value", "disabled", "selected", "active"])
])
]),
_: 2
}, 1032, ["value", "disabled"]))), 128))
]),
_: 3
})
]),
_: 3
}, 8, ["modelValue", "disabled", "multiple"]),
z("div", {
class: M(_.$style["prefix-select__tip"])
}, [
b.value ? ci((S(), R("span", {
key: 0,
class: "error"
}, we(_.validRes), 513)), [
[zs, !_.hideErrorMessage]
]) : fe(_.$slots, "tip", {
key: 1,
alert: ie(ey),
ban: ie(sy),
circle: ie(cy),
info: ie(_y)
})
], 2)
], 2));
}
}), gy = "tertiary", my = "attention", yy = "error", by = "success", wy = {
"prefix-select": "cdek-select",
"prefix-select_small": "cdek-select_small",
"prefix-select__control": "cdek-select__control",
"prefix-select__control_user-event": "cdek-select__control_user-event",
"prefix-select__control_error": "cdek-select__control_error",
"prefix-select__control_open": "cdek-select__control_open",
"prefix-select__control_disabled": "cdek-select__control_disabled",
"prefix-select__control_readonly": "cdek-select__control_readonly",
"prefix-select__control_small": "cdek-select__control_small",
"prefix-select__value": "cdek-select__value",
"prefix-select__value_error": "cdek-select__value_error",
"prefix-select__value_readonly": "cdek-select__value_readonly",
"prefix-select__value_open": "cdek-select__value_open",
"prefix-select__value_no-label": "cdek-select__value_no-label",
"prefix-select__value_small": "cdek-select__value_small",
"prefix-select__label": "cdek-select__label",
"prefix-select__label_filled": "cdek-select__label_filled",
"prefix-select__label_error": "cdek-select__label_error",
"prefix-select__label_open": "cdek-select__label_open",
"prefix-select__label_small": "cdek-select__label_small",
"prefix-select__label_readonly": "cdek-select__label_readonly",
"prefix-select__tip": "cdek-select__tip",
tertiary: gy,
attention: my,
error: yy,
success: by,
"prefix-select__arrow": "cdek-select__arrow",
"prefix-select__arrow_open": "cdek-select__arrow_open",
"prefix-select__arrow_red": "cdek-select__arrow_red",
"prefix-select__arrow_grey": "cdek-select__arrow_grey"
}, ky = {
$style: wy
}, Ew = /* @__PURE__ */ Ae(vy, [["__cssModules", ky], ["__scopeId", "data-v-7523f8b0"]]), xy = /* @__PURE__ */ se({
__name: "BaseSwitch",
props: {
modelValue: { type: Boolean },
disabled: { type: Boolean },
small: { type: Boolean },
label: {},
tip: {}
},
emits: ["update:modelValue"],
setup(r, { emit: o }) {
const i = r, c = cr(), a = B({
get() {
return i.modelValue;
},
set(p) {
i.disabled || o("update:modelValue", p);
}
});
return (p, y) => (S(), pe(ie(Vm), null, {
default: ye(() => [
z("div", {
class: M(p.$style["prefix-switch"])
}, [
ht(ie(Hm), {
modelValue: a.value,
"onUpdate:modelValue": y[0] || (y[0] = (b) => a.value = b),
disabled: p.disabled,
class: M([
p.$style["prefix-switch__bg"],
a.value ? p.$style["prefix-switch__bg_enabled"] : "",
p.small ? p.$style["prefix-switch__bg_small"] : ""
])
}, {
default: ye(() => [
z("span", {
class: M([
p.$style["prefix-switch__circle"],
a.value ? p.$style["prefix-switch__circle_enabled"] : "",
p.disabled ? p.$style["prefix-switch__circle_disabled"] : "",
p.small ? p.$style["prefix-switch__circle_small"] : ""
])
}, null, 2)
]),
_: 1
}, 8, ["modelValue", "disabled", "class"]),
p.label || ie(c).default ? (S(), pe(ie(Gm), {
key: 0,
class: M([
p.$style["prefix-switch__label"],
p.small ? p.$style["prefix-switch__label_small"] : ""
])
}, {
default: ye(() => [
fe(p.$slots, "default", {}, () => [
lt(we(p.label), 1)
], !0),
p.tip ? (S(), R("span", {
key: 0,
class: M(p.$style["prefix-switch__tip"])
}, we(p.tip), 3)) : ae("", !0)
]),
_: 3
}, 8, ["class"])) : ae("", !0)
], 2)
]),
_: 3
}));
}
}), $y = {
"prefix-switch": "cdek-switch",
"prefix-switch__bg": "cdek-switch__bg",
"prefix-switch__bg_enabled": "cdek-switch__bg_enabled",
"prefix-switch__bg_small": "cdek-switch__bg_small",
"prefix-switch__circle": "cdek-switch__circle",
"prefix-switch__circle_enabled": "cdek-switch__circle_enabled",
"prefix-switch__circle_disabled": "cdek-switch__circle_disabled",
"prefix-switch__circle_small": "cdek-switch__circle_small",
"prefix-switch__label": "cdek-switch__label",
"prefix-switch__label_small": "cdek-switch__label_small",
"prefix-switch__tip": "cdek-switch__tip"
}, Ay = {
$style: $y
}, Iw = /* @__PURE__ */ Ae(xy, [["__cssModules", Ay], ["__scopeId", "data-v-ee92f573"]]);
var Vs = /* @__PURE__ */ ((r) => (r.NONE = "none", r.AUTO = "auto", r.USER = "user", r))(Vs || {});
const Sy = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "none"
}, Ty = /* @__PURE__ */ z("path", {
stroke: "#F47500",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "1.5",
d: "M8 6v1.333M8 10v.007m-4.667 2.66h9.334a1.332 1.332 0 0 0 1.226-1.833L9.16 2.667a1.333 1.333 0 0 0-2.333 0l-4.734 8.167a1.333 1.333 0 0 0 1.167 1.833"
}, null, -1), Cy = [
Ty
];
function Oy(r, o) {
return S(), R("svg", Sy, Cy);
}
const Ey = { render: Oy }, Iy = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "none"
}, Ry = /* @__PURE__ */ z("path", {
stroke: "#E40029",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "1.5",
d: "m3.8 3.8 8.4 8.4M14 8A6 6 0 1 1 2 8a6 6 0 0 1 12 0Z"
}, null, -1), Ly = [
Ry
];
function My(r, o) {
return S(), R("svg", Iy, Ly);
}
const By = { render: My }, Py = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "none"
}, Dy = /* @__PURE__ */ z("path", {
stroke: "#17A000",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "1.5",
d: "m6 8 1.333 1.333L10 6.667M14 8A6 6 0 1 1 2 8a6 6 0 0 1 12 0Z"
}, null, -1), Fy = [
Dy
];
function Ny(r, o) {
return S(), R("svg", Py, Fy);
}
const Uy = { render: Ny }, Wy = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "none"
}, Vy = /* @__PURE__ */ z("path", {
stroke: "#627791",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "1.5",
d: "M8 5.333h.007M7.333 8H8v2.667h.667M14 8A6 6 0 1 1 2 8a6 6 0 0 1 12 0Z"
}, null, -1), Hy = [
Vy
];
function Gy(r, o) {
return S(), R("svg", Wy, Hy);
}
const Zy = { render: Gy }, zy = ["value", "disabled"], qy = ["innerHTML"], Ky = {
inheritAttrs: !1
}, Yy = /* @__PURE__ */ se({
...Ky,
__name: "BaseTextarea",
props: {
modelValue: {},
label: {},
validRes: { type: [Boolean, String] },
hideErrorMessage: { type: Boolean },
disabled: { type: Boolean },
class: { default: "" },
resize: { default: "none" },
height: { default: "88px" }
},
emits: ["update:modelValue"],
setup(r, { expose: o, emit: i }) {
const c = r;
xg((C) => ({
"00e1e5cd": C.height
}));
const a = B(() => typeof c.validRes == "string"), p = B(() => c.resize === Vs.USER), y = B(() => !c.disabled), b = B(() => c.modelValue), T = (C) => {
if (c.resize === Vs.AUTO) {
const D = C.target.scrollHeight;
C.target.style.height = "auto", C.target.style.height = D + "px";
}
i("update:modelValue", C.target.value);
}, g = oe();
return o({ getControl: () => g.value }), (C, D) => (S(), R("div", {
class: M([C.$style["prefix-textarea"], c.class])
}, [
z("label", {
class: M([
C.$style["prefix-textarea__control"],
a.value ? C.$style["prefix-textarea__control_error"] : "",
y.value ? C.$style["prefix-textarea__control_user-event"] : "",
C.disabled ? C.$style["prefix-textarea__control_disabled"] : "",
C.label ? C.$style["prefix-textarea__control_label-filled"] : ""
])
}, [
C.label ? (S(), R("div", {
key: 0,
class: M([
C.$style["prefix-textarea__label"],
b.value ? C.$style["prefix-textarea__label_filled"] : "",
a.value ? C.$style["prefix-textarea__label_error"] : ""
])
}, we(C.label), 3)) : ae("", !0),
z("textarea", Qt({
class: [
C.$style["prefix-textarea__textarea"],
a.value ? C.$style["prefix-textarea__textarea_error"] : "",
C.label ? "" : C.$style["prefix-textarea__textarea_no-label"],
p.value ? C.$style["prefix-textarea__textarea_resizable"] : ""
],
value: b.value,
onInput: T
}, C.$attrs, {
disabled: C.disabled,
ref_key: "textareaRef",
ref: g
}), null, 16, zy)
], 2),
z("div", {
class: M(C.$style["prefix-textarea__tip"])
}, [
a.value ? ci((S(), R("div", {
key: 0,
class: M(C.$style.error),
innerHTML: C.validRes
}, null, 10, qy)), [
[zs, !C.hideErrorMessage]
]) : fe(C.$slots, "tip", {
key: 1,
alert: ie(Ey),
ban: ie(By),
circle: ie(Uy),
info: ie(Zy)
})
], 2)
], 2));
}
}), Xy = "tertiary", Jy = "attention", Qy = "error", jy = "success", eb = {
"prefix-textarea": "cdek-textarea",
"prefix-textarea__control": "cdek-textarea__control",
"prefix-textarea__control_user-event": "cdek-textarea__control_user-event",
"prefix-textarea__control_error": "cdek-textarea__control_error",
"prefix-textarea__control_label-filled": "cdek-textarea__control_label-filled",
"prefix-textarea__control_disabled": "cdek-textarea__control_disabled",
"prefix-textarea__textarea": "cdek-textarea__textarea",
"prefix-textarea__textarea_error": "cdek-textarea__textarea_error",
"prefix-textarea__textarea_no-label": "cdek-textarea__textarea_no-label",
"prefix-textarea__textarea_resizable": "cdek-textarea__textarea_resizable",
"prefix-textarea__label": "cdek-textarea__label",
"prefix-textarea__label_filled": "cdek-textarea__label_filled",
"prefix-textarea__label_error": "cdek-textarea__label_error",
"prefix-textarea__tip": "cdek-textarea__tip",
tertiary: Xy,
attention: Jy,
error: Qy,
success: jy
}, tb = {
$style: eb
}, Rw = /* @__PURE__ */ Ae(Yy, [["__cssModules", tb], ["__scopeId", "data-v-4573475e"]]), nb = {
xmlns: "http://www.w3.org/2000/svg",
width: "24",
height: "24",
fill: "none"
}, rb = /* @__PURE__ */ z("path", {
stroke: "#fff",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "1.75",
d: "M18 6 6 18M6 6l12 12"
}, null, -1), ib = [
rb
];
function sb(r, o) {
return S(), R("svg", nb, ib);
}
const ob = { render: sb }, lb = {
xmlns: "http://www.w3.org/2000/svg",
width: "24",
height: "24",
fill: "none",
viewBox: "0 0 20 20"
}, ab = /* @__PURE__ */ z("path", {
stroke: "#fff",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "2",
d: "M10 6.667h.008M9.167 10H10v3.333h.833M17.5 10a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0Z"
}, null, -1), ub = [
ab
];
function cb(r, o) {
return S(), R("svg", lb, ub);
}
const fb = { render: cb }, db = {
xmlns: "http://www.w3.org/2000/svg",
width: "24",
height: "24",
fill: "none"
}, pb = /* @__PURE__ */ z("path", {
stroke: "#fff",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "2",
d: "m9 12 2 2 4-4m6 2a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
}, null, -1), hb = [
pb
];
function _b(r, o) {
return S(), R("svg", db, hb);
}
const vb = { render: _b }, gb = {
xmlns: "http://www.w3.org/2000/svg",
width: "24",
height: "24",
fill: "none"
}, mb = /* @__PURE__ */ z("path", {
stroke: "#fff",
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "2",
d: "M12 9v2m0 4v.01M5 19h14a2 2 0 0 0 1.84-2.75L13.74 4a2 2 0 0 0-3.5 0l-7.1 12.25A2 2 0 0 0 4.89 19"
}, null, -1), yb = [
mb
];
function bb(r, o) {
return S(), R("svg", gb, yb);
}
const wb = { render: bb }, kb = { class: "toast__main" }, xb = { class: "toast__content" }, $b = { class: "toast__title" }, Ab = {
key: 0,
class: "toast__text"
}, Sb = /* @__PURE__ */ se({
__name: "BaseToaster",
props: {
type: { default: "info" },
title: {},
text: {},
button: {},
icon: {},
withoutIcon: { type: Boolean }
},
setup(r) {
const o = r, i = {
info: fb,
success: vb,
error: wb
}, c = B(() => i[o.type]);
return (a, p) => {
var y;
return S(), R("div", {
class: M(["toast", [a.type]])
}, [
z("button", {
onClick: p[0] || (p[0] = (b) => a.$emit("close-toast")),
class: "toast__close"
}, [
ht(ie(ob))
]),
z("div", kb, [
a.withoutIcon ? ae("", !0) : (S(), R(xt, { key: 0 }, [
a.icon ? (S(), pe(Xt(a.icon), {
key: 0,
class: "toast__icon"
})) : (S(), pe(Xt(c.value), {
key: 1,
class: "toast__icon"
}))
], 64)),
z("div", xb, [
z("p", $b, we(a.title), 1),
a.text ? (S(), R("p", Ab, we(a.text), 1)) : ae("", !0)
])
]),
a.button ? (S(), pe(Ns, {
key: 0,
onClick: Ka((y = a.button) == null ? void 0 : y.action, ["stop"]),
theme: "toaster",
small: "",
loading: a.button.loading
}, {
default: ye(() => [
lt(we(a.button.text), 1)
]),
_: 1
}, 8, ["onClick", "loading"])) : ae("", !0)
], 2);
};
}
});
const Za = /* @__PURE__ */ Ae(Sb, [["__scopeId", "data-v-7e60bfac"]]), Tb = /* @__PURE__ */ se({
__name: "BaseWidget",
props: {
headline: { default: "" },
withoutPaddings: { type: Boolean },
loading: { type: Boolean },
disabled: { type: Boolean }
},
setup(r) {
const o = r, i = cr(), c = B(() => !!(o.headline || i.header));
return (a, p) => (S(), R("div", {
class: M([
a.$style["prefix-widget"],
a.withoutPaddings ? a.$style["prefix-widget_without-paddings"] : "",
a.loading ? a.$style["prefix-widget_loading"] : "",
a.disabled ? a.$style["prefix-widget_disabled"] : ""
])
}, [
c.value ? (S(), pe(D1, {
key: 0,
size: "4",
class: M(a.$style["prefix-widget__title"])
}, {
default: ye(() => [
fe(a.$slots, "header", {}, () => [
lt(we(a.headline), 1)
], !0)
]),
_: 3
}, 8, ["class"])) : ae("", !0),
fe(a.$slots, "default", {}, void 0, !0),
a.loading ? (S(), R("div", {
key: 1,
class: M(a.$style["prefix-widget__spinner"])
}, [
ht(Qa, { size: "medium" })
], 2)) : ae("", !0)
], 2));
}
}), Cb = {
"prefix-widget": "cdek-widget",
"prefix-widget_without-paddings": "cdek-widget_without-paddings",
"prefix-widget_loading": "cdek-widget_loading",
"prefix-widget_disabled": "cdek-widget_disabled",
"prefix-widget__title": "cdek-widget__title",
"prefix-widget__spinner": "cdek-widget__spinner"
}, Ob = {
$style: Cb
}, Lw = /* @__PURE__ */ Ae(Tb, [["__cssModules", Ob], ["__scopeId", "data-v-6353b8a3"]]), Eb = {
"prefix-breadcrumbs": "cdek-breadcrumbs"
}, Ib = {};
function Rb(r, o) {
return S(), R("div", {
class: M(r.$style["prefix-breadcrumbs"])
}, [
fe(r.$slots, "default")
], 2);
}
const Lb = {
$style: Eb
}, Mw = /* @__PURE__ */ Ae(Ib, [["render", Rb], ["__cssModules", Lb], ["__scopeId", "data-v-c9d59172"]]);
/**
* vee-validate v4.7.3
* (c) 2022 Abdelrahman Awad
* @license MIT
*/
const oi = {
en: /^[A-Z]*$/i,
cs: /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,
da: /^[A-ZÆØÅ]*$/i,
de: /^[A-ZÄÖÜß]*$/i,
es: /^[A-ZÁÉÍÑÓÚÜ]*$/i,
fr: /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,
it: /^[A-Z\xC0-\xFF]*$/i,
lt: /^[A-ZĄČĘĖĮŠŲŪŽ]*$/i,
nl: /^[A-ZÉËÏÓÖÜ]*$/i,
hu: /^[A-ZÁÉÍÓÖŐÚÜŰ]*$/i,
pl: /^[A-ZĄĆĘŚŁŃÓŻŹ]*$/i,
pt: /^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,
ru: /^[А-ЯЁ]*$/i,
sk: /^[A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ]*$/i,
sr: /^[A-ZČĆŽŠĐ]*$/i,
sv: /^[A-ZÅÄÖ]*$/i,
tr: /^[A-ZÇĞİıÖŞÜ]*$/i,
uk: /^[А-ЩЬЮЯЄІЇҐ]*$/i,
ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/,
az: /^[A-ZÇƏĞİıÖŞÜ]*$/i,
ug: /^[A-Zچۋېرتيۇڭوپھسداەىقكلزشغۈبنمژفگخجۆئ]*$/i
}, Mb = (r) => {
if (r)
return Array.isArray(r) ? r[0] : r.locale;
};
function Bb(r, o) {
return Array.isArray(r) ? r[0] : r[o];
}
function eo(r) {
return !!(r == null || r === "" || Array.isArray(r) && r.length === 0);
}
const yu = (r, o) => {
if (eo(r))
return !0;
const i = Mb(o);
if (Array.isArray(r))
return r.every((a) => yu(a, { locale: i }));
const c = String(r);
return i ? (oi[i] || oi.en).test(c) : Object.keys(oi).some((a) => oi[a].test(c));
}, Pb = (r) => {
if (eo(r))
return !0;
const o = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return Array.isArray(r) ? r.every((i) => o.test(String(i))) : o.test(String(r));
};
function Db(r) {
return r == null;
}
function Fb(r) {
return Array.isArray(r) && r.length === 0;
}
const bu = (r, o) => {
if (eo(r))
return !0;
let i = Bb(o, "regex");
return typeof i == "string" && (i = new RegExp(i)), Array.isArray(r) ? r.every((c) => bu(c, { regex: i })) : i.test(String(r));
}, Nb = (r) => Db(r) || Fb(r) || r === !1 ? !1 : !!String(r).trim().length, kt = {
alpha: {
default: "Доступны только буквы",
ru: "Доступны только буквы"
},
required: {
default: "Обязательное поле",
ru: "Обязательное поле"
},
email: {
default: "Введите корректный email",
ru: "Введите корректный email"
},
regex: {
default: "Недопустимый формат",
ru: "Недопустимый формат"
}
};
class Ub extends ai {
constructor() {
super(...arguments);
Ge(this, "locale", "ru");
Ge(this, "changeLocaleCallbacks", []);
Ge(this, "vd", {
alpha: this.withMessage.bind(this, yu, "alpha"),
required: this.withMessage.bind(this, Nb, "required"),
email: this.withMessage.bind(this, Pb, "email"),
regex: this.withMessage.bind(this, bu, "regex")
});
}
withMessage(i, c, a, p) {
const y = { ...a }, b = y.message;
let T;
b ? typeof b == "string" ? T = () => b : T = b : T = () => "", delete y.message;
let g = { locale: this.locale };
y && (g = { ...g, ...y });
const _ = i(p, g), C = (T == null ? void 0 : T()) || kt[c][this.locale] || kt[c].default;
return _ ? !0 : C;
}
parseRules(i) {
const c = {};
if (typeof i == "string") {
const a = i.split("|");
for (const p of a)
this.parseStringRule(p, c);
}
if (typeof i == "object")
for (const a in i) {
if (a === "regex") {
this.parseRegexRule(
i[a],
c
);
continue;
}
if (typeof i[a] == "boolean" && i[a]) {
this.parseStringRule(a, c);
continue;
}
typeof i[a] == "string" && this.parseStringRule(a, c, i[a]), typeof i[a] == "function" && this.parseFunctionRule(a, i[a], c);
}
return c;
}
parseStringRule(i, c, a) {
const p = a ? { message: a } : {};
this.vd[i] && (c[i] = this.vd[i].bind(this, p));
}
parseFunctionRule(i, c, a) {
if (this.vd[i]) {
this.parseStringRule(
i,
a,
c
);
return;
}
a[i] = c;
}
parseRegexRule(i, c) {
const a = {};
i instanceof RegExp ? a.regex = i : (a.regex = i.pattern, a.message = i.message), c.regex = this.vd.regex.bind(this, a);
}
subscribeOnLanguageChange(i) {
this.changeLocaleCallbacks.push(i);
}
triggerLanguageChange() {
for (const i of this.changeLocaleCallbacks)
i();
}
}
const Hs = eu(Ub), Wb = (r, o) => {
kt[r] ? kt[r] = { ...kt[r], ...o } : kt[r] = o;
}, Vb = (r) => {
const o = Hs();
o.locale = r, o.triggerLanguageChange();
}, Hb = (r) => {
for (const o in kt)
kt[o][r] && (kt[o].default = kt[o][r]);
};
class Gb {
constructor(o, i, c) {
Ge(this, "error");
Ge(this, "isValid", !0);
this.formService = o, this.fieldName = i, this.rules = c, this.parseRules(this.rules);
}
/**
* Переводит RulesT в RulesObjectT, чтобы валидаторы всегда были объектом
*/
parseRules(o) {
this.rules = Hs().parseRules(o);
}
/**
* Запускается после монтирования в компонент, чтобы
* реактивность нормально реагировала
*/
init(o) {
this.register(o || ""), this.formService.subscribeOnSubmit(this.showError.bind(this)), Hs().subscribeOnLanguageChange(
this.changeErrorMessage.bind(this)
);
}
/**
* Регистрация поля в форме
*/
register(o) {
this.formService.registerField(this.fieldName, o), this.validateField();
}
/**
* Обновление валидаторов при изменении
*/
updateValidators(o) {
this.parseRules(o), this.validateField(), this.changeErrorMessage();
}
/**
* Изменение значения в поле
*/
change(o) {
this.formService.changeField(this.fieldName, o), this.validateField(), this.showError();
}
/**
* Показать ошибку в форме
*/
showError() {
this.error = this.errorMessage;
}
/**
* Изменить сообщение об ошибке, если оно показывается сейчас
*
* Необходимо после смены языка (чтобы показать сообщение на другом языке)
* и после смены валидаторов (другие валидаторы = другие ошибки)
*/
changeErrorMessage() {
this.validateField(), this.error && this.showError();
}
/**
* Текущее значение поля, хранится в форме
*/
get value() {
return this.formService.fields[this.fieldName];
}
/**
* Валидно ли значение с учетом текущих валидаторов
*/
validateField() {
if (!this.rules) {
this.saveValidation(!0);
return;
}
for (const o of Object.getOwnPropertyNames(this.rules)) {
const i = this.rules[o](this.value);
if (typeof i == "string") {
this.saveValidation({ key: o, message: i });
return;
}
if (!i) {
this.saveValidation({ key: o });
return;
}
}
this.saveValidation(!0);
}
saveValidation(o) {
this.isValid = o, this.formService.validateField(this.fieldName, this.errorKey);
}
/**
* Сообщение об ошибке
*/
get errorMessage() {
var o;
return typeof this.isValid == "boolean" ? this.isValid : ((o = this.isValid) == null ? void 0 : o.message) || this.isValid.key;
}
/**
* Название валидатора, который не прошел успешно
*/
get errorKey() {
return typeof this.isValid == "boolean" ? this.isValid : this.isValid.key;
}
}
const wu = Symbol();
class Zb {
constructor() {
Ge(this, "fields", {});
Ge(this, "errors", {});
Ge(this, "submitSubscribers", []);
}
/**
* @param name - название поля
* @param initialValue
*/
registerField(o, i) {
this.fields[o] = i;
}
/**
* @param name - название поля
* @param newValue
*/
changeField(o, i) {
this.fields[o] = i;
}
/**
* @param name - название поля
* @param validOrError - true если валидно, название валидатора, если нет
*/
validateField(o, i) {
this.errors[o] = i;
}
triggerSubmit() {
for (const o of this.submitSubscribers)
o();
}
subscribeOnSubmit(o) {
this.submitSubscribers.push(o);
}
getFieldService(...o) {
return new Gb(this, ...o);
}
clearForm() {
Object.keys(this.fields).forEach((o) => {
this.changeField(o, "");
});
}
}
const zb = ["onSubmit"], Bw = /* @__PURE__ */ se({
__name: "BaseForm",
emits: ["submit", "submitError"],
setup(r, { expose: o, emit: i }) {
const c = Ks(new Zb());
Mn(wu, c);
const a = () => {
for (const T of Object.getOwnPropertyNames(c.errors))
if (typeof c.errors[T] == "string") {
const g = { ...c.errors };
return i("submitError", g), c.triggerSubmit(), { isValid: !1, errors: g };
}
const b = { ...c.fields };
return i("submit", b), { isValid: !0, values: b };
};
return o({
triggerSubmit: () => a(),
clearForm: () => {
c.clearForm();
}
}), (b, T) => (S(), R("form", {
onSubmit: Ka(a, ["prevent"])
}, [
fe(b.$slots, "default")
], 40, zb));
}
}), qb = {
inheritAttrs: !1
}, Pw = /* @__PURE__ */ se({
...qb,
__name: "BaseFormControl",
props: {
name: {},
rules: {},
type: { default: "text" },
className: { default: "" },
initialValue: { default: "" }
},
setup(r, { expose: o }) {
const i = r, c = hn(wu), a = Ks(
c.getFieldService(i.name, i.rules)
);
a.init(i.initialValue), Jt(
() => i.rules,
(T) => {
a.updateValidators(T);
},
{ deep: !0 }
);
const p = B({
get() {
return a.value || "";
},
set(T) {
a.change(T);
}
}), y = (T) => {
p.value = T;
}, b = B(() => i.type === "autocomplete" ? t1 : ["text", "number"].includes(i.type) ? Xs : null);
return o({
changeValue: y
}), (T, g) => (S(), R("div", {
class: M(T.className)
}, [
b.value ? (S(), pe(Xt(b.value), Qt({
key: 0,
type: T.type === "number" ? "number" : void 0,
modelValue: p.value,
"onUpdate:modelValue": g[0] || (g[0] = (_) => p.value = _),
"valid-res": a.error
}, T.$attrs), qs({ _: 2 }, [
pn(T.$slots, (_, C) => ({
name: C,
fn: ye((D) => [
fe(T.$slots, C, fr(fi(D)))
])
}))
]), 1040, ["type", "modelValue", "valid-res"])) : fe(T.$slots, "default", {
key: 1,
value: p.value,
changeValue: y,
validRes: a.error
})
], 2));
}
}), Dw = { changeLocale: Vb, addMessages: Wb, changeDefaultLocale: Hb }, pi = (r) => typeof r == "function", to = (r) => typeof r == "string", Kb = (r) => to(r) && r.trim().length > 0, fn = (r) => typeof r > "u", ui = (r) => typeof r == "object" && r !== null, Yb = (r) => Ln(r, "tag") && Kb(r.tag), ku = (r) => Ln(r, "component") && Jb(r.component), Xb = (r) => pi(r) || ui(r), Jb = (r) => (
// Ignore undefined
!fn(r) && // Is a string
(to(r) || // Regular Vue component
Xb(r) || // Nested object
ku(r))
), Ln = (r, o) => (ui(r) || pi(r)) && o in r, Qb = ((r) => () => r++)(0), jb = (r) => {
fn(r.remove) ? r.parentNode && r.parentNode.removeChild(r) : r.remove();
}, no = (r) => ku(r) ? no(r.component) : Yb(r) ? se({
render() {
return r;
}
}) : typeof r == "string" ? r : st(ie(r)), ew = (r) => {
if (typeof r == "string")
return r;
const o = Ln(r, "props") && ui(r.props) ? r.props : {}, i = Ln(r, "listeners") && ui(r.listeners) ? r.listeners : {};
return { component: no(r), props: o, listeners: i };
}, tw = () => typeof window < "u";
class ro {
constructor() {
Ge(this, "allHandlers", {});
}
getHandlers(o) {
return this.allHandlers[o] || [];
}
on(o, i) {
const c = this.getHandlers(o);
c.push(i), this.allHandlers[o] = c;
}
off(o, i) {
const c = this.getHandlers(o);
c.splice(c.indexOf(i) >>> 0, 1);
}
emit(o, i) {
this.getHandlers(o).forEach((a) => a(i));
}
}
const nw = (r) => ["on", "off", "emit"].every((o) => Ln(r, o) && pi(r[o]));
var wt = /* @__PURE__ */ ((r) => (r.SUCCESS = "success", r.ERROR = "error", r.WARNING = "warning", r.INFO = "info", r.DEFAULT = "default", r))(wt || {}), ur = /* @__PURE__ */ ((r) => (r.TOP_LEFT = "top-left", r.TOP_CENTER = "top-center", r.TOP_RIGHT = "top-right", r.BOTTOM_LEFT = "bottom-left", r.BOTTOM_CENTER = "bottom-center", r.BOTTOM_RIGHT = "bottom-right", r))(ur || {}), ot = /* @__PURE__ */ ((r) => (r.ADD = "add", r.DISMISS = "dismiss", r.UPDATE = "update", r.CLEAR = "clear", r.UPDATE_DEFAULTS = "update_defaults", r))(ot || {});
const dn = "Vue-Toastification", Kt = {
type: {
type: String,
default: wt.DEFAULT
},
classNames: {
type: [String, Array],
default: () => []
},
trueBoolean: {
type: Boolean,
default: !0
}
}, xu = {
transition: {
type: [Object, String],
default: `${dn}__bounce`
}
}, rw = {
position: {
type: String,
default: ur.TOP_RIGHT
},
timeout: {
type: [Number, Boolean],
default: 5e3
},
pauseOnFocusLoss: Kt.trueBoolean,
pauseOnHover: Kt.trueBoolean,
closeOnClick: Kt.trueBoolean,
toastClassName: Kt.classNames,
bodyClassName: Kt.classNames,
accessibility: {
type: Object,
default: () => ({
toastRole: "alert",
closeButtonLabel: "close"
})
},
rtl: {
type: Boolean,
default: !1
},
eventBus: {
type: Object,
required: !1,
default: () => new ro()
}
}, iw = {
id: {
type: [String, Number],
required: !0,
default: 0
},
type: Kt.type,
content: {
type: [String, Object, Function],
required: !0,
default: ""
},
onClick: {
type: Function,
default: void 0
},
onClose: {
type: Function,
default: void 0
}
}, sw = {
container: {
type: [
Object,
Function
],
default: () => document == null ? void 0 : document.body
},
newestOnTop: Kt.trueBoolean,
maxToasts: {
type: Number,
default: 20
},
transition: xu.transition,
toastDefaults: Object,
filterBeforeCreate: {
type: Function,
default: (r) => r
},
filterToasts: {
type: Function,
default: (r) => r
},
containerClassName: Kt.classNames,
onMounted: Function,
shareAppContext: [Boolean, Object]
}, Rn = {
CORE_TOAST: rw,
TOAST: iw,
CONTAINER: sw,
TRANSITION: xu
}, ow = se({
name: "VtToast",
inheritAttrs: !1,
props: Object.assign({}, Rn.CORE_TOAST, Rn.TOAST),
data() {
return {
isRunning: !0,
disableTransitions: !1,
beingDragged: !1,
dragStart: 0,
dragPos: { x: 0, y: 0 },
dragRect: {}
};
},
computed: {
classes() {
const r = [
`${dn}__toast`,
`${dn}__toast--${this.type}`,
`${this.position}`
].concat(this.toastClassName);
return this.disableTransitions && r.push("disable-transition"), this.rtl && r.push(`${dn}__toast--rtl`), r;
},
bodyClasses() {
return [
`${dn}__toast-${to(this.content) ? "body" : "component-body"}`
].concat(this.bodyClassName);
}
},
mounted() {
this.timeout && setTimeout(() => {
this.timeoutHandler();
}, this.timeout), this.pauseOnFocusLoss && this.focusSetup();
},
beforeUnmount() {
this.pauseOnFocusLoss && this.focusCleanup();
},
methods: {
hasProp: Ln,
getVueComponentFromObj: no,
closeToast() {
this.eventBus.emit(ot.DISMISS, this.id);
},
clickHandler() {
this.onClick && this.onClick(this.closeToast), this.closeOnClick && (!this.beingDragged || this.dragStart === this.dragPos.x) && this.closeToast();
},
timeoutHandler() {
this.closeToast();
},
hoverPause() {
this.pauseOnHover && (this.isRunning = !1);
},
hoverPlay() {
this.pauseOnHover && (this.isRunning = !0);
},
focusPause() {
this.isRunning = !1;
},
focusPlay() {
this.isRunning = !0;
},
focusSetup() {
addEventListener("blur", this.focusPause), addEventListener("focus", this.focusPlay);
},
focusCleanup() {
removeEventListener("blur", this.focusPause), removeEventListener("focus", this.focusPlay);
}
}
}), lw = ["role"];
function aw(r, o, i, c, a, p) {
return S(), R("div", {
class: M(r.classes),
onClick: o[0] || (o[0] = (...y) => r.clickHandler && r.clickHandler(...y)),
onMouseenter: o[1] || (o[1] = (...y) => r.hoverPause && r.hoverPause(...y)),
onMouseleave: o[2] || (o[2] = (...y) => r.hoverPlay && r.hoverPlay(...y))
}, [
z("div", {
role: r.accessibility.toastRole || "alert",
class: M(r.bodyClasses)
}, [
typeof r.content == "string" ? (S(), R(xt, { key: 0 }, [
lt(we(r.content), 1)
], 64)) : (S(), pe(Xt(r.getVueComponentFromObj(r.content)), Qt({
key: 1,
"toast-id": r.id
}, r.hasProp(r.content, "props") ? r.content.props : {}, $g(r.hasProp(r.content, "listeners") ? r.content.listeners : {}), { onCloseToast: r.closeToast }), null, 16, ["toast-id", "onCloseToast"]))
], 10, lw)
], 34);
}
const uw = /* @__PURE__ */ Ae(ow, [["render", aw]]), cw = /* @__PURE__ */ se({
__name: "VtTransition",
props: Rn.TRANSITION,
setup(r) {
return (o, i) => (S(), pe(Ag, {
tag: "div",
"enter-active-class": `${o.transition}-enter-active`,
"move-class": `${o.transition}-move`,
"leave-active-class": `${o.transition}-leave-active`
}, {
default: ye(() => [
fe(o.$slots, "default")
]),
_: 3
}, 8, ["enter-active-class", "move-class", "leave-active-class"]));
}
}), fw = se({
name: "VueToastification",
devtools: {
hide: !0
},
components: { Toast: uw, VtTransition: cw },
props: Object.assign({}, Rn.CORE_TOAST, Rn.CONTAINER, Rn.TRANSITION),
data() {
return {
count: 0,
positions: Object.values(ur),
toasts: {},
defaults: {}
};
},
computed: {
toastArray() {
return Object.values(this.toasts);
},
filteredToasts() {
return this.defaults.filterToasts(this.toastArray);
}
},
beforeMount() {
const r = this.eventBus;
r.on(ot.ADD, this.addToast), r.on(ot.CLEAR, this.clearToasts), r.on(ot.DISMISS, this.dismissToast), r.on(ot.UPDATE, this.updateToast), r.on(ot.UPDATE_DEFAULTS, this.updateDefaults), this.defaults = this.$props;
},
mounted() {
this.setup(this.container);
},
methods: {
async setup(r) {
pi(r) && (r = await r()), jb(this.$el), r.appendChild(this.$el);
},
setToast(r) {
fn(r.id) || (this.toasts[r.id] = r);
},
addToast(r) {
r.content = ew(r.content);
const o = Object.assign(
{},
this.defaults,
r.type && this.defaults.toastDefaults && this.defaults.toastDefaults[r.type],
r
), i = this.defaults.filterBeforeCreate(o, this.toastArray);
i && this.setToast(i);
},
dismissToast(r) {
const o = this.toasts[r];
!fn(o) && !fn(o.onClose) && o.onClose(), delete this.toasts[r];
},
clearToasts() {
Object.keys(this.toasts).forEach((r) => {
this.dismissToast(r);
});
},
getPositionToasts(r) {
const o = this.filteredToasts.filter((i) => i.position === r).slice(0, this.defaults.maxToasts);
return this.defaults.newestOnTop ? o.reverse() : o;
},
updateDefaults(r) {
fn(r.container) || this.setup(r.container), this.defaults = Object.assign({}, this.defaults, r);
},
updateToast({
id: r,
options: o,
create: i
}) {
this.toasts[r] ? (o.timeout && o.timeout === this.toasts[r].timeout && o.timeout++, this.setToast(Object.assign({}, this.toasts[r], o))) : i && this.addToast(
Object.assign({}, { id: r }, o)
);
},
getClasses(r) {
return [`${dn}__container`, r].concat(this.defaults.containerClassName);
}
}
}), dw = { key: 0 };
function pw(r, o, i, c, a, p) {
const y = Pa("Toast"), b = Pa("VtTransition");
return r.container ? (S(), R("div", dw, [
(S(!0), R(xt, null, pn(r.positions, (T) => (S(), R("div", { key: T }, [
ht(b, {
transition: r.defaults.transition,
class: M(r.getClasses(T))
}, {
default: ye(() => [
(S(!0), R(xt, null, pn(r.getPositionToasts(T), (g) => (S(), pe(y, Qt({
key: g.id
}, g), null, 16))), 128))
]),
_: 2
}, 1032, ["transition", "class"])
]))), 128))
])) : ae("", !0);
}
const hw = /* @__PURE__ */ Ae(fw, [["render", pw]]), _w = (r) => {
if (!(document == null ? void 0 : document.getElementById("toastification"))) {
const i = Sg(hw, {
...r
}), c = document == null ? void 0 : document.createElement("div");
c.setAttribute("id", "toastification");
const a = i.mount(c), p = r.onMounted;
fn(p) || p(a, i);
}
}, za = (r = {}, o = !0) => {
const i = r.eventBus = r.eventBus || new ro();
o && Yt(() => {
_w(r);
});
const c = (p, y) => {
const b = Object.assign({}, { id: Qb(), type: wt.DEFAULT }, y, {
content: p
});
return i.emit(ot.ADD, b), b.id;
};
c.clear = () => i.emit(ot.CLEAR, void 0), c.updateDefaults = (p) => {
i.emit(ot.UPDATE_DEFAULTS, p);
}, c.dismiss = (p) => {
i.emit(ot.DISMISS, p);
};
function a(p, { content: y, options: b }, T = !1) {
const g = Object.assign({}, b, { content: y });
i.emit(ot.UPDATE, {
id: p,
options: g,
create: T
});
}
return c.update = a, c.success = (p, y) => c(p, Object.assign({}, y, { type: wt.SUCCESS })), c.info = (p, y) => c(p, Object.assign({}, y, { type: wt.INFO })), c.error = (p, y) => c(p, Object.assign({}, y, { type: wt.ERROR })), c.warning = (p, y) => c(p, Object.assign({}, y, { type: wt.WARNING })), c;
};
const vw = () => {
const r = () => console.warn(`[${dn}] This plugin does not support SSR!`);
return new Proxy(r, {
get() {
return r;
}
});
};
function Gs(r) {
return tw() ? nw(r) ? za({ eventBus: r }, !1) : za(r, !0) : vw();
}
const $u = Symbol("VueToastification"), Au = new ro(), gw = (r, o) => {
const i = Gs({
eventBus: Au,
...o
});
r.provide($u, i);
}, mw = (r) => {
if (r)
return Gs(r);
const o = Tg() ? hn($u, void 0) : void 0;
return o || Gs(Au);
};
const yw = {
maxToasts: 5
};
function Fw(r) {
r.use(gw, yw);
}
function Nw() {
const r = mw();
function o(c, a = {}, p = "info") {
let b = (window == null ? void 0 : window.matchMedia("(max-width: 768px)")).matches ? ur.BOTTOM_CENTER : ur.TOP_RIGHT;
return a.position && (b = a.position), typeof c == "string" && (c = {
title: c
}), c.type || (c.type = p), r(
{ component: Za, props: c },
{ position: b, timeout: a.timeout || 5e3 }
);
}
function i(...c) {
return o(...c);
}
return i.info = function(...a) {
return o(a[0], a[1], wt.INFO);
}, i.success = function(...a) {
return o(a[0], a[1], wt.SUCCESS);
}, i.error = function(...a) {
return o(a[0], a[1], wt.ERROR);
}, i.dismiss = r.dismiss, i.clear = r.clear, i.update = function(a, p) {
r.update(a, { content: { component: Za, props: p } });
}, i;
}
export {
kw as CdekAlert,
t1 as CdekAutocomplete,
p1 as CdekBadge,
Mw as CdekBreadcrumbs,
Ns as CdekButton,
xw as CdekChip,
Cw as CdekConfirm,
Xa as CdekDropdownBox,
Ya as CdekDropdownItem,
Bw as CdekForm,
Pw as CdekFormControl,
D1 as CdekHeadline,
Xs as CdekInput,
$w as CdekLink,
Aw as CdekMaskedInput,
Tw as CdekModal,
Ew as CdekSelect,
Qa as CdekSpinner,
Iw as CdekSwitch,
Rw as CdekTextarea,
Za as CdekToaster,
Lw as CdekWidget,
ai as Multitone,
ur as TOAST_POSITION,
Sw as destroyFactory,
Dw as formSettings,
eu as getInstanceFactory,
Fw as registerToastification,
J1 as useModalService,
Y1 as useServiceFactory,
Nw as useToast
};