UNPKG

react-rangeslider-withkeeptooltip

Version:

A lightweight react component that acts as a HTML5 input range slider polyfill

27 lines 32.5 kB
!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.ReactRangeslider=t(require("react")):e.ReactRangeslider=t(e.React)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){n(3),e.exports=n(3)},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(f===setTimeout)return setTimeout(e,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function i(e){if(l===clearTimeout)return clearTimeout(e);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function a(){y&&d&&(y=!1,d.length?h=d.concat(h):v=-1,h.length&&u())}function u(){if(!y){var e=o(a);y=!0;for(var t=h.length;t;){for(d=h,h=[];++v<t;)d&&d[v].run();v=-1,t=h.length}d=null,y=!1,i(e)}}function s(e,t){this.fun=e,this.array=t}function c(){}var f,l,p=e.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:n}catch(e){f=n}try{l="function"==typeof clearTimeout?clearTimeout:r}catch(e){l=r}}();var d,h=[],y=!1,v=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new s(e,t)),1!==h.length||y||o(u)},s.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.prependListener=c,p.prependOnceListener=c,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),i=r(o);t.default=i.default},function(e,t,n){(function(t){"use strict";"production"===t.env.NODE_ENV?e.exports=n(14):e.exports=n(13)}).call(t,n(1))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(7),f=r(c),l=n(16),p=r(l),d=n(12),h=r(d),y=n(15),v=r(y),m=n(6),b={orientation:{horizontal:{dimension:"width",direction:"left",reverseDirection:"right",coordinate:"x"},vertical:{dimension:"height",direction:"top",reverseDirection:"bottom",coordinate:"y"}}},g=function(e){function t(e,n){i(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.handleFormat=function(e){var t=r.props.format;return t?t(e):e},r.handleUpdate=function(){if(r.slider){var e=r.props.orientation,t=(0,m.capitalize)(b.orientation[e].dimension),n=r.slider["offset"+t],o=r.handle["offset"+t];r.setState({limit:n-o,grab:o/2})}},r.handleStart=function(e){var t=r.props.onChangeStart;document.addEventListener("mousemove",r.handleDrag),document.addEventListener("mouseup",r.handleEnd),r.setState({active:!0},function(){t&&t(e)})},r.handleDrag=function(e){e.stopPropagation();var t=r.props.onChange,n=e.target,o=n.className,i=n.classList,a=n.dataset;if(t&&"rangeslider__labels"!==o){var u=r.position(e);i&&i.contains("rangeslider__label-item")&&a.value&&(u=parseFloat(a.value)),t&&t(u,e)}},r.handleEnd=function(e){var t=r.props.onChangeComplete;r.setState({active:!1},function(){t&&t(e)}),document.removeEventListener("mousemove",r.handleDrag),document.removeEventListener("mouseup",r.handleEnd)},r.handleKeyDown=function(e){e.preventDefault();var t=e.keyCode,n=r.props,o=n.value,i=n.min,a=n.max,u=n.step,s=n.onChange,c=void 0;switch(t){case 38:case 39:c=o+u>a?a:o+u,s&&s(c,e);break;case 37:case 40:c=o-u<i?i:o-u,s&&s(c,e)}},r.getPositionFromValue=function(e){var t=r.state.limit,n=r.props,o=n.min,i=n.max,a=i-o,u=e-o,s=u/a,c=Math.round(s*t);return c},r.getValueFromPosition=function(e){var t=r.state.limit,n=r.props,o=n.orientation,i=n.min,a=n.max,u=n.step,s=(0,m.clamp)(e,0,t)/(t||1),c=u*Math.round(s*(a-i)/u),f="horizontal"===o?c+i:a-c;return(0,m.clamp)(f,i,a)},r.position=function(e){var t=r.state.grab,n=r.props,o=n.orientation,i=n.reverse,a=r.slider,u=b.orientation[o].coordinate,s=i?b.orientation[o].reverseDirection:b.orientation[o].direction,c="client"+(0,m.capitalize)(u),f=e.touches?e.touches[0][c]:e[c],l=a.getBoundingClientRect()[s],p=i?l-f-t:f-l-t,d=r.getValueFromPosition(p);return d},r.coordinates=function(e){var t=r.state,n=t.limit,o=t.grab,i=r.props.orientation,a=r.getValueFromPosition(e),u=r.getPositionFromValue(a),s="horizontal"===i?u+o:u,c="horizontal"===i?s:n-s;return{fill:c,handle:s,label:s}},r.renderLabels=function(e){return p.default.createElement("ul",{ref:function(e){r.labels=e},className:(0,f.default)("rangeslider__labels")},e)},r.state={active:!1,limit:0,grab:0},r}return u(t,e),s(t,[{key:"componentDidMount",value:function(){this.handleUpdate();var e=new v.default(this.handleUpdate);e.observe(this.slider)}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=t.orientation,i=t.className,a=t.tooltip,u=t.keepTooltip,s=t.reverse,c=t.labels,l=t.min,d=t.max,h=t.handleLabel,y=this.state.active,v=b.orientation[r].dimension,m=s?b.orientation[r].reverseDirection:b.orientation[r].direction,g=this.getPositionFromValue(n),_=this.coordinates(g),w=o({},v,_.fill+"px"),E=o({},m,_.handle+"px"),O=a&&(u||y),x=[],S=Object.keys(c);if(S.length>0){S=S.sort(function(e,t){return s?e-t:t-e});var T=!0,j=!1,M=void 0;try{for(var P,C=S[Symbol.iterator]();!(T=(P=C.next()).done);T=!0){var A=P.value,k=this.getPositionFromValue(A),D=this.coordinates(k),R=o({},m,D.label+"px");x.push(p.default.createElement("li",{key:A,className:(0,f.default)("rangeslider__label-item"),"data-value":A,onMouseDown:this.handleDrag,onTouchStart:this.handleStart,onTouchEnd:this.handleEnd,style:R},this.props.labels[A]))}}catch(e){j=!0,M=e}finally{try{!T&&C.return&&C.return()}finally{if(j)throw M}}}return p.default.createElement("div",{ref:function(t){e.slider=t},className:(0,f.default)("rangeslider","rangeslider-"+r,{"rangeslider-reverse":s},i),onMouseDown:this.handleDrag,onMouseUp:this.handleEnd,onTouchStart:this.handleStart,onTouchEnd:this.handleEnd,"aria-valuemin":l,"aria-valuemax":d,"aria-valuenow":n,"aria-orientation":r},p.default.createElement("div",{className:"rangeslider__fill",style:w}),p.default.createElement("div",{ref:function(t){e.handle=t},className:"rangeslider__handle",onMouseDown:this.handleStart,onTouchMove:this.handleDrag,onTouchEnd:this.handleEnd,onKeyDown:this.handleKeyDown,style:E,tabIndex:0},O?p.default.createElement("div",{ref:function(t){e.tooltip=t},className:"rangeslider__handle-tooltip"},p.default.createElement("span",null,this.handleFormat(n))):null,p.default.createElement("div",{className:"rangeslider__handle-label"},h)),c?this.renderLabels(x):null)}}]),t}(l.Component);g.propTypes={min:h.default.number,max:h.default.number,step:h.default.number,value:h.default.number,orientation:h.default.string,tooltip:h.default.bool,reverse:h.default.bool,labels:h.default.object,handleLabel:h.default.string,format:h.default.func,onChangeStart:h.default.func,onChange:h.default.func,onChangeComplete:h.default.func,keepTooltip:h.default.bool},g.defaultProps={min:0,max:100,step:1,value:0,orientation:"horizontal",tooltip:!0,keepTooltip:!1,reverse:!1,labels:{},handleLabel:""},t.default=g},function(e,t){"use strict";function n(e){return e.charAt(0).toUpperCase()+e.substr(1)}function r(e,t,n){return Math.min(Math.max(e,t),n)}Object.defineProperty(t,"__esModule",{value:!0}),t.capitalize=n,t.clamp=r},function(e,t,n){var r,o;/*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=n.apply(null,r);a&&e.push(a)}else if("object"===o)for(var u in r)i.call(r,u)&&r[u]&&e.push(u)}}return e.join(" ")}var i={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?(n.default=n,e.exports=n):(r=[],o=function(){return n}.apply(t,r),!(void 0!==o&&(e.exports=o)))}()},function(e,t){/* object-assign (c) Sindre Sorhus @license MIT */ "use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,u,s=n(e),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var f in r)i.call(r,f)&&(s[f]=r[f]);if(o){u=o(r);for(var l=0;l<u.length;l++)a.call(r,u[l])&&(s[u[l]]=r[u[l]])}}return s}},function(e,t,n){(function(t){"use strict";function r(e,n,r,s,c){if("production"!==t.env.NODE_ENV)for(var f in e)if(u(e,f)){var l;try{if("function"!=typeof e[f]){var p=Error((s||"React class")+": "+r+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[f]+"`.");throw p.name="Invariant Violation",p}l=e[f](n,f,s,r,null,i)}catch(e){l=e}if(!l||l instanceof Error||o((s||"React class")+": type specification of "+r+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof l+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),l instanceof Error&&!(l.message in a)){a[l.message]=!0;var d=c?c():"";o("Failed "+r+" type: "+l.message+(null!=d?d:""))}}}var o=function(){};if("production"!==t.env.NODE_ENV){var i=n(2),a={},u=Function.call.bind(Object.prototype.hasOwnProperty);o=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}r.resetWarningCache=function(){"production"!==t.env.NODE_ENV&&(a={})},e.exports=r}).call(t,n(1))},function(e,t,n){"use strict";function r(){}function o(){}var i=n(2);o.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,o,a){if(a!==i){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){(function(t){"use strict";function r(){return null}var o=n(4),i=n(8),a=n(2),u=n(9),s=Function.call.bind(Object.prototype.hasOwnProperty),c=function(){};"production"!==t.env.NODE_ENV&&(c=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),e.exports=function(e,n){function f(e){var t=e&&(k&&e[k]||e[D]);if("function"==typeof t)return t}function l(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function p(e){this.message=e,this.stack=""}function d(e){function r(r,u,s,f,l,d,h){if(f=f||R,d=d||s,h!==a){if(n){var y=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw y.name="Invariant Violation",y}if("production"!==t.env.NODE_ENV&&"undefined"!=typeof console){var v=f+":"+s;!o[v]&&i<3&&(c("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+f+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),o[v]=!0,i++)}}return null==u[s]?r?new p(null===u[s]?"The "+l+" `"+d+"` is marked as required "+("in `"+f+"`, but its value is `null`."):"The "+l+" `"+d+"` is marked as required in "+("`"+f+"`, but its value is `undefined`.")):null:e(u,s,f,l,d)}if("production"!==t.env.NODE_ENV)var o={},i=0;var u=r.bind(null,!1);return u.isRequired=r.bind(null,!0),u}function h(e){function t(t,n,r,o,i,a){var u=t[n],s=M(u);if(s!==e){var c=P(u);return new p("Invalid "+o+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return d(t)}function y(){return d(r)}function v(e){function t(t,n,r,o,i){if("function"!=typeof e)return new p("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=t[n];if(!Array.isArray(u)){var s=M(u);return new p("Invalid "+o+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var c=0;c<u.length;c++){var f=e(u,c,r,o,i+"["+c+"]",a);if(f instanceof Error)return f}return null}return d(t)}function m(){function t(t,n,r,o,i){var a=t[n];if(!e(a)){var u=M(a);return new p("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return d(t)}function b(){function e(e,t,n,r,i){var a=e[t];if(!o.isValidElementType(a)){var u=M(a);return new p("Invalid "+r+" `"+i+"` of type "+("`"+u+"` supplied to `"+n+"`, expected a single ReactElement type."))}return null}return d(e)}function g(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||R,u=A(t[n]);return new p("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("instance of `"+a+"`."))}return null}return d(t)}function _(e){function n(t,n,r,o,i){for(var a=t[n],u=0;u<e.length;u++)if(l(a,e[u]))return null;var s=JSON.stringify(e,function(e,t){var n=P(t);return"symbol"===n?String(t):t});return new p("Invalid "+o+" `"+i+"` of value `"+String(a)+"` "+("supplied to `"+r+"`, expected one of "+s+"."))}return Array.isArray(e)?d(n):("production"!==t.env.NODE_ENV&&c(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),r)}function w(e){function t(t,n,r,o,i){if("function"!=typeof e)return new p("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=t[n],c=M(u);if("object"!==c)return new p("Invalid "+o+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an object."));for(var f in u)if(s(u,f)){var l=e(u,f,r,o,i+"."+f,a);if(l instanceof Error)return l}return null}return d(t)}function E(e){function n(t,n,r,o,i){for(var u=0;u<e.length;u++){var s=e[u];if(null==s(t,n,r,o,i,a))return null}return new p("Invalid "+o+" `"+i+"` supplied to "+("`"+r+"`."))}if(!Array.isArray(e))return"production"!==t.env.NODE_ENV?c("Invalid argument supplied to oneOfType, expected an instance of array."):void 0,r;for(var o=0;o<e.length;o++){var i=e[o];if("function"!=typeof i)return c("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+C(i)+" at index "+o+"."),r}return d(n)}function O(){function e(e,t,n,r,o){return T(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return d(e)}function x(e){function t(t,n,r,o,i){var u=t[n],s=M(u);if("object"!==s)return new p("Invalid "+o+" `"+i+"` of type `"+s+"` "+("supplied to `"+r+"`, expected `object`."));for(var c in e){var f=e[c];if(f){var l=f(u,c,r,o,i+"."+c,a);if(l)return l}}return null}return d(t)}function S(e){function t(t,n,r,o,u){var s=t[n],c=M(s);if("object"!==c)return new p("Invalid "+o+" `"+u+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));var f=i({},t[n],e);for(var l in f){var d=e[l];if(!d)return new p("Invalid "+o+" `"+u+"` key `"+l+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=d(s,l,r,o,u+"."+l,a);if(h)return h}return null}return d(t)}function T(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(T);if(null===t||e(t))return!0;var n=f(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!T(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!T(i[1]))return!1}return!0;default:return!1}}function j(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function M(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":j(t,e)?"symbol":t}function P(e){if("undefined"==typeof e||null===e)return""+e;var t=M(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function C(e){var t=P(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function A(e){return e.constructor&&e.constructor.name?e.constructor.name:R}var k="function"==typeof Symbol&&Symbol.iterator,D="@@iterator",R="<<anonymous>>",N={array:h("array"),bool:h("boolean"),func:h("function"),number:h("number"),object:h("object"),string:h("string"),symbol:h("symbol"),any:y(),arrayOf:v,element:m(),elementType:b(),instanceOf:g,node:O(),objectOf:w,oneOf:_,oneOfType:E,shape:x,exact:S};return p.prototype=Error.prototype,N.checkPropTypes=u,N.resetWarningCache=u.resetWarningCache,N.PropTypes=N,N}}).call(t,n(1))},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV){var r=n(4),o=!0;e.exports=n(11)(r.isElement,o)}else e.exports=n(10)()}).call(t,n(1))},function(e,t,n){(function(e){/** @license React v16.8.3 * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ "use strict";"production"!==e.env.NODE_ENV&&!function(){function e(e){return"string"==typeof e||"function"==typeof e||e===g||e===S||e===w||e===_||e===j||"object"==typeof e&&null!==e&&(e.$$typeof===P||e.$$typeof===M||e.$$typeof===E||e.$$typeof===O||e.$$typeof===T)}function n(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case m:var n=e.type;switch(n){case x:case S:case g:case w:case _:case j:return n;default:var r=n&&n.$$typeof;switch(r){case O:case T:case E:return r;default:return t}}case P:case M:case b:return t}}}function r(e){return G||(G=!0,k(!1,"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),o(e)||n(e)===x}function o(e){return n(e)===S}function i(e){return n(e)===O}function a(e){return n(e)===E}function u(e){return"object"==typeof e&&null!==e&&e.$$typeof===m}function s(e){return n(e)===T}function c(e){return n(e)===g}function f(e){return n(e)===P}function l(e){return n(e)===M}function p(e){return n(e)===b}function d(e){return n(e)===w}function h(e){return n(e)===_}function y(e){return n(e)===j}Object.defineProperty(t,"__esModule",{value:!0});var v="function"==typeof Symbol&&Symbol.for,m=v?Symbol.for("react.element"):60103,b=v?Symbol.for("react.portal"):60106,g=v?Symbol.for("react.fragment"):60107,_=v?Symbol.for("react.strict_mode"):60108,w=v?Symbol.for("react.profiler"):60114,E=v?Symbol.for("react.provider"):60109,O=v?Symbol.for("react.context"):60110,x=v?Symbol.for("react.async_mode"):60111,S=v?Symbol.for("react.concurrent_mode"):60111,T=v?Symbol.for("react.forward_ref"):60112,j=v?Symbol.for("react.suspense"):60113,M=v?Symbol.for("react.memo"):60115,P=v?Symbol.for("react.lazy"):60116,C=function(){},A=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,function(){return n[o++]});"undefined"!=typeof console&&console.warn(i);try{throw new Error(i)}catch(e){}};C=function(e,t){if(void 0===t)throw new Error("`lowPriorityWarning(condition, format, ...args)` requires a warning message argument");if(!e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];A.apply(void 0,[t].concat(r))}};var k=C,D=x,R=S,N=O,$=E,I=m,V=T,L=g,F=P,z=M,W=b,q=w,U=_,B=j,G=!1;t.typeOf=n,t.AsyncMode=D,t.ConcurrentMode=R,t.ContextConsumer=N,t.ContextProvider=$,t.Element=I,t.ForwardRef=V,t.Fragment=L,t.Lazy=F,t.Memo=z,t.Portal=W,t.Profiler=q,t.StrictMode=U,t.Suspense=B,t.isValidElementType=e,t.isAsyncMode=r,t.isConcurrentMode=o,t.isContextConsumer=i,t.isContextProvider=a,t.isElement=u,t.isForwardRef=s,t.isFragment=c,t.isLazy=f,t.isMemo=l,t.isPortal=p,t.isProfiler=d,t.isStrictMode=h,t.isSuspense=y}()}).call(t,n(1))},function(e,t){/** @license React v16.8.3 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ "use strict";function n(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case p:case d:case u:case c:case s:case y:return e;default:switch(e=e&&e.$$typeof){case l:case h:case f:return e;default:return t}}case m:case v:case a:return t}}}function r(e){return n(e)===d}Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,s=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,f=o?Symbol.for("react.provider"):60109,l=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.async_mode"):60111,d=o?Symbol.for("react.concurrent_mode"):60111,h=o?Symbol.for("react.forward_ref"):60112,y=o?Symbol.for("react.suspense"):60113,v=o?Symbol.for("react.memo"):60115,m=o?Symbol.for("react.lazy"):60116;t.typeOf=n,t.AsyncMode=p,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=f,t.Element=i,t.ForwardRef=h,t.Fragment=u,t.Lazy=m,t.Memo=v,t.Portal=a,t.Profiler=c,t.StrictMode=s,t.Suspense=y,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===u||e===d||e===c||e===s||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===f||e.$$typeof===l||e.$$typeof===h)},t.isAsyncMode=function(e){return r(e)||n(e)===p},t.isConcurrentMode=r,t.isContextConsumer=function(e){return n(e)===l},t.isContextProvider=function(e){return n(e)===f},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return n(e)===h},t.isFragment=function(e){return n(e)===u},t.isLazy=function(e){return n(e)===m},t.isMemo=function(e){return n(e)===v},t.isPortal=function(e){return n(e)===a},t.isProfiler=function(e){return n(e)===c},t.isStrictMode=function(e){return n(e)===s},t.isSuspense=function(e){return n(e)===y}},function(e,t,n){(function(t){!function(t,n){e.exports=n()}(this,function(){"use strict";function e(e,t){function n(){i&&(i=!1,e()),a&&o()}function r(){h(n)}function o(){var e=Date.now();if(i){if(e-u<y)return;a=!0}else i=!0,a=!1,setTimeout(r,t);u=e}var i=!1,a=!1,u=0;return o}function n(e){return parseFloat(e)||0}function r(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(t,r){var o=e["border-"+r+"-width"];return t+n(o)},0)}function o(e){for(var t=["top","right","bottom","left"],r={},o=0,i=t;o<i.length;o++){var a=i[o],u=e["padding-"+a];r[a]=n(u)}return r}function i(e){var t=e.getBBox();return f(0,0,t.width,t.height)}function a(e){var t=e.clientWidth,i=e.clientHeight;if(!t&&!i)return E;var a=w(e).getComputedStyle(e),s=o(a),c=s.left+s.right,l=s.top+s.bottom,p=n(a.width),d=n(a.height);if("border-box"===a.boxSizing&&(Math.round(p+c)!==t&&(p-=r(a,"left","right")+c),Math.round(d+l)!==i&&(d-=r(a,"top","bottom")+l)),!u(e)){var h=Math.round(p+c)-t,y=Math.round(d+l)-i;1!==Math.abs(h)&&(p-=h),1!==Math.abs(y)&&(d-=y)}return f(s.left,s.top,p,d)}function u(e){return e===w(e).document.documentElement}function s(e){return p?O(e)?i(e):a(e):E}function c(e){var t=e.x,n=e.y,r=e.width,o=e.height,i="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(i.prototype);return _(a,{x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:o+n,left:t}),a}function f(e,t,n,r){return{x:e,y:t,width:n,height:r}}var l=function(){function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return"undefined"!=typeof Map?Map: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__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}()}(),p="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,d=function(){return"undefined"!=typeof t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")()}(),h=function(){return"function"==typeof requestAnimationFrame?requestAnimationFrame.bind(d):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),y=2,v=20,m=["top","right","bottom","left","width","height","size","weight"],b="undefined"!=typeof MutationObserver,g=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=e(this.refresh.bind(this),v)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},t.prototype.connect_=function(){p&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),b?(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(){p&&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(e){var t=e.propertyName,n=void 0===t?"":t,r=m.some(function(e){return!!~n.indexOf(e)});r&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),_=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},w=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||d},E=f(0,0,0,0),O=function(){return"undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof w(e).SVGGraphicsElement}:function(e){return e instanceof w(e).SVGElement&&"function"==typeof e.getBBox}}(),x=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=f(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=s(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),S=function(){function e(e,t){var n=c(t);_(this,{target:e,contentRect:n})}return e}(),T=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new l,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof w(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new x(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof w(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new S(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),j="undefined"!=typeof WeakMap?new WeakMap:new l,M=function(){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=g.getInstance(),r=new T(t,n,this);j.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){M.prototype[e]=function(){var t;return(t=j.get(this))[e].apply(t,arguments)}});var P=function(){return"undefined"!=typeof d.ResizeObserver?d.ResizeObserver:M}();return P})}).call(t,function(){return this}())},function(t,n){t.exports=e}])});