/*! For license information please see ahooks.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React")):"function"==typeof define&&define.amd?define(["React"],t):"object"==typeof exports?exports.ahooks=t(require("React")):e.ahooks=t(e.React)}(this,e=>(()=>{var t={6:(e,t,n)=>{var r=n(714).Symbol;e.exports=r},12:(e,t,n)=>{var r=n(400),o=n(835),i=n(639),u=Math.max,c=Math.min;e.exports=function(e,t,n){var a,s,l,f,d,v,h=0,p=!1,m=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=a,r=s;return a=s=void 0,h=t,f=e.apply(r,n)}function b(e){var n=e-v;return void 0===v||n>=t||n<0||m&&e-h>=l}function w(){var e=o();if(b(e))return E(e);d=setTimeout(w,function(e){var n=t-(e-v);return m?c(n,l-(e-h)):n}(e))}function E(e){return d=void 0,g&&a?y(e):(a=s=void 0,f)}function S(){var e=o(),n=b(e);if(a=arguments,s=this,v=e,n){if(void 0===d)return function(e){return h=e,d=setTimeout(w,t),p?y(e):f}(v);if(m)return clearTimeout(d),d=setTimeout(w,t),y(v)}return void 0===d&&(d=setTimeout(w,t)),f}return t=i(t)||0,r(n)&&(p=!!n.leading,l=(m="maxWait"in n)?u(i(n.maxWait)||0,t):l,g="trailing"in n?!!n.trailing:g),S.cancel=function(){void 0!==d&&clearTimeout(d),h=0,a=v=s=d=void 0},S.flush=function(){return void 0===d?f:E(o())},S}},103:(e,t,n)=>{var r=n(997),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},108:(e,t,n)=>{var r=n(271),o=n(556),i=n(583),u=Function.prototype,c=Object.prototype,a=u.toString,s=c.hasOwnProperty,l=a.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=s.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&a.call(n)==l}},271:(e,t,n)=>{var r=n(6),o=n(650),i=n(881),u=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":u&&u in Object(e)?o(e):i(e)}},300:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,n="millisecond",r="second",o="minute",i="hour",u="day",c="week",a="month",s="quarter",l="year",f="date",d="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},m=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},g={s:m,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+m(r,2,"0")+":"+m(o,2,"0")},m:function e(t,n){if(t.date()1)return e(u[0])}else{var c=t.name;b[c]=t,o=c}return!r&&o&&(y=o),o||!r&&y},_=function(e,t){if(E(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new T(n)},O=g;O.l=S,O.i=E,O.w=function(e,t){return _(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var T=function(){function p(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var m=p.prototype;return m.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(O.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(v);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===d)},m.isSame=function(e,t){var n=_(e);return this.startOf(t)<=n&&n<=this.endOf(t)},m.isAfter=function(e,t){return _(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},546:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},556:(e,t,n)=>{var r=n(546)(Object.getPrototypeOf,Object);e.exports=r},583:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},603:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},639:(e,t,n)=>{var r=n(103),o=n(400),i=n(975),u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=c.test(e);return n||a.test(e)?s(e.slice(2),n?2:8):u.test(e)?NaN:+e}},650:(e,t,n)=>{var r=n(6),o=Object.prototype,i=o.hasOwnProperty,u=o.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var o=u.call(e);return r&&(t?e[c]=n:delete e[c]),o}},714:(e,t,n)=>{var r=n(603),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},727:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function i(e,u){if(e===u)return!0;if(e&&u&&"object"==typeof e&&"object"==typeof u){if(e.constructor!==u.constructor)return!1;var c,a,s,l;if(Array.isArray(e)){if((c=e.length)!=u.length)return!1;for(a=c;0!==a--;)if(!i(e[a],u[a]))return!1;return!0}if(n&&e instanceof Map&&u instanceof Map){if(e.size!==u.size)return!1;for(l=e.entries();!(a=l.next()).done;)if(!u.has(a.value[0]))return!1;for(l=e.entries();!(a=l.next()).done;)if(!i(a.value[1],u.get(a.value[0])))return!1;return!0}if(r&&e instanceof Set&&u instanceof Set){if(e.size!==u.size)return!1;for(l=e.entries();!(a=l.next()).done;)if(!u.has(a.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(u)){if((c=e.length)!=u.length)return!1;for(a=c;0!==a--;)if(e[a]!==u[a])return!1;return!0}if(e.constructor===RegExp)return e.source===u.source&&e.flags===u.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof u.valueOf)return e.valueOf()===u.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof u.toString)return e.toString()===u.toString();if((c=(s=Object.keys(e)).length)!==Object.keys(u).length)return!1;for(a=c;0!==a--;)if(!Object.prototype.hasOwnProperty.call(u,s[a]))return!1;if(t&&e instanceof Element)return!1;for(a=c;0!==a--;)if(("_owner"!==s[a]&&"__v"!==s[a]&&"__o"!==s[a]||!e.$$typeof)&&!i(e[s[a]],u[s[a]]))return!1;return!0}return e!=e&&u!=u}e.exports=function(e,t){try{return i(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},735:()=>{!function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var e=function(){for(var e=window.document,t=o(e);t;)t=o(e=t.ownerDocument);return e}(),t=[],n=null,r=null;u.prototype.THROTTLE_TIMEOUT=100,u.prototype.POLL_INTERVAL=null,u.prototype.USE_MUTATION_OBSERVER=!0,u._setupCrossOriginUpdater=function(){return n||(n=function(e,n){r=e&&n?d(e,n):{top:0,bottom:0,left:0,right:0,width:0,height:0},t.forEach(function(e){e._checkForIntersections()})}),n},u._resetCrossOriginUpdater=function(){n=null,r=null},u.prototype.observe=function(e){if(!this._observationTargets.some(function(t){return t.element==e})){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(e.ownerDocument),this._checkForIntersections()}},u.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter(function(t){return t.element!=e}),this._unmonitorIntersections(e.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},u.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},u.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},u.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter(function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]})},u.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map(function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}});return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},u.prototype._monitorIntersections=function(t){var n=t.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(t)){var r=this._checkForIntersections,i=null,u=null;this.POLL_INTERVAL?i=n.setInterval(r,this.POLL_INTERVAL):(c(n,"resize",r,!0),c(t,"scroll",r,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(u=new n.MutationObserver(r)).observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(t),this._monitoringUnsubscribes.push(function(){var e=t.defaultView;e&&(i&&e.clearInterval(i),a(e,"resize",r,!0)),a(t,"scroll",r,!0),u&&u.disconnect()});var s=this.root&&(this.root.ownerDocument||this.root)||e;if(t!=s){var l=o(t);l&&this._monitorIntersections(l.ownerDocument)}}},u.prototype._unmonitorIntersections=function(t){var n=this._monitoringDocuments.indexOf(t);if(-1!=n){var r=this.root&&(this.root.ownerDocument||this.root)||e,i=this._observationTargets.some(function(e){var n=e.element.ownerDocument;if(n==t)return!0;for(;n&&n!=r;){var i=o(n);if((n=i&&i.ownerDocument)==t)return!0}return!1});if(!i){var u=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),u(),t!=r){var c=o(t);c&&this._unmonitorIntersections(c.ownerDocument)}}}},u.prototype._unmonitorAllIntersections=function(){var e=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var t=0;t=0&&c>=0&&{top:n,bottom:r,left:o,right:i,width:u,height:c}||null}function l(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function f(e){return!e||"x"in e?e:{top:e.top,y:e.top,bottom:e.bottom,left:e.left,x:e.left,right:e.right,width:e.width,height:e.height}}function d(e,t){var n=t.top-e.top,r=t.left-e.left;return{top:n,left:r,height:t.height,width:t.width,bottom:n+t.height,right:r+t.width}}function v(e,t){for(var n=t;n;){if(n==e)return!0;n=h(n)}return!1}function h(t){var n=t.parentNode;return 9==t.nodeType&&t!=e?o(t):(n&&n.assignedSlot&&(n=n.assignedSlot.parentNode),n&&11==n.nodeType&&n.host?n.host:n)}function p(e){return e&&9===e.nodeType}}()},763:e=>{!function(){"use strict";var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},n=e.exports,r=function(){for(var e,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],r=0,o=n.length,i={};r{var r=n(12),o=n(400);e.exports=function(e,t,n){var i=!0,u=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,u="trailing"in n?!!n.trailing:u),r(e,t,{leading:i,maxWait:t,trailing:u})}},835:(e,t,n)=>{var r=n(714);e.exports=function(){return r.Date.now()}},881:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},883:t=>{"use strict";t.exports=e},975:(e,t,n)=>{var r=n(271),o=n(583);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},997:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";r.r(o),r.d(o,{clearCache:()=>_,configResponsive:()=>Ct,createUpdateEffect:()=>t,useAntdTable:()=>G,useAsyncEffect:()=>K,useBoolean:()=>Z,useClickAway:()=>re,useControllableValue:()=>oe,useCookieState:()=>ce,useCountDown:()=>fe,useCounter:()=>ve,useCreation:()=>b,useDebounce:()=>pe,useDebounceEffect:()=>me,useDebounceFn:()=>he,useDeepCompareEffect:()=>Ee,useDeepCompareLayoutEffect:()=>Se,useDocumentVisibility:()=>Te,useDrag:()=>Me,useDrop:()=>xe,useDynamicList:()=>Re,useEventEmitter:()=>De,useEventListener:()=>_e,useEventTarget:()=>Ae,useExternal:()=>Ce,useFavicon:()=>Fe,useFocusWithin:()=>Ne,useFullscreen:()=>$e,useFusionTable:()=>ze,useGetState:()=>He,useHistoryTravel:()=>Ye,useHover:()=>Be,useInViewport:()=>Xe,useInfiniteScroll:()=>qe,useInterval:()=>Ue,useIsomorphicLayoutEffect:()=>Ge,useKeyPress:()=>nt,useLatest:()=>w,useLocalStorageState:()=>it,useLockFn:()=>ut,useLongPress:()=>ct,useMap:()=>at,useMemoizedFn:()=>h,useMount:()=>Y,useMouse:()=>ft,useMutationObserver:()=>Rn,useNetwork:()=>pt,usePagination:()=>X,usePrevious:()=>gt,useRafInterval:()=>yt,useRafState:()=>st,useRafTimeout:()=>bt,useReactive:()=>Tt,useRequest:()=>U,useResetState:()=>Mt,useResponsive:()=>It,useSafeState:()=>Nt,useScroll:()=>jt,useSelections:()=>Pt,useSessionStorageState:()=>$t,useSet:()=>zt,useSetState:()=>Ht,useSize:()=>dn,useTextSelection:()=>pn,useTheme:()=>An,useThrottle:()=>gn,useThrottleEffect:()=>yn,useThrottleFn:()=>mn,useTimeout:()=>bn,useTitle:()=>En,useToggle:()=>J,useTrackedEffect:()=>Sn,useUnmount:()=>E,useUnmountedRef:()=>Ft,useUpdate:()=>B,useUpdateEffect:()=>p,useUpdateLayoutEffect:()=>_n,useVirtualList:()=>On,useWebSocket:()=>Mn,useWhyDidYouUpdate:()=>xn});var e=r(883),t=function(t){return function(n,r){var o=(0,e.useRef)(!1);t(function(){return function(){o.current=!1}},[]),t(function(){if(o.current)return n();o.current=!0},r)}},n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function l(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o-1&&(i=setTimeout(function(){S.delete(e)},t)),S.set(e,n(n({},r),{timer:i}))}(e,u,t),function(e,t){T[e]&&T[e].forEach(function(e){return e(t)})}(e,t.data)},m=function(e,t){return void 0===t&&(t=[]),d?d(t):function(e){return S.get(e)}(e)};return b(function(){if(o){var e=m(o);e&&Object.hasOwnProperty.call(e,"data")&&(t.state.data=e.data,t.state.params=e.params,(-1===a||Date.now()-e.time<=a)&&(t.state.loading=!1)),v.current=M(o,function(e){t.setState({data:e})})}},[]),E(function(){var e;null===(e=v.current)||void 0===e||e.call(v)}),o?{onBefore:function(e){var t=m(o,e);return t&&Object.hasOwnProperty.call(t,"data")?-1===a||Date.now()-t.time<=a?{loading:!1,data:null==t?void 0:t.data,error:void 0,returnNow:!0}:{data:null==t?void 0:t.data,error:void 0}:{}},onRequest:function(e,t){var n=function(e){return O.get(e)}(o);return n&&n!==h.current||(n=e.apply(void 0,l([],s(t),!1)),h.current=n,function(e,t){O.set(e,t),t.then(function(t){return O.delete(e),t}).catch(function(){O.delete(e)})}(o,n)),{servicePromise:n}},onSuccess:function(e,n){var r;o&&(null===(r=v.current)||void 0===r||r.call(v),p(o,{data:e,params:n,time:Date.now()}),v.current=M(o,function(e){t.setState({data:e})}))},onMutate:function(e){var n;o&&(null===(n=v.current)||void 0===n||n.call(v),p(o,{data:e,params:t.state.params,time:Date.now()}),v.current=M(o,function(e){t.setState({data:e})}))}}:{}};var R=r(12),k=r.n(R);const D=function(t,n){var r=n.debounceWait,o=n.debounceLeading,i=n.debounceTrailing,u=n.debounceMaxWait,c=(0,e.useRef)(void 0),a=(0,e.useMemo)(function(){var e={};return void 0!==o&&(e.leading=o),void 0!==i&&(e.trailing=i),void 0!==u&&(e.maxWait=u),e},[o,i,u]);return(0,e.useEffect)(function(){if(r){var e=t.runAsync.bind(t);return c.current=k()(function(e){e()},r,a),t.runAsync=function(){for(var t=[],n=0;ni&&(r=Math.max(1,i));var u=s(v.params||[]),c=u[0],a=void 0===c?{}:c,f=u.slice(1);v.run.apply(v,l([],s(l([n(n({},a),{current:r,pageSize:o})],s(f),!1)),!1))},_=function(e){S(e,b)};return n(n({},v),{pagination:{current:g,pageSize:b,total:w,totalPage:E,onChange:h(S),changeCurrent:h(_),changePageSize:h(function(e){S(g,e)})}})},G=function(t,r){var o;void 0===r&&(r={});var u=r.form,c=r.defaultType,a=void 0===c?"simple":c,f=r.defaultParams,d=r.manual,v=void 0!==d&&d,m=r.refreshDeps,g=void 0===m?[]:m,y=r.ready,b=void 0===y||y,w=i(r,["form","defaultType","defaultParams","manual","refreshDeps","ready"]),E=X(t,n(n({ready:b,manual:!0},w),{onSuccess:function(){for(var e,t=[],n=0;n0)return k.current=(null==T?void 0:T.allFormData)||{},I(),void O.apply(void 0,l([],s(_),!1));b&&(k.current=(null==f?void 0:f[1])||{},I(),v||F(null==f?void 0:f[0]))},[]),p(function(){b&&I()},[x]);var N=(0,e.useRef)(!1);return N.current=!1,p(function(){!v&&b&&(N.current=!0,u&&u.resetFields(),k.current=(null==f?void 0:f[1])||{},I(),F(null==f?void 0:f[0]))},[b]),p(function(){N.current||b&&(v||(N.current=!0,r.refreshDepsAction?r.refreshDepsAction():E.pagination.changeCurrent(1)))},l([],s(g),!1)),n(n({},E),{tableProps:{dataSource:(null===(o=E.data)||void 0===o?void 0:o.list)||D.current,loading:E.loading,onChange:h(function(e,t,r,o){var i=s(_||[]),u=i[0],c=i.slice(1);O.apply(void 0,l([n(n({},u),{current:e.current,pageSize:e.pageSize,filters:t,sorter:r,extra:o})],s(c),!1))}),pagination:{current:E.pagination.current,pageSize:E.pagination.pageSize,total:E.pagination.total}},search:{submit:h(function(e){var t,o,i;null===(t=null==e?void 0:e.preventDefault)||void 0===t||t.call(e),F(A.current?void 0:n({pageSize:r.defaultPageSize||(null===(i=null===(o=r.defaultParams)||void 0===o?void 0:o[0])||void 0===i?void 0:i.pageSize)||10,current:1},(null==f?void 0:f[0])||{}))}),type:x,changeType:h(function(){var e=C();k.current=n(n({},k.current),e),R(function(e){return"simple"===e?"advance":"simple"})}),reset:h(function(){var e,t;u&&u.resetFields(),F(n(n({},(null==f?void 0:f[0])||{}),{pageSize:r.defaultPageSize||(null===(t=null===(e=r.defaultParams)||void 0===e?void 0:e[0])||void 0===t?void 0:t.pageSize)||10,current:1}))})}})},K=function(t,n){(0,e.useEffect)(function(){var e=t(),n=!1;return function(){u(this,void 0,void 0,function(){return c(this,function(t){switch(t.label){case 0:if(!f(e[Symbol.asyncIterator]))return[3,4];t.label=1;case 1:return[4,e.next()];case 2:return t.sent().done||n?[3,3]:[3,1];case 3:return[3,6];case 4:return[4,e];case 5:t.sent(),t.label=6;case 6:return[2]}})})}(),function(){n=!0}},n)},J=function(t,n){void 0===t&&(t=!1);var r=s((0,e.useState)(t),2),o=r[0],i=r[1];return[o,(0,e.useMemo)(function(){var e=void 0===n?!t:n;return{toggle:function(){return i(function(n){return n===t?e:t})},set:function(e){return i(e)},setLeft:function(){return i(t)},setRight:function(){return i(e)}}},[])]};function Z(t){void 0===t&&(t=!1);var n=s(J(!!t),2),r=n[0],o=n[1],i=o.toggle,u=o.set;return[r,(0,e.useMemo)(function(){return{toggle:i,set:function(e){return u(!!e)},setTrue:function(){return u(!0)},setFalse:function(){return u(!1)}}},[])]}function Q(e,t){if(L)return e?f(e)?e():"current"in e?e.current:e:t}const ee=function(e){if(!e||!document.getRootNode)return document;var t,n=Array.isArray(e)?e:[e];return function(e){return e.every(function(e){var t=Q(e);return!!t&&t.getRootNode()instanceof ShadowRoot})}(n)&&(t=Q(n[0]))?t.getRootNode():document},te=function(t){return function(n,r,o){var i=(0,e.useRef)(!1),u=(0,e.useRef)([]),c=(0,e.useRef)([]),a=(0,e.useRef)(void 0);t(function(){var e,t=(Array.isArray(o)?o:[o]).map(function(e){return Q(e)});if(!i.current)return i.current=!0,u.current=t,c.current=r,void(a.current=n());t.length===u.current.length&&y(u.current,t)&&y(c.current,r)||(null===(e=a.current)||void 0===e||e.call(a),u.current=t,c.current=r,a.current=n())}),E(function(){var e;null===(e=a.current)||void 0===e||e.call(a),i.current=!1})}},ne=te(e.useEffect);function re(e,t,n){void 0===n&&(n="click");var r=w(e);ne(function(){var e=function(e){(Array.isArray(t)?t:[t]).some(function(t){var n=Q(t);return!n||n.contains(e.target)})||r.current(e)},o=ee(t),i=Array.isArray(n)?n:[n];return i.forEach(function(t){return o.addEventListener(t,e)}),function(){i.forEach(function(t){return o.removeEventListener(t,e)})}},Array.isArray(n)?n:[n],t)}const oe=function(t,n){void 0===n&&(n={});var r=null!=t?t:{},o=n.defaultValue,i=n.defaultValuePropName,u=void 0===i?"defaultValue":i,c=n.valuePropName,a=void 0===c?"value":c,d=n.trigger,v=void 0===d?"onChange":d,p=r[a],m=Object.prototype.hasOwnProperty.call(r,a),g=(0,e.useMemo)(function(){return m?p:Object.prototype.hasOwnProperty.call(r,u)?r[u]:o},[]),y=(0,e.useRef)(g);m&&(y.current=p);var b=B();return[y.current,h(function(e){for(var t=[],n=1;n0?Date.now()+r:void 0},[r]),l="leftTime"in t?a:o,f=s((0,e.useState)(function(){return le(l)}),2),d=f[0],h=f[1],p=w(c);(0,e.useEffect)(function(){if(l){h(le(l));var e=setInterval(function(){var t,n=le(l);h(n),0===n&&(clearInterval(e),null===(t=p.current)||void 0===t||t.call(p))},u);return function(){return clearInterval(e)}}h(0)},[l,u]);var m=(0,e.useMemo)(function(){return e=d,{days:Math.floor(e/864e5),hours:Math.floor(e/36e5)%24,minutes:Math.floor(e/6e4)%60,seconds:Math.floor(e/1e3)%60,milliseconds:Math.floor(e)%1e3};var e},[d]);return[d,m]};function de(e,t){void 0===t&&(t={});var n=t.min,r=t.max,o=e;return v(r)&&(o=Math.min(r,o)),v(n)&&(o=Math.max(n,o)),o}const ve=function(t,n){void 0===t&&(t=0),void 0===n&&(n={});var r=n.min,o=n.max,i=s((0,e.useState)(function(){return de(t,{min:r,max:o})}),2),u=i[0],c=i[1],a=function(e){c(function(t){return de(v(e)?e:e(t),{max:o,min:r})})};return[u,{inc:h(function(e){void 0===e&&(e=1),a(function(t){return t+e})}),dec:h(function(e){void 0===e&&(e=1),a(function(t){return t-e})}),set:h(function(e){a(e)}),reset:h(function(){a(t)})}]},he=function(t,n){var r,o=w(t),i=null!==(r=null==n?void 0:n.wait)&&void 0!==r?r:1e3,u=(0,e.useMemo)(function(){return k()(function(){for(var e=[],t=0;t0?e-1:t.length+e;return n>=t.length-1&&(n=t.length-1),n<0&&(n=0),n}(e,t);return{_current:t[n],_before:t.slice(0,n),_after:t.slice(n+1)}};function Ye(t,n){void 0===n&&(n=0);var r=s((0,e.useState)({present:t,past:[],future:[]}),2),o=r[0],i=r[1],u=o.present,c=o.past,a=o.future,f=(0,e.useRef)(t),d=function(e){var t=v(e)?e:Number(e);if(0!==t)return t>0?function(e){if(void 0===e&&(e=1),0!==a.length){var t=Ve(e,a),n=t._before,r=t._current,o=t._after;i({past:l(l(l([],s(c),!1),[u],!1),s(n),!1),present:r,future:o})}}(t):void function(e){if(void 0===e&&(e=-1),0!==c.length){var t=Ve(e,c),n=t._before,r=t._current,o=t._after;i({past:n,present:r,future:l(l(l([],s(o),!1),[u],!1),s(a),!1)})}}(t)};return{value:u,backLength:c.length,forwardLength:a.length,setValue:h(function(e){var t=l(l([],s(c),!1),[u],!1),r=v(n)?n:Number(n);r>0&&t.length>r&&t.splice(0,1),i({present:e,future:[],past:t})}),go:h(d),back:h(function(){d(-1)}),forward:h(function(){d(1)}),reset:h(function(){for(var e=[],t=0;t0?e[0]:f.current;f.current=n,i({present:n,future:[],past:[]})})}}const Be=function(e,t){var n=t||{},r=n.onEnter,o=n.onLeave,i=n.onChange,u=s(Z(!1),2),c=u[0],a=u[1],l=a.setTrue,f=a.setFalse;return _e("mouseenter",function(){null==r||r(),l(),null==i||i(!0)},{target:e}),_e("mouseleave",function(){null==o||o(),f(),null==i||i(!1)},{target:e}),c};var We=function(e){return e.scrollHeight||Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)};const qe=function(t,r){void 0===r&&(r={});var o=r.target,i=r.isNoMore,a=r.threshold,f=void 0===a?100:a,d=r.direction,v=void 0===d?"bottom":d,m=r.reloadDeps,g=void 0===m?[]:m,y=r.manual,b=r.onBefore,w=r.onSuccess,E=r.onError,S=r.onFinally,_=s((0,e.useState)(),2),O=_[0],T=_[1],M=s((0,e.useState)(!1),2),x=M[0],R=M[1],k="top"===v,D=(0,e.useRef)(void 0),A=(0,e.useRef)(0),L=(0,e.useMemo)(function(){return!!i&&i(O)},[O]),C=U(function(e){return u(void 0,void 0,void 0,function(){return c(this,function(n){switch(n.label){case 0:return[4,t(e)];case 1:return[2,{currentData:n.sent(),lastData:e}]}})})},{manual:y,onFinally:function(e,t,n){R(!1),null==S||S(null==t?void 0:t.currentData,n)},onBefore:function(){return null==b?void 0:b()},onSuccess:function(e){var t,r,i;e.lastData?T(n(n({},e.currentData),{list:k?l(l([],s(e.currentData.list),!1),s(null!==(r=e.lastData.list)&&void 0!==r?r:[]),!1):l(l([],s(null!==(i=e.lastData.list)&&void 0!==i?i:[]),!1),s(e.currentData.list),!1)})):T(n(n({},e.currentData),{list:l([],s(null!==(t=e.currentData.list)&&void 0!==t?t:[]),!1)})),setTimeout(function(){if(k){var e=Q(o);if(e=e===document?document.documentElement:e){var t=We(e);e.scrollTo(0,t-A.current)}}else V()}),null==w||w(e.currentData)},onError:function(e){return null==E?void 0:E(e)}}),I=C.loading,F=C.error,N=C.run,j=C.runAsync,P=C.cancel,$=h(function(){L||(R(!0),N(O))}),z=function(e){return u(void 0,void 0,void 0,function(){return c(this,function(t){switch(t.label){case 0:return[4,j(e)];case 1:return[2,t.sent().currentData]}})})},H=h(function(){return L?Promise.reject():(R(!0),z(O))}),V=function(){var e=Q(o);if(e){var t=e===document?document.documentElement:e,n=function(e){return e===document||e===document.documentElement||e===document.body?Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop):e.scrollTop}(t),r=We(t),i=function(e){return e.clientHeight||Math.max(document.documentElement.clientHeight,document.body.clientHeight)}(t);k?(void 0!==D.current&&D.current>n&&n<=f&&$(),D.current=n,A.current=r-n):r-n<=i+f&&$()}};return _e("scroll",function(){I||x||V()},{target:o}),p(function(){N()},l([],s(g),!1)),{data:O,loading:!x&&I,error:F,loadingMore:x,noMore:L,loadMore:$,loadMoreAsync:H,reload:h(function(){return R(!1),N()}),reloadAsync:h(function(){return R(!1),z()}),mutate:T,cancel:P}},Ue=function(t,n,r){void 0===r&&(r={});var o=h(t),i=(0,e.useRef)(null),u=(0,e.useCallback)(function(){i.current&&clearInterval(i.current)},[]);return(0,e.useEffect)(function(){if(v(n)&&!(n<0))return r.immediate&&o(),i.current=setInterval(o,n),u},[n,r.immediate]),u};r(735);const Xe=function(t,r){var o=r||{},u=o.callback,c=i(o,["callback"]),l=s((0,e.useState)(),2),f=l[0],d=l[1],v=s((0,e.useState)(),2),h=v[0],p=v[1];return ne(function(){var e=(Array.isArray(t)?t:[t]).map(function(e){return Q(e)}).filter(Boolean);if(e.length){var o=new IntersectionObserver(function(e){var t,n;try{for(var r=a(e),o=r.next();!o.done;o=r.next()){var i=o.value;p(i.intersectionRatio),d(i.isIntersecting),null==u||u(i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},n(n({},c),{root:Q(null==r?void 0:r.root)}));return e.forEach(function(e){return o.observe(e)}),function(){o.disconnect()}}},[null==r?void 0:r.rootMargin,null==r?void 0:r.threshold,u],t),[f,h]},Ge=L?e.useLayoutEffect:e.useEffect,Ke=function(t,n,r){var o=(0,e.useRef)(void 0),i=(0,e.useRef)(0);be(n,o.current)||(i.current+=1),o.current=n,ne(t,[i.current],r)};var Je={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:/(mac|iphone|ipod|ipad)/i.test("undefined"!=typeof navigator?null===navigator||void 0===navigator?void 0:navigator.platform:"")?[91,93]:[91,92],selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},Ze={ctrl:function(e){return e.ctrlKey},shift:function(e){return e.shiftKey},alt:function(e){return e.altKey},meta:function(e){return"keyup"===e.type?Je.meta.includes(e.keyCode):e.metaKey}};function Qe(e){return d(e)||v(e)}function et(e,t,n){var r,o;if(!e.key)return!1;if(v(t))return e.keyCode===t&&t;var i=t.split("."),u=0;try{for(var c=a(i),s=c.next();!s.done;s=c.next()){var l=s.value,f=Ze[l],d=Je[l.toLowerCase()];(f&&f(e)||d&&d===e.keyCode)&&u++}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}return n?u===i.length&&function(e){var t=Object.keys(Ze).reduce(function(t,n){return Ze[n](e)?t+1:t},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}(e)===i.length&&t:u===i.length&&t}var tt=["keydown"];const nt=function(e,t,n){var r=n||{},o=r.events,i=void 0===o?tt:o,u=r.target,c=r.exactMatch,s=void 0!==c&&c,l=r.useCapture,d=void 0!==l&&l,v=w(t),h=w(e);Ke(function(){var e,t,n,r=Q(u,window);if(r){var o=function(e){var t,n=e,r=function(e,t){return f(e)?e:Qe(e)?function(n){return et(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(e){return et(n,e,t)})}:function(){return Boolean(e)}}(h.current,s),o=r(n),i=Qe(o)?o:n.key;if(o)return null===(t=v.current)||void 0===t?void 0:t.call(v,n,i)};try{for(var c=a(i),l=c.next();!l.done;l=c.next()){var p=l.value;null===(n=null==r?void 0:r.addEventListener)||void 0===n||n.call(r,p,o,d)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}return function(){var e,t,n;try{for(var u=a(i),c=u.next();!c.done;c=u.next()){var s=c.value;null===(n=null==r?void 0:r.removeEventListener)||void 0===n||n.call(r,s,o,d)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}}}},[i],u)};var rt="AHOOKS_SYNC_STORAGE_EVENT_NAME";function ot(t){return function(n,r){var o;void 0===r&&(r={});var i=r.listenStorageChange,u=void 0!==i&&i,c=r.onError,a=void 0===c?function(e){console.error(e)}:c;try{o=t()}catch(e){a(e)}function l(){try{var e=null==o?void 0:o.getItem(n);if(e)return t=e,r.deserializer?r.deserializer(t):JSON.parse(t)}catch(e){a(e)}var t;return f(r.defaultValue)?r.defaultValue():r.defaultValue}var d=s((0,e.useState)(l),2),v=d[0],m=d[1];p(function(){m(l())},[n]);var g=function(e){e.key===n&&e.storageArea===o&&m(l())};return _e("storage",g,{enable:u}),_e(rt,function(e){g(e.detail)},{enable:u}),[v,h(function(e){var t=f(e)?e(v):e;u||m(t);try{var i=void 0,c=null==o?void 0:o.getItem(n);!function(e){return void 0===e}(t)?(i=function(e){return r.serializer?r.serializer(e):JSON.stringify(e)}(t),null==o||o.setItem(n,i)):(i=null,null==o||o.removeItem(n)),dispatchEvent(new CustomEvent(rt,{detail:{key:n,newValue:i,oldValue:c,storageArea:o}}))}catch(e){a(e)}})]}}const it=ot(function(){return L?localStorage:void 0}),ut=function(t){var n=this,r=(0,e.useRef)(!1);return(0,e.useCallback)(function(){for(var e=[],o=0;o0||(null==c?void 0:c.y)&&c.y>0);ne(function(){var e=Q(n);if(null==e?void 0:e.addEventListener){var t=function(e){v.current=setTimeout(function(){l.current(e),h.current=!0},u)},r=function(e){if(!g.current){if(g.current=!0,y){var n=w(e),r=n.clientX,o=n.clientY;p.current.x=r,p.current.y=o}t(e)}},o=function(e){var n;(null===(n=null==e?void 0:e.sourceCapabilities)||void 0===n?void 0:n.firesTouchEvents)||(m.current=!0,y&&(p.current.x=e.clientX,p.current.y=e.clientY),t(e))},i=function(e){v.current&&function(e){var t=w(e),n=t.clientX,r=t.clientY,o=Math.abs(n-p.current.x),i=Math.abs(r-p.current.y);return!!((null==c?void 0:c.x)&&o>c.x||(null==c?void 0:c.y)&&i>c.y)}(e)&&(clearTimeout(v.current),v.current=void 0)},a=function(e){var t;g.current&&(g.current=!1,v.current&&(clearTimeout(v.current),v.current=void 0),h.current?null===(t=d.current)||void 0===t||t.call(d,e):f.current&&f.current(e),h.current=!1)},s=function(e){var t,n;(null===(t=null==e?void 0:e.sourceCapabilities)||void 0===t?void 0:t.firesTouchEvents)||m.current&&(m.current=!1,v.current&&(clearTimeout(v.current),v.current=void 0),h.current?null===(n=d.current)||void 0===n||n.call(d,e):f.current&&f.current(e),h.current=!1)},b=function(e){var t;m.current&&(m.current=!1,v.current&&(clearTimeout(v.current),v.current=void 0),h.current&&(null===(t=d.current)||void 0===t||t.call(d,e),h.current=!1))};return e.addEventListener("mousedown",o),e.addEventListener("mouseup",s),e.addEventListener("mouseleave",b),e.addEventListener("touchstart",r),e.addEventListener("touchend",a),y&&(e.addEventListener("mousemove",i),e.addEventListener("touchmove",i)),function(){v.current&&(clearTimeout(v.current),h.current=!1),e.removeEventListener("mousedown",o),e.removeEventListener("mouseup",s),e.removeEventListener("mouseleave",b),e.removeEventListener("touchstart",r),e.removeEventListener("touchend",a),y&&(e.removeEventListener("mousemove",i),e.removeEventListener("touchmove",i))}}function w(e){return"TouchEvent"in window&&e instanceof TouchEvent?{clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}:e instanceof MouseEvent?{clientX:e.clientX,clientY:e.clientY}:{clientX:0,clientY:0}}},[],n)},at=function(t){var n=function(){return new Map(t)},r=s((0,e.useState)(n),2),o=r[0],i=r[1];return[o,{set:h(function(e,t){i(function(n){var r=new Map(n);return r.set(e,t),r})}),setAll:h(function(e){i(new Map(e))}),remove:h(function(e){i(function(t){var n=new Map(t);return n.delete(e),n})}),reset:h(function(){return i(n())}),get:h(function(e){return o.get(e)})}]},st=function(t){var n=(0,e.useRef)(0),r=s((0,e.useState)(t),2),o=r[0],i=r[1],u=(0,e.useCallback)(function(e){cancelAnimationFrame(n.current),n.current=requestAnimationFrame(function(){i(e)})},[]);return E(function(){cancelAnimationFrame(n.current)}),[o,u]};var lt={screenX:NaN,screenY:NaN,clientX:NaN,clientY:NaN,pageX:NaN,pageY:NaN,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN};const ft=function(e){var t=s(st(lt),2),n=t[0],r=t[1];return _e("mousemove",function(t){var n=t.screenX,o=t.screenY,i=t.clientX,u=t.clientY,c=t.pageX,a=t.pageY,s={screenX:n,screenY:o,clientX:i,clientY:u,pageX:c,pageY:a,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},l=Q(e);if(l){var f=l.getBoundingClientRect(),d=f.left,v=f.top,h=f.width,p=f.height;s.elementPosX=d+window.pageXOffset,s.elementPosY=v+window.pageYOffset,s.elementX=c-s.elementPosX,s.elementY=a-s.elementPosY,s.elementW=h,s.elementH=p}r(s)},{target:function(){return document}}),n};var dt;function vt(){var e,t=navigator;return null===(e=t)||"object"!=typeof e?null:t.connection||t.mozConnection||t.webkitConnection}function ht(){var e=vt();return e?{rtt:e.rtt,type:e.type,saveData:e.saveData,downlink:e.downlink,downlinkMax:e.downlinkMax,effectiveType:e.effectiveType}:{}}!function(e){e.ONLINE="online",e.OFFLINE="offline",e.CHANGE="change"}(dt||(dt={}));const pt=function(){var t=s((0,e.useState)(function(){return n({since:void 0,online:null===navigator||void 0===navigator?void 0:navigator.onLine},ht())}),2),r=t[0],o=t[1];return(0,e.useEffect)(function(){var e=function(){o(function(e){return n(n({},e),{online:!0,since:new Date})})},t=function(){o(function(e){return n(n({},e),{online:!1,since:new Date})})},r=function(){o(function(e){return n(n({},e),ht())})};window.addEventListener(dt.ONLINE,e),window.addEventListener(dt.OFFLINE,t);var i=vt();return null==i||i.addEventListener(dt.CHANGE,r),function(){window.removeEventListener(dt.ONLINE,e),window.removeEventListener(dt.OFFLINE,t),null==i||i.removeEventListener(dt.CHANGE,r)}},[]),r};var mt=function(e,t){return!Object.is(e,t)};const gt=function(t,n){void 0===n&&(n=mt);var r=(0,e.useRef)(void 0),o=(0,e.useRef)(void 0);return n(o.current,t)&&(r.current=o.current,o.current=t),r.current};const yt=function(t,n,r){var o=null==r?void 0:r.immediate,i=w(t),u=(0,e.useRef)(void 0),c=(0,e.useCallback)(function(){u.current&&function(e){if(e.id,"undefined"==typeof cancelAnimationFrame)return clearInterval(e.id);cancelAnimationFrame(e.id)}(u.current)},[]);return(0,e.useEffect)(function(){if(v(n)&&!(n<0))return o&&i.current(),u.current=function(e,t){if(void 0===t&&(t=0),"undefined"==typeof requestAnimationFrame)return{id:setInterval(e,t)};var n=Date.now(),r={id:0},o=function(){Date.now()-n>=t&&(e(),n=Date.now()),r.id=requestAnimationFrame(o)};return r.id=requestAnimationFrame(o),r}(function(){i.current()},n),c},[n]),c};const bt=function(t,n){var r=w(t),o=(0,e.useRef)(void 0),i=(0,e.useCallback)(function(){o.current&&function(e){if(e.id,"undefined"==typeof cancelAnimationFrame)return clearTimeout(e.id);cancelAnimationFrame(e.id)}(o.current)},[]);return(0,e.useEffect)(function(){if(v(n)&&!(n<0))return o.current=function(e,t){if(void 0===t&&(t=0),"undefined"==typeof requestAnimationFrame)return{id:setTimeout(e,t)};var n={id:0},r=Date.now(),o=function(){Date.now()-r>=t?e():n.id=requestAnimationFrame(o)};return n.id=requestAnimationFrame(o),n}(function(){r.current()},n),i},[n]),i};var wt=r(108),Et=r.n(wt),St=new WeakMap,_t=new WeakMap;function Ot(e,t){var n=St.get(e);if(n)return n;if(_t.has(e))return e;var r=new Proxy(e,{get:function(e,n,r){var o=Reflect.get(e,n,r),i=Reflect.getOwnPropertyDescriptor(e,n);return((null==i?void 0:i.configurable)||(null==i?void 0:i.writable))&&(Et()(o)||Array.isArray(o))?Ot(o,t):o},set:function(e,n,r){var o=Reflect.set(e,n,r);return t(),o},deleteProperty:function(e,n){var r=Reflect.deleteProperty(e,n);return t(),r}});return St.set(e,r),_t.set(r,e),r}const Tt=function(t){var n=B(),r=(0,e.useRef)(t);return b(function(){return Ot(r.current,function(){n()})},[])},Mt=function(t){var n=(0,e.useRef)(t),r=b(function(){return f(n.current)?n.current():n.current},[]),o=s((0,e.useState)(r),2),i=o[0],u=o[1],c=h(function(){u(r)});return[i,u,c]};var xt,Rt=new Set,kt={xs:0,sm:576,md:768,lg:992,xl:1200};function Dt(){var e,t,n=xt;if(Lt(),n!==xt)try{for(var r=a(Rt),o=r.next();!o.done;o=r.next())(0,o.value)()}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}}var At=!1;function Lt(){var e,t,n=window.innerWidth,r={},o=!1;try{for(var i=a(Object.keys(kt)),u=i.next();!u.done;u=i.next()){var c=u.value;r[c]=n>=kt[c],r[c]!==xt[c]&&(o=!0)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}o&&(xt=r)}function Ct(e){kt=e,xt&&Lt()}const It=function(){L&&!At&&(xt={},Lt(),window.addEventListener("resize",Dt),At=!0);var t=s((0,e.useState)(xt),2),n=t[0],r=t[1];return(0,e.useEffect)(function(){if(L){At||window.addEventListener("resize",Dt);var e=function(){r(xt)};return Rt.add(e),function(){Rt.delete(e),0===Rt.size&&(window.removeEventListener("resize",Dt),At=!1)}}},[]),n},Ft=function(){var t=(0,e.useRef)(!1);return(0,e.useEffect)(function(){return t.current=!1,function(){t.current=!0}},[]),t},Nt=function(t){var n=Ft(),r=s((0,e.useState)(t),2),o=r[0],i=r[1];return[o,(0,e.useCallback)(function(e){n.current||i(e)},[])]},jt=function(e,t){void 0===t&&(t=function(){return!0});var n=s(st(),2),r=n[0],o=n[1],i=w(t);return ne(function(){var t=Q(e,document);if(t){var n=function(){var e;e=t===document?document.scrollingElement?{left:document.scrollingElement.scrollLeft,top:document.scrollingElement.scrollTop}:{left:Math.max(window.pageXOffset,document.documentElement.scrollLeft,document.body.scrollLeft),top:Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop)}:{left:t.scrollLeft,top:t.scrollTop},i.current(e)&&o(e)};return n(),t.addEventListener("scroll",n),function(){t.removeEventListener("scroll",n)}}},[],e),r},Pt=function(t,n){var r,o,i,u=[];Array.isArray(n)?u=n:Et()(n)&&(u=null!==(r=null==n?void 0:n.defaultSelected)&&void 0!==r?r:u,i=null!==(o=null==n?void 0:n.itemKey)&&void 0!==o?o:i);var c=function(e){return f(i)?i(e):d(i)&&Et()(e)?e[i]:e},a=s((0,e.useState)(u),2),l=a[0],v=a[1],p=(0,e.useMemo)(function(){var e=new Map;return Array.isArray(l)?(l.forEach(function(t){e.set(c(t),t)}),e):e},[l]),m=function(e){return p.has(c(e))},g=function(e){p.set(c(e),e),v(Array.from(p.values()))},y=function(e){p.delete(c(e)),v(Array.from(p.values()))},b=function(){t.forEach(function(e){p.set(c(e),e)}),v(Array.from(p.values()))},w=function(){t.forEach(function(e){p.delete(c(e))}),v(Array.from(p.values()))},E=(0,e.useMemo)(function(){return t.every(function(e){return!p.has(c(e))})},[t,p]),S=(0,e.useMemo)(function(){return t.every(function(e){return p.has(c(e))})&&!E},[t,p,E]),_=(0,e.useMemo)(function(){return!E&&!S},[E,S]);return{selected:l,noneSelected:E,allSelected:S,partiallySelected:_,setSelected:v,isSelected:m,select:h(g),unSelect:h(y),toggle:h(function(e){m(e)?y(e):g(e)}),selectAll:h(b),unSelectAll:h(w),clearAll:h(function(){p.clear(),v([])}),toggleAll:h(function(){return S?w():b()})}},$t=ot(function(){return L?sessionStorage:void 0}),zt=function(t){var n=function(){return new Set(t)},r=s((0,e.useState)(n),2),o=r[0],i=r[1],u=function(e){i(function(t){return e(new Set(t))})};return[o,{add:h(function(e){o.has(e)||u(function(t){return t.add(e),t})}),remove:h(function(e){o.has(e)&&u(function(t){return t.delete(e),t})}),reset:h(function(){return i(n())})}]},Ht=function(t){var r=s((0,e.useState)(t),2),o=r[0],i=r[1];return[o,h(function(e){i(function(t){var r=f(e)?e(t):e;return r?n(n({},t),r):t})})]};var Vt=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!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),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,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,r=this.__entries__;n0},e.prototype.connect_=function(){Yt&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Ut?(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(){Yt&&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;qt.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}(),Gt=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),cn="undefined"!=typeof WeakMap?new WeakMap:new Vt,an=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=Xt.getInstance(),r=new un(t,n,this);cn.set(this,r)};["observe","unobserve","disconnect"].forEach(function(e){an.prototype[e]=function(){var t;return(t=cn.get(this))[e].apply(t,arguments)}});const sn=void 0!==Bt.ResizeObserver?Bt.ResizeObserver:an;var ln=te(e.useLayoutEffect);const fn=L?ln:ne,dn=function(e){var t=s(st(function(){var t=Q(e);return t?{width:t.clientWidth,height:t.clientHeight}:void 0}),2),n=t[0],r=t[1];return fn(function(){var t=Q(e);if(t){var n=new sn(function(e){e.forEach(function(e){var t=e.target,n=t.clientWidth,o=t.clientHeight;r({width:n,height:o})})});return n.observe(t),function(){n.disconnect()}}},[],e),n};var vn={top:NaN,left:NaN,bottom:NaN,right:NaN,height:NaN,width:NaN},hn=n({text:""},vn);const pn=function(t){var r=s((0,e.useState)(hn),2),o=r[0],i=r[1],u=(0,e.useRef)(o),c=(0,e.useRef)(!1);return u.current=o,ne(function(){var e=Q(t,document);if(e){var r=function(){var e,t=null,r=vn;window.getSelection&&(e=(t=window.getSelection())?t.toString():"")&&c.current&&(r=function(e){if(!e)return vn;if(e.rangeCount<1)return vn;var t=e.getRangeAt(0).getBoundingClientRect();return{height:t.height,width:t.width,top:t.top,left:t.left,right:t.right,bottom:t.bottom}}(t),i(n(n(n({},o),{text:e}),r)))},a=function(t){if(2!==t.button&&window.getSelection){u.current.text&&i(n({},hn)),c.current=!1;var r=window.getSelection();r&&(r.removeAllRanges(),c.current=e.contains(t.target))}};return e.addEventListener("mouseup",r),document.addEventListener("mousedown",a),function(){e.removeEventListener("mouseup",r),document.removeEventListener("mousedown",a)}}},[],t),o},mn=function(t,n){var r,o=w(t),i=null!==(r=null==n?void 0:n.wait)&&void 0!==r?r:1e3,u=(0,e.useMemo)(function(){return H()(function(){for(var e=[],t=0;t=0}):o?o.map(function(e,t){return t}):[]),u=r.current;return r.current=n,t(i,u,n)},n)},_n=t(e.useLayoutEffect),On=function(t,n){var r=n.containerTarget,o=n.wrapperTarget,i=n.itemHeight,u=n.overscan,c=void 0===u?5:u,a=w(i),l=dn(r),f=(0,e.useRef)(!1),d=s((0,e.useState)([]),2),m=d[0],g=d[1],y=s((0,e.useState)({}),2),b=y[0],E=y[1],S=function(e){return v(a.current)?e*a.current:t.slice(0,e).reduce(function(e,n,r){return e+a.current(r,t[r])},0)},_=(0,e.useMemo)(function(){return v(a.current)?t.length*a.current:t.reduce(function(e,n,r){return e+a.current(r,t[r])},0)},[t]),O=function(){var e=Q(r);if(e){var n=e.scrollTop,o=e.clientHeight,i=function(e){if(v(a.current))return Math.floor(e/a.current);for(var n=0,r=0,o=0;o=e){r=o;break}return r+1}(n),u=function(e,n){if(v(a.current))return Math.ceil(e/a.current);for(var r=0,o=0,i=n;i=e));i++);return o-n}(o,i),s=Math.max(0,i-c),l=Math.min(t.length,i+u+c),f=S(s);E({height:_-f+"px",marginTop:f+"px"}),g(t.slice(s,l).map(function(e,t){return{data:e,index:t+s}}))}};return p(function(){var e=Q(o);e&&Object.keys(b).forEach(function(t){return e.style[t]=b[t]})},[b]),(0,e.useEffect)(function(){(null==l?void 0:l.width)&&(null==l?void 0:l.height)&&O()},[null==l?void 0:l.width,null==l?void 0:l.height,t]),_e("scroll",function(e){f.current?f.current=!1:(e.preventDefault(),O())},{target:r}),[m,h(function(e){var t=Q(r);t&&(f.current=!0,t.scrollTop=S(e),O())})]};var Tn;!function(e){e[e.Connecting=0]="Connecting",e[e.Open=1]="Open",e[e.Closing=2]="Closing",e[e.Closed=3]="Closed"}(Tn||(Tn={}));const Mn=function(t,n){void 0===n&&(n={});var r=n.reconnectLimit,o=void 0===r?3:r,i=n.reconnectInterval,u=void 0===i?3e3:i,c=n.manual,a=void 0!==c&&c,l=n.onOpen,f=n.onClose,d=n.onMessage,v=n.onError,p=n.protocols,m=s((0,e.useState)(),2),g=m[0],y=m[1],b=s((0,e.useState)(Tn.Closed),2),S=b[0],_=b[1],O=w(l),T=w(f),M=w(d),x=w(v),R=w(S),k=(0,e.useRef)(0),D=(0,e.useRef)(void 0),A=(0,e.useRef)(void 0),L=function(){var e;k.current