react-drag-resize-dialog-cc
Version:
基于 react-rnd 的一个可以移动可以改变大小的对话框组件
22 lines • 189 kB
JavaScript
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s=5)}([function(e,t,n){"use strict";e.exports=n(6)},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(7)},function(e,t,n){"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}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,l,u=a(e),s=1;s<arguments.length;s++){for(var c in n=Object(arguments[s]))i.call(n,c)&&(u[c]=n[c]);if(r){l=r(n);for(var f=0;f<l.length;f++)o.call(n,l[f])&&(u[l[f]]=n[l[f]])}}return u}},function(e,t,n){var r,i;window,e.exports=(r=n(1),i=n(0),function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){e.exports=n(5)()},function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){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=i.apply(null,r);a&&e.push(a)}else if("object"===o)for(var l in r)n.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){var r=n(7),i=r.default,o=r.DraggableCore;e.exports=i,e.exports.default=i,e.exports.DraggableCore=o},function(e,t,n){"use strict";var r=n(6);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var l=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 l.name="Invariant Violation",l}}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:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return ge})),n.d(t,"DraggableCore",(function(){return ne}));var r=n(2),i=n.n(r),o=n(0),a=n.n(o),l=n(1),u=n.n(l),s=n(3),c=n.n(s);function f(e,t){for(var n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function d(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)}function p(e){return"number"==typeof e&&!isNaN(e)}function h(e){return parseInt(e,10)}function m(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))}var g=["Moz","Webkit","O","ms"];function y(e,t){return t?"".concat(t).concat(function(e){for(var t="",n=!0,r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}var v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window||void 0===window.document)return"";var t=window.document.documentElement.style;if(e in t)return"";for(var n=0;n<g.length;n++)if(y(e,g[n])in t)return g[n];return""}();function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S="";function k(e,t){return S||(S=f(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(t){return d(e[t])}))),!!d(e[S])&&e[S](t)}function E(e,t,n){var r=e;do{if(k(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function T(e,t,n,r){if(e){var i=w({capture:!0},r);e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}}function P(e,t,n,r){if(e){var i=w({capture:!0},r);e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}}function z(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t+=h(n.borderTopWidth))+h(n.borderBottomWidth)}function C(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t+=h(n.borderLeftWidth))+h(n.borderRightWidth)}function _(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t-=h(n.paddingTop))-h(n.paddingBottom)}function O(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t-=h(n.paddingLeft))-h(n.paddingRight)}function N(e,t,n){var r=e.x,i=e.y,o="translate(".concat(r).concat(n,",").concat(i).concat(n,")");if(t){var a="".concat("string"==typeof t.x?t.x:t.x+n),l="".concat("string"==typeof t.y?t.y:t.y+n);o="translate(".concat(a,", ").concat(l,")")+o}return o}function R(e){return e.targetTouches&&e.targetTouches[0]?e.targetTouches[0].identifier:e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].identifier:void 0}function D(e){if(e){var t,n,r=e.getElementById("react-draggable-style-el");r||((r=e.createElement("style")).type="text/css",r.id="react-draggable-style-el",r.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",r.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(r)),e.body&&(n="react-draggable-transparent-selection",(t=e.body).classList?t.classList.add(n):t.className.match(new RegExp("(?:^|\\s)".concat(n,"(?!\\S)")))||(t.className+=" ".concat(n)))}}function M(e){var t,n;if(e)try{if(e.body&&(t=e.body,n="react-draggable-transparent-selection",t.classList?t.classList.remove(n):t.className=t.className.replace(new RegExp("(?:^|\\s)".concat(n,"(?!\\S)"),"g"),"")),e.selection)e.selection.empty();else{var r=(e.defaultView||window).getSelection();r&&"Caret"!==r.type&&r.removeAllRanges()}}catch(e){}}function j(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function L(e){return"both"===e.props.axis||"x"===e.props.axis}function I(e){return"both"===e.props.axis||"y"===e.props.axis}function F(e,t,n){var r="number"==typeof t?function(e,t){return e.targetTouches&&f(e.targetTouches,(function(e){return t===e.identifier}))||e.changedTouches&&f(e.changedTouches,(function(e){return t===e.identifier}))}(e,t):null;if("number"==typeof t&&!r)return null;var i=H(n);return function(e,t,n){var r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect();return{x:(e.clientX+t.scrollLeft-r.left)/n,y:(e.clientY+t.scrollTop-r.top)/n}}(r||e,n.props.offsetParent||i.offsetParent||i.ownerDocument.body,n.props.scale)}function W(e,t,n){var r=e.state,i=!p(r.lastX),o=H(e);return i?{node:o,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:o,deltaX:t-r.lastX,deltaY:n-r.lastY,lastX:r.lastX,lastY:r.lastY,x:t,y:n}}function A(e,t){var n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function H(e){var t=u.a.findDOMNode(e);if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}function U(e){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return V(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $(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)}}function Y(e,t){return!t||"object"!==U(t)&&"function"!=typeof t?X(e):t}function X(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Z={start:"touchstart",move:"touchmove",stop:"touchend"},ee={start:"mousedown",move:"mousemove",stop:"mouseup"},te=ee,ne=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}(a,e);var t,n,r,o=(t=a,function(){var e,n=K(t);if(q()){var r=K(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Y(this,e)});function a(){var e;Q(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return J(X(e=o.call.apply(o,[this].concat(n))),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),J(X(e),"mounted",!1),J(X(e),"handleDragStart",(function(t){if(e.props.onMouseDown(t),!e.props.allowAnyClick&&"number"==typeof t.button&&0!==t.button)return!1;var n=u.a.findDOMNode(X(e));if(!n||!n.ownerDocument||!n.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var r=n.ownerDocument;if(!(e.props.disabled||!(t.target instanceof r.defaultView.Node)||e.props.handle&&!E(t.target,e.props.handle,n)||e.props.cancel&&E(t.target,e.props.cancel,n))){"touchstart"===t.type&&t.preventDefault();var i=R(t);e.setState({touchIdentifier:i});var o=F(t,i,X(e));if(null!=o){var a=o.x,l=o.y,s=W(X(e),a,l);e.props.onStart,!1!==e.props.onStart(t,s)&&!1!==e.mounted&&(e.props.enableUserSelectHack&&D(r),e.setState({dragging:!0,lastX:a,lastY:l}),T(r,te.move,e.handleDrag),T(r,te.stop,e.handleDragStop))}}})),J(X(e),"handleDrag",(function(t){var n=F(t,e.state.touchIdentifier,X(e));if(null!=n){var r=n.x,i=n.y;if(Array.isArray(e.props.grid)){var o=r-e.state.lastX,a=i-e.state.lastY,l=B(j(e.props.grid,o,a),2);if(o=l[0],a=l[1],!o&&!a)return;r=e.state.lastX+o,i=e.state.lastY+a}var u=W(X(e),r,i);if(!1!==e.props.onDrag(t,u)&&!1!==e.mounted)e.setState({lastX:r,lastY:i});else try{e.handleDragStop(new MouseEvent("mouseup"))}catch(t){var s=document.createEvent("MouseEvents");s.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.handleDragStop(s)}}})),J(X(e),"handleDragStop",(function(t){if(e.state.dragging){var n=F(t,e.state.touchIdentifier,X(e));if(null!=n){var r=n.x,i=n.y,o=W(X(e),r,i);if(!1===e.props.onStop(t,o)||!1===e.mounted)return!1;var a=u.a.findDOMNode(X(e));a&&e.props.enableUserSelectHack&&M(a.ownerDocument),e.setState({dragging:!1,lastX:NaN,lastY:NaN}),a&&(P(a.ownerDocument,te.move,e.handleDrag),P(a.ownerDocument,te.stop,e.handleDragStop))}}})),J(X(e),"onMouseDown",(function(t){return te=ee,e.handleDragStart(t)})),J(X(e),"onMouseUp",(function(t){return te=ee,e.handleDragStop(t)})),J(X(e),"onTouchStart",(function(t){return te=Z,e.handleDragStart(t)})),J(X(e),"onTouchEnd",(function(t){return te=Z,e.handleDragStop(t)})),e}return n=a,(r=[{key:"componentDidMount",value:function(){this.mounted=!0;var e=u.a.findDOMNode(this);e&&T(e,Z.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=u.a.findDOMNode(this);if(e){var t=e.ownerDocument;P(t,ee.move,this.handleDrag),P(t,Z.move,this.handleDrag),P(t,ee.stop,this.handleDragStop),P(t,Z.stop,this.handleDragStop),P(e,Z.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&M(t)}}},{key:"render",value:function(){return i.a.cloneElement(i.a.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&$(n.prototype,r),a}(i.a.Component);function re(e){return(re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ie(){return(ie=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ue(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)}}function se(e,t,n){return t&&ue(e.prototype,t),n&&ue(e,n),e}function ce(e,t){return!t||"object"!==re(t)&&"function"!=typeof t?fe(e):t}function fe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function de(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function pe(e){return(pe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function he(e,t){return(he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}J(ne,"displayName","DraggableCore"),J(ne,"propTypes",{allowAnyClick:a.a.bool,disabled:a.a.bool,enableUserSelectHack:a.a.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:a.a.arrayOf(a.a.number),handle:a.a.string,cancel:a.a.string,onStart:a.a.func,onDrag:a.a.func,onStop:a.a.func,onMouseDown:a.a.func,scale:a.a.number,className:m,style:m,transform:m}),J(ne,"defaultProps",{allowAnyClick:!1,cancel:null,disabled:!1,enableUserSelectHack:!0,offsetParent:null,handle:null,grid:null,transform:null,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1});var ge=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&he(e,t)}(r,e);var t,n=(t=r,function(){var e,n=pe(t);if(de()){var r=pe(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return ce(this,e)});function r(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),me(fe(t=n.call(this,e)),"onDragStart",(function(e,n){if(!1===t.props.onStart(e,A(fe(t),n)))return!1;t.setState({dragging:!0,dragged:!0})})),me(fe(t),"onDrag",(function(e,n){if(!t.state.dragging)return!1;var r=A(fe(t),n),i={x:r.x,y:r.y};if(t.props.bounds){var o=i.x,a=i.y;i.x+=t.state.slackX,i.y+=t.state.slackY;var l=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oe(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(function(e,t,n){if(!e.props.bounds)return[t,n];var r=e.props.bounds;r="string"==typeof r?r:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(r);var i=H(e);if("string"==typeof r){var o,a=i.ownerDocument,l=a.defaultView;if(!((o="parent"===r?i.parentNode:a.querySelector(r))instanceof l.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');var u=l.getComputedStyle(i),s=l.getComputedStyle(o);r={left:-i.offsetLeft+h(s.paddingLeft)+h(u.marginLeft),top:-i.offsetTop+h(s.paddingTop)+h(u.marginTop),right:O(o)-C(i)-i.offsetLeft+h(s.paddingRight)-h(u.marginRight),bottom:_(o)-z(i)-i.offsetTop+h(s.paddingBottom)-h(u.marginBottom)}}return p(r.right)&&(t=Math.min(t,r.right)),p(r.bottom)&&(n=Math.min(n,r.bottom)),p(r.left)&&(t=Math.max(t,r.left)),p(r.top)&&(n=Math.max(n,r.top)),[t,n]}(fe(t),i.x,i.y),2),u=l[0],s=l[1];i.x=u,i.y=s,i.slackX=t.state.slackX+(o-i.x),i.slackY=t.state.slackY+(a-i.y),r.x=i.x,r.y=i.y,r.deltaX=i.x-t.state.x,r.deltaY=i.y-t.state.y}if(!1===t.props.onDrag(e,r))return!1;t.setState(i)})),me(fe(t),"onDragStop",(function(e,n){if(!t.state.dragging)return!1;if(!1===t.props.onStop(e,A(fe(t),n)))return!1;var r={dragging:!1,slackX:0,slackY:0};if(Boolean(t.props.position)){var i=t.props.position,o=i.x,a=i.y;r.x=o,r.y=a}t.setState(r)})),t.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:le({},e.position),slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),t}return se(r,null,[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.position,r=t.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:{x:n.x,y:n.y,prevPropsPosition:le({},n)}}}]),se(r,[{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&u.a.findDOMNode(this)instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"render",value:function(){var e,t=this.props,n=(t.axis,t.bounds,t.children),r=t.defaultPosition,o=t.defaultClassName,a=t.defaultClassNameDragging,l=t.defaultClassNameDragged,u=t.position,s=t.positionOffset,f=(t.scale,function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"])),d={},p=null,h=!Boolean(u)||this.state.dragging,m=u||r,g={x:L(this)&&h?this.state.x:m.x,y:I(this)&&h?this.state.y:m.y};this.state.isElementSVG?p=function(e,t){return N(e,t,"")}(g,s):d=function(e,t){var n=N(e,t,"px");return x({},y("transform",v),n)}(g,s);var b=c()(n.props.className||"",o,(me(e={},a,this.state.dragging),me(e,l,this.state.dragged),e));return i.a.createElement(ne,ie({},f,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),i.a.cloneElement(i.a.Children.only(n),{className:b,style:le({},n.props.style,{},d),transform:p}))}}]),r}(i.a.Component);me(ge,"displayName","Draggable"),me(ge,"propTypes",le({},ne.propTypes,{axis:a.a.oneOf(["both","x","y","none"]),bounds:a.a.oneOfType([a.a.shape({left:a.a.number,right:a.a.number,top:a.a.number,bottom:a.a.number}),a.a.string,a.a.oneOf([!1])]),defaultClassName:a.a.string,defaultClassNameDragging:a.a.string,defaultClassNameDragged:a.a.string,defaultPosition:a.a.shape({x:a.a.number,y:a.a.number}),positionOffset:a.a.shape({x:a.a.oneOfType([a.a.number,a.a.string]),y:a.a.oneOfType([a.a.number,a.a.string])}),position:a.a.shape({x:a.a.number,y:a.a.number}),className:m,style:m,transform:m})),me(ge,"defaultProps",le({},ne.defaultProps,{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},position:null,scale:1}))}]))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(n(0)),s=n(13),c=l(n(14)),f={width:"auto",height:"auto"},d=c.default((function(e,t,n){return Math.max(Math.min(e,n),t)})),p=c.default((function(e,t){return Math.round(e/t)*t})),h=c.default((function(e,t){return new RegExp(e,"i").test(t)})),m=c.default((function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,i){return Math.abs(r-e)<Math.abs(t[n]-e)?i:n}),0),i=Math.abs(t[r]-e);return 0===n||i<n?t[r]:e})),g=c.default((function(e,t){return e.substr(e.length-t.length,t.length)===t})),y=c.default((function(e){return"auto"===(e=e.toString())||g(e,"px")||g(e,"%")||g(e,"vh")||g(e,"vw")||g(e,"vmax")||g(e,"vmin")?e:e+"px"})),v=function(e,t,n,r){if(e&&"string"==typeof e){if(g(e,"%"))return t*(Number(e.replace("%",""))/100);if(g(e,"vw"))return n*(Number(e.replace("vw",""))/100);if(g(e,"vh"))return r*(Number(e.replace("vh",""))/100)}return e},b=c.default((function(e,t,n,r,i,o,a){return r=v(r,e.width,t,n),i=v(i,e.height,t,n),o=v(o,e.width,t,n),a=v(a,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===i?void 0:Number(i),minWidth:void 0===o?void 0:Number(o),minHeight:void 0===a?void 0:Number(a)}})),w=["style","className","grid","snap","bounds","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],x=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableTop=0,n.targetLeft=0,n.targetTop=0,n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return i(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||f},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"base",{get:function(){var e=this.parentNode;if(e)for(var t=0,n=[].slice.call(e.children);t<n.length;t++){var r=n[t];if(r.classList.contains("__resizable_base__"))return r}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;"relative"!==i&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=i}return{width:e,height:t}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&g(e.propsSize[t].toString(),"%")){if(g(e.state[t].toString(),"%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return y(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?y(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?y(t.height):n("height")}},enumerable:!0,configurable:!0}),t.prototype.getParentSize=function(){if(!this.base||!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=!1,t=this.parentNode.style.flexWrap,n=this.base.style.minWidth;"wrap"!==t&&(e=!0,this.parentNode.style.flexWrap="wrap"),this.base.style.position="relative",this.base.style.minWidth="100%";var r={width:this.base.offsetWidth,height:this.base.offsetHeight};return this.base.style.position="absolute",e&&(this.parentNode.style.flexWrap=t),this.base.style.minWidth=n,r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0});var t=this.parentNode;if(t&&!this.base){var n=this.window.document.createElement("div");n.style.width="100%",n.style.height="100%",n.style.position="absolute",n.style.transform="scale(0, 0)",n.style.left="0",n.style.flex="0",n.classList?n.classList.add("__resizable_base__"):n.className+="__resizable_base__",t.appendChild(n)}}},t.prototype.componentWillUnmount=function(){if(this.window){this.unbindEvents();var e=this.parentNode;if(!this.base||!e)return;if(!e||!this.base)return;e.removeChild(this.base)}},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){if("parent"===this.props.bounds){var n=this.parentNode;if(n){var r=n.offsetWidth+(this.parentLeft-this.resizableLeft),i=n.offsetHeight+(this.parentTop-this.resizableTop);e=e&&e<r?e:r,t=t&&t<i?t:i}}else if("window"===this.props.bounds){if(this.window){r=this.window.innerWidth-this.resizableLeft,i=this.window.innerHeight-this.resizableTop;e=e&&e<r?e:r,t=t&&t<i?t:i}}else if(this.props.bounds){r=this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop);e=e&&e<r?e:r,t=t&&t<i?t:i}return{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,i=this.state,o=i.direction,a=i.original,l=this.props,u=l.lockAspectRatio,s=l.lockAspectRatioExtraHeight,c=l.lockAspectRatioExtraWidth,f=a.width,d=a.height,p=s||0,m=c||0;return h("right",o)&&(f=a.width+(e-a.x)*r/n,u&&(d=(f-m)/this.ratio+p)),h("left",o)&&(f=a.width-(e-a.x)*r/n,u&&(d=(f-m)/this.ratio+p)),h("bottom",o)&&(d=a.height+(t-a.y)*r/n,u&&(f=(d-p)*this.ratio+m)),h("top",o)&&(d=a.height-(t-a.y)*r/n,u&&(f=(d-p)*this.ratio+m)),{newWidth:f,newHeight:d}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var i=this.props,o=i.lockAspectRatio,a=i.lockAspectRatioExtraHeight,l=i.lockAspectRatioExtraWidth,u=void 0===r.width?10:r.width,s=void 0===n.width||n.width<0?e:n.width,c=void 0===r.height?10:r.height,f=void 0===n.height||n.height<0?t:n.height,p=a||0,h=l||0;if(o){var m=(c-p)*this.ratio+h,g=(f-p)*this.ratio+h,y=(u-h)/this.ratio+p,v=(s-h)/this.ratio+p,b=Math.max(u,m),w=Math.min(s,g),x=Math.max(c,y),S=Math.min(f,v);e=d(e,b,w),t=d(t,x,S)}else e=d(e,u,s),t=d(t,c,f);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),i=r.left,o=r.top;this.resizableLeft=i,this.resizableTop=o}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,i=0;if(e.nativeEvent instanceof this.window.MouseEvent){if(r=e.nativeEvent.clientX,i=e.nativeEvent.clientY,3===e.nativeEvent.which)return}else e.nativeEvent instanceof this.window.TouchEvent&&(r=e.nativeEvent.touches[0].clientX,i=e.nativeEvent.touches[0].clientY);if(this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var a=this.window.getComputedStyle(this.resizable);if("auto"!==a.flexBasis){var l=this.parentNode;if(l){var u=this.window.getComputedStyle(l).flexDirection;this.flexDir=u.startsWith("row")?"row":"column",n=a.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var s={original:{x:r,y:i,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:o(o({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(s)}},t.prototype.onMouseMove=function(e){if(this.state.isResizing&&this.resizable&&this.window){var t=this.props,n=t.maxWidth,r=t.maxHeight,i=t.minWidth,o=t.minHeight,a=e instanceof this.window.MouseEvent?e.clientX:e.touches[0].clientX,l=e instanceof this.window.MouseEvent?e.clientY:e.touches[0].clientY,u=this.state,s=u.direction,c=u.original,f=u.width,d=u.height,h=this.getParentSize(),y=b(h,this.window.innerWidth,this.window.innerHeight,n,r,i,o);n=y.maxWidth,r=y.maxHeight,i=y.minWidth,o=y.minHeight;var v=this.calculateNewSizeFromDirection(a,l),w=v.newHeight,x=v.newWidth,S=this.calculateNewMaxFromBoundary(n,r),k=this.calculateNewSizeFromAspectRatio(x,w,{width:S.maxWidth,height:S.maxHeight},{width:i,height:o});if(x=k.newWidth,w=k.newHeight,this.props.grid){var E=p(x,this.props.grid[0]),T=p(w,this.props.grid[1]),P=this.props.snapGap||0;x=0===P||Math.abs(E-x)<=P?E:x,w=0===P||Math.abs(T-w)<=P?T:w}this.props.snap&&this.props.snap.x&&(x=m(x,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(w=m(w,this.props.snap.y,this.props.snapGap));var z={width:x-c.width,height:w-c.height};if(f&&"string"==typeof f)if(g(f,"%"))x=x/h.width*100+"%";else if(g(f,"vw")){x=x/this.window.innerWidth*100+"vw"}else if(g(f,"vh")){x=x/this.window.innerHeight*100+"vh"}if(d&&"string"==typeof d)if(g(d,"%"))w=w/h.height*100+"%";else if(g(d,"vw")){w=w/this.window.innerWidth*100+"vw"}else if(g(d,"vh")){w=w/this.window.innerHeight*100+"vh"}var C={width:this.createSizeForCssProperty(x,"width"),height:this.createSizeForCssProperty(w,"height")};"row"===this.flexDir?C.flexBasis=C.width:"column"===this.flexDir&&(C.flexBasis=C.height),this.setState(C),this.props.onResize&&this.props.onResize(e,s,this.resizable,z)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,i=t.original;if(n&&this.resizable){var a={width:this.size.width-i.width,height:this.size.height-i.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,a),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:o(o({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,i=t.handleClasses,o=t.handleWrapperStyle,a=t.handleWrapperClass,l=t.handleComponent;if(!n)return null;var c=Object.keys(n).map((function(t){return!1!==n[t]?u.createElement(s.Resizer,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:i&&i[t]},l&&l[t]?l[t]:null):null}));return u.createElement("span",{className:a,style:o},c)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==w.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=o(o(o({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});return this.state.flexBasis&&(n.flexBasis=this.state.flexBasis),u.createElement("div",o({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&u.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(u.PureComponent);t.Resizable=x},function(e,t,n){"use strict";var r=a(n(0)),i=n(1),o=a(n(10));function a(e){return e&&e.__esModule?e:{default:e}}(0,i.render)(r.default.createElement((function(){return r.default.createElement(o.default,null)}),null),document.getElementById("root"))},function(e,t,n){"use strict";
/** @license React v16.13.1
* react.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.
*/var r=n(2),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,l=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,s=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,d=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,h=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,g="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||v}function x(){}function S(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||v}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(y(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=w.prototype;var k=S.prototype=new x;k.constructor=S,r(k,w.prototype),k.isPureReactComponent=!0;var E={current:null},T=Object.prototype.hasOwnProperty,P={key:!0,ref:!0,__self:!0,__source:!0};function z(e,t,n){var r,i={},a=null,l=null;if(null!=t)for(r in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(a=""+t.key),t)T.call(t,r)&&!P.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:e,key:a,ref:l,props:i,_owner:E.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var _=/\/+/g,O=[];function N(e,t,n,r){if(O.length){var i=O.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function R(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>O.length&&O.push(e)}function D(e,t,n){return null==e?0:function e(t,n,r,i){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var u=!1;if(null===t)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case o:case a:u=!0}}if(u)return r(i,t,""===n?"."+M(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;s<t.length;s++){var c=n+M(l=t[s],s);u+=e(l,c,r,i)}else if(null===t||"object"!=typeof t?c=null:c="function"==typeof(c=g&&t[g]||t["@@iterator"])?c:null,"function"==typeof c)for(t=c.call(t),s=0;!(l=t.next()).done;)u+=e(l=l.value,c=n+M(l,s++),r,i);else if("object"===l)throw r=""+t,Error(y(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return u}(e,"",t,n)}function M(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function j(e,t){e.func.call(e.context,t,e.count++)}function L(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?I(e,r,n,(function(e){return e})):null!=e&&(C(e)&&(e=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(_,"$&/")+"/")+n)),r.push(e))}function I(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(_,"$&/")+"/"),D(e,L,t=N(t,o,r,i)),R(t)}var F={current:null};function W(){var e=F.current;if(null===e)throw Error(y(321));return e}var A={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:E,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return I(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;D(e,j,t=N(null,null,t,n)),R(t)},count:function(e){return D(e,(function(){return null}),null)},toArray:function(e){var t=[];return I(e,t,null,(function(e){return e})),t},only:function(e){if(!C(e))throw Error(y(143));return e}},t.Component=w,t.Fragment=l,t.Profiler=s,t.PureComponent=S,t.StrictMode=u,t.Suspense=p,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A,t.cloneElement=function(e,t,n){if(null==e)throw Error(y(267,e));var i=r({},e.props),a=e.key,l=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(l=t.ref,u=E.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)T.call(t,c)&&!P.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==s?s[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){s=Array(c);for(var f=0;f<c;f++)s[f]=arguments[f+2];i.children=s}return{$$typeof:o,type:e.type,key:a,ref:l,props:i,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:c,_context:e},e.Consumer=e},t.createElement=z,t.createFactory=function(e){var t=z.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:d,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return W().useCallback(e,t)},t.useContext=function(e,t){return W().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return W().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return W().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return W().useLayoutEffect(e,t)},t.useMemo=function(e,t){return W().useMemo(e,t)},t.useReducer=function(e,t,n){return W().useReducer(e,t,n)},t.useRef=function(e){return W().useRef(e)},t.useState=function(e){return W().useState(e)},t.version="16.13.1"},function(e,t,n){"use strict";
/** @license React v16.13.1
* react-dom.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.
*/var r=n(0),i=n(2),o=n(8);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function l(e,t,n,r,i,o,a,l,u){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(e){this.onError(e)}}var u=!1,s=null,c=!1,f=null,d={onError:function(e){u=!0,s=e}};function p(e,t,n,r,i,o,a,c,f){u=!1,s=null,l.apply(d,arguments)}var h=null,m=null,g=null;function y(e,t,n){var r=e.type||"unknown-event";e.currentTarget=g(n),function(e,t,n,r,i,o,l,d,h){if(p.apply(this,arguments),u){if(!u)throw Error(a(198));var m=s;u=!1,s=null,c||(c=!0,f=m)}}(r,t,void 0,e),e.currentTarget=null}var v=null,b={};function w(){if(v)for(var e in b){var t=b[e],n=v.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!S[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in S[n]=t,n=t.eventTypes){var i=void 0,o=n[r],l=t,u=r;if(k.hasOwnProperty(u))throw Error(a(99,u));k[u]=o;var s=o.phasedRegistrationNames;if(s){for(i in s)s.hasOwnProperty(i)&&x(s[i],l,u);i=!0}else o.registrationName?(x(o.registrationName,l,u),i=!0):i=!1;if(!i)throw Error(a(98,r,e))}}}}function x(e,t,n){if(E[e])throw Error(a(100,e));E[e]=t,T[e]=t.eventTypes[n].dependencies}var S=[],k={},E={},T={};function P(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!b.hasOwnProperty(t)||b[t]!==r){if(b[t])throw Error(a(102,t));b[t]=r,n=!0}}n&&w()}var z=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),C=null,_=null,O=null;function N(e){if(e=m(e)){if("function"!=typeof C)throw Error(a(280));var t=e.stateNode;t&&(t=h(t),C(e.stateNode,e.type,t))}}function R(e){_?O?O.push(e):O=[e]:_=e}function D(){if(_){var e=_,t=O;if(O=_=null,N(e),t)for(e=0;e<t.length;e++)N(t[e])}}function M(e,t){return e(t)}function j(e,t,n,r,i){return e(t,n,r,i)}function L(){}var I=M,F=!1,W=!1;function A(){null===_&&null===O||(L(),D())}function H(e,t,n){if(W)return e(t,n);W=!0;try{return I(e,t,n)}finally{W=!1,A()}}var U=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,B=Object.prototype.hasOwnProperty,V={},Q={};function $(e,t,n,r,i,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o}var Y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){Y[e]=new $(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];Y[t]=new $(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){Y[e]=new $(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){Y[e]=new $(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){Y[e]=new $(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEa