@topwrite/reader 1.0.80-alpha.0 → 1.0.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/154-07a8f6.js +17 -0
- package/dist/154-07a8f6.js.map +1 -0
- package/dist/{368-34ab06.js → 368-75537b.js} +2 -2
- package/dist/{368-34ab06.js.map → 368-75537b.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +48 -48
- package/dist/347-fe3bab.js +0 -8
- package/dist/347-fe3bab.js.map +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
(self.webpackChunk_topwrite_reader=self.webpackChunk_topwrite_reader||[]).push([[154],{26372:(e,t)=>{var n;
|
|
2
|
+
/*!
|
|
3
|
+
Copyright (c) 2018 Jed Watson.
|
|
4
|
+
Licensed under the MIT License (MIT), see
|
|
5
|
+
http://jedwatson.github.io/classnames
|
|
6
|
+
*/!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===i){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var u in n)o.call(n,u)&&n[u]&&e.push(u)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},37261:e=>{e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},54994:(e,t,n)=>{"use strict";var o,r=n(92019),i=n(31152),a=n(17389),u=n(37261),c=n(75531),s=n(52980),l=n(13108),f=r.Function,p=/MSIE .\./.test(c)||u&&((o=r.Bun.version.split(".")).length<3||0==o[0]&&(o[1]<3||3==o[1]&&0==o[2]));e.exports=function(e,t){var n=t?2:1;return p?function(o,r){var u=l(arguments.length,1)>n,c=a(o)?o:f(o),p=u?s(arguments,n):[],d=u?function(){i(c,this,p)}:c;return t?e(d,r):e(d)}:e}},20363:(e,t,n)=>{var o=n(46367),r=n(92019),i=n(54994)(r.setInterval,!0);o({global:!0,bind:!0,forced:r.setInterval!==i},{setInterval:i})},47294:(e,t,n)=>{var o=n(46367),r=n(92019),i=n(54994)(r.setTimeout,!0);o({global:!0,bind:!0,forced:r.setTimeout!==i},{setTimeout:i})},62940:(e,t,n)=>{n(20363),n(47294)},56261:(e,t,n)=>{"use strict";n.d(t,{Z:()=>io});var o=n(45675),r=n(24622),i=n(67666);function a(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=n(87363),c=n.n(u);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var l=n(72320);function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,l.Z)(o.key),o)}}function p(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"===(0,r.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}(this,n)}}var g=n(41470),b=n(61533),w=n.n(b),E=function(e){return+setTimeout(e,16)},O=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(E=function(e){return window.requestAnimationFrame(e)},O=function(e){return window.cancelAnimationFrame(e)});var x=0,k=new Map;function C(e){k.delete(e)}var T=function(e){var t=x+=1;return function n(o){if(0===o)C(t),e();else{var r=E((function(){n(o-1)}));k.set(t,r)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};T.cancel=function(e){var t=k.get(e);return C(e),O(t)};const M=T;function P(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}function S(e){return e instanceof HTMLElement||e instanceof SVGElement}function _(e){var t,n=function(e){return e&&"object"===(0,r.Z)(e)&&S(e.nativeElement)?e.nativeElement:S(e)?e:null}(e);return n||(e instanceof c().Component?null===(t=w().findDOMNode)||void 0===t?void 0:t.call(w(),e):null)}var D=n(10516);var Z=Symbol.for("react.element"),A=Symbol.for("react.transitional.element"),R=Symbol.for("react.fragment");var L=Number(u.version.split(".")[0]),j=function(e,t){"function"==typeof e?e(t):"object"===(0,r.Z)(e)&&e&&"current"in e&&(e.current=t)},N=function(){for(var e=arguments.length,t=new 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){j(t,e)}))}},V=function(e){var t,n;if(!e)return!1;if(H(e)&&L>=19)return!0;var o=(0,D.isMemo)(e)?e.type.type:e.type;return!!("function"!=typeof o||null!==(t=o.prototype)&&void 0!==t&&t.render||o.$$typeof===D.ForwardRef)&&!!("function"!=typeof e||null!==(n=e.prototype)&&void 0!==n&&n.render||e.$$typeof===D.ForwardRef)};function H(e){return(0,u.isValidElement)(e)&&!((t=e)&&"object"===(0,r.Z)(t)&&(t.$$typeof===Z||t.$$typeof===A)&&t.type===R);var t}function W(e,t,n,o){var r=w().unstable_batchedUpdates?function(e){w().unstable_batchedUpdates(n,e)}:n;return null!=e&&e.addEventListener&&e.addEventListener(t,r,o),{remove:function(){null!=e&&e.removeEventListener&&e.removeEventListener(t,r,o)}}}function F(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}const B=(0,u.forwardRef)((function(e,t){var n=e.didUpdate,o=e.getContainer,r=e.children,i=(0,u.useRef)(),a=(0,u.useRef)();(0,u.useImperativeHandle)(t,(function(){return{}}));var c=(0,u.useRef)(!1);return!c.current&&F()&&(a.current=o(),i.current=a.current.parentNode,c.current=!0),(0,u.useEffect)((function(){null==n||n(e)})),(0,u.useEffect)((function(){return null===a.current.parentNode&&null!==i.current&&i.current.appendChild(a.current),function(){var e;null===(e=a.current)||void 0===e||null===(e=e.parentNode)||void 0===e||e.removeChild(a.current)}}),[]),a.current?w().createPortal(r,a.current):null}));var I=n(26372),z=n.n(I);function Y(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function $(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,r,i,a,u=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=i.call(n)).done)&&(u.push(o.value),u.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw r}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return X(e,t);var n=Object.prototype.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)?X(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var q,U,K,J=(q=F(),U="undefined"!=typeof window?window:{},K={animationend:G("Animation","AnimationEnd"),transitionend:G("Transition","TransitionEnd")},q&&("AnimationEvent"in U||delete K.animationend.animation,"TransitionEvent"in U||delete K.transitionend.transition),K),Q={};if(F()){var ee=document.createElement("div");Q=ee.style}var te={};function ne(e){if(te[e])return te[e];var t=J[e];if(t)for(var n=Object.keys(t),o=n.length,r=0;r<o;r+=1){var i=n[r];if(Object.prototype.hasOwnProperty.call(t,i)&&i in Q)return te[e]=t[i],te[e]}return""}var oe=ne("animationend"),re=ne("transitionend"),ie=!(!oe||!re),ae=oe||"animationend",ue=re||"transitionend";function ce(e,t){return e?"object"===(0,r.Z)(e)?e[t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}))]:"".concat(e,"-").concat(t):null}var se="none",le="appear",fe="enter",pe="leave",de="none",he="prepare",ve="start",me="active",ye="end";function ge(e){var t=u.useRef(!1),n=$(u.useState(e),2),o=n[0],r=n[1];return u.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[o,function(e,n){n&&t.current||r(e)}]}const be=F()?u.useLayoutEffect:u.useEffect;var we=[he,ve,me,ye],Ee=!1,Oe=!0;function xe(e){return e===me||e===ye}const ke=function(e,t){var n=$(ge(de),2),o=n[0],r=n[1],i=function(){var e=u.useRef(null);function t(){M.cancel(e.current)}return u.useEffect((function(){return function(){t()}}),[]),[function n(o){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var i=M((function(){r<=1?o({isCanceled:function(){return i!==e.current}}):n(o,r-1)}));e.current=i},t]}(),a=$(i,2),c=a[0],s=a[1];return be((function(){if(o!==de&&o!==ye){var e=we.indexOf(o),n=we[e+1],i=t(o);i===Ee?r(n,!0):c((function(e){function t(){e.isCanceled()||r(n,!0)}!0===i?t():Promise.resolve(i).then(t)}))}}),[e,o]),u.useEffect((function(){return function(){s()}}),[]),[function(){r(he,!0)},o]},Ce=function(e){var t=(0,u.useRef)(),n=(0,u.useRef)(e);n.current=e;var o=u.useCallback((function(e){n.current(e)}),[]);function r(e){e&&(e.removeEventListener(ue,o),e.removeEventListener(ae,o))}return u.useEffect((function(){return function(){r(t.current)}}),[]),[function(e){t.current&&t.current!==e&&r(t.current),e&&e!==t.current&&(e.addEventListener(ue,o),e.addEventListener(ae,o),t.current=e)},r]};const Te=function(e){v(n,e);var t=y(n);function n(){return s(this,n),t.apply(this,arguments)}return p(n,[{key:"render",value:function(){return this.props.children}}]),n}(u.Component);const Me=function(e){var t=e;function n(e){return!(!e.motionName||!t)}"object"===(0,r.Z)(e)&&(t=e.transitionSupport);var o=u.forwardRef((function(e,t){var o=e.visible,r=void 0===o||o,a=e.removeOnLeave,c=void 0===a||a,s=e.forceRender,l=e.children,f=e.motionName,p=e.leavedClassName,d=e.eventProps,h=n(e),v=(0,u.useRef)(),m=(0,u.useRef)();var y=function(e,t,n,o){var r=o.motionEnter,a=void 0===r||r,c=o.motionAppear,s=void 0===c||c,l=o.motionLeave,f=void 0===l||l,p=o.motionDeadline,d=o.motionLeaveImmediately,h=o.onAppearPrepare,v=o.onEnterPrepare,m=o.onLeavePrepare,y=o.onAppearStart,b=o.onEnterStart,w=o.onLeaveStart,E=o.onAppearActive,O=o.onEnterActive,x=o.onLeaveActive,k=o.onAppearEnd,C=o.onEnterEnd,T=o.onLeaveEnd,M=o.onVisibleChanged,P=$(ge(),2),S=P[0],_=P[1],D=$(ge(se),2),Z=D[0],A=D[1],R=$(ge(null),2),L=R[0],j=R[1],N=(0,u.useRef)(!1),V=(0,u.useRef)(null);function H(){return n()}var W=(0,u.useRef)(!1);function F(e){var t=H();if(!e||e.deadline||e.target===t){var n,o=W.current;Z===le&&o?n=null==k?void 0:k(t,e):Z===fe&&o?n=null==C?void 0:C(t,e):Z===pe&&o&&(n=null==T?void 0:T(t,e)),Z!==se&&o&&!1!==n&&(A(se,!0),j(null,!0))}}var B=$(Ce(F),1)[0],I=u.useMemo((function(){var e,t,n;switch(Z){case le:return e={},(0,g.Z)(e,he,h),(0,g.Z)(e,ve,y),(0,g.Z)(e,me,E),e;case fe:return t={},(0,g.Z)(t,he,v),(0,g.Z)(t,ve,b),(0,g.Z)(t,me,O),t;case pe:return n={},(0,g.Z)(n,he,m),(0,g.Z)(n,ve,w),(0,g.Z)(n,me,x),n;default:return{}}}),[Z]),z=$(ke(Z,(function(e){if(e===he){var t=I[he];return t?t(H()):Ee}var n;return X in I&&j((null===(n=I[X])||void 0===n?void 0:n.call(I,H(),null))||null),X===me&&(B(H()),p>0&&(clearTimeout(V.current),V.current=setTimeout((function(){F({deadline:!0})}),p))),Oe})),2),Y=z[0],X=z[1],G=xe(X);W.current=G,be((function(){_(t);var n,o=N.current;N.current=!0,e&&(!o&&t&&s&&(n=le),o&&t&&a&&(n=fe),(o&&!t&&f||!o&&d&&!t&&f)&&(n=pe),n&&(A(n),Y()))}),[t]),(0,u.useEffect)((function(){(Z===le&&!s||Z===fe&&!a||Z===pe&&!f)&&A(se)}),[s,a,f]),(0,u.useEffect)((function(){return function(){N.current=!1,clearTimeout(V.current)}}),[]);var q=u.useRef(!1);(0,u.useEffect)((function(){S&&(q.current=!0),void 0!==S&&Z===se&&((q.current||S)&&(null==M||M(S)),q.current=!0)}),[S,Z]);var U=L;return I[he]&&X===ve&&(U=(0,i.Z)({transition:"none"},U)),[Z,X,U,null!=S?S:t]}(h,r,(function(){try{return v.current instanceof HTMLElement?v.current:_(m.current)}catch(e){return null}}),e),b=$(y,4),w=b[0],E=b[1],O=b[2],x=b[3],k=u.useRef(x);x&&(k.current=!0);var C,T=u.useCallback((function(e){v.current=e,j(t,e)}),[t]),M=(0,i.Z)((0,i.Z)({},d),{},{visible:r});if(l)if(w!==se&&n(e)){var P,S;E===he?S="prepare":xe(E)?S="active":E===ve&&(S="start"),C=l((0,i.Z)((0,i.Z)({},M),{},{className:z()(ce(f,w),(P={},(0,g.Z)(P,ce(f,"".concat(w,"-").concat(S)),S),(0,g.Z)(P,f,"string"==typeof f),P)),style:O}),T)}else C=x?l((0,i.Z)({},M),T):!c&&k.current&&p?l((0,i.Z)((0,i.Z)({},M),{},{className:p}),T):s||!c&&!p?l((0,i.Z)((0,i.Z)({},M),{},{style:{display:"none"}}),T):null;else C=null;u.isValidElement(C)&&V(C)&&(C.ref||(C=u.cloneElement(C,{ref:T})));return u.createElement(Te,{ref:m},C)}));return o.displayName="CSSMotion",o}(ie);var Pe="add",Se="keep",_e="remove",De="removed";function Ze(e){var t;return t=e&&"object"===(0,r.Z)(e)&&"key"in e?e:{key:e},(0,i.Z)((0,i.Z)({},t),{},{key:String(t.key)})}function Ae(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(Ze)}var Re=["component","children","onVisibleChanged","onAllRemoved"],Le=["status"],je=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Me,n=function(e){v(r,e);var n=y(r);function r(){var e;s(this,r);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=n.call.apply(n,[this].concat(o)),(0,g.Z)(d(e),"state",{keyEntities:[]}),(0,g.Z)(d(e),"removeKey",(function(t){var n=e.state.keyEntities.map((function(e){return e.key!==t?e:(0,i.Z)((0,i.Z)({},e),{},{status:De})}));return e.setState({keyEntities:n}),n.filter((function(e){return e.status!==De})).length})),e}return p(r,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,r=this.props,i=r.component,c=r.children,s=r.onVisibleChanged,l=r.onAllRemoved,f=a(r,Re),p=i||u.Fragment,d={};return je.forEach((function(e){d[e]=f[e],delete f[e]})),delete f.keys,u.createElement(p,f,n.map((function(n){var r=n.status,i=a(n,Le),f=r===Pe||r===Se;return u.createElement(t,(0,o.Z)({},d,{key:i.key,visible:f,eventProps:i,onVisibleChanged:function(t){(null==s||s(t,{key:i.key}),t)||0===e.removeKey(i.key)&&l&&l()}}),c)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,o=t.keyEntities,r=Ae(n),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],o=0,r=t.length,a=Ae(e),u=Ae(t);a.forEach((function(e){for(var t=!1,a=o;a<r;a+=1){var c=u[a];if(c.key===e.key){o<a&&(n=n.concat(u.slice(o,a).map((function(e){return(0,i.Z)((0,i.Z)({},e),{},{status:Pe})}))),o=a),n.push((0,i.Z)((0,i.Z)({},c),{},{status:Se})),o+=1,t=!0;break}}t||n.push((0,i.Z)((0,i.Z)({},e),{},{status:_e}))})),o<r&&(n=n.concat(u.slice(o).map((function(e){return(0,i.Z)((0,i.Z)({},e),{},{status:Pe})}))));var c={};return n.forEach((function(e){var t=e.key;c[t]=(c[t]||0)+1})),Object.keys(c).filter((function(e){return c[e]>1})).forEach((function(e){(n=n.filter((function(t){var n=t.key,o=t.status;return n!==e||o!==_e}))).forEach((function(t){t.key===e&&(t.status=Se)}))})),n}(o,r);return{keyEntities:a.filter((function(e){var t=o.find((function(t){var n=t.key;return e.key===n}));return!t||t.status!==De||e.status!==_e}))}}}]),r}(u.Component);(0,g.Z)(n,"defaultProps",{component:"div"})}(ie);const Ne=Me;function Ve(e){var t=e.prefixCls,n=e.motion,o=e.animation,r=e.transitionName;return n||(o?{motionName:"".concat(t,"-").concat(o)}:r?{motionName:r}:null)}function He(e){var t=e.prefixCls,n=e.visible,r=e.zIndex,a=e.mask,c=e.maskMotion,s=e.maskAnimation,l=e.maskTransitionName;if(!a)return null;var f={};return(c||l||s)&&(f=(0,i.Z)({motionAppear:!0},Ve({motion:c,prefixCls:t,transitionName:l,animation:s}))),u.createElement(Ne,(0,o.Z)({},f,{visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return u.createElement("div",{style:{zIndex:r},className:z()("".concat(t,"-mask"),n)})}))}function We(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 Fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?We(Object(n),!0).forEach((function(t){Ie(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):We(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Be(e){return Be="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},Be(e)}function Ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ze,Ye={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function Xe(){if(void 0!==ze)return ze;ze="";var e=document.createElement("p").style;for(var t in Ye)t+"Transform"in e&&(ze=t);return ze}function $e(){return Xe()?"".concat(Xe(),"TransitionProperty"):"transitionProperty"}function Ge(){return Xe()?"".concat(Xe(),"Transform"):"transform"}function qe(e,t){var n=$e();n&&(e.style[n]=t,"transitionProperty"!==n&&(e.style.transitionProperty=t))}function Ue(e,t){var n=Ge();n&&(e.style[n]=t,"transform"!==n&&(e.style.transform=t))}var Ke,Je=/matrix\((.*)\)/,Qe=/matrix3d\((.*)\)/;function et(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}function tt(e,t,n){var o=n;if("object"!==Be(t))return void 0!==o?("number"==typeof o&&(o="".concat(o,"px")),void(e.style[t]=o)):Ke(e,t);for(var r in t)t.hasOwnProperty(r)&&tt(e,r,t[r])}function nt(e,t){var n=e["page".concat(t?"Y":"X","Offset")],o="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var r=e.document;"number"!=typeof(n=r.documentElement[o])&&(n=r.body[o])}return n}function ot(e){return nt(e)}function rt(e){return nt(e,!0)}function it(e){var t=function(e){var t,n,o,r=e.ownerDocument,i=r.body,a=r&&r.documentElement;return t=e.getBoundingClientRect(),n=Math.floor(t.left),o=Math.floor(t.top),{left:n-=a.clientLeft||i.clientLeft||0,top:o-=a.clientTop||i.clientTop||0}}(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=ot(o),t.top+=rt(o),t}function at(e){return null!=e&&e==e.window}function ut(e){return at(e)?e.document:9===e.nodeType?e:e.ownerDocument}var ct=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),st=/^(top|right|bottom|left)$/,lt="currentStyle",ft="runtimeStyle",pt="left",dt="px";function ht(e,t){return"left"===e?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function vt(e){return"left"===e?"right":"right"===e?"left":"top"===e?"bottom":"bottom"===e?"top":void 0}function mt(e,t,n){"static"===tt(e,"position")&&(e.style.position="relative");var o=-999,r=-999,i=ht("left",n),a=ht("top",n),u=vt(i),c=vt(a);"left"!==i&&(o=999),"top"!==a&&(r=999);var s,l="",f=it(e);("left"in t||"top"in t)&&(l=(s=e).style.transitionProperty||s.style[$e()]||"",qe(e,"none")),"left"in t&&(e.style[u]="",e.style[i]="".concat(o,"px")),"top"in t&&(e.style[c]="",e.style[a]="".concat(r,"px")),et(e);var p=it(e),d={};for(var h in t)if(t.hasOwnProperty(h)){var v=ht(h,n),m="left"===h?o:r,y=f[h]-p[h];d[v]=v===h?m+y:m-y}tt(e,d),et(e),("left"in t||"top"in t)&&qe(e,l);var g={};for(var b in t)if(t.hasOwnProperty(b)){var w=ht(b,n),E=t[b]-f[b];g[w]=b===w?d[w]+E:d[w]-E}tt(e,g)}function yt(e,t){var n=it(e),o=function(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(Ge());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}}(e),r={x:o.x,y:o.y};"left"in t&&(r.x=o.x+t.left-n.left),"top"in t&&(r.y=o.y+t.top-n.top),function(e,t){var n=window.getComputedStyle(e,null),o=n.getPropertyValue("transform")||n.getPropertyValue(Ge());if(o&&"none"!==o){var r,i=o.match(Je);i?((r=(i=i[1]).split(",").map((function(e){return parseFloat(e,10)})))[4]=t.x,r[5]=t.y,Ue(e,"matrix(".concat(r.join(","),")"))):((r=o.match(Qe)[1].split(",").map((function(e){return parseFloat(e,10)})))[12]=t.x,r[13]=t.y,Ue(e,"matrix3d(".concat(r.join(","),")")))}else Ue(e,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}(e,r)}function gt(e,t){for(var n=0;n<e.length;n++)t(e[n])}function bt(e){return"border-box"===Ke(e,"boxSizing")}"undefined"!=typeof window&&(Ke=window.getComputedStyle?function(e,t,n){var o=n,r="",i=ut(e);return(o=o||i.defaultView.getComputedStyle(e,null))&&(r=o.getPropertyValue(t)||o[t]),r}:function(e,t){var n=e[lt]&&e[lt][t];if(ct.test(n)&&!st.test(t)){var o=e.style,r=o[pt],i=e[ft][pt];e[ft][pt]=e[lt][pt],o[pt]="fontSize"===t?"1em":n||0,n=o.pixelLeft+dt,o[pt]=r,e[ft][pt]=i}return""===n?"auto":n});var wt=["margin","border","padding"],Et=-1,Ot=2,xt=1;function kt(e,t,n){var o,r,i,a=0;for(r=0;r<t.length;r++)if(o=t[r])for(i=0;i<n.length;i++){var u=void 0;u="border"===o?"".concat(o).concat(n[i],"Width"):o+n[i],a+=parseFloat(Ke(e,u))||0}return a}var Ct={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 Tt(e,t,n){var o=n;if(at(e))return"width"===t?Ct.viewportWidth(e):Ct.viewportHeight(e);if(9===e.nodeType)return"width"===t?Ct.docWidth(e):Ct.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],i="width"===t?Math.floor(e.getBoundingClientRect().width):Math.floor(e.getBoundingClientRect().height),a=bt(e),u=0;(null==i||i<=0)&&(i=void 0,(null==(u=Ke(e,t))||Number(u)<0)&&(u=e.style[t]||0),u=Math.floor(parseFloat(u))||0),void 0===o&&(o=a?xt:Et);var c=void 0!==i||a,s=i||u;return o===Et?c?s-kt(e,["border","padding"],r):u:c?o===xt?s:s+(o===Ot?-kt(e,["border"],r):kt(e,["margin"],r)):u+kt(e,wt.slice(o),r)}gt(["Width","Height"],(function(e){Ct["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],Ct["viewport".concat(e)](n))},Ct["viewport".concat(e)]=function(t){var n="client".concat(e),o=t.document,r=o.body,i=o.documentElement[n];return"CSS1Compat"===o.compatMode&&i||r&&r[n]||i}}));var Mt={position:"absolute",visibility:"hidden",display:"block"};function Pt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o,r=t[0];return 0!==r.offsetWidth?o=Tt.apply(void 0,t):function(e,t,n){var o,r={},i=e.style;for(o in t)t.hasOwnProperty(o)&&(r[o]=i[o],i[o]=t[o]);for(o in n.call(e),t)t.hasOwnProperty(o)&&(i[o]=r[o])}(r,Mt,(function(){o=Tt.apply(void 0,t)})),o}function St(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}gt(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);Ct["outer".concat(t)]=function(t,n){return t&&Pt(t,e,n?0:xt)};var n="width"===e?["Left","Right"]:["Top","Bottom"];Ct[e]=function(t,o){var r=o;return void 0!==r?t?(bt(t)&&(r+=kt(t,["padding","border"],n)),tt(t,e,r)):void 0:t&&Pt(t,e,Et)}}));var _t={getWindow:function(e){if(e&&e.document&&e.setTimeout)return e;var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},getDocument:ut,offset:function(e,t,n){if(void 0===t)return it(e);!function(e,t,n){if(n.ignoreShake){var o=it(e),r=o.left.toFixed(0),i=o.top.toFixed(0),a=t.left.toFixed(0),u=t.top.toFixed(0);if(r===a&&i===u)return}n.useCssRight||n.useCssBottom?mt(e,t,n):n.useCssTransform&&Ge()in document.body.style?yt(e,t):mt(e,t,n)}(e,t,n||{})},isWindow:at,each:gt,css:tt,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:St,getWindowScrollLeft:function(e){return ot(e)},getWindowScrollTop:function(e){return rt(e)},merge:function(){for(var e={},t=0;t<arguments.length;t++)_t.mix(e,t<0||arguments.length<=t?void 0:arguments[t]);return e},viewportWidth:0,viewportHeight:0};St(_t,Ct);var Dt=_t.getParent;function Zt(e){if(_t.isWindow(e)||9===e.nodeType)return null;var t,n=_t.getDocument(e).body,o=_t.css(e,"position");if(!("fixed"===o||"absolute"===o))return"html"===e.nodeName.toLowerCase()?null:Dt(e);for(t=Dt(e);t&&t!==n&&9!==t.nodeType;t=Dt(t))if("static"!==(o=_t.css(t,"position")))return t;return null}var At=_t.getParent;function Rt(e,t){for(var n={left:0,right:1/0,top:0,bottom:1/0},o=Zt(e),r=_t.getDocument(e),i=r.defaultView||r.parentWindow,a=r.body,u=r.documentElement;o;){if(-1!==navigator.userAgent.indexOf("MSIE")&&0===o.clientWidth||o===a||o===u||"visible"===_t.css(o,"overflow")){if(o===a||o===u)break}else{var c=_t.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)}o=Zt(o)}var s=null;_t.isWindow(e)||9===e.nodeType||(s=e.style.position,"absolute"===_t.css(e,"position")&&(e.style.position="fixed"));var l=_t.getWindowScrollLeft(i),f=_t.getWindowScrollTop(i),p=_t.viewportWidth(i),d=_t.viewportHeight(i),h=u.scrollWidth,v=u.scrollHeight,m=window.getComputedStyle(a);if("hidden"===m.overflowX&&(h=i.innerWidth),"hidden"===m.overflowY&&(v=i.innerHeight),e.style&&(e.style.position=s),t||function(e){if(_t.isWindow(e)||9===e.nodeType)return!1;var t=_t.getDocument(e),n=t.body,o=null;for(o=At(e);o&&o!==n&&o!==t;o=At(o))if("fixed"===_t.css(o,"position"))return!0;return!1}(e))n.left=Math.max(n.left,l),n.top=Math.max(n.top,f),n.right=Math.min(n.right,l+p),n.bottom=Math.min(n.bottom,f+d);else{var y=Math.max(h,l+p);n.right=Math.min(n.right,y);var g=Math.max(v,f+d);n.bottom=Math.min(n.bottom,g)}return n.top>=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function Lt(e){var t,n,o;if(_t.isWindow(e)||9===e.nodeType){var r=_t.getWindow(e);t={left:_t.getWindowScrollLeft(r),top:_t.getWindowScrollTop(r)},n=_t.viewportWidth(r),o=_t.viewportHeight(r)}else t=_t.offset(e),n=_t.outerWidth(e),o=_t.outerHeight(e);return t.width=n,t.height=o,t}function jt(e,t){var n=t.charAt(0),o=t.charAt(1),r=e.width,i=e.height,a=e.left,u=e.top;return"c"===n?u+=i/2:"b"===n&&(u+=i),"c"===o?a+=r/2:"r"===o&&(a+=r),{left:a,top:u}}function Nt(e,t,n,o,r){var i=jt(t,n[1]),a=jt(e,n[0]),u=[a.left-i.left,a.top-i.top];return{left:Math.round(e.left-u[0]+o[0]-r[0]),top:Math.round(e.top-u[1]+o[1]-r[1])}}function Vt(e,t,n){return e.left<n.left||e.left+t.width>n.right}function Ht(e,t,n){return e.top<n.top||e.top+t.height>n.bottom}function Wt(e,t,n){var o=[];return _t.each(e,(function(e){o.push(e.replace(t,(function(e){return n[e]})))})),o}function Ft(e,t){return e[t]=-e[t],e}function Bt(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function It(e,t){e[0]=Bt(e[0],t.width),e[1]=Bt(e[1],t.height)}function zt(e,t,n,o){var r=n.points,i=n.offset||[0,0],a=n.targetOffset||[0,0],u=n.overflow,c=n.source||e;i=[].concat(i),a=[].concat(a);var s={},l=0,f=Rt(c,!(!(u=u||{})||!u.alwaysByViewport)),p=Lt(c);It(i,p),It(a,t);var d=Nt(p,t,r,i,a),h=_t.merge(p,d);if(f&&(u.adjustX||u.adjustY)&&o){if(u.adjustX&&Vt(d,p,f)){var v=Wt(r,/[lr]/gi,{l:"r",r:"l"}),m=Ft(i,0),y=Ft(a,0);(function(e,t,n){return e.left>n.right||e.left+t.width<n.left})(Nt(p,t,v,m,y),p,f)||(l=1,r=v,i=m,a=y)}if(u.adjustY&&Ht(d,p,f)){var g=Wt(r,/[tb]/gi,{t:"b",b:"t"}),b=Ft(i,1),w=Ft(a,1);(function(e,t,n){return e.top>n.bottom||e.top+t.height<n.top})(Nt(p,t,g,b,w),p,f)||(l=1,r=g,i=b,a=w)}l&&(d=Nt(p,t,r,i,a),_t.mix(h,d));var E=Vt(d,p,f),O=Ht(d,p,f);if(E||O){var x=r;E&&(x=Wt(r,/[lr]/gi,{l:"r",r:"l"})),O&&(x=Wt(r,/[tb]/gi,{t:"b",b:"t"})),r=x,i=n.offset||[0,0],a=n.targetOffset||[0,0]}s.adjustX=u.adjustX&&E,s.adjustY=u.adjustY&&O,(s.adjustX||s.adjustY)&&(h=function(e,t,n,o){var r=_t.clone(e),i={width:t.width,height:t.height};return o.adjustX&&r.left<n.left&&(r.left=n.left),o.resizeWidth&&r.left>=n.left&&r.left+i.width>n.right&&(i.width-=r.left+i.width-n.right),o.adjustX&&r.left+i.width>n.right&&(r.left=Math.max(n.right-i.width,n.left)),o.adjustY&&r.top<n.top&&(r.top=n.top),o.resizeHeight&&r.top>=n.top&&r.top+i.height>n.bottom&&(i.height-=r.top+i.height-n.bottom),o.adjustY&&r.top+i.height>n.bottom&&(r.top=Math.max(n.bottom-i.height,n.top)),_t.mix(r,i)}(d,p,f,s))}return h.width!==p.width&&_t.css(c,"width",_t.width(c)+h.width-p.width),h.height!==p.height&&_t.css(c,"height",_t.height(c)+h.height-p.height),_t.offset(c,{left:h.left,top:h.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:r,offset:i,targetOffset:a,overflow:s}}function Yt(e,t,n){var o=n.target||t,r=Lt(o),i=!function(e,t){var n=Rt(e,t),o=Lt(e);return!n||o.left+o.width<=n.left||o.top+o.height<=n.top||o.left>=n.right||o.top>=n.bottom}(o,n.overflow&&n.overflow.alwaysByViewport);return zt(e,r,n,i)}Yt.__getOffsetParent=Zt,Yt.__getVisibleRectForElement=Rt;var Xt={},$t=[];function Gt(e,t){}function qt(e,t){}function Ut(e,t,n){t||Xt[n]||(e(!1,n),Xt[n]=!0)}function Kt(e,t){Ut(Gt,e,t)}Kt.preMessage=function(e){$t.push(e)},Kt.resetWarned=function(){Xt={}},Kt.noteOnce=function(e,t){Ut(qt,e,t)};const Jt=Kt;const Qt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=new Set;return function e(t,i){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,u=o.has(t);if(Jt(!u,"Warning: There may be circular references"),u)return!1;if(t===i)return!0;if(n&&a>1)return!1;o.add(t);var c=a+1;if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(var s=0;s<t.length;s++)if(!e(t[s],i[s],c))return!1;return!0}if(t&&i&&"object"===(0,r.Z)(t)&&"object"===(0,r.Z)(i)){var l=Object.keys(t);return l.length===Object.keys(i).length&&l.every((function(n){return e(t[n],i[n],c)}))}return!1}(e,t)};var en=F()?u.useLayoutEffect:u.useEffect,tn=function(e,t){var n=u.useRef(!0);en((function(){return e(n.current)}),t),en((function(){return n.current=!1,function(){n.current=!0}}),[])};const nn=tn;var on=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,o){return e[0]===t&&(n=o,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(t,n){var o=e(this.__entries__,t);~o?this.__entries__[o][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,o=e(n,t);~o&&n.splice(o,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,o=this.__entries__;n<o.length;n++){var r=o[n];e.call(t,r[1],r[0])}},t}()}(),rn="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,an=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),un="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(an):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},cn=2;var sn=20,ln=["top","right","bottom","left","width","height","size","weight"],fn="undefined"!=typeof MutationObserver,pn=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,o=!1,r=0;function i(){n&&(n=!1,e()),o&&u()}function a(){un(i)}function u(){var e=Date.now();if(n){if(e-r<cn)return;o=!0}else n=!0,o=!1,setTimeout(a,t);r=e}return u}(this.refresh.bind(this),sn)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){rn&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),fn?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){rn&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;ln.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),dn=function(e,t){for(var n=0,o=Object.keys(t);n<o.length;n++){var r=o[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},hn=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||an},vn=En(0,0,0,0);function mn(e){return parseFloat(e)||0}function yn(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+mn(e["border-"+n+"-width"])}),0)}function gn(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return vn;var o=hn(e).getComputedStyle(e),r=function(e){for(var t={},n=0,o=["top","right","bottom","left"];n<o.length;n++){var r=o[n],i=e["padding-"+r];t[r]=mn(i)}return t}(o),i=r.left+r.right,a=r.top+r.bottom,u=mn(o.width),c=mn(o.height);if("border-box"===o.boxSizing&&(Math.round(u+i)!==t&&(u-=yn(o,"left","right")+i),Math.round(c+a)!==n&&(c-=yn(o,"top","bottom")+a)),!function(e){return e===hn(e).document.documentElement}(e)){var s=Math.round(u+i)-t,l=Math.round(c+a)-n;1!==Math.abs(s)&&(u-=s),1!==Math.abs(l)&&(c-=l)}return En(r.left,r.top,u,c)}var bn="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof hn(e).SVGGraphicsElement}:function(e){return e instanceof hn(e).SVGElement&&"function"==typeof e.getBBox};function wn(e){return rn?bn(e)?function(e){var t=e.getBBox();return En(0,0,t.width,t.height)}(e):gn(e):vn}function En(e,t,n,o){return{x:e,y:t,width:n,height:o}}var On=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=En(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=wn(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),xn=function(e,t){var n,o,r,i,a,u,c,s=(o=(n=t).x,r=n.y,i=n.width,a=n.height,u="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,c=Object.create(u.prototype),dn(c,{x:o,y:r,width:i,height:a,top:r,right:o+i,bottom:a+r,left:o}),c);dn(this,{target:e,contentRect:s})},kn=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new on,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof hn(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new On(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof hn(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new xn(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Cn="undefined"!=typeof WeakMap?new WeakMap:new on,Tn=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=pn.getInstance(),o=new kn(t,n,this);Cn.set(this,o)};["observe","unobserve","disconnect"].forEach((function(e){Tn.prototype[e]=function(){var t;return(t=Cn.get(this))[e].apply(t,arguments)}}));const Mn=void 0!==an.ResizeObserver?an.ResizeObserver:Tn;function Pn(e,t){var n=null,o=null;var r=new Mn((function(e){var r=$(e,1)[0].target;if(document.documentElement.contains(r)){var i=r.getBoundingClientRect(),a=i.width,u=i.height,c=Math.floor(a),s=Math.floor(u);n===c&&o===s||Promise.resolve().then((function(){t({width:c,height:s})})),n=c,o=s}}));return e&&r.observe(e),function(){r.disconnect()}}function Sn(e){return"function"!=typeof e?null:e()}function _n(e){return"object"===(0,r.Z)(e)&&e?e:null}var Dn=function(e,t){var n=e.children,o=e.disabled,r=e.target,i=e.align,a=e.onAlign,u=e.monitorWindowResize,s=e.monitorBufferTime,l=void 0===s?0:s,f=c().useRef({}),p=c().useRef(),d=c().Children.only(n),h=c().useRef({});h.current.disabled=o,h.current.target=r,h.current.align=i,h.current.onAlign=a;var v=function(e,t){var n=c().useRef(!1),o=c().useRef(null);function r(){window.clearTimeout(o.current)}return[function i(a){if(r(),n.current&&!0!==a)o.current=window.setTimeout((function(){n.current=!1,i()}),t);else{if(!1===e(a))return;n.current=!0,o.current=window.setTimeout((function(){n.current=!1}),t)}},function(){n.current=!1,r()}]}((function(){var e=h.current,t=e.disabled,n=e.target,o=e.align,r=e.onAlign,i=p.current;if(!t&&n&&i){var a,u=Sn(n),c=_n(n);f.current.element=u,f.current.point=c,f.current.align=o;var s=document.activeElement;return u&&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 r=e.getBoundingClientRect(),i=r.width,a=r.height;if(i||a)return!0}}return!1}(u)?a=Yt(i,u,o):c&&(a=function(e,t,n){var o,r,i=_t.getDocument(e),a=i.defaultView||i.parentWindow,u=_t.getWindowScrollLeft(a),c=_t.getWindowScrollTop(a),s=_t.viewportWidth(a),l=_t.viewportHeight(a),f={left:o="pageX"in t?t.pageX:u+t.clientX,top:r="pageY"in t?t.pageY:c+t.clientY,width:0,height:0},p=o>=0&&o<=u+s&&r>=0&&r<=c+l,d=[n.points[0],"cc"];return zt(e,f,Fe(Fe({},n),{},{points:d}),p)}(i,c,o)),function(e,t){e!==document.activeElement&&P(t,e)&&"function"==typeof e.focus&&e.focus()}(s,i),r&&a&&r(i,a),!0}return!1}),l),m=$(v,2),y=m[0],g=m[1],b=$(c().useState(),2),w=b[0],E=b[1],O=$(c().useState(),2),x=O[0],k=O[1];return nn((function(){E(Sn(r)),k(_n(r))})),c().useEffect((function(){var e,t;f.current.element===w&&((e=f.current.point)===(t=x)||e&&t&&("pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t&&e.clientX===t.clientX&&e.clientY===t.clientY))&&Qt(f.current.align,i)||y()})),c().useEffect((function(){return Pn(p.current,y)}),[p.current]),c().useEffect((function(){return Pn(w,y)}),[w]),c().useEffect((function(){o?g():y()}),[o]),c().useEffect((function(){if(u)return W(window,"resize",y).remove}),[u]),c().useEffect((function(){return function(){g()}}),[]),c().useImperativeHandle(t,(function(){return{forceAlign:function(){return y(!0)}}})),c().isValidElement(d)&&(d=c().cloneElement(d,{ref:N(d.ref,p)})),d},Zn=c().forwardRef(Dn);Zn.displayName="Align";const An=Zn;function Rn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
7
|
+
Rn=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var i=t&&t.prototype instanceof d?t:d,a=Object.create(i.prototype),u=new T(r||[]);return o(a,"_invoke",{value:O(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var p={};function d(){}function h(){}function v(){}var m={};s(m,a,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(M([])));g&&g!==t&&n.call(g,a)&&(m=g);var b=v.prototype=d.prototype=Object.create(m);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function i(o,a,u,c){var s=f(e[o],e,a);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==(0,r.Z)(p)&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){i("next",e,u,c)}),(function(e){i("throw",e,u,c)})):t.resolve(p).then((function(e){l.value=e,u(l)}),(function(e){return i("throw",e,u,c)}))}c(s.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){i(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function O(e,t,n){var o="suspendedStart";return function(r,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===r)throw i;return P()}for(n.method=r,n.arg=i;;){var a=n.delegate;if(a){var u=x(a,n);if(u){if(u===p)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var c=f(e,t,n);if("normal"===c.type){if(o=n.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o="completed",n.method="throw",n.arg=c.arg)}}}function x(e,t){var n=t.method,o=e.iterator[n];if(void 0===o)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var r=f(o,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,p;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function M(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,r=function t(){for(;++o<e.length;)if(n.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:P}}function P(){return{value:void 0,done:!0}}return h.prototype=v,o(b,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:h,configurable:!0}),h.displayName=s(v,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,c,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},w(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,o,r,i){void 0===i&&(i=Promise);var a=new E(l(t,n,o,r),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(b),s(b,c,"Generator"),s(b,a,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var o in t)n.push(o);return n.reverse(),function e(){for(;n.length;){var o=n.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},e.values=M,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function o(n,o){return a.type="throw",a.arg=e,t.next=n,o&&(t.method="next",t.arg=void 0),!!o}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var o=this.tryEntries.length-1;o>=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;C(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:M(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}function Ln(e,t,n,o,r,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(o,r)}function jn(e){return function(){var t=this,n=arguments;return new Promise((function(o,r){var i=e.apply(t,n);function a(e){Ln(i,o,r,a,u,"next",e)}function u(e){Ln(i,o,r,a,u,"throw",e)}a(void 0)}))}}var Nn=["measure","alignPre","align",null,"motion"];var Vn=u.forwardRef((function(e,t){var n=e.visible,r=e.prefixCls,a=e.className,c=e.style,s=e.children,l=e.zIndex,f=e.stretch,p=e.destroyPopupOnHide,d=e.forceRender,h=e.align,v=e.point,m=e.getRootDomNode,y=e.getClassNameFromAlign,g=e.onAlign,b=e.onMouseEnter,w=e.onMouseLeave,E=e.onMouseDown,O=e.onTouchStart,x=e.onClick,k=(0,u.useRef)(),C=(0,u.useRef)(),T=$((0,u.useState)(),2),P=T[0],S=T[1],_=function(e){var t=$(u.useState({width:0,height:0}),2),n=t[0],o=t[1];return[u.useMemo((function(){var t={};if(e){var o=n.width,r=n.height;-1!==e.indexOf("height")&&r?t.height=r:-1!==e.indexOf("minHeight")&&r&&(t.minHeight=r),-1!==e.indexOf("width")&&o?t.width=o:-1!==e.indexOf("minWidth")&&o&&(t.minWidth=o)}return t}),[e,n]),function(e){var t=e.offsetWidth,n=e.offsetHeight,r=e.getBoundingClientRect(),i=r.width,a=r.height;Math.abs(t-i)<1&&Math.abs(n-a)<1&&(t=i,n=a),o({width:t,height:n})}]}(f),D=$(_,2),Z=D[0],A=D[1];var R=function(e,t){var n=$(ge(null),2),o=n[0],r=n[1],i=(0,u.useRef)();function a(e){r(e,!0)}function c(){M.cancel(i.current)}return(0,u.useEffect)((function(){a("measure")}),[e]),(0,u.useEffect)((function(){"measure"===o&&t(),o&&(i.current=M(jn(Rn().mark((function e(){var t,n;return Rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Nn.indexOf(o),(n=Nn[t+1])&&-1!==t&&a(n);case 3:case"end":return e.stop()}}),e)})))))}),[o]),(0,u.useEffect)((function(){return function(){c()}}),[]),[o,function(e){c(),i.current=M((function(){a((function(e){switch(o){case"align":return"motion";case"motion":return"stable"}return e})),null==e||e()}))}]}(n,(function(){f&&A(m())})),L=$(R,2),j=L[0],N=L[1],V=$((0,u.useState)(0),2),H=V[0],W=V[1],F=(0,u.useRef)();function B(){var e;null===(e=k.current)||void 0===e||e.forceAlign()}function I(e,t){var n=y(t);P!==n&&S(n),W((function(e){return e+1})),"align"===j&&(null==g||g(e,t))}nn((function(){"alignPre"===j&&W(0)}),[j]),nn((function(){"align"===j&&(H<3?B():N((function(){var e;null===(e=F.current)||void 0===e||e.call(F)})))}),[H]);var Y=(0,i.Z)({},Ve(e));function X(){return new Promise((function(e){F.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=Y[e];Y[e]=function(e,n){return N(),null==t?void 0:t(e,n)}})),u.useEffect((function(){Y.motionName||"motion"!==j||N()}),[Y.motionName,j]),u.useImperativeHandle(t,(function(){return{forceAlign:B,getElement:function(){return C.current}}}));var G=(0,i.Z)((0,i.Z)({},Z),{},{zIndex:l,opacity:"motion"!==j&&"stable"!==j&&n?0:void 0,pointerEvents:n||"stable"===j?void 0:"none"},c),q=!0;null==h||!h.points||"align"!==j&&"stable"!==j||(q=!1);var U=s;return u.Children.count(s)>1&&(U=u.createElement("div",{className:"".concat(r,"-content")},s)),u.createElement(Ne,(0,o.Z)({visible:n,ref:C,leavedClassName:"".concat(r,"-hidden")},Y,{onAppearPrepare:X,onEnterPrepare:X,removeOnLeave:p,forceRender:d}),(function(e,t){var n=e.className,o=e.style,c=z()(r,a,P,n);return u.createElement(An,{target:v||m,key:"popup",ref:k,monitorWindowResize:!0,disabled:q,align:h,onAlign:I},u.createElement("div",{ref:t,className:c,onMouseEnter:b,onMouseLeave:w,onMouseDownCapture:E,onTouchStartCapture:O,onClick:x,style:(0,i.Z)((0,i.Z)({},o),G)},U))}))}));Vn.displayName="PopupInner";const Hn=Vn;var Wn=u.forwardRef((function(e,t){var n=e.prefixCls,r=e.visible,a=e.zIndex,c=e.children,s=e.mobile,l=(s=void 0===s?{}:s).popupClassName,f=s.popupStyle,p=s.popupMotion,d=void 0===p?{}:p,h=s.popupRender,v=e.onClick,m=u.useRef();u.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return m.current}}}));var y=(0,i.Z)({zIndex:a},f),g=c;return u.Children.count(c)>1&&(g=u.createElement("div",{className:"".concat(n,"-content")},c)),h&&(g=h(g)),u.createElement(Ne,(0,o.Z)({visible:r,ref:m,removeOnLeave:!0},d),(function(e,t){var o=e.className,r=e.style,a=z()(n,l,o);return u.createElement("div",{ref:t,className:a,onClick:v,style:(0,i.Z)((0,i.Z)({},r),y)},g)}))}));Wn.displayName="MobilePopupInner";const Fn=Wn;var Bn=["visible","mobile"],In=u.forwardRef((function(e,t){var n=e.visible,r=e.mobile,c=a(e,Bn),s=$((0,u.useState)(n),2),l=s[0],f=s[1],p=$((0,u.useState)(!1),2),d=p[0],h=p[1],v=(0,i.Z)((0,i.Z)({},c),{},{visible:l});(0,u.useEffect)((function(){f(n),n&&r&&h(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))}())}),[n,r]);var m=d?u.createElement(Fn,(0,o.Z)({},v,{mobile:r,ref:t})):u.createElement(Hn,(0,o.Z)({},v,{ref:t}));return u.createElement("div",null,u.createElement(He,v),m)}));In.displayName="Popup";const zn=In;const Yn=u.createContext(null);function Xn(){}function $n(){return""}function Gn(e){return e?e.ownerDocument:window.document}var qn=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];const Un=(Kn=B,Jn=function(e){v(n,e);var t=y(n);function n(e){var r,i;return s(this,n),r=t.call(this,e),(0,g.Z)(d(r),"popupRef",u.createRef()),(0,g.Z)(d(r),"triggerRef",u.createRef()),(0,g.Z)(d(r),"portalContainer",void 0),(0,g.Z)(d(r),"attachId",void 0),(0,g.Z)(d(r),"clickOutsideHandler",void 0),(0,g.Z)(d(r),"touchOutsideHandler",void 0),(0,g.Z)(d(r),"contextMenuOutsideHandler1",void 0),(0,g.Z)(d(r),"contextMenuOutsideHandler2",void 0),(0,g.Z)(d(r),"mouseDownTimeout",void 0),(0,g.Z)(d(r),"focusTime",void 0),(0,g.Z)(d(r),"preClickTime",void 0),(0,g.Z)(d(r),"preTouchTime",void 0),(0,g.Z)(d(r),"delayTimer",void 0),(0,g.Z)(d(r),"hasPopupMouseDown",void 0),(0,g.Z)(d(r),"onMouseEnter",(function(e){var t=r.props.mouseEnterDelay;r.fireEvents("onMouseEnter",e),r.delaySetPopupVisible(!0,t,t?null:e)})),(0,g.Z)(d(r),"onMouseMove",(function(e){r.fireEvents("onMouseMove",e),r.setPoint(e)})),(0,g.Z)(d(r),"onMouseLeave",(function(e){r.fireEvents("onMouseLeave",e),r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)})),(0,g.Z)(d(r),"onPopupMouseEnter",(function(){r.clearDelayTimer()})),(0,g.Z)(d(r),"onPopupMouseLeave",(function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&P(null===(t=r.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)})),(0,g.Z)(d(r),"onFocus",(function(e){r.fireEvents("onFocus",e),r.clearDelayTimer(),r.isFocusToShow()&&(r.focusTime=Date.now(),r.delaySetPopupVisible(!0,r.props.focusDelay))})),(0,g.Z)(d(r),"onMouseDown",(function(e){r.fireEvents("onMouseDown",e),r.preClickTime=Date.now()})),(0,g.Z)(d(r),"onTouchStart",(function(e){r.fireEvents("onTouchStart",e),r.preTouchTime=Date.now()})),(0,g.Z)(d(r),"onBlur",(function(e){r.fireEvents("onBlur",e),r.clearDelayTimer(),r.isBlurToHide()&&r.delaySetPopupVisible(!1,r.props.blurDelay)})),(0,g.Z)(d(r),"onContextMenu",(function(e){e.preventDefault(),r.fireEvents("onContextMenu",e),r.setPopupVisible(!0,e)})),(0,g.Z)(d(r),"onContextMenuClose",(function(){r.isContextMenuToShow()&&r.close()})),(0,g.Z)(d(r),"onClick",(function(e){if(r.fireEvents("onClick",e),r.focusTime){var t;if(r.preClickTime&&r.preTouchTime?t=Math.min(r.preClickTime,r.preTouchTime):r.preClickTime?t=r.preClickTime:r.preTouchTime&&(t=r.preTouchTime),Math.abs(t-r.focusTime)<20)return;r.focusTime=0}r.preClickTime=0,r.preTouchTime=0,r.isClickToShow()&&(r.isClickToHide()||r.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!r.state.popupVisible;(r.isClickToHide()&&!n||n&&r.isClickToShow())&&r.setPopupVisible(!r.state.popupVisible,e)})),(0,g.Z)(d(r),"onPopupMouseDown",(function(){var e;r.hasPopupMouseDown=!0,clearTimeout(r.mouseDownTimeout),r.mouseDownTimeout=window.setTimeout((function(){r.hasPopupMouseDown=!1}),0),r.context&&(e=r.context).onPopupMouseDown.apply(e,arguments)})),(0,g.Z)(d(r),"onDocumentClick",(function(e){if(!r.props.mask||r.props.maskClosable){var t=e.target,n=r.getRootDomNode(),o=r.getPopupDomNode();P(n,t)&&!r.isContextMenuOnly()||P(o,t)||r.hasPopupMouseDown||r.close()}})),(0,g.Z)(d(r),"getRootDomNode",(function(){var e=r.props.getTriggerDOMNode;if(e)return e(r.triggerRef.current);try{var t=_(r.triggerRef.current);if(t)return t}catch(e){}return w().findDOMNode(d(r))})),(0,g.Z)(d(r),"getPopupClassNameFromAlign",(function(e){var t=[],n=r.props,o=n.popupPlacement,i=n.builtinPlacements,a=n.prefixCls,u=n.alignPoint,c=n.getPopupClassNameFromAlign;return o&&i&&t.push(function(e,t,n,o){for(var r=n.points,i=Object.keys(e),a=0;a<i.length;a+=1){var u=i[a];if(Y(e[u].points,r,o))return"".concat(t,"-placement-").concat(u)}return""}(i,a,e,u)),c&&t.push(c(e)),t.join(" ")})),(0,g.Z)(d(r),"getComponent",(function(){var e=r.props,t=e.prefixCls,n=e.destroyPopupOnHide,i=e.popupClassName,a=e.onPopupAlign,c=e.popupMotion,s=e.popupAnimation,l=e.popupTransitionName,f=e.popupStyle,p=e.mask,d=e.maskAnimation,h=e.maskTransitionName,v=e.maskMotion,m=e.zIndex,y=e.popup,g=e.stretch,b=e.alignPoint,w=e.mobile,E=e.forceRender,O=e.onPopupClick,x=r.state,k=x.popupVisible,C=x.point,T=r.getPopupAlign(),M={};return r.isMouseEnterToShow()&&(M.onMouseEnter=r.onPopupMouseEnter),r.isMouseLeaveToHide()&&(M.onMouseLeave=r.onPopupMouseLeave),M.onMouseDown=r.onPopupMouseDown,M.onTouchStart=r.onPopupMouseDown,u.createElement(zn,(0,o.Z)({prefixCls:t,destroyPopupOnHide:n,visible:k,point:b&&C,className:i,align:T,onAlign:a,animation:s,getClassNameFromAlign:r.getPopupClassNameFromAlign},M,{stretch:g,getRootDomNode:r.getRootDomNode,style:f,mask:p,zIndex:m,transitionName:l,maskAnimation:d,maskTransitionName:h,maskMotion:v,ref:r.popupRef,motion:c,mobile:w,forceRender:E,onClick:O}),"function"==typeof y?y():y)})),(0,g.Z)(d(r),"attachParent",(function(e){M.cancel(r.attachId);var t,n=r.props,o=n.getPopupContainer,i=n.getDocument,a=r.getRootDomNode();o?(a||0===o.length)&&(t=o(a)):t=i(r.getRootDomNode()).body,t?t.appendChild(e):r.attachId=M((function(){r.attachParent(e)}))})),(0,g.Z)(d(r),"getContainer",(function(){if(!r.portalContainer){var e=(0,r.props.getDocument)(r.getRootDomNode()).createElement("div");e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",r.portalContainer=e}return r.attachParent(r.portalContainer),r.portalContainer})),(0,g.Z)(d(r),"setPoint",(function(e){r.props.alignPoint&&e&&r.setState({point:{pageX:e.pageX,pageY:e.pageY}})})),(0,g.Z)(d(r),"handlePortalUpdate",(function(){r.state.prevPopupVisible!==r.state.popupVisible&&r.props.afterPopupVisibleChange(r.state.popupVisible)})),(0,g.Z)(d(r),"triggerContextValue",{onPopupMouseDown:r.onPopupMouseDown}),i="popupVisible"in e?!!e.popupVisible:!!e.defaultPopupVisible,r.state={prevPopupVisible:i,popupVisible:i},qn.forEach((function(e){r["fire".concat(e)]=function(t){r.fireEvents(e,t)}})),r}return p(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e,t=this.props;if(this.state.popupVisible)return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(e=t.getDocument(this.getRootDomNode()),this.clickOutsideHandler=W(e,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(e=e||t.getDocument(this.getRootDomNode()),this.touchOutsideHandler=W(e,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(e=e||t.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=W(e,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=W(window,"blur",this.onContextMenuClose)));this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),M.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=this.props,t=e.popupPlacement,n=e.popupAlign,o=e.builtinPlacements;return t&&o?function(e,t,n){var o=e[t]||{};return(0,i.Z)((0,i.Z)({},o),n)}(o,t,n):n}},{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,r=1e3*t;if(this.clearDelayTimer(),r){var i=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=window.setTimeout((function(){o.setPopupVisible(e,i),o.clearDelayTimer()}),r)}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(){var e;this.state.popupVisible&&(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=this.state.popupVisible,t=this.props,n=t.children,o=t.forceRender,r=t.alignPoint,a=t.className,c=t.autoDestroy,s=u.Children.only(n),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,r&&(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 f=z()(s&&s.props&&s.props.className,a);f&&(l.className=f);var p=(0,i.Z)({},l);V(s)&&(p.ref=N(this.triggerRef,s.ref));var d,h=u.cloneElement(s,p);return(e||this.popupRef.current||o)&&(d=u.createElement(Kn,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!e&&c&&(d=null),u.createElement(Yn.Provider,{value:this.triggerContextValue},h,d)}}],[{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}(u.Component),(0,g.Z)(Jn,"contextType",Yn),(0,g.Z)(Jn,"defaultProps",{prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:$n,getDocument:Gn,onPopupVisibleChange:Xn,afterPopupVisibleChange:Xn,onPopupAlign:Xn,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1}),Jn);var Kn,Jn,Qn={adjustX:1,adjustY:1},eo=[0,0],to={left:{points:["cr","cl"],overflow:Qn,offset:[-4,0],targetOffset:eo},right:{points:["cl","cr"],overflow:Qn,offset:[4,0],targetOffset:eo},top:{points:["bc","tc"],overflow:Qn,offset:[0,-4],targetOffset:eo},bottom:{points:["tc","bc"],overflow:Qn,offset:[0,4],targetOffset:eo},topLeft:{points:["bl","tl"],overflow:Qn,offset:[0,-4],targetOffset:eo},leftTop:{points:["tr","tl"],overflow:Qn,offset:[-4,0],targetOffset:eo},topRight:{points:["br","tr"],overflow:Qn,offset:[0,-4],targetOffset:eo},rightTop:{points:["tl","tr"],overflow:Qn,offset:[4,0],targetOffset:eo},bottomRight:{points:["tr","br"],overflow:Qn,offset:[0,4],targetOffset:eo},rightBottom:{points:["bl","br"],overflow:Qn,offset:[4,0],targetOffset:eo},bottomLeft:{points:["tl","bl"],overflow:Qn,offset:[0,4],targetOffset:eo},leftBottom:{points:["br","bl"],overflow:Qn,offset:[-4,0],targetOffset:eo}};function no(e){var t=e.showArrow,n=e.arrowContent,o=e.children,r=e.prefixCls,i=e.id,a=e.overlayInnerStyle,c=e.className,s=e.style;return u.createElement("div",{className:z()("".concat(r,"-content"),c),style:s},!1!==t&&u.createElement("div",{className:"".concat(r,"-arrow"),key:"arrow"},n),u.createElement("div",{className:"".concat(r,"-inner"),id:i,role:"tooltip",style:a},"function"==typeof o?o():o))}var oo=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],ro=function(e,t){var n=e.overlayClassName,c=e.trigger,s=void 0===c?["hover"]:c,l=e.mouseEnterDelay,f=void 0===l?0:l,p=e.mouseLeaveDelay,d=void 0===p?.1:p,h=e.overlayStyle,v=e.prefixCls,m=void 0===v?"rc-tooltip":v,y=e.children,g=e.onVisibleChange,b=e.afterVisibleChange,w=e.transitionName,E=e.animation,O=e.motion,x=e.placement,k=void 0===x?"right":x,C=e.align,T=void 0===C?{}:C,M=e.destroyTooltipOnHide,P=void 0!==M&&M,S=e.defaultVisible,_=e.getTooltipContainer,D=e.overlayInnerStyle,Z=e.arrowContent,A=e.overlay,R=e.id,L=e.showArrow,j=void 0===L||L,N=a(e,oo),V=(0,u.useRef)(null);(0,u.useImperativeHandle)(t,(function(){return V.current}));var H=(0,i.Z)({},N);"visible"in e&&(H.popupVisible=e.visible);var W=!1,F=!1;if("boolean"==typeof P)W=P;else if(P&&"object"===(0,r.Z)(P)){var B=P.keepParent;W=!0===B,F=!1===B}return u.createElement(Un,(0,o.Z)({popupClassName:n,prefixCls:m,popup:function(){return u.createElement(no,{showArrow:j,arrowContent:Z,key:"content",prefixCls:m,id:R,overlayInnerStyle:D},A)},action:s,builtinPlacements:to,popupPlacement:k,ref:V,popupAlign:T,getPopupContainer:_,onPopupVisibleChange:g,afterPopupVisibleChange:b,popupTransitionName:w,popupAnimation:E,popupMotion:O,defaultPopupVisible:S,destroyPopupOnHide:W,autoDestroy:F,mouseLeaveDelay:d,popupStyle:h,mouseEnterDelay:f},H),y)};const io=(0,u.forwardRef)(ro)},90911:(e,t)=>{"use strict";var n,o=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");
|
|
8
|
+
/**
|
|
9
|
+
* @license React
|
|
10
|
+
* react-is.production.min.js
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the MIT license found in the
|
|
15
|
+
* LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/function y(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case i:case u:case a:case p:case d:return e;default:switch(e=e&&e.$$typeof){case l:case s:case f:case v:case h:case c:return e;default:return t}}case r:return t}}}n=Symbol.for("react.module.reference"),t.ForwardRef=f,t.isMemo=function(e){return y(e)===h}},10516:(e,t,n)=>{"use strict";e.exports=n(90911)}}]);
|
|
17
|
+
//# sourceMappingURL=154-07a8f6.js.map
|