react-image-magnify
Version:
A responsive image zoom component designed for shopping sites.
30 lines • 153 kB
JavaScript
!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.ReactImageMagnify=t(require("react")):e.ReactImageMagnify=t(e.React)}("undefined"!=typeof self?self:this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=17)}([function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){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;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,u,l=r(e),s=1;s<arguments.length;s++){n=Object(arguments[s]);for(var c in n)o.call(n,c)&&(l[c]=n[c]);if(i){u=i(n);for(var f=0;f<u.length;f++)a.call(n,u[f])&&(l[u[f]]=n[u[f]])}}return l}},function(e,t,n){e.exports=n(23)()},function(e,t){function n(e,t,n){return t<n?e<t?t:e>n?n:e:e<n?n:e>t?t:e}e.exports=n},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(15),a=n(8);t.a={cursorOffset:o.a,fadeDurationInMs:i.a.number,isActive:i.a.bool,isPositionOutside:i.a.bool,position:o.a,smallImage:a.b,style:i.a.object}},function(e,t,n){"use strict";n.d(t,"c",function(){return r}),n.d(t,"e",function(){return i}),n.d(t,"b",function(){return o}),n.d(t,"d",function(){return a}),n.d(t,"f",function(){return u}),n.d(t,"a",function(){return l});var r="pressEvent",i="tap",o="mouseEmulation",a="setHovering",u="unsetHovering",l={TOUCH:"touch",TAP:"tap",DOUBLE_TAP:"double_tap",PRESS:"press",CLICK:"click",HOVER:"hover"}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),u=n(1),l=n.n(u),s=function(e){var t=e.fadeDurationInMs,n=e.isActive,r=e.isPositionOutside,o=e.style,a={width:"auto",height:"auto",top:"auto",right:"auto",bottom:"auto",left:"auto",display:"block"},u={position:"absolute",opacity:n&&!r?1:0,transition:"opacity "+t+"ms ease-in"},s=l()({},a,o,u);return i.a.createElement("div",{style:s})};s.propTypes={style:a.a.object,fadeDurationInMs:a.a.number,isActive:a.a.bool,translateX:a.a.number,translateY:a.a.number,userStyle:a.a.object},s.defaultProps={isActive:!1,fadeDurationInMs:0,translateX:0,translateY:0},t.a=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(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)}var a=n(9),u=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}}(),l=function(e){function t(e){var n=e.onIsActiveChanged;r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{onIsActiveChanged:n}));return o.initialElTop=0,o.currentElTop=0,o}return o(t,e),u(t,[{key:"touchStarted",value:function(){}},{key:"touchMoved",value:function(){}},{key:"touchEnded",value:function(){this.deactivate()}},{key:"touchCanceled",value:function(){this.deactivate()}}]),t}(a.a);t.a=l},function(e,t,n){"use strict";n.d(t,"a",function(){return c}),n.d(t,"b",function(){return f});var r=n(2),i=n.n(r),o=n(47),a=n.n(o),u=n(1),l=n.n(u),s={alt:i.a.string,src:i.a.string.isRequired,srcSet:i.a.string,sizes:i.a.string,onLoad:i.a.func,onError:i.a.func},c=i.a.shape(l()({},s,{width:i.a.number.isRequired,height:i.a.number.isRequired})),f=i.a.shape(l()({},s,{isFluidWidth:i.a.bool,width:a()(i.a.number,function(e){return!e.isFluidWidth}),height:a()(i.a.number,function(e){return!e.isFluidWidth})}))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=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}}(),o=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.onIsActiveChanged;if(r(this,e),"function"!=typeof n)throw new Error("onIsActiveChanged should be a function");this.onIsActiveChanged=n,this.isActive=!1,this.timers=[]}return i(e,[{key:"activate",value:function(){this.isActive=!0,this.onIsActiveChanged({isActive:!0})}},{key:"deactivate",value:function(){this.isActive=!1,this.onIsActiveChanged({isActive:!1}),this.clearTimers()}},{key:"toggleActivation",value:function(){this.isActive?this.deactivate():this.activate()}},{key:"clearTimers",value:function(){for(var e=this.timers;e.length;){var t=e.pop();clearTimeout(t.id)}}},{key:"clearTimer",value:function(e){this.timers.forEach(function(t){t.name===e&&clearTimeout(t.id)})}}]),e}();t.a=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(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)}var a=n(9),u=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}}(),l=function(e){function t(e){var n=e.onIsActiveChanged;return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{onIsActiveChanged:n}))}return o(t,e),u(t,[{key:"mouseEntered",value:function(){}},{key:"mouseMoved",value:function(){}},{key:"mouseLeft",value:function(){}},{key:"mouseClicked",value:function(){}}]),t}(a.a);t.a=l},function(e,t,n){"use strict";function r(e,t){return a(e,t)}function i(e,t){return{x:e.width/t.width,y:e.height/t.height}}function o(e,t){return a(e,{width:t.width-e.width,height:t.height-e.height})}function a(e,t){return{x:t.width/e.width,y:t.height/e.height}}t.c=r,t.b=i,t.a=o},function(e,t,n){"use strict";n.d(t,"c",function(){return a}),n.d(t,"b",function(){return u}),n.d(t,"a",function(){return l});var r=n(2),i=n.n(r),o=n(13),a=i.a.oneOf([o.a.beside,o.a.over]),u=i.a.shape({width:i.a.oneOfType([i.a.number,i.a.string]),height:i.a.oneOfType([i.a.number,i.a.string])}),l=i.a.shape({width:i.a.number,height:i.a.number})},function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"a",function(){return i});var r={mouse:"mouse",touch:"touch"},i={over:"over",beside:"beside"}},function(e,t,n){"use strict";function r(){}t.a=r},function(e,t,n){"use strict";var r=n(2),i=n.n(r);t.a=i.a.shape({x:i.a.number.isRequired,y:i.a.number.isRequired})},function(e,t,n){"use strict";function r(e,t){var n=e.isFluidWidth,r=e.width,i=e.height,o={width:"auto",height:"auto",fontSize:"0px",position:"relative"},a={width:r+"px",height:i+"px",position:"relative"},u=n?o:a;return c()({cursor:"crosshair"},t,u)}function i(e,t){var n=e.isFluidWidth,r=e.width,i=e.height,o={width:"100%",height:"auto",display:"block",pointerEvents:"none"},a={width:r+"px",height:i+"px",pointerEvents:"none"},u=n?o:a;return c()({},t,u)}function o(e,t){var n={overflow:"hidden"};if(t)return n;var r={position:"absolute",top:"0px"};return e?c()(n,r,{left:"0px"}):c()(n,r,{left:"100%",marginLeft:"10px",border:"1px solid #d6d6d6"})}function a(e){var t=e.containerDimensions,n=e.fadeDurationInMs,r=e.isTransitionActive;return{width:t.width,height:t.height,opacity:r?1:0,transition:"opacity "+n+"ms ease-in",pointerEvents:"none"}}function u(e){var t=p,n=t.params,r=void 0===n?{}:n,i=t.compositStyle;if(d()(r,e))return i;var u=e.containerDimensions,l=e.containerStyle,s=e.fadeDurationInMs,f=e.isTransitionActive,h=e.isInPlaceMode,m=e.isPortalRendered,v=o(h,m),y=a({containerDimensions:u,fadeDurationInMs:s,isTransitionActive:f});return t.compositStyle=c()({},v,l,y),t.params=e,t.compositStyle}function l(e){var t=e.imageCoordinates,n=e.imageStyle,r=e.largeImage,i="translate("+t.x+"px, "+t.y+"px)",o={width:r.width,height:r.height,transform:i,WebkitTransform:i,msTransform:i,pointerEvents:"none"};return c()({},n,o)}t.a=r,t.d=i,t.b=u,t.c=l;var s=n(1),c=n.n(s),f=n(48),d=n.n(f),p={}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(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 a=n(18),u=n.n(a),l=n(1),s=n.n(l),c=n(2),f=n.n(c),d=n(0),p=n.n(d),h=n(27),m=n(40),v=n(49),y=n(54),g=n(56),b=n(57),w=n(58),T=n(59),k=n(16),C=n(8),E=n(12),x=n(14),P=n(13),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}}(),_=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=u.a.primaryInput,a=P.b.mouse,l=P.b.touch;return n.state={smallImageWidth:0,smallImageHeight:0,detectedInputType:{isMouseDeteced:o===a,isTouchDetected:o===l}},n.onSmallImageLoad=n.onSmallImageLoad.bind(n),n.setSmallImageDimensionState=n.setSmallImageDimensionState.bind(n),n.onDetectedInputTypeChanged=n.onDetectedInputTypeChanged.bind(n),n}return o(t,e),S(t,[{key:"componentDidMount",value:function(){this.props.smallImage.isFluidWidth&&(this.setSmallImageDimensionState(),window.addEventListener("resize",this.setSmallImageDimensionState))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.setSmallImageDimensionState)}},{key:"onSmallImageLoad",value:function(e){var t=this.props.smallImage,n=t.onLoad,r=void 0===n?x.a:n,i=t.isFluidWidth;r(e),i&&this.setSmallImageDimensionState()}},{key:"onDetectedInputTypeChanged",value:function(e){this.setState({detectedInputType:e})}},{key:"setSmallImageDimensionState",value:function(){var e=this.smallImageEl,t=e.offsetWidth,n=e.offsetHeight;this.setState({smallImageWidth:t,smallImageHeight:n})}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.style,i=t.hoverDelayInMs,o=t.hoverOffDelayInMs,a=t.isActivatedOnTouch,u=t.pressDuration,l=t.pressMoveThreshold,s=t.smallImage.onError,c=void 0===s?x.a:s,f=t.imageClassName,d=t.imageStyle,v=t.lensStyle,y=t.largeImage,b=t.enlargedImageContainerClassName,T=t.enlargedImageContainerStyle,C=t.enlargedImageClassName,E=t.enlargedImageStyle,P=t.enlargedImagePortalId,S=t.isEnlargedImagePortalEnabledForTouch,_=t.fadeDurationInMs,M=t.hintComponent,I=t.isHintEnabled,O=t.hintTextMouse,D=t.hintTextTouch,j=t.shouldHideHintAfterFirstActivation,A=this.smallImage,N=this.state.detectedInputType.isTouchDetected,L=Object(w.a)(A,y,this.enlargedImageContainerDimensions),R=this.lensComponent;return p.a.createElement(h.a,{className:n,hoverDelayInMs:i,hoverOffDelayInMs:o,isActivatedOnTouch:a,onDetectedInputTypeChanged:this.onDetectedInputTypeChanged,pressDuration:u,pressMoveThreshold:l,shouldStopTouchMovePropagation:!0,style:Object(k.a)(A,r)},p.a.createElement("img",{src:A.src,srcSet:A.srcSet,sizes:A.sizes,alt:A.alt,className:f,style:Object(k.d)(A,d),ref:function(t){return e.smallImageEl=t},onLoad:this.onSmallImageLoad,onError:c}),I&&p.a.createElement(g.a,{shouldHideAfterFirstActivation:j},p.a.createElement(M,{isTouchDetected:N,hintTextMouse:O,hintTextTouch:D})),this.shouldShowLens&&p.a.createElement(R,{cursorOffset:L,fadeDurationInMs:_,smallImage:A,style:v}),p.a.createElement(m.a,{containerClassName:b,containerDimensions:this.enlargedImageContainerDimensions,containerStyle:T,cursorOffset:L,fadeDurationInMs:_,imageClassName:C,imageStyle:E,largeImage:y,smallImage:A,portalId:P,isPortalEnabledForTouch:S,isTouchDetected:this.isTouchDetected,isInPlaceMode:this.isInPlaceMode}))}},{key:"smallImage",get:function(){var e=this.props,t=e.smallImage;if(!e.smallImage.isFluidWidth)return t;var n=this.state,r=n.smallImageWidth,i=n.smallImageHeight;return s()({},t,{width:r,height:i})}},{key:"enlargedImagePlacement",get:function(){var e=this.props.enlargedImagePosition,t=this.state.detectedInputType.isTouchDetected,n=t?P.a.over:P.a.beside;return e||n}},{key:"isInPlaceMode",get:function(){var e=P.a.over;return this.enlargedImagePlacement===e}},{key:"enlargedImageContainerDimensions",get:function(){var e=this.props.enlargedImageContainerDimensions,t=e.width,n=e.height,r=this.smallImage,i=r.width,o=r.height,a=this.isInPlaceMode;return{width:Object(T.a)({containerDimension:t,smallImageDimension:i,isInPlaceMode:a}),height:Object(T.a)({containerDimension:n,smallImageDimension:o,isInPlaceMode:a})}}},{key:"isTouchDetected",get:function(){return this.state.detectedInputType.isTouchDetected}},{key:"shouldShowLens",get:function(){return!this.isInPlaceMode&&!this.isTouchDetected}},{key:"lensComponent",get:function(){var e=this.props,t=e.shouldUsePositiveSpaceLens,n=e.lensComponent;return n||(t?y.a:v.a)}}]),t}(p.a.Component);_.propTypes={className:f.a.string,style:f.a.object,hoverDelayInMs:f.a.number,hoverOffDelayInMs:f.a.number,fadeDurationInMs:f.a.number,pressDuration:f.a.number,pressMoveThreshold:f.a.number,isActivatedOnTouch:f.a.bool,imageClassName:f.a.string,imageStyle:f.a.object,lensStyle:f.a.object,lensComponent:f.a.func,shouldUsePositiveSpaceLens:f.a.bool,smallImage:C.b,largeImage:C.a,enlargedImageContainerClassName:f.a.string,enlargedImageContainerStyle:f.a.object,enlargedImageClassName:f.a.string,enlargedImageStyle:f.a.object,enlargedImageContainerDimensions:E.b,enlargedImagePosition:E.c,enlargedImagePortalId:f.a.string,isEnlargedImagePortalEnabledForTouch:f.a.bool,hintComponent:f.a.func,hintTextMouse:f.a.string,hintTextTouch:f.a.string,isHintEnabled:f.a.bool,shouldHideHintAfterFirstActivation:f.a.bool},_.defaultProps={enlargedImageContainerDimensions:{width:"100%",height:"100%"},isEnlargedImagePortalEnabledForTouch:!1,fadeDurationInMs:300,hintComponent:b.a,shouldHideHintAfterFirstActivation:!0,isHintEnabled:!1,hintTextMouse:"Hover to Zoom",hintTextTouch:"Long-Touch to Zoom",hoverDelayInMs:250,hoverOffDelayInMs:150,shouldUsePositiveSpaceLens:!1},t.default=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n,r){return e&&(t||n)?"hybrid":e&&Object.keys(r.detectHover).filter(function(e){return"update"!==e}).every(function(e){return!1===r.detectHover[e]})&&Object.keys(r.detectPointer).filter(function(e){return"update"!==e}).every(function(e){return!1===r.detectPointer[e]})?window.navigator&&/android/.test(window.navigator.userAgent.toLowerCase())?"touchOnly":"hybrid":e?"touchOnly":"mouseOnly"}Object.defineProperty(t,"__esModule",{value:!0});var o=n(19),a=r(o),u=n(20),l=r(u),s=n(21),c=r(s),f=n(22),d=r(f),p={state:{detectHover:a.default,detectPointer:l.default,detectTouchEvents:c.default,detectPassiveEvents:d.default},update:function(){p.state.detectHover.update(),p.state.detectPointer.update(),p.state.detectTouchEvents.update(),p.state.detectPassiveEvents.update(),p.updateOnlyOwnProperties()},updateOnlyOwnProperties:function(){if("undefined"!=typeof window){p.passiveEvents=p.state.detectPassiveEvents.hasSupport||!1,p.hasTouch=p.state.detectTouchEvents.hasSupport||!1,p.deviceType=i(p.hasTouch,p.state.detectHover.anyHover,p.state.detectPointer.anyFine,p.state),p.hasMouse="touchOnly"!==p.deviceType,p.primaryInput="mouseOnly"===p.deviceType&&"mouse"||"touchOnly"===p.deviceType&&"touch"||p.state.detectHover.hover&&"mouse"||p.state.detectHover.none&&"touch"||"mouse";/windows/.test(window.navigator.userAgent.toLowerCase())&&/chrome/.test(window.navigator.userAgent.toLowerCase())&&parseInt(/Chrome\/([0-9.]+)/.exec(navigator.userAgent)[1],10)>=59&&p.hasTouch&&(p.deviceType="hybrid",p.hasMouse=!0,p.primaryInput="mouse")}}};p.updateOnlyOwnProperties(),t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={update:function(){"undefined"!=typeof window&&"function"==typeof window.matchMedia&&(r.hover=window.matchMedia("(hover: hover)").matches,r.none=window.matchMedia("(hover: none)").matches||window.matchMedia("(hover: on-demand)").matches,r.anyHover=window.matchMedia("(any-hover: hover)").matches,r.anyNone=window.matchMedia("(any-hover: none)").matches||window.matchMedia("(any-hover: on-demand)").matches)}};r.update(),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={update:function(){"undefined"!=typeof window&&"function"==typeof window.matchMedia&&(r.fine=window.matchMedia("(pointer: fine)").matches,r.coarse=window.matchMedia("(pointer: coarse)").matches,r.none=window.matchMedia("(pointer: none)").matches,r.anyFine=window.matchMedia("(any-pointer: fine)").matches,r.anyCoarse=window.matchMedia("(any-pointer: coarse)").matches,r.anyNone=window.matchMedia("(any-pointer: none)").matches)}};r.update(),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={update:function(){"undefined"!=typeof window&&(r.hasSupport="ontouchstart"in window,r.browserSupportsApi=Boolean(window.TouchEvent))}};r.update(),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),r.hasSupport=e}}};r.update(),t.default=r},function(e,t,n){"use strict";var r=n(24),i=n(25),o=n(26);e.exports=function(){function e(e,t,n,r,a,u){u!==o&&i(!1,"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")}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,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t,n){"use strict";function r(e,t,n,r,o,a,u,l){if(i(t),!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,u,l],f=0;s=new Error(t.replace(/%s/g,function(){return c[f++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var i=function(e){};e.exports=r},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(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)}var a=n(0),u=n.n(a),l=n(2),s=n.n(l),c=n(1),f=n.n(c),d=n(28),p=n.n(d),h=n(32),m=n(33),v=n(5),y=n(34),g=n(35),b=n(36),w=n(37),T=n(38),k=n(39),C=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}}(),E=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return x.call(n),n.state={detectedEnvironment:{isMouseDetected:!1,isTouchDetected:!1},elementDimensions:{width:0,height:0},isActive:!1,isPositionOutside:!0,position:{x:0,y:0}},n.shouldGuardAgainstMouseEmulationByDevices=!1,n.eventListeners=[],n.timers=[],n.elementOffset={x:0,y:0},n.onTouchStart=n.onTouchStart.bind(n),n.onTouchMove=n.onTouchMove.bind(n),n.onTouchEnd=n.onTouchEnd.bind(n),n.onTouchCancel=n.onTouchCancel.bind(n),n.onMouseEnter=n.onMouseEnter.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseLeave=n.onMouseLeave.bind(n),n.onClick=n.onClick.bind(n),n.onIsActiveChanged=n.onIsActiveChanged.bind(n),n.setTouchActivationStrategy(e.activationInteractionTouch),n.setMouseActivationStrategy(e.activationInteractionMouse),n}return o(t,e),C(t,[{key:"onIsActiveChanged",value:function(e){e.isActive?this.activate():this.deactivate()}},{key:"onTouchStart",value:function(e){this.init(),this.onTouchDetected(),this.setShouldGuardAgainstMouseEmulationByDevices();var t=this.core.getCursorPosition(this.getTouchEvent(e));this.setPositionState(t),this.touchActivation.touchStarted({e:e,position:t})}},{key:"onTouchMove",value:function(e){if(this.isCoreReady){var t=this.core.getCursorPosition(this.getTouchEvent(e));this.touchActivation.touchMoved({e:e,position:t}),this.state.isActive&&(this.setPositionState(t),e.preventDefault(),this.props.shouldStopTouchMovePropagation&&e.stopPropagation())}}},{key:"onTouchEnd",value:function(){this.touchActivation.touchEnded(),this.unsetShouldGuardAgainstMouseEmulationByDevices()}},{key:"onTouchCancel",value:function(){this.touchActivation.touchCanceled(),this.unsetShouldGuardAgainstMouseEmulationByDevices()}},{key:"onMouseEnter",value:function(e){this.shouldGuardAgainstMouseEmulationByDevices||(this.init(),this.onMouseDetected(),this.setPositionState(this.core.getCursorPosition(e)),this.mouseActivation.mouseEntered())}},{key:"onMouseMove",value:function(e){if(this.isCoreReady){var t=this.core.getCursorPosition(e);this.setPositionState(t),this.mouseActivation.mouseMoved(t)}}},{key:"onMouseLeave",value:function(){this.mouseActivation.mouseLeft(),this.setState({isPositionOutside:!0})}},{key:"onClick",value:function(e){this.setPositionState(this.core.getCursorPosition(e)),this.mouseActivation.mouseClicked(),this.onMouseDetected()}},{key:"onTouchDetected",value:function(){var e={isTouchDetected:!0,isMouseDetected:!1};this.setState({detectedEnvironment:e}),this.props.onDetectedEnvironmentChanged(e)}},{key:"onMouseDetected",value:function(){var e={isTouchDetected:!1,isMouseDetected:!0};this.setState({detectedEnvironment:e}),this.props.onDetectedEnvironmentChanged(e)}},{key:"componentDidMount",value:function(){this.props.isEnabled&&this.enable()}},{key:"componentWillReceiveProps",value:function(e){var t=e.isEnabled;this.props.isEnabled!==t&&(t?this.enable():this.disable())}},{key:"componentWillUnmount",value:function(){this.disable()}},{key:"enable",value:function(){this.addEventListeners()}},{key:"disable",value:function(){this.removeEventListeners()}},{key:"init",value:function(){this.core=new h.a(this.el),this.setElementDimensionsState(this.getElementDimensions(this.el))}},{key:"setTouchActivationStrategy",value:function(e){var t=this.props,n=t.pressDurationInMs,r=t.pressMoveThreshold,i=t.tapDurationInMs,o=t.tapMoveThreshold,a=v.a.TOUCH,u=v.a.TAP,l=v.a.PRESS;switch(e){case l:this.touchActivation=new g.a({onIsActiveChanged:this.onIsActiveChanged,pressDurationInMs:n,pressMoveThreshold:r});break;case u:this.touchActivation=new w.a({onIsActiveChanged:this.onIsActiveChanged,tapDurationInMs:i,tapMoveThreshold:o});break;case a:this.touchActivation=new b.a({onIsActiveChanged:this.onIsActiveChanged});break;default:throw new Error("Must implement a touch activation strategy")}}},{key:"setMouseActivationStrategy",value:function(e){var t=this.props,n=t.hoverDelayInMs,r=t.hoverOffDelayInMs,i=v.a.HOVER,o=v.a.CLICK;switch(e){case i:this.mouseActivation=new T.a({onIsActiveChanged:this.onIsActiveChanged,hoverDelayInMs:n,hoverOffDelayInMs:r});break;case o:this.mouseActivation=new k.a({onIsActiveChanged:this.onIsActiveChanged});break;default:throw new Error("Must implement a mouse activation strategy")}}},{key:"reset",value:function(){var e=this.core;e=void 0===e?{}:e;var t=e.lastEvent;this.init(),t&&this.setPositionState(this.core.getCursorPosition(t))}},{key:"activate",value:function(){this.setState({isActive:!0}),this.props.onActivationChanged({isActive:!0})}},{key:"deactivate",value:function(){var e=this;this.setState({isActive:!1},function(){var t=e.state,n=t.isPositionOutside,r=t.position;e.props.onPositionChanged({isPositionOutside:n,position:r}),e.props.onActivationChanged({isActive:!1})})}},{key:"setPositionState",value:function(e){var t=this.getIsPositionOutside(e);this.setState({isPositionOutside:t,position:e},this.onPositionChanged)}},{key:"setElementDimensionsState",value:function(e){this.setState({elementDimensions:e})}},{key:"setShouldGuardAgainstMouseEmulationByDevices",value:function(){this.shouldGuardAgainstMouseEmulationByDevices=!0}},{key:"unsetShouldGuardAgainstMouseEmulationByDevices",value:function(){var e=this;this.timers.push({name:v.b,id:setTimeout(function(){e.shouldGuardAgainstMouseEmulationByDevices=!1},0)})}},{key:"getElementDimensions",value:function(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height}}},{key:"getIsPositionOutside",value:function(e){var t=e.x,n=e.y,r=this.state.elementDimensions,i=r.width,o=r.height;return t<0||n<0||t>i||n>o}},{key:"getTouchEvent",value:function(e){return e.touches[0]}},{key:"getIsReactComponent",value:function(e){return"function"==typeof e.type}},{key:"shouldDecorateChild",value:function(e){return!!e&&this.getIsReactComponent(e)&&this.props.shouldDecorateChildren}},{key:"decorateChild",value:function(e,t){return Object(a.cloneElement)(e,t)}},{key:"decorateChildren",value:function(e,t){var n=this;return a.Children.map(e,function(e){return n.shouldDecorateChild(e)?n.decorateChild(e,t):e})}},{key:"addEventListeners",value:function(){this.eventListeners.push(Object(m.a)(this.el,"touchstart",this.onTouchStart,{passive:!1}),Object(m.a)(this.el,"touchmove",this.onTouchMove,{passive:!1}),Object(m.a)(this.el,"touchend",this.onTouchEnd),Object(m.a)(this.el,"touchcancel",this.onTouchCancel),Object(m.a)(this.el,"mouseenter",this.onMouseEnter),Object(m.a)(this.el,"mousemove",this.onMouseMove),Object(m.a)(this.el,"mouseleave",this.onMouseLeave),Object(m.a)(this.el,"click",this.onClick))}},{key:"removeEventListeners",value:function(){for(;this.eventListeners.length;)this.eventListeners.pop().removeEventListener()}},{key:"getPassThroughProps",value:function(){var e=Object.keys(this.constructor.propTypes);return p()(this.props,e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.className,i=t.mapChildProps,o=t.style,a=f()({},i(this.state),this.getPassThroughProps());return u.a.createElement("div",{className:r,ref:function(t){return e.el=t},style:f()({},o,{WebkitUserSelect:"none"})},this.decorateChildren(n,a))}},{key:"isCoreReady",get:function(){return!!this.core}}]),t}(u.a.Component);E.displayName="ReactCursorPosition",E.propTypes={activationInteractionMouse:s.a.oneOf([v.a.CLICK,v.a.HOVER]),activationInteractionTouch:s.a.oneOf([v.a.PRESS,v.a.TAP,v.a.TOUCH]),children:s.a.any,className:s.a.string,hoverDelayInMs:s.a.number,hoverOffDelayInMs:s.a.number,isEnabled:s.a.bool,mapChildProps:s.a.func,onActivationChanged:s.a.func,onDetectedEnvironmentChanged:s.a.func,onPositionChanged:s.a.func,pressDurationInMs:s.a.number,pressMoveThreshold:s.a.number,shouldDecorateChildren:s.a.bool,shouldStopTouchMovePropagation:s.a.bool,style:s.a.object,tapDurationInMs:s.a.number,tapMoveThreshold:s.a.number},E.defaultProps={activationInteractionMouse:v.a.HOVER,activationInteractionTouch:v.a.PRESS,hoverDelayInMs:0,hoverOffDelayInMs:0,isEnabled:!0,mapChildProps:function(e){return e},onActivationChanged:y.a,onDetectedEnvironmentChanged:y.a,onPositionChanged:y.a,pressDurationInMs:500,pressMoveThreshold:5,shouldDecorateChildren:!0,shouldStopTouchMovePropagation:!1,tapDurationInMs:180,tapMoveThreshold:5};var x=function(){var e=this;this.onPositionChanged=function(){(0,e.props.onPositionChanged)(e.state)}};t.a=E},function(e,t,n){"use strict";/*!
* object.omit <https://github.com/jonschlinkert/object.omit>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
var r=n(29);e.exports=function(e,t,n){if(!r(e))return{};"function"==typeof t&&(n=t,t=[]),"string"==typeof t&&(t=[t]);for(var i="function"==typeof n,o=Object.keys(e),a={},u=0;u<o.length;u++){var l=o[u],s=e[l];t&&(-1!==t.indexOf(l)||i&&!n(s,l,e))||(a[l]=s)}return a}},function(e,t,n){"use strict";/*!
* is-extendable <https://github.com/jonschlinkert/is-extendable>
*
* Copyright (c) 2015-2017, Jon Schlinkert.
* Released under the MIT License.
*/
var r=n(30);e.exports=function(e){return r(e)||"function"==typeof e||Array.isArray(e)}},function(e,t,n){"use strict";function r(e){return!0===i(e)&&"[object Object]"===Object.prototype.toString.call(e)}/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
var i=n(31);e.exports=function(e){var t,n;return!1!==r(e)&&("function"==typeof(t=e.constructor)&&(n=t.prototype,!1!==r(n)&&!1!==n.hasOwnProperty("isPrototypeOf")))}},function(e,t,n){"use strict";/*!
* isobject <https://github.com/jonschlinkert/isobject>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=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}}(),o=function(){function e(t){r(this,e),this.el=t}return i(e,[{key:"getDocumentRelativeElementOffset",value:function(e){var t=this.getRootOfEl(e),n=t.getBoundingClientRect(),r=n.left,i=n.top,o=e.getBoundingClientRect(),a=o.left,u=o.top;return{x:Math.abs(r)+a,y:Math.abs(i)+u}}},{key:"getRootOfEl",value:function(e){return e.parentElement?this.getRootOfEl(e.parentElement):e}},{key:"getComputedElementRelativeCursorPosition",value:function(e,t){this.lastEvent=e;var n=this.getDocumentRelativeCursorPosition(e),r=n.x,i=n.y,o=t.x,a=t.y;return{x:Math.round(r-o),y:Math.round(i-a)}}},{key:"getDocumentRelativeCursorPosition",value:function(e){return{x:e.pageX,y:e.pageY}}},{key:"getCursorPosition",value:function(e){return this.getComputedElementRelativeCursorPosition(e,this.documentRelativeElementOffset)}},{key:"documentRelativeElementOffset",get:function(){return this.elementOffset||(this.elementOffset=this.getDocumentRelativeElementOffset(this.el)),this.elementOffset}}]),e}();t.a=o},function(e,t,n){"use strict";function r(e,t,n,r){return e.addEventListener(t,n,r),{removeEventListener:function(){e.removeEventListener(t,n,r)}}}t.a=r},function(e,t,n){"use strict";t.a=function(){}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(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)}var a=n(5),u=n(7),l=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}}(),s=function(e){function t(e){var n=e.onIsActiveChanged,o=e.pressDurationInMs,a=e.pressMoveThreshold;r(this,t);var u=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{onIsActiveChanged:n}));return u.pressDurationInMs=o,u.pressMoveThreshold=a,u}return o(t,e),l(t,[{key:"touchStarted",value:function(e){var t=e.position;this.initPressEventCriteria(t),this.setPressEventTimer()}},{key:"touchMoved",value:function(e){var t=e.position;this.isActive||this.setPressEventCriteria(t)}},{key:"setPressEventTimer",value:function(){var e=this;this.timers.push({name:a.c,id:setTimeout(function(){Math.abs(e.currentElTop-e.initialElTop)<e.pressMoveThreshold&&e.activate()},this.pressDurationInMs)})}},{key:"setPressEventCriteria",value:function(e){this.currentElTop=e.y}},{key:"initPressEventCriteria",value:function(e){var t=e.y;this.initialElTop=t,this.currentElTop=t}}]),t}(u.a);t.a=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(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)}var a=n(7),u=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}}(),l=function(e){function t(e){var n=e.onIsActiveChanged;return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{onIsActiveChanged:n}))}return o(t,e),u(t,[{key:"touchStarted",value:function(e){e.e.preventDefault(),this.activate()}}]),t}(a.a);t.a=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(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)}var a=n(5),u=n(7),l=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}}(),s=function(e){function t(e){var n=e.onIsActiveChanged,o=e.tapDurationInMs,a=e.tapMoveThreshold;r(this,t);var u=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{onIsActiveChanged:n}));return u.hasTapGestureEnded=!1,u.tapDurationInMs=o,u.tapMoveThreshold=a,u}return o(t,e),l(t,[{key:"touchStarted",value:function(e){var t=e.position;this.hasTapGestureEnded=!1,this.initMoveThreshold(t),this.setTapEventTimer()}},{key:"touchMoved",value:function(e){var t=e.position;this.isActive||this.setMoveThresholdCriteria(t)}},{key:"touchEnded",value:function(){this.hasTapGestureEnded=!0}},{key:"setTapEventTimer",value:function(){var e=this;this.timers.push({name:a.e,id:setTimeout(function(){e.isTapGestureActive&&e.toggleActivation()},this.tapDurationInMs)})}},{key:"setMoveThresholdCriteria",value:function(e){this.currentElTop=e.y}},{key:"initMoveThreshold",value:function(e){var t=e.y;this.initialElTop=t,this.currentElTop=t}},{key:"hasPassedMoveThreshold",get:function(){return Math.abs(this.currentElTop-this.initialElTop)>this.tapMoveThreshold}},{key:"isTapGestureActive",get:function(){return!this.hasPassedMoveThreshold&&this.hasTapGestureEnded}}]),t}(u.a);t.a=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(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)}var a=n(5),u=n(10),l=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}}(),s=function(e){function t(e){var n=e.onIsActiveChanged,o=e.hoverDelayInMs,a=e.hoverOffDelayInMs;r(this,t);var u=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{onIsActiveChanged:n}));return u.hoverDelayInMs=o,u.hoverOffDelayInMs=a,u}return o(t,e),l(t,[{key:"mouseEntered",value:function(){this.clearTimers(),this.schedulActivation(this.hoverDelayInMs)}},{key:"mouseLeft",value:function(){this.clearTimers(),this.scheduleDeactivation(this.hoverOffDelayInMs)}},{key:"schedulActivation",value:function(e){var t=this,n=setTimeout(function(){t.activate()},e);this.timers.push({id:n,name:a.d})}},{key:"scheduleDeactivation",value:function(e){var t=this,n=setTimeout(function(){t.deactivate()},e);this.timers.push({id:n,name:a.f})}}]),t}(u.a);t.a=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(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)}var a=n(10),u=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}}(),l=function(e){function t(e){var n=e.onIsActiveChanged;return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{onIsActiveChanged:n}))}return o(t,e),u(t,[{key:"mouseClicked",value:function(){this.toggleActivation()}}]),t}(a.a);t.a=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(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)}var a=n(0),u=n.n(a),l=n(41),s=n.n(l),c=n(2),f=n.n(c),d=n(1),p=n.n(d),h=n(45),m=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}}(),v=function(e){function t(){var e,n,o,a;r(this,t);for(var u=arguments.length,l=Array(u),s=0;s<u;s++)l[s]=arguments[s];return n=o=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.state={isMounted:!1},a=n,i(o,a)}return o(t,e),m(t,[{key:"componentDidMount",value:function(){if(this.setState({isMounted:!0}),this.isPortalRendered){var e=this.props.portalId;this.portalElement=document.getElementById(e)}}},{key:"render",value:function(){if(!this.isMounted)return null;var e=this.compositProps;return this.isPortalRendered?s.a.createPortal(u.a.createElement(h.a,e),this.portalElement):u.a.createElement(h.a,e)}},{key:"isPortalIdImplemented",get:function(){return!!this.props.portalId}},{key:"isPortalRendered",get:function(){var e=this.props,t=e.isPortalEnabledForTouch,n=e.isTouchDetected;return!!this.isPortalIdImplemented&&(!n||!!t)}},{key:"isMounted",get:function(){return this.state.isMounted}},{key:"compositProps",get:function(){return p()({},this.props,{isPortalRendered:this.isPortalRendered})}}]),t}(a.Component);v.propTypes={isPortalEnabledForTouch:f.a.bool.isRequired,isTouchDetected:f.a.bool.isRequired,portalId:f.a.string},t.a=v},function(e,t,n){"use strict";function r(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}r(),e.exports=n(42)},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a,u){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,u],s=0;e=Error(t.replace(/%s/g,function(){return l[s++]})),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function i(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=0;i<t;i++)n+="&args[]="+encodeURIComponent(arguments[i+1]);r(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function o(e,t,n,r,i,o,a,u,l){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(e){this.onError(e)}}function a(e,t,n,r,i,a,u,l,s){kr=!1,Cr=null,o.apply(Pr,arguments)}function u(e,t,n,r,o,u,l,s,c){if(a.apply(this,arguments),kr){if(kr){var f=Cr;kr=!1,Cr=null}else i("198"),f=void 0;Er||(Er=!0,xr=f)}}function l(){if(Sr)for(var e in _r){var t=_r[e],n=Sr.indexOf(e);if(-1<n||i("96",e),!Mr[n]){t.extractEvents||i("97",e),Mr[n]=t,n=t.eventTypes;for(var r in n){var o=void 0,a=n[r],u=t,l=r;Ir.hasOwnProperty(l)&&i("99",l),Ir[l]=a;var c=a.phasedRegistrationNames;if(c){for(o in c)c.hasOwnProperty(o)&&s(c[o],u,l);o=!0}else a.registrationName?(s(a.registrationName,u,l),o=!0):o=!1;o||i("98",r,e)}}}}function s(e,t,n){Or[e]&&i("100",e),Or[e]=t,Dr[e]=t.eventTypes[n].dependencies}function c(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=Nr(r),u(t,n,void 0,e),e.currentTarget=null}function f(e,t){return null==t&&i("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function d(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}function p(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var i=0;i<n.length&&!e.isPropagationStopped();i++)c(e,t,n[i],r[i]);else n&&c(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function h(e){return p(e,!0)}function m(e){return p(e,!1)}function v(e,t){var n=e.stateNode;if(!n)return null;var r=jr(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(e=e.type,r=!("button"===e||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&i("231",t,typeof n),n)}function y(e,t){if(null!==e&&(Lr=f(Lr,e)),e=Lr,Lr=null,e&&(t?d(e,h):d(e,m),Lr&&i("95"),Er))throw t=xr,Er=!1,xr=null,t}function g(e){if(e[Ur])return e[Ur];for(;!e[Ur];){if(!e.parentNode)return null;e=e.parentNode}return e=e[Ur],7===e.tag||8===e.tag?e:null}function b(e){return e=e[Ur],!e||7!==e.tag&&8!==e.tag?null:e}function w(e){if(7===e.tag||8===e.tag)return e.stateNode;i("33")}function T(e){return e[Fr]||null}function k(e){do{e=e.return}while(e&&7!==e.tag);return e||null}function C(e,t,n){(t=v(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=f(n._dispatchListeners,t),n._dispatchInstances=f(n._dispatchInstances,e))}function E(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=k(t);for(t=n.length;0<t--;)C(n[t],"captured",e);for(t=0;t<n.length;t++)C(n[t],"bubbled",e)}}function x(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=v(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=f(n._dispatchListeners,t),n._dispatchInstances=f(n._dispatchInstances,e))}function P(e){e&&e.dispatchConfig.registrationName&&x(e._targetInst,null,e)}function S(e){d(e,E)}function _(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}function M(e){if(Br[e])return Br[e];if(!Hr[e])return e;var t,n=Hr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Vr)return Br[e]=n[t];return e}function I(){if($r)return $r;var e,t,n=Zr,r=n.length,i="value"in Xr?Xr.value:Xr.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return $r=i.slice(e,1<t?1-t:void 0)}function O(){return!0}function D(){return!1}function j(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface;for(var i in e)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?O:D,this.isPropagationStopped=D,this}function A(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function N(e){e instanceof this||i("279"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function L(e){e.eventPool=[],e.getPooled=A,e.release=N}function R(e,t){switch(e){case"keyup":return-1!==ti.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function z(e){return e=e.detail,"object"==typeof e&&"data"in e?e.data:null}function U(e,t){switch(e){case"compositionend":return z(t);case"keypress":return 32!==t.which?null:(li=!0,ai);case"textInput":return e=t.data,e===ai&&li?null:e;default:return null}}function F(e,t){if(si)return"compositionend"===e||!ni&&R(e,t)?(e=I(),$r=Zr=Xr=null,si=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return oi&&"ko"!==t.locale?null:t.data;default:return null}}function W(e){if(e=Ar(e)){"function"!=typeof fi&&i("280");var t=jr(e.stateNode);fi(e.stateNode,e.type,t)}}function H(e){di?pi?pi.push(e):pi=[e]:di=e}function B(){if(di){var e=di,t=pi;if(pi=di=null,W(e),t)for(e=0;e<t.length;e++)W(t[e])}}function V(e,t){return e(t)}function G(e,t,n){return e(t,n)}function Y(){}function Q(e,t){if(hi)return e(t);hi=!0;try{return V(e,t)}finally{hi=!1,(null!==di||null!==pi)&&(Y(),B())}}function K(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!mi[e.type]:"textarea"===t}function q(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function X(e){if(!Wr)return!1;e="on"+e;var t=e in document;return t||(t=document.createElement("div"),t.setAttribute(e,"return;"),t="function"==typeof t[e]),t}function Z(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function $(e){var t=Z(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)