@arcgis/map-components
Version:
ArcGIS Map Components
3 lines (2 loc) • 2.69 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
function K(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var p=K;var _=typeof global=="object"&&global&&global.Object===Object&&global,w=_;var $=typeof self=="object"&&self&&self.Object===Object&&self,V=w||$||Function("return this")(),y=V;var X=function(){return y.Date.now()},b=X;var H=/\s/;function J(e){for(var t=e.length;t--&&H.test(e.charAt(t)););return t}var E=J;var Q=/^\s+/;function Y(e){return e&&e.slice(0,E(e)+1).replace(Q,"")}var R=Y;var Z=y.Symbol,m=Z;var A=Object.prototype,ee=A.hasOwnProperty,te=A.toString,g=m?m.toStringTag:void 0;function re(e){var t=ee.call(e,g),a=e[g];try{e[g]=void 0;var o=!0}catch{}var s=te.call(e);return o&&(t?e[g]=a:delete e[g]),s}var L=re;var ae=Object.prototype,oe=ae.toString;function fe(e){return oe.call(e)}var N=fe;var se="[object Null]",le="[object Undefined]",C=m?m.toStringTag:void 0;function ue(e){return e==null?e===void 0?le:se:C&&C in Object(e)?L(e):N(e)}var P=ue;function pe(e){return e!=null&&typeof e=="object"}var M=pe;var de="[object Symbol]";function me(e){return typeof e=="symbol"||M(e)&&P(e)==de}var z=me;var D=NaN,xe=/^[-+]0x[0-9a-f]+$/i,ie=/^0b[01]+$/i,ne=/^0o[0-7]+$/i,ce=parseInt;function ge(e){if(typeof e=="number")return e;if(z(e))return D;if(p(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=p(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=R(e);var a=ie.test(e);return a||ne.test(e)?ce(e.slice(2),a?2:8):xe.test(e)?D:+e}var v=ge;var he="Expected a function",ye=Math.max,be=Math.min;function Oe(e,t,a){var o,s,x,d,f,u,i=0,j=!1,n=!1,O=!0;if(typeof e!="function")throw new TypeError(he);t=v(t)||0,p(a)&&(j=!!a.leading,n="maxWait"in a,x=n?ye(v(a.maxWait)||0,t):x,O="trailing"in a?!!a.trailing:O);function I(r){var l=o,c=s;return o=s=void 0,i=r,d=e.apply(c,l),d}function F(r){return i=r,f=setTimeout(h,t),j?I(r):d}function q(r){var l=r-u,c=r-i,B=t-l;return n?be(B,x-c):B}function W(r){var l=r-u,c=r-i;return u===void 0||l>=t||l<0||n&&c>=x}function h(){var r=b();if(W(r))return k(r);f=setTimeout(h,q(r))}function k(r){return f=void 0,O&&o?I(r):(o=s=void 0,d)}function U(){f!==void 0&&clearTimeout(f),i=0,o=u=s=f=void 0}function G(){return f===void 0?d:k(b())}function T(){var r=b(),l=W(r);if(o=arguments,s=this,u=r,l){if(f===void 0)return F(u);if(n)return clearTimeout(f),f=setTimeout(h,t),I(u)}return f===void 0&&(f=setTimeout(h,t)),d}return T.cancel=U,T.flush=G,T}var S=Oe;var Ie="Expected a function";function Te(e,t,a){var o=!0,s=!0;if(typeof e!="function")throw new TypeError(Ie);return p(a)&&(o="leading"in a?!!a.leading:o,s="trailing"in a?!!a.trailing:s),S(e,t,{leading:o,maxWait:t,trailing:s})}var ve=Te;export{S as a,ve as b};