@baihuiru/cheetah-webcomponents
Version:
Cheetah Web Components library - React components as Web Components
1,590 lines • 262 kB
JavaScript
var La = (t, n, e) => new Promise((r, a) => {
var i = (u) => {
try {
l(e.next(u));
} catch (c) {
a(c);
}
}, o = (u) => {
try {
l(e.throw(u));
} catch (c) {
a(c);
}
}, l = (u) => u.done ? r(u.value) : Promise.resolve(u.value).then(i, o);
l((e = e.apply(t, n)).next());
});
import { r as s, A as tr, _ as ue, x as Nr, y as _r, z as dn, D as fn, E as nr, F as rr, G as ar, a as F, H as Hr, c as Qe, I as ir, J as ja, b as j, u as yt, M as Ba, P as wr, N as Ho, j as pe, O as $r, g as K, Q as st, S as Ai, T as Yr, h as Ca, U as Wo, V as Ft, W as Ko, X as Vi, Y as qo, e as x, Z as me, $ as or, a0 as Nt, a1 as Un, a2 as sn, a3 as Xt, a4 as Sr, f as ke, R as Ke, a5 as Uo, s as Go, n as Tn, d as ee, a6 as un, a7 as wa, a8 as $a, a9 as Xo, aa as Jr, ab as Di, ac as Qr, ad as se, i as Sa, m as Jn, k as Ia, ae as zi, af as Li, ag as Zo, ah as xa, ai as sr, aj as ji, p as Bi, K as wt, ak as Yo, al as mn, am as Jo, an as Qo, ao as es, ap as Ha, aq as Wa, ar as ts, o as Hi, as as Ka, at as ns, au as rs, av as as, B as ea, v as $n, w as is } from "./button-868752f1.mjs";
var os = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "ellipsis", theme: "outlined" };
const ss = os;
var ls = function(n, e) {
return /* @__PURE__ */ s.createElement(tr, ue({}, n, {
ref: e,
icon: ss
}));
}, us = /* @__PURE__ */ s.forwardRef(ls);
const Wi = us;
var cs = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, name: "left", theme: "outlined" };
const ds = cs;
var fs = function(n, e) {
return /* @__PURE__ */ s.createElement(tr, ue({}, n, {
ref: e,
icon: ds
}));
}, ms = /* @__PURE__ */ s.forwardRef(fs);
const vs = ms;
var gs = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z" } }] }, name: "reload", theme: "outlined" };
const hs = gs;
var ps = function(n, e) {
return /* @__PURE__ */ s.createElement(tr, ue({}, n, {
ref: e,
icon: hs
}));
}, ys = /* @__PURE__ */ s.forwardRef(ps);
const bs = ys;
var Cs = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, name: "right", theme: "outlined" };
const ws = Cs;
var $s = function(n, e) {
return /* @__PURE__ */ s.createElement(tr, ue({}, n, {
ref: e,
icon: ws
}));
}, Ss = /* @__PURE__ */ s.forwardRef($s);
const Is = Ss;
var xs = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z" } }] }, name: "stop", theme: "outlined" };
const Ps = xs;
var Es = function(n, e) {
return /* @__PURE__ */ s.createElement(tr, ue({}, n, {
ref: e,
icon: Ps
}));
}, Os = /* @__PURE__ */ s.forwardRef(Es);
const Rs = Os;
var ta = /* @__PURE__ */ s.createContext(null);
function Ms(t) {
var n = t.children, e = t.onBatchResize, r = s.useRef(0), a = s.useRef([]), i = s.useContext(ta), o = s.useCallback(function(l, u, c) {
r.current += 1;
var d = r.current;
a.current.push({
size: l,
element: u,
data: c
}), Promise.resolve().then(function() {
d === r.current && (e == null || e(a.current), a.current = []);
}), i == null || i(l, u, c);
}, [e, i]);
return /* @__PURE__ */ s.createElement(ta.Provider, {
value: o
}, n);
}
var Ki = function() {
if (typeof Map != "undefined")
return Map;
function t(n, e) {
var r = -1;
return n.some(function(a, i) {
return a[0] === e ? (r = i, !0) : !1;
}), r;
}
return (
/** @class */
function() {
function n() {
this.__entries__ = [];
}
return Object.defineProperty(n.prototype, "size", {
/**
* @returns {boolean}
*/
get: function() {
return this.__entries__.length;
},
enumerable: !0,
configurable: !0
}), n.prototype.get = function(e) {
var r = t(this.__entries__, e), a = this.__entries__[r];
return a && a[1];
}, n.prototype.set = function(e, r) {
var a = t(this.__entries__, e);
~a ? this.__entries__[a][1] = r : this.__entries__.push([e, r]);
}, n.prototype.delete = function(e) {
var r = this.__entries__, a = t(r, e);
~a && r.splice(a, 1);
}, n.prototype.has = function(e) {
return !!~t(this.__entries__, e);
}, n.prototype.clear = function() {
this.__entries__.splice(0);
}, n.prototype.forEach = function(e, r) {
r === void 0 && (r = null);
for (var a = 0, i = this.__entries__; a < i.length; a++) {
var o = i[a];
e.call(r, o[1], o[0]);
}
}, n;
}()
);
}(), na = typeof window != "undefined" && typeof document != "undefined" && window.document === document, Ir = function() {
return typeof global != "undefined" && global.Math === Math ? global : typeof self != "undefined" && self.Math === Math ? self : typeof window != "undefined" && window.Math === Math ? window : Function("return this")();
}(), Fs = function() {
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Ir) : function(t) {
return setTimeout(function() {
return t(Date.now());
}, 1e3 / 60);
};
}(), Ns = 2;
function _s(t, n) {
var e = !1, r = !1, a = 0;
function i() {
e && (e = !1, t()), r && l();
}
function o() {
Fs(i);
}
function l() {
var u = Date.now();
if (e) {
if (u - a < Ns)
return;
r = !0;
} else
e = !0, r = !1, setTimeout(o, n);
a = u;
}
return l;
}
var Ts = 20, ks = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], As = typeof MutationObserver != "undefined", Vs = (
/** @class */
function() {
function t() {
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = _s(this.refresh.bind(this), Ts);
}
return t.prototype.addObserver = function(n) {
~this.observers_.indexOf(n) || this.observers_.push(n), this.connected_ || this.connect_();
}, t.prototype.removeObserver = function(n) {
var e = this.observers_, r = e.indexOf(n);
~r && e.splice(r, 1), !e.length && this.connected_ && this.disconnect_();
}, t.prototype.refresh = function() {
var n = this.updateObservers_();
n && this.refresh();
}, t.prototype.updateObservers_ = function() {
var n = this.observers_.filter(function(e) {
return e.gatherActive(), e.hasActive();
});
return n.forEach(function(e) {
return e.broadcastActive();
}), n.length > 0;
}, t.prototype.connect_ = function() {
!na || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), As ? (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() {
!na || !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(n) {
var e = n.propertyName, r = e === void 0 ? "" : e, a = ks.some(function(i) {
return !!~r.indexOf(i);
});
a && this.refresh();
}, t.getInstance = function() {
return this.instance_ || (this.instance_ = new t()), this.instance_;
}, t.instance_ = null, t;
}()
), qi = function(t, n) {
for (var e = 0, r = Object.keys(n); e < r.length; e++) {
var a = r[e];
Object.defineProperty(t, a, {
value: n[a],
enumerable: !1,
writable: !1,
configurable: !0
});
}
return t;
}, Nn = function(t) {
var n = t && t.ownerDocument && t.ownerDocument.defaultView;
return n || Ir;
}, Ui = Tr(0, 0, 0, 0);
function xr(t) {
return parseFloat(t) || 0;
}
function qa(t) {
for (var n = [], e = 1; e < arguments.length; e++)
n[e - 1] = arguments[e];
return n.reduce(function(r, a) {
var i = t["border-" + a + "-width"];
return r + xr(i);
}, 0);
}
function Ds(t) {
for (var n = ["top", "right", "bottom", "left"], e = {}, r = 0, a = n; r < a.length; r++) {
var i = a[r], o = t["padding-" + i];
e[i] = xr(o);
}
return e;
}
function zs(t) {
var n = t.getBBox();
return Tr(0, 0, n.width, n.height);
}
function Ls(t) {
var n = t.clientWidth, e = t.clientHeight;
if (!n && !e)
return Ui;
var r = Nn(t).getComputedStyle(t), a = Ds(r), i = a.left + a.right, o = a.top + a.bottom, l = xr(r.width), u = xr(r.height);
if (r.boxSizing === "border-box" && (Math.round(l + i) !== n && (l -= qa(r, "left", "right") + i), Math.round(u + o) !== e && (u -= qa(r, "top", "bottom") + o)), !Bs(t)) {
var c = Math.round(l + i) - n, d = Math.round(u + o) - e;
Math.abs(c) !== 1 && (l -= c), Math.abs(d) !== 1 && (u -= d);
}
return Tr(a.left, a.top, l, u);
}
var js = function() {
return typeof SVGGraphicsElement != "undefined" ? function(t) {
return t instanceof Nn(t).SVGGraphicsElement;
} : function(t) {
return t instanceof Nn(t).SVGElement && typeof t.getBBox == "function";
};
}();
function Bs(t) {
return t === Nn(t).document.documentElement;
}
function Hs(t) {
return na ? js(t) ? zs(t) : Ls(t) : Ui;
}
function Ws(t) {
var n = t.x, e = t.y, r = t.width, a = t.height, i = typeof DOMRectReadOnly != "undefined" ? DOMRectReadOnly : Object, o = Object.create(i.prototype);
return qi(o, {
x: n,
y: e,
width: r,
height: a,
top: e,
right: n + r,
bottom: a + e,
left: n
}), o;
}
function Tr(t, n, e, r) {
return { x: t, y: n, width: e, height: r };
}
var Ks = (
/** @class */
function() {
function t(n) {
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = Tr(0, 0, 0, 0), this.target = n;
}
return t.prototype.isActive = function() {
var n = Hs(this.target);
return this.contentRect_ = n, n.width !== this.broadcastWidth || n.height !== this.broadcastHeight;
}, t.prototype.broadcastRect = function() {
var n = this.contentRect_;
return this.broadcastWidth = n.width, this.broadcastHeight = n.height, n;
}, t;
}()
), qs = (
/** @class */
function() {
function t(n, e) {
var r = Ws(e);
qi(this, { target: n, contentRect: r });
}
return t;
}()
), Us = (
/** @class */
function() {
function t(n, e, r) {
if (this.activeObservations_ = [], this.observations_ = new Ki(), typeof n != "function")
throw new TypeError("The callback provided as parameter 1 is not a function.");
this.callback_ = n, this.controller_ = e, this.callbackCtx_ = r;
}
return t.prototype.observe = function(n) {
if (!arguments.length)
throw new TypeError("1 argument required, but only 0 present.");
if (!(typeof Element == "undefined" || !(Element instanceof Object))) {
if (!(n instanceof Nn(n).Element))
throw new TypeError('parameter 1 is not of type "Element".');
var e = this.observations_;
e.has(n) || (e.set(n, new Ks(n)), this.controller_.addObserver(this), this.controller_.refresh());
}
}, t.prototype.unobserve = function(n) {
if (!arguments.length)
throw new TypeError("1 argument required, but only 0 present.");
if (!(typeof Element == "undefined" || !(Element instanceof Object))) {
if (!(n instanceof Nn(n).Element))
throw new TypeError('parameter 1 is not of type "Element".');
var e = this.observations_;
e.has(n) && (e.delete(n), e.size || this.controller_.removeObserver(this));
}
}, t.prototype.disconnect = function() {
this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
}, t.prototype.gatherActive = function() {
var n = this;
this.clearActive(), this.observations_.forEach(function(e) {
e.isActive() && n.activeObservations_.push(e);
});
}, t.prototype.broadcastActive = function() {
if (this.hasActive()) {
var n = this.callbackCtx_, e = this.activeObservations_.map(function(r) {
return new qs(r.target, r.broadcastRect());
});
this.callback_.call(n, e, n), this.clearActive();
}
}, t.prototype.clearActive = function() {
this.activeObservations_.splice(0);
}, t.prototype.hasActive = function() {
return this.activeObservations_.length > 0;
}, t;
}()
), Gi = typeof WeakMap != "undefined" ? /* @__PURE__ */ new WeakMap() : new Ki(), Xi = (
/** @class */
function() {
function t(n) {
if (!(this instanceof t))
throw new TypeError("Cannot call a class as a function.");
if (!arguments.length)
throw new TypeError("1 argument required, but only 0 present.");
var e = Vs.getInstance(), r = new Us(n, e, this);
Gi.set(this, r);
}
return t;
}()
);
[
"observe",
"unobserve",
"disconnect"
].forEach(function(t) {
Xi.prototype[t] = function() {
var n;
return (n = Gi.get(this))[t].apply(n, arguments);
};
});
var Gs = function() {
return typeof Ir.ResizeObserver != "undefined" ? Ir.ResizeObserver : Xi;
}(), Zt = /* @__PURE__ */ new Map();
function Xs(t) {
t.forEach(function(n) {
var e, r = n.target;
(e = Zt.get(r)) === null || e === void 0 || e.forEach(function(a) {
return a(r);
});
});
}
var Zi = new Gs(Xs);
function Zs(t, n) {
Zt.has(t) || (Zt.set(t, /* @__PURE__ */ new Set()), Zi.observe(t)), Zt.get(t).add(n);
}
function Ys(t, n) {
Zt.has(t) && (Zt.get(t).delete(n), Zt.get(t).size || (Zi.unobserve(t), Zt.delete(t)));
}
var Js = /* @__PURE__ */ function(t) {
Nr(e, t);
var n = _r(e);
function e() {
return dn(this, e), n.apply(this, arguments);
}
return fn(e, [{
key: "render",
value: function() {
return this.props.children;
}
}]), e;
}(s.Component);
function Qs(t, n) {
var e = t.children, r = t.disabled, a = s.useRef(null), i = s.useRef(null), o = s.useContext(ta), l = typeof e == "function", u = l ? e(a) : e, c = s.useRef({
width: -1,
height: -1,
offsetWidth: -1,
offsetHeight: -1
}), d = !l && /* @__PURE__ */ s.isValidElement(u) && nr(u), f = d ? rr(u) : null, v = ar(f, a), y = function() {
var b;
return Hr(a.current) || // Support `nativeElement` format
(a.current && Qe(a.current) === "object" ? Hr((b = a.current) === null || b === void 0 ? void 0 : b.nativeElement) : null) || Hr(i.current);
};
s.useImperativeHandle(n, function() {
return y();
});
var g = s.useRef(t);
g.current = t;
var h = s.useCallback(function(m) {
var b = g.current, p = b.onResize, C = b.data, S = m.getBoundingClientRect(), $ = S.width, w = S.height, E = m.offsetWidth, I = m.offsetHeight, P = Math.floor($), O = Math.floor(w);
if (c.current.width !== P || c.current.height !== O || c.current.offsetWidth !== E || c.current.offsetHeight !== I) {
var R = {
width: P,
height: O,
offsetWidth: E,
offsetHeight: I
};
c.current = R;
var _ = E === Math.round($) ? $ : E, M = I === Math.round(w) ? w : I, N = F(F({}, R), {}, {
offsetWidth: _,
offsetHeight: M
});
o == null || o(N, m, C), p && Promise.resolve().then(function() {
p(N, m);
});
}
}, []);
return s.useEffect(function() {
var m = y();
return m && !r && Zs(m, h), function() {
return Ys(m, h);
};
}, [a.current, r]), /* @__PURE__ */ s.createElement(Js, {
ref: i
}, d ? /* @__PURE__ */ s.cloneElement(u, {
ref: v
}) : u);
}
var el = /* @__PURE__ */ s.forwardRef(Qs), tl = "rc-observer-key";
function nl(t, n) {
var e = t.children, r = typeof e == "function" ? [e] : ir(e);
return r.map(function(a, i) {
var o = (a == null ? void 0 : a.key) || "".concat(tl, "-").concat(i);
return /* @__PURE__ */ s.createElement(el, ue({}, t, {
key: o,
ref: i === 0 ? n : void 0
}), a);
});
}
var lr = /* @__PURE__ */ s.forwardRef(nl);
lr.Collection = Ms;
function Wr(t) {
return t !== void 0;
}
function cn(t, n) {
var e = n || {}, r = e.defaultValue, a = e.value, i = e.onChange, o = e.postState, l = ja(function() {
return Wr(a) ? a : Wr(r) ? typeof r == "function" ? r() : r : typeof t == "function" ? t() : t;
}), u = j(l, 2), c = u[0], d = u[1], f = a !== void 0 ? a : c, v = o ? o(f) : f, y = yt(i), g = ja([f]), h = j(g, 2), m = h[0], b = h[1];
Ba(function() {
var C = m[0];
c !== C && y(c, C);
}, [m]), Ba(function() {
Wr(a) || d(a);
}, [a]);
var p = yt(function(C, S) {
d(C, S), b([f], S);
});
return [v, p];
}
function rl(t, n) {
return wr.reduce((e, r) => {
const a = t[`${r}1`], i = t[`${r}3`], o = t[`${r}6`], l = t[`${r}7`];
return Object.assign(Object.assign({}, e), n(r, {
lightColor: a,
lightBorderColor: i,
darkColor: o,
textColor: l
}));
}, {});
}
const Kr = () => ({
height: 0,
opacity: 0
}), Ua = (t) => {
const {
scrollHeight: n
} = t;
return {
height: n,
opacity: 1
};
}, al = (t) => ({
height: t ? t.offsetHeight : 0
}), qr = (t, n) => (n == null ? void 0 : n.deadline) === !0 || n.propertyName === "height", il = (t = Ho) => ({
motionName: `${t}-motion-collapse`,
onAppearStart: Kr,
onEnterStart: Kr,
onAppearActive: Ua,
onEnterActive: Ua,
onLeaveStart: al,
onLeaveActive: Kr,
onAppearEnd: qr,
onEnterEnd: qr,
onLeaveEnd: qr,
motionDeadline: 500
}), ol = (t, n, e) => e !== void 0 ? e : `${t}-${n}`, sl = il, ll = (t) => ({
[t.componentCls]: {
// For common/openAnimation
[`${t.antCls}-motion-collapse-legacy`]: {
overflow: "hidden",
"&-active": {
transition: `height ${t.motionDurationMid} ${t.motionEaseInOut},
opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`
}
},
[`${t.antCls}-motion-collapse`]: {
overflow: "hidden",
transition: `height ${t.motionDurationMid} ${t.motionEaseInOut},
opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`
}
}
}), ul = ll, cl = (t) => ({
animationDuration: t,
animationFillMode: "both"
}), dl = (t) => ({
animationDuration: t,
animationFillMode: "both"
}), Pa = (t, n, e, r, a = !1) => {
const i = a ? "&" : "";
return {
[`
${i}${t}-enter,
${i}${t}-appear
`]: Object.assign(Object.assign({}, cl(r)), {
animationPlayState: "paused"
}),
[`${i}${t}-leave`]: Object.assign(Object.assign({}, dl(r)), {
animationPlayState: "paused"
}),
[`
${i}${t}-enter${t}-enter-active,
${i}${t}-appear${t}-appear-active
`]: {
animationName: n,
animationPlayState: "running"
},
[`${i}${t}-leave${t}-leave-active`]: {
animationName: e,
animationPlayState: "running",
pointerEvents: "none"
}
};
}, fl = new pe("antMoveDownIn", {
"0%": {
transform: "translate3d(0, 100%, 0)",
transformOrigin: "0 0",
opacity: 0
},
"100%": {
transform: "translate3d(0, 0, 0)",
transformOrigin: "0 0",
opacity: 1
}
}), ml = new pe("antMoveDownOut", {
"0%": {
transform: "translate3d(0, 0, 0)",
transformOrigin: "0 0",
opacity: 1
},
"100%": {
transform: "translate3d(0, 100%, 0)",
transformOrigin: "0 0",
opacity: 0
}
}), vl = new pe("antMoveLeftIn", {
"0%": {
transform: "translate3d(-100%, 0, 0)",
transformOrigin: "0 0",
opacity: 0
},
"100%": {
transform: "translate3d(0, 0, 0)",
transformOrigin: "0 0",
opacity: 1
}
}), gl = new pe("antMoveLeftOut", {
"0%": {
transform: "translate3d(0, 0, 0)",
transformOrigin: "0 0",
opacity: 1
},
"100%": {
transform: "translate3d(-100%, 0, 0)",
transformOrigin: "0 0",
opacity: 0
}
}), hl = new pe("antMoveRightIn", {
"0%": {
transform: "translate3d(100%, 0, 0)",
transformOrigin: "0 0",
opacity: 0
},
"100%": {
transform: "translate3d(0, 0, 0)",
transformOrigin: "0 0",
opacity: 1
}
}), pl = new pe("antMoveRightOut", {
"0%": {
transform: "translate3d(0, 0, 0)",
transformOrigin: "0 0",
opacity: 1
},
"100%": {
transform: "translate3d(100%, 0, 0)",
transformOrigin: "0 0",
opacity: 0
}
}), yl = new pe("antMoveUpIn", {
"0%": {
transform: "translate3d(0, -100%, 0)",
transformOrigin: "0 0",
opacity: 0
},
"100%": {
transform: "translate3d(0, 0, 0)",
transformOrigin: "0 0",
opacity: 1
}
}), bl = new pe("antMoveUpOut", {
"0%": {
transform: "translate3d(0, 0, 0)",
transformOrigin: "0 0",
opacity: 1
},
"100%": {
transform: "translate3d(0, -100%, 0)",
transformOrigin: "0 0",
opacity: 0
}
}), Cl = {
"move-up": {
inKeyframes: yl,
outKeyframes: bl
},
"move-down": {
inKeyframes: fl,
outKeyframes: ml
},
"move-left": {
inKeyframes: vl,
outKeyframes: gl
},
"move-right": {
inKeyframes: hl,
outKeyframes: pl
}
}, Ga = (t, n) => {
const {
antCls: e
} = t, r = `${e}-${n}`, {
inKeyframes: a,
outKeyframes: i
} = Cl[n];
return [Pa(r, a, i, t.motionDurationMid), {
[`
${r}-enter,
${r}-appear
`]: {
opacity: 0,
animationTimingFunction: t.motionEaseOutCirc
},
[`${r}-leave`]: {
animationTimingFunction: t.motionEaseInOutCirc
}
}];
}, Yi = new pe("antSlideUpIn", {
"0%": {
transform: "scaleY(0.8)",
transformOrigin: "0% 0%",
opacity: 0
},
"100%": {
transform: "scaleY(1)",
transformOrigin: "0% 0%",
opacity: 1
}
}), Ji = new pe("antSlideUpOut", {
"0%": {
transform: "scaleY(1)",
transformOrigin: "0% 0%",
opacity: 1
},
"100%": {
transform: "scaleY(0.8)",
transformOrigin: "0% 0%",
opacity: 0
}
}), Qi = new pe("antSlideDownIn", {
"0%": {
transform: "scaleY(0.8)",
transformOrigin: "100% 100%",
opacity: 0
},
"100%": {
transform: "scaleY(1)",
transformOrigin: "100% 100%",
opacity: 1
}
}), eo = new pe("antSlideDownOut", {
"0%": {
transform: "scaleY(1)",
transformOrigin: "100% 100%",
opacity: 1
},
"100%": {
transform: "scaleY(0.8)",
transformOrigin: "100% 100%",
opacity: 0
}
}), wl = new pe("antSlideLeftIn", {
"0%": {
transform: "scaleX(0.8)",
transformOrigin: "0% 0%",
opacity: 0
},
"100%": {
transform: "scaleX(1)",
transformOrigin: "0% 0%",
opacity: 1
}
}), $l = new pe("antSlideLeftOut", {
"0%": {
transform: "scaleX(1)",
transformOrigin: "0% 0%",
opacity: 1
},
"100%": {
transform: "scaleX(0.8)",
transformOrigin: "0% 0%",
opacity: 0
}
}), Sl = new pe("antSlideRightIn", {
"0%": {
transform: "scaleX(0.8)",
transformOrigin: "100% 0%",
opacity: 0
},
"100%": {
transform: "scaleX(1)",
transformOrigin: "100% 0%",
opacity: 1
}
}), Il = new pe("antSlideRightOut", {
"0%": {
transform: "scaleX(1)",
transformOrigin: "100% 0%",
opacity: 1
},
"100%": {
transform: "scaleX(0.8)",
transformOrigin: "100% 0%",
opacity: 0
}
}), xl = {
"slide-up": {
inKeyframes: Yi,
outKeyframes: Ji
},
"slide-down": {
inKeyframes: Qi,
outKeyframes: eo
},
"slide-left": {
inKeyframes: wl,
outKeyframes: $l
},
"slide-right": {
inKeyframes: Sl,
outKeyframes: Il
}
}, Pr = (t, n) => {
const {
antCls: e
} = t, r = `${e}-${n}`, {
inKeyframes: a,
outKeyframes: i
} = xl[n];
return [Pa(r, a, i, t.motionDurationMid), {
[`
${r}-enter,
${r}-appear
`]: {
transform: "scale(0)",
transformOrigin: "0% 0%",
opacity: 0,
animationTimingFunction: t.motionEaseOutQuint,
"&-prepare": {
transform: "scale(1)"
}
},
[`${r}-leave`]: {
animationTimingFunction: t.motionEaseInQuint
}
}];
}, Pl = new pe("antZoomIn", {
"0%": {
transform: "scale(0.2)",
opacity: 0
},
"100%": {
transform: "scale(1)",
opacity: 1
}
}), El = new pe("antZoomOut", {
"0%": {
transform: "scale(1)"
},
"100%": {
transform: "scale(0.2)",
opacity: 0
}
}), Xa = new pe("antZoomBigIn", {
"0%": {
transform: "scale(0.8)",
opacity: 0
},
"100%": {
transform: "scale(1)",
opacity: 1
}
}), Za = new pe("antZoomBigOut", {
"0%": {
transform: "scale(1)"
},
"100%": {
transform: "scale(0.8)",
opacity: 0
}
}), Ol = new pe("antZoomUpIn", {
"0%": {
transform: "scale(0.8)",
transformOrigin: "50% 0%",
opacity: 0
},
"100%": {
transform: "scale(1)",
transformOrigin: "50% 0%"
}
}), Rl = new pe("antZoomUpOut", {
"0%": {
transform: "scale(1)",
transformOrigin: "50% 0%"
},
"100%": {
transform: "scale(0.8)",
transformOrigin: "50% 0%",
opacity: 0
}
}), Ml = new pe("antZoomLeftIn", {
"0%": {
transform: "scale(0.8)",
transformOrigin: "0% 50%",
opacity: 0
},
"100%": {
transform: "scale(1)",
transformOrigin: "0% 50%"
}
}), Fl = new pe("antZoomLeftOut", {
"0%": {
transform: "scale(1)",
transformOrigin: "0% 50%"
},
"100%": {
transform: "scale(0.8)",
transformOrigin: "0% 50%",
opacity: 0
}
}), Nl = new pe("antZoomRightIn", {
"0%": {
transform: "scale(0.8)",
transformOrigin: "100% 50%",
opacity: 0
},
"100%": {
transform: "scale(1)",
transformOrigin: "100% 50%"
}
}), _l = new pe("antZoomRightOut", {
"0%": {
transform: "scale(1)",
transformOrigin: "100% 50%"
},
"100%": {
transform: "scale(0.8)",
transformOrigin: "100% 50%",
opacity: 0
}
}), Tl = new pe("antZoomDownIn", {
"0%": {
transform: "scale(0.8)",
transformOrigin: "50% 100%",
opacity: 0
},
"100%": {
transform: "scale(1)",
transformOrigin: "50% 100%"
}
}), kl = new pe("antZoomDownOut", {
"0%": {
transform: "scale(1)",
transformOrigin: "50% 100%"
},
"100%": {
transform: "scale(0.8)",
transformOrigin: "50% 100%",
opacity: 0
}
}), Al = {
zoom: {
inKeyframes: Pl,
outKeyframes: El
},
"zoom-big": {
inKeyframes: Xa,
outKeyframes: Za
},
"zoom-big-fast": {
inKeyframes: Xa,
outKeyframes: Za
},
"zoom-left": {
inKeyframes: Ml,
outKeyframes: Fl
},
"zoom-right": {
inKeyframes: Nl,
outKeyframes: _l
},
"zoom-up": {
inKeyframes: Ol,
outKeyframes: Rl
},
"zoom-down": {
inKeyframes: Tl,
outKeyframes: kl
}
}, Ea = (t, n) => {
const {
antCls: e
} = t, r = `${e}-${n}`, {
inKeyframes: a,
outKeyframes: i
} = Al[n];
return [Pa(r, a, i, n === "zoom-big-fast" ? t.motionDurationFast : t.motionDurationMid), {
[`
${r}-enter,
${r}-appear
`]: {
transform: "scale(0)",
opacity: 0,
animationTimingFunction: t.motionEaseOutCirc,
"&-prepare": {
transform: "none"
}
},
[`${r}-leave`]: {
animationTimingFunction: t.motionEaseInOutCirc
}
}];
};
var to = /* @__PURE__ */ s.createContext(null), Ya = [];
function Vl(t, n) {
var e = s.useState(function() {
if (!$r())
return null;
var g = document.createElement("div");
return g;
}), r = j(e, 1), a = r[0], i = s.useRef(!1), o = s.useContext(to), l = s.useState(Ya), u = j(l, 2), c = u[0], d = u[1], f = o || (i.current ? void 0 : function(g) {
d(function(h) {
var m = [g].concat(K(h));
return m;
});
});
function v() {
a.parentElement || document.body.appendChild(a), i.current = !0;
}
function y() {
var g;
(g = a.parentElement) === null || g === void 0 || g.removeChild(a), i.current = !1;
}
return st(function() {
return t ? o ? o(v) : v() : y(), y;
}, [t]), st(function() {
c.length && (c.forEach(function(g) {
return g();
}), d(Ya));
}, [c]), [a, f];
}
function Dl(t) {
var n = "rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)), e = document.createElement("div");
e.id = n;
var r = e.style;
r.position = "absolute", r.left = "0", r.top = "0", r.width = "100px", r.height = "100px", r.overflow = "scroll";
var a, i;
if (t) {
var o = getComputedStyle(t);
r.scrollbarColor = o.scrollbarColor, r.scrollbarWidth = o.scrollbarWidth;
var l = getComputedStyle(t, "::-webkit-scrollbar"), u = parseInt(l.width, 10), c = parseInt(l.height, 10);
try {
var d = u ? "width: ".concat(l.width, ";") : "", f = c ? "height: ".concat(l.height, ";") : "";
Ai(`
#`.concat(n, `::-webkit-scrollbar {
`).concat(d, `
`).concat(f, `
}`), n);
} catch (g) {
console.error(g), a = u, i = c;
}
}
document.body.appendChild(e);
var v = t && a && !isNaN(a) ? a : e.offsetWidth - e.clientWidth, y = t && i && !isNaN(i) ? i : e.offsetHeight - e.clientHeight;
return document.body.removeChild(e), Yr(n), {
width: v,
height: y
};
}
function zl(t) {
return typeof document == "undefined" || !t || !(t instanceof Element) ? {
width: 0,
height: 0
} : Dl(t);
}
function Ll() {
return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
}
var jl = "rc-util-locker-".concat(Date.now()), Ja = 0;
function Bl(t) {
var n = !!t, e = s.useState(function() {
return Ja += 1, "".concat(jl, "_").concat(Ja);
}), r = j(e, 1), a = r[0];
st(function() {
if (n) {
var i = zl(document.body).width, o = Ll();
Ai(`
html body {
overflow-y: hidden;
`.concat(o ? "width: calc(100% - ".concat(i, "px);") : "", `
}`), a);
} else
Yr(a);
return function() {
Yr(a);
};
}, [n, a]);
}
var Qa = !1;
function Hl(t) {
return typeof t == "boolean" && (Qa = t), Qa;
}
var ei = function(n) {
return n === !1 ? !1 : !$r() || !n ? null : typeof n == "string" ? document.querySelector(n) : typeof n == "function" ? n() : n;
}, no = /* @__PURE__ */ s.forwardRef(function(t, n) {
var e = t.open, r = t.autoLock, a = t.getContainer;
t.debug;
var i = t.autoDestroy, o = i === void 0 ? !0 : i, l = t.children, u = s.useState(e), c = j(u, 2), d = c[0], f = c[1], v = d || e;
s.useEffect(function() {
(o || e) && f(e);
}, [e, o]);
var y = s.useState(function() {
return ei(a);
}), g = j(y, 2), h = g[0], m = g[1];
s.useEffect(function() {
var R = ei(a);
m(R != null ? R : null);
});
var b = Vl(v && !h), p = j(b, 2), C = p[0], S = p[1], $ = h != null ? h : C;
Bl(r && e && $r() && ($ === C || $ === document.body));
var w = null;
if (l && nr(l) && n) {
var E = l;
w = E.ref;
}
var I = ar(w, n);
if (!v || !$r() || h === void 0)
return null;
var P = $ === !1 || Hl(), O = l;
return n && (O = /* @__PURE__ */ s.cloneElement(l, {
ref: I
})), /* @__PURE__ */ s.createElement(to.Provider, {
value: S
}, P ? O : /* @__PURE__ */ Ca.createPortal(O, $));
});
function Wl() {
var t = F({}, Wo);
return t.useId;
}
var ti = 0, ni = Wl();
const ro = ni ? (
// Use React `useId`
function(n) {
var e = ni();
return n || e;
}
) : (
// Use compatible of `useId`
function(n) {
var e = s.useState("ssr-id"), r = j(e, 2), a = r[0], i = r[1];
return s.useEffect(function() {
var o = ti;
ti += 1, i("rc_unique_".concat(o));
}, []), n || a;
}
);
var ln = "RC_FORM_INTERNAL_HOOKS", he = function() {
Ft(!1, "Can not find FormContext. Please make sure you wrap Field under Form.");
}, _n = /* @__PURE__ */ s.createContext({
getFieldValue: he,
getFieldsValue: he,
getFieldError: he,
getFieldWarning: he,
getFieldsError: he,
isFieldsTouched: he,
isFieldTouched: he,
isFieldValidating: he,
isFieldsValidating: he,
resetFields: he,
setFields: he,
setFieldValue: he,
setFieldsValue: he,
validateFields: he,
submit: he,
getInternalHooks: function() {
return he(), {
dispatch: he,
initEntityValue: he,
registerField: he,
useSubscribe: he,
setInitialValues: he,
destroyForm: he,
setCallbacks: he,
registerWatch: he,
getFields: he,
setValidateMessages: he,
setPreserve: he,
getInitialValue: he
};
}
}), Er = /* @__PURE__ */ s.createContext(null);
function ra(t) {
return t == null ? [] : Array.isArray(t) ? t : [t];
}
function Kl(t) {
return t && !!t._init;
}
function aa() {
return {
default: "Validation error on field %s",
required: "%s is required",
enum: "%s must be one of %s",
whitespace: "%s cannot be empty",
date: {
format: "%s date %s is invalid for format %s",
parse: "%s date could not be parsed, %s is invalid ",
invalid: "%s date %s is invalid"
},
types: {
string: "%s is not a %s",
method: "%s is not a %s (function)",
array: "%s is not an %s",
object: "%s is not an %s",
number: "%s is not a %s",
date: "%s is not a %s",
boolean: "%s is not a %s",
integer: "%s is not an %s",
float: "%s is not a %s",
regexp: "%s is not a valid %s",
email: "%s is not a valid %s",
url: "%s is not a valid %s",
hex: "%s is not a valid %s"
},
string: {
len: "%s must be exactly %s characters",
min: "%s must be at least %s characters",
max: "%s cannot be longer than %s characters",
range: "%s must be between %s and %s characters"
},
number: {
len: "%s must equal %s",
min: "%s cannot be less than %s",
max: "%s cannot be greater than %s",
range: "%s must be between %s and %s"
},
array: {
len: "%s must be exactly %s in length",
min: "%s cannot be less than %s in length",
max: "%s cannot be greater than %s in length",
range: "%s must be between %s and %s in length"
},
pattern: {
mismatch: "%s value %s does not match pattern %s"
},
clone: function() {
var n = JSON.parse(JSON.stringify(this));
return n.clone = this.clone, n;
}
};
}
var ia = aa();
function ql(t) {
try {
return Function.toString.call(t).indexOf("[native code]") !== -1;
} catch (n) {
return typeof t == "function";
}
}
function Ul(t, n, e) {
if (Ko())
return Reflect.construct.apply(null, arguments);
var r = [null];
r.push.apply(r, n);
var a = new (t.bind.apply(t, r))();
return e && Vi(a, e.prototype), a;
}
function oa(t) {
var n = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
return oa = function(r) {
if (r === null || !ql(r))
return r;
if (typeof r != "function")
throw new TypeError("Super expression must either be null or a function");
if (n !== void 0) {
if (n.has(r))
return n.get(r);
n.set(r, a);
}
function a() {
return Ul(r, arguments, qo(this).constructor);
}
return a.prototype = Object.create(r.prototype, {
constructor: {
value: a,
enumerable: !1,
writable: !0,
configurable: !0
}
}), Vi(a, r);
}, oa(t);
}
var Gl = /%[sdj%]/g, Xl = function() {
};
typeof process != "undefined" && process.env;
function sa(t) {
if (!t || !t.length)
return null;
var n = {};
return t.forEach(function(e) {
var r = e.field;
n[r] = n[r] || [], n[r].push(e);
}), n;
}
function dt(t) {
for (var n = arguments.length, e = new Array(n > 1 ? n - 1 : 0), r = 1; r < n; r++)
e[r - 1] = arguments[r];
var a = 0, i = e.length;
if (typeof t == "function")
return t.apply(null, e);
if (typeof t == "string") {
var o = t.replace(Gl, function(l) {
if (l === "%%")
return "%";
if (a >= i)
return l;
switch (l) {
case "%s":
return String(e[a++]);
case "%d":
return Number(e[a++]);
case "%j":
try {
return JSON.stringify(e[a++]);
} catch (u) {
return "[Circular]";
}
break;
default:
return l;
}
});
return o;
}
return t;
}
function Zl(t) {
return t === "string" || t === "url" || t === "hex" || t === "email" || t === "date" || t === "pattern";
}
function Be(t, n) {
return !!(t == null || n === "array" && Array.isArray(t) && !t.length || Zl(n) && typeof t == "string" && !t);
}
function Yl(t, n, e) {
var r = [], a = 0, i = t.length;
function o(l) {
r.push.apply(r, K(l || [])), a++, a === i && e(r);
}
t.forEach(function(l) {
n(l, o);
});
}
function ri(t, n, e) {
var r = 0, a = t.length;
function i(o) {
if (o && o.length) {
e(o);
return;
}
var l = r;
r = r + 1, l < a ? n(t[l], i) : e([]);
}
i([]);
}
function Jl(t) {
var n = [];
return Object.keys(t).forEach(function(e) {
n.push.apply(n, K(t[e] || []));
}), n;
}
var ai = /* @__PURE__ */ function(t) {
Nr(e, t);
var n = _r(e);
function e(r, a) {
var i;
return dn(this, e), i = n.call(this, "Async Validation Error"), x(me(i), "errors", void 0), x(me(i), "fields", void 0), i.errors = r, i.fields = a, i;
}
return fn(e);
}(/* @__PURE__ */ oa(Error));
function Ql(t, n, e, r, a) {
if (n.first) {
var i = new Promise(function(v, y) {
var g = function(b) {
return r(b), b.length ? y(new ai(b, sa(b))) : v(a);
}, h = Jl(t);
ri(h, e, g);
});
return i.catch(function(v) {
return v;
}), i;
}
var o = n.firstFields === !0 ? Object.keys(t) : n.firstFields || [], l = Object.keys(t), u = l.length, c = 0, d = [], f = new Promise(function(v, y) {
var g = function(m) {
if (d.push.apply(d, m), c++, c === u)
return r(d), d.length ? y(new ai(d, sa(d))) : v(a);
};
l.length || (r(d), v(a)), l.forEach(function(h) {
var m = t[h];
o.indexOf(h) !== -1 ? ri(m, e, g) : Yl(m, e, g);
});
});
return f.catch(function(v) {
return v;
}), f;
}
function eu(t) {
return !!(t && t.message !== void 0);
}
function tu(t, n) {
for (var e = t, r = 0; r < n.length; r++) {
if (e == null)
return e;
e = e[n[r]];
}
return e;
}
function ii(t, n) {
return function(e) {
var r;
return t.fullFields ? r = tu(n, t.fullFields) : r = n[e.field || t.fullField], eu(e) ? (e.field = e.field || t.fullField, e.fieldValue = r, e) : {
message: typeof e == "function" ? e() : e,
fieldValue: r,
field: e.field || t.fullField
};
};
}
function oi(t, n) {
if (n) {
for (var e in n)
if (n.hasOwnProperty(e)) {
var r = n[e];
Qe(r) === "object" && Qe(t[e]) === "object" ? t[e] = F(F({}, t[e]), r) : t[e] = r;
}
}
return t;
}
var Sn = "enum", nu = function(n, e, r, a, i) {
n[Sn] = Array.isArray(n[Sn]) ? n[Sn] : [], n[Sn].indexOf(e) === -1 && a.push(dt(i.messages[Sn], n.fullField, n[Sn].join(", ")));
}, ru = function(n, e, r, a, i) {
if (n.pattern) {
if (n.pattern instanceof RegExp)
n.pattern.lastIndex = 0, n.pattern.test(e) || a.push(dt(i.messages.pattern.mismatch, n.fullField, e, n.pattern));
else if (typeof n.pattern == "string") {
var o = new RegExp(n.pattern);
o.test(e) || a.push(dt(i.messages.pattern.mismatch, n.fullField, e, n.pattern));
}
}
}, au = function(n, e, r, a, i) {
var o = typeof n.len == "number", l = typeof n.min == "number", u = typeof n.max == "number", c = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, d = e, f = null, v = typeof e == "number", y = typeof e == "string", g = Array.isArray(e);
if (v ? f = "number" : y ? f = "string" : g && (f = "array"), !f)
return !1;
g && (d = e.length), y && (d = e.replace(c, "_").length), o ? d !== n.len && a.push(dt(i.messages[f].len, n.fullField, n.len)) : l && !u && d < n.min ? a.push(dt(i.messages[f].min, n.fullField, n.min)) : u && !l && d > n.max ? a.push(dt(i.messages[f].max, n.fullField, n.max)) : l && u && (d < n.min || d > n.max) && a.push(dt(i.messages[f].range, n.fullField, n.min, n.max));
}, ao = function(n, e, r, a, i, o) {
n.required && (!r.hasOwnProperty(n.field) || Be(e, o || n.type)) && a.push(dt(i.messages.required, n.fullField));
}, pr;
const iu = function() {
if (pr)
return pr;
var t = "[a-fA-F\\d:]", n = function(w) {
return w && w.includeBoundaries ? "(?:(?<=\\s|^)(?=".concat(t, ")|(?<=").concat(t, ")(?=\\s|$))") : "";
}, e = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", r = "[a-fA-F\\d]{1,4}", a = [
"(?:".concat(r, ":){7}(?:").concat(r, "|:)"),
// 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
"(?:".concat(r, ":){6}(?:").concat(e, "|:").concat(r, "|:)"),
// 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::
"(?:".concat(r, ":){5}(?::").concat(e, "|(?::").concat(r, "){1,2}|:)"),
// 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::
"(?:".concat(r, ":){4}(?:(?::").concat(r, "){0,1}:").concat(e, "|(?::").concat(r, "){1,3}|:)"),
// 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::
"(?:".concat(r, ":){3}(?:(?::").concat(r, "){0,2}:").concat(e, "|(?::").concat(r, "){1,4}|:)"),
// 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::
"(?:".concat(r, ":){2}(?:(?::").concat(r, "){0,3}:").concat(e, "|(?::").concat(r, "){1,5}|:)"),
// 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::
"(?:".concat(r, ":){1}(?:(?::").concat(r, "){0,4}:").concat(e, "|(?::").concat(r, "){1,6}|:)"),
// 1:: 1::3:4:5:6:7:8 1::8 1::
"(?::(?:(?::".concat(r, "){0,5}:").concat(e, "|(?::").concat(r, "){1,7}|:))")
// ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::
], i = "(?:%[0-9a-zA-Z]{1,})?", o = "(?:".concat(a.join("|"), ")").concat(i), l = new RegExp("(?:^".concat(e, "$)|(?:^").concat(o, "$)")), u = new RegExp("^".concat(e, "$")), c = new RegExp("^".concat(o, "$")), d = function(w) {
return w && w.exact ? l : new RegExp("(?:".concat(n(w)).concat(e).concat(n(w), ")|(?:").concat(n(w)).concat(o).concat(n(w), ")"), "g");
};
d.v4 = function($) {
return $ && $.exact ? u : new RegExp("".concat(n($)).concat(e).concat(n($)), "g");
}, d.v6 = function($) {
return $ && $.exact ? c : new RegExp("".concat(n($)).concat(o).concat(n($)), "g");
};
var f = "(?:(?:[a-z]+:)?//)", v = "(?:\\S+(?::\\S*)?@)?", y = d.v4().source, g = d.v6().source, h = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", m = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", b = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", p = "(?::\\d{2,5})?", C = '(?:[/?#][^\\s"]*)?', S = "(?:".concat(f, "|www\\.)").concat(v, "(?:localhost|").concat(y, "|").concat(g, "|").concat(h).concat(m).concat(b, ")").concat(p).concat(C);
return pr = new RegExp("(?:^".concat(S, "$)"), "i"), pr;
};
var si = {
// http://emailregex.com/
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
// url: new RegExp(
// '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
// 'i',
// ),
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
}, Gn = {
integer: function(n) {
return Gn.number(n) && parseInt(n, 10) === n;
},
float: function(n) {
return Gn.number(n) && !Gn.integer(n);
},
array: function(n) {
return Array.isArray(n);
},
regexp: function(n) {
if (n instanceof RegExp)
return !0;
try {
return !!new RegExp(n);
} catch (e) {
return !1;
}
},
date: function(n) {
return typeof n.getTime == "function" && typeof n.getMonth == "function" && typeof n.getYear == "function" && !isNaN(n.getTime());
},
number: function(n) {
return isNaN(n) ? !1 : typeof n == "number";
},
object: function(n) {
return Qe(n) === "object" && !Gn.array(n);
},
method: function(n) {
return typeof n == "function";
},
email: function(n) {
return typeof n == "string" && n.length <= 320 && !!n.match(si.email);
},
url: function(n) {
return typeof n == "string" && n.length <= 2048 && !!n.match(iu());
},
hex: function(n) {
return typeof n == "string" && !!n.match(si.hex);
}
}, ou = function(n, e, r, a, i) {
if (n.required && e === void 0) {
ao(n, e, r, a, i);
return;
}
var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], l = n.type;
o.indexOf(l) > -1 ? Gn[l](e) || a.push(dt(i.messages.types[l], n.fullField, n.type)) : l && Qe(e) !== n.type && a.push(dt(i.messages.types[l], n.fullField, n.type));
}, su = function(n, e, r, a, i) {
(/^\s+$/.test(e) || e === "") && a.push(dt(i.messages.whitespace, n.fullField));
};
const oe = {
required: ao,
whitespace: su,
type: ou,
range: au,
enum: nu,
pattern: ru
};
var lu = function(n, e, r, a, i) {
var o = [], l = n.required || !n.required && a.hasOwnProperty(n.field);
if (l) {
if (Be(e) && !n.required)
return r();
oe.required(n, e, a, o, i);
}
r(o);
}, uu = function(n, e, r, a, i) {
var o = [], l = n.required || !n.required && a.hasOwnProperty(n.field);
if (l) {
if (e == null && !n.required)
return r();
oe.required(n, e, a, o, i, "array"), e != null && (oe.type(n, e, a, o, i), oe.range(n, e, a, o, i));
}
r(o);
}, cu = function(n, e, r, a, i) {
var o = [], l = n.required || !n.required && a.hasOwnProperty(n.field);
if (l) {
if (Be(e) && !n.required)
return r();
oe.required(n, e, a, o, i), e !== void 0 && oe.type(n, e, a, o, i);
}
r(o);
}, du = function(n, e, r, a, i) {
var o = [], l = n.required || !n.required && a.hasOwnProperty(n.field);
if (l) {
if (Be(e, "date") && !n.required)
return r();
if (oe.required(n, e, a, o, i), !Be(e, "date")) {
var u;
e instanceof Date ? u = e : u = new Date(e), oe.type(n, u, a, o, i), u && oe.range(n, u.getTime(), a, o, i);
}
}
r(o);
}, fu = "enum", mu = function(n, e, r, a, i) {
var o = [], l = n.required || !n.required && a.hasOwnProperty(n.field);
if (l) {
if (Be(e) && !n.required)
return r();
oe.required(n, e, a, o, i), e !== void 0 && oe[fu](n, e, a, o, i);
}
r(o);
}, vu = function(n, e, r, a, i) {
var o = [], l = n.required || !n.required && a.hasOwnProperty(n.field);
if (l) {
if (Be(e) && !n.required)
return r();
oe.required(n, e, a, o, i), e !== void 0 && (oe.type(n, e, a, o, i), oe.range(n, e, a, o, i));
}
r(o);
}, gu = function(n, e, r, a, i) {
var o = [], l = n.required || !n.required && a.hasOwnProperty(n.field);
if (l) {
if (Be(e) && !n.required)
return r();
oe.required(n, e, a, o, i), e !== void 0 && (oe.type(n, e, a, o, i), oe.range(n, e, a, o, i));
}
r(o);
}, hu = function(n, e, r, a, i) {
var o = [], l = n.required || !n.required && a.hasOwnProperty(n.field);
if (l) {
if (Be(e) && !n.required)
return r();
oe.required(n, e, a, o, i), e !== void 0 && oe.type(n, e, a, o, i);
}
r(o);
}, pu = function(n, e, r, a, i) {
var o = [], l = n.required || !n.required && a.hasOwnProperty(n.field);
if (l) {
if (e === "" && (e = void 0), Be(e) && !n.required)
return r();
oe.required(n, e, a, o, i), e !== void 0 && (oe.type(n, e, a, o, i), oe.range(n, e, a, o, i));
}
r(o);
}, yu = function(n, e, r, a, i) {
var o = [], l = n.required || !n.required && a.hasOwnProperty(n.