openapi-ui-dist
Version:
<h1 align="center"> OpenAPI UI </h1> <p align="center"> OpenAPI/Swagger UI document, quickly generate mock params and call api, also simplified postman tool </p> <p align="center"> <a href="https://github.com/rookie-luochao/openapi-ui/blob/master/LICE
1,332 lines • 5.35 MB
JavaScript
var pJ = Object.defineProperty;
var bJ = (n, e, t) => e in n ? pJ(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
var Ln = (n, e, t) => bJ(n, typeof e != "symbol" ? e + "" : e, t);
import { r as _, d as pt, W as ws, v as Xs, b as Te, K as Fi, aH as yJ, f as je, c as WX, aI as hc, e as Ye, _ as Zt, a as wo, k as JI, aJ as CJ, g as Bi, l as vJ, aK as ar, j as Co, w as Cs, p as PF, o as XF, aL as wJ, P as Ss, x as cw, u as SJ, q as Ly, aM as ZX, t as FJ, U as UI, T as sc, G as ig, H as Pr, y as br, aN as BF, M as qa, F as hp, D as ot, N as RX, aO as VX, I as Sc, aP as GX, aQ as AX, aR as Pk, a0 as jI, Q as xy, aS as OF, aT as HF, aU as ky, O as QI, aV as PX, Y as $I, J as _J, z as Xk, aW as mc, aX as lu, aY as LJ, aZ as xJ, h as kJ, E as XX, a_ as DJ, a$ as TJ, a1 as ca, b0 as BX, B as OX, b1 as Bk, b2 as Ok, b3 as NJ, m as HX, n as zX, b4 as Fr, b5 as IJ, b6 as UZ, L as YX, b7 as EJ, b8 as jZ, C as KX, R as MJ, b9 as WJ, ba as ZJ, bb as QZ, a4 as zF, bc as RJ, bd as VJ, be as GJ, bf as AJ, bg as JX, a2 as UX, bh as PJ, a3 as Dy, bi as Bp, bj as XJ, bk as BJ, bl as OJ, a8 as HJ, bm as qI, bn as $Z, bo as xL, bp as zJ, bq as YJ, br as KJ, bs as JJ, bt as UJ, bu as jJ, bv as QJ, bw as qZ, bx as kL, by as jX, bz as $J, bA as qJ, bB as DL, a9 as ro, ag as Kt, aD as QX, ac as ve, au as Xr, az as eo, bC as m1, aw as ql, a7 as od, ai as g0, ae as Ty, an as eE, aB as eU, bD as tU, bE as iU, bF as nU, ax as g1, bG as sU, bH as oU, aC as f0, bI as rU, al as aU, aa as $X, ao as lU, ay as uU, av as cU, bJ as dU } from "./index.js";
import { F as qX, T as eB, u as hU, R as YF, s as tB, b as iB, c as nB, d as sB, i as dw, f as hw, v as mU, w as gU, x as tE, y as iE, z as nE, e as fU, P as pU, j as oB, h as bU, A as yU, a as Ny, B as CU, C as vU, D as wU, E as SU, G as FU, H as _U, J as LU, g as xU, K as kU, L as DU, M as Iy, l as TU, q as Hu, N as NU, O as IU, Q as EU, t as rB, o as sE, S as aB, n as MU, I as WU, m as f1, r as ZU, U as RU } from "./utils.js";
var KF = function(e) {
var t = e.className, i = e.customizeIcon, s = e.customizeIconProps, o = e.children, r = e.onMouseDown, a = e.onClick, l = typeof i == "function" ? i(s) : i;
return /* @__PURE__ */ _.createElement("span", {
className: t,
onMouseDown: function(c) {
c.preventDefault(), r == null || r(c);
},
style: {
userSelect: "none",
WebkitUserSelect: "none"
},
unselectable: "on",
onClick: a,
"aria-hidden": !0
}, l !== void 0 ? l : /* @__PURE__ */ _.createElement("span", {
className: pt(t.split(/\s+/).map(function(u) {
return "".concat(u, "-icon");
}))
}, o));
}, VU = function(e, t, i, s, o) {
var r = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !1, a = arguments.length > 6 ? arguments[6] : void 0, l = arguments.length > 7 ? arguments[7] : void 0, u = ws.useMemo(function() {
if (Xs(s) === "object")
return s.clearIcon;
if (o)
return o;
}, [s, o]), c = ws.useMemo(function() {
return !!(!r && s && (i.length || a) && !(l === "combobox" && a === ""));
}, [s, r, i.length, a, l]);
return {
allowClear: c,
clearIcon: /* @__PURE__ */ ws.createElement(KF, {
className: "".concat(e, "-clear"),
onMouseDown: t,
customizeIcon: u
}, "×")
};
}, lB = /* @__PURE__ */ _.createContext(null);
function GU() {
return _.useContext(lB);
}
function AU() {
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10, e = _.useState(!1), t = Te(e, 2), i = t[0], s = t[1], o = _.useRef(null), r = function() {
window.clearTimeout(o.current);
};
_.useEffect(function() {
return r;
}, []);
var a = function(u, c) {
r(), o.current = window.setTimeout(function() {
s(u), c && c();
}, n);
};
return [i, a, r];
}
function uB() {
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, e = _.useRef(null), t = _.useRef(null);
_.useEffect(function() {
return function() {
window.clearTimeout(t.current);
};
}, []);
function i(s) {
(s || e.current === null) && (e.current = s), window.clearTimeout(t.current), t.current = window.setTimeout(function() {
e.current = null;
}, n);
}
return [function() {
return e.current;
}, i];
}
function PU(n, e, t, i) {
var s = _.useRef(null);
s.current = {
open: e,
triggerOpen: t,
customizedTrigger: i
}, _.useEffect(function() {
function o(r) {
var a;
if (!((a = s.current) !== null && a !== void 0 && a.customizedTrigger)) {
var l = r.target;
l.shadowRoot && r.composed && (l = r.composedPath()[0] || l), s.current.open && n().filter(function(u) {
return u;
}).every(function(u) {
return !u.contains(l) && u !== l;
}) && s.current.triggerOpen(!1);
}
}
return window.addEventListener("mousedown", o), function() {
return window.removeEventListener("mousedown", o);
};
}, []);
}
function XU(n) {
return ![
// System function button
Fi.ESC,
Fi.SHIFT,
Fi.BACKSPACE,
Fi.TAB,
Fi.WIN_KEY,
Fi.ALT,
Fi.META,
Fi.WIN_KEY_RIGHT,
Fi.CTRL,
Fi.SEMICOLON,
Fi.EQUALS,
Fi.CAPS_LOCK,
Fi.CONTEXT_MENU,
// F1-F12
Fi.F1,
Fi.F2,
Fi.F3,
Fi.F4,
Fi.F5,
Fi.F6,
Fi.F7,
Fi.F8,
Fi.F9,
Fi.F10,
Fi.F11,
Fi.F12
].includes(n);
}
var BU = function(e, t) {
var i, s = e.prefixCls, o = e.id, r = e.inputElement, a = e.disabled, l = e.tabIndex, u = e.autoFocus, c = e.autoComplete, d = e.editable, h = e.activeDescendantId, m = e.value, g = e.maxLength, f = e.onKeyDown, p = e.onMouseDown, y = e.onChange, C = e.onPaste, w = e.onCompositionStart, v = e.onCompositionEnd, S = e.open, F = e.attrs, L = r || /* @__PURE__ */ _.createElement("input", null), x = L, D = x.ref, W = x.props, N = W.onKeyDown, M = W.onChange, R = W.onMouseDown, T = W.onCompositionStart, I = W.onCompositionEnd, V = W.style;
return yJ(!("maxLength" in L.props)), L = /* @__PURE__ */ _.cloneElement(L, je(je(je({
type: "search"
}, W), {}, {
// Override over origin props
id: o,
ref: WX(t, D),
disabled: a,
tabIndex: l,
autoComplete: c || "off",
autoFocus: u,
className: pt("".concat(s, "-selection-search-input"), (i = L) === null || i === void 0 || (i = i.props) === null || i === void 0 ? void 0 : i.className),
role: "combobox",
"aria-expanded": S || !1,
"aria-haspopup": "listbox",
"aria-owns": "".concat(o, "_list"),
"aria-autocomplete": "list",
"aria-controls": "".concat(o, "_list"),
"aria-activedescendant": S ? h : void 0
}, F), {}, {
value: d ? m : "",
maxLength: g,
readOnly: !d,
unselectable: d ? null : "on",
style: je(je({}, V), {}, {
opacity: d ? null : 0
}),
onKeyDown: function(H) {
f(H), N && N(H);
},
onMouseDown: function(H) {
p(H), R && R(H);
},
onChange: function(H) {
y(H), M && M(H);
},
onCompositionStart: function(H) {
w(H), T && T(H);
},
onCompositionEnd: function(H) {
v(H), I && I(H);
},
onPaste: C
})), L;
}, cB = /* @__PURE__ */ _.forwardRef(BU);
function dB(n) {
return Array.isArray(n) ? n : n !== void 0 ? [n] : [];
}
var OU = typeof window < "u" && window.document && window.document.documentElement, HU = OU;
function zU(n) {
return n != null;
}
function YU(n) {
return !n && n !== 0;
}
function eR(n) {
return ["string", "number"].includes(Xs(n));
}
function hB(n) {
var e = void 0;
return n && (eR(n.title) ? e = n.title.toString() : eR(n.label) && (e = n.label.toString())), e;
}
function KU(n, e) {
HU ? _.useLayoutEffect(n, e) : _.useEffect(n, e);
}
function JU(n) {
var e;
return (e = n.key) !== null && e !== void 0 ? e : n.value;
}
var tR = function(e) {
e.preventDefault(), e.stopPropagation();
}, UU = function(e) {
var t = e.id, i = e.prefixCls, s = e.values, o = e.open, r = e.searchValue, a = e.autoClearSearchValue, l = e.inputRef, u = e.placeholder, c = e.disabled, d = e.mode, h = e.showSearch, m = e.autoFocus, g = e.autoComplete, f = e.activeDescendantId, p = e.tabIndex, y = e.removeIcon, C = e.maxTagCount, w = e.maxTagTextLength, v = e.maxTagPlaceholder, S = v === void 0 ? function(pe) {
return "+ ".concat(pe.length, " ...");
} : v, F = e.tagRender, L = e.onToggleOpen, x = e.onRemove, D = e.onInputChange, W = e.onInputPaste, N = e.onInputKeyDown, M = e.onInputMouseDown, R = e.onInputCompositionStart, T = e.onInputCompositionEnd, I = _.useRef(null), V = _.useState(0), B = Te(V, 2), H = B[0], O = B[1], E = _.useState(!1), J = Te(E, 2), q = J[0], Z = J[1], Q = "".concat(i, "-selection"), re = o || d === "multiple" && a === !1 || d === "tags" ? r : "", ge = d === "tags" || d === "multiple" && a === !1 || h && (o || q);
KU(function() {
O(I.current.scrollWidth);
}, [re]);
var he = function(ye, Pe, He, Xe, nt) {
return /* @__PURE__ */ _.createElement("span", {
title: hB(ye),
className: pt("".concat(Q, "-item"), Ye({}, "".concat(Q, "-item-disabled"), He))
}, /* @__PURE__ */ _.createElement("span", {
className: "".concat(Q, "-item-content")
}, Pe), Xe && /* @__PURE__ */ _.createElement(KF, {
className: "".concat(Q, "-item-remove"),
onMouseDown: tR,
onClick: nt,
customizeIcon: y
}, "×"));
}, xe = function(ye, Pe, He, Xe, nt, wt) {
var Rt = function(Vt) {
tR(Vt), L(!o);
};
return /* @__PURE__ */ _.createElement("span", {
onMouseDown: Rt
}, F({
label: Pe,
value: ye,
disabled: He,
closable: Xe,
onClose: nt,
isMaxTag: !!wt
}));
}, Ee = function(ye) {
var Pe = ye.disabled, He = ye.label, Xe = ye.value, nt = !c && !Pe, wt = He;
if (typeof w == "number" && (typeof He == "string" || typeof He == "number")) {
var Rt = String(wt);
Rt.length > w && (wt = "".concat(Rt.slice(0, w), "..."));
}
var Tt = function(ei) {
ei && ei.stopPropagation(), x(ye);
};
return typeof F == "function" ? xe(Xe, wt, Pe, nt, Tt) : he(ye, wt, Pe, nt, Tt);
}, ce = function(ye) {
var Pe = typeof S == "function" ? S(ye) : S;
return typeof F == "function" ? xe(void 0, Pe, !1, !1, void 0, !0) : he({
title: Pe
}, Pe, !1);
}, le = /* @__PURE__ */ _.createElement("div", {
className: "".concat(Q, "-search"),
style: {
width: H
},
onFocus: function() {
Z(!0);
},
onBlur: function() {
Z(!1);
}
}, /* @__PURE__ */ _.createElement(cB, {
ref: l,
open: o,
prefixCls: i,
id: t,
inputElement: null,
disabled: c,
autoFocus: m,
autoComplete: g,
editable: ge,
activeDescendantId: f,
value: re,
onKeyDown: N,
onMouseDown: M,
onChange: D,
onPaste: W,
onCompositionStart: R,
onCompositionEnd: T,
tabIndex: p,
attrs: hc(e, !0)
}), /* @__PURE__ */ _.createElement("span", {
ref: I,
className: "".concat(Q, "-search-mirror"),
"aria-hidden": !0
}, re, " ")), fe = /* @__PURE__ */ _.createElement(qX, {
prefixCls: "".concat(Q, "-overflow"),
data: s,
renderItem: Ee,
renderRest: ce,
suffix: le,
itemKey: JU,
maxCount: C
});
return /* @__PURE__ */ _.createElement(_.Fragment, null, fe, !s.length && !re && /* @__PURE__ */ _.createElement("span", {
className: "".concat(Q, "-placeholder")
}, u));
}, jU = function(e) {
var t = e.inputElement, i = e.prefixCls, s = e.id, o = e.inputRef, r = e.disabled, a = e.autoFocus, l = e.autoComplete, u = e.activeDescendantId, c = e.mode, d = e.open, h = e.values, m = e.placeholder, g = e.tabIndex, f = e.showSearch, p = e.searchValue, y = e.activeValue, C = e.maxLength, w = e.onInputKeyDown, v = e.onInputMouseDown, S = e.onInputChange, F = e.onInputPaste, L = e.onInputCompositionStart, x = e.onInputCompositionEnd, D = e.title, W = _.useState(!1), N = Te(W, 2), M = N[0], R = N[1], T = c === "combobox", I = T || f, V = h[0], B = p || "";
T && y && !M && (B = y), _.useEffect(function() {
T && R(!1);
}, [T, y]);
var H = c !== "combobox" && !d && !f ? !1 : !!B, O = D === void 0 ? hB(V) : D, E = _.useMemo(function() {
return V ? null : /* @__PURE__ */ _.createElement("span", {
className: "".concat(i, "-selection-placeholder"),
style: H ? {
visibility: "hidden"
} : void 0
}, m);
}, [V, H, m, i]);
return /* @__PURE__ */ _.createElement(_.Fragment, null, /* @__PURE__ */ _.createElement("span", {
className: "".concat(i, "-selection-search")
}, /* @__PURE__ */ _.createElement(cB, {
ref: o,
prefixCls: i,
id: s,
open: d,
inputElement: t,
disabled: r,
autoFocus: a,
autoComplete: l,
editable: I,
activeDescendantId: u,
value: B,
onKeyDown: w,
onMouseDown: v,
onChange: function(q) {
R(!0), S(q);
},
onPaste: F,
onCompositionStart: L,
onCompositionEnd: x,
tabIndex: g,
attrs: hc(e, !0),
maxLength: T ? C : void 0
})), !T && V ? /* @__PURE__ */ _.createElement("span", {
className: "".concat(i, "-selection-item"),
title: O,
style: H ? {
visibility: "hidden"
} : void 0
}, V.label) : null, E);
}, QU = function(e, t) {
var i = _.useRef(null), s = _.useRef(!1), o = e.prefixCls, r = e.open, a = e.mode, l = e.showSearch, u = e.tokenWithEnter, c = e.disabled, d = e.autoClearSearchValue, h = e.onSearch, m = e.onSearchSubmit, g = e.onToggleOpen, f = e.onInputKeyDown, p = e.domRef;
_.useImperativeHandle(t, function() {
return {
focus: function(H) {
i.current.focus(H);
},
blur: function() {
i.current.blur();
}
};
});
var y = uB(0), C = Te(y, 2), w = C[0], v = C[1], S = function(H) {
var O = H.which;
(O === Fi.UP || O === Fi.DOWN) && H.preventDefault(), f && f(H), O === Fi.ENTER && a === "tags" && !s.current && !r && (m == null || m(H.target.value)), XU(O) && g(!0);
}, F = function() {
v(!0);
}, L = _.useRef(null), x = function(H) {
h(H, !0, s.current) !== !1 && g(!0);
}, D = function() {
s.current = !0;
}, W = function(H) {
s.current = !1, a !== "combobox" && x(H.target.value);
}, N = function(H) {
var O = H.target.value;
if (u && L.current && /[\r\n]/.test(L.current)) {
var E = L.current.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
O = O.replace(E, L.current);
}
L.current = null, x(O);
}, M = function(H) {
var O = H.clipboardData, E = O == null ? void 0 : O.getData("text");
L.current = E || "";
}, R = function(H) {
var O = H.target;
if (O !== i.current) {
var E = document.body.style.msTouchAction !== void 0;
E ? setTimeout(function() {
i.current.focus();
}) : i.current.focus();
}
}, T = function(H) {
var O = w();
H.target !== i.current && !O && !(a === "combobox" && c) && H.preventDefault(), (a !== "combobox" && (!l || !O) || !r) && (r && d !== !1 && h("", !0, !1), g());
}, I = {
inputRef: i,
onInputKeyDown: S,
onInputMouseDown: F,
onInputChange: N,
onInputPaste: M,
onInputCompositionStart: D,
onInputCompositionEnd: W
}, V = a === "multiple" || a === "tags" ? /* @__PURE__ */ _.createElement(UU, Zt({}, e, I)) : /* @__PURE__ */ _.createElement(jU, Zt({}, e, I));
return /* @__PURE__ */ _.createElement("div", {
ref: p,
className: "".concat(o, "-selector"),
onClick: R,
onMouseDown: T
}, V);
}, $U = /* @__PURE__ */ _.forwardRef(QU), qU = ["prefixCls", "disabled", "visible", "children", "popupElement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "direction", "placement", "builtinPlacements", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "getPopupContainer", "empty", "getTriggerDOMNode", "onPopupVisibleChange", "onPopupMouseEnter"], ej = function(e) {
var t = e === !0 ? 0 : 1;
return {
bottomLeft: {
points: ["tl", "bl"],
offset: [0, 4],
overflow: {
adjustX: t,
adjustY: 1
},
htmlRegion: "scroll"
},
bottomRight: {
points: ["tr", "br"],
offset: [0, 4],
overflow: {
adjustX: t,
adjustY: 1
},
htmlRegion: "scroll"
},
topLeft: {
points: ["bl", "tl"],
offset: [0, -4],
overflow: {
adjustX: t,
adjustY: 1
},
htmlRegion: "scroll"
},
topRight: {
points: ["br", "tr"],
offset: [0, -4],
overflow: {
adjustX: t,
adjustY: 1
},
htmlRegion: "scroll"
}
};
}, tj = function(e, t) {
var i = e.prefixCls;
e.disabled;
var s = e.visible, o = e.children, r = e.popupElement, a = e.animation, l = e.transitionName, u = e.dropdownStyle, c = e.dropdownClassName, d = e.direction, h = d === void 0 ? "ltr" : d, m = e.placement, g = e.builtinPlacements, f = e.dropdownMatchSelectWidth, p = e.dropdownRender, y = e.dropdownAlign, C = e.getPopupContainer, w = e.empty, v = e.getTriggerDOMNode, S = e.onPopupVisibleChange, F = e.onPopupMouseEnter, L = wo(e, qU), x = "".concat(i, "-dropdown"), D = r;
p && (D = p(r));
var W = _.useMemo(function() {
return g || ej(f);
}, [g, f]), N = a ? "".concat(x, "-").concat(a) : l, M = typeof f == "number", R = _.useMemo(function() {
return M ? null : f === !1 ? "minWidth" : "width";
}, [f, M]), T = u;
M && (T = je(je({}, T), {}, {
width: f
}));
var I = _.useRef(null);
return _.useImperativeHandle(t, function() {
return {
getPopupElement: function() {
var B;
return (B = I.current) === null || B === void 0 ? void 0 : B.popupElement;
}
};
}), /* @__PURE__ */ _.createElement(eB, Zt({}, L, {
showAction: S ? ["click"] : [],
hideAction: S ? ["click"] : [],
popupPlacement: m || (h === "rtl" ? "bottomRight" : "bottomLeft"),
builtinPlacements: W,
prefixCls: x,
popupTransitionName: N,
popup: /* @__PURE__ */ _.createElement("div", {
onMouseEnter: F
}, D),
ref: I,
stretch: R,
popupAlign: y,
popupVisible: s,
getPopupContainer: C,
popupClassName: pt(c, Ye({}, "".concat(x, "-empty"), w)),
popupStyle: T,
getTriggerDOMNode: v,
onPopupVisibleChange: S
}), o);
}, ij = /* @__PURE__ */ _.forwardRef(tj);
function iR(n, e) {
var t = n.key, i;
return "value" in n && (i = n.value), t ?? (i !== void 0 ? i : "rc-index-key-".concat(e));
}
function Hk(n) {
return typeof n < "u" && !Number.isNaN(n);
}
function mB(n, e) {
var t = n || {}, i = t.label, s = t.value, o = t.options, r = t.groupLabel, a = i || (e ? "children" : "label");
return {
label: a,
value: s || "value",
options: o || "options",
groupLabel: r || a
};
}
function nj(n) {
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = e.fieldNames, i = e.childrenAsData, s = [], o = mB(t, !1), r = o.label, a = o.value, l = o.options, u = o.groupLabel;
function c(d, h) {
Array.isArray(d) && d.forEach(function(m) {
if (h || !(l in m)) {
var g = m[a];
s.push({
key: iR(m, s.length),
groupOption: h,
data: m,
label: m[r],
value: g
});
} else {
var f = m[u];
f === void 0 && i && (f = m.label), s.push({
key: iR(m, s.length),
group: !0,
data: m,
label: f
}), c(m[l], !0);
}
});
}
return c(n, !1), s;
}
function zk(n) {
var e = je({}, n);
return "props" in e || Object.defineProperty(e, "props", {
get: function() {
return JI(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), e;
}
}), e;
}
var sj = function(e, t, i) {
if (!t || !t.length)
return null;
var s = !1, o = function a(l, u) {
var c = CJ(u), d = c[0], h = c.slice(1);
if (!d)
return [l];
var m = l.split(d);
return s = s || m.length > 1, m.reduce(function(g, f) {
return [].concat(Bi(g), Bi(a(f, h)));
}, []).filter(Boolean);
}, r = o(e, t);
return s ? typeof i < "u" ? r.slice(0, i) : r : null;
}, oE = /* @__PURE__ */ _.createContext(null);
function oj(n) {
var e = n.visible, t = n.values;
if (!e)
return null;
var i = 50;
return /* @__PURE__ */ _.createElement("span", {
"aria-live": "polite",
style: {
width: 0,
height: 0,
position: "absolute",
overflow: "hidden",
opacity: 0
}
}, "".concat(t.slice(0, i).map(function(s) {
var o = s.label, r = s.value;
return ["number", "string"].includes(Xs(o)) ? o : r;
}).join(", ")), t.length > i ? ", ..." : null);
}
var rj = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "omitDomProps", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "autoClearSearchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "suffixIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "builtinPlacements", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"], aj = ["value", "onChange", "removeIcon", "placeholder", "autoFocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabIndex"], Yk = function(e) {
return e === "tags" || e === "multiple";
}, lj = /* @__PURE__ */ _.forwardRef(function(n, e) {
var t, i = n.id, s = n.prefixCls, o = n.className, r = n.showSearch, a = n.tagRender, l = n.direction, u = n.omitDomProps, c = n.displayValues, d = n.onDisplayValuesChange, h = n.emptyOptions, m = n.notFoundContent, g = m === void 0 ? "Not Found" : m, f = n.onClear, p = n.mode, y = n.disabled, C = n.loading, w = n.getInputElement, v = n.getRawInputElement, S = n.open, F = n.defaultOpen, L = n.onDropdownVisibleChange, x = n.activeValue, D = n.onActiveValueChange, W = n.activeDescendantId, N = n.searchValue, M = n.autoClearSearchValue, R = n.onSearch, T = n.onSearchSplit, I = n.tokenSeparators, V = n.allowClear, B = n.suffixIcon, H = n.clearIcon, O = n.OptionList, E = n.animation, J = n.transitionName, q = n.dropdownStyle, Z = n.dropdownClassName, Q = n.dropdownMatchSelectWidth, re = n.dropdownRender, ge = n.dropdownAlign, he = n.placement, xe = n.builtinPlacements, Ee = n.getPopupContainer, ce = n.showAction, le = ce === void 0 ? [] : ce, fe = n.onFocus, pe = n.onBlur, ye = n.onKeyUp, Pe = n.onKeyDown, He = n.onMouseDown, Xe = wo(n, rj), nt = Yk(p), wt = (r !== void 0 ? r : nt) || p === "combobox", Rt = je({}, Xe);
aj.forEach(function(xi) {
delete Rt[xi];
}), u == null || u.forEach(function(xi) {
delete Rt[xi];
});
var Tt = _.useState(!1), Vt = Te(Tt, 2), ei = Vt[0], jt = Vt[1];
_.useEffect(function() {
jt(hU());
}, []);
var ue = _.useRef(null), De = _.useRef(null), Ae = _.useRef(null), it = _.useRef(null), et = _.useRef(null), yt = _.useRef(!1), Ft = AU(), ut = Te(Ft, 3), Je = ut[0], Ce = ut[1], Ie = ut[2];
_.useImperativeHandle(e, function() {
var xi, ui;
return {
focus: (xi = it.current) === null || xi === void 0 ? void 0 : xi.focus,
blur: (ui = it.current) === null || ui === void 0 ? void 0 : ui.blur,
scrollTo: function(Ns) {
var Vn;
return (Vn = et.current) === null || Vn === void 0 ? void 0 : Vn.scrollTo(Ns);
},
nativeElement: ue.current || De.current
};
});
var be = _.useMemo(function() {
var xi;
if (p !== "combobox")
return N;
var ui = (xi = c[0]) === null || xi === void 0 ? void 0 : xi.value;
return typeof ui == "string" || typeof ui == "number" ? String(ui) : "";
}, [N, p, c]), Fe = p === "combobox" && typeof w == "function" && w() || null, Ge = typeof v == "function" && v(), ct = vJ(De, Ge == null || (t = Ge.props) === null || t === void 0 ? void 0 : t.ref), si = _.useState(!1), Ai = Te(si, 2), Ui = Ai[0], cn = Ai[1];
ar(function() {
cn(!0);
}, []);
var Wn = Co(!1, {
defaultValue: F,
value: S
}), dn = Te(Wn, 2), hn = dn[0], dt = dn[1], P = Ui ? hn : !1, z = !g && h;
(y || z && P && p === "combobox") && (P = !1);
var Y = z ? !1 : P, K = _.useCallback(function(xi) {
var ui = xi !== void 0 ? xi : !P;
y || (dt(ui), P !== ui && (L == null || L(ui)));
}, [y, P, dt, L]), j = _.useMemo(function() {
return (I || []).some(function(xi) {
return [`
`, `\r
`].includes(xi);
});
}, [I]), ee = _.useContext(oE) || {}, ae = ee.maxCount, ke = ee.rawValues, Me = function(ui, Ts, Ns) {
if (!(nt && Hk(ae) && (ke == null ? void 0 : ke.size) >= ae)) {
var Vn = !0, Nt = ui;
D == null || D(null);
var Et = sj(ui, I, Hk(ae) ? ae - ke.size : void 0), Tn = Ns ? null : Et;
return p !== "combobox" && Tn && (Nt = "", T == null || T(Tn), K(!1), Vn = !1), R && be !== Nt && R(Nt, {
source: Ts ? "typing" : "effect"
}), Vn;
}
}, ht = function(ui) {
!ui || !ui.trim() || R(ui, {
source: "submit"
});
};
_.useEffect(function() {
!P && !nt && p !== "combobox" && Me("", !1, !1);
}, [P]), _.useEffect(function() {
hn && y && dt(!1), y && !yt.current && Ce(!1);
}, [y]);
var It = uB(), li = Te(It, 2), Pt = li[0], mi = li[1], Ue = _.useRef(!1), te = function(ui) {
var Ts = Pt(), Ns = ui.key, Vn = Ns === "Enter";
if (Vn && (p !== "combobox" && ui.preventDefault(), P || K(!0)), mi(!!be), Ns === "Backspace" && !Ts && nt && !be && c.length) {
for (var Nt = Bi(c), Et = null, Tn = Nt.length - 1; Tn >= 0; Tn -= 1) {
var Is = Nt[Tn];
if (!Is.disabled) {
Nt.splice(Tn, 1), Et = Is;
break;
}
}
Et && d(Nt, {
type: "remove",
values: [Et]
});
}
for (var xa = arguments.length, bu = new Array(xa > 1 ? xa - 1 : 0), Ng = 1; Ng < xa; Ng++)
bu[Ng - 1] = arguments[Ng];
if (P && (!Vn || !Ue.current)) {
var Si;
(Si = et.current) === null || Si === void 0 || Si.onKeyDown.apply(Si, [ui].concat(bu));
}
Vn && (Ue.current = !0), Pe == null || Pe.apply(void 0, [ui].concat(bu));
}, Ve = function(ui) {
for (var Ts = arguments.length, Ns = new Array(Ts > 1 ? Ts - 1 : 0), Vn = 1; Vn < Ts; Vn++)
Ns[Vn - 1] = arguments[Vn];
if (P) {
var Nt;
(Nt = et.current) === null || Nt === void 0 || Nt.onKeyUp.apply(Nt, [ui].concat(Ns));
}
ui.key === "Enter" && (Ue.current = !1), ye == null || ye.apply(void 0, [ui].concat(Ns));
}, $e = function(ui) {
var Ts = c.filter(function(Ns) {
return Ns !== ui;
});
d(Ts, {
type: "remove",
values: [ui]
});
}, Oe = _.useRef(!1), tt = function() {
Ce(!0), y || (fe && !Oe.current && fe.apply(void 0, arguments), le.includes("focus") && K(!0)), Oe.current = !0;
}, Wt = function() {
yt.current = !0, Ce(!1, function() {
Oe.current = !1, yt.current = !1, K(!1);
}), !y && (be && (p === "tags" ? R(be, {
source: "submit"
}) : p === "multiple" && R("", {
source: "blur"
})), pe && pe.apply(void 0, arguments));
}, Gt = [];
_.useEffect(function() {
return function() {
Gt.forEach(function(xi) {
return clearTimeout(xi);
}), Gt.splice(0, Gt.length);
};
}, []);
var _n = function(ui) {
var Ts, Ns = ui.target, Vn = (Ts = Ae.current) === null || Ts === void 0 ? void 0 : Ts.getPopupElement();
if (Vn && Vn.contains(Ns)) {
var Nt = setTimeout(function() {
var xa = Gt.indexOf(Nt);
if (xa !== -1 && Gt.splice(xa, 1), Ie(), !ei && !Vn.contains(document.activeElement)) {
var bu;
(bu = it.current) === null || bu === void 0 || bu.focus();
}
});
Gt.push(Nt);
}
for (var Et = arguments.length, Tn = new Array(Et > 1 ? Et - 1 : 0), Is = 1; Is < Et; Is++)
Tn[Is - 1] = arguments[Is];
He == null || He.apply(void 0, [ui].concat(Tn));
}, Ds = _.useState({}), ps = Te(Ds, 2), gl = ps[1];
function xc() {
gl({});
}
var pu;
Ge && (pu = function(ui) {
K(ui);
}), PU(function() {
var xi;
return [ue.current, (xi = Ae.current) === null || xi === void 0 ? void 0 : xi.getPopupElement()];
}, Y, K, !!Ge);
var fl = _.useMemo(function() {
return je(je({}, n), {}, {
notFoundContent: g,
open: P,
triggerOpen: Y,
id: i,
showSearch: wt,
multiple: nt,
toggleOpen: K
});
}, [n, g, Y, P, i, wt, nt, K]), $d = !!B || C, kg;
$d && (kg = /* @__PURE__ */ _.createElement(KF, {
className: pt("".concat(s, "-arrow"), Ye({}, "".concat(s, "-arrow-loading"), C)),
customizeIcon: B,
customizeIconProps: {
loading: C,
searchValue: be,
open: P,
focused: Je,
showSearch: wt
}
}));
var mb = function() {
var ui;
f == null || f(), (ui = it.current) === null || ui === void 0 || ui.focus(), d([], {
type: "clear",
values: c
}), Me("", !1, !1);
}, Dg = VU(s, mb, c, V, H, y, be, p), gb = Dg.allowClear, fb = Dg.clearIcon, pb = /* @__PURE__ */ _.createElement(O, {
ref: et
}), bb = pt(s, o, Ye(Ye(Ye(Ye(Ye(Ye(Ye(Ye(Ye(Ye({}, "".concat(s, "-focused"), Je), "".concat(s, "-multiple"), nt), "".concat(s, "-single"), !nt), "".concat(s, "-allow-clear"), V), "".concat(s, "-show-arrow"), $d), "".concat(s, "-disabled"), y), "".concat(s, "-loading"), C), "".concat(s, "-open"), P), "".concat(s, "-customize-input"), Fe), "".concat(s, "-show-search"), wt)), Tg = /* @__PURE__ */ _.createElement(ij, {
ref: Ae,
disabled: y,
prefixCls: s,
visible: Y,
popupElement: pb,
animation: E,
transitionName: J,
dropdownStyle: q,
dropdownClassName: Z,
direction: l,
dropdownMatchSelectWidth: Q,
dropdownRender: re,
dropdownAlign: ge,
placement: he,
builtinPlacements: xe,
getPopupContainer: Ee,
empty: h,
getTriggerDOMNode: function(ui) {
return (
// TODO: This is workaround and should be removed in `rc-select`
// And use new standard `nativeElement` for ref.
// But we should update `rc-resize-observer` first.
De.current || ui
);
},
onPopupVisibleChange: pu,
onPopupMouseEnter: xc
}, Ge ? /* @__PURE__ */ _.cloneElement(Ge, {
ref: ct
}) : /* @__PURE__ */ _.createElement($U, Zt({}, n, {
domRef: De,
prefixCls: s,
inputElement: Fe,
ref: it,
id: i,
showSearch: wt,
autoClearSearchValue: M,
mode: p,
activeDescendantId: W,
tagRender: a,
values: c,
open: P,
onToggleOpen: K,
activeValue: x,
searchValue: be,
onSearch: Me,
onSearchSubmit: ht,
onRemove: $e,
tokenWithEnter: j
}))), qd;
return Ge ? qd = Tg : qd = /* @__PURE__ */ _.createElement("div", Zt({
className: bb
}, Rt, {
ref: ue,
onMouseDown: _n,
onKeyDown: te,
onKeyUp: Ve,
onFocus: tt,
onBlur: Wt
}), /* @__PURE__ */ _.createElement(oj, {
visible: Je && !P,
values: c
}), Tg, kg, gb && fb), /* @__PURE__ */ _.createElement(lB.Provider, {
value: fl
}, qd);
}), rE = function() {
return null;
};
rE.isSelectOptGroup = !0;
var aE = function() {
return null;
};
aE.isSelectOption = !0;
var gB = /* @__PURE__ */ _.forwardRef(function(n, e) {
var t = n.height, i = n.offsetY, s = n.offsetX, o = n.children, r = n.prefixCls, a = n.onInnerResize, l = n.innerProps, u = n.rtl, c = n.extra, d = {}, h = {
display: "flex",
flexDirection: "column"
};
return i !== void 0 && (d = {
height: t,
position: "relative",
overflow: "hidden"
}, h = je(je({}, h), {}, Ye(Ye(Ye(Ye(Ye({
transform: "translateY(".concat(i, "px)")
}, u ? "marginRight" : "marginLeft", -s), "position", "absolute"), "left", 0), "right", 0), "top", 0))), /* @__PURE__ */ _.createElement("div", {
style: d
}, /* @__PURE__ */ _.createElement(YF, {
onResize: function(g) {
var f = g.offsetHeight;
f && a && a();
}
}, /* @__PURE__ */ _.createElement("div", Zt({
style: h,
className: pt(Ye({}, "".concat(r, "-holder-inner"), r)),
ref: e
}, l), o, c)));
});
gB.displayName = "Filler";
function uj(n) {
var e = n.children, t = n.setRef, i = _.useCallback(function(s) {
t(s);
}, []);
return /* @__PURE__ */ _.cloneElement(e, {
ref: i
});
}
function cj(n, e, t, i, s, o, r, a) {
var l = a.getKey;
return n.slice(e, t + 1).map(function(u, c) {
var d = e + c, h = r(u, d, {
style: {
width: i
},
offsetX: s
}), m = l(u);
return /* @__PURE__ */ _.createElement(uj, {
key: m,
setRef: function(f) {
return o(u, f);
}
}, h);
});
}
function dj(n, e, t) {
var i = n.length, s = e.length, o, r;
if (i === 0 && s === 0)
return null;
i < s ? (o = n, r = e) : (o = e, r = n);
var a = {
__EMPTY_ITEM__: !0
};
function l(g) {
return g !== void 0 ? t(g) : a;
}
for (var u = null, c = Math.abs(i - s) !== 1, d = 0; d < r.length; d += 1) {
var h = l(o[d]), m = l(r[d]);
if (h !== m) {
u = d, c = c || h !== l(r[d + 1]);
break;
}
}
return u === null ? null : {
index: u,
multiple: c
};
}
function hj(n, e, t) {
var i = _.useState(n), s = Te(i, 2), o = s[0], r = s[1], a = _.useState(null), l = Te(a, 2), u = l[0], c = l[1];
return _.useEffect(function() {
var d = dj(o || [], n || [], e);
(d == null ? void 0 : d.index) !== void 0 && c(n[d.index]), r(n);
}, [n]), [u];
}
var nR = (typeof navigator > "u" ? "undefined" : Xs(navigator)) === "object" && /Firefox/i.test(navigator.userAgent);
const fB = function(n, e, t, i) {
var s = _.useRef(!1), o = _.useRef(null);
function r() {
clearTimeout(o.current), s.current = !0, o.current = setTimeout(function() {
s.current = !1;
}, 50);
}
var a = _.useRef({
top: n,
bottom: e,
left: t,
right: i
});
return a.current.top = n, a.current.bottom = e, a.current.left = t, a.current.right = i, function(l, u) {
var c = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, d = l ? (
// Pass origin wheel when on the left
u < 0 && a.current.left || // Pass origin wheel when on the right
u > 0 && a.current.right
) : u < 0 && a.current.top || // Pass origin wheel when on the bottom
u > 0 && a.current.bottom;
return c && d ? (clearTimeout(o.current), s.current = !1) : (!d || s.current) && r(), !s.current && d;
};
};
function mj(n, e, t, i, s, o, r) {
var a = _.useRef(0), l = _.useRef(null), u = _.useRef(null), c = _.useRef(!1), d = fB(e, t, i, s);
function h(C, w) {
Cs.cancel(l.current), a.current += w, u.current = w, !d(!1, w) && (nR || C.preventDefault(), l.current = Cs(function() {
var v = c.current ? 10 : 1;
r(a.current * v), a.current = 0;
}));
}
function m(C, w) {
r(w, !0), nR || C.preventDefault();
}
var g = _.useRef(null), f = _.useRef(null);
function p(C) {
if (n) {
Cs.cancel(f.current), f.current = Cs(function() {
g.current = null;
}, 2);
var w = C.deltaX, v = C.deltaY, S = C.shiftKey, F = w, L = v;
(g.current === "sx" || !g.current && S && v && !w) && (F = v, L = 0, g.current = "sx");
var x = Math.abs(F), D = Math.abs(L);
g.current === null && (g.current = o && x > D ? "x" : "y"), g.current === "y" ? h(C, L) : m(C, F);
}
}
function y(C) {
n && (c.current = C.detail === u.current);
}
return [p, y];
}
function gj(n, e, t, i) {
var s = _.useMemo(function() {
return [/* @__PURE__ */ new Map(), []];
}, [n, t.id, i]), o = Te(s, 2), r = o[0], a = o[1], l = function(c) {
var d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : c, h = r.get(c), m = r.get(d);
if (h === void 0 || m === void 0)
for (var g = n.length, f = a.length; f < g; f += 1) {
var p, y = n[f], C = e(y);
r.set(C, f);
var w = (p = t.get(C)) !== null && p !== void 0 ? p : i;
if (a[f] = (a[f - 1] || 0) + w, C === c && (h = f), C === d && (m = f), h !== void 0 && m !== void 0)
break;
}
return {
top: a[h - 1] || 0,
bottom: a[m]
};
};
return l;
}
var fj = /* @__PURE__ */ function() {
function n() {
XF(this, n), Ye(this, "maps", void 0), Ye(this, "id", 0), this.maps = /* @__PURE__ */ Object.create(null);
}
return PF(n, [{
key: "set",
value: function(t, i) {
this.maps[t] = i, this.id += 1;
}
}, {
key: "get",
value: function(t) {
return this.maps[t];
}
}]), n;
}();
function pj(n, e, t) {
var i = _.useState(0), s = Te(i, 2), o = s[0], r = s[1], a = _.useRef(/* @__PURE__ */ new Map()), l = _.useRef(new fj()), u = _.useRef();
function c() {
Cs.cancel(u.current);
}
function d() {
var m = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
c();
var g = function() {
a.current.forEach(function(p, y) {
if (p && p.offsetParent) {
var C = wJ(p), w = C.offsetHeight;
l.current.get(y) !== w && l.current.set(y, C.offsetHeight);
}
}), r(function(p) {
return p + 1;
});
};
m ? g() : u.current = Cs(g);
}
function h(m, g) {
var f = n(m);
a.current.get(f), g ? (a.current.set(f, g), d()) : a.current.delete(f);
}
return _.useEffect(function() {
return c;
}, []), [h, d, l.current, o];
}
var sR = 14 / 15;
function bj(n, e, t) {
var i = _.useRef(!1), s = _.useRef(0), o = _.useRef(0), r = _.useRef(null), a = _.useRef(null), l, u = function(m) {
if (i.current) {
var g = Math.ceil(m.touches[0].pageX), f = Math.ceil(m.touches[0].pageY), p = s.current - g, y = o.current - f, C = Math.abs(p) > Math.abs(y);
C ? s.current = g : o.current = f, t(C, C ? p : y) && m.preventDefault(), clearInterval(a.current), a.current = setInterval(function() {
C ? p *= sR : y *= sR;
var w = Math.floor(C ? p : y);
(!t(C, w, !0) || Math.abs(w) <= 0.1) && clearInterval(a.current);
}, 16);
}
}, c = function() {
i.current = !1, l();
}, d = function(m) {
l(), m.touches.length === 1 && !i.current && (i.current = !0, s.current = Math.ceil(m.touches[0].pageX), o.current = Math.ceil(m.touches[0].pageY), r.current = m.target, r.current.addEventListener("touchmove", u), r.current.addEventListener("touchend", c));
};
l = function() {
r.current && (r.current.removeEventListener("touchmove", u), r.current.removeEventListener("touchend", c));
}, ar(function() {
return n && e.current.addEventListener("touchstart", d), function() {
var h;
(h = e.current) === null || h === void 0 || h.removeEventListener("touchstart", d), l(), clearInterval(a.current);
};
}, [n]);
}
var yj = 10;
function Cj(n, e, t, i, s, o, r, a) {
var l = _.useRef(), u = _.useState(null), c = Te(u, 2), d = c[0], h = c[1];
return ar(function() {
if (d && d.times < yj) {
if (!n.current) {
h(function(O) {
return je({}, O);
});
return;
}
o();
var m = d.targetAlign, g = d.originAlign, f = d.index, p = d.offset, y = n.current.clientHeight, C = !1, w = m, v = null;
if (y) {
for (var S = m || g, F = 0, L = 0, x = 0, D = Math.min(e.length - 1, f), W = 0; W <= D; W += 1) {
var N = s(e[W]);
L = F;
var M = t.get(N);
x = L + (M === void 0 ? i : M), F = x;
}
for (var R = S === "top" ? p : y - p, T = D; T >= 0; T -= 1) {
var I = s(e[T]), V = t.get(I);
if (V === void 0) {
C = !0;
break;
}
if (R -= V, R <= 0)
break;
}
switch (S) {
case "top":
v = L - p;
break;
case "bottom":
v = x - y + p;
break;
default: {
var B = n.current.scrollTop, H = B + y;
L < B ? w = "top" : x > H && (w = "bottom");
}
}
v !== null && r(v), v !== d.lastTop && (C = !0);
}
C && h(je(je({}, d), {}, {
times: d.times + 1,
targetAlign: w,
lastTop: v
}));
}
}, [d, n.current]), function(m) {
if (m == null) {
a();
return;
}
if (Cs.cancel(l.current), typeof m == "number")
r(m);
else if (m && Xs(m) === "object") {
var g, f = m.align;
"index" in m ? g = m.index : g = e.findIndex(function(C) {
return s(C) === m.key;
});
var p = m.offset, y = p === void 0 ? 0 : p;
h({
times: 0,
index: g,
offset: y,
originAlign: f
});
}
};
}
function oR(n, e) {
var t = "touches" in n ? n.touches[0] : n;
return t[e ? "pageX" : "pageY"];
}
var rR = /* @__PURE__ */ _.forwardRef(function(n, e) {
var t = n.prefixCls, i = n.rtl, s = n.scrollOffset, o = n.scrollRange, r = n.onStartMove, a = n.onStopMove, l = n.onScroll, u = n.horizontal, c = n.spinSize, d = n.containerSize, h = n.style, m = n.thumbStyle, g = _.useState(!1), f = Te(g, 2), p = f[0], y = f[1], C = _.useState(null), w = Te(C, 2), v = w[0], S = w[1], F = _.useState(null), L = Te(F, 2), x = L[0], D = L[1], W = !i, N = _.useRef(), M = _.useRef(), R = _.useState(!1), T = Te(R, 2), I = T[0], V = T[1], B = _.useRef(), H = function() {
clearTimeout(B.current), V(!0), B.current = setTimeout(function() {
V(!1);
}, 3e3);
}, O = o - d || 0, E = d - c || 0, J = _.useMemo(function() {
if (s === 0 || O === 0)
return 0;
var ce = s / O;
return ce * E;
}, [s, O, E]), q = function(le) {
le.stopPropagation(), le.preventDefault();
}, Z = _.useRef({
top: J,
dragging: p,
pageY: v,
startTop: x
});
Z.current = {
top: J,
dragging: p,
pageY: v,
startTop: x
};
var Q = function(le) {
y(!0), S(oR(le, u)), D(Z.current.top), r(), le.stopPropagation(), le.preventDefault();
};
_.useEffect(function() {
var ce = function(ye) {
ye.preventDefault();
}, le = N.current, fe = M.current;
return le.addEventListener("touchstart", ce), fe.addEventListener("touchstart", Q), function() {
le.removeEventListener("touchstart", ce), fe.removeEventListener("touchstart", Q);
};
}, []);
var re = _.useRef();
re.current = O;
var ge = _.useRef();
ge.current = E, _.useEffect(function() {
if (p) {
var ce, le = function(ye) {
var Pe = Z.current, He = Pe.dragging, Xe = Pe.pageY, nt = Pe.startTop;
Cs.cancel(ce);
var wt = d / N.current.getBoundingClientRect().height;
if (He) {
var Rt = (oR(ye, u) - Xe) * wt, Tt = nt;
!W && u ? Tt -= Rt : Tt += Rt;
var Vt = re.current, ei = ge.current, jt = ei ? Tt / ei : 0, ue = Math.ceil(jt * Vt);
ue = Math.max(ue, 0), ue = Math.min(ue, Vt), ce = Cs(function() {
l(ue, u);
});
}
}, fe = function() {
y(!1), a();
};
return window.addEventListener("mousemove", le), window.addEventListener("touchmove", le), window.addEventListener("mouseup", fe), window.addEventListener("touchend", fe), function() {
window.removeEventListener("mousemove", le), window.removeEventListener("touchmove", le), window.removeEventListener("mouseup", fe), window.removeEventListener("touchend", fe), Cs.cancel(ce);
};
}
}, [p]), _.useEffect(function() {
H();
}, [s]), _.useImperativeHandle(e, function() {
return {
delayHidden: H
};
});
var he = "".concat(t, "-scrollbar"), xe = {
position: "absolute",
visibility: I ? null : "hidden"
}, Ee = {
position: "absolute",
background: "rgba(0, 0, 0, 0.5)",
borderRadius: 99,
cursor: "pointer",
userSelect: "none"
};
return u ? (xe.height = 8, xe.left = 0, xe.right = 0, xe.bottom = 0, Ee.height = "100%", Ee.width = c, W ? Ee.left = J : Ee.right = J) : (xe.width = 8, xe.top = 0, xe.bottom = 0, W ? xe.right = 0 : xe.left = 0, Ee.width = "100%", Ee.height = c, Ee.top = J), /* @__PURE__ */ _.createElement("div", {
ref: N,
className: pt(he, Ye(Ye(Ye({}, "".concat(he, "-horizontal"), u), "".concat(he, "-vertical"), !u), "".concat(he, "-visible"), I)),
style: je(je({}, xe), h),
onMouseDown: q,
onMouseMove: H
}, /* @__PURE__ */ _.createElement("div", {
ref: M,
className: pt("".concat(he, "-thumb"), Ye({}, "".concat(he, "-thumb-moving"), p)),
style: je(je({}, Ee), m),
onMouseDown: Q
}));
}), vj = 20;
function aR() {
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, t = n / e * n;
return isNaN(t) && (t = 0), t = Math.max(t, vj), Math.floor(t);
}
var wj = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "scrollWidth", "component", "onScroll", "onVirtualScroll", "onVisibleChange", "innerProps", "extraRender", "styles"], Sj = [], Fj = {
overflowY: "auto",
overflowAnchor: "none"
};
function _j(n, e) {
var t = n.prefixCls, i = t === void 0 ? "rc-virtual-list" : t, s = n.className, o = n.height, r = n.itemHeight, a = n.fullHeight, l = a === void 0 ? !0 : a, u = n.style, c = n.data, d = n.children, h = n.itemKey, m = n.virtual, g = n.direction, f = n.scrollWidth, p = n.component, y = p === void 0 ? "div" : p, C = n.onScroll, w = n.onVirtualScroll, v = n.onVisibleChange, S = n.innerProps, F = n.extraRender, L = n.styles, x = wo(n, wj), D = _.useCallback(function(Oe) {
return typeof h == "function" ? h(Oe) : Oe == null ? void 0 : Oe[h];
}, [h]), W = pj(D), N = Te(W, 4), M = N[0], R = N[1], T = N[2], I = N[3], V = !!(m !== !1 && o && r), B = _.useMemo(function() {
return Object.values(T.maps).reduce(function(Oe, tt) {
return Oe + tt;
}, 0);
}, [T.id, T.maps]), H = V && c && (Math.max(r * c.length, B) > o || !!f), O = g === "rtl", E = pt(i, Ye({}, "".concat(i, "-rtl"), O), s), J = c || Sj, q = _.useRef(), Z = _.useRef(), Q = _.useRef(), re = _.useState(0), ge = Te(re, 2), he = ge[0], xe = ge[1], Ee = _.useState(0), ce = Te(Ee, 2), le = ce[0], fe = ce[1], pe = _.useState(!1), ye = Te(pe, 2), Pe = ye[0], He = ye[1], Xe = function() {
He(!0);
}, nt = function() {
He(!1);
}, wt = {
getKey: D
};
function Rt(Oe) {
xe(function(tt) {
var Wt;
typeof Oe == "function" ? Wt = Oe(tt) : Wt = Oe;
var Gt = Ui(Wt);
return q.current.scrollTop = Gt, Gt;
});
}
var Tt = _.useRef({
start: 0,
end: J.length
}), Vt = _.useRef(), ei = hj(J, D), jt = Te(ei, 1), ue = jt[0];
Vt.current = ue;
var De = _.useMemo(function() {
if (!V)
return {
scrollHeight: void 0,
start: 0,
end: J.length - 1,
offset: void 0
};
if (!H) {
var Oe;
return {
scrollHeight: ((Oe = Z.current) === null || Oe === void 0 ? void 0 : Oe.offsetHeight) || 0,
start: 0,
end: J.length - 1,
offset: void 0
};
}
for (var tt = 0, Wt, Gt, _n, Ds = J.length, ps = 0; ps < Ds; ps += 1) {
var gl = J[ps], xc = D(gl), pu = T.get(xc), fl = tt + (pu === void 0 ? r : pu);
fl >= he && Wt === void 0 && (Wt = ps, Gt = tt), fl > he + o && _n === void 0 && (_n = ps), tt = fl;
}
return Wt === void 0 && (Wt = 0, Gt = 0, _n = Math.ceil(o / r)), _n === void 0 && (_n = J.length - 1), _n = Math.min(_n + 1, J.length - 1), {
scrollHeight: tt,
start: Wt,
end: _n,
offset: Gt
};
}, [H, V, he, J, I, o]), Ae = De.scrollHeight, it = De.start, et = De.end, yt = De.offset;
Tt.current.start = it, Tt.current.end = et;
var Ft = _.useState({
width: 0,
height: o
}), ut = Te(Ft, 2), Je = ut[0], Ce = ut[1], Ie = function(tt) {
Ce({
width: tt.offsetWidth,
height: tt.offsetHeight
});
}, be = _.useRef(), Fe = _.useRef(), Ge = _.useMemo(function() {
return aR(Je.width, f);
}, [Je.width, f]), ct = _.useMemo(function() {
return aR(Je.height, Ae);
}, [Je.height, Ae]), si = Ae - o, Ai = _.useRef(si);
Ai.current = si;
function Ui(Oe) {
var tt = Oe;
return Number.isNaN(Ai.current) || (tt = Math.min(tt, Ai.current)), tt = Math.max(tt, 0), tt;
}
var cn = he <= 0, Wn = he >= si, dn = le <= 0, hn = le >= f, dt = fB(cn, Wn, dn, hn), P = function() {
return {
x: O ? -le : le,
y: he
};
}, z = _.useRef(P()), Y = Ss(function(Oe) {
if (w) {
var tt = je(je({}, P()), Oe);
(z.current.x !== tt.x || z.current.y !== tt.y) && (w(tt), z.current = tt);
}
});
function K(Oe, tt) {
var Wt = Oe;
tt ? (cw.flushSync(function() {
fe(Wt);
}), Y()) : Rt(Wt);
}
function j(Oe) {
var tt = Oe.currentTarget.scrollTop;
tt !== he && Rt(tt), C == null || C(Oe), Y();
}
var ee = function(tt) {
var Wt = tt, Gt = f ? f - Je.width : 0;
return Wt = Math.max(Wt, 0), Wt = Math.min(Wt, Gt), Wt;
}, ae = Ss(function(Oe, tt) {
tt ? (cw.flushSync(function() {
fe(function(Wt) {
var Gt = Wt + (O ? -Oe : Oe);
return ee(Gt);
});
}), Y()) : Rt(function(Wt) {
var Gt = Wt + Oe;
return Gt;
});
}), ke = mj(V, cn, Wn, dn, hn, !!f, ae), Me = Te(ke, 2), ht = Me[0], It = Me[1];
bj(V, q, function(Oe, tt, Wt) {
return dt(Oe, tt, Wt) ? !1 : (ht({
preventDefault: function() {
},
deltaX: Oe ? tt : 0,
deltaY: Oe ? 0 : tt
}), !0);
}), ar(function() {
function Oe(Wt) {
V