2459 lines
83 KiB
JavaScript
2459 lines
83 KiB
JavaScript
"use strict";
|
|
(self.webpackChunk_N_E = self.webpackChunk_N_E || []).push([
|
|
[5628],
|
|
{
|
|
85628: function (e, t, n) {
|
|
n.d(t, {
|
|
Z: function () {
|
|
return e4;
|
|
},
|
|
});
|
|
var o,
|
|
i,
|
|
r = n(75782),
|
|
u = n(51163),
|
|
a = n(40936),
|
|
c = n(49962),
|
|
s = n(60790),
|
|
l = n(65782),
|
|
p = n(76614),
|
|
f = n(24572),
|
|
d = n(59496),
|
|
h = n(87995),
|
|
m = n(25532),
|
|
v = n(50931),
|
|
g = n(47946),
|
|
y = n(75729),
|
|
w = n(26723),
|
|
b = n(21982),
|
|
Z = (0, d.forwardRef)(function (e, t) {
|
|
var n = e.didUpdate,
|
|
o = e.getContainer,
|
|
i = e.children,
|
|
r = (0, d.useRef)(),
|
|
u = (0, d.useRef)();
|
|
(0, d.useImperativeHandle)(t, function () {
|
|
return {};
|
|
});
|
|
var a = (0, d.useRef)(!1);
|
|
return (
|
|
!a.current &&
|
|
(0, b.Z)() &&
|
|
((u.current = o()),
|
|
(r.current = u.current.parentNode),
|
|
(a.current = !0)),
|
|
(0, d.useEffect)(function () {
|
|
null == n || n(e);
|
|
}),
|
|
(0, d.useEffect)(function () {
|
|
return (
|
|
null === u.current.parentNode &&
|
|
null !== r.current &&
|
|
r.current.appendChild(u.current),
|
|
function () {
|
|
var e, t;
|
|
null === (e = u.current) ||
|
|
void 0 === e ||
|
|
null === (t = e.parentNode) ||
|
|
void 0 === t ||
|
|
t.removeChild(u.current);
|
|
}
|
|
);
|
|
}, []),
|
|
u.current ? h.createPortal(i, u.current) : null
|
|
);
|
|
}),
|
|
C = n(84875),
|
|
x = n.n(C);
|
|
function T(e, t, n) {
|
|
return n ? e[0] === t[0] : e[0] === t[0] && e[1] === t[1];
|
|
}
|
|
var M = n(91600),
|
|
k = n(68901),
|
|
P = n(64314),
|
|
E = n(86090);
|
|
function O(e) {
|
|
var t = e.prefixCls,
|
|
n = e.motion,
|
|
o = e.animation,
|
|
i = e.transitionName;
|
|
return (
|
|
n ||
|
|
(o
|
|
? { motionName: "".concat(t, "-").concat(o) }
|
|
: i
|
|
? { motionName: i }
|
|
: null)
|
|
);
|
|
}
|
|
function D(e) {
|
|
var t = e.prefixCls,
|
|
n = e.visible,
|
|
o = e.zIndex,
|
|
i = e.mask,
|
|
a = e.maskMotion,
|
|
c = e.maskAnimation,
|
|
s = e.maskTransitionName;
|
|
if (!i) return null;
|
|
var l = {};
|
|
return (
|
|
(a || s || c) &&
|
|
(l = (0, r.Z)(
|
|
{ motionAppear: !0 },
|
|
O({ motion: a, prefixCls: t, transitionName: s, animation: c })
|
|
)),
|
|
d.createElement(
|
|
E.default,
|
|
(0, u.Z)({}, l, { visible: n, removeOnLeave: !0 }),
|
|
function (e) {
|
|
var n = e.className;
|
|
return d.createElement("div", {
|
|
style: { zIndex: o },
|
|
className: x()("".concat(t, "-mask"), n),
|
|
});
|
|
}
|
|
)
|
|
);
|
|
}
|
|
var S = n(27658),
|
|
R = n(79087),
|
|
H = n(23494),
|
|
N = n(72574);
|
|
function V(e, t) {
|
|
var n = Object.keys(e);
|
|
if (Object.getOwnPropertySymbols) {
|
|
var o = Object.getOwnPropertySymbols(e);
|
|
t &&
|
|
(o = o.filter(function (t) {
|
|
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
})),
|
|
n.push.apply(n, o);
|
|
}
|
|
return n;
|
|
}
|
|
function A(e) {
|
|
for (var t = 1; t < arguments.length; t++) {
|
|
var n = null != arguments[t] ? arguments[t] : {};
|
|
t % 2
|
|
? V(Object(n), !0).forEach(function (t) {
|
|
j(e, t, n[t]);
|
|
})
|
|
: Object.getOwnPropertyDescriptors
|
|
? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n))
|
|
: V(Object(n)).forEach(function (t) {
|
|
Object.defineProperty(
|
|
e,
|
|
t,
|
|
Object.getOwnPropertyDescriptor(n, t)
|
|
);
|
|
});
|
|
}
|
|
return e;
|
|
}
|
|
function L(e) {
|
|
return (L =
|
|
"function" == typeof Symbol && "symbol" == typeof Symbol.iterator
|
|
? function (e) {
|
|
return typeof e;
|
|
}
|
|
: function (e) {
|
|
return e &&
|
|
"function" == typeof Symbol &&
|
|
e.constructor === Symbol &&
|
|
e !== Symbol.prototype
|
|
? "symbol"
|
|
: typeof e;
|
|
})(e);
|
|
}
|
|
function j(e, t, n) {
|
|
return (
|
|
t in e
|
|
? Object.defineProperty(e, t, {
|
|
value: n,
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
})
|
|
: (e[t] = n),
|
|
e
|
|
);
|
|
}
|
|
var W = { Webkit: "-webkit-", Moz: "-moz-", ms: "-ms-", O: "-o-" };
|
|
function B() {
|
|
if (void 0 !== o) return o;
|
|
o = "";
|
|
var e = document.createElement("p").style;
|
|
for (var t in W) t + "Transform" in e && (o = t);
|
|
return o;
|
|
}
|
|
function F() {
|
|
return B()
|
|
? "".concat(B(), "TransitionProperty")
|
|
: "transitionProperty";
|
|
}
|
|
function z() {
|
|
return B() ? "".concat(B(), "Transform") : "transform";
|
|
}
|
|
function Y(e, t) {
|
|
var n = F();
|
|
n &&
|
|
((e.style[n] = t),
|
|
"transitionProperty" !== n && (e.style.transitionProperty = t));
|
|
}
|
|
function I(e, t) {
|
|
var n = z();
|
|
n && ((e.style[n] = t), "transform" !== n && (e.style.transform = t));
|
|
}
|
|
var X = /matrix\((.*)\)/,
|
|
_ = /matrix3d\((.*)\)/,
|
|
U = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source;
|
|
function $(e) {
|
|
var t = e.style.display;
|
|
(e.style.display = "none"), e.offsetHeight, (e.style.display = t);
|
|
}
|
|
function q(e, t, n) {
|
|
var o = n;
|
|
if ("object" === L(t)) {
|
|
for (var r in t) t.hasOwnProperty(r) && q(e, r, t[r]);
|
|
return;
|
|
}
|
|
if (void 0 !== o) {
|
|
"number" == typeof o && (o = "".concat(o, "px")), (e.style[t] = o);
|
|
return;
|
|
}
|
|
return i(e, t);
|
|
}
|
|
function Q(e, t) {
|
|
var n = e["page".concat(t ? "Y" : "X", "Offset")],
|
|
o = "scroll".concat(t ? "Top" : "Left");
|
|
if ("number" != typeof n) {
|
|
var i = e.document;
|
|
"number" != typeof (n = i.documentElement[o]) && (n = i.body[o]);
|
|
}
|
|
return n;
|
|
}
|
|
function G(e) {
|
|
return Q(e, !0);
|
|
}
|
|
function J(e) {
|
|
var t,
|
|
n,
|
|
o,
|
|
i,
|
|
r,
|
|
u,
|
|
a,
|
|
c,
|
|
s =
|
|
((u = (r = e.ownerDocument).body),
|
|
(a = r && r.documentElement),
|
|
(o = Math.floor((n = e.getBoundingClientRect()).left)),
|
|
(i = Math.floor(n.top)),
|
|
{
|
|
left: (o -= a.clientLeft || u.clientLeft || 0),
|
|
top: (i -= a.clientTop || u.clientTop || 0),
|
|
}),
|
|
l = e.ownerDocument,
|
|
p = l.defaultView || l.parentWindow;
|
|
return (s.left += Q(p)), (s.top += G(p)), s;
|
|
}
|
|
function K(e) {
|
|
return null != e && e == e.window;
|
|
}
|
|
function ee(e) {
|
|
return K(e) ? e.document : 9 === e.nodeType ? e : e.ownerDocument;
|
|
}
|
|
var et = RegExp("^(".concat(U, ")(?!px)[a-z%]+$"), "i"),
|
|
en = /^(top|right|bottom|left)$/,
|
|
eo = "currentStyle",
|
|
ei = "runtimeStyle",
|
|
er = "left";
|
|
function eu(e, t) {
|
|
return "left" === e
|
|
? t.useCssRight
|
|
? "right"
|
|
: e
|
|
: t.useCssBottom
|
|
? "bottom"
|
|
: e;
|
|
}
|
|
function ea(e) {
|
|
return "left" === e
|
|
? "right"
|
|
: "right" === e
|
|
? "left"
|
|
: "top" === e
|
|
? "bottom"
|
|
: "bottom" === e
|
|
? "top"
|
|
: void 0;
|
|
}
|
|
function ec(e, t, n) {
|
|
"static" === q(e, "position") && (e.style.position = "relative");
|
|
var o,
|
|
i = -999,
|
|
r = -999,
|
|
u = eu("left", n),
|
|
a = eu("top", n),
|
|
c = ea(u),
|
|
s = ea(a);
|
|
"left" !== u && (i = 999), "top" !== a && (r = 999);
|
|
var l = "",
|
|
p = J(e);
|
|
("left" in t || "top" in t) &&
|
|
((l = (o = e).style.transitionProperty || o.style[F()] || ""),
|
|
Y(e, "none")),
|
|
"left" in t && ((e.style[c] = ""), (e.style[u] = "".concat(i, "px"))),
|
|
"top" in t && ((e.style[s] = ""), (e.style[a] = "".concat(r, "px"))),
|
|
$(e);
|
|
var f = J(e),
|
|
d = {};
|
|
for (var h in t)
|
|
if (t.hasOwnProperty(h)) {
|
|
var m = eu(h, n),
|
|
v = "left" === h ? i : r,
|
|
g = p[h] - f[h];
|
|
m === h ? (d[m] = v + g) : (d[m] = v - g);
|
|
}
|
|
q(e, d), $(e), ("left" in t || "top" in t) && Y(e, l);
|
|
var y = {};
|
|
for (var w in t)
|
|
if (t.hasOwnProperty(w)) {
|
|
var b = eu(w, n),
|
|
Z = t[w] - p[w];
|
|
w === b ? (y[b] = d[b] + Z) : (y[b] = d[b] - Z);
|
|
}
|
|
q(e, y);
|
|
}
|
|
function es(e, t) {
|
|
for (var n = 0; n < e.length; n++) t(e[n]);
|
|
}
|
|
function el(e) {
|
|
return "border-box" === i(e, "boxSizing");
|
|
}
|
|
"undefined" != typeof window &&
|
|
(i = window.getComputedStyle
|
|
? function (e, t, n) {
|
|
var o = n,
|
|
i = "",
|
|
r = ee(e);
|
|
return (
|
|
(o = o || r.defaultView.getComputedStyle(e, null)) &&
|
|
(i = o.getPropertyValue(t) || o[t]),
|
|
i
|
|
);
|
|
}
|
|
: function (e, t) {
|
|
var n = e[eo] && e[eo][t];
|
|
if (et.test(n) && !en.test(t)) {
|
|
var o = e.style,
|
|
i = o[er],
|
|
r = e[ei][er];
|
|
(e[ei][er] = e[eo][er]),
|
|
(o[er] = "fontSize" === t ? "1em" : n || 0),
|
|
(n = o.pixelLeft + "px"),
|
|
(o[er] = i),
|
|
(e[ei][er] = r);
|
|
}
|
|
return "" === n ? "auto" : n;
|
|
});
|
|
var ep = ["margin", "border", "padding"];
|
|
function ef(e, t, n) {
|
|
var o,
|
|
r,
|
|
u,
|
|
a = 0;
|
|
for (r = 0; r < t.length; r++)
|
|
if ((o = t[r]))
|
|
for (u = 0; u < n.length; u++) {
|
|
var c = void 0;
|
|
a +=
|
|
parseFloat(
|
|
i(
|
|
e,
|
|
"border" === o
|
|
? "".concat(o).concat(n[u], "Width")
|
|
: o + n[u]
|
|
)
|
|
) || 0;
|
|
}
|
|
return a;
|
|
}
|
|
var ed = {
|
|
getParent: function (e) {
|
|
var t = e;
|
|
do t = 11 === t.nodeType && t.host ? t.host : t.parentNode;
|
|
while (t && 1 !== t.nodeType && 9 !== t.nodeType);
|
|
return t;
|
|
},
|
|
};
|
|
function eh(e, t, n) {
|
|
var o = n;
|
|
if (K(e))
|
|
return "width" === t ? ed.viewportWidth(e) : ed.viewportHeight(e);
|
|
if (9 === e.nodeType)
|
|
return "width" === t ? ed.docWidth(e) : ed.docHeight(e);
|
|
var r = "width" === t ? ["Left", "Right"] : ["Top", "Bottom"],
|
|
u =
|
|
"width" === t
|
|
? Math.floor(e.getBoundingClientRect().width)
|
|
: Math.floor(e.getBoundingClientRect().height),
|
|
a = el(e),
|
|
c = 0;
|
|
(null == u || u <= 0) &&
|
|
((u = void 0),
|
|
(null === (c = i(e, t)) || void 0 === c || 0 > Number(c)) &&
|
|
(c = e.style[t] || 0),
|
|
(c = Math.floor(parseFloat(c)) || 0)),
|
|
void 0 === o && (o = a ? 1 : -1);
|
|
var s = void 0 !== u || a,
|
|
l = u || c;
|
|
return -1 === o
|
|
? s
|
|
? l - ef(e, ["border", "padding"], r)
|
|
: c
|
|
: s
|
|
? 1 === o
|
|
? l
|
|
: l + (2 === o ? -ef(e, ["border"], r) : ef(e, ["margin"], r))
|
|
: c + ef(e, ep.slice(o), r);
|
|
}
|
|
es(["Width", "Height"], function (e) {
|
|
(ed["doc".concat(e)] = function (t) {
|
|
var n = t.document;
|
|
return Math.max(
|
|
n.documentElement["scroll".concat(e)],
|
|
n.body["scroll".concat(e)],
|
|
ed["viewport".concat(e)](n)
|
|
);
|
|
}),
|
|
(ed["viewport".concat(e)] = function (t) {
|
|
var n = "client".concat(e),
|
|
o = t.document,
|
|
i = o.body,
|
|
r = o.documentElement[n];
|
|
return ("CSS1Compat" === o.compatMode && r) || (i && i[n]) || r;
|
|
});
|
|
});
|
|
var em = { position: "absolute", visibility: "hidden", display: "block" };
|
|
function ev() {
|
|
for (var e, t = arguments.length, n = Array(t), o = 0; o < t; o++)
|
|
n[o] = arguments[o];
|
|
var i = n[0];
|
|
return (
|
|
0 !== i.offsetWidth
|
|
? (e = eh.apply(void 0, n))
|
|
: (function (e, t, n) {
|
|
var o,
|
|
i = {},
|
|
r = e.style;
|
|
for (o in t)
|
|
t.hasOwnProperty(o) && ((i[o] = r[o]), (r[o] = t[o]));
|
|
for (o in (n.call(e), t)) t.hasOwnProperty(o) && (r[o] = i[o]);
|
|
})(i, em, function () {
|
|
e = eh.apply(void 0, n);
|
|
}),
|
|
e
|
|
);
|
|
}
|
|
function eg(e, t) {
|
|
for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
return e;
|
|
}
|
|
es(["width", "height"], function (e) {
|
|
var t = e.charAt(0).toUpperCase() + e.slice(1);
|
|
ed["outer".concat(t)] = function (t, n) {
|
|
return t && ev(t, e, n ? 0 : 1);
|
|
};
|
|
var n = "width" === e ? ["Left", "Right"] : ["Top", "Bottom"];
|
|
ed[e] = function (t, o) {
|
|
var i = o;
|
|
if (void 0 !== i)
|
|
return t
|
|
? (el(t) && (i += ef(t, ["padding", "border"], n)), q(t, e, i))
|
|
: void 0;
|
|
return t && ev(t, e, -1);
|
|
};
|
|
});
|
|
var ey = {
|
|
getWindow: function (e) {
|
|
if (e && e.document && e.setTimeout) return e;
|
|
var t = e.ownerDocument || e;
|
|
return t.defaultView || t.parentWindow;
|
|
},
|
|
getDocument: ee,
|
|
offset: function (e, t, n) {
|
|
if (void 0 === t) return J(e);
|
|
!(function (e, t, n) {
|
|
if (n.ignoreShake) {
|
|
var o,
|
|
i,
|
|
r,
|
|
u,
|
|
a,
|
|
c = J(e),
|
|
s = c.left.toFixed(0),
|
|
l = c.top.toFixed(0),
|
|
p = t.left.toFixed(0),
|
|
f = t.top.toFixed(0);
|
|
if (s === p && l === f) return;
|
|
}
|
|
n.useCssRight || n.useCssBottom
|
|
? ec(e, t, n)
|
|
: n.useCssTransform && z() in document.body.style
|
|
? ((o = e),
|
|
(i = t),
|
|
(r = J(o)),
|
|
(a = {
|
|
x: (u = (function (e) {
|
|
var t = window.getComputedStyle(e, null),
|
|
n =
|
|
t.getPropertyValue("transform") ||
|
|
t.getPropertyValue(z());
|
|
if (n && "none" !== n) {
|
|
var o = n.replace(/[^0-9\-.,]/g, "").split(",");
|
|
return {
|
|
x: parseFloat(o[12] || o[4], 0),
|
|
y: parseFloat(o[13] || o[5], 0),
|
|
};
|
|
}
|
|
return { x: 0, y: 0 };
|
|
})(o)).x,
|
|
y: u.y,
|
|
}),
|
|
"left" in i && (a.x = u.x + i.left - r.left),
|
|
"top" in i && (a.y = u.y + i.top - r.top),
|
|
(function (e, t) {
|
|
var n = window.getComputedStyle(e, null),
|
|
o =
|
|
n.getPropertyValue("transform") ||
|
|
n.getPropertyValue(z());
|
|
if (o && "none" !== o) {
|
|
var i,
|
|
r = o.match(X);
|
|
r
|
|
? (((i = (r = r[1]).split(",").map(function (e) {
|
|
return parseFloat(e, 10);
|
|
}))[4] = t.x),
|
|
(i[5] = t.y),
|
|
I(e, "matrix(".concat(i.join(","), ")")))
|
|
: (((i = o
|
|
.match(_)[1]
|
|
.split(",")
|
|
.map(function (e) {
|
|
return parseFloat(e, 10);
|
|
}))[12] = t.x),
|
|
(i[13] = t.y),
|
|
I(e, "matrix3d(".concat(i.join(","), ")")));
|
|
} else
|
|
I(
|
|
e,
|
|
"translateX("
|
|
.concat(t.x, "px) translateY(")
|
|
.concat(t.y, "px) translateZ(0)")
|
|
);
|
|
})(o, a))
|
|
: ec(e, t, n);
|
|
})(e, t, n || {});
|
|
},
|
|
isWindow: K,
|
|
each: es,
|
|
css: q,
|
|
clone: function (e) {
|
|
var t,
|
|
n = {};
|
|
for (t in e) e.hasOwnProperty(t) && (n[t] = e[t]);
|
|
if (e.overflow)
|
|
for (t in e) e.hasOwnProperty(t) && (n.overflow[t] = e.overflow[t]);
|
|
return n;
|
|
},
|
|
mix: eg,
|
|
getWindowScrollLeft: function (e) {
|
|
var t;
|
|
return Q(e);
|
|
},
|
|
getWindowScrollTop: function (e) {
|
|
return G(e);
|
|
},
|
|
merge: function () {
|
|
for (var e = {}, t = 0; t < arguments.length; t++)
|
|
ey.mix(e, t < 0 || arguments.length <= t ? void 0 : arguments[t]);
|
|
return e;
|
|
},
|
|
viewportWidth: 0,
|
|
viewportHeight: 0,
|
|
};
|
|
eg(ey, ed);
|
|
var ew = ey.getParent;
|
|
function eb(e) {
|
|
if (ey.isWindow(e) || 9 === e.nodeType) return null;
|
|
var t,
|
|
n = ey.getDocument(e).body,
|
|
o = ey.css(e, "position");
|
|
if (!("fixed" === o || "absolute" === o))
|
|
return "html" === e.nodeName.toLowerCase() ? null : ew(e);
|
|
for (t = ew(e); t && t !== n && 9 !== t.nodeType; t = ew(t))
|
|
if ("static" !== (o = ey.css(t, "position"))) return t;
|
|
return null;
|
|
}
|
|
var eZ = ey.getParent;
|
|
function eC(e, t) {
|
|
for (
|
|
var n = { left: 0, right: 1 / 0, top: 0, bottom: 1 / 0 },
|
|
o = eb(e),
|
|
i = ey.getDocument(e),
|
|
r = i.defaultView || i.parentWindow,
|
|
u = i.body,
|
|
a = i.documentElement;
|
|
o;
|
|
|
|
) {
|
|
if (
|
|
(-1 === navigator.userAgent.indexOf("MSIE") ||
|
|
0 !== o.clientWidth) &&
|
|
o !== u &&
|
|
o !== a &&
|
|
"visible" !== ey.css(o, "overflow")
|
|
) {
|
|
var c = ey.offset(o);
|
|
(c.left += o.clientLeft),
|
|
(c.top += o.clientTop),
|
|
(n.top = Math.max(n.top, c.top)),
|
|
(n.right = Math.min(n.right, c.left + o.clientWidth)),
|
|
(n.bottom = Math.min(n.bottom, c.top + o.clientHeight)),
|
|
(n.left = Math.max(n.left, c.left));
|
|
} else if (o === u || o === a) break;
|
|
o = eb(o);
|
|
}
|
|
var s = null;
|
|
!ey.isWindow(e) &&
|
|
9 !== e.nodeType &&
|
|
((s = e.style.position),
|
|
"absolute" === ey.css(e, "position") && (e.style.position = "fixed"));
|
|
var l = ey.getWindowScrollLeft(r),
|
|
p = ey.getWindowScrollTop(r),
|
|
f = ey.viewportWidth(r),
|
|
d = ey.viewportHeight(r),
|
|
h = a.scrollWidth,
|
|
m = a.scrollHeight,
|
|
v = window.getComputedStyle(u);
|
|
if (
|
|
("hidden" === v.overflowX && (h = r.innerWidth),
|
|
"hidden" === v.overflowY && (m = r.innerHeight),
|
|
e.style && (e.style.position = s),
|
|
t ||
|
|
(function (e) {
|
|
if (ey.isWindow(e) || 9 === e.nodeType) return !1;
|
|
var t = ey.getDocument(e),
|
|
n = t.body,
|
|
o = null;
|
|
for (o = eZ(e); o && o !== n && o !== t; o = eZ(o))
|
|
if ("fixed" === ey.css(o, "position")) return !0;
|
|
return !1;
|
|
})(e))
|
|
)
|
|
(n.left = Math.max(n.left, l)),
|
|
(n.top = Math.max(n.top, p)),
|
|
(n.right = Math.min(n.right, l + f)),
|
|
(n.bottom = Math.min(n.bottom, p + d));
|
|
else {
|
|
var g = Math.max(h, l + f);
|
|
n.right = Math.min(n.right, g);
|
|
var y = Math.max(m, p + d);
|
|
n.bottom = Math.min(n.bottom, y);
|
|
}
|
|
return n.top >= 0 && n.left >= 0 && n.bottom > n.top && n.right > n.left
|
|
? n
|
|
: null;
|
|
}
|
|
function ex(e) {
|
|
if (ey.isWindow(e) || 9 === e.nodeType) {
|
|
var t,
|
|
n,
|
|
o,
|
|
i = ey.getWindow(e);
|
|
(t = {
|
|
left: ey.getWindowScrollLeft(i),
|
|
top: ey.getWindowScrollTop(i),
|
|
}),
|
|
(n = ey.viewportWidth(i)),
|
|
(o = ey.viewportHeight(i));
|
|
} else
|
|
(t = ey.offset(e)), (n = ey.outerWidth(e)), (o = ey.outerHeight(e));
|
|
return (t.width = n), (t.height = o), t;
|
|
}
|
|
function eT(e, t) {
|
|
var n = t.charAt(0),
|
|
o = t.charAt(1),
|
|
i = e.width,
|
|
r = e.height,
|
|
u = e.left,
|
|
a = e.top;
|
|
return (
|
|
"c" === n ? (a += r / 2) : "b" === n && (a += r),
|
|
"c" === o ? (u += i / 2) : "r" === o && (u += i),
|
|
{ left: u, top: a }
|
|
);
|
|
}
|
|
function eM(e, t, n, o, i) {
|
|
var r = eT(t, n[1]),
|
|
u = eT(e, n[0]),
|
|
a = [u.left - r.left, u.top - r.top];
|
|
return {
|
|
left: Math.round(e.left - a[0] + o[0] - i[0]),
|
|
top: Math.round(e.top - a[1] + o[1] - i[1]),
|
|
};
|
|
}
|
|
function ek(e, t, n) {
|
|
return e.left < n.left || e.left + t.width > n.right;
|
|
}
|
|
function eP(e, t, n) {
|
|
return e.top < n.top || e.top + t.height > n.bottom;
|
|
}
|
|
function eE(e, t, n) {
|
|
var o = [];
|
|
return (
|
|
ey.each(e, function (e) {
|
|
o.push(
|
|
e.replace(t, function (e) {
|
|
return n[e];
|
|
})
|
|
);
|
|
}),
|
|
o
|
|
);
|
|
}
|
|
function eO(e, t) {
|
|
return (e[t] = -e[t]), e;
|
|
}
|
|
function eD(e, t) {
|
|
var n;
|
|
return (
|
|
(/%$/.test(e)
|
|
? (parseInt(e.substring(0, e.length - 1), 10) / 100) * t
|
|
: parseInt(e, 10)) || 0
|
|
);
|
|
}
|
|
function eS(e, t) {
|
|
(e[0] = eD(e[0], t.width)), (e[1] = eD(e[1], t.height));
|
|
}
|
|
function eR(e, t, n, o) {
|
|
var i = n.points,
|
|
r = n.offset || [0, 0],
|
|
u = n.targetOffset || [0, 0],
|
|
a = n.overflow,
|
|
c = n.source || e;
|
|
(r = [].concat(r)), (u = [].concat(u));
|
|
var s = {},
|
|
l = 0,
|
|
p = !!(a = a || {}).alwaysByViewport,
|
|
f = eC(c, p),
|
|
d = ex(c);
|
|
eS(r, d), eS(u, t);
|
|
var h = eM(d, t, i, r, u),
|
|
m = ey.merge(d, h);
|
|
if (f && (a.adjustX || a.adjustY) && o) {
|
|
if (a.adjustX && ek(h, d, f)) {
|
|
var v,
|
|
g,
|
|
y,
|
|
w,
|
|
b,
|
|
Z,
|
|
C,
|
|
x,
|
|
T,
|
|
M = eE(i, /[lr]/gi, { l: "r", r: "l" }),
|
|
k = eO(r, 0),
|
|
P = eO(u, 0);
|
|
!((C = eM(d, t, M, k, P)).left > f.right) &&
|
|
!(C.left + d.width < f.left) &&
|
|
((l = 1), (i = M), (r = k), (u = P));
|
|
}
|
|
if (a.adjustY && eP(h, d, f)) {
|
|
var E,
|
|
O,
|
|
D,
|
|
S = eE(i, /[tb]/gi, { t: "b", b: "t" }),
|
|
R = eO(r, 1),
|
|
H = eO(u, 1);
|
|
!((E = eM(d, t, S, R, H)).top > f.bottom) &&
|
|
!(E.top + d.height < f.top) &&
|
|
((l = 1), (i = S), (r = R), (u = H));
|
|
}
|
|
l && ((h = eM(d, t, i, r, u)), ey.mix(m, h));
|
|
var N = ek(h, d, f),
|
|
V = eP(h, d, f);
|
|
if (N || V) {
|
|
var A = i;
|
|
N && (A = eE(i, /[lr]/gi, { l: "r", r: "l" })),
|
|
V && (A = eE(i, /[tb]/gi, { t: "b", b: "t" })),
|
|
(i = A),
|
|
(r = n.offset || [0, 0]),
|
|
(u = n.targetOffset || [0, 0]);
|
|
}
|
|
(s.adjustX = a.adjustX && N),
|
|
(s.adjustY = a.adjustY && V),
|
|
(s.adjustX || s.adjustY) &&
|
|
((v = h),
|
|
(g = d),
|
|
(y = f),
|
|
(w = s),
|
|
(b = ey.clone(v)),
|
|
(Z = { width: g.width, height: g.height }),
|
|
w.adjustX && b.left < y.left && (b.left = y.left),
|
|
w.resizeWidth &&
|
|
b.left >= y.left &&
|
|
b.left + Z.width > y.right &&
|
|
(Z.width -= b.left + Z.width - y.right),
|
|
w.adjustX &&
|
|
b.left + Z.width > y.right &&
|
|
(b.left = Math.max(y.right - Z.width, y.left)),
|
|
w.adjustY && b.top < y.top && (b.top = y.top),
|
|
w.resizeHeight &&
|
|
b.top >= y.top &&
|
|
b.top + Z.height > y.bottom &&
|
|
(Z.height -= b.top + Z.height - y.bottom),
|
|
w.adjustY &&
|
|
b.top + Z.height > y.bottom &&
|
|
(b.top = Math.max(y.bottom - Z.height, y.top)),
|
|
(m = ey.mix(b, Z)));
|
|
}
|
|
return (
|
|
m.width !== d.width &&
|
|
ey.css(c, "width", ey.width(c) + m.width - d.width),
|
|
m.height !== d.height &&
|
|
ey.css(c, "height", ey.height(c) + m.height - d.height),
|
|
ey.offset(
|
|
c,
|
|
{ left: m.left, top: m.top },
|
|
{
|
|
useCssRight: n.useCssRight,
|
|
useCssBottom: n.useCssBottom,
|
|
useCssTransform: n.useCssTransform,
|
|
ignoreShake: n.ignoreShake,
|
|
}
|
|
),
|
|
{ points: i, offset: r, targetOffset: u, overflow: s }
|
|
);
|
|
}
|
|
function eH(e, t, n) {
|
|
var o,
|
|
i,
|
|
r,
|
|
u,
|
|
a = n.target || t,
|
|
c = ex(a),
|
|
s =
|
|
((r = eC(a, (i = n.overflow && n.overflow.alwaysByViewport))),
|
|
(u = ex(a)),
|
|
!!r &&
|
|
!(u.left + u.width <= r.left) &&
|
|
!(u.top + u.height <= r.top) &&
|
|
!(u.left >= r.right) &&
|
|
!(u.top >= r.bottom));
|
|
return eR(e, c, n, s);
|
|
}
|
|
(eH.__getOffsetParent = eb), (eH.__getVisibleRectForElement = eC);
|
|
var eN = n(31223),
|
|
eV = n.n(eN),
|
|
eA = n(73023),
|
|
eL = n(31545);
|
|
function ej(e, t) {
|
|
var n = null,
|
|
o = null,
|
|
i = new eA.Z(function (e) {
|
|
var i = (0, S.Z)(e, 1)[0].target;
|
|
if (document.documentElement.contains(i)) {
|
|
var r = i.getBoundingClientRect(),
|
|
u = r.width,
|
|
a = r.height,
|
|
c = Math.floor(u),
|
|
s = Math.floor(a);
|
|
(n !== c || o !== s) &&
|
|
Promise.resolve().then(function () {
|
|
t({ width: c, height: s });
|
|
}),
|
|
(n = c),
|
|
(o = s);
|
|
}
|
|
});
|
|
return (
|
|
e && i.observe(e),
|
|
function () {
|
|
i.disconnect();
|
|
}
|
|
);
|
|
}
|
|
var eW = function (e, t) {
|
|
var n = d.useRef(!1),
|
|
o = d.useRef(null);
|
|
function i() {
|
|
window.clearTimeout(o.current);
|
|
}
|
|
return [
|
|
function r(u) {
|
|
if ((i(), n.current && !0 !== u))
|
|
o.current = window.setTimeout(function () {
|
|
(n.current = !1), r();
|
|
}, t);
|
|
else {
|
|
if (!1 === e()) return;
|
|
(n.current = !0),
|
|
(o.current = window.setTimeout(function () {
|
|
n.current = !1;
|
|
}, t));
|
|
}
|
|
},
|
|
function () {
|
|
(n.current = !1), i();
|
|
},
|
|
];
|
|
};
|
|
function eB(e) {
|
|
return "function" != typeof e ? null : e();
|
|
}
|
|
function eF(e) {
|
|
return "object" === (0, R.Z)(e) && e ? e : null;
|
|
}
|
|
var ez = function (e, t) {
|
|
var n = e.children,
|
|
o = e.disabled,
|
|
i = e.target,
|
|
r = e.align,
|
|
u = e.onAlign,
|
|
a = e.monitorWindowResize,
|
|
c = e.monitorBufferTime,
|
|
s = d.useRef({}),
|
|
l = d.useRef(),
|
|
p = d.Children.only(n),
|
|
f = d.useRef({});
|
|
(f.current.disabled = o),
|
|
(f.current.target = i),
|
|
(f.current.align = r),
|
|
(f.current.onAlign = u);
|
|
var m = eW(
|
|
function () {
|
|
var e = f.current,
|
|
t = e.disabled,
|
|
n = e.target,
|
|
o = e.align,
|
|
i = e.onAlign;
|
|
if (!t && n) {
|
|
var r,
|
|
u,
|
|
a,
|
|
c,
|
|
p,
|
|
d,
|
|
h,
|
|
m,
|
|
v,
|
|
g,
|
|
y,
|
|
w,
|
|
b,
|
|
Z,
|
|
C,
|
|
x,
|
|
T,
|
|
M = l.current,
|
|
k = eB(n),
|
|
P = eF(n);
|
|
(s.current.element = k),
|
|
(s.current.point = P),
|
|
(s.current.align = o);
|
|
var E = document.activeElement;
|
|
return (
|
|
k && (0, N.Z)(k)
|
|
? (T = eH(M, k, o))
|
|
: P &&
|
|
((r = M),
|
|
(u = P),
|
|
(a = o),
|
|
(h =
|
|
(d = ey.getDocument(r)).defaultView ||
|
|
d.parentWindow),
|
|
(m = ey.getWindowScrollLeft(h)),
|
|
(v = ey.getWindowScrollTop(h)),
|
|
(g = ey.viewportWidth(h)),
|
|
(y = ey.viewportHeight(h)),
|
|
(w = {
|
|
left: (c = "pageX" in u ? u.pageX : m + u.clientX),
|
|
top: (p = "pageY" in u ? u.pageY : v + u.clientY),
|
|
width: 0,
|
|
height: 0,
|
|
}),
|
|
(b = c >= 0 && c <= m + g && p >= 0 && p <= v + y),
|
|
(Z = [a.points[0], "cc"]),
|
|
(T = eR(r, w, A(A({}, a), {}, { points: Z }), b))),
|
|
E !== document.activeElement &&
|
|
(0, eL.Z)(M, E) &&
|
|
"function" == typeof E.focus &&
|
|
E.focus(),
|
|
i && T && i(M, T),
|
|
!0
|
|
);
|
|
}
|
|
return !1;
|
|
},
|
|
void 0 === c ? 0 : c
|
|
),
|
|
v = (0, S.Z)(m, 2),
|
|
g = v[0],
|
|
y = v[1],
|
|
w = d.useRef({ cancel: function () {} }),
|
|
b = d.useRef({ cancel: function () {} });
|
|
d.useEffect(function () {
|
|
var e,
|
|
t,
|
|
n = eB(i),
|
|
o = eF(i);
|
|
l.current !== b.current.element &&
|
|
(b.current.cancel(),
|
|
(b.current.element = l.current),
|
|
(b.current.cancel = ej(l.current, g))),
|
|
(s.current.element !== n ||
|
|
((e = s.current.point) !== o &&
|
|
(!e ||
|
|
!o ||
|
|
("pageX" in o && "pageY" in o
|
|
? e.pageX !== o.pageX || e.pageY !== o.pageY
|
|
: !("clientX" in o) ||
|
|
!("clientY" in o) ||
|
|
e.clientX !== o.clientX ||
|
|
e.clientY !== o.clientY))) ||
|
|
!eV()(s.current.align, r)) &&
|
|
(g(),
|
|
w.current.element !== n &&
|
|
(w.current.cancel(),
|
|
(w.current.element = n),
|
|
(w.current.cancel = ej(n, g))));
|
|
}),
|
|
d.useEffect(
|
|
function () {
|
|
o ? y() : g();
|
|
},
|
|
[o]
|
|
);
|
|
var Z = d.useRef(null);
|
|
return (
|
|
d.useEffect(
|
|
function () {
|
|
if (a) {
|
|
if (!Z.current) {
|
|
var e, t, n, o, i;
|
|
Z.current =
|
|
((e = window),
|
|
(t = "resize"),
|
|
(i = h.unstable_batchedUpdates
|
|
? function (e) {
|
|
h.unstable_batchedUpdates(g, e);
|
|
}
|
|
: g),
|
|
null != e &&
|
|
e.addEventListener &&
|
|
e.addEventListener(t, i, o),
|
|
{
|
|
remove: function () {
|
|
null != e &&
|
|
e.removeEventListener &&
|
|
e.removeEventListener(t, i, o);
|
|
},
|
|
});
|
|
}
|
|
} else Z.current && (Z.current.remove(), (Z.current = null));
|
|
},
|
|
[a]
|
|
),
|
|
d.useEffect(function () {
|
|
return function () {
|
|
w.current.cancel(),
|
|
b.current.cancel(),
|
|
Z.current && Z.current.remove(),
|
|
y();
|
|
};
|
|
}, []),
|
|
d.useImperativeHandle(t, function () {
|
|
return {
|
|
forceAlign: function () {
|
|
return g(!0);
|
|
},
|
|
};
|
|
}),
|
|
d.isValidElement(p) &&
|
|
(p = d.cloneElement(p, { ref: (0, H.sQ)(p.ref, l) })),
|
|
p
|
|
);
|
|
},
|
|
eY = d.forwardRef(ez);
|
|
eY.displayName = "Align";
|
|
var eI = n(33750),
|
|
eX = n(99932),
|
|
e_ = n(78450),
|
|
eU = n(93509),
|
|
e$ = ["measure", "alignPre", "align", null, "motion"],
|
|
eq = function (e, t) {
|
|
var n = (0, eU.Z)(null),
|
|
o = (0, M.Z)(n, 2),
|
|
i = o[0],
|
|
r = o[1],
|
|
u = (0, d.useRef)();
|
|
function a(e) {
|
|
r(e, !0);
|
|
}
|
|
function c() {
|
|
m.Z.cancel(u.current);
|
|
}
|
|
return (
|
|
(0, d.useEffect)(
|
|
function () {
|
|
a("measure");
|
|
},
|
|
[e]
|
|
),
|
|
(0, d.useEffect)(
|
|
function () {
|
|
"measure" === i && t(),
|
|
i &&
|
|
(u.current = (0, m.Z)(
|
|
(0, e_.Z)(
|
|
(0, eX.Z)().mark(function e() {
|
|
var t, n;
|
|
return (0, eX.Z)().wrap(function (e) {
|
|
for (;;)
|
|
switch ((e.prev = e.next)) {
|
|
case 0:
|
|
(n = e$[(t = e$.indexOf(i)) + 1]) &&
|
|
-1 !== t &&
|
|
a(n);
|
|
case 3:
|
|
case "end":
|
|
return e.stop();
|
|
}
|
|
}, e);
|
|
})
|
|
)
|
|
));
|
|
},
|
|
[i]
|
|
),
|
|
(0, d.useEffect)(function () {
|
|
return function () {
|
|
c();
|
|
};
|
|
}, []),
|
|
[
|
|
i,
|
|
function (e) {
|
|
c(),
|
|
(u.current = (0, m.Z)(function () {
|
|
a(function (e) {
|
|
switch (i) {
|
|
case "align":
|
|
return "motion";
|
|
case "motion":
|
|
return "stable";
|
|
}
|
|
return e;
|
|
}),
|
|
null == e || e();
|
|
}));
|
|
},
|
|
]
|
|
);
|
|
},
|
|
eQ = function (e) {
|
|
var t = d.useState({ width: 0, height: 0 }),
|
|
n = (0, M.Z)(t, 2),
|
|
o = n[0],
|
|
i = n[1];
|
|
return [
|
|
d.useMemo(
|
|
function () {
|
|
var t = {};
|
|
if (e) {
|
|
var n = o.width,
|
|
i = o.height;
|
|
-1 !== e.indexOf("height") && i
|
|
? (t.height = i)
|
|
: -1 !== e.indexOf("minHeight") && i && (t.minHeight = i),
|
|
-1 !== e.indexOf("width") && n
|
|
? (t.width = n)
|
|
: -1 !== e.indexOf("minWidth") && n && (t.minWidth = n);
|
|
}
|
|
return t;
|
|
},
|
|
[e, o]
|
|
),
|
|
function (e) {
|
|
i({ width: e.offsetWidth, height: e.offsetHeight });
|
|
},
|
|
];
|
|
},
|
|
eG = d.forwardRef(function (e, t) {
|
|
var n = e.visible,
|
|
o = e.prefixCls,
|
|
i = e.className,
|
|
a = e.style,
|
|
c = e.children,
|
|
s = e.zIndex,
|
|
l = e.stretch,
|
|
p = e.destroyPopupOnHide,
|
|
f = e.forceRender,
|
|
h = e.align,
|
|
m = e.point,
|
|
v = e.getRootDomNode,
|
|
g = e.getClassNameFromAlign,
|
|
y = e.onAlign,
|
|
w = e.onMouseEnter,
|
|
b = e.onMouseLeave,
|
|
Z = e.onMouseDown,
|
|
C = e.onTouchStart,
|
|
T = e.onClick,
|
|
k = (0, d.useRef)(),
|
|
P = (0, d.useRef)(),
|
|
D = (0, d.useState)(),
|
|
S = (0, M.Z)(D, 2),
|
|
R = S[0],
|
|
H = S[1],
|
|
N = eQ(l),
|
|
V = (0, M.Z)(N, 2),
|
|
A = V[0],
|
|
L = V[1],
|
|
j = eq(n, function () {
|
|
l && L(v());
|
|
}),
|
|
W = (0, M.Z)(j, 2),
|
|
B = W[0],
|
|
F = W[1],
|
|
z = (0, d.useState)(0),
|
|
Y = (0, M.Z)(z, 2),
|
|
I = Y[0],
|
|
X = Y[1],
|
|
_ = (0, d.useRef)();
|
|
function U() {
|
|
var e;
|
|
null === (e = k.current) || void 0 === e || e.forceAlign();
|
|
}
|
|
function $(e, t) {
|
|
var n = g(t);
|
|
R !== n && H(n),
|
|
X(function (e) {
|
|
return e + 1;
|
|
}),
|
|
"align" === B && (null == y || y(e, t));
|
|
}
|
|
(0, eI.Z)(
|
|
function () {
|
|
"alignPre" === B && X(0);
|
|
},
|
|
[B]
|
|
),
|
|
(0, eI.Z)(
|
|
function () {
|
|
"align" === B &&
|
|
(I < 3
|
|
? U()
|
|
: F(function () {
|
|
var e;
|
|
null === (e = _.current) || void 0 === e || e.call(_);
|
|
}));
|
|
},
|
|
[I]
|
|
);
|
|
var q = (0, r.Z)({}, O(e));
|
|
function Q() {
|
|
return new Promise(function (e) {
|
|
_.current = e;
|
|
});
|
|
}
|
|
["onAppearEnd", "onEnterEnd", "onLeaveEnd"].forEach(function (e) {
|
|
var t = q[e];
|
|
q[e] = function (e, n) {
|
|
return F(), null == t ? void 0 : t(e, n);
|
|
};
|
|
}),
|
|
d.useEffect(
|
|
function () {
|
|
q.motionName || "motion" !== B || F();
|
|
},
|
|
[q.motionName, B]
|
|
),
|
|
d.useImperativeHandle(t, function () {
|
|
return {
|
|
forceAlign: U,
|
|
getElement: function () {
|
|
return P.current;
|
|
},
|
|
};
|
|
});
|
|
var G = (0, r.Z)(
|
|
(0, r.Z)({}, A),
|
|
{},
|
|
{
|
|
zIndex: s,
|
|
opacity: "motion" !== B && "stable" !== B && n ? 0 : void 0,
|
|
pointerEvents: n || "stable" === B ? void 0 : "none",
|
|
},
|
|
a
|
|
),
|
|
J = !0;
|
|
null != h &&
|
|
h.points &&
|
|
("align" === B || "stable" === B) &&
|
|
(J = !1);
|
|
var K = c;
|
|
return (
|
|
d.Children.count(c) > 1 &&
|
|
(K = d.createElement(
|
|
"div",
|
|
{ className: "".concat(o, "-content") },
|
|
c
|
|
)),
|
|
d.createElement(
|
|
E.default,
|
|
(0, u.Z)(
|
|
{
|
|
visible: n,
|
|
ref: P,
|
|
leavedClassName: "".concat(o, "-hidden"),
|
|
},
|
|
q,
|
|
{
|
|
onAppearPrepare: Q,
|
|
onEnterPrepare: Q,
|
|
removeOnLeave: p,
|
|
forceRender: f,
|
|
}
|
|
),
|
|
function (e, t) {
|
|
var n = e.className,
|
|
u = e.style,
|
|
a = x()(o, i, R, n);
|
|
return d.createElement(
|
|
eY,
|
|
{
|
|
target: m || v,
|
|
key: "popup",
|
|
ref: k,
|
|
monitorWindowResize: !0,
|
|
disabled: J,
|
|
align: h,
|
|
onAlign: $,
|
|
},
|
|
d.createElement(
|
|
"div",
|
|
{
|
|
ref: t,
|
|
className: a,
|
|
onMouseEnter: w,
|
|
onMouseLeave: b,
|
|
onMouseDownCapture: Z,
|
|
onTouchStartCapture: C,
|
|
onClick: T,
|
|
style: (0, r.Z)((0, r.Z)({}, u), G),
|
|
},
|
|
K
|
|
)
|
|
);
|
|
}
|
|
)
|
|
);
|
|
});
|
|
eG.displayName = "PopupInner";
|
|
var eJ = d.forwardRef(function (e, t) {
|
|
var n = e.prefixCls,
|
|
o = e.visible,
|
|
i = e.zIndex,
|
|
a = e.children,
|
|
c = e.mobile,
|
|
s = (c = void 0 === c ? {} : c).popupClassName,
|
|
l = c.popupStyle,
|
|
p = c.popupMotion,
|
|
f = c.popupRender,
|
|
h = e.onClick,
|
|
m = d.useRef();
|
|
d.useImperativeHandle(t, function () {
|
|
return {
|
|
forceAlign: function () {},
|
|
getElement: function () {
|
|
return m.current;
|
|
},
|
|
};
|
|
});
|
|
var v = (0, r.Z)({ zIndex: i }, l),
|
|
g = a;
|
|
return (
|
|
d.Children.count(a) > 1 &&
|
|
(g = d.createElement(
|
|
"div",
|
|
{ className: "".concat(n, "-content") },
|
|
a
|
|
)),
|
|
f && (g = f(g)),
|
|
d.createElement(
|
|
E.default,
|
|
(0, u.Z)(
|
|
{ visible: o, ref: m, removeOnLeave: !0 },
|
|
void 0 === p ? {} : p
|
|
),
|
|
function (e, t) {
|
|
var o = e.className,
|
|
i = e.style,
|
|
u = x()(n, s, o);
|
|
return d.createElement(
|
|
"div",
|
|
{
|
|
ref: t,
|
|
className: u,
|
|
onClick: h,
|
|
style: (0, r.Z)((0, r.Z)({}, i), v),
|
|
},
|
|
g
|
|
);
|
|
}
|
|
)
|
|
);
|
|
});
|
|
eJ.displayName = "MobilePopupInner";
|
|
var eK = ["visible", "mobile"],
|
|
e0 = d.forwardRef(function (e, t) {
|
|
var n = e.visible,
|
|
o = e.mobile,
|
|
i = (0, k.Z)(e, eK),
|
|
a = (0, d.useState)(n),
|
|
c = (0, M.Z)(a, 2),
|
|
s = c[0],
|
|
l = c[1],
|
|
p = (0, d.useState)(!1),
|
|
f = (0, M.Z)(p, 2),
|
|
h = f[0],
|
|
m = f[1],
|
|
v = (0, r.Z)((0, r.Z)({}, i), {}, { visible: s });
|
|
(0, d.useEffect)(
|
|
function () {
|
|
l(n), n && o && m((0, P.Z)());
|
|
},
|
|
[n, o]
|
|
);
|
|
var g = h
|
|
? d.createElement(eJ, (0, u.Z)({}, v, { mobile: o, ref: t }))
|
|
: d.createElement(eG, (0, u.Z)({}, v, { ref: t }));
|
|
return d.createElement("div", null, d.createElement(D, v), g);
|
|
});
|
|
e0.displayName = "Popup";
|
|
var e1 = d.createContext(null);
|
|
function e2() {}
|
|
function e9() {
|
|
return "";
|
|
}
|
|
var e5,
|
|
e3,
|
|
e7 = [
|
|
"onClick",
|
|
"onMouseDown",
|
|
"onTouchStart",
|
|
"onMouseEnter",
|
|
"onMouseLeave",
|
|
"onFocus",
|
|
"onBlur",
|
|
"onContextMenu",
|
|
],
|
|
e4 =
|
|
((e3 = (function (e) {
|
|
(0, l.Z)(n, e);
|
|
var t = (0, p.Z)(n);
|
|
function n(e) {
|
|
var o, i;
|
|
return (
|
|
(0, a.Z)(this, n),
|
|
(o = t.call(this, e)),
|
|
(0, f.Z)((0, s.Z)(o), "popupRef", d.createRef()),
|
|
(0, f.Z)((0, s.Z)(o), "triggerRef", d.createRef()),
|
|
(0, f.Z)((0, s.Z)(o), "portalContainer", void 0),
|
|
(0, f.Z)((0, s.Z)(o), "attachId", void 0),
|
|
(0, f.Z)((0, s.Z)(o), "clickOutsideHandler", void 0),
|
|
(0, f.Z)((0, s.Z)(o), "touchOutsideHandler", void 0),
|
|
(0, f.Z)((0, s.Z)(o), "contextMenuOutsideHandler1", void 0),
|
|
(0, f.Z)((0, s.Z)(o), "contextMenuOutsideHandler2", void 0),
|
|
(0, f.Z)((0, s.Z)(o), "mouseDownTimeout", void 0),
|
|
(0, f.Z)((0, s.Z)(o), "focusTime", void 0),
|
|
(0, f.Z)((0, s.Z)(o), "preClickTime", void 0),
|
|
(0, f.Z)((0, s.Z)(o), "preTouchTime", void 0),
|
|
(0, f.Z)((0, s.Z)(o), "delayTimer", void 0),
|
|
(0, f.Z)((0, s.Z)(o), "hasPopupMouseDown", void 0),
|
|
(0, f.Z)((0, s.Z)(o), "onMouseEnter", function (e) {
|
|
var t = o.props.mouseEnterDelay;
|
|
o.fireEvents("onMouseEnter", e),
|
|
o.delaySetPopupVisible(!0, t, t ? null : e);
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "onMouseMove", function (e) {
|
|
o.fireEvents("onMouseMove", e), o.setPoint(e);
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "onMouseLeave", function (e) {
|
|
o.fireEvents("onMouseLeave", e),
|
|
o.delaySetPopupVisible(!1, o.props.mouseLeaveDelay);
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "onPopupMouseEnter", function () {
|
|
o.clearDelayTimer();
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "onPopupMouseLeave", function (e) {
|
|
var t;
|
|
!(
|
|
e.relatedTarget &&
|
|
!e.relatedTarget.setTimeout &&
|
|
(0, v.Z)(
|
|
null === (t = o.popupRef.current) || void 0 === t
|
|
? void 0
|
|
: t.getElement(),
|
|
e.relatedTarget
|
|
)
|
|
) && o.delaySetPopupVisible(!1, o.props.mouseLeaveDelay);
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "onFocus", function (e) {
|
|
o.fireEvents("onFocus", e),
|
|
o.clearDelayTimer(),
|
|
o.isFocusToShow() &&
|
|
((o.focusTime = Date.now()),
|
|
o.delaySetPopupVisible(!0, o.props.focusDelay));
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "onMouseDown", function (e) {
|
|
o.fireEvents("onMouseDown", e), (o.preClickTime = Date.now());
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "onTouchStart", function (e) {
|
|
o.fireEvents("onTouchStart", e),
|
|
(o.preTouchTime = Date.now());
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "onBlur", function (e) {
|
|
o.fireEvents("onBlur", e),
|
|
o.clearDelayTimer(),
|
|
o.isBlurToHide() &&
|
|
o.delaySetPopupVisible(!1, o.props.blurDelay);
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "onContextMenu", function (e) {
|
|
e.preventDefault(),
|
|
o.fireEvents("onContextMenu", e),
|
|
o.setPopupVisible(!0, e);
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "onContextMenuClose", function () {
|
|
o.isContextMenuToShow() && o.close();
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "onClick", function (e) {
|
|
if ((o.fireEvents("onClick", e), o.focusTime)) {
|
|
var t;
|
|
if (
|
|
(o.preClickTime && o.preTouchTime
|
|
? (t = Math.min(o.preClickTime, o.preTouchTime))
|
|
: o.preClickTime
|
|
? (t = o.preClickTime)
|
|
: o.preTouchTime && (t = o.preTouchTime),
|
|
20 > Math.abs(t - o.focusTime))
|
|
)
|
|
return;
|
|
o.focusTime = 0;
|
|
}
|
|
(o.preClickTime = 0),
|
|
(o.preTouchTime = 0),
|
|
o.isClickToShow() &&
|
|
(o.isClickToHide() || o.isBlurToHide()) &&
|
|
e &&
|
|
e.preventDefault &&
|
|
e.preventDefault();
|
|
var n = !o.state.popupVisible;
|
|
((o.isClickToHide() && !n) || (n && o.isClickToShow())) &&
|
|
o.setPopupVisible(!o.state.popupVisible, e);
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "onPopupMouseDown", function () {
|
|
if (
|
|
((o.hasPopupMouseDown = !0),
|
|
clearTimeout(o.mouseDownTimeout),
|
|
(o.mouseDownTimeout = window.setTimeout(function () {
|
|
o.hasPopupMouseDown = !1;
|
|
}, 0)),
|
|
o.context)
|
|
) {
|
|
var e;
|
|
(e = o.context).onPopupMouseDown.apply(e, arguments);
|
|
}
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "onDocumentClick", function (e) {
|
|
if (!o.props.mask || o.props.maskClosable) {
|
|
var t = e.target,
|
|
n = o.getRootDomNode(),
|
|
i = o.getPopupDomNode();
|
|
(!(0, v.Z)(n, t) || o.isContextMenuOnly()) &&
|
|
!(0, v.Z)(i, t) &&
|
|
!o.hasPopupMouseDown &&
|
|
o.close();
|
|
}
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "getRootDomNode", function () {
|
|
var e = o.props.getTriggerDOMNode;
|
|
if (e) return e(o.triggerRef.current);
|
|
try {
|
|
var t = (0, g.Z)(o.triggerRef.current);
|
|
if (t) return t;
|
|
} catch (n) {}
|
|
return h.findDOMNode((0, s.Z)(o));
|
|
}),
|
|
(0, f.Z)(
|
|
(0, s.Z)(o),
|
|
"getPopupClassNameFromAlign",
|
|
function (e) {
|
|
var t = [],
|
|
n = o.props,
|
|
i = n.popupPlacement,
|
|
r = n.builtinPlacements,
|
|
u = n.prefixCls,
|
|
a = n.alignPoint,
|
|
c = n.getPopupClassNameFromAlign;
|
|
return (
|
|
i &&
|
|
r &&
|
|
t.push(
|
|
(function (e, t, n, o) {
|
|
for (
|
|
var i = n.points, r = Object.keys(e), u = 0;
|
|
u < r.length;
|
|
u += 1
|
|
) {
|
|
var a = r[u];
|
|
if (T(e[a].points, i, o))
|
|
return "".concat(t, "-placement-").concat(a);
|
|
}
|
|
return "";
|
|
})(r, u, e, a)
|
|
),
|
|
c && t.push(c(e)),
|
|
t.join(" ")
|
|
);
|
|
}
|
|
),
|
|
(0, f.Z)((0, s.Z)(o), "getComponent", function () {
|
|
var e = o.props,
|
|
t = e.prefixCls,
|
|
n = e.destroyPopupOnHide,
|
|
i = e.popupClassName,
|
|
r = e.onPopupAlign,
|
|
a = e.popupMotion,
|
|
c = e.popupAnimation,
|
|
s = e.popupTransitionName,
|
|
l = e.popupStyle,
|
|
p = e.mask,
|
|
f = e.maskAnimation,
|
|
h = e.maskTransitionName,
|
|
m = e.maskMotion,
|
|
v = e.zIndex,
|
|
g = e.popup,
|
|
y = e.stretch,
|
|
w = e.alignPoint,
|
|
b = e.mobile,
|
|
Z = e.forceRender,
|
|
C = e.onPopupClick,
|
|
x = o.state,
|
|
T = x.popupVisible,
|
|
M = x.point,
|
|
k = o.getPopupAlign(),
|
|
P = {};
|
|
return (
|
|
o.isMouseEnterToShow() &&
|
|
(P.onMouseEnter = o.onPopupMouseEnter),
|
|
o.isMouseLeaveToHide() &&
|
|
(P.onMouseLeave = o.onPopupMouseLeave),
|
|
(P.onMouseDown = o.onPopupMouseDown),
|
|
(P.onTouchStart = o.onPopupMouseDown),
|
|
d.createElement(
|
|
e0,
|
|
(0, u.Z)(
|
|
{
|
|
prefixCls: t,
|
|
destroyPopupOnHide: n,
|
|
visible: T,
|
|
point: w && M,
|
|
className: i,
|
|
align: k,
|
|
onAlign: r,
|
|
animation: c,
|
|
getClassNameFromAlign: o.getPopupClassNameFromAlign,
|
|
},
|
|
P,
|
|
{
|
|
stretch: y,
|
|
getRootDomNode: o.getRootDomNode,
|
|
style: l,
|
|
mask: p,
|
|
zIndex: v,
|
|
transitionName: s,
|
|
maskAnimation: f,
|
|
maskTransitionName: h,
|
|
maskMotion: m,
|
|
ref: o.popupRef,
|
|
motion: a,
|
|
mobile: b,
|
|
forceRender: Z,
|
|
onClick: C,
|
|
}
|
|
),
|
|
"function" == typeof g ? g() : g
|
|
)
|
|
);
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "attachParent", function (e) {
|
|
m.Z.cancel(o.attachId);
|
|
var t,
|
|
n = o.props,
|
|
i = n.getPopupContainer,
|
|
r = n.getDocument,
|
|
u = o.getRootDomNode();
|
|
i
|
|
? (u || 0 === i.length) && (t = i(u))
|
|
: (t = r(o.getRootDomNode()).body),
|
|
t
|
|
? t.appendChild(e)
|
|
: (o.attachId = (0, m.Z)(function () {
|
|
o.attachParent(e);
|
|
}));
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "getContainer", function () {
|
|
if (!o.portalContainer) {
|
|
var e = (0, o.props.getDocument)(
|
|
o.getRootDomNode()
|
|
).createElement("div");
|
|
(e.style.position = "absolute"),
|
|
(e.style.top = "0"),
|
|
(e.style.left = "0"),
|
|
(e.style.width = "100%"),
|
|
(o.portalContainer = e);
|
|
}
|
|
return o.attachParent(o.portalContainer), o.portalContainer;
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "setPoint", function (e) {
|
|
o.props.alignPoint &&
|
|
e &&
|
|
o.setState({ point: { pageX: e.pageX, pageY: e.pageY } });
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "handlePortalUpdate", function () {
|
|
o.state.prevPopupVisible !== o.state.popupVisible &&
|
|
o.props.afterPopupVisibleChange(o.state.popupVisible);
|
|
}),
|
|
(0, f.Z)((0, s.Z)(o), "triggerContextValue", {
|
|
onPopupMouseDown: o.onPopupMouseDown,
|
|
}),
|
|
(i =
|
|
"popupVisible" in e
|
|
? !!e.popupVisible
|
|
: !!e.defaultPopupVisible),
|
|
(o.state = { prevPopupVisible: i, popupVisible: i }),
|
|
e7.forEach(function (e) {
|
|
o["fire".concat(e)] = function (t) {
|
|
o.fireEvents(e, t);
|
|
};
|
|
}),
|
|
o
|
|
);
|
|
}
|
|
return (
|
|
(0, c.Z)(
|
|
n,
|
|
[
|
|
{
|
|
key: "componentDidMount",
|
|
value: function () {
|
|
this.componentDidUpdate();
|
|
},
|
|
},
|
|
{
|
|
key: "componentDidUpdate",
|
|
value: function () {
|
|
var e,
|
|
t = this.props;
|
|
if (this.state.popupVisible) {
|
|
!this.clickOutsideHandler &&
|
|
(this.isClickToHide() ||
|
|
this.isContextMenuToShow()) &&
|
|
((e = t.getDocument(this.getRootDomNode())),
|
|
(this.clickOutsideHandler = (0, w.Z)(
|
|
e,
|
|
"mousedown",
|
|
this.onDocumentClick
|
|
))),
|
|
this.touchOutsideHandler ||
|
|
((e = e || t.getDocument(this.getRootDomNode())),
|
|
(this.touchOutsideHandler = (0, w.Z)(
|
|
e,
|
|
"touchstart",
|
|
this.onDocumentClick
|
|
))),
|
|
!this.contextMenuOutsideHandler1 &&
|
|
this.isContextMenuToShow() &&
|
|
((e = e || t.getDocument(this.getRootDomNode())),
|
|
(this.contextMenuOutsideHandler1 = (0, w.Z)(
|
|
e,
|
|
"scroll",
|
|
this.onContextMenuClose
|
|
))),
|
|
!this.contextMenuOutsideHandler2 &&
|
|
this.isContextMenuToShow() &&
|
|
(this.contextMenuOutsideHandler2 = (0, w.Z)(
|
|
window,
|
|
"blur",
|
|
this.onContextMenuClose
|
|
));
|
|
return;
|
|
}
|
|
this.clearOutsideHandler();
|
|
},
|
|
},
|
|
{
|
|
key: "componentWillUnmount",
|
|
value: function () {
|
|
this.clearDelayTimer(),
|
|
this.clearOutsideHandler(),
|
|
clearTimeout(this.mouseDownTimeout),
|
|
m.Z.cancel(this.attachId);
|
|
},
|
|
},
|
|
{
|
|
key: "getPopupDomNode",
|
|
value: function () {
|
|
var e;
|
|
return (
|
|
(null === (e = this.popupRef.current) || void 0 === e
|
|
? void 0
|
|
: e.getElement()) || null
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "getPopupAlign",
|
|
value: function () {
|
|
var e,
|
|
t,
|
|
n,
|
|
o,
|
|
i = this.props,
|
|
u = i.popupPlacement,
|
|
a = i.popupAlign,
|
|
c = i.builtinPlacements;
|
|
return u && c
|
|
? ((e = c),
|
|
(t = u),
|
|
(n = a),
|
|
(o = e[t] || {}),
|
|
(0, r.Z)((0, r.Z)({}, o), n))
|
|
: a;
|
|
},
|
|
},
|
|
{
|
|
key: "setPopupVisible",
|
|
value: function (e, t) {
|
|
var n = this.props.alignPoint,
|
|
o = this.state.popupVisible;
|
|
this.clearDelayTimer(),
|
|
o !== e &&
|
|
("popupVisible" in this.props ||
|
|
this.setState({
|
|
popupVisible: e,
|
|
prevPopupVisible: o,
|
|
}),
|
|
this.props.onPopupVisibleChange(e)),
|
|
n && t && e && this.setPoint(t);
|
|
},
|
|
},
|
|
{
|
|
key: "delaySetPopupVisible",
|
|
value: function (e, t, n) {
|
|
var o = this,
|
|
i = 1e3 * t;
|
|
if ((this.clearDelayTimer(), i)) {
|
|
var r = n ? { pageX: n.pageX, pageY: n.pageY } : null;
|
|
this.delayTimer = window.setTimeout(function () {
|
|
o.setPopupVisible(e, r), o.clearDelayTimer();
|
|
}, i);
|
|
} else this.setPopupVisible(e, n);
|
|
},
|
|
},
|
|
{
|
|
key: "clearDelayTimer",
|
|
value: function () {
|
|
this.delayTimer &&
|
|
(clearTimeout(this.delayTimer),
|
|
(this.delayTimer = null));
|
|
},
|
|
},
|
|
{
|
|
key: "clearOutsideHandler",
|
|
value: function () {
|
|
this.clickOutsideHandler &&
|
|
(this.clickOutsideHandler.remove(),
|
|
(this.clickOutsideHandler = null)),
|
|
this.contextMenuOutsideHandler1 &&
|
|
(this.contextMenuOutsideHandler1.remove(),
|
|
(this.contextMenuOutsideHandler1 = null)),
|
|
this.contextMenuOutsideHandler2 &&
|
|
(this.contextMenuOutsideHandler2.remove(),
|
|
(this.contextMenuOutsideHandler2 = null)),
|
|
this.touchOutsideHandler &&
|
|
(this.touchOutsideHandler.remove(),
|
|
(this.touchOutsideHandler = null));
|
|
},
|
|
},
|
|
{
|
|
key: "createTwoChains",
|
|
value: function (e) {
|
|
var t = this.props.children.props,
|
|
n = this.props;
|
|
return t[e] && n[e]
|
|
? this["fire".concat(e)]
|
|
: t[e] || n[e];
|
|
},
|
|
},
|
|
{
|
|
key: "isClickToShow",
|
|
value: function () {
|
|
var e = this.props,
|
|
t = e.action,
|
|
n = e.showAction;
|
|
return (
|
|
-1 !== t.indexOf("click") || -1 !== n.indexOf("click")
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "isContextMenuOnly",
|
|
value: function () {
|
|
var e = this.props.action;
|
|
return (
|
|
"contextMenu" === e ||
|
|
(1 === e.length && "contextMenu" === e[0])
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "isContextMenuToShow",
|
|
value: function () {
|
|
var e = this.props,
|
|
t = e.action,
|
|
n = e.showAction;
|
|
return (
|
|
-1 !== t.indexOf("contextMenu") ||
|
|
-1 !== n.indexOf("contextMenu")
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "isClickToHide",
|
|
value: function () {
|
|
var e = this.props,
|
|
t = e.action,
|
|
n = e.hideAction;
|
|
return (
|
|
-1 !== t.indexOf("click") || -1 !== n.indexOf("click")
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "isMouseEnterToShow",
|
|
value: function () {
|
|
var e = this.props,
|
|
t = e.action,
|
|
n = e.showAction;
|
|
return (
|
|
-1 !== t.indexOf("hover") ||
|
|
-1 !== n.indexOf("mouseEnter")
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "isMouseLeaveToHide",
|
|
value: function () {
|
|
var e = this.props,
|
|
t = e.action,
|
|
n = e.hideAction;
|
|
return (
|
|
-1 !== t.indexOf("hover") ||
|
|
-1 !== n.indexOf("mouseLeave")
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "isFocusToShow",
|
|
value: function () {
|
|
var e = this.props,
|
|
t = e.action,
|
|
n = e.showAction;
|
|
return (
|
|
-1 !== t.indexOf("focus") || -1 !== n.indexOf("focus")
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "isBlurToHide",
|
|
value: function () {
|
|
var e = this.props,
|
|
t = e.action,
|
|
n = e.hideAction;
|
|
return (
|
|
-1 !== t.indexOf("focus") || -1 !== n.indexOf("blur")
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "forcePopupAlign",
|
|
value: function () {
|
|
if (this.state.popupVisible) {
|
|
var e;
|
|
null === (e = this.popupRef.current) ||
|
|
void 0 === e ||
|
|
e.forceAlign();
|
|
}
|
|
},
|
|
},
|
|
{
|
|
key: "fireEvents",
|
|
value: function (e, t) {
|
|
var n = this.props.children.props[e];
|
|
n && n(t);
|
|
var o = this.props[e];
|
|
o && o(t);
|
|
},
|
|
},
|
|
{
|
|
key: "close",
|
|
value: function () {
|
|
this.setPopupVisible(!1);
|
|
},
|
|
},
|
|
{
|
|
key: "render",
|
|
value: function () {
|
|
var e,
|
|
t = this.state.popupVisible,
|
|
n = this.props,
|
|
o = n.children,
|
|
i = n.forceRender,
|
|
u = n.alignPoint,
|
|
a = n.className,
|
|
c = n.autoDestroy,
|
|
s = d.Children.only(o),
|
|
l = { key: "trigger" };
|
|
this.isContextMenuToShow()
|
|
? (l.onContextMenu = this.onContextMenu)
|
|
: (l.onContextMenu =
|
|
this.createTwoChains("onContextMenu")),
|
|
this.isClickToHide() || this.isClickToShow()
|
|
? ((l.onClick = this.onClick),
|
|
(l.onMouseDown = this.onMouseDown),
|
|
(l.onTouchStart = this.onTouchStart))
|
|
: ((l.onClick = this.createTwoChains("onClick")),
|
|
(l.onMouseDown =
|
|
this.createTwoChains("onMouseDown")),
|
|
(l.onTouchStart =
|
|
this.createTwoChains("onTouchStart"))),
|
|
this.isMouseEnterToShow()
|
|
? ((l.onMouseEnter = this.onMouseEnter),
|
|
u && (l.onMouseMove = this.onMouseMove))
|
|
: (l.onMouseEnter =
|
|
this.createTwoChains("onMouseEnter")),
|
|
this.isMouseLeaveToHide()
|
|
? (l.onMouseLeave = this.onMouseLeave)
|
|
: (l.onMouseLeave =
|
|
this.createTwoChains("onMouseLeave")),
|
|
this.isFocusToShow() || this.isBlurToHide()
|
|
? ((l.onFocus = this.onFocus),
|
|
(l.onBlur = this.onBlur))
|
|
: ((l.onFocus = this.createTwoChains("onFocus")),
|
|
(l.onBlur = this.createTwoChains("onBlur")));
|
|
var p = x()(s && s.props && s.props.className, a);
|
|
p && (l.className = p);
|
|
var f = (0, r.Z)({}, l);
|
|
(0, y.Yr)(s) &&
|
|
(f.ref = (0, y.sQ)(this.triggerRef, s.ref));
|
|
var h = d.cloneElement(s, f);
|
|
return (
|
|
(t || this.popupRef.current || i) &&
|
|
(e = d.createElement(
|
|
Z,
|
|
{
|
|
key: "portal",
|
|
getContainer: this.getContainer,
|
|
didUpdate: this.handlePortalUpdate,
|
|
},
|
|
this.getComponent()
|
|
)),
|
|
!t && c && (e = null),
|
|
d.createElement(
|
|
e1.Provider,
|
|
{ value: this.triggerContextValue },
|
|
h,
|
|
e
|
|
)
|
|
);
|
|
},
|
|
},
|
|
],
|
|
[
|
|
{
|
|
key: "getDerivedStateFromProps",
|
|
value: function (e, t) {
|
|
var n = e.popupVisible,
|
|
o = {};
|
|
return (
|
|
void 0 !== n &&
|
|
t.popupVisible !== n &&
|
|
((o.popupVisible = n),
|
|
(o.prevPopupVisible = t.popupVisible)),
|
|
o
|
|
);
|
|
},
|
|
},
|
|
]
|
|
),
|
|
n
|
|
);
|
|
})(d.Component)),
|
|
(0, f.Z)(e3, "contextType", e1),
|
|
(0, f.Z)(e3, "defaultProps", {
|
|
prefixCls: "rc-trigger-popup",
|
|
getPopupClassNameFromAlign: e9,
|
|
getDocument: function e(t) {
|
|
return t ? t.ownerDocument : window.document;
|
|
},
|
|
onPopupVisibleChange: e2,
|
|
afterPopupVisibleChange: e2,
|
|
onPopupAlign: e2,
|
|
popupClassName: "",
|
|
mouseEnterDelay: 0,
|
|
mouseLeaveDelay: 0.1,
|
|
focusDelay: 0,
|
|
blurDelay: 0.15,
|
|
popupStyle: {},
|
|
destroyPopupOnHide: !1,
|
|
popupAlign: {},
|
|
defaultPopupVisible: !1,
|
|
mask: !1,
|
|
maskClosable: !0,
|
|
action: [],
|
|
showAction: [],
|
|
hideAction: [],
|
|
autoDestroy: !1,
|
|
}),
|
|
e3);
|
|
},
|
|
26723: function (e, t, n) {
|
|
n.d(t, {
|
|
Z: function () {
|
|
return i;
|
|
},
|
|
});
|
|
var o = n(87995);
|
|
function i(e, t, n, i) {
|
|
var r = o.unstable_batchedUpdates
|
|
? function (e) {
|
|
o.unstable_batchedUpdates(n, e);
|
|
}
|
|
: n;
|
|
return (
|
|
e.addEventListener && e.addEventListener(t, r, i),
|
|
{
|
|
remove: function () {
|
|
e.removeEventListener && e.removeEventListener(t, r, i);
|
|
},
|
|
}
|
|
);
|
|
}
|
|
},
|
|
50931: function (e, t, n) {
|
|
n.d(t, {
|
|
Z: function () {
|
|
return o;
|
|
},
|
|
});
|
|
function o(e, t) {
|
|
if (!e) return !1;
|
|
if (e.contains) return e.contains(t);
|
|
for (var n = t; n; ) {
|
|
if (n === e) return !0;
|
|
n = n.parentNode;
|
|
}
|
|
return !1;
|
|
}
|
|
},
|
|
33750: function (e, t, n) {
|
|
n.d(t, {
|
|
o: function () {
|
|
return r;
|
|
},
|
|
});
|
|
var o = n(59496),
|
|
i = (0, n(21982).Z)() ? o.useLayoutEffect : o.useEffect;
|
|
t.Z = i;
|
|
var r = function (e, t) {
|
|
var n = o.useRef(!0);
|
|
i(function () {
|
|
if (!n.current) return e();
|
|
}, t),
|
|
i(function () {
|
|
return (
|
|
(n.current = !1),
|
|
function () {
|
|
n.current = !0;
|
|
}
|
|
);
|
|
}, []);
|
|
};
|
|
},
|
|
64314: function (e, t) {
|
|
t.Z = function () {
|
|
if ("undefined" == typeof navigator || "undefined" == typeof window)
|
|
return !1;
|
|
var e = navigator.userAgent || navigator.vendor || window.opera;
|
|
return (
|
|
/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(
|
|
e
|
|
) ||
|
|
/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(
|
|
null == e ? void 0 : e.substr(0, 4)
|
|
)
|
|
);
|
|
};
|
|
},
|
|
31545: function (e, t, n) {
|
|
n.d(t, {
|
|
Z: function () {
|
|
return o;
|
|
},
|
|
});
|
|
function o(e, t) {
|
|
if (!e) return !1;
|
|
if (e.contains) return e.contains(t);
|
|
for (var n = t; n; ) {
|
|
if (n === e) return !0;
|
|
n = n.parentNode;
|
|
}
|
|
return !1;
|
|
}
|
|
},
|
|
72574: function (e, t) {
|
|
t.Z = function (e) {
|
|
if (!e) return !1;
|
|
if (e instanceof Element) {
|
|
if (e.offsetParent) return !0;
|
|
if (e.getBBox) {
|
|
var t = e.getBBox(),
|
|
n = t.width,
|
|
o = t.height;
|
|
if (n || o) return !0;
|
|
}
|
|
if (e.getBoundingClientRect) {
|
|
var i = e.getBoundingClientRect(),
|
|
r = i.width,
|
|
u = i.height;
|
|
if (r || u) return !0;
|
|
}
|
|
}
|
|
return !1;
|
|
};
|
|
},
|
|
23494: function (e, t, n) {
|
|
n.d(t, {
|
|
sQ: function () {
|
|
return a;
|
|
},
|
|
mH: function () {
|
|
return u;
|
|
},
|
|
Yr: function () {
|
|
return s;
|
|
},
|
|
x1: function () {
|
|
return c;
|
|
},
|
|
});
|
|
var o = n(79087),
|
|
i = n(59496),
|
|
r = n(61357),
|
|
u = function (e, t) {
|
|
"function" == typeof e
|
|
? e(t)
|
|
: "object" === (0, o.Z)(e) &&
|
|
e &&
|
|
"current" in e &&
|
|
(e.current = t);
|
|
},
|
|
a = function () {
|
|
for (var e = arguments.length, t = Array(e), n = 0; n < e; n++)
|
|
t[n] = arguments[n];
|
|
var o = t.filter(Boolean);
|
|
return o.length <= 1
|
|
? o[0]
|
|
: function (e) {
|
|
t.forEach(function (t) {
|
|
u(t, e);
|
|
});
|
|
};
|
|
},
|
|
c = function () {
|
|
for (
|
|
var e, t, n, o, r = arguments.length, u = Array(r), c = 0;
|
|
c < r;
|
|
c++
|
|
)
|
|
u[c] = arguments[c];
|
|
return (
|
|
(e = function () {
|
|
return a.apply(void 0, u);
|
|
}),
|
|
(n = function (e, t) {
|
|
return (
|
|
e.length !== t.length ||
|
|
e.every(function (e, n) {
|
|
return e !== t[n];
|
|
})
|
|
);
|
|
}),
|
|
(!("value" in (o = i.useRef({})).current) ||
|
|
n(o.current.condition, u)) &&
|
|
((o.current.value = e()), (o.current.condition = u)),
|
|
o.current.value
|
|
);
|
|
},
|
|
s = function (e) {
|
|
var t,
|
|
n,
|
|
o = (0, r.isMemo)(e) ? e.type.type : e.type;
|
|
return (
|
|
("function" != typeof o ||
|
|
(null !== (t = o.prototype) && void 0 !== t && !!t.render) ||
|
|
o.$$typeof === r.ForwardRef) &&
|
|
("function" != typeof e ||
|
|
(null !== (n = e.prototype) && void 0 !== n && !!n.render) ||
|
|
e.$$typeof === r.ForwardRef)
|
|
);
|
|
};
|
|
i.version.split(".")[0];
|
|
},
|
|
46109: function (e, t, n) {
|
|
n.d(t, {
|
|
Z: function () {
|
|
return o;
|
|
},
|
|
});
|
|
function o(e, t) {
|
|
(null == t || t > e.length) && (t = e.length);
|
|
for (var n = 0, o = Array(t); n < t; n++) o[n] = e[n];
|
|
return o;
|
|
}
|
|
},
|
|
27658: function (e, t, n) {
|
|
n.d(t, {
|
|
Z: function () {
|
|
return i;
|
|
},
|
|
});
|
|
var o = n(27930);
|
|
function i(e, t) {
|
|
return (
|
|
(function (e) {
|
|
if (Array.isArray(e)) return e;
|
|
})(e) ||
|
|
(function (e, t) {
|
|
var n =
|
|
null == e
|
|
? null
|
|
: ("undefined" != typeof Symbol && e[Symbol.iterator]) ||
|
|
e["@@iterator"];
|
|
if (null != n) {
|
|
var o,
|
|
i,
|
|
r,
|
|
u,
|
|
a = [],
|
|
c = !0,
|
|
s = !1;
|
|
try {
|
|
if (((r = (n = n.call(e)).next), 0 === t)) {
|
|
if (Object(n) !== n) return;
|
|
c = !1;
|
|
} else
|
|
for (
|
|
;
|
|
!(c = (o = r.call(n)).done) &&
|
|
(a.push(o.value), a.length !== t);
|
|
c = !0
|
|
);
|
|
} catch (l) {
|
|
(s = !0), (i = l);
|
|
} finally {
|
|
try {
|
|
if (
|
|
!c &&
|
|
null != n.return &&
|
|
((u = n.return()), Object(u) !== u)
|
|
)
|
|
return;
|
|
} finally {
|
|
if (s) throw i;
|
|
}
|
|
}
|
|
return a;
|
|
}
|
|
})(e, t) ||
|
|
(0, o.Z)(e, t) ||
|
|
(function () {
|
|
throw TypeError(
|
|
"Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
|
|
);
|
|
})()
|
|
);
|
|
}
|
|
},
|
|
79087: function (e, t, n) {
|
|
n.d(t, {
|
|
Z: function () {
|
|
return o;
|
|
},
|
|
});
|
|
function o(e) {
|
|
return (o =
|
|
"function" == typeof Symbol && "symbol" == typeof Symbol.iterator
|
|
? function (e) {
|
|
return typeof e;
|
|
}
|
|
: function (e) {
|
|
return e &&
|
|
"function" == typeof Symbol &&
|
|
e.constructor === Symbol &&
|
|
e !== Symbol.prototype
|
|
? "symbol"
|
|
: typeof e;
|
|
})(e);
|
|
}
|
|
},
|
|
27930: function (e, t, n) {
|
|
n.d(t, {
|
|
Z: function () {
|
|
return i;
|
|
},
|
|
});
|
|
var o = n(46109);
|
|
function i(e, t) {
|
|
if (e) {
|
|
if ("string" == typeof e) return (0, o.Z)(e, t);
|
|
var n = {}.toString.call(e).slice(8, -1);
|
|
return (
|
|
"Object" === n && e.constructor && (n = e.constructor.name),
|
|
"Map" === n || "Set" === n
|
|
? Array.from(e)
|
|
: "Arguments" === n ||
|
|
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
|
|
? (0, o.Z)(e, t)
|
|
: void 0
|
|
);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
]);
|