antd-mobile
Version:
<div align="center">
1,535 lines • 620 kB
JavaScript
import * as I from "react";
import s, { useContext as it, useRef as V, useMemo as de, useEffect as Q, useState as X, useCallback as Qe, useLayoutEffect as za, forwardRef as Ee, useImperativeHandle as ke, memo as ze, isValidElement as zn, createContext as zs, cloneElement as w0 } from "react";
import * as C0 from "react-dom";
import x0, { unstable_batchedUpdates as tf, createPortal as k0, findDOMNode as $0 } from "react-dom";
const Nr = !!(typeof window < "u" && typeof document < "u" && window.document && window.document.createElement);
Nr && document.addEventListener("touchstart", () => {
}, !0);
var Ca = function() {
return Ca = Object.assign || function(e) {
for (var n, r = 1, i = arguments.length; r < i; r++) {
n = arguments[r];
for (var a in n)
Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
}
return e;
}, Ca.apply(this, arguments);
};
function un(t, e) {
var n = {};
for (var r in t)
Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
if (t != null && typeof Object.getOwnPropertySymbols == "function")
for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
return n;
}
function Pe(t, e, n, r) {
function i(a) {
return a instanceof n ? a : new n(function(o) {
o(a);
});
}
return new (n || (n = Promise))(function(a, o) {
function l(f) {
try {
u(r.next(f));
} catch (d) {
o(d);
}
}
function c(f) {
try {
u(r.throw(f));
} catch (d) {
o(d);
}
}
function u(f) {
f.done ? a(f.value) : i(f.value).then(l, c);
}
u((r = r.apply(t, e || [])).next());
});
}
function _0(t, e) {
var n = { label: 0, sent: function() {
if (a[0] & 1)
throw a[1];
return a[1];
}, trys: [], ops: [] }, r, i, a, o;
return o = { next: l(0), throw: l(1), return: l(2) }, typeof Symbol == "function" && (o[Symbol.iterator] = function() {
return this;
}), o;
function l(u) {
return function(f) {
return c([u, f]);
};
}
function c(u) {
if (r)
throw new TypeError("Generator is already executing.");
for (; o && (o = 0, u[0] && (n = 0)), n; )
try {
if (r = 1, i && (a = u[0] & 2 ? i.return : u[0] ? i.throw || ((a = i.return) && a.call(i), 0) : i.next) && !(a = a.call(i, u[1])).done)
return a;
switch (i = 0, a && (u = [u[0] & 2, a.value]), u[0]) {
case 0:
case 1:
a = u;
break;
case 4:
return n.label++, { value: u[1], done: !1 };
case 5:
n.label++, i = u[1], u = [0];
continue;
case 7:
u = n.ops.pop(), n.trys.pop();
continue;
default:
if (a = n.trys, !(a = a.length > 0 && a[a.length - 1]) && (u[0] === 6 || u[0] === 2)) {
n = 0;
continue;
}
if (u[0] === 3 && (!a || u[1] > a[0] && u[1] < a[3])) {
n.label = u[1];
break;
}
if (u[0] === 6 && n.label < a[1]) {
n.label = a[1], a = u;
break;
}
if (a && n.label < a[2]) {
n.label = a[2], n.ops.push(u);
break;
}
a[2] && n.ops.pop(), n.trys.pop();
continue;
}
u = e.call(t, n);
} catch (f) {
u = [6, f], i = 0;
} finally {
r = a = 0;
}
if (u[0] & 5)
throw u[1];
return { value: u[0] ? u[1] : void 0, done: !0 };
}
}
function S0(t) {
var e = typeof Symbol == "function" && Symbol.iterator, n = e && t[e], r = 0;
if (n)
return n.call(t);
if (t && typeof t.length == "number")
return {
next: function() {
return t && r >= t.length && (t = void 0), { value: t && t[r++], done: !t };
}
};
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function It(t, e) {
var n = typeof Symbol == "function" && t[Symbol.iterator];
if (!n)
return t;
var r = n.call(t), i, a = [], o;
try {
for (; (e === void 0 || e-- > 0) && !(i = r.next()).done; )
a.push(i.value);
} catch (l) {
o = { error: l };
} finally {
try {
i && !i.done && (n = r.return) && n.call(r);
} finally {
if (o)
throw o.error;
}
}
return a;
}
function qs(t, e, n) {
if (n || arguments.length === 2)
for (var r = 0, i = e.length, a; r < i; r++)
(a || !(r in e)) && (a || (a = Array.prototype.slice.call(e, 0, r)), a[r] = e[r]);
return t.concat(a || Array.prototype.slice.call(e));
}
const Je = "${label}不是一个有效的${type}", O0 = {
locale: "zh-CH",
common: {
confirm: "确定",
cancel: "取消",
loading: "加载中",
close: "关闭"
},
Calendar: {
title: "日期选择",
confirm: "确认",
start: "开始",
end: "结束",
today: "今日",
markItems: ["一", "二", "三", "四", "五", "六", "日"],
yearAndMonth: "${year}年${month}月"
},
Cascader: {
placeholder: "请选择"
},
Dialog: {
ok: "我知道了"
},
DatePicker: {
tillNow: "至今"
},
ErrorBlock: {
default: {
title: "页面遇到一些小问题",
description: "待会来试试"
},
busy: {
title: "前方拥堵",
description: "刷新试试"
},
disconnected: {
title: "网络有点忙",
description: "动动手指帮忙修复"
},
empty: {
title: "没有找到你需要的东西",
description: "找找其他的吧"
}
},
Form: {
required: "必填",
optional: "选填",
defaultValidateMessages: {
default: "字段验证错误${label}",
required: "请输入${label}",
enum: "${label}必须是其中一个[${enum}]",
whitespace: "${label}不能为空字符",
date: {
format: "${label}日期格式无效",
parse: "${label}不能转换为日期",
invalid: "${label}是一个无效日期"
},
types: {
string: Je,
method: Je,
array: Je,
object: Je,
number: Je,
date: Je,
boolean: Je,
integer: Je,
float: Je,
regexp: Je,
email: Je,
url: Je,
hex: Je
},
string: {
len: "${label}须为${len}个字符",
min: "${label}最少${min}个字符",
max: "${label}最多${max}个字符",
range: "${label}须在${min}-${max}字符之间"
},
number: {
len: "${label}必须等于${len}",
min: "${label}最小值为${min}",
max: "${label}最大值为${max}",
range: "${label}须在${min}-${max}之间"
},
array: {
len: "须为${len}个${label}",
min: "最少${min}个${label}",
max: "最多${max}个${label}",
range: "${label}数量须在${min}-${max}之间"
},
pattern: {
mismatch: "${label}与模式不匹配${pattern}"
}
}
},
ImageUploader: {
uploading: "上传中...",
upload: "上传"
},
InfiniteScroll: {
noMore: "没有更多了",
failedToLoad: "加载失败",
retry: "重新加载"
},
Input: {
clear: "清除"
},
Mask: {
name: "背景蒙层"
},
Modal: {
ok: "我知道了"
},
PasscodeInput: {
name: "密码输入框"
},
PullToRefresh: {
pulling: "下拉刷新",
canRelease: "释放立即刷新",
complete: "刷新成功"
},
SearchBar: {
name: "搜索框"
},
Slider: {
name: "滑动输入条"
},
Stepper: {
decrease: "减少",
increase: "增加"
},
Switch: {
name: "开关"
},
Selector: {
name: "选择组"
}
}, F0 = O0, nf = {
current: {
locale: F0
}
};
function sy(t) {
nf.current = t;
}
function Fi() {
return nf.current;
}
const rf = s.createContext(null), ly = (t) => {
const {
children: e
} = t, n = un(t, ["children"]), r = ue();
return s.createElement(rf.Provider, {
value: Object.assign(Object.assign({}, r), n)
}, e);
};
function ue() {
var t;
return (t = it(rf)) !== null && t !== void 0 ? t : Fi();
}
function pe(t, e) {
const n = t;
for (const r in e)
e.hasOwnProperty(r) && (n[r] = e[r]);
return n;
}
var mt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function $t(t) {
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
}
var af = { exports: {} };
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
(function(t) {
(function() {
var e = {}.hasOwnProperty;
function n() {
for (var r = [], i = 0; i < arguments.length; i++) {
var a = arguments[i];
if (a) {
var o = typeof a;
if (o === "string" || o === "number")
r.push(a);
else if (Array.isArray(a)) {
if (a.length) {
var l = n.apply(null, a);
l && r.push(l);
}
} else if (o === "object") {
if (a.toString !== Object.prototype.toString && !a.toString.toString().includes("[native code]")) {
r.push(a.toString());
continue;
}
for (var c in a)
e.call(a, c) && a[c] && r.push(c);
}
}
}
return r.join(" ");
}
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
})();
})(af);
var N0 = af.exports;
const j = /* @__PURE__ */ $t(N0);
function W(t, e) {
const n = Object.assign({}, e.props);
t.className && (n.className = j(e.props.className, t.className)), t.style && (n.style = Object.assign(Object.assign({}, n.style), t.style)), t.tabIndex !== void 0 && (n.tabIndex = t.tabIndex);
for (const r in t)
t.hasOwnProperty(r) && (r.startsWith("data-") || r.startsWith("aria-")) && (n[r] = t[r]);
return s.cloneElement(e, n);
}
function q(...t) {
const e = {};
return t.forEach((n) => {
n && Object.keys(n).forEach((r) => {
n[r] !== void 0 && (e[r] = n[r]);
});
}), e;
}
function gn(t, ...e) {
for (let n = e.length - 1; n >= 0; n -= 1)
if (e[n] !== void 0)
return e[n];
return t;
}
var of = function(t) {
return function(e, n) {
var r = V(!1);
t(function() {
return function() {
r.current = !1;
};
}, []), t(function() {
if (!r.current)
r.current = !0;
else
return e();
}, n);
};
}, Rr = function(t) {
return typeof t == "function";
}, R0 = function(t) {
return typeof t == "number";
}, P0 = !1;
const Ni = P0;
function Yt(t) {
Ni && (Rr(t) || console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof t)));
var e = V(t);
e.current = de(function() {
return t;
}, [t]);
var n = V();
return n.current || (n.current = function() {
for (var r = [], i = 0; i < arguments.length; i++)
r[i] = arguments[i];
return e.current.apply(this, r);
}), n.current;
}
const Us = of(Q);
function ec(t, e) {
if (t === e)
return !0;
for (var n = 0; n < t.length; n++)
if (!Object.is(t[n], e[n]))
return !1;
return !0;
}
function qa(t) {
var e = V(t);
return e.current = t, e;
}
var M0 = function(t) {
Ni && (Rr(t) || console.error("useUnmount expected parameter is a function, got ".concat(typeof t)));
var e = qa(t);
Q(function() {
return function() {
e.current();
};
}, []);
};
const Ri = M0;
function A0(t) {
var e = typeof t;
return t != null && (e == "object" || e == "function");
}
var Ks = A0, I0 = typeof mt == "object" && mt && mt.Object === Object && mt, T0 = I0, L0 = T0, D0 = typeof self == "object" && self && self.Object === Object && self, V0 = L0 || D0 || Function("return this")(), sf = V0, j0 = sf, B0 = function() {
return j0.Date.now();
}, W0 = B0, Z0 = /\s/;
function H0(t) {
for (var e = t.length; e-- && Z0.test(t.charAt(e)); )
;
return e;
}
var z0 = H0, q0 = z0, U0 = /^\s+/;
function K0(t) {
return t && t.slice(0, q0(t) + 1).replace(U0, "");
}
var Y0 = K0, G0 = sf, X0 = G0.Symbol, lf = X0, tc = lf, cf = Object.prototype, Q0 = cf.hasOwnProperty, J0 = cf.toString, Br = tc ? tc.toStringTag : void 0;
function em(t) {
var e = Q0.call(t, Br), n = t[Br];
try {
t[Br] = void 0;
var r = !0;
} catch {
}
var i = J0.call(t);
return r && (e ? t[Br] = n : delete t[Br]), i;
}
var tm = em, nm = Object.prototype, rm = nm.toString;
function im(t) {
return rm.call(t);
}
var am = im, nc = lf, om = tm, sm = am, lm = "[object Null]", cm = "[object Undefined]", rc = nc ? nc.toStringTag : void 0;
function um(t) {
return t == null ? t === void 0 ? cm : lm : rc && rc in Object(t) ? om(t) : sm(t);
}
var fm = um;
function dm(t) {
return t != null && typeof t == "object";
}
var mm = dm, hm = fm, vm = mm, pm = "[object Symbol]";
function gm(t) {
return typeof t == "symbol" || vm(t) && hm(t) == pm;
}
var ym = gm, bm = Y0, ic = Ks, Em = ym, ac = NaN, wm = /^[-+]0x[0-9a-f]+$/i, Cm = /^0b[01]+$/i, xm = /^0o[0-7]+$/i, km = parseInt;
function $m(t) {
if (typeof t == "number")
return t;
if (Em(t))
return ac;
if (ic(t)) {
var e = typeof t.valueOf == "function" ? t.valueOf() : t;
t = ic(e) ? e + "" : e;
}
if (typeof t != "string")
return t === 0 ? t : +t;
t = bm(t);
var n = Cm.test(t);
return n || xm.test(t) ? km(t.slice(2), n ? 2 : 8) : wm.test(t) ? ac : +t;
}
var _m = $m, Sm = Ks, _o = W0, oc = _m, Om = "Expected a function", Fm = Math.max, Nm = Math.min;
function Rm(t, e, n) {
var r, i, a, o, l, c, u = 0, f = !1, d = !1, m = !0;
if (typeof t != "function")
throw new TypeError(Om);
e = oc(e) || 0, Sm(n) && (f = !!n.leading, d = "maxWait" in n, a = d ? Fm(oc(n.maxWait) || 0, e) : a, m = "trailing" in n ? !!n.trailing : m);
function p(C) {
var k = r, O = i;
return r = i = void 0, u = C, o = t.apply(O, k), o;
}
function b(C) {
return u = C, l = setTimeout(h, e), f ? p(C) : o;
}
function y(C) {
var k = C - c, O = C - u, P = e - k;
return d ? Nm(P, a - O) : P;
}
function g(C) {
var k = C - c, O = C - u;
return c === void 0 || k >= e || k < 0 || d && O >= a;
}
function h() {
var C = _o();
if (g(C))
return x(C);
l = setTimeout(h, y(C));
}
function x(C) {
return l = void 0, m && r ? p(C) : (r = i = void 0, o);
}
function v() {
l !== void 0 && clearTimeout(l), u = 0, r = c = i = l = void 0;
}
function E() {
return l === void 0 ? o : x(_o());
}
function w() {
var C = _o(), k = g(C);
if (r = arguments, i = this, c = C, k) {
if (l === void 0)
return b(c);
if (d)
return clearTimeout(l), l = setTimeout(h, e), p(c);
}
return l === void 0 && (l = setTimeout(h, e)), o;
}
return w.cancel = v, w.flush = E, w;
}
var uf = Rm;
const Pm = /* @__PURE__ */ $t(uf);
var Mm = !!(typeof window < "u" && window.document && window.document.createElement);
const Ys = Mm;
var Am = uf, Im = Ks, Tm = "Expected a function";
function Lm(t, e, n) {
var r = !0, i = !0;
if (typeof t != "function")
throw new TypeError(Tm);
return Im(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), Am(t, e, {
leading: r,
maxWait: e,
trailing: i
});
}
var Dm = Lm;
const Vm = /* @__PURE__ */ $t(Dm);
var jm = function(t) {
Ni && (Rr(t) || console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof t, '".'))), Q(function() {
t == null || t();
}, []);
};
const Bm = jm;
var Wm = function() {
var t = It(X({}), 2), e = t[1];
return Qe(function() {
return e({});
}, []);
};
const ff = Wm;
function fn(t, e) {
if (Ys) {
if (!t)
return e;
var n;
return Rr(t) ? n = t() : "current" in t ? n = t.current : n = t, n;
}
}
var Zm = function(t) {
return t.every(function(e) {
var n = fn(e);
if (!n)
return !1;
if (n.getRootNode() instanceof ShadowRoot)
return !0;
});
}, Hm = function(t) {
return t ? t.getRootNode() : document;
}, zm = function(t) {
if (!t || !document.getRootNode)
return document;
var e = Array.isArray(t) ? t : [t];
return Zm(e) ? Hm(fn(e[0])) : document;
};
const qm = zm;
var Um = function(t) {
var e = function(n, r, i) {
var a = V(!1), o = V([]), l = V([]), c = V();
t(function() {
var u, f = Array.isArray(i) ? i : [i], d = f.map(function(m) {
return fn(m);
});
if (!a.current) {
a.current = !0, o.current = d, l.current = r, c.current = n();
return;
}
(d.length !== o.current.length || !ec(d, o.current) || !ec(r, l.current)) && ((u = c.current) === null || u === void 0 || u.call(c), o.current = d, l.current = r, c.current = n());
}), Ri(function() {
var u;
(u = c.current) === null || u === void 0 || u.call(c), a.current = !1;
});
};
return e;
};
const df = Um;
var Km = df(Q);
const Gs = Km;
function mf(t, e, n) {
n === void 0 && (n = "click");
var r = qa(t);
Gs(function() {
var i = function(l) {
var c = Array.isArray(e) ? e : [e];
c.some(function(u) {
var f = fn(u);
return !f || f.contains(l.target);
}) || r.current(l);
}, a = qm(e), o = Array.isArray(n) ? n : [n];
return o.forEach(function(l) {
return a.addEventListener(l, i);
}), function() {
o.forEach(function(l) {
return a.removeEventListener(l, i);
});
};
}, Array.isArray(n) ? n : [n], e);
}
var hf = { exports: {} };
(function(t, e) {
(function(n, r) {
t.exports = r();
})(mt, function() {
var n = 1e3, r = 6e4, i = 36e5, a = "millisecond", o = "second", l = "minute", c = "hour", u = "day", f = "week", d = "month", m = "quarter", p = "year", b = "date", y = "Invalid Date", g = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, h = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, x = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(S) {
var $ = ["th", "st", "nd", "rd"], R = S % 100;
return "[" + S + ($[(R - 20) % 10] || $[R] || $[0]) + "]";
} }, v = function(S, $, R) {
var F = String(S);
return !F || F.length >= $ ? S : "" + Array($ + 1 - F.length).join(R) + S;
}, E = { s: v, z: function(S) {
var $ = -S.utcOffset(), R = Math.abs($), F = Math.floor(R / 60), N = R % 60;
return ($ <= 0 ? "+" : "-") + v(F, 2, "0") + ":" + v(N, 2, "0");
}, m: function S($, R) {
if ($.date() < R.date())
return -S(R, $);
var F = 12 * (R.year() - $.year()) + (R.month() - $.month()), N = $.clone().add(F, d), T = R - N < 0, A = $.clone().add(F + (T ? -1 : 1), d);
return +(-(F + (R - N) / (T ? N - A : A - N)) || 0);
}, a: function(S) {
return S < 0 ? Math.ceil(S) || 0 : Math.floor(S);
}, p: function(S) {
return { M: d, y: p, w: f, d: u, D: b, h: c, m: l, s: o, ms: a, Q: m }[S] || String(S || "").toLowerCase().replace(/s$/, "");
}, u: function(S) {
return S === void 0;
} }, w = "en", C = {};
C[w] = x;
var k = function(S) {
return S instanceof L;
}, O = function S($, R, F) {
var N;
if (!$)
return w;
if (typeof $ == "string") {
var T = $.toLowerCase();
C[T] && (N = T), R && (C[T] = R, N = T);
var A = $.split("-");
if (!N && A.length > 1)
return S(A[0]);
} else {
var D = $.name;
C[D] = $, N = D;
}
return !F && N && (w = N), N || !F && w;
}, P = function(S, $) {
if (k(S))
return S.clone();
var R = typeof $ == "object" ? $ : {};
return R.date = S, R.args = arguments, new L(R);
}, _ = E;
_.l = O, _.i = k, _.w = function(S, $) {
return P(S, { locale: $.$L, utc: $.$u, x: $.$x, $offset: $.$offset });
};
var L = function() {
function S(R) {
this.$L = O(R.locale, null, !0), this.parse(R);
}
var $ = S.prototype;
return $.parse = function(R) {
this.$d = function(F) {
var N = F.date, T = F.utc;
if (N === null)
return /* @__PURE__ */ new Date(NaN);
if (_.u(N))
return /* @__PURE__ */ new Date();
if (N instanceof Date)
return new Date(N);
if (typeof N == "string" && !/Z$/i.test(N)) {
var A = N.match(g);
if (A) {
var D = A[2] - 1 || 0, B = (A[7] || "0").substring(0, 3);
return T ? new Date(Date.UTC(A[1], D, A[3] || 1, A[4] || 0, A[5] || 0, A[6] || 0, B)) : new Date(A[1], D, A[3] || 1, A[4] || 0, A[5] || 0, A[6] || 0, B);
}
}
return new Date(N);
}(R), this.$x = R.x || {}, this.init();
}, $.init = function() {
var R = this.$d;
this.$y = R.getFullYear(), this.$M = R.getMonth(), this.$D = R.getDate(), this.$W = R.getDay(), this.$H = R.getHours(), this.$m = R.getMinutes(), this.$s = R.getSeconds(), this.$ms = R.getMilliseconds();
}, $.$utils = function() {
return _;
}, $.isValid = function() {
return this.$d.toString() !== y;
}, $.isSame = function(R, F) {
var N = P(R);
return this.startOf(F) <= N && N <= this.endOf(F);
}, $.isAfter = function(R, F) {
return P(R) < this.startOf(F);
}, $.isBefore = function(R, F) {
return this.endOf(F) < P(R);
}, $.$g = function(R, F, N) {
return _.u(R) ? this[F] : this.set(N, R);
}, $.unix = function() {
return Math.floor(this.valueOf() / 1e3);
}, $.valueOf = function() {
return this.$d.getTime();
}, $.startOf = function(R, F) {
var N = this, T = !!_.u(F) || F, A = _.p(R), D = function(ve, U) {
var ee = _.w(N.$u ? Date.UTC(N.$y, U, ve) : new Date(N.$y, U, ve), N);
return T ? ee : ee.endOf(u);
}, B = function(ve, U) {
return _.w(N.toDate()[ve].apply(N.toDate("s"), (T ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(U)), N);
}, H = this.$W, Z = this.$M, K = this.$D, Y = "set" + (this.$u ? "UTC" : "");
switch (A) {
case p:
return T ? D(1, 0) : D(31, 11);
case d:
return T ? D(1, Z) : D(0, Z + 1);
case f:
var re = this.$locale().weekStart || 0, se = (H < re ? H + 7 : H) - re;
return D(T ? K - se : K + (6 - se), Z);
case u:
case b:
return B(Y + "Hours", 0);
case c:
return B(Y + "Minutes", 1);
case l:
return B(Y + "Seconds", 2);
case o:
return B(Y + "Milliseconds", 3);
default:
return this.clone();
}
}, $.endOf = function(R) {
return this.startOf(R, !1);
}, $.$set = function(R, F) {
var N, T = _.p(R), A = "set" + (this.$u ? "UTC" : ""), D = (N = {}, N[u] = A + "Date", N[b] = A + "Date", N[d] = A + "Month", N[p] = A + "FullYear", N[c] = A + "Hours", N[l] = A + "Minutes", N[o] = A + "Seconds", N[a] = A + "Milliseconds", N)[T], B = T === u ? this.$D + (F - this.$W) : F;
if (T === d || T === p) {
var H = this.clone().set(b, 1);
H.$d[D](B), H.init(), this.$d = H.set(b, Math.min(this.$D, H.daysInMonth())).$d;
} else
D && this.$d[D](B);
return this.init(), this;
}, $.set = function(R, F) {
return this.clone().$set(R, F);
}, $.get = function(R) {
return this[_.p(R)]();
}, $.add = function(R, F) {
var N, T = this;
R = Number(R);
var A = _.p(F), D = function(Z) {
var K = P(T);
return _.w(K.date(K.date() + Math.round(Z * R)), T);
};
if (A === d)
return this.set(d, this.$M + R);
if (A === p)
return this.set(p, this.$y + R);
if (A === u)
return D(1);
if (A === f)
return D(7);
var B = (N = {}, N[l] = r, N[c] = i, N[o] = n, N)[A] || 1, H = this.$d.getTime() + R * B;
return _.w(H, this);
}, $.subtract = function(R, F) {
return this.add(-1 * R, F);
}, $.format = function(R) {
var F = this, N = this.$locale();
if (!this.isValid())
return N.invalidDate || y;
var T = R || "YYYY-MM-DDTHH:mm:ssZ", A = _.z(this), D = this.$H, B = this.$m, H = this.$M, Z = N.weekdays, K = N.months, Y = N.meridiem, re = function(U, ee, J, te) {
return U && (U[ee] || U(F, T)) || J[ee].slice(0, te);
}, se = function(U) {
return _.s(D % 12 || 12, U, "0");
}, ve = Y || function(U, ee, J) {
var te = U < 12 ? "AM" : "PM";
return J ? te.toLowerCase() : te;
};
return T.replace(h, function(U, ee) {
return ee || function(J) {
switch (J) {
case "YY":
return String(F.$y).slice(-2);
case "YYYY":
return _.s(F.$y, 4, "0");
case "M":
return H + 1;
case "MM":
return _.s(H + 1, 2, "0");
case "MMM":
return re(N.monthsShort, H, K, 3);
case "MMMM":
return re(K, H);
case "D":
return F.$D;
case "DD":
return _.s(F.$D, 2, "0");
case "d":
return String(F.$W);
case "dd":
return re(N.weekdaysMin, F.$W, Z, 2);
case "ddd":
return re(N.weekdaysShort, F.$W, Z, 3);
case "dddd":
return Z[F.$W];
case "H":
return String(D);
case "HH":
return _.s(D, 2, "0");
case "h":
return se(1);
case "hh":
return se(2);
case "a":
return ve(D, B, !0);
case "A":
return ve(D, B, !1);
case "m":
return String(B);
case "mm":
return _.s(B, 2, "0");
case "s":
return String(F.$s);
case "ss":
return _.s(F.$s, 2, "0");
case "SSS":
return _.s(F.$ms, 3, "0");
case "Z":
return A;
}
return null;
}(U) || A.replace(":", "");
});
}, $.utcOffset = function() {
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
}, $.diff = function(R, F, N) {
var T, A = this, D = _.p(F), B = P(R), H = (B.utcOffset() - this.utcOffset()) * r, Z = this - B, K = function() {
return _.m(A, B);
};
switch (D) {
case p:
T = K() / 12;
break;
case d:
T = K();
break;
case m:
T = K() / 3;
break;
case f:
T = (Z - H) / 6048e5;
break;
case u:
T = (Z - H) / 864e5;
break;
case c:
T = Z / i;
break;
case l:
T = Z / r;
break;
case o:
T = Z / n;
break;
default:
T = Z;
}
return N ? T : _.a(T);
}, $.daysInMonth = function() {
return this.endOf(d).$D;
}, $.$locale = function() {
return C[this.$L];
}, $.locale = function(R, F) {
if (!R)
return this.$L;
var N = this.clone(), T = O(R, F, !0);
return T && (N.$L = T), N;
}, $.clone = function() {
return _.w(this.$d, this);
}, $.toDate = function() {
return new Date(this.valueOf());
}, $.toJSON = function() {
return this.isValid() ? this.toISOString() : null;
}, $.toISOString = function() {
return this.$d.toISOString();
}, $.toString = function() {
return this.$d.toUTCString();
}, S;
}(), M = L.prototype;
return P.prototype = M, [["$ms", a], ["$s", o], ["$m", l], ["$H", c], ["$W", u], ["$M", d], ["$y", p], ["$D", b]].forEach(function(S) {
M[S[1]] = function($) {
return this.$g($, S[0], S[1]);
};
}), P.extend = function(S, $) {
return S.$i || (S($, L, P), S.$i = !0), P;
}, P.locale = O, P.isDayjs = k, P.unix = function(S) {
return P(1e3 * S);
}, P.en = C[w], P.Ls = C, P.p = {}, P;
});
})(hf);
var Ym = hf.exports;
const ae = /* @__PURE__ */ $t(Ym);
function Gm(t, e) {
var n;
Ni && (Rr(t) || console.error("useDebounceFn expected parameter is a function, got ".concat(typeof t)));
var r = qa(t), i = (n = e == null ? void 0 : e.wait) !== null && n !== void 0 ? n : 1e3, a = de(function() {
return Pm(function() {
for (var o = [], l = 0; l < arguments.length; l++)
o[l] = arguments[l];
return r.current.apply(r, qs([], It(o), !1));
}, i, e);
}, []);
return Ri(function() {
a.cancel();
}), {
run: a,
cancel: a.cancel,
flush: a.flush
};
}
function Xm(t, e, n) {
var r = It(X({}), 2), i = r[0], a = r[1], o = Gm(function() {
a({});
}, n).run;
Q(function() {
return o();
}, e), Us(t, [i]);
}
function Qm(t) {
var e = It(X(t), 2), n = e[0], r = e[1], i = V(n);
i.current = n;
var a = Qe(function() {
return i.current;
}, []);
return [n, r, a];
}
(function() {
if (typeof window != "object")
return;
if ("IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype) {
"isIntersecting" in window.IntersectionObserverEntry.prototype || Object.defineProperty(
window.IntersectionObserverEntry.prototype,
"isIntersecting",
{
get: function() {
return this.intersectionRatio > 0;
}
}
);
return;
}
function t(v) {
try {
return v.defaultView && v.defaultView.frameElement || null;
} catch {
return null;
}
}
var e = function(v) {
for (var E = v, w = t(E); w; )
E = w.ownerDocument, w = t(E);
return E;
}(window.document), n = [], r = null, i = null;
function a(v) {
this.time = v.time, this.target = v.target, this.rootBounds = b(v.rootBounds), this.boundingClientRect = b(v.boundingClientRect), this.intersectionRect = b(v.intersectionRect || p()), this.isIntersecting = !!v.intersectionRect;
var E = this.boundingClientRect, w = E.width * E.height, C = this.intersectionRect, k = C.width * C.height;
w ? this.intersectionRatio = Number((k / w).toFixed(4)) : this.intersectionRatio = this.isIntersecting ? 1 : 0;
}
function o(v, E) {
var w = E || {};
if (typeof v != "function")
throw new Error("callback must be a function");
if (w.root && w.root.nodeType != 1 && w.root.nodeType != 9)
throw new Error("root must be a Document or Element");
this._checkForIntersections = c(
this._checkForIntersections.bind(this),
this.THROTTLE_TIMEOUT
), this._callback = v, this._observationTargets = [], this._queuedEntries = [], this._rootMarginValues = this._parseRootMargin(w.rootMargin), this.thresholds = this._initThresholds(w.threshold), this.root = w.root || null, this.rootMargin = this._rootMarginValues.map(function(C) {
return C.value + C.unit;
}).join(" "), this._monitoringDocuments = [], this._monitoringUnsubscribes = [];
}
o.prototype.THROTTLE_TIMEOUT = 100, o.prototype.POLL_INTERVAL = null, o.prototype.USE_MUTATION_OBSERVER = !0, o._setupCrossOriginUpdater = function() {
return r || (r = function(v, E) {
!v || !E ? i = p() : i = y(v, E), n.forEach(function(w) {
w._checkForIntersections();
});
}), r;
}, o._resetCrossOriginUpdater = function() {
r = null, i = null;
}, o.prototype.observe = function(v) {
var E = this._observationTargets.some(function(w) {
return w.element == v;
});
if (!E) {
if (!(v && v.nodeType == 1))
throw new Error("target must be an Element");
this._registerInstance(), this._observationTargets.push({ element: v, entry: null }), this._monitorIntersections(v.ownerDocument), this._checkForIntersections();
}
}, o.prototype.unobserve = function(v) {
this._observationTargets = this._observationTargets.filter(function(E) {
return E.element != v;
}), this._unmonitorIntersections(v.ownerDocument), this._observationTargets.length == 0 && this._unregisterInstance();
}, o.prototype.disconnect = function() {
this._observationTargets = [], this._unmonitorAllIntersections(), this._unregisterInstance();
}, o.prototype.takeRecords = function() {
var v = this._queuedEntries.slice();
return this._queuedEntries = [], v;
}, o.prototype._initThresholds = function(v) {
var E = v || [0];
return Array.isArray(E) || (E = [E]), E.sort().filter(function(w, C, k) {
if (typeof w != "number" || isNaN(w) || w < 0 || w > 1)
throw new Error("threshold must be a number between 0 and 1 inclusively");
return w !== k[C - 1];
});
}, o.prototype._parseRootMargin = function(v) {
var E = v || "0px", w = E.split(/\s+/).map(function(C) {
var k = /^(-?\d*\.?\d+)(px|%)$/.exec(C);
if (!k)
throw new Error("rootMargin must be specified in pixels or percent");
return { value: parseFloat(k[1]), unit: k[2] };
});
return w[1] = w[1] || w[0], w[2] = w[2] || w[0], w[3] = w[3] || w[1], w;
}, o.prototype._monitorIntersections = function(v) {
var E = v.defaultView;
if (E && this._monitoringDocuments.indexOf(v) == -1) {
var w = this._checkForIntersections, C = null, k = null;
this.POLL_INTERVAL ? C = E.setInterval(w, this.POLL_INTERVAL) : (u(E, "resize", w, !0), u(v, "scroll", w, !0), this.USE_MUTATION_OBSERVER && "MutationObserver" in E && (k = new E.MutationObserver(w), k.observe(v, {
attributes: !0,
childList: !0,
characterData: !0,
subtree: !0
}))), this._monitoringDocuments.push(v), this._monitoringUnsubscribes.push(function() {
var _ = v.defaultView;
_ && (C && _.clearInterval(C), f(_, "resize", w, !0)), f(v, "scroll", w, !0), k && k.disconnect();
});
var O = this.root && (this.root.ownerDocument || this.root) || e;
if (v != O) {
var P = t(v);
P && this._monitorIntersections(P.ownerDocument);
}
}
}, o.prototype._unmonitorIntersections = function(v) {
var E = this._monitoringDocuments.indexOf(v);
if (E != -1) {
var w = this.root && (this.root.ownerDocument || this.root) || e, C = this._observationTargets.some(function(P) {
var _ = P.element.ownerDocument;
if (_ == v)
return !0;
for (; _ && _ != w; ) {
var L = t(_);
if (_ = L && L.ownerDocument, _ == v)
return !0;
}
return !1;
});
if (!C) {
var k = this._monitoringUnsubscribes[E];
if (this._monitoringDocuments.splice(E, 1), this._monitoringUnsubscribes.splice(E, 1), k(), v != w) {
var O = t(v);
O && this._unmonitorIntersections(O.ownerDocument);
}
}
}
}, o.prototype._unmonitorAllIntersections = function() {
var v = this._monitoringUnsubscribes.slice(0);
this._monitoringDocuments.length = 0, this._monitoringUnsubscribes.length = 0;
for (var E = 0; E < v.length; E++)
v[E]();
}, o.prototype._checkForIntersections = function() {
if (!(!this.root && r && !i)) {
var v = this._rootIsInDom(), E = v ? this._getRootRect() : p();
this._observationTargets.forEach(function(w) {
var C = w.element, k = m(C), O = this._rootContainsTarget(C), P = w.entry, _ = v && O && this._computeTargetAndRootIntersection(C, k, E), L = null;
this._rootContainsTarget(C) ? (!r || this.root) && (L = E) : L = p();
var M = w.entry = new a({
time: l(),
target: C,
boundingClientRect: k,
rootBounds: L,
intersectionRect: _
});
P ? v && O ? this._hasCrossedThreshold(P, M) && this._queuedEntries.push(M) : P && P.isIntersecting && this._queuedEntries.push(M) : this._queuedEntries.push(M);
}, this), this._queuedEntries.length && this._callback(this.takeRecords(), this);
}
}, o.prototype._computeTargetAndRootIntersection = function(v, E, w) {
if (window.getComputedStyle(v).display != "none") {
for (var C = E, k = h(v), O = !1; !O && k; ) {
var P = null, _ = k.nodeType == 1 ? window.getComputedStyle(k) : {};
if (_.display == "none")
return null;
if (k == this.root || k.nodeType == /* DOCUMENT */
9)
if (O = !0, k == this.root || k == e)
r && !this.root ? !i || i.width == 0 && i.height == 0 ? (k = null, P = null, C = null) : P = i : P = w;
else {
var L = h(k), M = L && m(L), S = L && this._computeTargetAndRootIntersection(L, M, w);
M && S ? (k = L, P = y(M, S)) : (k = null, C = null);
}
else {
var $ = k.ownerDocument;
k != $.body && k != $.documentElement && _.overflow != "visible" && (P = m(k));
}
if (P && (C = d(P, C)), !C)
break;
k = k && h(k);
}
return C;
}
}, o.prototype._getRootRect = function() {
var v;
if (this.root && !x(this.root))
v = m(this.root);
else {
var E = x(this.root) ? this.root : e, w = E.documentElement, C = E.body;
v = {
top: 0,
left: 0,
right: w.clientWidth || C.clientWidth,
width: w.clientWidth || C.clientWidth,
bottom: w.clientHeight || C.clientHeight,
height: w.clientHeight || C.clientHeight
};
}
return this._expandRectByRootMargin(v);
}, o.prototype._expandRectByRootMargin = function(v) {
var E = this._rootMarginValues.map(function(C, k) {
return C.unit == "px" ? C.value : C.value * (k % 2 ? v.width : v.height) / 100;
}), w = {
top: v.top - E[0],
right: v.right + E[1],
bottom: v.bottom + E[2],
left: v.left - E[3]
};
return w.width = w.right - w.left, w.height = w.bottom - w.top, w;
}, o.prototype._hasCrossedThreshold = function(v, E) {
var w = v && v.isIntersecting ? v.intersectionRatio || 0 : -1, C = E.isIntersecting ? E.intersectionRatio || 0 : -1;
if (w !== C)
for (var k = 0; k < this.thresholds.length; k++) {
var O = this.thresholds[k];
if (O == w || O == C || O < w != O < C)
return !0;
}
}, o.prototype._rootIsInDom = function() {
return !this.root || g(e, this.root);
}, o.prototype._rootContainsTarget = function(v) {
var E = this.root && (this.root.ownerDocument || this.root) || e;
return g(E, v) && (!this.root || E == v.ownerDocument);
}, o.prototype._registerInstance = function() {
n.indexOf(this) < 0 && n.push(this);
}, o.prototype._unregisterInstance = function() {
var v = n.indexOf(this);
v != -1 && n.splice(v, 1);
};
function l() {
return window.performance && performance.now && performance.now();
}
function c(v, E) {
var w = null;
return function() {
w || (w = setTimeout(function() {
v(), w = null;
}, E));
};
}
function u(v, E, w, C) {
typeof v.addEventListener == "function" ? v.addEventListener(E, w, C || !1) : typeof v.attachEvent == "function" && v.attachEvent("on" + E, w);
}
function f(v, E, w, C) {
typeof v.removeEventListener == "function" ? v.removeEventListener(E, w, C || !1) : typeof v.detachEvent == "function" && v.detachEvent("on" + E, w);
}
function d(v, E) {
var w = Math.max(v.top, E.top), C = Math.min(v.bottom, E.bottom), k = Math.max(v.left, E.left), O = Math.min(v.right, E.right), P = O - k, _ = C - w;
return P >= 0 && _ >= 0 && {
top: w,
bottom: C,
left: k,
right: O,
width: P,
height: _
} || null;
}
function m(v) {
var E;
try {
E = v.getBoundingClientRect();
} catch {
}
return E ? (E.width && E.height || (E = {
top: E.top,
right: E.right,
bottom: E.bottom,
left: E.left,
width: E.right - E.left,
height: E.bottom - E.top
}), E) : p();
}
function p() {
return {
top: 0,
bottom: 0,
left: 0,
right: 0,
width: 0,
height: 0
};
}
function b(v) {
return !v || "x" in v ? v : {
top: v.top,
y: v.top,
bottom: v.bottom,
left: v.left,
x: v.left,
right: v.right,
width: v.width,
height: v.height
};
}
function y(v, E) {
var w = E.top - v.top, C = E.left - v.left;
return {
top: w,
left: C,
height: E.height,
width: E.width,
bottom: w + E.height,
right: C + E.width
};
}
function g(v, E) {
for (var w = E; w; ) {
if (w == v)
return !0;
w = h(w);
}
return !1;
}
function h(v) {
var E = v.parentNode;
return v.nodeType == /* DOCUMENT */
9 && v != e ? t(v) : (E && E.assignedSlot && (E = E.assignedSlot.parentNode), E && E.nodeType == 11 && E.host ? E.host : E);
}
function x(v) {
return v && v.nodeType === 9;
}
window.IntersectionObserver = o, window.IntersectionObserverEntry = a;
})();
function Jm(t, e) {
var n = It(X(), 2), r = n[0], i = n[1], a = It(X(), 2), o = a[0], l = a[1];
return Gs(function() {
var c = fn(t);
if (c) {
var u = new IntersectionObserver(function(f) {
var d, m;
try {
for (var p = S0(f), b = p.next(); !b.done; b = p.next()) {
var y = b.value;
l(y.intersectionRatio), i(y.isIntersecting);
}
} catch (g) {
d = {
error: g
};
} finally {
try {
b && !b.done && (m = p.return) && m.call(p);
} finally {
if (d)
throw d.error;
}
}
}, Ca(Ca({}, e), {
root: fn(e == null ? void 0 : e.root)
}));
return u.observe(c), function() {
u.disconnect();
};
}
}, [e == null ? void 0 : e.rootMargin, e == null ? void 0 : e.threshold], t), [r, o];
}
var eh = Ys ? za : Q;
const Ae = eh;
function th(t) {
var e = this, n = V(!1);
return Qe(function() {
for (var r = [], i = 0; i < arguments.length; i++)
r[i] = arguments[i];
return Pe(e, void 0, void 0, function() {
var a, o;
return _0(this, function(l) {
switch (l.label) {
case 0:
if (n.current)
return [
2
/*return*/
];
n.current = !0, l.label = 1;
case 1:
return l.trys.push([1, 3, , 4]), [4, t.apply(void 0, qs([], It(r), !1))];
case 2:
return a = l.sent(), n.current = !1, [2, a];
case 3:
throw o = l.sent(), n.current = !1, o;
case 4:
return [
2
/*return*/
];
}
});
});
}, [t]);
}
function nh(t) {
var e = V(0), n = It(X(t), 2), r = n[0], i = n[1], a = Qe(function(o) {
cancelAnimationFrame(e.current), e.current = requestAnimationFrame(function() {
i(o);
});
}, []);
return Ri(function() {
cancelAnimationFrame(e.current);
}), [r, a];
}
var rh = function() {
var t = V(!1);
return Q(function() {
return t.current = !1, function() {
t.current = !0;
};
}, []), t;
};
const Xs = rh;
var vf = function() {
if (typeof Map < "u")
return Map;
function t(e, n) {
var r = -1;
return e.some(function(i, a) {
return i[0] === n ? (r = a, !0) : !1;
}), r;
}
return (
/** @class */
function() {
function e() {
this.__entries__ = [];
}
return Object.defineProperty(e.prototype, "size", {
/**
* @returns {boolean}
*/
get: function() {
return this.__entries__.length;
},
enumerable: !0,
configurable: !0
}), e.prototype.get = function(n) {
var r = t(this.__entries__, n), i = this.__entries__[r];
return i && i[1];
}, e.prototype.set = function(n, r) {
var i = t(this.__entries__, n);
~i ? this.__entries__[i][1] = r : this.__entries__.push([n, r]);
}, e.prototype.delete = function(n) {
var r = this.__entries__, i = t(r, n);
~i && r.splice(i, 1);
}, e.prototype.has = function(n) {
return !!~t(this.__entries__, n);
}, e.prototype.clear = function() {
this.__entries__.splice(0);
}, e.prototype.forEach = function(n, r) {
r === void 0 && (r = null);
for (var i = 0, a = this.__entries__; i < a.length; i++) {
var o = a[i];
n.call(r, o[1], o[0]);
}
}, e;
}()
);
}(), Qo = typeof window < "u" && typeof document < "u" && window.document === document, xa = function() {
return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
}(), ih = function() {
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(xa) : function(t) {
return setTimeout(function() {
return t(Date.now());
}, 1e3 / 60);
};
}(), ah = 2;
function oh(t, e) {
var n = !1, r = !1, i = 0;
function a() {
n && (n = !1, t()), r && l();
}
function o() {
ih(a);
}
function l() {
var c = Date.now();
if (n) {
if (c - i < ah)
return;
r = !0;
} else
n = !0, r = !1, setTimeout(o, e);
i = c;
}
return l;
}
var sh = 20, lh = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], ch = typeof MutationObserver < "u", uh = (
/** @class */
function() {
function t() {
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = oh(this.refresh.bind(this), sh);
}
return t.prototype.addObserver = function(e) {
~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
}, t.prototype.removeObserver = function(e) {
var n = this.observers_, r = n.indexOf(e);
~r && n.splice(r, 1), !n.length && this.connected_ && this.disconnect_();
}, t.prototype.refresh = function() {
var e = this.updateObservers_();
e && this.refresh();
}, t.prototype.updateObservers_ = function() {
var e = this.observers_.filter(function(n) {
return n.gatherActive(), n.hasActive();
});
return e.forEach(function(n) {
return n.broadcastActive();
}), e.length > 0;
}, t.prototype.connect_ = function() {
!Qo || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), ch ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
attributes: !0,
childList: !0,
characterData: !0,
subtree: !0
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
}, t.prototype.disconnect_ = function() {
!Qo || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
}, t.prototype.onTransitionEnd_ = function(e) {
var n = e.propertyName, r = n === void 0 ? "" : n, i = lh.some(function(a) {
return !!~r.indexOf(a);
});
i && this.refresh();
}, t.getInstance = function() {
return this.instance_ || (this.instance_ = new t()), this.instance_;
}, t.instance_ = null, t;
}()
), pf = function(t, e) {
for (var n = 0, r = Object.keys(e); n < r.length; n++) {
var i = r[n];
Object.defineProperty(t, i, {
value: e[i],
enumerable: !1,
writable: !1,
configurable: !0
});
}
return t;
}, Er = function(t) {
var e = t && t.ownerDocument && t.ownerDocument.defaultView;
return e || xa;
}, gf = Ua(0, 0, 0, 0);
function ka(t) {
return parseFloat(t) || 0;
}
function sc(t) {
for (var e = [], n = 1; n < arguments.length; n++)
e[n - 1] = arguments[n];
return e.reduce(function(r, i) {
var a = t["border-" + i + "-width"];
return r + ka(a);
}, 0);
}
function fh(t) {
for (var e = ["top", "right", "bottom", "left"], n = {}, r = 0, i = e; r < i.length; r++) {
var a = i[r], o = t["padding-" + a];
n[a] = ka(o);
}
return n;
}
function dh(t) {
var e = t.getBBox();
return Ua(0, 0, e.width, e.height);
}
function mh(t) {
var e = t.clientWidth, n = t.clientHeight;
if (!e && !n)
return gf;
var r = Er(t).getComputedStyle(t), i = fh(r), a = i.left + i.right, o = i.top + i.bottom, l = ka(r.width), c = ka(r.height);
if (r.boxSizing === "border-box" && (Math.round(l + a) !== e && (l -= sc(r, "left", "right") + a), Math.round(c + o) !== n && (c -= sc(r, "top", "bottom") + o)), !vh(t)) {
var u = Math.round(l + a) - e, f = Math.round(c + o) - n;
Math.abs(u) !== 1 && (l -= u), Math.abs(f) !== 1 && (c -= f);
}
return Ua(i.left, i.top, l, c);
}
var hh = /* @__PURE__ */ function() {
return typeof SVGGraphicsElement < "u" ? function(t) {
return t instanceof Er(t).SVGGraphicsElement;
} : function(t) {
return t instanceof Er(t).SVGElement && typeof t.getBBox