ht_hooks
Version:
ht React 业务 Hooks
22 lines • 73.2 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("React")):"function"==typeof define&&define.amd?define(["React"],e):"object"==typeof exports?exports.ht_hooks=e(require("React")):t.ht_hooks=e(t.React)}(this,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=13)}([function(e,n){e.exports=t},function(t,e,n){"use strict";var r=n(4),o="object"==typeof self&&self&&self.Object===Object&&self,i=r.a||o||Function("return this")();e.a=i},function(t,e,n){
/*!
* screenfull
* v5.2.0 - 2021-11-03
* (c) Sindre Sorhus; MIT License
*/
!function(){"use strict";var e="undefined"!=typeof window&&void 0!==window.document?window.document:{},n=t.exports,r=function(){for(var t,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<o;r++)if((t=n[r])&&t[1]in e){for(r=0;r<t.length;r++)i[n[0][r]]=t[r];return i}return!1}(),o={change:r.fullscreenchange,error:r.fullscreenerror},i={request:function(t,n){return new Promise(function(o,i){var u=function(){this.off("change",u),o()}.bind(this);this.on("change",u);var c=(t=t||e.documentElement)[r.requestFullscreen](n);c instanceof Promise&&c.then(u).catch(i)}.bind(this))},exit:function(){return new Promise(function(t,n){if(this.isFullscreen){var o=function(){this.off("change",o),t()}.bind(this);this.on("change",o);var i=e[r.exitFullscreen]();i instanceof Promise&&i.then(o).catch(n)}else t()}.bind(this))},toggle:function(t,e){return this.isFullscreen?this.exit():this.request(t,e)},onchange:function(t){this.on("change",t)},onerror:function(t){this.on("error",t)},on:function(t,n){var r=o[t];r&&e.addEventListener(r,n,!1)},off:function(t,n){var r=o[t];r&&e.removeEventListener(r,n,!1)},raw:r};r?(Object.defineProperties(i,{isFullscreen:{get:function(){return Boolean(e[r.fullscreenElement])}},element:{enumerable:!0,get:function(){return e[r.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(e[r.fullscreenEnabled])}}}),n?t.exports=i:window.screenfull=i):n?t.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()},function(t,e,n){"use strict";(function(t){var r=n(1),o=n(10),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,u=i&&"object"==typeof t&&t&&!t.nodeType&&t,c=u&&u.exports===i?r.a.Buffer:void 0,a=(c?c.isBuffer:void 0)||o.a;e.a=a}).call(this,n(9)(t))},function(t,e,n){"use strict";(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(this,n(8))},function(t,e,n){var r,o;
/*!
* JavaScript Cookie v2.2.1
* https://github.com/js-cookie/js-cookie
*
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
* Released under the MIT license
*/!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(e,n,e,t):r)||(t.exports=o),!0,t.exports=i(),!!0){var u=window.Cookies,c=window.Cookies=i();c.noConflict=function(){return window.Cookies=u,c}}}((function(){function t(){for(var t=0,e={};t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(e,n,i){if("undefined"!=typeof document){"number"==typeof(i=t({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var u=JSON.stringify(n);/^[\{\[]/.test(u)&&(n=u)}catch(t){}n=r.write?r.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var c="";for(var a in i)i[a]&&(c+="; "+a,!0!==i[a]&&(c+="="+i[a].split(";")[0]));return document.cookie=e+"="+n+c}}function u(t,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],u=0;u<i.length;u++){var c=i[u].split("="),a=c.slice(1).join("=");n||'"'!==a.charAt(0)||(a=a.slice(1,-1));try{var s=e(c[0]);if(a=(r.read||r)(a,s)||e(a),n)try{a=JSON.parse(a)}catch(t){}if(o[s]=a,t===s)break}catch(t){}}return t?o[t]:o}}return o.set=i,o.get=function(t){return u(t,!1)},o.getJSON=function(t){return u(t,!0)},o.remove=function(e,n){i(e,"",t(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},,function(t,e,n){"use strict";(function(t){var r=n(4),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,u=i&&i.exports===o&&r.a.process,c=function(){try{var t=i&&i.require&&i.require("util").types;return t||u&&u.binding&&u.binding("util")}catch(t){}}();e.a=c}).call(this,n(9)(t))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){"use strict";e.a=function(){return!1}},function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];t.call(e,o[1],o[0])}},e}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,o=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),i="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(o):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var u=["top","right","bottom","left","width","height","size","weight"],c="undefined"!=typeof MutationObserver,a=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,o=0;function u(){n&&(n=!1,t()),r&&a()}function c(){i(u)}function a(){var t=Date.now();if(n){if(t-o<2)return;r=!0}else n=!0,r=!1,setTimeout(c,e);o=t}return a}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),c?(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)},t.prototype.disconnect_=function(){r&&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)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;u.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),s=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];Object.defineProperty(t,o,{value:e[o],enumerable:!1,writable:!1,configurable:!0})}return t},f=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||o},l=m(0,0,0,0);function d(t){return parseFloat(t)||0}function v(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+d(t["border-"+n+"-width"])}),0)}function h(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return l;var r=f(t).getComputedStyle(t),o=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=t["padding-"+o];e[o]=d(i)}return e}(r),i=o.left+o.right,u=o.top+o.bottom,c=d(r.width),a=d(r.height);if("border-box"===r.boxSizing&&(Math.round(c+i)!==e&&(c-=v(r,"left","right")+i),Math.round(a+u)!==n&&(a-=v(r,"top","bottom")+u)),!function(t){return t===f(t).document.documentElement}(t)){var s=Math.round(c+i)-e,h=Math.round(a+u)-n;1!==Math.abs(s)&&(c-=s),1!==Math.abs(h)&&(a-=h)}return m(o.left,o.top,c,a)}var p="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof f(t).SVGGraphicsElement}:function(t){return t instanceof f(t).SVGElement&&"function"==typeof t.getBBox};function b(t){return r?p(t)?function(t){var e=t.getBBox();return m(0,0,e.width,e.height)}(t):h(t):l}function m(t,e,n,r){return{x:t,y:e,width:n,height:r}}var y=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=m(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=b(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),g=function(t,e){var n,r,o,i,u,c,a,f=(r=(n=e).x,o=n.y,i=n.width,u=n.height,c="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(c.prototype),s(a,{x:r,y:o,width:i,height:u,top:o,right:r+i,bottom:u+o,left:r}),a);s(this,{target:t,contentRect:f})},w=function(){function t(t,e,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=r}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof f(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new y(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof f(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new g(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),_="undefined"!=typeof WeakMap?new WeakMap:new n,O=function t(e){if(!(this instanceof t))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=a.getInstance(),r=new w(e,n,this);_.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){O.prototype[t]=function(){var e;return(e=_.get(this))[t].apply(e,arguments)}}));var j=void 0!==o.ResizeObserver?o.ResizeObserver:O;e.a=j}).call(this,n(8))},function(t,e){!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 t=function(t){for(var e=window.document,n=o(e);n;)n=o(e=n.ownerDocument);return e}(),e=[],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(t,n){r=t&&n?l(t,n):{top:0,bottom:0,left:0,right:0,width:0,height:0},e.forEach((function(t){t._checkForIntersections()}))}),n},u._resetCrossOriginUpdater=function(){n=null,r=null},u.prototype.observe=function(t){if(!this._observationTargets.some((function(e){return e.element==t}))){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(t.ownerDocument),this._checkForIntersections()}},u.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter((function(e){return e.element!=t})),this._unmonitorIntersections(t.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},u.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},u.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},u.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter((function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]}))},u.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map((function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}}));return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},u.prototype._monitorIntersections=function(e){var n=e.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(e)){var r=this._checkForIntersections,i=null,u=null;this.POLL_INTERVAL?i=n.setInterval(r,this.POLL_INTERVAL):(c(n,"resize",r,!0),c(e,"scroll",r,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(u=new n.MutationObserver(r)).observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(e),this._monitoringUnsubscribes.push((function(){var t=e.defaultView;t&&(i&&t.clearInterval(i),a(t,"resize",r,!0)),a(e,"scroll",r,!0),u&&u.disconnect()}));var s=this.root&&(this.root.ownerDocument||this.root)||t;if(e!=s){var f=o(e);f&&this._monitorIntersections(f.ownerDocument)}}},u.prototype._unmonitorIntersections=function(e){var n=this._monitoringDocuments.indexOf(e);if(-1!=n){var r=this.root&&(this.root.ownerDocument||this.root)||t;if(!this._observationTargets.some((function(t){var n=t.element.ownerDocument;if(n==e)return!0;for(;n&&n!=r;){var i=o(n);if((n=i&&i.ownerDocument)==e)return!0}return!1}))){var i=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),i(),e!=r){var u=o(e);u&&this._unmonitorIntersections(u.ownerDocument)}}}},u.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var e=0;e<t.length;e++)t[e]()},u.prototype._checkForIntersections=function(){if(this.root||!n||r){var t=this._rootIsInDom(),e=t?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach((function(r){var o=r.element,u=s(o),c=this._rootContainsTarget(o),a=r.entry,f=t&&c&&this._computeTargetAndRootIntersection(o,u,e),l=null;this._rootContainsTarget(o)?n&&!this.root||(l=e):l={top:0,bottom:0,left:0,right:0,width:0,height:0};var d=r.entry=new i({time:window.performance&&performance.now&&performance.now(),target:o,boundingClientRect:u,rootBounds:l,intersectionRect:f});a?t&&c?this._hasCrossedThreshold(a,d)&&this._queuedEntries.push(d):a&&a.isIntersecting&&this._queuedEntries.push(d):this._queuedEntries.push(d)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},u.prototype._computeTargetAndRootIntersection=function(e,o,i){if("none"!=window.getComputedStyle(e).display){for(var u,c,a,f,d,h,p,b,m=o,y=v(e),g=!1;!g&&y;){var w=null,_=1==y.nodeType?window.getComputedStyle(y):{};if("none"==_.display)return null;if(y==this.root||9==y.nodeType)if(g=!0,y==this.root||y==t)n&&!this.root?!r||0==r.width&&0==r.height?(y=null,w=null,m=null):w=r:w=i;else{var O=v(y),j=O&&s(O),E=O&&this._computeTargetAndRootIntersection(O,j,i);j&&E?(y=O,w=l(j,E)):(y=null,m=null)}else{var S=y.ownerDocument;y!=S.body&&y!=S.documentElement&&"visible"!=_.overflow&&(w=s(y))}if(w&&(u=w,c=m,a=void 0,f=void 0,d=void 0,h=void 0,p=void 0,b=void 0,a=Math.max(u.top,c.top),f=Math.min(u.bottom,c.bottom),d=Math.max(u.left,c.left),h=Math.min(u.right,c.right),b=f-a,m=(p=h-d)>=0&&b>=0&&{top:a,bottom:f,left:d,right:h,width:p,height:b}||null),!m)break;y=y&&v(y)}return m}},u.prototype._getRootRect=function(){var e;if(this.root&&!h(this.root))e=s(this.root);else{var n=h(this.root)?this.root:t,r=n.documentElement,o=n.body;e={top:0,left:0,right:r.clientWidth||o.clientWidth,width:r.clientWidth||o.clientWidth,bottom:r.clientHeight||o.clientHeight,height:r.clientHeight||o.clientHeight}}return this._expandRectByRootMargin(e)},u.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map((function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100})),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},u.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,r=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==r)for(var o=0;o<this.thresholds.length;o++){var i=this.thresholds[o];if(i==n||i==r||i<n!=i<r)return!0}},u.prototype._rootIsInDom=function(){return!this.root||d(t,this.root)},u.prototype._rootContainsTarget=function(e){var n=this.root&&(this.root.ownerDocument||this.root)||t;return d(n,e)&&(!this.root||n==e.ownerDocument)},u.prototype._registerInstance=function(){e.indexOf(this)<0&&e.push(this)},u.prototype._unregisterInstance=function(){var t=e.indexOf(this);-1!=t&&e.splice(t,1)},window.IntersectionObserver=u,window.IntersectionObserverEntry=i}function o(t){try{return t.defaultView&&t.defaultView.frameElement||null}catch(t){return null}}function i(t){this.time=t.time,this.target=t.target,this.rootBounds=f(t.rootBounds),this.boundingClientRect=f(t.boundingClientRect),this.intersectionRect=f(t.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,n=e.width*e.height,r=this.intersectionRect,o=r.width*r.height;this.intersectionRatio=n?Number((o/n).toFixed(4)):this.isIntersecting?1:0}function u(t,e){var n,r,o,i=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(i.root&&1!=i.root.nodeType&&9!=i.root.nodeType)throw new Error("root must be a Document or Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),r=this.THROTTLE_TIMEOUT,o=null,function(){o||(o=setTimeout((function(){n(),o=null}),r))}),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(i.rootMargin),this.thresholds=this._initThresholds(i.threshold),this.root=i.root||null,this.rootMargin=this._rootMarginValues.map((function(t){return t.value+t.unit})).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function c(t,e,n,r){"function"==typeof t.addEventListener?t.addEventListener(e,n,r||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,n)}function a(t,e,n,r){"function"==typeof t.removeEventListener?t.removeEventListener(e,n,r||!1):"function"==typeof t.detachEvent&&t.detachEvent("on"+e,n)}function s(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function f(t){return!t||"x"in t?t:{top:t.top,y:t.top,bottom:t.bottom,left:t.left,x:t.left,right:t.right,width:t.width,height:t.height}}function l(t,e){var n=e.top-t.top,r=e.left-t.left;return{top:n,left:r,height:e.height,width:e.width,bottom:n+e.height,right:r+e.width}}function d(t,e){for(var n=e;n;){if(n==t)return!0;n=v(n)}return!1}function v(e){var n=e.parentNode;return 9==e.nodeType&&e!=t?o(e):(n&&n.assignedSlot&&(n=n.assignedSlot.parentNode),n&&11==n.nodeType&&n.host?n.host:n)}function h(t){return t&&9===t.nodeType}}()},function(t,e,n){"use strict";n.r(e),n.d(e,"clearCache",(function(){return Gn})),n.d(e,"createUpdateEffect",(function(){return o})),n.d(e,"configResponsive",(function(){return xr})),n.d(e,"useBoolean",(function(){return v})),n.d(e,"useClickAway",(function(){return S})),n.d(e,"useCookieState",(function(){return A})),n.d(e,"useCreation",(function(){return L})),n.d(e,"useDebounce",(function(){return it})),n.d(e,"useDebounceFn",(function(){return ot})),n.d(e,"useDocumentVisibility",(function(){return at})),n.d(e,"useDrag",(function(){return ft})),n.d(e,"useDrop",(function(){return lt})),n.d(e,"useEventListener",(function(){return ut})),n.d(e,"useEventTarget",(function(){return dt})),n.d(e,"useFullscreen",(function(){return pt})),n.d(e,"useGetState",(function(){return bt})),n.d(e,"useHover",(function(){return mt})),n.d(e,"useInViewport",(function(){return yt})),n.d(e,"useKeyPress",(function(){return Dn})),n.d(e,"useLatest",(function(){return h})),n.d(e,"useLocalStorageState",(function(){return Nn})),n.d(e,"useLongPress",(function(){return Bn})),n.d(e,"useMap",(function(){return Un})),n.d(e,"useMemoizedFn",(function(){return T})),n.d(e,"useMouse",(function(){return Hn})),n.d(e,"useMount",(function(){return st})),n.d(e,"useMutationObserver",(function(){return qn})),n.d(e,"usePrevious",(function(){return Yn})),n.d(e,"useRafState",(function(){return Vn})),n.d(e,"useRequest",(function(){return gr})),n.d(e,"useResetState",(function(){return wr})),n.d(e,"useResponsive",(function(){return Rr})),n.d(e,"useSafeState",(function(){return Ar})),n.d(e,"useScroll",(function(){return Lr})),n.d(e,"useSessionStorageState",(function(){return kr})),n.d(e,"useSet",(function(){return Mr})),n.d(e,"useSetState",(function(){return Ir})),n.d(e,"useSize",(function(){return Fr})),n.d(e,"useThrottle",(function(){return zr})),n.d(e,"useThrottleFn",(function(){return Nr})),n.d(e,"useTitle",(function(){return Ur})),n.d(e,"useToggle",(function(){return d})),n.d(e,"useUnmount",(function(){return _})),n.d(e,"useUnmountedRef",(function(){return Tr})),n.d(e,"useUpdate",(function(){return pr})),n.d(e,"useUpdateEffect",(function(){return Cn}));var r=n(0),o=function(t){return function(e,n){var o=Object(r.useRef)(!1);t((function(){return function(){o.current=!1}}),[]),//!无依赖说明return只会在卸载时执行一次
t((function(){if(o.current)return e();o.current=!0}),n)}};var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function u(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function c(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{a(r.next(t))}catch(t){i(t)}}function c(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,c)}a((r=r.apply(t,e||[])).next())}))}function a(t,e){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=c(0),u.throw=c(1),u.return=c(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function c(c){return function(a){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;u&&(u=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}Object.create;function s(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function l(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}Object.create;"function"==typeof SuppressedError&&SuppressedError;var d=function(t,e){void 0===t&&(t=!1);var n=f(Object(r.useState)(t),2),o=n[0],i=n[1];return[o,Object(r.useMemo)((function(){var n=void 0===e?!t:e;return{toggle:function(){return i((function(e){return e===t?n:t}))},set:function(t){return i(t)},setLeft:function(){return i(t)},setRight:function(){return i(n)}}}),[])]};function v(t){void 0===t&&(t=!1);var e=f(d(!!t),2),n=e[0],o=e[1],i=o.toggle,u=o.set;return[n,Object(r.useMemo)((function(){return{toggle:i,set:function(t){return u(!!t)},setTrue:function(){return u(!0)},setFalse:function(){return u(!1)}}}),[])]}var h=function(t){var e=Object(r.useRef)(t);//!替代了useEffect中监听变化手动更新ref.current
return e.current=t,e},p=function(t){return"function"==typeof t},b=function(t){return"string"==typeof t},m=function(t){return"number"==typeof t},y=!("undefined"==typeof window||!window.document||!window.document.createElement);function g(t,e){if(y)return t?p(t)?t():"current"in t?t.current:t:e}var w=function(t){if(!t||!document.getRootNode)return document;var e,n=Array.isArray(t)?t:[t];return function(t){return t.every((function(t){var e=g(t);return!!e&&(e.getRootNode()instanceof ShadowRoot||void 0)}))}(n)&&(e=g(n[0]))?e.getRootNode():document},_=function(t){var e=h(t);//!使用useLatest保存fn,实时更新最新的fn,且能获取到最新的fn不落入闭包陷阱
Object(r.useEffect)((function(){return function(){e.current();//!调用useEffect实现卸载时执行
}}),[])};function O(t,e){if(t===e)return!0;for(var n=0;n<t.length;n++)if(!Object.is(t[n],e[n]))return!1;return!0}var j=function(t){return function(e,n,o){var i=Object(r.useRef)(!1),u=Object(r.useRef)([]),c=Object(r.useRef)([]),a=Object(r.useRef)();t((function(){var t,r=(Array.isArray(o)?o:[o]).map((function(t){return g(t)}));if(!i.current)return i.current=!0,u.current=r,c.current=n,void(a.current=e());r.length===u.current.length&&O(r,u.current)&&O(n,c.current)||(null===(t=a.current)||void 0===t||t.call(a),u.current=r,c.current=n,a.current=e())})),_((function(){var t;null===(t=a.current)||void 0===t||t.call(a),i.current=!1}))}},E=j(r.useEffect);function S(t,e,n){void 0===n&&(n="click");var r=h(t);E((function(){var t=function(t){(Array.isArray(e)?e:[e]).some((function(e){var n=g(e);return!n||n.contains(t.target)}))||r.current(t)},o=w(e),i=Array.isArray(n)?n:[n];return i.forEach((function(e){return o.addEventListener(e,t)})),function(){i.forEach((function(e){return o.removeEventListener(e,t)}))}}),Array.isArray(n)?n:[n],e)}var x=n(5),R=n.n(x);var T=function(t){var e=Object(r.useRef)(t);//!使用useRef在fnRef.current中保存参数函数,保持在组件的生命周期中,而不因渲染而重置且一直是最新的
e.current=Object(r.useMemo)((function(){return t}),[t]);//!只有参数函数变化时才更新fnRef.current,但只是更新内容,fnRef.current地址始终不变
var n=Object(r.useRef)();return n.current||(n.current=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.current.apply(this,t)}),n.current};var A=function(t,e){void 0===e&&(e={});var n=f(Object(r.useState)((function(){var n=R.a.get(t);return b(n)?n:p(e.defaultValue)?e.defaultValue():e.defaultValue})),2),o=n[0],c=n[1],a=T((function(n,r){void 0===r&&(r={});var a=i(i({},e),r),s=(a.defaultValue,u(a,["defaultValue"])),f=p(n)?n(o):n;c(f),void 0===f?R.a.remove(t):R.a.set(t,f,s)}));return[o,a]};function L(t,e){var n=Object(r.useRef)({deps:e,obj:void 0,initialized:!1}).current;return!1!==n.initialized&&O(n.deps,e)||(n.deps=e,n.obj=t(),n.initialized=!0),n.obj}var k=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},M=n(1),I=function(){return M.a.Date.now()},P=/\s/;var D=function(t){for(var e=t.length;e--&&P.test(t.charAt(e)););return e},C=/^\s+/;var F=function(t){return t?t.slice(0,D(t)+1).replace(C,""):t},N=M.a.Symbol,z=Object.prototype,B=z.hasOwnProperty,U=z.toString,q=N?N.toStringTag:void 0;var V=function(t){var e=B.call(t,q),n=t[q];try{t[q]=void 0;var r=!0}catch(t){}var o=U.call(t);return r&&(e?t[q]=n:delete t[q]),o},W=Object.prototype.toString;var H=function(t){return W.call(t)},X=N?N.toStringTag:void 0;var Y=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":X&&X in Object(t)?V(t):H(t)};var $=function(t){return null!=t&&"object"==typeof t};var G=function(t){return"symbol"==typeof t||$(t)&&"[object Symbol]"==Y(t)},J=/^[-+]0x[0-9a-f]+$/i,K=/^0b[01]+$/i,Z=/^0o[0-7]+$/i,Q=parseInt;var tt=function(t){if("number"==typeof t)return t;if(G(t))return NaN;if(k(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=k(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=F(t);var n=K.test(t);return n||Z.test(t)?Q(t.slice(2),n?2:8):J.test(t)?NaN:+t},et=Math.max,nt=Math.min;var rt=function(t,e,n){var r,o,i,u,c,a,s=0,f=!1,l=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function v(e){var n=r,i=o;return r=o=void 0,s=e,u=t.apply(i,n)}function h(t){return s=t,c=setTimeout(b,e),f?v(t):u}function p(t){var n=t-a;return void 0===a||n>=e||n<0||l&&t-s>=i}function b(){var t=I();if(p(t))return m(t);c=setTimeout(b,function(t){var n=e-(t-a);return l?nt(n,i-(t-s)):n}(t))}function m(t){return c=void 0,d&&r?v(t):(r=o=void 0,u)}function y(){var t=I(),n=p(t);if(r=arguments,o=this,a=t,n){if(void 0===c)return h(a);if(l)return clearTimeout(c),c=setTimeout(b,e),v(a)}return void 0===c&&(c=setTimeout(b,e)),u}return e=tt(e)||0,k(n)&&(f=!!n.leading,i=(l="maxWait"in n)?et(tt(n.maxWait)||0,e):i,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==c&&clearTimeout(c),s=0,r=a=o=c=void 0},y.flush=function(){return void 0===c?u:m(I())},y};var ot=function(t,e){var n,o=h(t),i=null!==(n=null==e?void 0:e.wait)&&void 0!==n?n:1e3,u=Object(r.useMemo)((function(){return rt((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o.current.apply(o,l([],f(t),!1))}),i,e)}),[]);return _((function(){u.cancel()})),{run:u,cancel:u.cancel,flush:u.flush}};var it=function(t,e){var n=f(Object(r.useState)(t),2),o=n[0],i=n[1],u=ot((function(){i(t)}),e).run;return Object(r.useEffect)((function(){u()}),[t]),o};
//!课上
var ut=function(t,e,n){void 0===n&&(n={});var r=h(e);E((function(){var e=g(n.target,window);if(null==e?void 0:e.addEventListener){var o=function(t){return r.current(t)};return e.addEventListener(t,o,{capture:n.capture,once:n.once,passive:n.passive}),function(){e.removeEventListener(t,o,{capture:n.capture})}}}),[t,n.capture,n.once,n.passive],n.target)},ct=function(){return y?document.visibilityState:"visible"};var at=function(){var t=f(Object(r.useState)((function(){return ct()})),2),e=t[0],n=t[1];return ut("visibilitychange",(function(){n(ct())}),{target:function(){return document}}),e},st=function(t){Object(r.useEffect)((function(){null==t||t()}),[])},ft=function(t,e,n){void 0===n&&(n={});var o=h(n),i=h(t),u=Object(r.useRef)(),c=o.current.dragImage;st((function(){if(null==c?void 0:c.image){var t=c.image;if(b(t)){var e=new Image;e.src=t,u.current=e}else u.current=t}})),E((function(){var t=g(e);if(null==t?void 0:t.addEventListener){var n=function(t){var e,n;if(null===(n=(e=o.current).onDragStart)||void 0===n||n.call(e,t),t.dataTransfer.setData("custom",JSON.stringify(i.current)),(null==c?void 0:c.image)&&u.current){var r=c.offsetX,a=void 0===r?0:r,s=c.offsetY,f=void 0===s?0:s;t.dataTransfer.setDragImage(u.current,a,f)}},r=function(t){var e,n;null===(n=(e=o.current).onDragEnd)||void 0===n||n.call(e,t)};return t.setAttribute("draggable","true"),t.addEventListener("dragstart",n),t.addEventListener("dragend",r),function(){t.removeEventListener("dragstart",n),t.removeEventListener("dragend",r)}}}),[],e)},lt=function(t,e){void 0===e&&(e={});var n=h(e),o=Object(r.useRef)();E((function(){var e=g(t);if(null==e?void 0:e.addEventListener){var r=function(t,e){var r=t.getData("text/uri-list"),o=t.getData("custom");if(o&&n.current.onDom){var i=o;try{i=JSON.parse(o)}catch(t){i=o}n.current.onDom(i,e)}else r&&n.current.onUri?n.current.onUri(r,e):t.files&&t.files.length&&n.current.onFiles?n.current.onFiles(Array.from(t.files),e):t.items&&t.items.length&&n.current.onText&&t.items[0].getAsString((function(t){n.current.onText(t,e)}))},i=function(t){var e,r;t.preventDefault(),t.stopPropagation(),o.current=t.target,null===(r=(e=n.current).onDragEnter)||void 0===r||r.call(e,t)},u=function(t){var e,r;t.preventDefault(),null===(r=(e=n.current).onDragOver)||void 0===r||r.call(e,t)},c=function(t){var e,r;t.target===o.current&&(null===(r=(e=n.current).onDragLeave)||void 0===r||r.call(e,t))},a=function(t){var e,o;t.preventDefault(),r(t.dataTransfer,t),null===(o=(e=n.current).onDrop)||void 0===o||o.call(e,t)},s=function(t){var e,o;r(t.clipboardData,t),null===(o=(e=n.current).onPaste)||void 0===o||o.call(e,t)};return e.addEventListener("dragenter",i),e.addEventListener("dragover",u),e.addEventListener("dragleave",c),e.addEventListener("drop",a),e.addEventListener("paste",s),function(){e.removeEventListener("dragenter",i),e.removeEventListener("dragover",u),e.removeEventListener("dragleave",c),e.removeEventListener("drop",a),e.removeEventListener("paste",s)}}}),[],t)};var dt=function(t){var e=t||{},n=e.initialValue,o=e.transformer,i=f(Object(r.useState)(n),2),u=i[0],c=i[1],a=h(o),s=Object(r.useCallback)((function(){return c(n)}),[]);return[u,{onChange:Object(r.useCallback)((function(t){var e=t.target.value;return p(a.current)?c(a.current(e)):c(e)}),[]),reset:s}]},vt=n(2),ht=n.n(vt),pt=function(t,e){var n=e||{},o=n.onExit,i=n.onEnter,u=n.pageFullscreen,c=void 0!==u&&u,a="boolean"!=typeof c&&c?c:{},s=a.className,l=void 0===s?"hooks-page-fullscreen":s,d=a.zIndex,v=void 0===d?999999:d,p=h(o),b=h(i),m=f(Object(r.useState)(O),2),y=m[0],w=m[1],_=Object(r.useRef)(O());function O(){return ht.a.isEnabled&&!!ht.a.element&&ht.a.element===g(t)}var j=function(t){_.current!==t&&(!function(t){var e,n;t?null===(e=b.current)||void 0===e||e.call(b):null===(n=p.current)||void 0===n||n.call(p)}(t),w(t),_.current=t)},E=function(){var t=O();j(t)},S=function(e){var n=g(t);if(n){var r=document.getElementById(l);e?(n.classList.add(l),r||((r=document.createElement("style")).setAttribute("id",l),r.textContent="\n .".concat(l," {\n position: fixed; left: 0; top: 0; right: 0; bottom: 0;\n width: 100% !important; height: 100% !important;\n z-index: ").concat(v,";\n }"),n.appendChild(r))):(n.classList.remove(l),r&&r.remove()),j(e)}},x=function(){var e=g(t);if(e)if(c)S(!0);else if(ht.a.isEnabled)try{ht.a.request(e)}catch(t){console.error(t)}},R=function(){var e=g(t);e&&(c?S(!1):ht.a.isEnabled&&ht.a.element===e&&ht.a.exit())};return Object(r.useEffect)((function(){if(ht.a.isEnabled&&!c)return ht.a.on("change",E),function(){ht.a.off("change",E)}}),[]),[y,{enterFullscreen:T(x),exitFullscreen:T(R),toggleFullscreen:T((function(){y?R():x()})),isEnabled:ht.a.isEnabled}]};var bt=function(t){var e=f(Object(r.useState)(t),2),n=e[0],o=e[1],i=Object(r.useRef)(n);return i.current=n,[n,o,Object(r.useCallback)((function(){return i.current}),[])]},mt=function(t,e){var n=e||{},r=n.onEnter,o=n.onLeave,i=n.onChange,u=f(v(!1),2),c=u[0],a=u[1],s=a.setTrue,l=a.setFalse;return ut("mouseenter",(function(){null==r||r(),s(),null==i||i(!0)}),{target:t}),ut("mouseleave",(function(){null==o||o(),l(),null==i||i(!1)}),{target:t}),c};n(12);var yt=function(t,e){var n=e||{},o=n.callback,c=u(n,["callback"]),a=f(Object(r.useState)(),2),l=a[0],d=a[1],v=f(Object(r.useState)(),2),h=v[0],p=v[1];return E((function(){var n=(Array.isArray(t)?t:[t]).map((function(t){return g(t)})).filter(Boolean);if(n.length){var r=new IntersectionObserver((function(t){var e,n;try{for(var r=s(t),i=r.next();!i.done;i=r.next()){var u=i.value;p(u.intersectionRatio),d(u.isIntersecting),null==o||o(u)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}),i(i({},c),{root:g(null==e?void 0:e.root)}));return n.forEach((function(t){t&&r.observe(t)})),function(){r.disconnect()}}}),[null==e?void 0:e.rootMargin,null==e?void 0:e.threshold,o],t),[l,h]};var gt=function(){this.__data__=[],this.size=0};var wt=function(t,e){return t===e||t!=t&&e!=e};var _t=function(t,e){for(var n=t.length;n--;)if(wt(t[n][0],e))return n;return-1},Ot=Array.prototype.splice;var jt=function(t){var e=this.__data__,n=_t(e,t);return!(n<0)&&(n==e.length-1?e.pop():Ot.call(e,n,1),--this.size,!0)};var Et=function(t){var e=this.__data__,n=_t(e,t);return n<0?void 0:e[n][1]};var St=function(t){return _t(this.__data__,t)>-1};var xt=function(t,e){var n=this.__data__,r=_t(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function Rt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Rt.prototype.clear=gt,Rt.prototype.delete=jt,Rt.prototype.get=Et,Rt.prototype.has=St,Rt.prototype.set=xt;var Tt=Rt;var At=function(){this.__data__=new Tt,this.size=0};var Lt=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};var kt=function(t){return this.__data__.get(t)};var Mt=function(t){return this.__data__.has(t)};var It,Pt=function(t){if(!k(t))return!1;var e=Y(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Dt=M.a["__core-js_shared__"],Ct=(It=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+It:"";var Ft=function(t){return!!Ct&&Ct in t},Nt=Function.prototype.toString;var zt=function(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Bt=/^\[object .+?Constructor\]$/,Ut=Function.prototype,qt=Object.prototype,Vt=Ut.toString,Wt=qt.hasOwnProperty,Ht=RegExp("^"+Vt.call(Wt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Xt=function(t){return!(!k(t)||Ft(t))&&(Pt(t)?Ht:Bt).test(zt(t))};var Yt=function(t,e){return null==t?void 0:t[e]};var $t=function(t,e){var n=Yt(t,e);return Xt(n)?n:void 0},Gt=$t(M.a,"Map"),Jt=$t(Object,"create");var Kt=function(){this.__data__=Jt?Jt(null):{},this.size=0};var Zt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Qt=Object.prototype.hasOwnProperty;var te=function(t){var e=this.__data__;if(Jt){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Qt.call(e,t)?e[t]:void 0},ee=Object.prototype.hasOwnProperty;var ne=function(t){var e=this.__data__;return Jt?void 0!==e[t]:ee.call(e,t)};var re=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Jt&&void 0===e?"__lodash_hash_undefined__":e,this};function oe(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}oe.prototype.clear=Kt,oe.prototype.delete=Zt,oe.prototype.get=te,oe.prototype.has=ne,oe.prototype.set=re;var ie=oe;var ue=function(){this.size=0,this.__data__={hash:new ie,map:new(Gt||Tt),string:new ie}};var ce=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var ae=function(t,e){var n=t.__data__;return ce(e)?n["string"==typeof e?"string":"hash"]:n.map};var se=function(t){var e=ae(this,t).delete(t);return this.size-=e?1:0,e};var fe=function(t){return ae(this,t).get(t)};var le=function(t){return ae(this,t).has(t)};var de=function(t,e){var n=ae(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function ve(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ve.prototype.clear=ue,ve.prototype.delete=se,ve.prototype.get=fe,ve.prototype.has=le,ve.prototype.set=de;var he=ve;var pe=function(t,e){var n=this.__data__;if(n instanceof Tt){var r=n.__data__;if(!Gt||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new he(r)}return n.set(t,e),this.size=n.size,this};function be(t){var e=this.__data__=new Tt(t);this.size=e.size}be.prototype.clear=At,be.prototype.delete=Lt,be.prototype.get=kt,be.prototype.has=Mt,be.prototype.set=pe;var me=be;var ye=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var ge=function(t){return this.__data__.has(t)};function we(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new he;++e<n;)this.add(t[e])}we.prototype.add=we.prototype.push=ye,we.prototype.has=ge;var _e=we;var Oe=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1};var je=function(t,e){return t.has(e)};var Ee=function(t,e,n,r,o,i){var u=1&n,c=t.length,a=e.length;if(c!=a&&!(u&&a>c))return!1;var s=i.get(t),f=i.get(e);if(s&&f)return s==e&&f==t;var l=-1,d=!0,v=2&n?new _e:void 0;for(i.set(t,e),i.set(e,t);++l<c;){var h=t[l],p=e[l];if(r)var b=u?r(p,h,l,e,t,i):r(h,p,l,t,e,i);if(void 0!==b){if(b)continue;d=!1;break}if(v){if(!Oe(e,(function(t,e){if(!je(v,e)&&(h===t||o(h,t,n,r,i)))return v.push(e)}))){d=!1;break}}else if(h!==p&&!o(h,p,n,r,i)){d=!1;break}}return i.delete(t),i.delete(e),d},Se=M.a.Uint8Array;var xe=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n};var Re=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},Te=N?N.prototype:void 0,Ae=Te?Te.valueOf:void 0;var Le=function(t,e,n,r,o,i,u){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new Se(t),new Se(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return wt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var c=xe;case"[object Set]":var a=1&r;if(c||(c=Re),t.size!=e.size&&!a)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var f=Ee(c(t),c(e),r,o,i,u);return u.delete(t),f;case"[object Symbol]":if(Ae)return Ae.call(t)==Ae.call(e)}return!1};var ke=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t},Me=Array.isArray;var Ie=function(t,e,n){var r=e(t);return Me(t)?r:ke(r,n(t))};var Pe=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i};var De=function(){return[]},Ce=Object.prototype.propertyIsEnumerable,Fe=Object.getOwnPropertySymbols,Ne=Fe?function(t){return null==t?[]:(t=Object(t),Pe(Fe(t),(function(e){return Ce.call(t,e)})))}:De;var ze=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r};var Be=function(t){return $(t)&&"[object Arguments]"==Y(t)},Ue=Object.prototype,qe=Ue.hasOwnProperty,Ve=Ue.propertyIsEnumerable,We=Be(function(){return arguments}())?Be:function(t){return $(t)&&qe.call(t,"callee")&&!Ve.call(t,"callee")},He=n(3),Xe=/^(?:0|[1-9]\d*)$/;var Ye=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Xe.test(t))&&t>-1&&t%1==0&&t<e};var $e=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Ge={};Ge["[object Float32Array]"]=Ge["[object Float64Array]"]=Ge["[object Int8Array]"]=Ge["[object Int16Array]"]=Ge["[object Int32Array]"]=Ge["[object Uint8Array]"]=Ge["[object Uint8ClampedArray]"]=Ge["[object Uint16Array]"]=Ge["[object Uint32Array]"]=!0,Ge["[object Arguments]"]=Ge["[object Array]"]=Ge["[object ArrayBuffer]"]=Ge["[object Boolean]"]=Ge["[object DataView]"]=Ge["[object Date]"]=Ge["[object Error]"]=Ge["[object Function]"]=Ge["[object Map]"]=Ge["[object Number]"]=Ge["[object Object]"]=Ge["[object RegExp]"]=Ge["[object Set]"]=Ge["[object String]"]=Ge["[object WeakMap]"]=!1;var Je=function(t){return $(t)&&$e(t.length)&&!!Ge[Y(t)]};var Ke=function(t){return function(e){return t(e)}},Ze=n(7),Qe=Ze.a&&Ze.a.isTypedArray,tn=Qe?Ke(Qe):Je,en=Object.prototype.hasOwnProperty;var nn=function(t,e){var n=Me(t),r=!n&&We(t),o=!n&&!r&&Object(He.a)(t),i=!n&&!r&&!o&&tn(t),u=n||r||o||i,c=u?ze(t.length,String):[],a=c.length;for(var s in t)!e&&!en.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Ye(s,a))||c.push(s);return c},rn=Object.prototype;var on=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||rn)};var un=function(t,e){return function(n){return t(e(n))}}(Object.keys,Object),cn=Object.prototype.hasOwnProperty;var an=function(t){if(!on(t))return un(t);var e=[];for(var n in Object(t))cn.call(t,n)&&"constructor"!=n&&e.push(n);return e};var sn=function(t){return null!=t&&$e(t.length)&&!Pt(t)};var fn=function(t){return sn(t)?nn(t):an(t)};var ln=function(t){return Ie(t,fn,Ne)},dn=Object.prototype.hasOwnProperty;var vn=function(t,e,n,r,o,i){var u=1&n,c=ln(t),a=c.length;if(a!=ln(e).length&&!u)return!1;for(var s=a;s--;){var f=c[s];if(!(u?f in e:dn.call(e,f)))return!1}var l=i.get(t),d=i.get(e);if(l&&d)return l==e&&d==t;var v=!0;i.set(t,e),i.set(e,t);for(var h=u;++s<a;){var p=t[f=c[s]],b=e[f];if(r)var m=u?r(b,p,f,e,t,i):r(p,b,f,t,e,i);if(!(void 0===m?p===b||o(p,b,n,r,i):m)){v=!1;break}h||(h="constructor"==f)}if(v&&!h){var y=t.constructor,g=e.constructor;y==g||!("constructor"in t)||!("constructor"in e)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(v=!1)}return i.delete(t),i.delete(e),v},hn=$t(M.a,"DataView"),pn=$t(M.a,"Promise"),bn=$t(M.a,"Set"),mn=$t(M.a,"WeakMap"),yn=zt(hn),gn=zt(Gt),wn=zt(pn),_n=zt(bn),On=zt(mn),jn=Y;(hn&&"[object DataView]"!=jn(new hn(new ArrayBuffer(1)))||Gt&&"[object Map]"!=jn(new Gt)||pn&&"[object Promise]"!=jn(pn.resolve())||bn&&"[object Set]"!=jn(new bn)||mn&&"[object WeakMap]"!=jn(new mn))&&(jn=function(t){var e=Y(t),n="[object Object]"==e?t.constructor:void 0,r=n?zt(n):"";if(r)switch(r){case yn:return"[object DataView]";case gn:return"[object Map]";case wn:return"[object Promise]";case _n:return"[object Set]";case On:return"[object WeakMap]"}return e});var En=jn,Sn=Object.prototype.hasOwnProperty;var xn=function(t,e,n,r,o,i){var u=Me(t),c=Me(e),a=u?"[object Array]":En(t),s=c?"[object Array]":En(e),f="[object Object]"==(a="[object Arguments]"==