1 line
17 KiB
JavaScript
1 line
17 KiB
JavaScript
|
var FluentUIReactHooks;!function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{useAsync:function(){return l},useBoolean:function(){return d},useConst:function(){return f},useConstCallback:function(){return h},useControllableValue:function(){return v},useEventCallback:function(){return m},useForceUpdate:function(){return _},useId:function(){return F},useIsomorphicLayoutEffect:function(){return p},useMergedRefs:function(){return A},useMount:function(){return D},useMountSync:function(){return O},useOnEvent:function(){return P},usePrevious:function(){return j},useRefEffect:function(){return x},useSetInterval:function(){return q},useSetTimeout:function(){return M},useTarget:function(){return V},useUnmount:function(){return H},useWarnings:function(){return G}});var n={},r=void 0;try{r=window}catch(e){}function o(e,t){if(void 0!==r){var o=r.__packages__=r.__packages__||{};o[e]&&n[e]||(n[e]=t,(o[e]=o[e]||[]).push(t))}}function i(){return"undefined"!=typeof window&&!(!window.document||!window.document.createElement)}o("@fluentui/set-version","6.0.0"),o("@fluentui/react-hooks","8.8.16");var u=void 0;try{u=window}catch(e){}function s(e){if(i()&&void 0!==u){var t=e;return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:u}}var a=function(){function e(e,t){this._timeoutIds=null,this._immediateIds=null,this._intervalIds=null,this._animationFrameIds=null,this._isDisposed=!1,this._parent=e||null,this._onErrorHandler=t,this._noop=function(){}}return e.prototype.dispose=function(){var e;if(this._isDisposed=!0,this._parent=null,this._timeoutIds){for(e in this._timeoutIds)this._timeoutIds.hasOwnProperty(e)&&this.clearTimeout(parseInt(e,10));this._timeoutIds=null}if(this._immediateIds){for(e in this._immediateIds)this._immediateIds.hasOwnProperty(e)&&this.clearImmediate(parseInt(e,10));this._immediateIds=null}if(this._intervalIds){for(e in this._intervalIds)this._intervalIds.hasOwnProperty(e)&&this.clearInterval(parseInt(e,10));this._intervalIds=null}if(this._animationFrameIds){for(e in this._animationFrameIds)this._animationFrameIds.hasOwnProperty(e)&&this.cancelAnimationFrame(parseInt(e,10));this._animationFrameIds=null}},e.prototype.setTimeout=function(e,t){var n=this,r=0;return this._isDisposed||(this._timeoutIds||(this._timeoutIds={}),r=setTimeout((function(){try{n._timeoutIds&&delete n._timeoutIds[r],e.apply(n._parent)}catch(e){n._logError(e)}}),t),this._timeoutIds[r]=!0),r},e.prototype.clearTimeout=function(e){this._timeoutIds&&this._timeoutIds[e]&&(clearTimeout(e),delete this._timeoutIds[e])},e.prototype.setImmediate=function(e,t){var n=this,r=0,o=s(t);return this._isDisposed||(this._immediateIds||(this._immediateIds={}),r=o.setTimeout((function(){try{n._immediateIds&&delete n._immediateIds[r],e.apply(n._parent)}catch(e){n._logError(e)}}),0),this._immediateIds[r]=!0),r},e.prototype.clearImmediate=function(e,t){var n=s(t);this._immediateIds&&this._immediateIds[e]&&(n.clearTimeout(e),delete this._immediateIds[e])},e.prototype.setInterval=function(e,t){var n=this,r=0;return this._isDisposed||(this._intervalIds||(this._intervalIds={}),r=setInterval((function(){try{e.apply(n._parent)}catch(e){n._logError(e)}}),t),this._intervalIds[r]=!0),r},e.prototype.clearInterval=function(e){this._intervalIds&&this._intervalIds[e]&&(clearInterval(e),delete this._intervalIds[e])},e.prototype.throttle=function(e,t,n){var r=this;if(this._isDisposed)return this._noop;var o,i,u=t||0,s=!0,a=!0,c=0,l=null;n&&"boolean"==typeof n.leading&&(s=n.leading),n&&"boolean"==typeof n.trailing&&(a=n.trailing);var f=function(t){var n=Date.now(),d=n-c,h=s?u-d:u;return d>=u&&(!t||s)?(c=n,l&&(r.clearTimeout(l),l=null),o=e.apply(r._parent,i)):null===l&&a&&(l=r.setTimeout(f,h)),o};return function(){for(var e=[],t=0;
|