import * as e from "react";
import t, { forwardRef as n, useRef as o, useImperativeHandle as r, useEffect as i, useLayoutEffect as u, createElement as a, useState as c } from "react";
import { lD as s, ly as l, lC as f, lH as p, lF as d, lM as v, lz as h, lG as m, lI as g } from "./ant-design-icons-6bfdc7d5.js";
import { _ as y, a as w, b, c as k, d as C, i as T, e as M, f as x } from "./antd-2abdded3.js";
import E from "react-dom";
var P = function(e2) {
  return +setTimeout(e2, 16);
}, O = function(e2) {
  return clearTimeout(e2);
};
"undefined" != typeof window && "requestAnimationFrame" in window && (P = function(e2) {
  return window.requestAnimationFrame(e2);
}, O = function(e2) {
  return window.cancelAnimationFrame(e2);
});
var D = 0, S = /* @__PURE__ */ new Map();
function N(e2) {
  S.delete(e2);
}
var A = function(e2) {
  var t2 = D += 1;
  return function n2(o2) {
    if (0 === o2)
      N(t2), e2();
    else {
      var r2 = P(function() {
        n2(o2 - 1);
      });
      S.set(t2, r2);
    }
  }(arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1), t2;
};
function L(e2, t2) {
  if (!e2)
    return false;
  if (e2.contains)
    return e2.contains(t2);
  for (var n2 = t2; n2; ) {
    if (n2 === e2)
      return true;
    n2 = n2.parentNode;
  }
  return false;
}
function R(e2) {
  return function(e3) {
    return e3 instanceof HTMLElement || e3 instanceof SVGElement;
  }(e2) ? e2 : e2 instanceof t.Component ? E.findDOMNode(e2) : null;
}
function V(e2, t2) {
  "function" == typeof e2 ? e2(t2) : "object" === s(e2) && e2 && "current" in e2 && (e2.current = t2);
}
function H(e2) {
  var t2, n2, o2 = l.isMemo(e2) ? e2.type.type : e2.type;
  return !!("function" != typeof o2 || null !== (t2 = o2.prototype) && void 0 !== t2 && t2.render || o2.$$typeof === l.ForwardRef) && !!("function" != typeof e2 || null !== (n2 = e2.prototype) && void 0 !== n2 && n2.render || e2.$$typeof === l.ForwardRef);
}
function j(e2, t2, n2, o2) {
  var r2 = E.unstable_batchedUpdates ? function(e3) {
    E.unstable_batchedUpdates(n2, e3);
  } : n2;
  return null != e2 && e2.addEventListener && e2.addEventListener(t2, r2, o2), { remove: function() {
    null != e2 && e2.removeEventListener && e2.removeEventListener(t2, r2, o2);
  } };
}
function W() {
  return !("undefined" == typeof window || !window.document || !window.document.createElement);
}
A.cancel = function(e2) {
  var t2 = S.get(e2);
  return N(e2), O(t2);
}, "production" !== process.env.NODE_ENV && (A.ids = function() {
  return S;
});
var F = n(function(e2, t2) {
  var n2 = e2.didUpdate, u2 = e2.getContainer, a2 = e2.children, c2 = o(), s2 = o();
  r(t2, function() {
    return {};
  });
  var l2 = o(false);
  return !l2.current && W() && (s2.current = u2(), c2.current = s2.current.parentNode, l2.current = true), i(function() {
    null == n2 || n2(e2);
  }), i(function() {
    return null === s2.current.parentNode && null !== c2.current && c2.current.appendChild(s2.current), function() {
      var e3;
      null === (e3 = s2.current) || void 0 === e3 || null === (e3 = e3.parentNode) || void 0 === e3 || e3.removeChild(s2.current);
    };
  }, []), s2.current ? E.createPortal(a2, s2.current) : null;
});
function z(e2, t2, n2) {
  return n2 ? e2[0] === t2[0] : e2[0] === t2[0] && e2[1] === t2[1];
}
var B = e.createContext({}), I = function(e2) {
  y(n2, e2);
  var t2 = w(n2);
  function n2() {
    return b(this, n2), t2.apply(this, arguments);
  }
  return k(n2, [{ key: "render", value: function() {
    return this.props.children;
  } }]), n2;
}(e.Component);
function X(t2) {
  var n2 = e.useRef(false), o2 = e.useState(t2), r2 = p(o2, 2), i2 = r2[0], u2 = r2[1];
  return e.useEffect(function() {
    return n2.current = false, function() {
      n2.current = true;
    };
  }, []), [i2, function(e2, t3) {
    t3 && n2.current || u2(e2);
  }];
}
var Y = "none", _ = "appear", U = "enter", q = "leave", $ = "none", G = "prepare", K = "start", Z = "active", J = "end", Q = "prepared";
function ee(e2, t2) {
  var n2 = {};
  return n2[e2.toLowerCase()] = t2.toLowerCase(), n2["Webkit".concat(e2)] = "webkit".concat(t2), n2["Moz".concat(e2)] = "moz".concat(t2), n2["ms".concat(e2)] = "MS".concat(t2), n2["O".concat(e2)] = "o".concat(t2.toLowerCase()), n2;
}
var te, ne, oe, re = (te = W(), ne = "undefined" != typeof window ? window : {}, oe = { animationend: ee("Animation", "AnimationEnd"), transitionend: ee("Transition", "TransitionEnd") }, te && ("AnimationEvent" in ne || delete oe.animationend.animation, "TransitionEvent" in ne || delete oe.transitionend.transition), oe), ie = {};
if (W()) {
  var ue = document.createElement("div");
  ie = ue.style;
}
var ae = {};
function ce(e2) {
  if (ae[e2])
    return ae[e2];
  var t2 = re[e2];
  if (t2)
    for (var n2 = Object.keys(t2), o2 = n2.length, r2 = 0; r2 < o2; r2 += 1) {
      var i2 = n2[r2];
      if (Object.prototype.hasOwnProperty.call(t2, i2) && i2 in ie)
        return ae[e2] = t2[i2], ae[e2];
    }
  return "";
}
var se = ce("animationend"), le = ce("transitionend"), fe = !(!se || !le), pe = se || "animationend", de = le || "transitionend";
function ve(e2, t2) {
  return e2 ? "object" === s(e2) ? e2[t2.replace(/-\w/g, function(e3) {
    return e3[1].toUpperCase();
  })] : "".concat(e2, "-").concat(t2) : null;
}
const he = function(t2) {
  var n2 = o(), r2 = o(t2);
  r2.current = t2;
  var i2 = e.useCallback(function(e2) {
    r2.current(e2);
  }, []);
  function u2(e2) {
    e2 && (e2.removeEventListener(de, i2), e2.removeEventListener(pe, i2));
  }
  return e.useEffect(function() {
    return function() {
      u2(n2.current);
    };
  }, []), [function(e2) {
    n2.current && n2.current !== e2 && u2(n2.current), e2 && e2 !== n2.current && (e2.addEventListener(de, i2), e2.addEventListener(pe, i2), n2.current = e2);
  }, u2];
};
var me = W() ? u : i;
var ge = [G, K, Z, J], ye = [G, Q], we = false, be = true;
function ke(e2) {
  return e2 === Z || e2 === J;
}
const Ce = function(t2, n2, o2) {
  var r2 = X($), i2 = p(r2, 2), u2 = i2[0], a2 = i2[1], c2 = function() {
    var t3 = e.useRef(null);
    function n3() {
      A.cancel(t3.current);
    }
    return e.useEffect(function() {
      return function() {
        n3();
      };
    }, []), [function e2(o3) {
      var r3 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 2;
      n3();
      var i3 = A(function() {
        r3 <= 1 ? o3({ isCanceled: function() {
          return i3 !== t3.current;
        } }) : e2(o3, r3 - 1);
      });
      t3.current = i3;
    }, n3];
  }(), s2 = p(c2, 2), l2 = s2[0], f2 = s2[1];
  var d2 = n2 ? ye : ge;
  return me(function() {
    if (u2 !== $ && u2 !== J) {
      var e2 = d2.indexOf(u2), t3 = d2[e2 + 1], n3 = o2(u2);
      n3 === we ? a2(t3, true) : t3 && l2(function(e3) {
        function o3() {
          e3.isCanceled() || a2(t3, true);
        }
        true === n3 ? o3() : Promise.resolve(n3).then(o3);
      });
    }
  }, [t2, u2]), e.useEffect(function() {
    return function() {
      f2();
    };
  }, []), [function() {
    a2(G, true);
  }, u2];
};
const Te = function(t2) {
  var n2 = t2;
  "object" === s(t2) && (n2 = t2.transitionSupport);
  var r2 = e.forwardRef(function(t3, r3) {
    var u2 = t3.visible, a2 = void 0 === u2 || u2, c2 = t3.removeOnLeave, s2 = void 0 === c2 || c2, l2 = t3.forceRender, m2 = t3.children, g2 = t3.motionName, y2 = t3.leavedClassName, w2 = t3.eventProps, b2 = function(e2, t4) {
      return !(!e2.motionName || !n2 || false === t4);
    }(t3, e.useContext(B).motion), k2 = o(), C2 = o();
    var T2 = function(t4, n3, r4, u3) {
      var a3 = u3.motionEnter, c3 = void 0 === a3 || a3, s3 = u3.motionAppear, l3 = void 0 === s3 || s3, v2 = u3.motionLeave, h2 = void 0 === v2 || v2, m3 = u3.motionDeadline, g3 = u3.motionLeaveImmediately, y3 = u3.onAppearPrepare, w3 = u3.onEnterPrepare, b3 = u3.onLeavePrepare, k3 = u3.onAppearStart, C3 = u3.onEnterStart, T3 = u3.onLeaveStart, M3 = u3.onAppearActive, x3 = u3.onEnterActive, E3 = u3.onLeaveActive, P3 = u3.onAppearEnd, O3 = u3.onEnterEnd, D3 = u3.onLeaveEnd, S3 = u3.onVisibleChanged, N3 = X(), A3 = p(N3, 2), L3 = A3[0], R2 = A3[1], V2 = X(Y), H2 = p(V2, 2), j3 = H2[0], W3 = H2[1], F2 = X(null), z2 = p(F2, 2), B2 = z2[0], I2 = z2[1], $2 = o(false), J2 = o(null);
      function ee2() {
        return r4();
      }
      var te2 = o(false);
      function ne2() {
        W3(Y, true), I2(null, true);
      }
      function oe2(e2) {
        var t5 = ee2();
        if (!e2 || e2.deadline || e2.target === t5) {
          var n4, o2 = te2.current;
          j3 === _ && o2 ? n4 = null == P3 ? void 0 : P3(t5, e2) : j3 === U && o2 ? n4 = null == O3 ? void 0 : O3(t5, e2) : j3 === q && o2 && (n4 = null == D3 ? void 0 : D3(t5, e2)), j3 !== Y && o2 && false !== n4 && ne2();
        }
      }
      var re2 = he(oe2), ie2 = p(re2, 1)[0], ue = function(e2) {
        var t5, n4, o2;
        switch (e2) {
          case _:
            return d(t5 = {}, G, y3), d(t5, K, k3), d(t5, Z, M3), t5;
          case U:
            return d(n4 = {}, G, w3), d(n4, K, C3), d(n4, Z, x3), n4;
          case q:
            return d(o2 = {}, G, b3), d(o2, K, T3), d(o2, Z, E3), o2;
          default:
            return {};
        }
      }, ae2 = e.useMemo(function() {
        return ue(j3);
      }, [j3]), ce2 = Ce(j3, !t4, function(e2) {
        if (e2 === G) {
          var t5 = ae2[G];
          return t5 ? t5(ee2()) : we;
        }
        var n4;
        return fe2 in ae2 && I2((null === (n4 = ae2[fe2]) || void 0 === n4 ? void 0 : n4.call(ae2, ee2(), null)) || null), fe2 === Z && (ie2(ee2()), m3 > 0 && (clearTimeout(J2.current), J2.current = setTimeout(function() {
          oe2({ deadline: true });
        }, m3))), fe2 === Q && ne2(), be;
      }), se2 = p(ce2, 2), le2 = se2[0], fe2 = se2[1], pe2 = ke(fe2);
      te2.current = pe2, me(function() {
        R2(n3);
        var e2, o2 = $2.current;
        $2.current = true, !o2 && n3 && l3 && (e2 = _), o2 && n3 && c3 && (e2 = U), (o2 && !n3 && h2 || !o2 && g3 && !n3 && h2) && (e2 = q);
        var r5 = ue(e2);
        e2 && (t4 || r5[G]) ? (W3(e2), le2()) : W3(Y);
      }, [n3]), i(function() {
        (j3 === _ && !l3 || j3 === U && !c3 || j3 === q && !h2) && W3(Y);
      }, [l3, c3, h2]), i(function() {
        return function() {
          $2.current = false, clearTimeout(J2.current);
        };
      }, []);
      var de2 = e.useRef(false);
      i(function() {
        L3 && (de2.current = true), void 0 !== L3 && j3 === Y && ((de2.current || L3) && (null == S3 || S3(L3)), de2.current = true);
      }, [L3, j3]);
      var ve2 = B2;
      return ae2[G] && fe2 === K && (ve2 = f({ transition: "none" }, ve2)), [j3, fe2, ve2, null != L3 ? L3 : n3];
    }(b2, a2, function() {
      try {
        return k2.current instanceof HTMLElement ? k2.current : R(C2.current);
      } catch (e2) {
        return null;
      }
    }, t3), M2 = p(T2, 4), x2 = M2[0], E2 = M2[1], P2 = M2[2], O2 = M2[3], D2 = e.useRef(O2);
    O2 && (D2.current = true);
    var S2, N2 = e.useCallback(function(e2) {
      k2.current = e2, V(r3, e2);
    }, [r3]), A2 = f(f({}, w2), {}, { visible: a2 });
    if (m2)
      if (x2 === Y)
        S2 = O2 ? m2(f({}, A2), N2) : !s2 && D2.current && y2 ? m2(f(f({}, A2), {}, { className: y2 }), N2) : l2 || !s2 && !y2 ? m2(f(f({}, A2), {}, { style: { display: "none" } }), N2) : null;
      else {
        var L2, j2;
        E2 === G ? j2 = "prepare" : ke(E2) ? j2 = "active" : E2 === K && (j2 = "start");
        var W2 = ve(g2, "".concat(x2, "-").concat(j2));
        S2 = m2(f(f({}, A2), {}, { className: v(ve(g2, x2), (L2 = {}, d(L2, W2, W2 && j2), d(L2, g2, "string" == typeof g2), L2)), style: P2 }), N2);
      }
    else
      S2 = null;
    e.isValidElement(S2) && H(S2) && (S2.ref || (S2 = e.cloneElement(S2, { ref: N2 })));
    return h(I, { ref: C2, children: S2 });
  });
  return r2.displayName = "CSSMotion", r2;
}(fe);
var Me = "add", xe = "keep", Ee = "remove", Pe = "removed";
function Oe(e2) {
  var t2;
  return t2 = e2 && "object" === s(e2) && "key" in e2 ? e2 : { key: e2 }, f(f({}, t2), {}, { key: String(t2.key) });
}
function De() {
  return (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []).map(Oe);
}
var Se, Ne = ["component", "children", "onVisibleChanged", "onAllRemoved"], Ae = ["status"], Le = ["eventProps", "visible", "children", "motionName", "motionAppear", "motionEnter", "motionLeave", "motionLeaveImmediately", "motionDeadline", "removeOnLeave", "leavedClassName", "onAppearPrepare", "onAppearStart", "onAppearActive", "onAppearEnd", "onEnterStart", "onEnterActive", "onEnterEnd", "onLeaveStart", "onLeaveActive", "onLeaveEnd"];
function Re(e2) {
  var t2 = e2.prefixCls, n2 = e2.motion, o2 = e2.animation, r2 = e2.transitionName;
  return n2 || (o2 ? { motionName: "".concat(t2, "-").concat(o2) } : r2 ? { motionName: r2 } : null);
}
function Ve(e2) {
  var t2 = e2.prefixCls, n2 = e2.visible, o2 = e2.zIndex, r2 = e2.mask, i2 = e2.maskMotion, u2 = e2.maskAnimation, a2 = e2.maskTransitionName;
  if (!r2)
    return null;
  var c2 = {};
  return (i2 || a2 || u2) && (c2 = f({ motionAppear: true }, Re({ motion: i2, prefixCls: t2, transitionName: a2, animation: u2 }))), h(Te, { ...c2, visible: n2, removeOnLeave: true, children: function(e3) {
    var n3 = e3.className;
    return h("div", { style: { zIndex: o2 }, className: v("".concat(t2, "-mask"), n3) });
  } });
}
function He(e2, t2) {
  var n2 = Object.keys(e2);
  if (Object.getOwnPropertySymbols) {
    var o2 = Object.getOwnPropertySymbols(e2);
    t2 && (o2 = o2.filter(function(t3) {
      return Object.getOwnPropertyDescriptor(e2, t3).enumerable;
    })), n2.push.apply(n2, o2);
  }
  return n2;
}
function je(e2) {
  for (var t2 = 1; t2 < arguments.length; t2++) {
    var n2 = null != arguments[t2] ? arguments[t2] : {};
    t2 % 2 ? He(Object(n2), true).forEach(function(t3) {
      Fe(e2, t3, n2[t3]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(n2)) : He(Object(n2)).forEach(function(t3) {
      Object.defineProperty(e2, t3, Object.getOwnPropertyDescriptor(n2, t3));
    });
  }
  return e2;
}
function We(e2) {
  return We = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) {
    return typeof e3;
  } : function(e3) {
    return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3;
  }, We(e2);
}
function Fe(e2, t2, n2) {
  return t2 in e2 ? Object.defineProperty(e2, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e2[t2] = n2, e2;
}
!function(t2) {
  var n2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Te, o2 = function(t3) {
    y(r2, t3);
    var o3 = w(r2);
    function r2() {
      var e2;
      b(this, r2);
      for (var t4 = arguments.length, n3 = new Array(t4), i2 = 0; i2 < t4; i2++)
        n3[i2] = arguments[i2];
      return e2 = o3.call.apply(o3, [this].concat(n3)), d(C(e2), "state", { keyEntities: [] }), d(C(e2), "removeKey", function(t5) {
        var n4 = e2.state.keyEntities.map(function(e3) {
          return e3.key !== t5 ? e3 : f(f({}, e3), {}, { status: Pe });
        });
        return e2.setState({ keyEntities: n4 }), n4.filter(function(e3) {
          return e3.status !== Pe;
        }).length;
      }), e2;
    }
    return k(r2, [{ key: "render", value: function() {
      var t4 = this, o4 = this.state.keyEntities, r3 = this.props, i2 = r3.component, u2 = r3.children, c2 = r3.onVisibleChanged, s2 = r3.onAllRemoved, l2 = m(r3, Ne), p2 = i2 || e.Fragment, d2 = {};
      return Le.forEach(function(e2) {
        d2[e2] = l2[e2], delete l2[e2];
      }), delete l2.keys, h(p2, { ...l2, children: o4.map(function(e2, o5) {
        var r4 = e2.status, i3 = m(e2, Ae), l3 = r4 === Me || r4 === xe;
        return a(n2, { ...d2, key: i3.key, visible: l3, eventProps: i3, onVisibleChanged: function(e3) {
          (null == c2 || c2(e3, { key: i3.key }), e3) || 0 === t4.removeKey(i3.key) && s2 && s2();
        } }, function(e3, t5) {
          return u2(f(f({}, e3), {}, { index: o5 }), t5);
        });
      }) });
    } }], [{ key: "getDerivedStateFromProps", value: function(e2, t4) {
      var n3 = e2.keys, o4 = t4.keyEntities, r3 = De(n3), i2 = function() {
        var e3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], t5 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [], n4 = [], o5 = 0, r4 = t5.length, i3 = De(e3), u2 = De(t5);
        i3.forEach(function(e4) {
          for (var t6 = false, i4 = o5; i4 < r4; i4 += 1) {
            var a3 = u2[i4];
            if (a3.key === e4.key) {
              o5 < i4 && (n4 = n4.concat(u2.slice(o5, i4).map(function(e5) {
                return f(f({}, e5), {}, { status: Me });
              })), o5 = i4), n4.push(f(f({}, a3), {}, { status: xe })), o5 += 1, t6 = true;
              break;
            }
          }
          t6 || n4.push(f(f({}, e4), {}, { status: Ee }));
        }), o5 < r4 && (n4 = n4.concat(u2.slice(o5).map(function(e4) {
          return f(f({}, e4), {}, { status: Me });
        })));
        var a2 = {};
        return n4.forEach(function(e4) {
          var t6 = e4.key;
          a2[t6] = (a2[t6] || 0) + 1;
        }), Object.keys(a2).filter(function(e4) {
          return a2[e4] > 1;
        }).forEach(function(e4) {
          (n4 = n4.filter(function(t6) {
            var n5 = t6.key, o6 = t6.status;
            return n5 !== e4 || o6 !== Ee;
          })).forEach(function(t6) {
            t6.key === e4 && (t6.status = xe);
          });
        }), n4;
      }(o4, r3);
      return { keyEntities: i2.filter(function(e3) {
        var t5 = o4.find(function(t6) {
          var n4 = t6.key;
          return e3.key === n4;
        });
        return !t5 || t5.status !== Pe || e3.status !== Ee;
      }) };
    } }]), r2;
  }(e.Component);
  d(o2, "defaultProps", { component: "div" });
}(fe);
var ze = { Webkit: "-webkit-", Moz: "-moz-", ms: "-ms-", O: "-o-" };
function Be() {
  if (void 0 !== Se)
    return Se;
  Se = "";
  var e2 = document.createElement("p").style;
  for (var t2 in ze)
    t2 + "Transform" in e2 && (Se = t2);
  return Se;
}
function Ie() {
  return Be() ? "".concat(Be(), "TransitionProperty") : "transitionProperty";
}
function Xe() {
  return Be() ? "".concat(Be(), "Transform") : "transform";
}
function Ye(e2, t2) {
  var n2 = Ie();
  n2 && (e2.style[n2] = t2, "transitionProperty" !== n2 && (e2.style.transitionProperty = t2));
}
function _e(e2, t2) {
  var n2 = Xe();
  n2 && (e2.style[n2] = t2, "transform" !== n2 && (e2.style.transform = t2));
}
var Ue, qe = /matrix\((.*)\)/, $e = /matrix3d\((.*)\)/;
function Ge(e2) {
  var t2 = e2.style.display;
  e2.style.display = "none", e2.style.display = t2;
}
function Ke(e2, t2, n2) {
  var o2 = n2;
  if ("object" !== We(t2))
    return void 0 !== o2 ? ("number" == typeof o2 && (o2 = "".concat(o2, "px")), void (e2.style[t2] = o2)) : Ue(e2, t2);
  for (var r2 in t2)
    t2.hasOwnProperty(r2) && Ke(e2, r2, t2[r2]);
}
function Ze(e2, t2) {
  var n2 = e2["page".concat(t2 ? "Y" : "X", "Offset")], o2 = "scroll".concat(t2 ? "Top" : "Left");
  if ("number" != typeof n2) {
    var r2 = e2.document;
    "number" != typeof (n2 = r2.documentElement[o2]) && (n2 = r2.body[o2]);
  }
  return n2;
}
function Je(e2) {
  return Ze(e2);
}
function Qe(e2) {
  return Ze(e2, true);
}
function et(e2) {
  var t2 = function(e3) {
    var t3, n3, o3, r2 = e3.ownerDocument, i2 = r2.body, u2 = r2 && r2.documentElement;
    return t3 = e3.getBoundingClientRect(), n3 = Math.floor(t3.left), o3 = Math.floor(t3.top), { left: n3 -= u2.clientLeft || i2.clientLeft || 0, top: o3 -= u2.clientTop || i2.clientTop || 0 };
  }(e2), n2 = e2.ownerDocument, o2 = n2.defaultView || n2.parentWindow;
  return t2.left += Je(o2), t2.top += Qe(o2), t2;
}
function tt(e2) {
  return null != e2 && e2 == e2.window;
}
function nt(e2) {
  return tt(e2) ? e2.document : 9 === e2.nodeType ? e2 : e2.ownerDocument;
}
var ot = new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, ")(?!px)[a-z%]+$"), "i"), rt = /^(top|right|bottom|left)$/, it = "currentStyle", ut = "runtimeStyle", at = "left";
function ct(e2, t2) {
  return "left" === e2 ? t2.useCssRight ? "right" : e2 : t2.useCssBottom ? "bottom" : e2;
}
function st(e2) {
  return "left" === e2 ? "right" : "right" === e2 ? "left" : "top" === e2 ? "bottom" : "bottom" === e2 ? "top" : void 0;
}
function lt(e2, t2, n2) {
  "static" === Ke(e2, "position") && (e2.style.position = "relative");
  var o2 = -999, r2 = -999, i2 = ct("left", n2), u2 = ct("top", n2), a2 = st(i2), c2 = st(u2);
  "left" !== i2 && (o2 = 999), "top" !== u2 && (r2 = 999);
  var s2, l2 = "", f2 = et(e2);
  ("left" in t2 || "top" in t2) && (l2 = (s2 = e2).style.transitionProperty || s2.style[Ie()] || "", Ye(e2, "none")), "left" in t2 && (e2.style[a2] = "", e2.style[i2] = "".concat(o2, "px")), "top" in t2 && (e2.style[c2] = "", e2.style[u2] = "".concat(r2, "px")), Ge(e2);
  var p2 = et(e2), d2 = {};
  for (var v2 in t2)
    if (t2.hasOwnProperty(v2)) {
      var h2 = ct(v2, n2), m2 = "left" === v2 ? o2 : r2, g2 = f2[v2] - p2[v2];
      d2[h2] = h2 === v2 ? m2 + g2 : m2 - g2;
    }
  Ke(e2, d2), Ge(e2), ("left" in t2 || "top" in t2) && Ye(e2, l2);
  var y2 = {};
  for (var w2 in t2)
    if (t2.hasOwnProperty(w2)) {
      var b2 = ct(w2, n2), k2 = t2[w2] - f2[w2];
      y2[b2] = w2 === b2 ? d2[b2] + k2 : d2[b2] - k2;
    }
  Ke(e2, y2);
}
function ft(e2, t2) {
  var n2 = et(e2), o2 = function(e3) {
    var t3 = window.getComputedStyle(e3, null), n3 = t3.getPropertyValue("transform") || t3.getPropertyValue(Xe());
    if (n3 && "none" !== n3) {
      var o3 = n3.replace(/[^0-9\-.,]/g, "").split(",");
      return { x: parseFloat(o3[12] || o3[4], 0), y: parseFloat(o3[13] || o3[5], 0) };
    }
    return { x: 0, y: 0 };
  }(e2), r2 = { x: o2.x, y: o2.y };
  "left" in t2 && (r2.x = o2.x + t2.left - n2.left), "top" in t2 && (r2.y = o2.y + t2.top - n2.top), function(e3, t3) {
    var n3 = window.getComputedStyle(e3, null), o3 = n3.getPropertyValue("transform") || n3.getPropertyValue(Xe());
    if (o3 && "none" !== o3) {
      var r3, i2 = o3.match(qe);
      i2 ? ((r3 = (i2 = i2[1]).split(",").map(function(e4) {
        return parseFloat(e4, 10);
      }))[4] = t3.x, r3[5] = t3.y, _e(e3, "matrix(".concat(r3.join(","), ")"))) : ((r3 = o3.match($e)[1].split(",").map(function(e4) {
        return parseFloat(e4, 10);
      }))[12] = t3.x, r3[13] = t3.y, _e(e3, "matrix3d(".concat(r3.join(","), ")")));
    } else
      _e(e3, "translateX(".concat(t3.x, "px) translateY(").concat(t3.y, "px) translateZ(0)"));
  }(e2, r2);
}
function pt(e2, t2) {
  for (var n2 = 0; n2 < e2.length; n2++)
    t2(e2[n2]);
}
function dt(e2) {
  return "border-box" === Ue(e2, "boxSizing");
}
"undefined" != typeof window && (Ue = window.getComputedStyle ? function(e2, t2, n2) {
  var o2 = n2, r2 = "", i2 = nt(e2);
  return (o2 = o2 || i2.defaultView.getComputedStyle(e2, null)) && (r2 = o2.getPropertyValue(t2) || o2[t2]), r2;
} : function(e2, t2) {
  var n2 = e2[it] && e2[it][t2];
  if (ot.test(n2) && !rt.test(t2)) {
    var o2 = e2.style, r2 = o2[at], i2 = e2[ut][at];
    e2[ut][at] = e2[it][at], o2[at] = "fontSize" === t2 ? "1em" : n2 || 0, n2 = o2.pixelLeft + "px", o2[at] = r2, e2[ut][at] = i2;
  }
  return "" === n2 ? "auto" : n2;
});
var vt = ["margin", "border", "padding"], ht = -1, mt = 2, gt = 1;
function yt(e2, t2, n2) {
  var o2, r2, i2, u2 = 0;
  for (r2 = 0; r2 < t2.length; r2++)
    if (o2 = t2[r2])
      for (i2 = 0; i2 < n2.length; i2++) {
        var a2 = void 0;
        a2 = "border" === o2 ? "".concat(o2).concat(n2[i2], "Width") : o2 + n2[i2], u2 += parseFloat(Ue(e2, a2)) || 0;
      }
  return u2;
}
var wt = { getParent: function(e2) {
  var t2 = e2;
  do {
    t2 = 11 === t2.nodeType && t2.host ? t2.host : t2.parentNode;
  } while (t2 && 1 !== t2.nodeType && 9 !== t2.nodeType);
  return t2;
} };
function bt(e2, t2, n2) {
  var o2 = n2;
  if (tt(e2))
    return "width" === t2 ? wt.viewportWidth(e2) : wt.viewportHeight(e2);
  if (9 === e2.nodeType)
    return "width" === t2 ? wt.docWidth(e2) : wt.docHeight(e2);
  var r2 = "width" === t2 ? ["Left", "Right"] : ["Top", "Bottom"], i2 = "width" === t2 ? Math.floor(e2.getBoundingClientRect().width) : Math.floor(e2.getBoundingClientRect().height), u2 = dt(e2), a2 = 0;
  (null == i2 || i2 <= 0) && (i2 = void 0, (null == (a2 = Ue(e2, t2)) || Number(a2) < 0) && (a2 = e2.style[t2] || 0), a2 = Math.floor(parseFloat(a2)) || 0), void 0 === o2 && (o2 = u2 ? gt : ht);
  var c2 = void 0 !== i2 || u2, s2 = i2 || a2;
  return o2 === ht ? c2 ? s2 - yt(e2, ["border", "padding"], r2) : a2 : c2 ? o2 === gt ? s2 : s2 + (o2 === mt ? -yt(e2, ["border"], r2) : yt(e2, ["margin"], r2)) : a2 + yt(e2, vt.slice(o2), r2);
}
pt(["Width", "Height"], function(e2) {
  wt["doc".concat(e2)] = function(t2) {
    var n2 = t2.document;
    return Math.max(n2.documentElement["scroll".concat(e2)], n2.body["scroll".concat(e2)], wt["viewport".concat(e2)](n2));
  }, wt["viewport".concat(e2)] = function(t2) {
    var n2 = "client".concat(e2), o2 = t2.document, r2 = o2.body, i2 = o2.documentElement[n2];
    return "CSS1Compat" === o2.compatMode && i2 || r2 && r2[n2] || i2;
  };
});
var kt = { position: "absolute", visibility: "hidden", display: "block" };
function Ct() {
  for (var e2 = arguments.length, t2 = new Array(e2), n2 = 0; n2 < e2; n2++)
    t2[n2] = arguments[n2];
  var o2, r2 = t2[0];
  return 0 !== r2.offsetWidth ? o2 = bt.apply(void 0, t2) : function(e3, t3, n3) {
    var o3, r3 = {}, i2 = e3.style;
    for (o3 in t3)
      t3.hasOwnProperty(o3) && (r3[o3] = i2[o3], i2[o3] = t3[o3]);
    for (o3 in n3.call(e3), t3)
      t3.hasOwnProperty(o3) && (i2[o3] = r3[o3]);
  }(r2, kt, function() {
    o2 = bt.apply(void 0, t2);
  }), o2;
}
function Tt(e2, t2) {
  for (var n2 in t2)
    t2.hasOwnProperty(n2) && (e2[n2] = t2[n2]);
  return e2;
}
pt(["width", "height"], function(e2) {
  var t2 = e2.charAt(0).toUpperCase() + e2.slice(1);
  wt["outer".concat(t2)] = function(t3, n3) {
    return t3 && Ct(t3, e2, n3 ? 0 : gt);
  };
  var n2 = "width" === e2 ? ["Left", "Right"] : ["Top", "Bottom"];
  wt[e2] = function(t3, o2) {
    var r2 = o2;
    return void 0 !== r2 ? t3 ? (dt(t3) && (r2 += yt(t3, ["padding", "border"], n2)), Ke(t3, e2, r2)) : void 0 : t3 && Ct(t3, e2, ht);
  };
});
var Mt = { getWindow: function(e2) {
  if (e2 && e2.document && e2.setTimeout)
    return e2;
  var t2 = e2.ownerDocument || e2;
  return t2.defaultView || t2.parentWindow;
}, getDocument: nt, offset: function(e2, t2, n2) {
  if (void 0 === t2)
    return et(e2);
  !function(e3, t3, n3) {
    if (n3.ignoreShake) {
      var o2 = et(e3), r2 = o2.left.toFixed(0), i2 = o2.top.toFixed(0), u2 = t3.left.toFixed(0), a2 = t3.top.toFixed(0);
      if (r2 === u2 && i2 === a2)
        return;
    }
    n3.useCssRight || n3.useCssBottom ? lt(e3, t3, n3) : n3.useCssTransform && Xe() in document.body.style ? ft(e3, t3) : lt(e3, t3, n3);
  }(e2, t2, n2 || {});
}, isWindow: tt, each: pt, css: Ke, clone: function(e2) {
  var t2, n2 = {};
  for (t2 in e2)
    e2.hasOwnProperty(t2) && (n2[t2] = e2[t2]);
  if (e2.overflow)
    for (t2 in e2)
      e2.hasOwnProperty(t2) && (n2.overflow[t2] = e2.overflow[t2]);
  return n2;
}, mix: Tt, getWindowScrollLeft: function(e2) {
  return Je(e2);
}, getWindowScrollTop: function(e2) {
  return Qe(e2);
}, merge: function() {
  for (var e2 = {}, t2 = 0; t2 < arguments.length; t2++)
    Mt.mix(e2, t2 < 0 || arguments.length <= t2 ? void 0 : arguments[t2]);
  return e2;
}, viewportWidth: 0, viewportHeight: 0 };
Tt(Mt, wt);
var xt = Mt.getParent;
function Et(e2) {
  if (Mt.isWindow(e2) || 9 === e2.nodeType)
    return null;
  var t2, n2 = Mt.getDocument(e2).body, o2 = Mt.css(e2, "position");
  if (!("fixed" === o2 || "absolute" === o2))
    return "html" === e2.nodeName.toLowerCase() ? null : xt(e2);
  for (t2 = xt(e2); t2 && t2 !== n2 && 9 !== t2.nodeType; t2 = xt(t2))
    if ("static" !== (o2 = Mt.css(t2, "position")))
      return t2;
  return null;
}
var Pt = Mt.getParent;
function Ot(e2, t2) {
  for (var n2 = { left: 0, right: 1 / 0, top: 0, bottom: 1 / 0 }, o2 = Et(e2), r2 = Mt.getDocument(e2), i2 = r2.defaultView || r2.parentWindow, u2 = r2.body, a2 = r2.documentElement; o2; ) {
    if (-1 !== navigator.userAgent.indexOf("MSIE") && 0 === o2.clientWidth || o2 === u2 || o2 === a2 || "visible" === Mt.css(o2, "overflow")) {
      if (o2 === u2 || o2 === a2)
        break;
    } else {
      var c2 = Mt.offset(o2);
      c2.left += o2.clientLeft, c2.top += o2.clientTop, n2.top = Math.max(n2.top, c2.top), n2.right = Math.min(n2.right, c2.left + o2.clientWidth), n2.bottom = Math.min(n2.bottom, c2.top + o2.clientHeight), n2.left = Math.max(n2.left, c2.left);
    }
    o2 = Et(o2);
  }
  var s2 = null;
  Mt.isWindow(e2) || 9 === e2.nodeType || (s2 = e2.style.position, "absolute" === Mt.css(e2, "position") && (e2.style.position = "fixed"));
  var l2 = Mt.getWindowScrollLeft(i2), f2 = Mt.getWindowScrollTop(i2), p2 = Mt.viewportWidth(i2), d2 = Mt.viewportHeight(i2), v2 = a2.scrollWidth, h2 = a2.scrollHeight, m2 = window.getComputedStyle(u2);
  if ("hidden" === m2.overflowX && (v2 = i2.innerWidth), "hidden" === m2.overflowY && (h2 = i2.innerHeight), e2.style && (e2.style.position = s2), t2 || function(e3) {
    if (Mt.isWindow(e3) || 9 === e3.nodeType)
      return false;
    var t3 = Mt.getDocument(e3), n3 = t3.body, o3 = null;
    for (o3 = Pt(e3); o3 && o3 !== n3 && o3 !== t3; o3 = Pt(o3))
      if ("fixed" === Mt.css(o3, "position"))
        return true;
    return false;
  }(e2))
    n2.left = Math.max(n2.left, l2), n2.top = Math.max(n2.top, f2), n2.right = Math.min(n2.right, l2 + p2), n2.bottom = Math.min(n2.bottom, f2 + d2);
  else {
    var g2 = Math.max(v2, l2 + p2);
    n2.right = Math.min(n2.right, g2);
    var y2 = Math.max(h2, f2 + d2);
    n2.bottom = Math.min(n2.bottom, y2);
  }
  return n2.top >= 0 && n2.left >= 0 && n2.bottom > n2.top && n2.right > n2.left ? n2 : null;
}
function Dt(e2) {
  var t2, n2, o2;
  if (Mt.isWindow(e2) || 9 === e2.nodeType) {
    var r2 = Mt.getWindow(e2);
    t2 = { left: Mt.getWindowScrollLeft(r2), top: Mt.getWindowScrollTop(r2) }, n2 = Mt.viewportWidth(r2), o2 = Mt.viewportHeight(r2);
  } else
    t2 = Mt.offset(e2), n2 = Mt.outerWidth(e2), o2 = Mt.outerHeight(e2);
  return t2.width = n2, t2.height = o2, t2;
}
function St(e2, t2) {
  var n2 = t2.charAt(0), o2 = t2.charAt(1), r2 = e2.width, i2 = e2.height, u2 = e2.left, a2 = e2.top;
  return "c" === n2 ? a2 += i2 / 2 : "b" === n2 && (a2 += i2), "c" === o2 ? u2 += r2 / 2 : "r" === o2 && (u2 += r2), { left: u2, top: a2 };
}
function Nt(e2, t2, n2, o2, r2) {
  var i2 = St(t2, n2[1]), u2 = St(e2, n2[0]), a2 = [u2.left - i2.left, u2.top - i2.top];
  return { left: Math.round(e2.left - a2[0] + o2[0] - r2[0]), top: Math.round(e2.top - a2[1] + o2[1] - r2[1]) };
}
function At(e2, t2, n2) {
  return e2.left < n2.left || e2.left + t2.width > n2.right;
}
function Lt(e2, t2, n2) {
  return e2.top < n2.top || e2.top + t2.height > n2.bottom;
}
function Rt(e2, t2, n2) {
  var o2 = [];
  return Mt.each(e2, function(e3) {
    o2.push(e3.replace(t2, function(e4) {
      return n2[e4];
    }));
  }), o2;
}
function Vt(e2, t2) {
  return e2[t2] = -e2[t2], e2;
}
function Ht(e2, t2) {
  return (/%$/.test(e2) ? parseInt(e2.substring(0, e2.length - 1), 10) / 100 * t2 : parseInt(e2, 10)) || 0;
}
function jt(e2, t2) {
  e2[0] = Ht(e2[0], t2.width), e2[1] = Ht(e2[1], t2.height);
}
function Wt(e2, t2, n2, o2) {
  var r2 = n2.points, i2 = n2.offset || [0, 0], u2 = n2.targetOffset || [0, 0], a2 = n2.overflow, c2 = n2.source || e2;
  i2 = [].concat(i2), u2 = [].concat(u2);
  var s2 = {}, l2 = 0, f2 = Ot(c2, !(!(a2 = a2 || {}) || !a2.alwaysByViewport)), p2 = Dt(c2);
  jt(i2, p2), jt(u2, t2);
  var d2 = Nt(p2, t2, r2, i2, u2), v2 = Mt.merge(p2, d2);
  if (f2 && (a2.adjustX || a2.adjustY) && o2) {
    if (a2.adjustX && At(d2, p2, f2)) {
      var h2 = Rt(r2, /[lr]/gi, { l: "r", r: "l" }), m2 = Vt(i2, 0), g2 = Vt(u2, 0);
      (function(e3, t3, n3) {
        return e3.left > n3.right || e3.left + t3.width < n3.left;
      })(Nt(p2, t2, h2, m2, g2), p2, f2) || (l2 = 1, r2 = h2, i2 = m2, u2 = g2);
    }
    if (a2.adjustY && Lt(d2, p2, f2)) {
      var y2 = Rt(r2, /[tb]/gi, { t: "b", b: "t" }), w2 = Vt(i2, 1), b2 = Vt(u2, 1);
      (function(e3, t3, n3) {
        return e3.top > n3.bottom || e3.top + t3.height < n3.top;
      })(Nt(p2, t2, y2, w2, b2), p2, f2) || (l2 = 1, r2 = y2, i2 = w2, u2 = b2);
    }
    l2 && (d2 = Nt(p2, t2, r2, i2, u2), Mt.mix(v2, d2));
    var k2 = At(d2, p2, f2), C2 = Lt(d2, p2, f2);
    if (k2 || C2) {
      var T2 = r2;
      k2 && (T2 = Rt(r2, /[lr]/gi, { l: "r", r: "l" })), C2 && (T2 = Rt(r2, /[tb]/gi, { t: "b", b: "t" })), r2 = T2, i2 = n2.offset || [0, 0], u2 = n2.targetOffset || [0, 0];
    }
    s2.adjustX = a2.adjustX && k2, s2.adjustY = a2.adjustY && C2, (s2.adjustX || s2.adjustY) && (v2 = function(e3, t3, n3, o3) {
      var r3 = Mt.clone(e3), i3 = { width: t3.width, height: t3.height };
      return o3.adjustX && r3.left < n3.left && (r3.left = n3.left), o3.resizeWidth && r3.left >= n3.left && r3.left + i3.width > n3.right && (i3.width -= r3.left + i3.width - n3.right), o3.adjustX && r3.left + i3.width > n3.right && (r3.left = Math.max(n3.right - i3.width, n3.left)), o3.adjustY && r3.top < n3.top && (r3.top = n3.top), o3.resizeHeight && r3.top >= n3.top && r3.top + i3.height > n3.bottom && (i3.height -= r3.top + i3.height - n3.bottom), o3.adjustY && r3.top + i3.height > n3.bottom && (r3.top = Math.max(n3.bottom - i3.height, n3.top)), Mt.mix(r3, i3);
    }(d2, p2, f2, s2));
  }
  return v2.width !== p2.width && Mt.css(c2, "width", Mt.width(c2) + v2.width - p2.width), v2.height !== p2.height && Mt.css(c2, "height", Mt.height(c2) + v2.height - p2.height), Mt.offset(c2, { left: v2.left, top: v2.top }, { useCssRight: n2.useCssRight, useCssBottom: n2.useCssBottom, useCssTransform: n2.useCssTransform, ignoreShake: n2.ignoreShake }), { points: r2, offset: i2, targetOffset: u2, overflow: s2 };
}
function Ft(e2, t2, n2) {
  var o2 = n2.target || t2, r2 = Dt(o2), i2 = !function(e3, t3) {
    var n3 = Ot(e3, t3), o3 = Dt(e3);
    return !n3 || o3.left + o3.width <= n3.left || o3.top + o3.height <= n3.top || o3.left >= n3.right || o3.top >= n3.bottom;
  }(o2, n2.overflow && n2.overflow.alwaysByViewport);
  return Wt(e2, r2, n2, i2);
}
Ft.__getOffsetParent = Et, Ft.__getVisibleRectForElement = Ot;
var zt = {}, Bt = [];
function It(e2, t2) {
  if ("production" !== process.env.NODE_ENV && !e2 && void 0 !== console)
    Bt.reduce(function(e3, t3) {
      return t3(null != e3 ? e3 : "", "warning");
    }, t2);
}
function Xt(e2, t2) {
  if ("production" !== process.env.NODE_ENV && !e2 && void 0 !== console)
    Bt.reduce(function(e3, t3) {
      return t3(null != e3 ? e3 : "", "note");
    }, t2);
}
function Yt(e2, t2, n2) {
  t2 || zt[n2] || (e2(false, n2), zt[n2] = true);
}
function _t(e2, t2) {
  Yt(It, e2, t2);
}
_t.preMessage = function(e2) {
  Bt.push(e2);
}, _t.resetWarned = function() {
  zt = {};
}, _t.noteOnce = function(e2, t2) {
  Yt(Xt, e2, t2);
};
var Ut = "test" !== process.env.NODE_ENV && "undefined" != typeof window && window.document && window.document.createElement ? e.useLayoutEffect : e.useEffect;
function qt() {
  for (var e2 = arguments.length, t2 = new Array(e2), n2 = 0; n2 < e2; n2++)
    t2[n2] = arguments[n2];
  var o2 = t2.filter(function(e3) {
    return e3;
  });
  return o2.length <= 1 ? o2[0] : function(e3) {
    t2.forEach(function(t3) {
      !function(e4, t4) {
        "function" == typeof e4 ? e4(t4) : "object" === s(e4) && e4 && "current" in e4 && (e4.current = t4);
      }(t3, e3);
    });
  };
}
function $t(e2, t2) {
  var n2 = null, o2 = null;
  var r2 = new T(function(e3) {
    var r3 = p(e3, 1)[0].target;
    if (document.documentElement.contains(r3)) {
      var i2 = r3.getBoundingClientRect(), u2 = i2.width, a2 = i2.height, c2 = Math.floor(u2), s2 = Math.floor(a2);
      n2 === c2 && o2 === s2 || Promise.resolve().then(function() {
        t2({ width: c2, height: s2 });
      }), n2 = c2, o2 = s2;
    }
  });
  return e2 && r2.observe(e2), function() {
    r2.disconnect();
  };
}
function Gt(e2) {
  return "function" != typeof e2 ? null : e2();
}
function Kt(e2) {
  return "object" === s(e2) && e2 ? e2 : null;
}
var Zt = function(n2, o2) {
  var r2 = n2.children, i2 = n2.disabled, u2 = n2.target, a2 = n2.align, c2 = n2.onAlign, l2 = n2.monitorWindowResize, f2 = n2.monitorBufferTime, d2 = void 0 === f2 ? 0 : f2, v2 = t.useRef({}), h2 = t.useRef(), m2 = t.Children.only(r2), g2 = t.useRef({});
  g2.current.disabled = i2, g2.current.target = u2, g2.current.align = a2, g2.current.onAlign = c2;
  var y2, w2, b2, k2 = function(e2, n3) {
    var o3 = t.useRef(false), r3 = t.useRef(null);
    function i3() {
      window.clearTimeout(r3.current);
    }
    return [function t2(u3) {
      if (i3(), o3.current && true !== u3)
        r3.current = window.setTimeout(function() {
          o3.current = false, t2();
        }, n3);
      else {
        if (false === e2(u3))
          return;
        o3.current = true, r3.current = window.setTimeout(function() {
          o3.current = false;
        }, n3);
      }
    }, function() {
      o3.current = false, i3();
    }];
  }(function() {
    var e2 = g2.current, t2 = e2.disabled, n3 = e2.target, o3 = e2.align, r3 = e2.onAlign, i3 = h2.current;
    if (!t2 && n3 && i3) {
      var u3, a3 = Gt(n3), c3 = Kt(n3);
      v2.current.element = a3, v2.current.point = c3, v2.current.align = o3;
      var s2 = document.activeElement;
      return a3 && function(e3) {
        if (!e3)
          return false;
        if (e3 instanceof Element) {
          if (e3.offsetParent)
            return true;
          if (e3.getBBox) {
            var t3 = e3.getBBox(), n4 = t3.width, o4 = t3.height;
            if (n4 || o4)
              return true;
          }
          if (e3.getBoundingClientRect) {
            var r4 = e3.getBoundingClientRect(), i4 = r4.width, u4 = r4.height;
            if (i4 || u4)
              return true;
          }
        }
        return false;
      }(a3) ? u3 = Ft(i3, a3, o3) : c3 && (u3 = function(e3, t3, n4) {
        var o4, r4, i4 = Mt.getDocument(e3), u4 = i4.defaultView || i4.parentWindow, a4 = Mt.getWindowScrollLeft(u4), c4 = Mt.getWindowScrollTop(u4), s3 = Mt.viewportWidth(u4), l3 = Mt.viewportHeight(u4), f3 = { left: o4 = "pageX" in t3 ? t3.pageX : a4 + t3.clientX, top: r4 = "pageY" in t3 ? t3.pageY : c4 + t3.clientY, width: 0, height: 0 }, p2 = o4 >= 0 && o4 <= a4 + s3 && r4 >= 0 && r4 <= c4 + l3, d3 = [n4.points[0], "cc"];
        return Wt(e3, f3, je(je({}, n4), {}, { points: d3 }), p2);
      }(i3, c3, o3)), function(e3, t3) {
        e3 !== document.activeElement && function(e4, t4) {
          if (!e4)
            return false;
          if (e4.contains)
            return e4.contains(t4);
          for (var n4 = t4; n4; ) {
            if (n4 === e4)
              return true;
            n4 = n4.parentNode;
          }
          return false;
        }(t3, e3) && "function" == typeof e3.focus && e3.focus();
      }(s2, i3), r3 && u3 && r3(i3, u3), true;
    }
    return false;
  }, d2), C2 = p(k2, 2), T2 = C2[0], M2 = C2[1], x2 = t.useState(), P2 = p(x2, 2), O2 = P2[0], D2 = P2[1], S2 = t.useState(), N2 = p(S2, 2), A2 = N2[0], L2 = N2[1];
  return y2 = function() {
    D2(Gt(u2)), L2(Kt(u2));
  }, b2 = e.useRef(true), Ut(function() {
    return y2(b2.current);
  }, w2), Ut(function() {
    return b2.current = false, function() {
      b2.current = true;
    };
  }, []), t.useEffect(function() {
    var e2, t2;
    v2.current.element === O2 && ((e2 = v2.current.point) === (t2 = A2) || e2 && t2 && ("pageX" in t2 && "pageY" in t2 ? e2.pageX === t2.pageX && e2.pageY === t2.pageY : "clientX" in t2 && "clientY" in t2 && e2.clientX === t2.clientX && e2.clientY === t2.clientY)) && function(e3, t3) {
      var n3 = arguments.length > 2 && void 0 !== arguments[2] && arguments[2], o3 = /* @__PURE__ */ new Set();
      return function e4(t4, r3) {
        var i3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1, u3 = o3.has(t4);
        if (_t(!u3, "Warning: There may be circular references"), u3)
          return false;
        if (t4 === r3)
          return true;
        if (n3 && i3 > 1)
          return false;
        o3.add(t4);
        var a3 = i3 + 1;
        if (Array.isArray(t4)) {
          if (!Array.isArray(r3) || t4.length !== r3.length)
            return false;
          for (var c3 = 0; c3 < t4.length; c3++)
            if (!e4(t4[c3], r3[c3], a3))
              return false;
          return true;
        }
        if (t4 && r3 && "object" === s(t4) && "object" === s(r3)) {
          var l3 = Object.keys(t4);
          return l3.length === Object.keys(r3).length && l3.every(function(n4) {
            return e4(t4[n4], r3[n4], a3);
          });
        }
        return false;
      }(e3, t3);
    }(v2.current.align, a2) || T2();
  }), t.useEffect(function() {
    return $t(h2.current, T2);
  }, [h2.current]), t.useEffect(function() {
    return $t(O2, T2);
  }, [O2]), t.useEffect(function() {
    i2 ? M2() : T2();
  }, [i2]), t.useEffect(function() {
    if (l2) {
      var e2 = function(e3, t2, n3, o3) {
        var r3 = E.unstable_batchedUpdates ? function(e4) {
          E.unstable_batchedUpdates(n3, e4);
        } : n3;
        return null != e3 && e3.addEventListener && e3.addEventListener(t2, r3, o3), { remove: function() {
          null != e3 && e3.removeEventListener && e3.removeEventListener(t2, r3, o3);
        } };
      }(window, "resize", T2);
      return e2.remove;
    }
  }, [l2]), t.useEffect(function() {
    return function() {
      M2();
    };
  }, []), t.useImperativeHandle(o2, function() {
    return { forceAlign: function() {
      return T2(true);
    } };
  }), t.isValidElement(m2) && (m2 = t.cloneElement(m2, { ref: qt(m2.ref, h2) })), m2;
}, Jt = t.forwardRef(Zt);
Jt.displayName = "Align";
var Qt = "test" !== process.env.NODE_ENV && W() ? e.useLayoutEffect : e.useEffect, en = function(t2, n2) {
  var o2 = e.useRef(true);
  Qt(function() {
    return t2(o2.current);
  }, n2), Qt(function() {
    return o2.current = false, function() {
      o2.current = true;
    };
  }, []);
}, tn = ["measure", "alignPre", "align", null, "motion"];
var nn = e.forwardRef(function(t2, n2) {
  var r2 = t2.visible, u2 = t2.prefixCls, a2 = t2.className, s2 = t2.style, l2 = t2.children, d2 = t2.zIndex, m2 = t2.stretch, g2 = t2.destroyPopupOnHide, y2 = t2.forceRender, w2 = t2.align, b2 = t2.point, k2 = t2.getRootDomNode, C2 = t2.getClassNameFromAlign, T2 = t2.onAlign, E2 = t2.onMouseEnter, P2 = t2.onMouseLeave, O2 = t2.onMouseDown, D2 = t2.onTouchStart, S2 = t2.onClick, N2 = o(), L2 = o(), R2 = c(), V2 = p(R2, 2), H2 = V2[0], j2 = V2[1], W2 = function(t3) {
    var n3 = e.useState({ width: 0, height: 0 }), o2 = p(n3, 2), r3 = o2[0], i2 = o2[1];
    return [e.useMemo(function() {
      var e2 = {};
      if (t3) {
        var n4 = r3.width, o3 = r3.height;
        -1 !== t3.indexOf("height") && o3 ? e2.height = o3 : -1 !== t3.indexOf("minHeight") && o3 && (e2.minHeight = o3), -1 !== t3.indexOf("width") && n4 ? e2.width = n4 : -1 !== t3.indexOf("minWidth") && n4 && (e2.minWidth = n4);
      }
      return e2;
    }, [t3, r3]), function(e2) {
      var t4 = e2.offsetWidth, n4 = e2.offsetHeight, o3 = e2.getBoundingClientRect(), r4 = o3.width, u3 = o3.height;
      Math.abs(t4 - r4) < 1 && Math.abs(n4 - u3) < 1 && (t4 = r4, n4 = u3), i2({ width: t4, height: n4 });
    }];
  }(m2), F2 = p(W2, 2), z2 = F2[0], B2 = F2[1];
  var I2 = function(e2, t3) {
    var n3 = X(null), r3 = p(n3, 2), u3 = r3[0], a3 = r3[1], c2 = o();
    function s3(e3) {
      a3(e3, true);
    }
    function l3() {
      A.cancel(c2.current);
    }
    return i(function() {
      s3("measure");
    }, [e2]), i(function() {
      "measure" === u3 && t3(), u3 && (c2.current = A(M(x().mark(function e3() {
        var t4, n4;
        return x().wrap(function(e4) {
          for (; ; )
            switch (e4.prev = e4.next) {
              case 0:
                t4 = tn.indexOf(u3), (n4 = tn[t4 + 1]) && -1 !== t4 && s3(n4);
              case 3:
              case "end":
                return e4.stop();
            }
        }, e3);
      }))));
    }, [u3]), i(function() {
      return function() {
        l3();
      };
    }, []), [u3, function(e3) {
      l3(), c2.current = A(function() {
        s3(function(e4) {
          switch (u3) {
            case "align":
              return "motion";
            case "motion":
              return "stable";
          }
          return e4;
        }), null == e3 || e3();
      });
    }];
  }(r2, function() {
    m2 && B2(k2());
  }), Y2 = p(I2, 2), _2 = Y2[0], U2 = Y2[1], q2 = c(0), $2 = p(q2, 2), G2 = $2[0], K2 = $2[1], Z2 = o();
  function J2() {
    var e2;
    null === (e2 = N2.current) || void 0 === e2 || e2.forceAlign();
  }
  function Q2(e2, t3) {
    var n3 = C2(t3);
    H2 !== n3 && j2(n3), K2(function(e3) {
      return e3 + 1;
    }), "align" === _2 && (null == T2 || T2(e2, t3));
  }
  en(function() {
    "alignPre" === _2 && K2(0);
  }, [_2]), en(function() {
    "align" === _2 && (G2 < 3 ? J2() : U2(function() {
      var e2;
      null === (e2 = Z2.current) || void 0 === e2 || e2.call(Z2);
    }));
  }, [G2]);
  var ee2 = f({}, Re(t2));
  function te2() {
    return new Promise(function(e2) {
      Z2.current = e2;
    });
  }
  ["onAppearEnd", "onEnterEnd", "onLeaveEnd"].forEach(function(e2) {
    var t3 = ee2[e2];
    ee2[e2] = function(e3, n3) {
      return U2(), null == t3 ? void 0 : t3(e3, n3);
    };
  }), e.useEffect(function() {
    ee2.motionName || "motion" !== _2 || U2();
  }, [ee2.motionName, _2]), e.useImperativeHandle(n2, function() {
    return { forceAlign: J2, getElement: function() {
      return L2.current;
    } };
  });
  var ne2 = f(f({}, z2), {}, { zIndex: d2, opacity: "motion" !== _2 && "stable" !== _2 && r2 ? 0 : void 0, pointerEvents: r2 || "stable" === _2 ? void 0 : "none" }, s2), oe2 = true;
  null == w2 || !w2.points || "align" !== _2 && "stable" !== _2 || (oe2 = false);
  var re2 = l2;
  return e.Children.count(l2) > 1 && (re2 = h("div", { className: "".concat(u2, "-content"), children: l2 })), h(Te, { visible: r2, ref: L2, leavedClassName: "".concat(u2, "-hidden"), ...ee2, onAppearPrepare: te2, onEnterPrepare: te2, removeOnLeave: g2, forceRender: y2, children: function(e2, t3) {
    var n3 = e2.className, o2 = e2.style, r3 = v(u2, a2, H2, n3);
    return h(Jt, { target: b2 || k2, ref: N2, monitorWindowResize: true, disabled: oe2, align: w2, onAlign: Q2, children: h("div", { ref: t3, className: r3, onMouseEnter: E2, onMouseLeave: P2, onMouseDownCapture: O2, onTouchStartCapture: D2, onClick: S2, style: f(f({}, o2), ne2), children: re2 }) }, "popup");
  } });
});
nn.displayName = "PopupInner";
var on = e.forwardRef(function(t2, n2) {
  var o2 = t2.prefixCls, r2 = t2.visible, i2 = t2.zIndex, u2 = t2.children, a2 = t2.mobile, c2 = (a2 = void 0 === a2 ? {} : a2).popupClassName, s2 = a2.popupStyle, l2 = a2.popupMotion, p2 = void 0 === l2 ? {} : l2, d2 = a2.popupRender, m2 = t2.onClick, g2 = e.useRef();
  e.useImperativeHandle(n2, function() {
    return { forceAlign: function() {
    }, getElement: function() {
      return g2.current;
    } };
  });
  var y2 = f({ zIndex: i2 }, s2), w2 = u2;
  return e.Children.count(u2) > 1 && (w2 = h("div", { className: "".concat(o2, "-content"), children: u2 })), d2 && (w2 = d2(w2)), h(Te, { visible: r2, ref: g2, removeOnLeave: true, ...p2, children: function(e2, t3) {
    var n3 = e2.className, r3 = e2.style, i3 = v(o2, c2, n3);
    return h("div", { ref: t3, className: i3, onClick: m2, style: f(f({}, r3), y2), children: w2 });
  } });
});
on.displayName = "MobilePopupInner";
var rn = ["visible", "mobile"], un = e.forwardRef(function(e2, t2) {
  var n2 = e2.visible, o2 = e2.mobile, r2 = m(e2, rn), u2 = c(n2), a2 = p(u2, 2), s2 = a2[0], l2 = a2[1], d2 = c(false), v2 = p(d2, 2), y2 = v2[0], w2 = v2[1], b2 = f(f({}, r2), {}, { visible: s2 });
  i(function() {
    l2(n2), n2 && o2 && w2(function() {
      if ("undefined" == typeof navigator || "undefined" == typeof window)
        return false;
      var e3 = 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(e3) || /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 == e3 ? void 0 : e3.substr(0, 4));
    }());
  }, [n2, o2]);
  var k2 = y2 ? h(on, { ...b2, mobile: o2, ref: t2 }) : h(nn, { ...b2, ref: t2 });
  return g("div", { children: [h(Ve, { ...b2 }), k2] });
});
un.displayName = "Popup";
var an = e.createContext(null);
function cn() {
}
function sn() {
  return "";
}
function ln(e2) {
  return e2 ? e2.ownerDocument : window.document;
}
var fn = ["onClick", "onMouseDown", "onTouchStart", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onContextMenu"];
const pn = function(t2) {
  var n2 = function(n3) {
    y(r2, n3);
    var o2 = w(r2);
    function r2(t3) {
      var n4, i2;
      return b(this, r2), n4 = o2.call(this, t3), d(C(n4), "popupRef", e.createRef()), d(C(n4), "triggerRef", e.createRef()), d(C(n4), "portalContainer", void 0), d(C(n4), "attachId", void 0), d(C(n4), "clickOutsideHandler", void 0), d(C(n4), "touchOutsideHandler", void 0), d(C(n4), "contextMenuOutsideHandler1", void 0), d(C(n4), "contextMenuOutsideHandler2", void 0), d(C(n4), "mouseDownTimeout", void 0), d(C(n4), "focusTime", void 0), d(C(n4), "preClickTime", void 0), d(C(n4), "preTouchTime", void 0), d(C(n4), "delayTimer", void 0), d(C(n4), "hasPopupMouseDown", void 0), d(C(n4), "onMouseEnter", function(e2) {
        var t4 = n4.props.mouseEnterDelay;
        n4.fireEvents("onMouseEnter", e2), n4.delaySetPopupVisible(true, t4, t4 ? null : e2);
      }), d(C(n4), "onMouseMove", function(e2) {
        n4.fireEvents("onMouseMove", e2), n4.setPoint(e2);
      }), d(C(n4), "onMouseLeave", function(e2) {
        n4.fireEvents("onMouseLeave", e2), n4.delaySetPopupVisible(false, n4.props.mouseLeaveDelay);
      }), d(C(n4), "onPopupMouseEnter", function() {
        n4.clearDelayTimer();
      }), d(C(n4), "onPopupMouseLeave", function(e2) {
        var t4;
        e2.relatedTarget && !e2.relatedTarget.setTimeout && L(null === (t4 = n4.popupRef.current) || void 0 === t4 ? void 0 : t4.getElement(), e2.relatedTarget) || n4.delaySetPopupVisible(false, n4.props.mouseLeaveDelay);
      }), d(C(n4), "onFocus", function(e2) {
        n4.fireEvents("onFocus", e2), n4.clearDelayTimer(), n4.isFocusToShow() && (n4.focusTime = Date.now(), n4.delaySetPopupVisible(true, n4.props.focusDelay));
      }), d(C(n4), "onMouseDown", function(e2) {
        n4.fireEvents("onMouseDown", e2), n4.preClickTime = Date.now();
      }), d(C(n4), "onTouchStart", function(e2) {
        n4.fireEvents("onTouchStart", e2), n4.preTouchTime = Date.now();
      }), d(C(n4), "onBlur", function(e2) {
        n4.fireEvents("onBlur", e2), n4.clearDelayTimer(), n4.isBlurToHide() && n4.delaySetPopupVisible(false, n4.props.blurDelay);
      }), d(C(n4), "onContextMenu", function(e2) {
        e2.preventDefault(), n4.fireEvents("onContextMenu", e2), n4.setPopupVisible(true, e2);
      }), d(C(n4), "onContextMenuClose", function() {
        n4.isContextMenuToShow() && n4.close();
      }), d(C(n4), "onClick", function(e2) {
        if (n4.fireEvents("onClick", e2), n4.focusTime) {
          var t4;
          if (n4.preClickTime && n4.preTouchTime ? t4 = Math.min(n4.preClickTime, n4.preTouchTime) : n4.preClickTime ? t4 = n4.preClickTime : n4.preTouchTime && (t4 = n4.preTouchTime), Math.abs(t4 - n4.focusTime) < 20)
            return;
          n4.focusTime = 0;
        }
        n4.preClickTime = 0, n4.preTouchTime = 0, n4.isClickToShow() && (n4.isClickToHide() || n4.isBlurToHide()) && e2 && e2.preventDefault && e2.preventDefault();
        var o3 = !n4.state.popupVisible;
        (n4.isClickToHide() && !o3 || o3 && n4.isClickToShow()) && n4.setPopupVisible(!n4.state.popupVisible, e2);
      }), d(C(n4), "onPopupMouseDown", function() {
        var e2;
        (n4.hasPopupMouseDown = true, clearTimeout(n4.mouseDownTimeout), n4.mouseDownTimeout = window.setTimeout(function() {
          n4.hasPopupMouseDown = false;
        }, 0), n4.context) && (e2 = n4.context).onPopupMouseDown.apply(e2, arguments);
      }), d(C(n4), "onDocumentClick", function(e2) {
        if (!n4.props.mask || n4.props.maskClosable) {
          var t4 = e2.target, o3 = n4.getRootDomNode(), r3 = n4.getPopupDomNode();
          L(o3, t4) && !n4.isContextMenuOnly() || L(r3, t4) || n4.hasPopupMouseDown || n4.close();
        }
      }), d(C(n4), "getRootDomNode", function() {
        var e2 = n4.props.getTriggerDOMNode;
        if (e2)
          return e2(n4.triggerRef.current);
        try {
          var t4 = R(n4.triggerRef.current);
          if (t4)
            return t4;
        } catch (e3) {
        }
        return E.findDOMNode(C(n4));
      }), d(C(n4), "getPopupClassNameFromAlign", function(e2) {
        var t4 = [], o3 = n4.props, r3 = o3.popupPlacement, i3 = o3.builtinPlacements, u2 = o3.prefixCls, a2 = o3.alignPoint, c2 = o3.getPopupClassNameFromAlign;
        return r3 && i3 && t4.push(function(e3, t5, n5, o4) {
          for (var r4 = n5.points, i4 = Object.keys(e3), u3 = 0; u3 < i4.length; u3 += 1) {
            var a3 = i4[u3];
            if (z(e3[a3].points, r4, o4))
              return "".concat(t5, "-placement-").concat(a3);
          }
          return "";
        }(i3, u2, e2, a2)), c2 && t4.push(c2(e2)), t4.join(" ");
      }), d(C(n4), "getComponent", function() {
        var e2 = n4.props, t4 = e2.prefixCls, o3 = e2.destroyPopupOnHide, r3 = e2.popupClassName, i3 = e2.onPopupAlign, u2 = e2.popupMotion, a2 = e2.popupAnimation, c2 = e2.popupTransitionName, s2 = e2.popupStyle, l2 = e2.mask, f2 = e2.maskAnimation, p2 = e2.maskTransitionName, d2 = e2.maskMotion, v2 = e2.zIndex, m2 = e2.popup, g2 = e2.stretch, y2 = e2.alignPoint, w2 = e2.mobile, b2 = e2.forceRender, k2 = e2.onPopupClick, C2 = n4.state, T2 = C2.popupVisible, M2 = C2.point, x2 = n4.getPopupAlign(), E2 = {};
        return n4.isMouseEnterToShow() && (E2.onMouseEnter = n4.onPopupMouseEnter), n4.isMouseLeaveToHide() && (E2.onMouseLeave = n4.onPopupMouseLeave), E2.onMouseDown = n4.onPopupMouseDown, E2.onTouchStart = n4.onPopupMouseDown, h(un, { prefixCls: t4, destroyPopupOnHide: o3, visible: T2, point: y2 && M2, className: r3, align: x2, onAlign: i3, animation: a2, getClassNameFromAlign: n4.getPopupClassNameFromAlign, ...E2, stretch: g2, getRootDomNode: n4.getRootDomNode, style: s2, mask: l2, zIndex: v2, transitionName: c2, maskAnimation: f2, maskTransitionName: p2, maskMotion: d2, ref: n4.popupRef, motion: u2, mobile: w2, forceRender: b2, onClick: k2, children: "function" == typeof m2 ? m2() : m2 });
      }), d(C(n4), "attachParent", function(e2) {
        A.cancel(n4.attachId);
        var t4, o3 = n4.props, r3 = o3.getPopupContainer, i3 = o3.getDocument, u2 = n4.getRootDomNode();
        r3 ? (u2 || 0 === r3.length) && (t4 = r3(u2)) : t4 = i3(n4.getRootDomNode()).body, t4 ? t4.appendChild(e2) : n4.attachId = A(function() {
          n4.attachParent(e2);
        });
      }), d(C(n4), "getContainer", function() {
        if (!n4.portalContainer) {
          var e2 = (0, n4.props.getDocument)(n4.getRootDomNode()).createElement("div");
          e2.style.position = "absolute", e2.style.top = "0", e2.style.left = "0", e2.style.width = "100%", n4.portalContainer = e2;
        }
        return n4.attachParent(n4.portalContainer), n4.portalContainer;
      }), d(C(n4), "setPoint", function(e2) {
        n4.props.alignPoint && e2 && n4.setState({ point: { pageX: e2.pageX, pageY: e2.pageY } });
      }), d(C(n4), "handlePortalUpdate", function() {
        n4.state.prevPopupVisible !== n4.state.popupVisible && n4.props.afterPopupVisibleChange(n4.state.popupVisible);
      }), d(C(n4), "triggerContextValue", { onPopupMouseDown: n4.onPopupMouseDown }), i2 = "popupVisible" in t3 ? !!t3.popupVisible : !!t3.defaultPopupVisible, n4.state = { prevPopupVisible: i2, popupVisible: i2 }, fn.forEach(function(e2) {
        n4["fire".concat(e2)] = function(t4) {
          n4.fireEvents(e2, t4);
        };
      }), n4;
    }
    return k(r2, [{ key: "componentDidMount", value: function() {
      this.componentDidUpdate();
    } }, { key: "componentDidUpdate", value: function() {
      var e2, t3 = this.props;
      if (this.state.popupVisible)
        return this.clickOutsideHandler || !this.isClickToHide() && !this.isContextMenuToShow() || (e2 = t3.getDocument(this.getRootDomNode()), this.clickOutsideHandler = j(e2, "mousedown", this.onDocumentClick)), this.touchOutsideHandler || (e2 = e2 || t3.getDocument(this.getRootDomNode()), this.touchOutsideHandler = j(e2, "touchstart", this.onDocumentClick)), !this.contextMenuOutsideHandler1 && this.isContextMenuToShow() && (e2 = e2 || t3.getDocument(this.getRootDomNode()), this.contextMenuOutsideHandler1 = j(e2, "scroll", this.onContextMenuClose)), void (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow() && (this.contextMenuOutsideHandler2 = j(window, "blur", this.onContextMenuClose)));
      this.clearOutsideHandler();
    } }, { key: "componentWillUnmount", value: function() {
      this.clearDelayTimer(), this.clearOutsideHandler(), clearTimeout(this.mouseDownTimeout), A.cancel(this.attachId);
    } }, { key: "getPopupDomNode", value: function() {
      var e2;
      return (null === (e2 = this.popupRef.current) || void 0 === e2 ? void 0 : e2.getElement()) || null;
    } }, { key: "getPopupAlign", value: function() {
      var e2 = this.props, t3 = e2.popupPlacement, n4 = e2.popupAlign, o3 = e2.builtinPlacements;
      return t3 && o3 ? function(e3, t4, n5) {
        var o4 = e3[t4] || {};
        return f(f({}, o4), n5);
      }(o3, t3, n4) : n4;
    } }, { key: "setPopupVisible", value: function(e2, t3) {
      var n4 = this.props.alignPoint, o3 = this.state.popupVisible;
      this.clearDelayTimer(), o3 !== e2 && ("popupVisible" in this.props || this.setState({ popupVisible: e2, prevPopupVisible: o3 }), this.props.onPopupVisibleChange(e2)), n4 && t3 && e2 && this.setPoint(t3);
    } }, { key: "delaySetPopupVisible", value: function(e2, t3, n4) {
      var o3 = this, r3 = 1e3 * t3;
      if (this.clearDelayTimer(), r3) {
        var i2 = n4 ? { pageX: n4.pageX, pageY: n4.pageY } : null;
        this.delayTimer = window.setTimeout(function() {
          o3.setPopupVisible(e2, i2), o3.clearDelayTimer();
        }, r3);
      } else
        this.setPopupVisible(e2, n4);
    } }, { 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(e2) {
      var t3 = this.props.children.props, n4 = this.props;
      return t3[e2] && n4[e2] ? this["fire".concat(e2)] : t3[e2] || n4[e2];
    } }, { key: "isClickToShow", value: function() {
      var e2 = this.props, t3 = e2.action, n4 = e2.showAction;
      return -1 !== t3.indexOf("click") || -1 !== n4.indexOf("click");
    } }, { key: "isContextMenuOnly", value: function() {
      var e2 = this.props.action;
      return "contextMenu" === e2 || 1 === e2.length && "contextMenu" === e2[0];
    } }, { key: "isContextMenuToShow", value: function() {
      var e2 = this.props, t3 = e2.action, n4 = e2.showAction;
      return -1 !== t3.indexOf("contextMenu") || -1 !== n4.indexOf("contextMenu");
    } }, { key: "isClickToHide", value: function() {
      var e2 = this.props, t3 = e2.action, n4 = e2.hideAction;
      return -1 !== t3.indexOf("click") || -1 !== n4.indexOf("click");
    } }, { key: "isMouseEnterToShow", value: function() {
      var e2 = this.props, t3 = e2.action, n4 = e2.showAction;
      return -1 !== t3.indexOf("hover") || -1 !== n4.indexOf("mouseEnter");
    } }, { key: "isMouseLeaveToHide", value: function() {
      var e2 = this.props, t3 = e2.action, n4 = e2.hideAction;
      return -1 !== t3.indexOf("hover") || -1 !== n4.indexOf("mouseLeave");
    } }, { key: "isFocusToShow", value: function() {
      var e2 = this.props, t3 = e2.action, n4 = e2.showAction;
      return -1 !== t3.indexOf("focus") || -1 !== n4.indexOf("focus");
    } }, { key: "isBlurToHide", value: function() {
      var e2 = this.props, t3 = e2.action, n4 = e2.hideAction;
      return -1 !== t3.indexOf("focus") || -1 !== n4.indexOf("blur");
    } }, { key: "forcePopupAlign", value: function() {
      var e2;
      this.state.popupVisible && (null === (e2 = this.popupRef.current) || void 0 === e2 || e2.forceAlign());
    } }, { key: "fireEvents", value: function(e2, t3) {
      var n4 = this.props.children.props[e2];
      n4 && n4(t3);
      var o3 = this.props[e2];
      o3 && o3(t3);
    } }, { key: "close", value: function() {
      this.setPopupVisible(false);
    } }, { key: "render", value: function() {
      var n4 = this.state.popupVisible, o3 = this.props, r3 = o3.children, i2 = o3.forceRender, u2 = o3.alignPoint, a2 = o3.className, c2 = o3.autoDestroy, s2 = e.Children.only(r3), l2 = { key: "trigger" };
      this.isContextMenuToShow() ? l2.onContextMenu = this.onContextMenu : l2.onContextMenu = this.createTwoChains("onContextMenu"), this.isClickToHide() || this.isClickToShow() ? (l2.onClick = this.onClick, l2.onMouseDown = this.onMouseDown, l2.onTouchStart = this.onTouchStart) : (l2.onClick = this.createTwoChains("onClick"), l2.onMouseDown = this.createTwoChains("onMouseDown"), l2.onTouchStart = this.createTwoChains("onTouchStart")), this.isMouseEnterToShow() ? (l2.onMouseEnter = this.onMouseEnter, u2 && (l2.onMouseMove = this.onMouseMove)) : l2.onMouseEnter = this.createTwoChains("onMouseEnter"), this.isMouseLeaveToHide() ? l2.onMouseLeave = this.onMouseLeave : l2.onMouseLeave = this.createTwoChains("onMouseLeave"), this.isFocusToShow() || this.isBlurToHide() ? (l2.onFocus = this.onFocus, l2.onBlur = this.onBlur) : (l2.onFocus = this.createTwoChains("onFocus"), l2.onBlur = this.createTwoChains("onBlur"));
      var p2 = v(s2 && s2.props && s2.props.className, a2);
      p2 && (l2.className = p2);
      var d2 = f({}, l2);
      H(s2) && (d2.ref = function() {
        for (var e2 = arguments.length, t3 = new Array(e2), n5 = 0; n5 < e2; n5++)
          t3[n5] = arguments[n5];
        var o4 = t3.filter(function(e3) {
          return e3;
        });
        return o4.length <= 1 ? o4[0] : function(e3) {
          t3.forEach(function(t4) {
            V(t4, e3);
          });
        };
      }(this.triggerRef, s2.ref));
      var m2, y2 = e.cloneElement(s2, d2);
      return (n4 || this.popupRef.current || i2) && (m2 = h(t2, { getContainer: this.getContainer, didUpdate: this.handlePortalUpdate, children: this.getComponent() }, "portal")), !n4 && c2 && (m2 = null), g(an.Provider, { value: this.triggerContextValue, children: [y2, m2] });
    } }], [{ key: "getDerivedStateFromProps", value: function(e2, t3) {
      var n4 = e2.popupVisible, o3 = {};
      return void 0 !== n4 && t3.popupVisible !== n4 && (o3.popupVisible = n4, o3.prevPopupVisible = t3.popupVisible), o3;
    } }]), r2;
  }(e.Component);
  return d(n2, "contextType", an), d(n2, "defaultProps", { prefixCls: "rc-trigger-popup", getPopupClassNameFromAlign: sn, getDocument: ln, onPopupVisibleChange: cn, afterPopupVisibleChange: cn, onPopupAlign: cn, popupClassName: "", mouseEnterDelay: 0, mouseLeaveDelay: 0.1, focusDelay: 0, blurDelay: 0.15, popupStyle: {}, destroyPopupOnHide: false, popupAlign: {}, defaultPopupVisible: false, mask: false, maskClosable: true, action: [], showAction: [], hideAction: [], autoDestroy: false }), n2;
}(F);
export {
  pn as T
};
