diff --git a/dash_drag_grid/dash_drag_grid.min.js b/dash_drag_grid/dash_drag_grid.min.js index 1c76c08..a16544d 100644 --- a/dash_drag_grid/dash_drag_grid.min.js +++ b/dash_drag_grid/dash_drag_grid.min.js @@ -1,2 +1,2 @@ -(()=>{var e={51:(e,t,r)=>{(t=r(314)(!1)).push([e.id,'.react-grid-layout {\n position: relative;\n transition: height 200ms ease;\n}\n.react-grid-item {\n transition: all 200ms ease;\n transition-property: left, top;\n}\n.react-grid-item img {\n pointer-events: none;\n user-select: none; \n}\n.react-grid-item.cssTransforms {\n transition-property: transform;\n}\n.react-grid-item.resizing {\n z-index: 1;\n will-change: width, height;\n}\n\n.react-grid-item.react-draggable-dragging {\n transition: none;\n z-index: 3;\n will-change: transform;\n}\n\n.react-grid-item.dropping {\n visibility: hidden;\n}\n\n.react-grid-item.react-grid-placeholder {\n background: red;\n opacity: 0.2;\n transition-duration: 100ms;\n z-index: 2;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -o-user-select: none;\n user-select: none;\n}\n\n.react-grid-item > .react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n}\n\n.react-grid-item > .react-resizable-handle::after {\n content: "";\n position: absolute;\n right: 3px;\n bottom: 3px;\n width: 5px;\n height: 5px;\n border-right: 2px solid rgba(0, 0, 0, 0.4);\n border-bottom: 2px solid rgba(0, 0, 0, 0.4);\n}\n\n.react-resizable-hide > .react-resizable-handle {\n display: none;\n}\n\n.react-grid-item > .react-resizable-handle.react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-w,\n.react-grid-item > .react-resizable-handle.react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-n,\n.react-grid-item > .react-resizable-handle.react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n}\n',""]),e.exports=t},291:(e,t,r)=>{(t=r(314)(!1)).push([e.id,".react-resizable {\n position: relative;\n}\n.react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n background-repeat: no-repeat;\n background-origin: content-box;\n box-sizing: border-box;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+');\n background-position: bottom right;\n padding: 0 3px 3px 0;\n}\n.react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n}\n.react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n}\n.react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n}\n.react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n}\n.react-resizable-handle-w,\n.react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n}\n.react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n}\n.react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n}\n.react-resizable-handle-n,\n.react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n}\n.react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n}\n.react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n}",""]),e.exports=t},845:(e,t,r)=>{(t=r(314)(!1)).push([e.id,".react-grid-item.react-grid-placeholder {\n background: #ddd;\n box-shadow: inset 0px 1px 10px 2px rgba(30, 44, 57, 0.25);\n}\n\n/* Item */\n.item {\n background: #ffffff;\n /* border-radius: 5px; */\n box-shadow: 0px 1px 10px -1px rgba(30, 44, 57, 0.15);\n /* box-shadow: 0px 10px 25px -2px rgba(30, 44, 57, 0.15); */\n}\n/* .item:active {\n box-shadow: 0px 25px 25px -2px rgba(30, 44, 57, 0.15);\n transition: box-shadow 200ms;\n} */\n\n.item.active {\n box-shadow: 0px 25px 25px -2px rgba(30, 44, 57, 0.15);\n transition: box-shadow 200ms;\n border: 1px solid blue;\n}\n\n.toolbox {\n cursor: grab;\n word-wrap: break-word;\n}\n.item-top-container {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.item-top {\n height: 10px;\n line-height: 5px;\n padding-top: -5px;\n display: flex;\n cursor: grab;\n transition: background 200ms;\n justify-content: center;\n align-items: flex-start;\n width: 90%;\n}\n.item-top:hover {\n background-color: rgb(241, 241, 247);\n}\n.item-top:active {\n background-color: rgb(220, 220, 228);\n cursor: grabbing;\n}\n\n.close-button {\n position: absolute;\n top: -5px;\n right: -5px;\n cursor: pointer;\n background: none;\n border: none;\n font-size: 1.5em;\n color: #888;\n}\n\n/* Item > Top */\n.item-top-content {\n display: none;\n}\n.item-top:hover .item-top-content {\n display: block;\n margin: auto;\n margin-top: -2px;\n}\n.item-top:active .item-top-content {\n display: block;\n margin: auto;\n margin-top: -2px;\n}\n/* Item > Top */\n.item-top-right {\n display: none;\n cursor: pointer;\n}\n.item-top:hover .item-top-right {\n display: block;\n margin-top: -2px;\n}\n.item-top:active .item-top-right {\n display: block;\n margin-top: -2px;\n}\n\n/* Item > Content */\n.item-content {\n width: 100%;\n height: Calc(100% - 10px);\n overflow: auto;\n}\n\n.toolbox-item-content {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n\n.toolbox-container {\n background-color: chartreuse;\n}\n\n.toolbox-bg {\n background-color: blue;\n}",""]),e.exports=t},314:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r,n,o,i=e[1]||"",a=e[3];if(!a)return i;if(t&&"function"==typeof btoa){var s=(r=a,n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),"/*# ".concat(o," */")),l=a.sources.map((function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")}));return[i].concat(l).concat([s]).join("\n")}return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var i=0;i{e=r.nmd(e);var n="__lodash_hash_undefined__",o=1,i=2,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",f="[object Date]",p="[object Error]",d="[object Function]",y="[object GeneratorFunction]",h="[object Map]",b="[object Number]",g="[object Null]",m="[object Object]",v="[object Promise]",w="[object Proxy]",O="[object RegExp]",S="[object Set]",j="[object String]",x="[object Undefined]",P="[object WeakMap]",D="[object ArrayBuffer]",_="[object DataView]",R=/^\[object .+?Constructor\]$/,z=/^(?:0|[1-9]\d*)$/,k={};k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k[s]=k[l]=k[D]=k[c]=k[_]=k[f]=k[p]=k[d]=k[h]=k[b]=k[m]=k[O]=k[S]=k[j]=k[P]=!1;var C="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,E="object"==typeof self&&self&&self.Object===Object&&self,T=C||E||Function("return this")(),M=t&&!t.nodeType&&t,I=M&&e&&!e.nodeType&&e,N=I&&I.exports===M,A=N&&C.process,H=function(){try{return A&&A.binding&&A.binding("util")}catch(e){}}(),L=H&&H.isTypedArray;function W(e,t){for(var r=-1,n=null==e?0:e.length;++ru))return!1;var f=s.get(e);if(f&&s.get(t))return f==t;var p=-1,d=!0,y=r&i?new De:void 0;for(s.set(e,t),s.set(t,e);++p-1},xe.prototype.set=function(e,t){var r=this.__data__,n=Re(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Pe.prototype.clear=function(){this.size=0,this.__data__={hash:new je,map:new(fe||xe),string:new je}},Pe.prototype.delete=function(e){var t=Me(this,e).delete(e);return this.size-=t?1:0,t},Pe.prototype.get=function(e){return Me(this,e).get(e)},Pe.prototype.has=function(e){return Me(this,e).has(e)},Pe.prototype.set=function(e,t){var r=Me(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},De.prototype.add=De.prototype.push=function(e){return this.__data__.set(e,n),this},De.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.clear=function(){this.__data__=new xe,this.size=0},_e.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var r=this.__data__;if(r instanceof xe){var n=r.__data__;if(!fe||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Pe(n)}return r.set(e,t),this.size=r.size,this};var Ne=se?function(e){return null==e?[]:(e=Object(e),function(t,r){for(var n=-1,o=null==t?0:t.length,i=0,a=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=a}function Xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Fe(e){return null!=e&&"object"==typeof e}var $e=L?function(e){return function(t){return e(t)}}(L):function(e){return Fe(e)&&Ye(e.length)&&!!k[ze(e)]};function Je(e){return null!=(t=e)&&Ye(t.length)&&!Ge(t)?function(e,t){var r=Ue(e),n=!r&&Be(e),o=!r&&!n&&qe(e),i=!r&&!n&&!o&&$e(e),a=r||n||o||i,s=a?function(e,t){for(var r=-1,n=Array(e);++r{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},27:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),t.default=void 0;var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(609)),o=p(r(120)),i=p(r(795)),a=p(r(322)),s=r(89),l=r(726),u=r(56),c=p(r(888)),f=p(r(696));function p(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if((0,f.default)("Draggable: onDragStart: %j",t),!1===this.props.onStart(e,(0,l.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),h(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,f.default)("Draggable: onDrag: %j",t);const r=(0,l.createDraggableData)(this,t),n={x:r.x,y:r.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=n;n.x+=this.state.slackX,n.y+=this.state.slackY;const[o,i]=(0,l.getBoundPosition)(this,n.x,n.y);n.x=o,n.y=i,n.slackX=this.state.slackX+(e-n.x),n.slackY=this.state.slackY+(t-n.y),r.x=n.x,r.y=n.y,r.deltaX=n.x-this.state.x,r.deltaY=n.y-this.state.y}if(!1===this.props.onDrag(e,r))return!1;this.setState(n)})),h(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,l.createDraggableData)(this,t)))return!1;(0,f.default)("Draggable: onDragStop: %j",t);const r={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;r.x=e,r.y=t}this.setState(r)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this , 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.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:i.default.findDOMNode(this)}render(){const{axis:e,bounds:t,children:r,defaultPosition:o,defaultClassName:i,defaultClassNameDragging:u,defaultClassNameDragged:f,position:p,positionOffset:d,scale:h,...b}=this.props;let g={},m=null;const v=!Boolean(p)||this.state.dragging,w=p||o,O={x:(0,l.canDragX)(this)&&v?this.state.x:w.x,y:(0,l.canDragY)(this)&&v?this.state.y:w.y};this.state.isElementSVG?m=(0,s.createSVGTransform)(O,d):g=(0,s.createCSSTransform)(O,d);const S=(0,a.default)(r.props.className||"",i,{[u]:this.state.dragging,[f]:this.state.dragged});return n.createElement(c.default,y({},b,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),n.cloneElement(n.Children.only(r),{className:S,style:{...r.props.style,...g},transform:m}))}}t.default=b,h(b,"displayName","Draggable"),h(b,"propTypes",{...c.default.propTypes,axis:o.default.oneOf(["both","x","y","none"]),bounds:o.default.oneOfType([o.default.shape({left:o.default.number,right:o.default.number,top:o.default.number,bottom:o.default.number}),o.default.string,o.default.oneOf([!1])]),defaultClassName:o.default.string,defaultClassNameDragging:o.default.string,defaultClassNameDragged:o.default.string,defaultPosition:o.default.shape({x:o.default.number,y:o.default.number}),positionOffset:o.default.shape({x:o.default.oneOfType([o.default.number,o.default.string]),y:o.default.oneOfType([o.default.number,o.default.string])}),position:o.default.shape({x:o.default.number,y:o.default.number}),className:u.dontSetMe,style:u.dontSetMe,transform:u.dontSetMe}),h(b,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})},888:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=f(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(609)),o=c(r(120)),i=c(r(795)),a=r(89),s=r(726),l=r(56),u=c(r(696));function c(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(f=function(e){return e?r:t})(e)}function p(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const d={start:"touchstart",move:"touchmove",stop:"touchend"},y={start:"mousedown",move:"mousemove",stop:"mouseup"};let h=y;class b extends n.Component{constructor(){super(...arguments),p(this,"dragging",!1),p(this,"lastX",NaN),p(this,"lastY",NaN),p(this,"touchIdentifier",null),p(this,"mounted",!1),p(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error(" not mounted on DragStart!");const{ownerDocument:r}=t;if(this.props.disabled||!(e.target instanceof r.defaultView.Node)||this.props.handle&&!(0,a.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,a.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const n=(0,a.getTouchIdentifier)(e);this.touchIdentifier=n;const o=(0,s.getControlPosition)(e,n,this);if(null==o)return;const{x:i,y:l}=o,c=(0,s.createCoreData)(this,i,l);(0,u.default)("DraggableCore: handleDragStart: %j",c),(0,u.default)("calling",this.props.onStart),!1!==this.props.onStart(e,c)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,a.addUserSelectStyles)(r),this.dragging=!0,this.lastX=i,this.lastY=l,(0,a.addEvent)(r,h.move,this.handleDrag),(0,a.addEvent)(r,h.stop,this.handleDragStop))})),p(this,"handleDrag",(e=>{const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:r,y:n}=t;if(Array.isArray(this.props.grid)){let e=r-this.lastX,t=n-this.lastY;if([e,t]=(0,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;r=this.lastX+e,n=this.lastY+t}const o=(0,s.createCoreData)(this,r,n);if((0,u.default)("DraggableCore: handleDrag: %j",o),!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=r,this.lastY=n;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),p(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:r,y:n}=t;if(Array.isArray(this.props.grid)){let e=r-this.lastX||0,t=n-this.lastY||0;[e,t]=(0,s.snapToGrid)(this.props.grid,e,t),r=this.lastX+e,n=this.lastY+t}const o=(0,s.createCoreData)(this,r,n);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const i=this.findDOMNode();i&&this.props.enableUserSelectHack&&(0,a.removeUserSelectStyles)(i.ownerDocument),(0,u.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,i&&((0,u.default)("DraggableCore: Removing handlers"),(0,a.removeEvent)(i.ownerDocument,h.move,this.handleDrag),(0,a.removeEvent)(i.ownerDocument,h.stop,this.handleDragStop))})),p(this,"onMouseDown",(e=>(h=y,this.handleDragStart(e)))),p(this,"onMouseUp",(e=>(h=y,this.handleDragStop(e)))),p(this,"onTouchStart",(e=>(h=d,this.handleDragStart(e)))),p(this,"onTouchEnd",(e=>(h=d,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,a.addEvent)(e,d.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,a.removeEvent)(t,y.move,this.handleDrag),(0,a.removeEvent)(t,d.move,this.handleDrag),(0,a.removeEvent)(t,y.stop,this.handleDragStop),(0,a.removeEvent)(t,d.stop,this.handleDragStop),(0,a.removeEvent)(e,d.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,a.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:i.default.findDOMNode(this)}render(){return n.cloneElement(n.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}t.default=b,p(b,"displayName","DraggableCore"),p(b,"propTypes",{allowAnyClick:o.default.bool,children:o.default.node.isRequired,disabled:o.default.bool,enableUserSelectHack:o.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:o.default.arrayOf(o.default.number),handle:o.default.string,cancel:o.default.string,nodeRef:o.default.object,onStart:o.default.func,onDrag:o.default.func,onStop:o.default.func,onMouseDown:o.default.func,scale:o.default.number,className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),p(b,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},794:(e,t,r)=>{"use strict";const{default:n,DraggableCore:o}=r(27);e.exports=n,e.exports.default=n,e.exports.DraggableCore=o},89:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addClassName=u,t.addEvent=function(e,t,r,n){if(!e)return;const o={capture:!0,...n};e.addEventListener?e.addEventListener(t,r,o):e.attachEvent?e.attachEvent("on"+t,r):e["on"+t]=r},t.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t)),e.body&&u(e.body,"react-draggable-transparent-selection")},t.createCSSTransform=function(e,t){const r=l(e,t,"px");return{[(0,o.browserPrefixToKey)("transform",o.default)]:r}},t.createSVGTransform=function(e,t){return l(e,t,"")},t.getTouch=function(e,t){return e.targetTouches&&(0,n.findInArray)(e.targetTouches,(e=>t===e.identifier))||e.changedTouches&&(0,n.findInArray)(e.changedTouches,(e=>t===e.identifier))},t.getTouchIdentifier=function(e){return e.targetTouches&&e.targetTouches[0]?e.targetTouches[0].identifier:e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].identifier:void 0},t.getTranslation=l,t.innerHeight=function(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,n.int)(r.paddingTop),t-=(0,n.int)(r.paddingBottom),t},t.innerWidth=function(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,n.int)(r.paddingLeft),t-=(0,n.int)(r.paddingRight),t},t.matchesSelector=s,t.matchesSelectorAndParentsTo=function(e,t,r){let n=e;do{if(s(n,t))return!0;if(n===r)return!1;n=n.parentNode}while(n);return!1},t.offsetXYFromParent=function(e,t,r){const n=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect();return{x:(e.clientX+t.scrollLeft-n.left)/r,y:(e.clientY+t.scrollTop-n.top)/r}},t.outerHeight=function(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,n.int)(r.borderTopWidth),t+=(0,n.int)(r.borderBottomWidth),t},t.outerWidth=function(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,n.int)(r.borderLeftWidth),t+=(0,n.int)(r.borderRightWidth),t},t.removeClassName=c,t.removeEvent=function(e,t,r,n){if(!e)return;const o={capture:!0,...n};e.removeEventListener?e.removeEventListener(t,r,o):e.detachEvent?e.detachEvent("on"+t,r):e["on"+t]=null},t.removeUserSelectStyles=function(e){if(e)try{if(e.body&&c(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}};var n=r(56),o=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}(r(514));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}let a="";function s(e,t){return a||(a=(0,n.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(t){return(0,n.isFunction)(e[t])}))),!!(0,n.isFunction)(e[a])&&e[a](t)}function l(e,t,r){let{x:n,y:o}=e,i="translate(".concat(n).concat(r,",").concat(o).concat(r,")");if(t){const e="".concat("string"==typeof t.x?t.x:t.x+r),n="".concat("string"==typeof t.y?t.y:t.y+r);i="translate(".concat(e,", ").concat(n,")")+i}return i}function u(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function c(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}},514:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.browserPrefixToKey=o,t.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},t.default=void 0,t.getPrefix=n;const r=["Moz","Webkit","O","ms"];function n(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const n=null===(e=window.document)||void 0===e||null===(e=e.documentElement)||void 0===e?void 0:e.style;if(!n)return"";if(t in n)return"";for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){}},726:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},t.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},t.createCoreData=function(e,t,r){const o=!(0,n.isNum)(e.lastX),a=i(e);return o?{node:a,deltaX:0,deltaY:0,lastX:t,lastY:r,x:t,y:r}:{node:a,deltaX:t-e.lastX,deltaY:r-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:r}},t.createDraggableData=function(e,t){const r=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/r,y:e.state.y+t.deltaY/r,deltaX:t.deltaX/r,deltaY:t.deltaY/r,lastX:e.state.x,lastY:e.state.y}},t.getBoundPosition=function(e,t,r){if(!e.props.bounds)return[t,r];let{bounds:a}=e.props;a="string"==typeof a?a:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(a);const s=i(e);if("string"==typeof a){const{ownerDocument:e}=s,t=e.defaultView;let r;if(r="parent"===a?s.parentNode:e.querySelector(a),!(r instanceof t.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const i=r,l=t.getComputedStyle(s),u=t.getComputedStyle(i);a={left:-s.offsetLeft+(0,n.int)(u.paddingLeft)+(0,n.int)(l.marginLeft),top:-s.offsetTop+(0,n.int)(u.paddingTop)+(0,n.int)(l.marginTop),right:(0,o.innerWidth)(i)-(0,o.outerWidth)(s)-s.offsetLeft+(0,n.int)(u.paddingRight)-(0,n.int)(l.marginRight),bottom:(0,o.innerHeight)(i)-(0,o.outerHeight)(s)-s.offsetTop+(0,n.int)(u.paddingBottom)-(0,n.int)(l.marginBottom)}}return(0,n.isNum)(a.right)&&(t=Math.min(t,a.right)),(0,n.isNum)(a.bottom)&&(r=Math.min(r,a.bottom)),(0,n.isNum)(a.left)&&(t=Math.max(t,a.left)),(0,n.isNum)(a.top)&&(r=Math.max(r,a.top)),[t,r]},t.getControlPosition=function(e,t,r){const n="number"==typeof t?(0,o.getTouch)(e,t):null;if("number"==typeof t&&!n)return null;const a=i(r),s=r.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,o.offsetXYFromParent)(n||e,s,r.props.scale)},t.snapToGrid=function(e,t,r){return[Math.round(t/e[0])*e[0],Math.round(r/e[1])*e[1]]};var n=r(56),o=r(89);function i(e){const t=e.findDOMNode();if(!t)throw new Error(": Unmounted during event!");return t}},56:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dontSetMe=function(e,t,r){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(r," - do not set this, set it on the child."))},t.findInArray=function(e,t){for(let r=0,n=e.length;r{"use strict";function n(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;to,default:()=>i});const i=o},392:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=p(r(609)),i=p(r(120)),a=r(794),s=r(36),l=r(426),u=r(134),c=r(634),f=p(r(852));function p(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}},{key:"createStyle",value:function(e){var t,r=this.props,n=r.usePercentages,o=r.containerWidth;return r.useCSSTransforms?t=(0,l.setTransform)(e):(t=(0,l.setTopLeft)(e),n&&(t.left=(0,l.perc)(e.left/o),t.width=(0,l.perc)(e.width/o))),t}},{key:"mixinDraggable",value:function(e,t){return o.default.createElement(a.DraggableCore,{disabled:!t,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},e)}},{key:"mixinResizable",value:function(e,t,r){var n=this.props,i=n.cols,a=n.x,l=n.minW,c=n.minH,f=n.maxW,p=n.maxH,d=n.transformScale,y=n.resizeHandles,h=n.resizeHandle,b=this.getPositionParams(),g=(0,u.calcGridItemPosition)(b,0,0,i-a,0).width,m=(0,u.calcGridItemPosition)(b,0,0,l,c),v=(0,u.calcGridItemPosition)(b,0,0,f,p),w=[m.width,m.height],O=[Math.min(v.width,g),Math.min(v.height,1/0)];return o.default.createElement(s.Resizable,{draggableOpts:{disabled:!r},className:r?void 0:"react-resizable-hide",width:t.width,height:t.height,minConstraints:w,maxConstraints:O,onResizeStop:this.onResizeStop,onResizeStart:this.onResizeStart,onResize:this.onResize,transformScale:d,resizeHandles:y,handle:h},e)}},{key:"onResizeHandler",value:function(e,t,r){var n=t.node,o=t.size,i=this.props[r];if(i){var a=this.props,s=a.cols,l=a.x,c=a.y,f=a.i,p=a.maxH,d=a.minH,y=this.props,h=y.minW,b=y.maxW,g=(0,u.calcWH)(this.getPositionParams(),o.width,o.height,l,c),m=g.w,v=g.h;h=Math.max(h,1),b=Math.min(b,s-l),m=(0,u.clamp)(m,h,b),v=(0,u.clamp)(v,d,p),this.setState({resizing:"onResizeStop"===r?null:o}),i.call(this,f,m,v,{e,node:n,size:o})}}},{key:"render",value:function(){var e=this.props,t=e.x,r=e.y,n=e.w,i=e.h,a=e.isDraggable,s=e.isResizable,l=e.droppingPosition,c=e.useCSSTransforms,p=(0,u.calcGridItemPosition)(this.getPositionParams(),t,r,n,i,this.state),d=o.default.Children.only(this.props.children),h=o.default.cloneElement(d,{ref:this.elementRef,className:(0,f.default)("react-grid-item",d.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":a,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(l),cssTransforms:c}),style:y(y(y({},this.props.style),d.props.style),this.createStyle(p))});return h=this.mixinResizable(h,p,s),this.mixinDraggable(h,a)}}],r&&h(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),d}(o.default.Component);t.default=w,v(w,"propTypes",{children:i.default.element,cols:i.default.number.isRequired,containerWidth:i.default.number.isRequired,rowHeight:i.default.number.isRequired,margin:i.default.array.isRequired,maxRows:i.default.number.isRequired,containerPadding:i.default.array.isRequired,x:i.default.number.isRequired,y:i.default.number.isRequired,w:i.default.number.isRequired,h:i.default.number.isRequired,minW:function(e,t){var r=e[t];return"number"!=typeof r?new Error("minWidth not Number"):r>e.w||r>e.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(e,t){var r=e[t];return"number"!=typeof r?new Error("maxWidth not Number"):re.h||r>e.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(e,t){var r=e[t];return"number"!=typeof r?new Error("maxHeight not Number"):r{"use strict";function n(e){return n="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},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(609)),i=f(r(142)),a=f(r(852)),s=r(426),l=r(134),u=f(r(392)),c=f(r(634));function f(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0){var i=1/0,a=1/0;o.forEach((function(t){t.x>e.x&&(i=Math.min(i,t.x)),t.y>e.y&&(a=Math.min(a,t.y))})),Number.isFinite(i)&&(e.w=i-e.x),Number.isFinite(a)&&(e.h=a-e.y)}}return t||(e.w=r,e.h=n),e})),m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}(e,t)||h(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.")}()}(g,2),v=m[0],w=m[1];if(w){var O={w:w.w,h:w.h,x:w.x,y:w.y,static:!0,i:t};e.props.onResize(v,c,w,O,i,a),e.setState({layout:b?v:(0,s.compact)(v,(0,s.compactType)(e.props),p),activeDrag:O})}})),O(v(e),"onResizeStop",(function(t,r,n,o){var i=o.e,a=o.node,l=e.state,u=l.layout,c=l.oldResizeItem,f=e.props,p=f.cols,d=f.allowOverlap,y=(0,s.getLayoutItem)(u,t);e.props.onResizeStop(u,c,y,null,i,a);var h=d?u:(0,s.compact)(u,(0,s.compactType)(e.props),p),b=e.state.oldLayout;e.setState({activeDrag:null,layout:h,oldResizeItem:null,oldLayout:null}),e.onLayoutMaybeChanged(h,b)})),O(v(e),"onDragOver",(function(t){var r;if(t.preventDefault(),t.stopPropagation(),j&&(null===(r=t.nativeEvent.target)||void 0===r||!r.classList.contains(S)))return!1;var n=e.props,i=n.droppingItem,a=n.onDropDragOver,s=n.margin,u=n.cols,c=n.rowHeight,f=n.maxRows,p=n.width,d=n.containerPadding,g=n.transformScale,m=null==a?void 0:a(t);if(!1===m)return e.state.droppingDOMNode&&e.removeDroppingPlaceholder(),!1;var v,w=y(y({},i),m),O=e.state.layout,x=t.nativeEvent,P=x.layerX,D=x.layerY,_={left:P/g,top:D/g,e:t};if(e.state.droppingDOMNode){if(e.state.droppingPosition){var R=e.state.droppingPosition,z=R.left,k=R.top;(z!=P||k!=D)&&e.setState({droppingPosition:_})}}else{var C={cols:u,margin:s,maxRows:f,rowHeight:c,containerWidth:p,containerPadding:d||s},E=(0,l.calcXY)(C,D,P,w.w,w.h);e.setState({droppingDOMNode:o.createElement("div",{key:w.i}),droppingPosition:_,layout:[].concat((v=O,function(e){if(Array.isArray(e))return b(e)}(v)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(v)||h(v)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[y(y({},w),{},{x:E.x,y:E.y,static:!1,isDraggable:!0})])})}})),O(v(e),"removeDroppingPlaceholder",(function(){var t=e.props,r=t.droppingItem,n=t.cols,o=e.state.layout,i=(0,s.compact)(o.filter((function(e){return e.i!==r.i})),(0,s.compactType)(e.props),n);e.setState({layout:i,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})})),O(v(e),"onDragLeave",(function(t){t.preventDefault(),t.stopPropagation(),e.dragEnterCounter--,0===e.dragEnterCounter&&e.removeDroppingPlaceholder()})),O(v(e),"onDragEnter",(function(t){t.preventDefault(),t.stopPropagation(),e.dragEnterCounter++})),O(v(e),"onDrop",(function(t){t.preventDefault(),t.stopPropagation();var r=e.props.droppingItem,n=e.state.layout,o=n.find((function(e){return e.i===r.i}));e.dragEnterCounter=0,e.removeDroppingPlaceholder(),e.props.onDrop(n,o,t)})),e}return t=x,c=[{key:"getDerivedStateFromProps",value:function(e,t){var r;return t.activeDrag?null:((0,i.default)(e.layout,t.propsLayout)&&e.compactType===t.compactType?(0,s.childrenEqual)(e.children,t.children)||(r=t.layout):r=e.layout,r?{layout:(0,s.synchronizeLayoutWithChildren)(r,e.children,e.cols,(0,s.compactType)(e),e.allowOverlap),compactType:e.compactType,children:e.children,propsLayout:e.layout}:null)}}],(r=[{key:"componentDidMount",value:function(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}},{key:"shouldComponentUpdate",value:function(e,t){return this.props.children!==e.children||!(0,s.fastRGLPropsEqual)(this.props,e,i.default)||this.state.activeDrag!==t.activeDrag||this.state.mounted!==t.mounted||this.state.droppingPosition!==t.droppingPosition}},{key:"componentDidUpdate",value:function(e,t){if(!this.state.activeDrag){var r=this.state.layout,n=t.layout;this.onLayoutMaybeChanged(r,n)}}},{key:"containerHeight",value:function(){if(this.props.autoSize){var e=(0,s.bottom)(this.state.layout),t=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return e*this.props.rowHeight+(e-1)*this.props.margin[1]+2*t+"px"}}},{key:"onLayoutMaybeChanged",value:function(e,t){t||(t=this.state.layout),(0,i.default)(t,e)||this.props.onLayoutChange(e)}},{key:"placeholder",value:function(){var e=this.state.activeDrag;if(!e)return null;var t=this.props,r=t.width,n=t.cols,i=t.margin,a=t.containerPadding,s=t.rowHeight,l=t.maxRows,c=t.useCSSTransforms,f=t.transformScale;return o.createElement(u.default,{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,className:"react-grid-placeholder",containerWidth:r,cols:n,margin:i,containerPadding:a||i,maxRows:l,rowHeight:s,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:c,transformScale:f},o.createElement("div",null))}},{key:"processGridItem",value:function(e,t){if(e&&e.key){var r=(0,s.getLayoutItem)(this.state.layout,String(e.key));if(!r)return null;var n=this.props,i=n.width,a=n.cols,l=n.margin,c=n.containerPadding,f=n.rowHeight,p=n.maxRows,d=n.isDraggable,y=n.isResizable,h=n.isBounded,b=n.useCSSTransforms,g=n.transformScale,m=n.draggableCancel,v=n.draggableHandle,w=n.resizeHandles,O=n.resizeHandle,S=this.state,j=S.mounted,x=S.droppingPosition,P="boolean"==typeof r.isDraggable?r.isDraggable:!r.static&&d,D="boolean"==typeof r.isResizable?r.isResizable:!r.static&&y,_=r.resizeHandles||w,R=P&&h&&!1!==r.isBounded;return o.createElement(u.default,{containerWidth:i,cols:a,margin:l,containerPadding:c||l,maxRows:p,rowHeight:f,cancel:m,handle:v,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:P,isResizable:D,isBounded:R,useCSSTransforms:b&&j,usePercentages:!j,transformScale:g,w:r.w,h:r.h,x:r.x,y:r.y,i:r.i,minH:r.minH,minW:r.minW,maxH:r.maxH,maxW:r.maxW,static:r.static,droppingPosition:t?x:void 0,resizeHandles:_,resizeHandle:O},e)}}},{key:"render",value:function(){var e=this,t=this.props,r=t.className,n=t.style,i=t.isDroppable,l=t.innerRef,u=(0,a.default)(S,r),c=y({height:this.containerHeight()},n);return o.createElement("div",{ref:l,className:u,style:c,onDrop:i?this.onDrop:s.noop,onDragLeave:i?this.onDragLeave:s.noop,onDragEnter:i?this.onDragEnter:s.noop,onDragOver:i?this.onDragOver:s.noop},o.Children.map(this.props.children,(function(t){return e.processGridItem(t)})),i&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}])&&g(t.prototype,r),c&&g(t,c),Object.defineProperty(t,"prototype",{writable:!1}),x}(o.Component);t.default=x,O(x,"displayName","ReactGridLayout"),O(x,"propTypes",c.default),O(x,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:s.noop,onDragStart:s.noop,onDrag:s.noop,onDragStop:s.noop,onResizeStart:s.noop,onResize:s.noop,onResizeStop:s.noop,onDrop:s.noop,onDropDragOver:s.noop})},634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resizeHandleType=t.resizeHandleAxesType=t.default=void 0;var n=i(r(120)),o=i(r(609));function i(e){return e&&e.__esModule?e:{default:e}}var a=n.default.arrayOf(n.default.oneOf(["s","w","e","n","sw","nw","se","ne"]));t.resizeHandleAxesType=a;var s=n.default.oneOfType([n.default.node,n.default.func]);t.resizeHandleType=s;var l={className:n.default.string,style:n.default.object,width:n.default.number,autoSize:n.default.bool,cols:n.default.number,draggableCancel:n.default.string,draggableHandle:n.default.string,verticalCompact:function(e){e.verticalCompact},compactType:n.default.oneOf(["vertical","horizontal"]),layout:function(e){var t=e.layout;void 0!==t&&r(426).validateLayout(t,"layout")},margin:n.default.arrayOf(n.default.number),containerPadding:n.default.arrayOf(n.default.number),rowHeight:n.default.number,maxRows:n.default.number,isBounded:n.default.bool,isDraggable:n.default.bool,isResizable:n.default.bool,allowOverlap:n.default.bool,preventCollision:n.default.bool,useCSSTransforms:n.default.bool,transformScale:n.default.number,isDroppable:n.default.bool,resizeHandles:a,resizeHandle:s,onLayoutChange:n.default.func,onDragStart:n.default.func,onDrag:n.default.func,onDragStop:n.default.func,onResizeStart:n.default.func,onResize:n.default.func,onResizeStop:n.default.func,onDrop:n.default.func,droppingItem:n.default.shape({i:n.default.string.isRequired,w:n.default.number.isRequired,h:n.default.number.isRequired}),children:function(e,t){var r=e[t],n={};o.default.Children.forEach(r,(function(e){if(null!=(null==e?void 0:e.key)){if(n[e.key])throw new Error('Duplicate child key "'+e.key+'" found! This will cause problems in ReactGridLayout.');n[e.key]=!0}}))},innerRef:n.default.any};t.default=l},864:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}t.default=void 0;var o=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(609)),i=f(r(120)),a=f(r(142)),s=r(426),l=r(108),u=f(r(742)),c=["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"];function f(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}function d(){return d=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,c));return o.createElement(u.default,d({},n,{margin:S(t,this.state.breakpoint),containerPadding:S(r,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}])&&b(t.prototype,r),i&&b(t,i),Object.defineProperty(t,"prototype",{writable:!1}),O}(o.Component);t.default=j,w(j,"propTypes",{breakpoint:i.default.string,breakpoints:i.default.object,allowOverlap:i.default.bool,cols:i.default.object,margin:i.default.oneOfType([i.default.array,i.default.object]),containerPadding:i.default.oneOfType([i.default.array,i.default.object]),layouts:function(e,t){if("[object Object]"!==O(e[t]))throw new Error("Layout property must be an object. Received: "+O(e[t]));Object.keys(e[t]).forEach((function(t){if(!(t in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,s.validateLayout)(e.layouts[t],"layouts."+t)}))},width:i.default.number.isRequired,onBreakpointChange:i.default.func,onLayoutChange:i.default.func,onWidthChange:i.default.func}),w(j,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:s.noop,onLayoutChange:s.noop,onWidthChange:s.noop})},134:(e,t)=>{"use strict";function r(e){var t=e.margin,r=e.containerPadding,n=e.containerWidth,o=e.cols;return(n-t[0]*(o-1)-2*r[0])/o}function n(e,t,r){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*r):e}function o(e,t,r){return Math.max(Math.min(e,r),t)}Object.defineProperty(t,"__esModule",{value:!0}),t.calcGridColWidth=r,t.calcGridItemPosition=function(e,t,o,i,a,s){var l=e.margin,u=e.containerPadding,c=e.rowHeight,f=r(e),p={};return s&&s.resizing?(p.width=Math.round(s.resizing.width),p.height=Math.round(s.resizing.height)):(p.width=n(i,f,l[0]),p.height=n(a,c,l[1])),s&&s.dragging?(p.top=Math.round(s.dragging.top),p.left=Math.round(s.dragging.left)):(p.top=Math.round((c+l[1])*o+u[1]),p.left=Math.round((f+l[0])*t+u[0])),p},t.calcGridItemWHPx=n,t.calcWH=function(e,t,n,i,a){var s=e.margin,l=e.maxRows,u=e.cols,c=e.rowHeight,f=r(e),p=Math.round((t+s[0])/(f+s[0])),d=Math.round((n+s[1])/(c+s[1]));return{w:p=o(p,0,u-i),h:d=o(d,0,l-a)}},t.calcXY=function(e,t,n,i,a){var s=e.margin,l=e.cols,u=e.rowHeight,c=e.maxRows,f=r(e),p=Math.round((n-s[0])/(f+s[0])),d=Math.round((t-s[1])/(u+s[1]));return{x:p=o(p,0,l-i),y:d=o(d,0,c-a)}},t.clamp=o},1:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}t.default=function(e){var t;return t=function(t){!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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(m,t);var r,i,l,u,g=(r=m,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(r);if(i){var o=y(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}(this,e)});function m(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m);for(var t=arguments.length,r=new Array(t),n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(t,s);return r&&!this.mounted?o.createElement("div",{className:(0,a.default)(this.props.className,b),style:this.props.style,ref:this.elementRef}):o.createElement(e,c({innerRef:this.elementRef},n,this.state))}}])&&f(l.prototype,u),Object.defineProperty(l,"prototype",{writable:!1}),m}(o.Component),h(t,"defaultProps",{measureBeforeMount:!1}),h(t,"propTypes",{measureBeforeMount:i.default.bool}),t};var o=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(609)),i=l(r(120)),a=l(r(852)),s=["measureBeforeMount"];function l(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}function c(){return c=Object.assign||function(e){for(var t=1;t{e.exports=function(e,t,r){return e===t||e.className===t.className&&r(e.style,t.style)&&e.width===t.width&&e.autoSize===t.autoSize&&e.cols===t.cols&&e.draggableCancel===t.draggableCancel&&e.draggableHandle===t.draggableHandle&&r(e.verticalCompact,t.verticalCompact)&&r(e.compactType,t.compactType)&&r(e.layout,t.layout)&&r(e.margin,t.margin)&&r(e.containerPadding,t.containerPadding)&&e.rowHeight===t.rowHeight&&e.maxRows===t.maxRows&&e.isBounded===t.isBounded&&e.isDraggable===t.isDraggable&&e.isResizable===t.isResizable&&e.allowOverlap===t.allowOverlap&&e.preventCollision===t.preventCollision&&e.useCSSTransforms===t.useCSSTransforms&&e.transformScale===t.transformScale&&e.isDroppable===t.isDroppable&&r(e.resizeHandles,t.resizeHandles)&&r(e.resizeHandle,t.resizeHandle)&&e.onLayoutChange===t.onLayoutChange&&e.onDragStart===t.onDragStart&&e.onDrag===t.onDrag&&e.onDragStop===t.onDragStop&&e.onResizeStart===t.onResizeStart&&e.onResize===t.onResize&&e.onResizeStop===t.onResizeStop&&e.onDrop===t.onDrop&&r(e.droppingItem,t.droppingItem)&&r(e.innerRef,t.innerRef)}},108:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findOrGenerateResponsiveLayout=function(e,t,r,i,a,s){if(e[r])return(0,n.cloneLayout)(e[r]);for(var l=e[i],u=o(t),c=u.slice(u.indexOf(r)),f=0,p=c.length;fe[s]&&(n=s)}return n},t.getColsFromBreakpoint=function(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]},t.sortBreakpoints=o;var n=r(426);function o(e){return Object.keys(e).sort((function(t,r){return e[t]-e[r]}))}},426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bottom=f,t.childrenEqual=function(e,t){return(0,n.default)(o.default.Children.map(e,(function(e){return null==e?void 0:e.key})),o.default.Children.map(t,(function(e){return null==e?void 0:e.key})))},t.cloneLayout=p,t.cloneLayoutItem=y,t.collides=b,t.compact=g,t.compactItem=w,t.compactType=function(e){var t=e||{},r=t.verticalCompact,n=t.compactType;return!1===r?null:n},t.correctBounds=O,t.fastPositionEqual=function(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height},t.fastRGLPropsEqual=void 0,t.getAllCollisions=x,t.getFirstCollision=j,t.getLayoutItem=S,t.getStatics=P,t.modifyLayout=d,t.moveElement=D,t.moveElementAwayFromCollision=_,t.noop=void 0,t.perc=function(e){return 100*e+"%"},t.setTopLeft=function(e){var t=e.top,r=e.left,n=e.width,o=e.height;return{top:"".concat(t,"px"),left:"".concat(r,"px"),width:"".concat(n,"px"),height:"".concat(o,"px"),position:"absolute"}},t.setTransform=function(e){var t=e.top,r=e.left,n=e.width,o=e.height,i="translate(".concat(r,"px,").concat(t,"px)");return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:"".concat(n,"px"),height:"".concat(o,"px"),position:"absolute"}},t.sortLayoutItems=R,t.sortLayoutItemsByColRow=k,t.sortLayoutItemsByRowCol=z,t.synchronizeLayoutWithChildren=function(e,t,r,n,i){e=e||[];var a=[];o.default.Children.forEach(t,(function(t){if(null!=(null==t?void 0:t.key)){var r=S(e,String(t.key));if(r)a.push(y(r));else{!u&&t.props._grid&&console.warn("`_grid` properties on children have been deprecated as of React 15.2. Please use `data-grid` or add your properties directly to the `layout`.");var n=t.props["data-grid"]||t.props._grid;n?(u||C([n],"ReactGridLayout.children"),a.push(y(s(s({},n),{},{i:t.key})))):a.push(y({w:1,h:1,x:0,y:f(a),i:String(t.key)}))}}}));var l=O(a,{cols:r});return i?l:g(l,n,r)},t.validateLayout=C,t.withLayoutItem=function(e,t,r){var n=S(e,t);return n?[e=d(e,n=r(y(n))),n]:[e,null]};var n=i(r(142)),o=i(r(609));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;tr&&(r=t);return r}function p(e){for(var t=Array(e.length),r=0,n=e.length;r=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function g(e,t,r){for(var n=P(e),o=R(e,t),i=Array(e.length),a=0,s=o.length;at.y+t.h)break;b(t,a)&&v(e,a,r+t[o],n)}}t[n]=r}function w(e,t,r,n,o){var i,a="horizontal"===r;if("vertical"===r)for(t.y=Math.min(f(e),t.y);t.y>0&&!j(e,t);)t.y--;else if(a)for(;t.x>0&&!j(e,t);)t.x--;for(;i=j(e,t);)a?v(o,t,i.x+i.w,"x"):v(o,t,i.y+i.h,"y"),a&&t.x+t.w>n&&(t.x=n-t.w,t.y++);return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function O(e,t){for(var r=P(e),n=0,o=e.length;nt.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),i.static)for(;j(r,i);)i.y++;else r.push(i)}return e}function S(e,t){for(var r=0,n=e.length;r=n:"horizontal"===a&&"number"==typeof r&&u>=r)&&(f=f.reverse());var d=x(f,t),y=d.length>0;if(y&&l)return p(e);if(y&&i)return E("Collision prevented on ".concat(t.i,", reverting.")),t.x=u,t.y=c,t.moved=!1,e;for(var h=0,b=d.length;ht.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1}))}function k(e){return e.slice(0).sort((function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1}))}function C(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout",r=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(var n=0,o=e.length;n{e.exports=r(742).default,r(426),e.exports.Responsive=r(864).default,e.exports.Responsive.utils=r(108),e.exports.WidthProvider=r(1).default},852:(e,t,r)=>{"use strict";function n(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;to,default:()=>i});const i=o},630:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=void 0;var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=l(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(609)),o=r(794),i=r(30),a=r(329),s=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;tMath.abs(l*a)?t=e/a:e=t*a}var u=e,c=t,f=this.slack||[0,0],p=f[0],d=f[1];return e+=p,t+=d,n&&(e=Math.max(n[0],e),t=Math.max(n[1],t)),o&&(e=Math.min(o[0],e),t=Math.min(o[1],t)),this.slack=[p+(u-e),d+(c-t)],[e,t]},l.resizeHandler=function(e,t){var r=this;return function(n,o){var i=o.node,a=o.deltaX,s=o.deltaY;"onResizeStart"===e&&r.resetData();var l=("both"===r.props.axis||"x"===r.props.axis)&&"n"!==t&&"s"!==t,u=("both"===r.props.axis||"y"===r.props.axis)&&"e"!==t&&"w"!==t;if(l||u){var c=t[0],f=t[t.length-1],p=i.getBoundingClientRect();null!=r.lastHandleRect&&("w"===f&&(a+=p.left-r.lastHandleRect.left),"n"===c&&(s+=p.top-r.lastHandleRect.top)),r.lastHandleRect=p,"w"===f&&(a=-a),"n"===c&&(s=-s);var d=r.props.width+(l?a/r.props.transformScale:0),y=r.props.height+(u?s/r.props.transformScale:0),h=r.runConstraints(d,y);d=h[0],y=h[1];var b=d!==r.props.width||y!==r.props.height,g="function"==typeof r.props[e]?r.props[e]:null;g&&!("onResize"===e&&!b)&&(null==n.persist||n.persist(),g(n,{node:i,size:{width:d,height:y},handle:t})),"onResizeStop"===e&&r.resetData()}}},l.renderResizeHandle=function(e,t){var r=this.props.handle;if(!r)return n.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+e,ref:t});if("function"==typeof r)return r(e,t);var o=f({ref:t},"string"==typeof r.type?{}:{handleAxis:e});return n.cloneElement(r,o)},l.render=function(){var e=this,t=this.props,r=t.children,a=t.className,l=t.draggableOpts,c=(t.width,t.height,t.handle,t.handleSize,t.lockAspectRatio,t.axis,t.minConstraints,t.maxConstraints,t.onResize,t.onResizeStop,t.onResizeStart,t.resizeHandles),p=(t.transformScale,function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(t,s));return(0,i.cloneElement)(r,f(f({},p),{},{className:(a?a+" ":"")+"react-resizable",children:[].concat(r.props.children,c.map((function(t){var r,i=null!=(r=e.handleRefs[t])?r:e.handleRefs[t]=n.createRef();return n.createElement(o.DraggableCore,u({},l,{nodeRef:i,key:"resizableHandle-"+t,onStop:e.resizeHandler("onResizeStop",t),onStart:e.resizeHandler("onResizeStart",t),onDrag:e.resizeHandler("onResize",t)}),e.renderResizeHandle(t,i))})))}))},a}(n.Component);t.default=y,y.propTypes=a.resizableProps,y.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1}},661:(e,t,r)=>{"use strict";t.default=void 0;var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(609)),o=l(r(120)),i=l(r(630)),a=r(329),s=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function l(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,s);return n.createElement(i.default,{axis:y,draggableOpts:l,handle:t,handleSize:r,height:this.state.height,lockAspectRatio:d,maxConstraints:f,minConstraints:u,onResizeStart:o,onResize:this.onResize,onResizeStop:a,resizeHandles:h,transformScale:g,width:this.state.width},n.createElement("div",c({},m,{style:p(p({},b),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},o}(n.Component);t.default=h,h.propTypes=p(p({},a.resizableProps),{},{children:o.default.element})},329:(e,t,r)=>{"use strict";t.__esModule=!0,t.resizableProps=void 0;var n,o=(n=r(120))&&n.__esModule?n:{default:n};r(794);var i={axis:o.default.oneOf(["both","x","y","none"]),className:o.default.string,children:o.default.element.isRequired,draggableOpts:o.default.shape({allowAnyClick:o.default.bool,cancel:o.default.string,children:o.default.node,disabled:o.default.bool,enableUserSelectHack:o.default.bool,offsetParent:o.default.node,grid:o.default.arrayOf(o.default.number),handle:o.default.string,nodeRef:o.default.object,onStart:o.default.func,onDrag:o.default.func,onStop:o.default.func,onMouseDown:o.default.func,scale:o.default.number}),height:function(){for(var e=arguments.length,t=new Array(e),r=0;r{"use strict";t.__esModule=!0,t.cloneElement=function(e,t){return t.style&&e.props.style&&(t.style=a(a({},e.props.style),t.style)),t.className&&e.props.className&&(t.className=e.props.className+" "+t.className),o.default.cloneElement(e,t)};var n,o=(n=r(609))&&n.__esModule?n:{default:n};function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t{"use strict";e.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},e.exports.Resizable=r(630).default,e.exports.ResizableBox=r(661).default},411:(e,t,r)=>{var n=r(51);"string"==typeof n&&(n=[[e.id,n,""]]);r(408)(n,{hmr:!0,transform:void 0,insertInto:void 0}),n.locals&&(e.exports=n.locals)},171:(e,t,r)=>{var n=r(291);"string"==typeof n&&(n=[[e.id,n,""]]);r(408)(n,{hmr:!0,transform:void 0,insertInto:void 0}),n.locals&&(e.exports=n.locals)},549:(e,t,r)=>{var n=r(845);"string"==typeof n&&(n=[[e.id,n,""]]);r(408)(n,{hmr:!0,transform:void 0,insertInto:void 0}),n.locals&&(e.exports=n.locals)},408:(e,t,r)=>{var n,o,i={},a=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=n.apply(this,arguments)),o}),s=function(e,t){return t?t.querySelector(e):document.querySelector(e)},l=function(e){var t={};return function(e,r){if("function"==typeof e)return e();if(void 0===t[e]){var n=s.call(this,e,r);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),u=null,c=0,f=[],p=r(874);function d(e,t){for(var r=0;r=0&&f.splice(t,1)}function g(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=r.nc;n&&(e.attrs.nonce=n)}return m(t,e.attrs),h(e,t),t}function m(e,t){Object.keys(t).forEach((function(r){e.setAttribute(r,t[r])}))}function v(e,t){var r,n,o,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var a=c++;r=u||(u=g(t)),n=S.bind(null,r,a,!1),o=S.bind(null,r,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),h(e,t),t}(t),n=x.bind(null,r,t),o=function(){b(r),r.href&&URL.revokeObjectURL(r.href)}):(r=g(t),n=j.bind(null,r),o=function(){b(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var r=y(e,t);return d(r,t),function(e){for(var n=[],o=0;o{e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var r=t.protocol+"//"+t.host,n=r+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var o,i=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?r+i:n+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},120:e=>{"use strict";e.exports=window.PropTypes},609:e=>{"use strict";e.exports=window.React},795:e=>{"use strict";e.exports=window.ReactDOM}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n](i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n,o=function(){var e=document.currentScript;if(!e){for(var t=document.getElementsByTagName("script"),r=[],n=0;n{"use strict";r.r(a),r.d(a,{DashboardItemResponsive:()=>ft,ResponsiveGridLayout:()=>Pt,ToolBox2:()=>Xe,ToolBoxGrid:()=>Ne,ToolBoxGrid2:()=>nt,ToolboxItem:()=>Tt});var e=r(609),t=r.n(e),n=r(120),o=r.n(n),i=r(816),s={lg:1200,md:996,sm:768,xs:480,xxs:0},l={lg:12,md:10,sm:6,xs:4,xxs:2},u={lg:6,md:5,sm:3,xs:4,xxs:2};function c(e){return c="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},c(e)}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t=0;)z(t=M[r],e)&&!N(n,t)&&(n[n.length]=t),r-=1;return n})):P((function(e){return Object(e)!==e?[]:Object.keys(e)})),H=P((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function L(e,t,r,n){var o=_(e);function i(e,t){return W(e,t,r.slice(),n.slice())}return!R((function(e,t){return!R(i,t,e)}),_(t),o)}function W(e,t,r,n){if(k(e,t))return!0;var o,i,a=H(e);if(a!==H(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(o=e.constructor,null==(i=String(o).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!k(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!k(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var s=r.length-1;s>=0;){if(r[s]===e)return n[s]===t;s-=1}switch(a){case"Map":return e.size===t.size&&L(e.entries(),t.entries(),r.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&L(e.values(),t.values(),r.concat([e]),n.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var l=A(e);if(l.length!==A(t).length)return!1;var u=r.concat([e]),c=n.concat([t]);for(s=l.length-1;s>=0;){var f=l[s];if(!z(f,t)||!W(t[f],e[f],u,c))return!1;s-=1}return!0}const B=D((function(e,t){return W(e,t,[],[])}));function U(e,t){return function(e,t,r){var n,o;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(n=1/t;r=0}const q=D(U),G=D((function(e,t){if(0===e.length)return!1;for(var r=t,n=0;n=0&&"[object Array]"===Object.prototype.toString.call(e)},V=P((function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():J(e)?[]:function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)?"":function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)?{}:E(e)?function(){return arguments}():void 0})),Z=P((function(e){return null!=e&&B(e,V(e))})),Q=D((function(e,t){var r={};for(var n in t)r[n]=t[n];return delete r[e],r}));var K=r(925),ee=r.n(K);function te(e){const{element:r,extraProps:n,props:o,children:i,type:a}=e,s=function(e,t,r,n,o=null){const i=[];for(const s in e)if(e.hasOwnProperty(s)){let l;try{"function"!=typeof e[s]?(l=Error((n||"React class")+": "+r+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[s]+"`."),l.name="Invariant Violation"):l=e[s](t,s,n,r,null,ee())}catch(e){l=e}if(!l||l instanceof Error||i.push((n||"React class")+": type specification of "+r+" `"+s+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof l+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),l instanceof Error){var a=o&&o()||"";i.push("Failed "+r+" type: "+l.message+a)}}return i.join("\n\n")}(r.propTypes,o,"component prop",r);return s&&function(e,t,r){const n=e.split("`");let o;if(q("is marked as required",e))o=`${n[1]} in ${r}`,t.id&&(o+=` with ID "${t.id}"`),o+=" is required but it was not provided.";else if(q("Bad object",e))o=e.split("supplied to ")[0]+`supplied to ${r}.\nBad`+e.split(".\nBad")[1];else{if(!q("Invalid ",e)||!q(" supplied to ",e))throw new Error(e);{const i=n[1];if(o=`Invalid argument \`${i}\` passed into ${r}`,t.id&&(o+=` with ID "${t.id}"`),o+=".",q(", expected ",e)&&(o+=`\nExpected ${e.split(", expected ")[1]}`),q(" of type `",e)&&(o+=`\nWas supplied type \`${e.split(" of type `")[1].split("`")[0]}\`.`),Y(i,t)){const e=JSON.stringify(t[i],null,2);e&&(q("\n",e)?o+=`\nValue provided: \n${e}`:o+=`\nValue provided: ${e}`)}}}throw new Error(o)}(s,o,a),function(e,r,n,o){const i=F(r,n);return Array.isArray(o)?t().createElement(e,i,...o):t().createElement(e,i,o)}(r,o,n,i)}te.propTypes={children:o().any,element:o().any,layout:o().any,props:o().any,extraProps:o().any,id:o().string};const re=["String","Number","Null","Boolean"],ne=e=>q(H(e),re),oe={is_loading:!1},ie={resolve:e=>{const{type:t,namespace:r}=e,n=window[r];if(n){if(n[t])return n[t];throw new Error(`Component ${t} not found in ${r}`)}throw new Error(`${r} was not found.`)}};function ae(e,r=null){if($(e)||Z(e))return null;if(ne(e))return e;if(Array.isArray(e))return e.map(((e,t)=>ae(e,t)));const n=ie.resolve(e),o=Q("children",e.props),i=ae(e.props.children);var a;"Object"===H(o.id)&&(o.id="object"!=typeof(a=o.id)?a:"{"+Object.keys(a).sort().map((e=>{return JSON.stringify(e)+":"+((t=a[e])&&t.wild||JSON.stringify(t));var t})).join(",")+"}");const s={props:o,element:n,extraProps:{loading_state:oe,setProps:()=>null},type:e.type,key:r};return t().createElement(te,s,i)}var se=(0,i.WidthProvider)(i.Responsive),le=function(e){var r=e.toolboxContent,n=e.layouts,o=e.breakpoints;return t().createElement("div",{className:"toolbox-container"},t().createElement("span",{className:"toolbox-title"},"Toolbox"),t().createElement(se,{cols:{lg:12,md:10,sm:6,xs:4,xxs:2},breakpoints:o,rowHeight:30,layouts:n,isResizable:!1,isDraggable:!1,containerPadding:[0,0],compactType:"horizontal"},r.map((function(e,r){var n,o=e.props.id||r.toString(),i="string"==typeof e.props._dashprivate_layout.props.defaultName?e.props._dashprivate_layout.props.defaultName:e.props._dashprivate_layout.props.id;return e.props._dashprivate_layout.props&&e.props._dashprivate_layout.props.toolboxContent&&(n=ae(n=e.props._dashprivate_layout.props.toolboxContent)),t().createElement("div",{key:o,className:"item toolbox","data-grid":{x:0,y:0,w:1,h:2},draggable:!0,unselectable:"on",onDragStart:function(t){t.dataTransfer.setData("text/plain",e.props._dashprivate_layout.props.id)}},t().createElement("div",{className:"toolbox-item-content"},n&&n," ",!n&&i))}))))};function ue(e){return ue="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},ue(e)}function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]?arguments[2]:"json",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"*",i=(0,e.useCallback)((function(e){if("*"===o||e.origin===o){if(e&&e.data&&e.data.channel===t){var i=e.data.message;"json"==n&&(i=JSON.parse(e.data.message)),r(i)}}else console.warn("Received message from unauthorized origin:",e.origin)}),[t,r,o]);return(0,e.useEffect)((function(){return window.addEventListener("message",i),function(){window.removeEventListener("message",i)}}),[i]),(0,e.useCallback)((function(e){var r=e;"json"==n&&(r=JSON.stringify(e)),window.postMessage({channel:t,message:r},o)}),[t,o])};function He(e){return He="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},He(e)}function Le(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function We(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&t().createElement(Ge,{cols:{lg:12,md:10,sm:6,xs:4,xxs:2},breakpoints:f,rowHeight:30,layouts:j,isResizable:!1,isDraggable:!1,containerPadding:[0,0],compactType:"horizontal",onBreakpointChange:function(e){y(e)},style:b},x.map((function(e,n){try{var o=e.id||"toolbox-item-".concat(n),i=function(e){return ae(e.element)}(e);return t().createElement("div",{key:o,className:"item toolbox","data-grid":{x:0,y:0,w:1,h:2},unselectable:"on",onDragStart:(a=o,function(e){e.dataTransfer.setData("text/plain",a)}),onClick:S(o)},t().createElement("div",{className:"toolbox-item-content"},r.component(i)))}catch(e){}var a}))),0==x.length&&t().createElement("div",{className:"toolbox-slim"}))}Ye.propTypes={id:o().string,linkedId:o().string,items:o().array.isRequired,title:o().string,component:o().func,layouts:o().object,breakpoints:o().object,setProps:o().func,style:o().object},Ye.defaultProps={title:"Toolbox",component:function(e){return t().createElement("span",null,e)}};const Xe=Ye;function Fe(e){return Fe="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},Fe(e)}function $e(){return $e=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rt||e<=0?t:e},C=function(e,t,r){var n=[],o=[];return e.forEach((function(e){var i;(null===(i=t[r])||void 0===i?void 0:i.some((function(t){return t.i===e.id})))?o.push(e):n.push(e)})),{gridItems:o,toolboxItems:n}}(d,b,o),E=(C.toolboxItems,C.gridItems),T=r.breakpoints,M=void 0===T?s:T,I=r.gridCols,N=void 0===I?l:I,A=r.height,H=void 0===A?30:A,L=r.className,W=r.style,B=r.toolboxTitle,U=r.toolboxComponent;return t().createElement(t().Fragment,null,r.enableToolbox&&t().createElement(Xe,{breakpoints:M,layouts:x,title:B,component:U,items:_,controlled:!0}),t().createElement(tt,$e({className:L,style:W,layouts:b,cols:N,breakpoints:M,rowHeight:H,onBreakpointChange:function(e){i(e)},onDrop:function(e,n,i){var a,s;i.persist();var u=i.dataTransfer.getData("text/plain"),c=null!==(a=null==n?void 0:n.x)&&void 0!==a?a:0,f=null!==(s=null==n?void 0:n.y)&&void 0!==s?s:0,p=b[o].reduce((function(e,t){return t.x>c&&t.xf&&t.y{var e={51:(e,t,r)=>{(t=r(314)(!1)).push([e.id,'.react-grid-layout {\n position: relative;\n transition: height 200ms ease;\n}\n.react-grid-item {\n transition: all 200ms ease;\n transition-property: left, top;\n}\n.react-grid-item img {\n pointer-events: none;\n user-select: none; \n}\n.react-grid-item.cssTransforms {\n transition-property: transform;\n}\n.react-grid-item.resizing {\n z-index: 1;\n will-change: width, height;\n}\n\n.react-grid-item.react-draggable-dragging {\n transition: none;\n z-index: 3;\n will-change: transform;\n}\n\n.react-grid-item.dropping {\n visibility: hidden;\n}\n\n.react-grid-item.react-grid-placeholder {\n background: red;\n opacity: 0.2;\n transition-duration: 100ms;\n z-index: 2;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -o-user-select: none;\n user-select: none;\n}\n\n.react-grid-item > .react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n}\n\n.react-grid-item > .react-resizable-handle::after {\n content: "";\n position: absolute;\n right: 3px;\n bottom: 3px;\n width: 5px;\n height: 5px;\n border-right: 2px solid rgba(0, 0, 0, 0.4);\n border-bottom: 2px solid rgba(0, 0, 0, 0.4);\n}\n\n.react-resizable-hide > .react-resizable-handle {\n display: none;\n}\n\n.react-grid-item > .react-resizable-handle.react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-w,\n.react-grid-item > .react-resizable-handle.react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-n,\n.react-grid-item > .react-resizable-handle.react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n}\n',""]),e.exports=t},291:(e,t,r)=>{(t=r(314)(!1)).push([e.id,".react-resizable {\n position: relative;\n}\n.react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n background-repeat: no-repeat;\n background-origin: content-box;\n box-sizing: border-box;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+');\n background-position: bottom right;\n padding: 0 3px 3px 0;\n}\n.react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n}\n.react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n}\n.react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n}\n.react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n}\n.react-resizable-handle-w,\n.react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n}\n.react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n}\n.react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n}\n.react-resizable-handle-n,\n.react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n}\n.react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n}\n.react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n}",""]),e.exports=t},845:(e,t,r)=>{(t=r(314)(!1)).push([e.id,".react-grid-item.react-grid-placeholder {\n background: #ddd;\n box-shadow: inset 0px 1px 10px 2px rgba(30, 44, 57, 0.25);\n}\n\n/* Item */\n.item {\n background: #ffffff;\n /* border-radius: 5px; */\n box-shadow: 0px 1px 10px -1px rgba(30, 44, 57, 0.15);\n /* box-shadow: 0px 10px 25px -2px rgba(30, 44, 57, 0.15); */\n}\n/* .item:active {\n box-shadow: 0px 25px 25px -2px rgba(30, 44, 57, 0.15);\n transition: box-shadow 200ms;\n} */\n\n.item.active {\n box-shadow: 0px 25px 25px -2px rgba(30, 44, 57, 0.15);\n transition: box-shadow 200ms;\n border: 1px solid blue;\n}\n\n.toolbox {\n cursor: grab;\n word-wrap: break-word;\n}\n.item-top-container {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.item-top {\n height: 10px;\n line-height: 5px;\n padding-top: -5px;\n display: flex;\n cursor: grab;\n transition: background 200ms;\n justify-content: center;\n align-items: flex-start;\n width: 90%;\n}\n.item-top:hover {\n background-color: rgb(241, 241, 247);\n}\n.item-top:active {\n background-color: rgb(220, 220, 228);\n cursor: grabbing;\n}\n\n.close-button {\n position: absolute;\n top: -5px;\n right: -5px;\n cursor: pointer;\n background: none;\n border: none;\n font-size: 1.5em;\n color: #888;\n}\n\n/* Item > Top */\n.item-top-content {\n display: none;\n}\n.item-top:hover .item-top-content {\n display: block;\n margin: auto;\n margin-top: -2px;\n}\n.item-top:active .item-top-content {\n display: block;\n margin: auto;\n margin-top: -2px;\n}\n/* Item > Top */\n.item-top-right {\n display: none;\n cursor: pointer;\n}\n.item-top:hover .item-top-right {\n display: block;\n margin-top: -2px;\n}\n.item-top:active .item-top-right {\n display: block;\n margin-top: -2px;\n}\n\n/* Item > Content */\n.item-content {\n width: 100%;\n height: Calc(100% - 10px);\n overflow: auto;\n}\n\n.toolbox-item-content {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.react-grid-item.item.toolbox.cssTransforms.react-resizable-hide.react-resizable {\n width: 200px !important;\n align-content: center !important;\n justify-content: center !important;\n}\n\n\n",""]),e.exports=t},314:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r,n,o,i=e[1]||"",a=e[3];if(!a)return i;if(t&&"function"==typeof btoa){var s=(r=a,n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),"/*# ".concat(o," */")),l=a.sources.map((function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")}));return[i].concat(l).concat([s]).join("\n")}return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var i=0;i{e=r.nmd(e);var n="__lodash_hash_undefined__",o=1,i=2,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",f="[object Date]",p="[object Error]",d="[object Function]",y="[object GeneratorFunction]",h="[object Map]",b="[object Number]",g="[object Null]",m="[object Object]",v="[object Promise]",w="[object Proxy]",O="[object RegExp]",S="[object Set]",j="[object String]",x="[object Undefined]",P="[object WeakMap]",D="[object ArrayBuffer]",_="[object DataView]",R=/^\[object .+?Constructor\]$/,z=/^(?:0|[1-9]\d*)$/,k={};k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k[s]=k[l]=k[D]=k[c]=k[_]=k[f]=k[p]=k[d]=k[h]=k[b]=k[m]=k[O]=k[S]=k[j]=k[P]=!1;var C="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,E="object"==typeof self&&self&&self.Object===Object&&self,T=C||E||Function("return this")(),M=t&&!t.nodeType&&t,I=M&&e&&!e.nodeType&&e,N=I&&I.exports===M,A=N&&C.process,H=function(){try{return A&&A.binding&&A.binding("util")}catch(e){}}(),L=H&&H.isTypedArray;function W(e,t){for(var r=-1,n=null==e?0:e.length;++ru))return!1;var f=s.get(e);if(f&&s.get(t))return f==t;var p=-1,d=!0,y=r&i?new De:void 0;for(s.set(e,t),s.set(t,e);++p-1},xe.prototype.set=function(e,t){var r=this.__data__,n=Re(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Pe.prototype.clear=function(){this.size=0,this.__data__={hash:new je,map:new(fe||xe),string:new je}},Pe.prototype.delete=function(e){var t=Me(this,e).delete(e);return this.size-=t?1:0,t},Pe.prototype.get=function(e){return Me(this,e).get(e)},Pe.prototype.has=function(e){return Me(this,e).has(e)},Pe.prototype.set=function(e,t){var r=Me(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},De.prototype.add=De.prototype.push=function(e){return this.__data__.set(e,n),this},De.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.clear=function(){this.__data__=new xe,this.size=0},_e.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var r=this.__data__;if(r instanceof xe){var n=r.__data__;if(!fe||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Pe(n)}return r.set(e,t),this.size=r.size,this};var Ne=se?function(e){return null==e?[]:(e=Object(e),function(t,r){for(var n=-1,o=null==t?0:t.length,i=0,a=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=a}function Xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Fe(e){return null!=e&&"object"==typeof e}var $e=L?function(e){return function(t){return e(t)}}(L):function(e){return Fe(e)&&Ye(e.length)&&!!k[ze(e)]};function Je(e){return null!=(t=e)&&Ye(t.length)&&!Ge(t)?function(e,t){var r=Ue(e),n=!r&&Be(e),o=!r&&!n&&qe(e),i=!r&&!n&&!o&&$e(e),a=r||n||o||i,s=a?function(e,t){for(var r=-1,n=Array(e);++r{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},27:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),t.default=void 0;var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(609)),o=p(r(120)),i=p(r(795)),a=p(r(322)),s=r(89),l=r(726),u=r(56),c=p(r(888)),f=p(r(696));function p(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if((0,f.default)("Draggable: onDragStart: %j",t),!1===this.props.onStart(e,(0,l.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),h(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,f.default)("Draggable: onDrag: %j",t);const r=(0,l.createDraggableData)(this,t),n={x:r.x,y:r.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=n;n.x+=this.state.slackX,n.y+=this.state.slackY;const[o,i]=(0,l.getBoundPosition)(this,n.x,n.y);n.x=o,n.y=i,n.slackX=this.state.slackX+(e-n.x),n.slackY=this.state.slackY+(t-n.y),r.x=n.x,r.y=n.y,r.deltaX=n.x-this.state.x,r.deltaY=n.y-this.state.y}if(!1===this.props.onDrag(e,r))return!1;this.setState(n)})),h(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,l.createDraggableData)(this,t)))return!1;(0,f.default)("Draggable: onDragStop: %j",t);const r={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;r.x=e,r.y=t}this.setState(r)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this , 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.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:i.default.findDOMNode(this)}render(){const{axis:e,bounds:t,children:r,defaultPosition:o,defaultClassName:i,defaultClassNameDragging:u,defaultClassNameDragged:f,position:p,positionOffset:d,scale:h,...b}=this.props;let g={},m=null;const v=!Boolean(p)||this.state.dragging,w=p||o,O={x:(0,l.canDragX)(this)&&v?this.state.x:w.x,y:(0,l.canDragY)(this)&&v?this.state.y:w.y};this.state.isElementSVG?m=(0,s.createSVGTransform)(O,d):g=(0,s.createCSSTransform)(O,d);const S=(0,a.default)(r.props.className||"",i,{[u]:this.state.dragging,[f]:this.state.dragged});return n.createElement(c.default,y({},b,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),n.cloneElement(n.Children.only(r),{className:S,style:{...r.props.style,...g},transform:m}))}}t.default=b,h(b,"displayName","Draggable"),h(b,"propTypes",{...c.default.propTypes,axis:o.default.oneOf(["both","x","y","none"]),bounds:o.default.oneOfType([o.default.shape({left:o.default.number,right:o.default.number,top:o.default.number,bottom:o.default.number}),o.default.string,o.default.oneOf([!1])]),defaultClassName:o.default.string,defaultClassNameDragging:o.default.string,defaultClassNameDragged:o.default.string,defaultPosition:o.default.shape({x:o.default.number,y:o.default.number}),positionOffset:o.default.shape({x:o.default.oneOfType([o.default.number,o.default.string]),y:o.default.oneOfType([o.default.number,o.default.string])}),position:o.default.shape({x:o.default.number,y:o.default.number}),className:u.dontSetMe,style:u.dontSetMe,transform:u.dontSetMe}),h(b,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})},888:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=f(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(609)),o=c(r(120)),i=c(r(795)),a=r(89),s=r(726),l=r(56),u=c(r(696));function c(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(f=function(e){return e?r:t})(e)}function p(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const d={start:"touchstart",move:"touchmove",stop:"touchend"},y={start:"mousedown",move:"mousemove",stop:"mouseup"};let h=y;class b extends n.Component{constructor(){super(...arguments),p(this,"dragging",!1),p(this,"lastX",NaN),p(this,"lastY",NaN),p(this,"touchIdentifier",null),p(this,"mounted",!1),p(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error(" not mounted on DragStart!");const{ownerDocument:r}=t;if(this.props.disabled||!(e.target instanceof r.defaultView.Node)||this.props.handle&&!(0,a.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,a.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const n=(0,a.getTouchIdentifier)(e);this.touchIdentifier=n;const o=(0,s.getControlPosition)(e,n,this);if(null==o)return;const{x:i,y:l}=o,c=(0,s.createCoreData)(this,i,l);(0,u.default)("DraggableCore: handleDragStart: %j",c),(0,u.default)("calling",this.props.onStart),!1!==this.props.onStart(e,c)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,a.addUserSelectStyles)(r),this.dragging=!0,this.lastX=i,this.lastY=l,(0,a.addEvent)(r,h.move,this.handleDrag),(0,a.addEvent)(r,h.stop,this.handleDragStop))})),p(this,"handleDrag",(e=>{const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:r,y:n}=t;if(Array.isArray(this.props.grid)){let e=r-this.lastX,t=n-this.lastY;if([e,t]=(0,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;r=this.lastX+e,n=this.lastY+t}const o=(0,s.createCoreData)(this,r,n);if((0,u.default)("DraggableCore: handleDrag: %j",o),!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=r,this.lastY=n;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),p(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:r,y:n}=t;if(Array.isArray(this.props.grid)){let e=r-this.lastX||0,t=n-this.lastY||0;[e,t]=(0,s.snapToGrid)(this.props.grid,e,t),r=this.lastX+e,n=this.lastY+t}const o=(0,s.createCoreData)(this,r,n);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const i=this.findDOMNode();i&&this.props.enableUserSelectHack&&(0,a.removeUserSelectStyles)(i.ownerDocument),(0,u.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,i&&((0,u.default)("DraggableCore: Removing handlers"),(0,a.removeEvent)(i.ownerDocument,h.move,this.handleDrag),(0,a.removeEvent)(i.ownerDocument,h.stop,this.handleDragStop))})),p(this,"onMouseDown",(e=>(h=y,this.handleDragStart(e)))),p(this,"onMouseUp",(e=>(h=y,this.handleDragStop(e)))),p(this,"onTouchStart",(e=>(h=d,this.handleDragStart(e)))),p(this,"onTouchEnd",(e=>(h=d,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,a.addEvent)(e,d.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,a.removeEvent)(t,y.move,this.handleDrag),(0,a.removeEvent)(t,d.move,this.handleDrag),(0,a.removeEvent)(t,y.stop,this.handleDragStop),(0,a.removeEvent)(t,d.stop,this.handleDragStop),(0,a.removeEvent)(e,d.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,a.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:i.default.findDOMNode(this)}render(){return n.cloneElement(n.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}t.default=b,p(b,"displayName","DraggableCore"),p(b,"propTypes",{allowAnyClick:o.default.bool,children:o.default.node.isRequired,disabled:o.default.bool,enableUserSelectHack:o.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:o.default.arrayOf(o.default.number),handle:o.default.string,cancel:o.default.string,nodeRef:o.default.object,onStart:o.default.func,onDrag:o.default.func,onStop:o.default.func,onMouseDown:o.default.func,scale:o.default.number,className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),p(b,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},794:(e,t,r)=>{"use strict";const{default:n,DraggableCore:o}=r(27);e.exports=n,e.exports.default=n,e.exports.DraggableCore=o},89:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addClassName=u,t.addEvent=function(e,t,r,n){if(!e)return;const o={capture:!0,...n};e.addEventListener?e.addEventListener(t,r,o):e.attachEvent?e.attachEvent("on"+t,r):e["on"+t]=r},t.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t)),e.body&&u(e.body,"react-draggable-transparent-selection")},t.createCSSTransform=function(e,t){const r=l(e,t,"px");return{[(0,o.browserPrefixToKey)("transform",o.default)]:r}},t.createSVGTransform=function(e,t){return l(e,t,"")},t.getTouch=function(e,t){return e.targetTouches&&(0,n.findInArray)(e.targetTouches,(e=>t===e.identifier))||e.changedTouches&&(0,n.findInArray)(e.changedTouches,(e=>t===e.identifier))},t.getTouchIdentifier=function(e){return e.targetTouches&&e.targetTouches[0]?e.targetTouches[0].identifier:e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].identifier:void 0},t.getTranslation=l,t.innerHeight=function(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,n.int)(r.paddingTop),t-=(0,n.int)(r.paddingBottom),t},t.innerWidth=function(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,n.int)(r.paddingLeft),t-=(0,n.int)(r.paddingRight),t},t.matchesSelector=s,t.matchesSelectorAndParentsTo=function(e,t,r){let n=e;do{if(s(n,t))return!0;if(n===r)return!1;n=n.parentNode}while(n);return!1},t.offsetXYFromParent=function(e,t,r){const n=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect();return{x:(e.clientX+t.scrollLeft-n.left)/r,y:(e.clientY+t.scrollTop-n.top)/r}},t.outerHeight=function(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,n.int)(r.borderTopWidth),t+=(0,n.int)(r.borderBottomWidth),t},t.outerWidth=function(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,n.int)(r.borderLeftWidth),t+=(0,n.int)(r.borderRightWidth),t},t.removeClassName=c,t.removeEvent=function(e,t,r,n){if(!e)return;const o={capture:!0,...n};e.removeEventListener?e.removeEventListener(t,r,o):e.detachEvent?e.detachEvent("on"+t,r):e["on"+t]=null},t.removeUserSelectStyles=function(e){if(e)try{if(e.body&&c(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}};var n=r(56),o=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}(r(514));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}let a="";function s(e,t){return a||(a=(0,n.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(t){return(0,n.isFunction)(e[t])}))),!!(0,n.isFunction)(e[a])&&e[a](t)}function l(e,t,r){let{x:n,y:o}=e,i="translate(".concat(n).concat(r,",").concat(o).concat(r,")");if(t){const e="".concat("string"==typeof t.x?t.x:t.x+r),n="".concat("string"==typeof t.y?t.y:t.y+r);i="translate(".concat(e,", ").concat(n,")")+i}return i}function u(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function c(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}},514:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.browserPrefixToKey=o,t.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},t.default=void 0,t.getPrefix=n;const r=["Moz","Webkit","O","ms"];function n(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const n=null===(e=window.document)||void 0===e||null===(e=e.documentElement)||void 0===e?void 0:e.style;if(!n)return"";if(t in n)return"";for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){}},726:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},t.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},t.createCoreData=function(e,t,r){const o=!(0,n.isNum)(e.lastX),a=i(e);return o?{node:a,deltaX:0,deltaY:0,lastX:t,lastY:r,x:t,y:r}:{node:a,deltaX:t-e.lastX,deltaY:r-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:r}},t.createDraggableData=function(e,t){const r=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/r,y:e.state.y+t.deltaY/r,deltaX:t.deltaX/r,deltaY:t.deltaY/r,lastX:e.state.x,lastY:e.state.y}},t.getBoundPosition=function(e,t,r){if(!e.props.bounds)return[t,r];let{bounds:a}=e.props;a="string"==typeof a?a:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(a);const s=i(e);if("string"==typeof a){const{ownerDocument:e}=s,t=e.defaultView;let r;if(r="parent"===a?s.parentNode:e.querySelector(a),!(r instanceof t.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const i=r,l=t.getComputedStyle(s),u=t.getComputedStyle(i);a={left:-s.offsetLeft+(0,n.int)(u.paddingLeft)+(0,n.int)(l.marginLeft),top:-s.offsetTop+(0,n.int)(u.paddingTop)+(0,n.int)(l.marginTop),right:(0,o.innerWidth)(i)-(0,o.outerWidth)(s)-s.offsetLeft+(0,n.int)(u.paddingRight)-(0,n.int)(l.marginRight),bottom:(0,o.innerHeight)(i)-(0,o.outerHeight)(s)-s.offsetTop+(0,n.int)(u.paddingBottom)-(0,n.int)(l.marginBottom)}}return(0,n.isNum)(a.right)&&(t=Math.min(t,a.right)),(0,n.isNum)(a.bottom)&&(r=Math.min(r,a.bottom)),(0,n.isNum)(a.left)&&(t=Math.max(t,a.left)),(0,n.isNum)(a.top)&&(r=Math.max(r,a.top)),[t,r]},t.getControlPosition=function(e,t,r){const n="number"==typeof t?(0,o.getTouch)(e,t):null;if("number"==typeof t&&!n)return null;const a=i(r),s=r.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,o.offsetXYFromParent)(n||e,s,r.props.scale)},t.snapToGrid=function(e,t,r){return[Math.round(t/e[0])*e[0],Math.round(r/e[1])*e[1]]};var n=r(56),o=r(89);function i(e){const t=e.findDOMNode();if(!t)throw new Error(": Unmounted during event!");return t}},56:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dontSetMe=function(e,t,r){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(r," - do not set this, set it on the child."))},t.findInArray=function(e,t){for(let r=0,n=e.length;r{"use strict";function n(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;to,default:()=>i});const i=o},392:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=p(r(609)),i=p(r(120)),a=r(794),s=r(36),l=r(426),u=r(134),c=r(634),f=p(r(852));function p(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}},{key:"createStyle",value:function(e){var t,r=this.props,n=r.usePercentages,o=r.containerWidth;return r.useCSSTransforms?t=(0,l.setTransform)(e):(t=(0,l.setTopLeft)(e),n&&(t.left=(0,l.perc)(e.left/o),t.width=(0,l.perc)(e.width/o))),t}},{key:"mixinDraggable",value:function(e,t){return o.default.createElement(a.DraggableCore,{disabled:!t,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},e)}},{key:"mixinResizable",value:function(e,t,r){var n=this.props,i=n.cols,a=n.x,l=n.minW,c=n.minH,f=n.maxW,p=n.maxH,d=n.transformScale,y=n.resizeHandles,h=n.resizeHandle,b=this.getPositionParams(),g=(0,u.calcGridItemPosition)(b,0,0,i-a,0).width,m=(0,u.calcGridItemPosition)(b,0,0,l,c),v=(0,u.calcGridItemPosition)(b,0,0,f,p),w=[m.width,m.height],O=[Math.min(v.width,g),Math.min(v.height,1/0)];return o.default.createElement(s.Resizable,{draggableOpts:{disabled:!r},className:r?void 0:"react-resizable-hide",width:t.width,height:t.height,minConstraints:w,maxConstraints:O,onResizeStop:this.onResizeStop,onResizeStart:this.onResizeStart,onResize:this.onResize,transformScale:d,resizeHandles:y,handle:h},e)}},{key:"onResizeHandler",value:function(e,t,r){var n=t.node,o=t.size,i=this.props[r];if(i){var a=this.props,s=a.cols,l=a.x,c=a.y,f=a.i,p=a.maxH,d=a.minH,y=this.props,h=y.minW,b=y.maxW,g=(0,u.calcWH)(this.getPositionParams(),o.width,o.height,l,c),m=g.w,v=g.h;h=Math.max(h,1),b=Math.min(b,s-l),m=(0,u.clamp)(m,h,b),v=(0,u.clamp)(v,d,p),this.setState({resizing:"onResizeStop"===r?null:o}),i.call(this,f,m,v,{e,node:n,size:o})}}},{key:"render",value:function(){var e=this.props,t=e.x,r=e.y,n=e.w,i=e.h,a=e.isDraggable,s=e.isResizable,l=e.droppingPosition,c=e.useCSSTransforms,p=(0,u.calcGridItemPosition)(this.getPositionParams(),t,r,n,i,this.state),d=o.default.Children.only(this.props.children),h=o.default.cloneElement(d,{ref:this.elementRef,className:(0,f.default)("react-grid-item",d.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":a,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(l),cssTransforms:c}),style:y(y(y({},this.props.style),d.props.style),this.createStyle(p))});return h=this.mixinResizable(h,p,s),this.mixinDraggable(h,a)}}],r&&h(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),d}(o.default.Component);t.default=w,v(w,"propTypes",{children:i.default.element,cols:i.default.number.isRequired,containerWidth:i.default.number.isRequired,rowHeight:i.default.number.isRequired,margin:i.default.array.isRequired,maxRows:i.default.number.isRequired,containerPadding:i.default.array.isRequired,x:i.default.number.isRequired,y:i.default.number.isRequired,w:i.default.number.isRequired,h:i.default.number.isRequired,minW:function(e,t){var r=e[t];return"number"!=typeof r?new Error("minWidth not Number"):r>e.w||r>e.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(e,t){var r=e[t];return"number"!=typeof r?new Error("maxWidth not Number"):re.h||r>e.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(e,t){var r=e[t];return"number"!=typeof r?new Error("maxHeight not Number"):r{"use strict";function n(e){return n="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},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(609)),i=f(r(142)),a=f(r(852)),s=r(426),l=r(134),u=f(r(392)),c=f(r(634));function f(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0){var i=1/0,a=1/0;o.forEach((function(t){t.x>e.x&&(i=Math.min(i,t.x)),t.y>e.y&&(a=Math.min(a,t.y))})),Number.isFinite(i)&&(e.w=i-e.x),Number.isFinite(a)&&(e.h=a-e.y)}}return t||(e.w=r,e.h=n),e})),m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}(e,t)||h(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.")}()}(g,2),v=m[0],w=m[1];if(w){var O={w:w.w,h:w.h,x:w.x,y:w.y,static:!0,i:t};e.props.onResize(v,c,w,O,i,a),e.setState({layout:b?v:(0,s.compact)(v,(0,s.compactType)(e.props),p),activeDrag:O})}})),O(v(e),"onResizeStop",(function(t,r,n,o){var i=o.e,a=o.node,l=e.state,u=l.layout,c=l.oldResizeItem,f=e.props,p=f.cols,d=f.allowOverlap,y=(0,s.getLayoutItem)(u,t);e.props.onResizeStop(u,c,y,null,i,a);var h=d?u:(0,s.compact)(u,(0,s.compactType)(e.props),p),b=e.state.oldLayout;e.setState({activeDrag:null,layout:h,oldResizeItem:null,oldLayout:null}),e.onLayoutMaybeChanged(h,b)})),O(v(e),"onDragOver",(function(t){var r;if(t.preventDefault(),t.stopPropagation(),j&&(null===(r=t.nativeEvent.target)||void 0===r||!r.classList.contains(S)))return!1;var n=e.props,i=n.droppingItem,a=n.onDropDragOver,s=n.margin,u=n.cols,c=n.rowHeight,f=n.maxRows,p=n.width,d=n.containerPadding,g=n.transformScale,m=null==a?void 0:a(t);if(!1===m)return e.state.droppingDOMNode&&e.removeDroppingPlaceholder(),!1;var v,w=y(y({},i),m),O=e.state.layout,x=t.nativeEvent,P=x.layerX,D=x.layerY,_={left:P/g,top:D/g,e:t};if(e.state.droppingDOMNode){if(e.state.droppingPosition){var R=e.state.droppingPosition,z=R.left,k=R.top;(z!=P||k!=D)&&e.setState({droppingPosition:_})}}else{var C={cols:u,margin:s,maxRows:f,rowHeight:c,containerWidth:p,containerPadding:d||s},E=(0,l.calcXY)(C,D,P,w.w,w.h);e.setState({droppingDOMNode:o.createElement("div",{key:w.i}),droppingPosition:_,layout:[].concat((v=O,function(e){if(Array.isArray(e))return b(e)}(v)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(v)||h(v)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[y(y({},w),{},{x:E.x,y:E.y,static:!1,isDraggable:!0})])})}})),O(v(e),"removeDroppingPlaceholder",(function(){var t=e.props,r=t.droppingItem,n=t.cols,o=e.state.layout,i=(0,s.compact)(o.filter((function(e){return e.i!==r.i})),(0,s.compactType)(e.props),n);e.setState({layout:i,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})})),O(v(e),"onDragLeave",(function(t){t.preventDefault(),t.stopPropagation(),e.dragEnterCounter--,0===e.dragEnterCounter&&e.removeDroppingPlaceholder()})),O(v(e),"onDragEnter",(function(t){t.preventDefault(),t.stopPropagation(),e.dragEnterCounter++})),O(v(e),"onDrop",(function(t){t.preventDefault(),t.stopPropagation();var r=e.props.droppingItem,n=e.state.layout,o=n.find((function(e){return e.i===r.i}));e.dragEnterCounter=0,e.removeDroppingPlaceholder(),e.props.onDrop(n,o,t)})),e}return t=x,c=[{key:"getDerivedStateFromProps",value:function(e,t){var r;return t.activeDrag?null:((0,i.default)(e.layout,t.propsLayout)&&e.compactType===t.compactType?(0,s.childrenEqual)(e.children,t.children)||(r=t.layout):r=e.layout,r?{layout:(0,s.synchronizeLayoutWithChildren)(r,e.children,e.cols,(0,s.compactType)(e),e.allowOverlap),compactType:e.compactType,children:e.children,propsLayout:e.layout}:null)}}],(r=[{key:"componentDidMount",value:function(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}},{key:"shouldComponentUpdate",value:function(e,t){return this.props.children!==e.children||!(0,s.fastRGLPropsEqual)(this.props,e,i.default)||this.state.activeDrag!==t.activeDrag||this.state.mounted!==t.mounted||this.state.droppingPosition!==t.droppingPosition}},{key:"componentDidUpdate",value:function(e,t){if(!this.state.activeDrag){var r=this.state.layout,n=t.layout;this.onLayoutMaybeChanged(r,n)}}},{key:"containerHeight",value:function(){if(this.props.autoSize){var e=(0,s.bottom)(this.state.layout),t=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return e*this.props.rowHeight+(e-1)*this.props.margin[1]+2*t+"px"}}},{key:"onLayoutMaybeChanged",value:function(e,t){t||(t=this.state.layout),(0,i.default)(t,e)||this.props.onLayoutChange(e)}},{key:"placeholder",value:function(){var e=this.state.activeDrag;if(!e)return null;var t=this.props,r=t.width,n=t.cols,i=t.margin,a=t.containerPadding,s=t.rowHeight,l=t.maxRows,c=t.useCSSTransforms,f=t.transformScale;return o.createElement(u.default,{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,className:"react-grid-placeholder",containerWidth:r,cols:n,margin:i,containerPadding:a||i,maxRows:l,rowHeight:s,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:c,transformScale:f},o.createElement("div",null))}},{key:"processGridItem",value:function(e,t){if(e&&e.key){var r=(0,s.getLayoutItem)(this.state.layout,String(e.key));if(!r)return null;var n=this.props,i=n.width,a=n.cols,l=n.margin,c=n.containerPadding,f=n.rowHeight,p=n.maxRows,d=n.isDraggable,y=n.isResizable,h=n.isBounded,b=n.useCSSTransforms,g=n.transformScale,m=n.draggableCancel,v=n.draggableHandle,w=n.resizeHandles,O=n.resizeHandle,S=this.state,j=S.mounted,x=S.droppingPosition,P="boolean"==typeof r.isDraggable?r.isDraggable:!r.static&&d,D="boolean"==typeof r.isResizable?r.isResizable:!r.static&&y,_=r.resizeHandles||w,R=P&&h&&!1!==r.isBounded;return o.createElement(u.default,{containerWidth:i,cols:a,margin:l,containerPadding:c||l,maxRows:p,rowHeight:f,cancel:m,handle:v,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:P,isResizable:D,isBounded:R,useCSSTransforms:b&&j,usePercentages:!j,transformScale:g,w:r.w,h:r.h,x:r.x,y:r.y,i:r.i,minH:r.minH,minW:r.minW,maxH:r.maxH,maxW:r.maxW,static:r.static,droppingPosition:t?x:void 0,resizeHandles:_,resizeHandle:O},e)}}},{key:"render",value:function(){var e=this,t=this.props,r=t.className,n=t.style,i=t.isDroppable,l=t.innerRef,u=(0,a.default)(S,r),c=y({height:this.containerHeight()},n);return o.createElement("div",{ref:l,className:u,style:c,onDrop:i?this.onDrop:s.noop,onDragLeave:i?this.onDragLeave:s.noop,onDragEnter:i?this.onDragEnter:s.noop,onDragOver:i?this.onDragOver:s.noop},o.Children.map(this.props.children,(function(t){return e.processGridItem(t)})),i&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}])&&g(t.prototype,r),c&&g(t,c),Object.defineProperty(t,"prototype",{writable:!1}),x}(o.Component);t.default=x,O(x,"displayName","ReactGridLayout"),O(x,"propTypes",c.default),O(x,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:s.noop,onDragStart:s.noop,onDrag:s.noop,onDragStop:s.noop,onResizeStart:s.noop,onResize:s.noop,onResizeStop:s.noop,onDrop:s.noop,onDropDragOver:s.noop})},634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resizeHandleType=t.resizeHandleAxesType=t.default=void 0;var n=i(r(120)),o=i(r(609));function i(e){return e&&e.__esModule?e:{default:e}}var a=n.default.arrayOf(n.default.oneOf(["s","w","e","n","sw","nw","se","ne"]));t.resizeHandleAxesType=a;var s=n.default.oneOfType([n.default.node,n.default.func]);t.resizeHandleType=s;var l={className:n.default.string,style:n.default.object,width:n.default.number,autoSize:n.default.bool,cols:n.default.number,draggableCancel:n.default.string,draggableHandle:n.default.string,verticalCompact:function(e){e.verticalCompact},compactType:n.default.oneOf(["vertical","horizontal"]),layout:function(e){var t=e.layout;void 0!==t&&r(426).validateLayout(t,"layout")},margin:n.default.arrayOf(n.default.number),containerPadding:n.default.arrayOf(n.default.number),rowHeight:n.default.number,maxRows:n.default.number,isBounded:n.default.bool,isDraggable:n.default.bool,isResizable:n.default.bool,allowOverlap:n.default.bool,preventCollision:n.default.bool,useCSSTransforms:n.default.bool,transformScale:n.default.number,isDroppable:n.default.bool,resizeHandles:a,resizeHandle:s,onLayoutChange:n.default.func,onDragStart:n.default.func,onDrag:n.default.func,onDragStop:n.default.func,onResizeStart:n.default.func,onResize:n.default.func,onResizeStop:n.default.func,onDrop:n.default.func,droppingItem:n.default.shape({i:n.default.string.isRequired,w:n.default.number.isRequired,h:n.default.number.isRequired}),children:function(e,t){var r=e[t],n={};o.default.Children.forEach(r,(function(e){if(null!=(null==e?void 0:e.key)){if(n[e.key])throw new Error('Duplicate child key "'+e.key+'" found! This will cause problems in ReactGridLayout.');n[e.key]=!0}}))},innerRef:n.default.any};t.default=l},864:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}t.default=void 0;var o=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(609)),i=f(r(120)),a=f(r(142)),s=r(426),l=r(108),u=f(r(742)),c=["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"];function f(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}function d(){return d=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,c));return o.createElement(u.default,d({},n,{margin:S(t,this.state.breakpoint),containerPadding:S(r,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}])&&b(t.prototype,r),i&&b(t,i),Object.defineProperty(t,"prototype",{writable:!1}),O}(o.Component);t.default=j,w(j,"propTypes",{breakpoint:i.default.string,breakpoints:i.default.object,allowOverlap:i.default.bool,cols:i.default.object,margin:i.default.oneOfType([i.default.array,i.default.object]),containerPadding:i.default.oneOfType([i.default.array,i.default.object]),layouts:function(e,t){if("[object Object]"!==O(e[t]))throw new Error("Layout property must be an object. Received: "+O(e[t]));Object.keys(e[t]).forEach((function(t){if(!(t in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,s.validateLayout)(e.layouts[t],"layouts."+t)}))},width:i.default.number.isRequired,onBreakpointChange:i.default.func,onLayoutChange:i.default.func,onWidthChange:i.default.func}),w(j,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:s.noop,onLayoutChange:s.noop,onWidthChange:s.noop})},134:(e,t)=>{"use strict";function r(e){var t=e.margin,r=e.containerPadding,n=e.containerWidth,o=e.cols;return(n-t[0]*(o-1)-2*r[0])/o}function n(e,t,r){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*r):e}function o(e,t,r){return Math.max(Math.min(e,r),t)}Object.defineProperty(t,"__esModule",{value:!0}),t.calcGridColWidth=r,t.calcGridItemPosition=function(e,t,o,i,a,s){var l=e.margin,u=e.containerPadding,c=e.rowHeight,f=r(e),p={};return s&&s.resizing?(p.width=Math.round(s.resizing.width),p.height=Math.round(s.resizing.height)):(p.width=n(i,f,l[0]),p.height=n(a,c,l[1])),s&&s.dragging?(p.top=Math.round(s.dragging.top),p.left=Math.round(s.dragging.left)):(p.top=Math.round((c+l[1])*o+u[1]),p.left=Math.round((f+l[0])*t+u[0])),p},t.calcGridItemWHPx=n,t.calcWH=function(e,t,n,i,a){var s=e.margin,l=e.maxRows,u=e.cols,c=e.rowHeight,f=r(e),p=Math.round((t+s[0])/(f+s[0])),d=Math.round((n+s[1])/(c+s[1]));return{w:p=o(p,0,u-i),h:d=o(d,0,l-a)}},t.calcXY=function(e,t,n,i,a){var s=e.margin,l=e.cols,u=e.rowHeight,c=e.maxRows,f=r(e),p=Math.round((n-s[0])/(f+s[0])),d=Math.round((t-s[1])/(u+s[1]));return{x:p=o(p,0,l-i),y:d=o(d,0,c-a)}},t.clamp=o},1:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}t.default=function(e){var t;return t=function(t){!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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(m,t);var r,i,l,u,g=(r=m,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(r);if(i){var o=y(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}(this,e)});function m(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m);for(var t=arguments.length,r=new Array(t),n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(t,s);return r&&!this.mounted?o.createElement("div",{className:(0,a.default)(this.props.className,b),style:this.props.style,ref:this.elementRef}):o.createElement(e,c({innerRef:this.elementRef},n,this.state))}}])&&f(l.prototype,u),Object.defineProperty(l,"prototype",{writable:!1}),m}(o.Component),h(t,"defaultProps",{measureBeforeMount:!1}),h(t,"propTypes",{measureBeforeMount:i.default.bool}),t};var o=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(609)),i=l(r(120)),a=l(r(852)),s=["measureBeforeMount"];function l(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}function c(){return c=Object.assign||function(e){for(var t=1;t{e.exports=function(e,t,r){return e===t||e.className===t.className&&r(e.style,t.style)&&e.width===t.width&&e.autoSize===t.autoSize&&e.cols===t.cols&&e.draggableCancel===t.draggableCancel&&e.draggableHandle===t.draggableHandle&&r(e.verticalCompact,t.verticalCompact)&&r(e.compactType,t.compactType)&&r(e.layout,t.layout)&&r(e.margin,t.margin)&&r(e.containerPadding,t.containerPadding)&&e.rowHeight===t.rowHeight&&e.maxRows===t.maxRows&&e.isBounded===t.isBounded&&e.isDraggable===t.isDraggable&&e.isResizable===t.isResizable&&e.allowOverlap===t.allowOverlap&&e.preventCollision===t.preventCollision&&e.useCSSTransforms===t.useCSSTransforms&&e.transformScale===t.transformScale&&e.isDroppable===t.isDroppable&&r(e.resizeHandles,t.resizeHandles)&&r(e.resizeHandle,t.resizeHandle)&&e.onLayoutChange===t.onLayoutChange&&e.onDragStart===t.onDragStart&&e.onDrag===t.onDrag&&e.onDragStop===t.onDragStop&&e.onResizeStart===t.onResizeStart&&e.onResize===t.onResize&&e.onResizeStop===t.onResizeStop&&e.onDrop===t.onDrop&&r(e.droppingItem,t.droppingItem)&&r(e.innerRef,t.innerRef)}},108:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findOrGenerateResponsiveLayout=function(e,t,r,i,a,s){if(e[r])return(0,n.cloneLayout)(e[r]);for(var l=e[i],u=o(t),c=u.slice(u.indexOf(r)),f=0,p=c.length;fe[s]&&(n=s)}return n},t.getColsFromBreakpoint=function(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]},t.sortBreakpoints=o;var n=r(426);function o(e){return Object.keys(e).sort((function(t,r){return e[t]-e[r]}))}},426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bottom=f,t.childrenEqual=function(e,t){return(0,n.default)(o.default.Children.map(e,(function(e){return null==e?void 0:e.key})),o.default.Children.map(t,(function(e){return null==e?void 0:e.key})))},t.cloneLayout=p,t.cloneLayoutItem=y,t.collides=b,t.compact=g,t.compactItem=w,t.compactType=function(e){var t=e||{},r=t.verticalCompact,n=t.compactType;return!1===r?null:n},t.correctBounds=O,t.fastPositionEqual=function(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height},t.fastRGLPropsEqual=void 0,t.getAllCollisions=x,t.getFirstCollision=j,t.getLayoutItem=S,t.getStatics=P,t.modifyLayout=d,t.moveElement=D,t.moveElementAwayFromCollision=_,t.noop=void 0,t.perc=function(e){return 100*e+"%"},t.setTopLeft=function(e){var t=e.top,r=e.left,n=e.width,o=e.height;return{top:"".concat(t,"px"),left:"".concat(r,"px"),width:"".concat(n,"px"),height:"".concat(o,"px"),position:"absolute"}},t.setTransform=function(e){var t=e.top,r=e.left,n=e.width,o=e.height,i="translate(".concat(r,"px,").concat(t,"px)");return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:"".concat(n,"px"),height:"".concat(o,"px"),position:"absolute"}},t.sortLayoutItems=R,t.sortLayoutItemsByColRow=k,t.sortLayoutItemsByRowCol=z,t.synchronizeLayoutWithChildren=function(e,t,r,n,i){e=e||[];var a=[];o.default.Children.forEach(t,(function(t){if(null!=(null==t?void 0:t.key)){var r=S(e,String(t.key));if(r)a.push(y(r));else{!u&&t.props._grid&&console.warn("`_grid` properties on children have been deprecated as of React 15.2. Please use `data-grid` or add your properties directly to the `layout`.");var n=t.props["data-grid"]||t.props._grid;n?(u||C([n],"ReactGridLayout.children"),a.push(y(s(s({},n),{},{i:t.key})))):a.push(y({w:1,h:1,x:0,y:f(a),i:String(t.key)}))}}}));var l=O(a,{cols:r});return i?l:g(l,n,r)},t.validateLayout=C,t.withLayoutItem=function(e,t,r){var n=S(e,t);return n?[e=d(e,n=r(y(n))),n]:[e,null]};var n=i(r(142)),o=i(r(609));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;tr&&(r=t);return r}function p(e){for(var t=Array(e.length),r=0,n=e.length;r=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function g(e,t,r){for(var n=P(e),o=R(e,t),i=Array(e.length),a=0,s=o.length;at.y+t.h)break;b(t,a)&&v(e,a,r+t[o],n)}}t[n]=r}function w(e,t,r,n,o){var i,a="horizontal"===r;if("vertical"===r)for(t.y=Math.min(f(e),t.y);t.y>0&&!j(e,t);)t.y--;else if(a)for(;t.x>0&&!j(e,t);)t.x--;for(;i=j(e,t);)a?v(o,t,i.x+i.w,"x"):v(o,t,i.y+i.h,"y"),a&&t.x+t.w>n&&(t.x=n-t.w,t.y++);return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function O(e,t){for(var r=P(e),n=0,o=e.length;nt.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),i.static)for(;j(r,i);)i.y++;else r.push(i)}return e}function S(e,t){for(var r=0,n=e.length;r=n:"horizontal"===a&&"number"==typeof r&&u>=r)&&(f=f.reverse());var d=x(f,t),y=d.length>0;if(y&&l)return p(e);if(y&&i)return E("Collision prevented on ".concat(t.i,", reverting.")),t.x=u,t.y=c,t.moved=!1,e;for(var h=0,b=d.length;ht.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1}))}function k(e){return e.slice(0).sort((function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1}))}function C(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout",r=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(var n=0,o=e.length;n{e.exports=r(742).default,r(426),e.exports.Responsive=r(864).default,e.exports.Responsive.utils=r(108),e.exports.WidthProvider=r(1).default},852:(e,t,r)=>{"use strict";function n(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;to,default:()=>i});const i=o},630:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=void 0;var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=l(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(609)),o=r(794),i=r(30),a=r(329),s=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;tMath.abs(l*a)?t=e/a:e=t*a}var u=e,c=t,f=this.slack||[0,0],p=f[0],d=f[1];return e+=p,t+=d,n&&(e=Math.max(n[0],e),t=Math.max(n[1],t)),o&&(e=Math.min(o[0],e),t=Math.min(o[1],t)),this.slack=[p+(u-e),d+(c-t)],[e,t]},l.resizeHandler=function(e,t){var r=this;return function(n,o){var i=o.node,a=o.deltaX,s=o.deltaY;"onResizeStart"===e&&r.resetData();var l=("both"===r.props.axis||"x"===r.props.axis)&&"n"!==t&&"s"!==t,u=("both"===r.props.axis||"y"===r.props.axis)&&"e"!==t&&"w"!==t;if(l||u){var c=t[0],f=t[t.length-1],p=i.getBoundingClientRect();null!=r.lastHandleRect&&("w"===f&&(a+=p.left-r.lastHandleRect.left),"n"===c&&(s+=p.top-r.lastHandleRect.top)),r.lastHandleRect=p,"w"===f&&(a=-a),"n"===c&&(s=-s);var d=r.props.width+(l?a/r.props.transformScale:0),y=r.props.height+(u?s/r.props.transformScale:0),h=r.runConstraints(d,y);d=h[0],y=h[1];var b=d!==r.props.width||y!==r.props.height,g="function"==typeof r.props[e]?r.props[e]:null;g&&!("onResize"===e&&!b)&&(null==n.persist||n.persist(),g(n,{node:i,size:{width:d,height:y},handle:t})),"onResizeStop"===e&&r.resetData()}}},l.renderResizeHandle=function(e,t){var r=this.props.handle;if(!r)return n.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+e,ref:t});if("function"==typeof r)return r(e,t);var o=f({ref:t},"string"==typeof r.type?{}:{handleAxis:e});return n.cloneElement(r,o)},l.render=function(){var e=this,t=this.props,r=t.children,a=t.className,l=t.draggableOpts,c=(t.width,t.height,t.handle,t.handleSize,t.lockAspectRatio,t.axis,t.minConstraints,t.maxConstraints,t.onResize,t.onResizeStop,t.onResizeStart,t.resizeHandles),p=(t.transformScale,function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(t,s));return(0,i.cloneElement)(r,f(f({},p),{},{className:(a?a+" ":"")+"react-resizable",children:[].concat(r.props.children,c.map((function(t){var r,i=null!=(r=e.handleRefs[t])?r:e.handleRefs[t]=n.createRef();return n.createElement(o.DraggableCore,u({},l,{nodeRef:i,key:"resizableHandle-"+t,onStop:e.resizeHandler("onResizeStop",t),onStart:e.resizeHandler("onResizeStart",t),onDrag:e.resizeHandler("onResize",t)}),e.renderResizeHandle(t,i))})))}))},a}(n.Component);t.default=y,y.propTypes=a.resizableProps,y.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1}},661:(e,t,r)=>{"use strict";t.default=void 0;var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(609)),o=l(r(120)),i=l(r(630)),a=r(329),s=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function l(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,s);return n.createElement(i.default,{axis:y,draggableOpts:l,handle:t,handleSize:r,height:this.state.height,lockAspectRatio:d,maxConstraints:f,minConstraints:u,onResizeStart:o,onResize:this.onResize,onResizeStop:a,resizeHandles:h,transformScale:g,width:this.state.width},n.createElement("div",c({},m,{style:p(p({},b),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},o}(n.Component);t.default=h,h.propTypes=p(p({},a.resizableProps),{},{children:o.default.element})},329:(e,t,r)=>{"use strict";t.__esModule=!0,t.resizableProps=void 0;var n,o=(n=r(120))&&n.__esModule?n:{default:n};r(794);var i={axis:o.default.oneOf(["both","x","y","none"]),className:o.default.string,children:o.default.element.isRequired,draggableOpts:o.default.shape({allowAnyClick:o.default.bool,cancel:o.default.string,children:o.default.node,disabled:o.default.bool,enableUserSelectHack:o.default.bool,offsetParent:o.default.node,grid:o.default.arrayOf(o.default.number),handle:o.default.string,nodeRef:o.default.object,onStart:o.default.func,onDrag:o.default.func,onStop:o.default.func,onMouseDown:o.default.func,scale:o.default.number}),height:function(){for(var e=arguments.length,t=new Array(e),r=0;r{"use strict";t.__esModule=!0,t.cloneElement=function(e,t){return t.style&&e.props.style&&(t.style=a(a({},e.props.style),t.style)),t.className&&e.props.className&&(t.className=e.props.className+" "+t.className),o.default.cloneElement(e,t)};var n,o=(n=r(609))&&n.__esModule?n:{default:n};function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t{"use strict";e.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},e.exports.Resizable=r(630).default,e.exports.ResizableBox=r(661).default},411:(e,t,r)=>{var n=r(51);"string"==typeof n&&(n=[[e.id,n,""]]);r(408)(n,{hmr:!0,transform:void 0,insertInto:void 0}),n.locals&&(e.exports=n.locals)},171:(e,t,r)=>{var n=r(291);"string"==typeof n&&(n=[[e.id,n,""]]);r(408)(n,{hmr:!0,transform:void 0,insertInto:void 0}),n.locals&&(e.exports=n.locals)},549:(e,t,r)=>{var n=r(845);"string"==typeof n&&(n=[[e.id,n,""]]);r(408)(n,{hmr:!0,transform:void 0,insertInto:void 0}),n.locals&&(e.exports=n.locals)},408:(e,t,r)=>{var n,o,i={},a=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=n.apply(this,arguments)),o}),s=function(e,t){return t?t.querySelector(e):document.querySelector(e)},l=function(e){var t={};return function(e,r){if("function"==typeof e)return e();if(void 0===t[e]){var n=s.call(this,e,r);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),u=null,c=0,f=[],p=r(874);function d(e,t){for(var r=0;r=0&&f.splice(t,1)}function g(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=r.nc;n&&(e.attrs.nonce=n)}return m(t,e.attrs),h(e,t),t}function m(e,t){Object.keys(t).forEach((function(r){e.setAttribute(r,t[r])}))}function v(e,t){var r,n,o,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var a=c++;r=u||(u=g(t)),n=S.bind(null,r,a,!1),o=S.bind(null,r,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),h(e,t),t}(t),n=x.bind(null,r,t),o=function(){b(r),r.href&&URL.revokeObjectURL(r.href)}):(r=g(t),n=j.bind(null,r),o=function(){b(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var r=y(e,t);return d(r,t),function(e){for(var n=[],o=0;o{e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var r=t.protocol+"//"+t.host,n=r+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var o,i=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?r+i:n+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},120:e=>{"use strict";e.exports=window.PropTypes},609:e=>{"use strict";e.exports=window.React},795:e=>{"use strict";e.exports=window.ReactDOM}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n](i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n,o=function(){var e=document.currentScript;if(!e){for(var t=document.getElementsByTagName("script"),r=[],n=0;n{"use strict";r.r(a),r.d(a,{DashboardItemResponsive:()=>ft,ResponsiveGridLayout:()=>Pt,ToolBox2:()=>Xe,ToolBoxGrid:()=>Ne,ToolBoxGrid2:()=>nt,ToolboxItem:()=>Tt});var e=r(609),t=r.n(e),n=r(120),o=r.n(n),i=r(816),s={lg:1200,md:996,sm:768,xs:480,xxs:0},l={lg:12,md:10,sm:6,xs:4,xxs:2},u={lg:6,md:5,sm:3,xs:4,xxs:2};function c(e){return c="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},c(e)}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t=0;)z(t=M[r],e)&&!N(n,t)&&(n[n.length]=t),r-=1;return n})):P((function(e){return Object(e)!==e?[]:Object.keys(e)})),H=P((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function L(e,t,r,n){var o=_(e);function i(e,t){return W(e,t,r.slice(),n.slice())}return!R((function(e,t){return!R(i,t,e)}),_(t),o)}function W(e,t,r,n){if(k(e,t))return!0;var o,i,a=H(e);if(a!==H(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(o=e.constructor,null==(i=String(o).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!k(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!k(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var s=r.length-1;s>=0;){if(r[s]===e)return n[s]===t;s-=1}switch(a){case"Map":return e.size===t.size&&L(e.entries(),t.entries(),r.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&L(e.values(),t.values(),r.concat([e]),n.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var l=A(e);if(l.length!==A(t).length)return!1;var u=r.concat([e]),c=n.concat([t]);for(s=l.length-1;s>=0;){var f=l[s];if(!z(f,t)||!W(t[f],e[f],u,c))return!1;s-=1}return!0}const B=D((function(e,t){return W(e,t,[],[])}));function U(e,t){return function(e,t,r){var n,o;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(n=1/t;r=0}const q=D(U),G=D((function(e,t){if(0===e.length)return!1;for(var r=t,n=0;n=0&&"[object Array]"===Object.prototype.toString.call(e)},V=P((function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():J(e)?[]:function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)?"":function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)?{}:E(e)?function(){return arguments}():void 0})),Z=P((function(e){return null!=e&&B(e,V(e))})),Q=D((function(e,t){var r={};for(var n in t)r[n]=t[n];return delete r[e],r}));var K=r(925),ee=r.n(K);function te(e){const{element:r,extraProps:n,props:o,children:i,type:a}=e,s=function(e,t,r,n,o=null){const i=[];for(const s in e)if(e.hasOwnProperty(s)){let l;try{"function"!=typeof e[s]?(l=Error((n||"React class")+": "+r+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[s]+"`."),l.name="Invariant Violation"):l=e[s](t,s,n,r,null,ee())}catch(e){l=e}if(!l||l instanceof Error||i.push((n||"React class")+": type specification of "+r+" `"+s+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof l+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),l instanceof Error){var a=o&&o()||"";i.push("Failed "+r+" type: "+l.message+a)}}return i.join("\n\n")}(r.propTypes,o,"component prop",r);return s&&function(e,t,r){const n=e.split("`");let o;if(q("is marked as required",e))o=`${n[1]} in ${r}`,t.id&&(o+=` with ID "${t.id}"`),o+=" is required but it was not provided.";else if(q("Bad object",e))o=e.split("supplied to ")[0]+`supplied to ${r}.\nBad`+e.split(".\nBad")[1];else{if(!q("Invalid ",e)||!q(" supplied to ",e))throw new Error(e);{const i=n[1];if(o=`Invalid argument \`${i}\` passed into ${r}`,t.id&&(o+=` with ID "${t.id}"`),o+=".",q(", expected ",e)&&(o+=`\nExpected ${e.split(", expected ")[1]}`),q(" of type `",e)&&(o+=`\nWas supplied type \`${e.split(" of type `")[1].split("`")[0]}\`.`),Y(i,t)){const e=JSON.stringify(t[i],null,2);e&&(q("\n",e)?o+=`\nValue provided: \n${e}`:o+=`\nValue provided: ${e}`)}}}throw new Error(o)}(s,o,a),function(e,r,n,o){const i=F(r,n);return Array.isArray(o)?t().createElement(e,i,...o):t().createElement(e,i,o)}(r,o,n,i)}te.propTypes={children:o().any,element:o().any,layout:o().any,props:o().any,extraProps:o().any,id:o().string};const re=["String","Number","Null","Boolean"],ne=e=>q(H(e),re),oe={is_loading:!1},ie={resolve:e=>{const{type:t,namespace:r}=e,n=window[r];if(n){if(n[t])return n[t];throw new Error(`Component ${t} not found in ${r}`)}throw new Error(`${r} was not found.`)}};function ae(e,r=null){if($(e)||Z(e))return null;if(ne(e))return e;if(Array.isArray(e))return e.map(((e,t)=>ae(e,t)));const n=ie.resolve(e),o=Q("children",e.props),i=ae(e.props.children);var a;"Object"===H(o.id)&&(o.id="object"!=typeof(a=o.id)?a:"{"+Object.keys(a).sort().map((e=>{return JSON.stringify(e)+":"+((t=a[e])&&t.wild||JSON.stringify(t));var t})).join(",")+"}");const s={props:o,element:n,extraProps:{loading_state:oe,setProps:()=>null},type:e.type,key:r};return t().createElement(te,s,i)}var se=(0,i.WidthProvider)(i.Responsive),le=function(e){var r=e.toolboxContent,n=e.layouts,o=e.breakpoints;return t().createElement("div",{className:"toolbox-container"},t().createElement("span",{className:"toolbox-title"},"Toolbox"),t().createElement(se,{cols:{lg:12,md:10,sm:6,xs:4,xxs:2},breakpoints:o,rowHeight:30,layouts:n,isResizable:!1,isDraggable:!1,containerPadding:[0,0],compactType:"horizontal"},r.map((function(e,r){var n,o=e.props.id||r.toString(),i="string"==typeof e.props._dashprivate_layout.props.defaultName?e.props._dashprivate_layout.props.defaultName:e.props._dashprivate_layout.props.id;return e.props._dashprivate_layout.props&&e.props._dashprivate_layout.props.toolboxContent&&(n=ae(n=e.props._dashprivate_layout.props.toolboxContent)),t().createElement("div",{key:o,className:"item toolbox","data-grid":{x:0,y:0,w:1,h:2},draggable:!0,unselectable:"on",onDragStart:function(t){t.dataTransfer.setData("text/plain",e.props._dashprivate_layout.props.id)}},t().createElement("div",{className:"toolbox-item-content"},n&&n," ",!n&&i))}))))};function ue(e){return ue="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},ue(e)}function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]?arguments[2]:"json",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"*",i=(0,e.useCallback)((function(e){if("*"===o||e.origin===o){if(e&&e.data&&e.data.channel===t){var i=e.data.message;"json"==n&&(i=JSON.parse(e.data.message)),r(i)}}else console.warn("Received message from unauthorized origin:",e.origin)}),[t,r,o]);return(0,e.useEffect)((function(){return window.addEventListener("message",i),function(){window.removeEventListener("message",i)}}),[i]),(0,e.useCallback)((function(e){var r=e;"json"==n&&(r=JSON.stringify(e)),window.postMessage({channel:t,message:r},o)}),[t,o])};function He(e){return He="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},He(e)}function Le(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function We(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&t().createElement(Ge,{cols:{lg:12,md:10,sm:6,xs:4,xxs:2},breakpoints:f,rowHeight:30,layouts:j,isResizable:!1,isDraggable:!1,containerPadding:[0,0],compactType:"vertical",onBreakpointChange:function(e){y(e)},style:b},x.map((function(e,n){try{var o=e.id||"toolbox-item-".concat(n),i=function(e){return ae(e.element)}(e);return t().createElement("div",{key:o,className:"item toolbox","data-grid":{x:0,y:0,w:1,h:2},unselectable:"on",onDragStart:(a=o,function(e){e.dataTransfer.setData("text/plain",a)}),onClick:S(o)},r.component(i))}catch(e){}var a}))),0==x.length&&t().createElement("div",{className:"toolbox-slim"}))}Ye.propTypes={id:o().string,linkedId:o().string,items:o().array.isRequired,title:o().string,component:o().func,layouts:o().object,breakpoints:o().object,setProps:o().func,style:o().object},Ye.defaultProps={title:"Toolbox",component:function(e){return t().createElement("span",null,e)}};const Xe=Ye;function Fe(e){return Fe="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},Fe(e)}function $e(){return $e=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rt||e<=0?t:e},C=function(e,t,r){var n=[],o=[];return e.forEach((function(e){var i;(null===(i=t[r])||void 0===i?void 0:i.some((function(t){return t.i===e.id})))?o.push(e):n.push(e)})),{gridItems:o,toolboxItems:n}}(d,b,o),E=(C.toolboxItems,C.gridItems),T=r.breakpoints,M=void 0===T?s:T,I=r.gridCols,N=void 0===I?l:I,A=r.height,H=void 0===A?30:A,L=r.className,W=r.style,B=r.toolboxTitle,U=r.toolboxComponent;return t().createElement(t().Fragment,null,r.enableToolbox&&t().createElement(Xe,{breakpoints:M,layouts:x,title:B,component:U,items:_,controlled:!0}),t().createElement(tt,$e({className:L,style:W,layouts:b,cols:N,breakpoints:M,rowHeight:H,onBreakpointChange:function(e){i(e)},onDrop:function(e,n,i){var a,s;i.persist();var u=i.dataTransfer.getData("text/plain"),c=null!==(a=null==n?void 0:n.x)&&void 0!==a?a:0,f=null!==(s=null==n?void 0:n.y)&&void 0!==s?s:0,p=b[o].reduce((function(e,t){return t.x>c&&t.xf&&t.y .react-resizable-handle {\\n position: absolute;\\n width: 20px;\\n height: 20px;\\n}\\n\\n.react-grid-item > .react-resizable-handle::after {\\n content: \\\"\\\";\\n position: absolute;\\n right: 3px;\\n bottom: 3px;\\n width: 5px;\\n height: 5px;\\n border-right: 2px solid rgba(0, 0, 0, 0.4);\\n border-bottom: 2px solid rgba(0, 0, 0, 0.4);\\n}\\n\\n.react-resizable-hide > .react-resizable-handle {\\n display: none;\\n}\\n\\n.react-grid-item > .react-resizable-handle.react-resizable-handle-sw {\\n bottom: 0;\\n left: 0;\\n cursor: sw-resize;\\n transform: rotate(90deg);\\n}\\n.react-grid-item > .react-resizable-handle.react-resizable-handle-se {\\n bottom: 0;\\n right: 0;\\n cursor: se-resize;\\n}\\n.react-grid-item > .react-resizable-handle.react-resizable-handle-nw {\\n top: 0;\\n left: 0;\\n cursor: nw-resize;\\n transform: rotate(180deg);\\n}\\n.react-grid-item > .react-resizable-handle.react-resizable-handle-ne {\\n top: 0;\\n right: 0;\\n cursor: ne-resize;\\n transform: rotate(270deg);\\n}\\n.react-grid-item > .react-resizable-handle.react-resizable-handle-w,\\n.react-grid-item > .react-resizable-handle.react-resizable-handle-e {\\n top: 50%;\\n margin-top: -10px;\\n cursor: ew-resize;\\n}\\n.react-grid-item > .react-resizable-handle.react-resizable-handle-w {\\n left: 0;\\n transform: rotate(135deg);\\n}\\n.react-grid-item > .react-resizable-handle.react-resizable-handle-e {\\n right: 0;\\n transform: rotate(315deg);\\n}\\n.react-grid-item > .react-resizable-handle.react-resizable-handle-n,\\n.react-grid-item > .react-resizable-handle.react-resizable-handle-s {\\n left: 50%;\\n margin-left: -10px;\\n cursor: ns-resize;\\n}\\n.react-grid-item > .react-resizable-handle.react-resizable-handle-n {\\n top: 0;\\n transform: rotate(225deg);\\n}\\n.react-grid-item > .react-resizable-handle.react-resizable-handle-s {\\n bottom: 0;\\n transform: rotate(45deg);\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".react-resizable {\\n position: relative;\\n}\\n.react-resizable-handle {\\n position: absolute;\\n width: 20px;\\n height: 20px;\\n background-repeat: no-repeat;\\n background-origin: content-box;\\n box-sizing: border-box;\\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+');\\n background-position: bottom right;\\n padding: 0 3px 3px 0;\\n}\\n.react-resizable-handle-sw {\\n bottom: 0;\\n left: 0;\\n cursor: sw-resize;\\n transform: rotate(90deg);\\n}\\n.react-resizable-handle-se {\\n bottom: 0;\\n right: 0;\\n cursor: se-resize;\\n}\\n.react-resizable-handle-nw {\\n top: 0;\\n left: 0;\\n cursor: nw-resize;\\n transform: rotate(180deg);\\n}\\n.react-resizable-handle-ne {\\n top: 0;\\n right: 0;\\n cursor: ne-resize;\\n transform: rotate(270deg);\\n}\\n.react-resizable-handle-w,\\n.react-resizable-handle-e {\\n top: 50%;\\n margin-top: -10px;\\n cursor: ew-resize;\\n}\\n.react-resizable-handle-w {\\n left: 0;\\n transform: rotate(135deg);\\n}\\n.react-resizable-handle-e {\\n right: 0;\\n transform: rotate(315deg);\\n}\\n.react-resizable-handle-n,\\n.react-resizable-handle-s {\\n left: 50%;\\n margin-left: -10px;\\n cursor: ns-resize;\\n}\\n.react-resizable-handle-n {\\n top: 0;\\n transform: rotate(225deg);\\n}\\n.react-resizable-handle-s {\\n bottom: 0;\\n transform: rotate(45deg);\\n}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".react-grid-item.react-grid-placeholder {\\n background: #ddd;\\n box-shadow: inset 0px 1px 10px 2px rgba(30, 44, 57, 0.25);\\n}\\n\\n/* Item */\\n.item {\\n background: #ffffff;\\n /* border-radius: 5px; */\\n box-shadow: 0px 1px 10px -1px rgba(30, 44, 57, 0.15);\\n /* box-shadow: 0px 10px 25px -2px rgba(30, 44, 57, 0.15); */\\n}\\n/* .item:active {\\n box-shadow: 0px 25px 25px -2px rgba(30, 44, 57, 0.15);\\n transition: box-shadow 200ms;\\n} */\\n\\n.item.active {\\n box-shadow: 0px 25px 25px -2px rgba(30, 44, 57, 0.15);\\n transition: box-shadow 200ms;\\n border: 1px solid blue;\\n}\\n\\n.toolbox {\\n cursor: grab;\\n word-wrap: break-word;\\n}\\n.item-top-container {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n}\\n.item-top {\\n height: 10px;\\n line-height: 5px;\\n padding-top: -5px;\\n display: flex;\\n cursor: grab;\\n transition: background 200ms;\\n justify-content: center;\\n align-items: flex-start;\\n width: 90%;\\n}\\n.item-top:hover {\\n background-color: rgb(241, 241, 247);\\n}\\n.item-top:active {\\n background-color: rgb(220, 220, 228);\\n cursor: grabbing;\\n}\\n\\n.close-button {\\n position: absolute;\\n top: -5px;\\n right: -5px;\\n cursor: pointer;\\n background: none;\\n border: none;\\n font-size: 1.5em;\\n color: #888;\\n}\\n\\n/* Item > Top */\\n.item-top-content {\\n display: none;\\n}\\n.item-top:hover .item-top-content {\\n display: block;\\n margin: auto;\\n margin-top: -2px;\\n}\\n.item-top:active .item-top-content {\\n display: block;\\n margin: auto;\\n margin-top: -2px;\\n}\\n/* Item > Top */\\n.item-top-right {\\n display: none;\\n cursor: pointer;\\n}\\n.item-top:hover .item-top-right {\\n display: block;\\n margin-top: -2px;\\n}\\n.item-top:active .item-top-right {\\n display: block;\\n margin-top: -2px;\\n}\\n\\n/* Item > Content */\\n.item-content {\\n width: 100%;\\n height: Calc(100% - 10px);\\n overflow: auto;\\n}\\n\\n.toolbox-item-content {\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n}\\n\\n\\n.toolbox-container {\\n background-color: chartreuse;\\n}\\n\\n.toolbox-bg {\\n background-color: blue;\\n}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = isEqual;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"DraggableCore\", {\n enumerable: true,\n get: function () {\n return _DraggableCore.default;\n }\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\nvar _clsx = _interopRequireDefault(require(\"clsx\"));\nvar _domFns = require(\"./utils/domFns\");\nvar _positionFns = require(\"./utils/positionFns\");\nvar _shims = require(\"./utils/shims\");\nvar _DraggableCore = _interopRequireDefault(require(\"./DraggableCore\"));\nvar _log = _interopRequireDefault(require(\"./utils/log\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); } /*:: import type {ControlPosition, PositionOffsetControlPosition, DraggableCoreProps, DraggableCoreDefaultProps} from './DraggableCore';*/\n/*:: import type {Bounds, DraggableEventHandler} from './utils/types';*/\n/*:: import type {Element as ReactElement} from 'react';*/\n/*:: type DraggableState = {\n dragging: boolean,\n dragged: boolean,\n x: number, y: number,\n slackX: number, slackY: number,\n isElementSVG: boolean,\n prevPropsPosition: ?ControlPosition,\n};*/\n/*:: export type DraggableDefaultProps = {\n ...DraggableCoreDefaultProps,\n axis: 'both' | 'x' | 'y' | 'none',\n bounds: Bounds | string | false,\n defaultClassName: string,\n defaultClassNameDragging: string,\n defaultClassNameDragged: string,\n defaultPosition: ControlPosition,\n scale: number,\n};*/\n/*:: export type DraggableProps = {\n ...DraggableCoreProps,\n ...DraggableDefaultProps,\n positionOffset: PositionOffsetControlPosition,\n position: ControlPosition,\n};*/\n//\n// Define \n//\nclass Draggable extends React.Component /*:: */{\n // React 16.3+\n // Arity (props, state)\n static getDerivedStateFromProps(_ref /*:: */, _ref2 /*:: */) /*: ?Partial*/{\n let {\n position\n } /*: DraggableProps*/ = _ref /*: DraggableProps*/;\n let {\n prevPropsPosition\n } /*: DraggableState*/ = _ref2 /*: DraggableState*/;\n // Set x/y if a new position is provided in props that is different than the previous.\n if (position && (!prevPropsPosition || position.x !== prevPropsPosition.x || position.y !== prevPropsPosition.y)) {\n (0, _log.default)('Draggable: getDerivedStateFromProps %j', {\n position,\n prevPropsPosition\n });\n return {\n x: position.x,\n y: position.y,\n prevPropsPosition: {\n ...position\n }\n };\n }\n return null;\n }\n constructor(props /*: DraggableProps*/) {\n super(props);\n _defineProperty(this, \"onDragStart\", (e, coreData) => {\n (0, _log.default)('Draggable: onDragStart: %j', coreData);\n\n // Short-circuit if user's callback killed it.\n const shouldStart = this.props.onStart(e, (0, _positionFns.createDraggableData)(this, coreData));\n // Kills start event on core as well, so move handlers are never bound.\n if (shouldStart === false) return false;\n this.setState({\n dragging: true,\n dragged: true\n });\n });\n _defineProperty(this, \"onDrag\", (e, coreData) => {\n if (!this.state.dragging) return false;\n (0, _log.default)('Draggable: onDrag: %j', coreData);\n const uiData = (0, _positionFns.createDraggableData)(this, coreData);\n const newState = {\n x: uiData.x,\n y: uiData.y,\n slackX: 0,\n slackY: 0\n };\n\n // Keep within bounds.\n if (this.props.bounds) {\n // Save original x and y.\n const {\n x,\n y\n } = newState;\n\n // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n newState.x += this.state.slackX;\n newState.y += this.state.slackY;\n\n // Get bound position. This will ceil/floor the x and y within the boundaries.\n const [newStateX, newStateY] = (0, _positionFns.getBoundPosition)(this, newState.x, newState.y);\n newState.x = newStateX;\n newState.y = newStateY;\n\n // Recalculate slack by noting how much was shaved by the boundPosition handler.\n newState.slackX = this.state.slackX + (x - newState.x);\n newState.slackY = this.state.slackY + (y - newState.y);\n\n // Update the event we fire to reflect what really happened after bounds took effect.\n uiData.x = newState.x;\n uiData.y = newState.y;\n uiData.deltaX = newState.x - this.state.x;\n uiData.deltaY = newState.y - this.state.y;\n }\n\n // Short-circuit if user's callback killed it.\n const shouldUpdate = this.props.onDrag(e, uiData);\n if (shouldUpdate === false) return false;\n this.setState(newState);\n });\n _defineProperty(this, \"onDragStop\", (e, coreData) => {\n if (!this.state.dragging) return false;\n\n // Short-circuit if user's callback killed it.\n const shouldContinue = this.props.onStop(e, (0, _positionFns.createDraggableData)(this, coreData));\n if (shouldContinue === false) return false;\n (0, _log.default)('Draggable: onDragStop: %j', coreData);\n const newState /*: Partial*/ = {\n dragging: false,\n slackX: 0,\n slackY: 0\n };\n\n // If this is a controlled component, the result of this operation will be to\n // revert back to the old position. We expect a handler on `onDragStop`, at the least.\n const controlled = Boolean(this.props.position);\n if (controlled) {\n const {\n x,\n y\n } = this.props.position;\n newState.x = x;\n newState.y = y;\n }\n this.setState(newState);\n });\n this.state = {\n // Whether or not we are currently dragging.\n dragging: false,\n // Whether or not we have been dragged before.\n dragged: false,\n // Current transform x and y.\n x: props.position ? props.position.x : props.defaultPosition.x,\n y: props.position ? props.position.y : props.defaultPosition.y,\n prevPropsPosition: {\n ...props.position\n },\n // Used for compensating for out-of-bounds drags\n slackX: 0,\n slackY: 0,\n // Can only determine if SVG after mounting\n isElementSVG: false\n };\n if (props.position && !(props.onDrag || props.onStop)) {\n // eslint-disable-next-line no-console\n console.warn('A `position` was applied to this , 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.');\n }\n }\n componentDidMount() {\n // Check to see if the element passed is an instanceof SVGElement\n if (typeof window.SVGElement !== 'undefined' && this.findDOMNode() instanceof window.SVGElement) {\n this.setState({\n isElementSVG: true\n });\n }\n }\n componentWillUnmount() {\n this.setState({\n dragging: false\n }); // prevents invariant if unmounted while dragging\n }\n\n // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find\n // the underlying DOM node ourselves. See the README for more information.\n findDOMNode() /*: ?HTMLElement*/{\n var _this$props$nodeRef$c, _this$props;\n return (_this$props$nodeRef$c = (_this$props = this.props) === null || _this$props === void 0 || (_this$props = _this$props.nodeRef) === null || _this$props === void 0 ? void 0 : _this$props.current) !== null && _this$props$nodeRef$c !== void 0 ? _this$props$nodeRef$c : _reactDom.default.findDOMNode(this);\n }\n render() /*: ReactElement*/{\n const {\n axis,\n bounds,\n children,\n defaultPosition,\n defaultClassName,\n defaultClassNameDragging,\n defaultClassNameDragged,\n position,\n positionOffset,\n scale,\n ...draggableCoreProps\n } = this.props;\n let style = {};\n let svgTransform = null;\n\n // If this is controlled, we don't want to move it - unless it's dragging.\n const controlled = Boolean(position);\n const draggable = !controlled || this.state.dragging;\n const validPosition = position || defaultPosition;\n const transformOpts = {\n // Set left if horizontal drag is enabled\n x: (0, _positionFns.canDragX)(this) && draggable ? this.state.x : validPosition.x,\n // Set top if vertical drag is enabled\n y: (0, _positionFns.canDragY)(this) && draggable ? this.state.y : validPosition.y\n };\n\n // If this element was SVG, we use the `transform` attribute.\n if (this.state.isElementSVG) {\n svgTransform = (0, _domFns.createSVGTransform)(transformOpts, positionOffset);\n } else {\n // Add a CSS transform to move the element around. This allows us to move the element around\n // without worrying about whether or not it is relatively or absolutely positioned.\n // If the item you are dragging already has a transform set, wrap it in a so \n // has a clean slate.\n style = (0, _domFns.createCSSTransform)(transformOpts, positionOffset);\n }\n\n // Mark with class while dragging\n const className = (0, _clsx.default)(children.props.className || '', defaultClassName, {\n [defaultClassNameDragging]: this.state.dragging,\n [defaultClassNameDragged]: this.state.dragged\n });\n\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return /*#__PURE__*/React.createElement(_DraggableCore.default, _extends({}, draggableCoreProps, {\n onStart: this.onDragStart,\n onDrag: this.onDrag,\n onStop: this.onDragStop\n }), /*#__PURE__*/React.cloneElement(React.Children.only(children), {\n className: className,\n style: {\n ...children.props.style,\n ...style\n },\n transform: svgTransform\n }));\n }\n}\nexports.default = Draggable;\n_defineProperty(Draggable, \"displayName\", 'Draggable');\n_defineProperty(Draggable, \"propTypes\", {\n // Accepts all props accepts.\n ..._DraggableCore.default.propTypes,\n /**\n * `axis` determines which axis the draggable can move.\n *\n * Note that all callbacks will still return data as normal. This only\n * controls flushing to the DOM.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n * 'none' limits all movement.\n *\n * Defaults to 'both'.\n */\n axis: _propTypes.default.oneOf(['both', 'x', 'y', 'none']),\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
Content
\n *
\n * );\n * }\n * });\n * ```\n */\n bounds: _propTypes.default.oneOfType([_propTypes.default.shape({\n left: _propTypes.default.number,\n right: _propTypes.default.number,\n top: _propTypes.default.number,\n bottom: _propTypes.default.number\n }), _propTypes.default.string, _propTypes.default.oneOf([false])]),\n defaultClassName: _propTypes.default.string,\n defaultClassNameDragging: _propTypes.default.string,\n defaultClassNameDragged: _propTypes.default.string,\n /**\n * `defaultPosition` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n defaultPosition: _propTypes.default.shape({\n x: _propTypes.default.number,\n y: _propTypes.default.number\n }),\n positionOffset: _propTypes.default.shape({\n x: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n y: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])\n }),\n /**\n * `position`, if present, defines the current position of the element.\n *\n * This is similar to how form elements in React work - if no `position` is supplied, the component\n * is uncontrolled.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n position: _propTypes.default.shape({\n x: _propTypes.default.number,\n y: _propTypes.default.number\n }),\n /**\n * These properties should be defined on the child, not here.\n */\n className: _shims.dontSetMe,\n style: _shims.dontSetMe,\n transform: _shims.dontSetMe\n});\n_defineProperty(Draggable, \"defaultProps\", {\n ..._DraggableCore.default.defaultProps,\n axis: 'both',\n bounds: false,\n defaultClassName: 'react-draggable',\n defaultClassNameDragging: 'react-draggable-dragging',\n defaultClassNameDragged: 'react-draggable-dragged',\n defaultPosition: {\n x: 0,\n y: 0\n },\n scale: 1\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\nvar _domFns = require(\"./utils/domFns\");\nvar _positionFns = require(\"./utils/positionFns\");\nvar _shims = require(\"./utils/shims\");\nvar _log = _interopRequireDefault(require(\"./utils/log\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n/*:: import type {EventHandler, MouseTouchEvent} from './utils/types';*/\n/*:: import type {Element as ReactElement} from 'react';*/\n// Simple abstraction for dragging events names.\nconst eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// Default to mouse events.\nlet dragEventFor = eventsFor.mouse;\n/*:: export type DraggableData = {\n node: HTMLElement,\n x: number, y: number,\n deltaX: number, deltaY: number,\n lastX: number, lastY: number,\n};*/\n/*:: export type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void | false;*/\n/*:: export type ControlPosition = {x: number, y: number};*/\n/*:: export type PositionOffsetControlPosition = {x: number|string, y: number|string};*/\n/*:: export type DraggableCoreDefaultProps = {\n allowAnyClick: boolean,\n disabled: boolean,\n enableUserSelectHack: boolean,\n onStart: DraggableEventHandler,\n onDrag: DraggableEventHandler,\n onStop: DraggableEventHandler,\n onMouseDown: (e: MouseEvent) => void,\n scale: number,\n};*/\n/*:: export type DraggableCoreProps = {\n ...DraggableCoreDefaultProps,\n cancel: string,\n children: ReactElement,\n offsetParent: HTMLElement,\n grid: [number, number],\n handle: string,\n nodeRef?: ?React.ElementRef,\n};*/\n//\n// Define .\n//\n// is for advanced usage of . It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\n\nclass DraggableCore extends React.Component /*:: */{\n constructor() {\n super(...arguments);\n _defineProperty(this, \"dragging\", false);\n // Used while dragging to determine deltas.\n _defineProperty(this, \"lastX\", NaN);\n _defineProperty(this, \"lastY\", NaN);\n _defineProperty(this, \"touchIdentifier\", null);\n _defineProperty(this, \"mounted\", false);\n _defineProperty(this, \"handleDragStart\", e => {\n // Make it possible to attach event handlers on top of this one.\n this.props.onMouseDown(e);\n\n // Only accept left-clicks.\n if (!this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;\n\n // Get nodes. Be sure to grab relative document (could be iframed)\n const thisNode = this.findDOMNode();\n if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {\n throw new Error(' not mounted on DragStart!');\n }\n const {\n ownerDocument\n } = thisNode;\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match.\n if (this.props.disabled || !(e.target instanceof ownerDocument.defaultView.Node) || this.props.handle && !(0, _domFns.matchesSelectorAndParentsTo)(e.target, this.props.handle, thisNode) || this.props.cancel && (0, _domFns.matchesSelectorAndParentsTo)(e.target, this.props.cancel, thisNode)) {\n return;\n }\n\n // Prevent scrolling on mobile devices, like ipad/iphone.\n // Important that this is after handle/cancel.\n if (e.type === 'touchstart') e.preventDefault();\n\n // Set touch identifier in component state if this is a touch event. This allows us to\n // distinguish between individual touches on multitouch screens by identifying which\n // touchpoint was set to this element.\n const touchIdentifier = (0, _domFns.getTouchIdentifier)(e);\n this.touchIdentifier = touchIdentifier;\n\n // Get the current drag point from the event. This is used as the offset.\n const position = (0, _positionFns.getControlPosition)(e, touchIdentifier, this);\n if (position == null) return; // not possible but satisfies flow\n const {\n x,\n y\n } = position;\n\n // Create an event object with all the data parents need to make a decision here.\n const coreEvent = (0, _positionFns.createCoreData)(this, x, y);\n (0, _log.default)('DraggableCore: handleDragStart: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, cancel.\n (0, _log.default)('calling', this.props.onStart);\n const shouldUpdate = this.props.onStart(e, coreEvent);\n if (shouldUpdate === false || this.mounted === false) return;\n\n // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n if (this.props.enableUserSelectHack) (0, _domFns.addUserSelectStyles)(ownerDocument);\n\n // Initiate dragging. Set the current x and y as offsets\n // so we know how much we've moved during the drag. This allows us\n // to drag elements around even if they have been moved, without issue.\n this.dragging = true;\n this.lastX = x;\n this.lastY = y;\n\n // Add events to the document directly so we catch when the user's mouse/touch moves outside of\n // this element. We use different events depending on whether or not we have detected that this\n // is a touch-capable device.\n (0, _domFns.addEvent)(ownerDocument, dragEventFor.move, this.handleDrag);\n (0, _domFns.addEvent)(ownerDocument, dragEventFor.stop, this.handleDragStop);\n });\n _defineProperty(this, \"handleDrag\", e => {\n // Get the current drag point from the event. This is used as the offset.\n const position = (0, _positionFns.getControlPosition)(e, this.touchIdentifier, this);\n if (position == null) return;\n let {\n x,\n y\n } = position;\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n let deltaX = x - this.lastX,\n deltaY = y - this.lastY;\n [deltaX, deltaY] = (0, _positionFns.snapToGrid)(this.props.grid, deltaX, deltaY);\n if (!deltaX && !deltaY) return; // skip useless drag\n x = this.lastX + deltaX, y = this.lastY + deltaY;\n }\n const coreEvent = (0, _positionFns.createCoreData)(this, x, y);\n (0, _log.default)('DraggableCore: handleDrag: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, trigger end.\n const shouldUpdate = this.props.onDrag(e, coreEvent);\n if (shouldUpdate === false || this.mounted === false) {\n try {\n // $FlowIgnore\n this.handleDragStop(new MouseEvent('mouseup'));\n } catch (err) {\n // Old browsers\n const event = ((document.createEvent('MouseEvents') /*: any*/) /*: MouseTouchEvent*/);\n // I see why this insanity was deprecated\n // $FlowIgnore\n event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n this.handleDragStop(event);\n }\n return;\n }\n this.lastX = x;\n this.lastY = y;\n });\n _defineProperty(this, \"handleDragStop\", e => {\n if (!this.dragging) return;\n const position = (0, _positionFns.getControlPosition)(e, this.touchIdentifier, this);\n if (position == null) return;\n let {\n x,\n y\n } = position;\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n let deltaX = x - this.lastX || 0;\n let deltaY = y - this.lastY || 0;\n [deltaX, deltaY] = (0, _positionFns.snapToGrid)(this.props.grid, deltaX, deltaY);\n x = this.lastX + deltaX, y = this.lastY + deltaY;\n }\n const coreEvent = (0, _positionFns.createCoreData)(this, x, y);\n\n // Call event handler\n const shouldContinue = this.props.onStop(e, coreEvent);\n if (shouldContinue === false || this.mounted === false) return false;\n const thisNode = this.findDOMNode();\n if (thisNode) {\n // Remove user-select hack\n if (this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(thisNode.ownerDocument);\n }\n (0, _log.default)('DraggableCore: handleDragStop: %j', coreEvent);\n\n // Reset the el.\n this.dragging = false;\n this.lastX = NaN;\n this.lastY = NaN;\n if (thisNode) {\n // Remove event handlers\n (0, _log.default)('DraggableCore: Removing handlers');\n (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.move, this.handleDrag);\n (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.stop, this.handleDragStop);\n }\n });\n _defineProperty(this, \"onMouseDown\", e => {\n dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse\n\n return this.handleDragStart(e);\n });\n _defineProperty(this, \"onMouseUp\", e => {\n dragEventFor = eventsFor.mouse;\n return this.handleDragStop(e);\n });\n // Same as onMouseDown (start drag), but now consider this a touch device.\n _defineProperty(this, \"onTouchStart\", e => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n return this.handleDragStart(e);\n });\n _defineProperty(this, \"onTouchEnd\", e => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n return this.handleDragStop(e);\n });\n }\n componentDidMount() {\n this.mounted = true;\n // Touch handlers must be added with {passive: false} to be cancelable.\n // https://developers.google.com/web/updates/2017/01/scrolling-intervention\n const thisNode = this.findDOMNode();\n if (thisNode) {\n (0, _domFns.addEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {\n passive: false\n });\n }\n }\n componentWillUnmount() {\n this.mounted = false;\n // Remove any leftover event handlers. Remove both touch and mouse handlers in case\n // some browser quirk caused a touch event to fire during a mouse move, or vice versa.\n const thisNode = this.findDOMNode();\n if (thisNode) {\n const {\n ownerDocument\n } = thisNode;\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.move, this.handleDrag);\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.move, this.handleDrag);\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.stop, this.handleDragStop);\n (0, _domFns.removeEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {\n passive: false\n });\n if (this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(ownerDocument);\n }\n }\n\n // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find\n // the underlying DOM node ourselves. See the README for more information.\n findDOMNode() /*: ?HTMLElement*/{\n var _this$props, _this$props2;\n return (_this$props = this.props) !== null && _this$props !== void 0 && _this$props.nodeRef ? (_this$props2 = this.props) === null || _this$props2 === void 0 || (_this$props2 = _this$props2.nodeRef) === null || _this$props2 === void 0 ? void 0 : _this$props2.current : _reactDom.default.findDOMNode(this);\n }\n render() /*: React.Element*/{\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return /*#__PURE__*/React.cloneElement(React.Children.only(this.props.children), {\n // Note: mouseMove handler is attached to document so it will still function\n // when the user drags quickly and leaves the bounds of the element.\n onMouseDown: this.onMouseDown,\n onMouseUp: this.onMouseUp,\n // onTouchStart is added on `componentDidMount` so they can be added with\n // {passive: false}, which allows it to cancel. See\n // https://developers.google.com/web/updates/2017/01/scrolling-intervention\n onTouchEnd: this.onTouchEnd\n });\n }\n}\nexports.default = DraggableCore;\n_defineProperty(DraggableCore, \"displayName\", 'DraggableCore');\n_defineProperty(DraggableCore, \"propTypes\", {\n /**\n * `allowAnyClick` allows dragging using any mouse button.\n * By default, we only accept the left button.\n *\n * Defaults to `false`.\n */\n allowAnyClick: _propTypes.default.bool,\n children: _propTypes.default.node.isRequired,\n /**\n * `disabled`, if true, stops the from dragging. All handlers,\n * with the exception of `onMouseDown`, will not fire.\n */\n disabled: _propTypes.default.bool,\n /**\n * By default, we add 'user-select:none' attributes to the document body\n * to prevent ugly text selection during drag. If this is causing problems\n * for your app, set this to `false`.\n */\n enableUserSelectHack: _propTypes.default.bool,\n /**\n * `offsetParent`, if set, uses the passed DOM node to compute drag offsets\n * instead of using the parent node.\n */\n offsetParent: function (props /*: DraggableCoreProps*/, propName /*: $Keys*/) {\n if (props[propName] && props[propName].nodeType !== 1) {\n throw new Error('Draggable\\'s offsetParent must be a DOM Node.');\n }\n },\n /**\n * `grid` specifies the x and y that dragging should snap to.\n */\n grid: _propTypes.default.arrayOf(_propTypes.default.number),\n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
\n *
Click me to drag
\n *
This is some other content
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n handle: _propTypes.default.string,\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return(\n * \n *
\n *
You can't drag from here
\n *
Dragging here works fine
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n cancel: _propTypes.default.string,\n /* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.\n * Unfortunately, in order for to work properly, we need raw access\n * to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`\n * as in this example:\n *\n * function MyComponent() {\n * const nodeRef = React.useRef(null);\n * return (\n * \n *
Example Target
\n *
\n * );\n * }\n *\n * This can be used for arbitrarily nested components, so long as the ref ends up\n * pointing to the actual child DOM node and not a custom component.\n */\n nodeRef: _propTypes.default.object,\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onStart: _propTypes.default.func,\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onDrag: _propTypes.default.func,\n /**\n * Called when dragging stops.\n * If this function returns the boolean false, the drag will remain active.\n */\n onStop: _propTypes.default.func,\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (as there is internal use of onMouseDown)\n */\n onMouseDown: _propTypes.default.func,\n /**\n * `scale`, if set, applies scaling while dragging an element\n */\n scale: _propTypes.default.number,\n /**\n * These properties should be defined on the child, not here.\n */\n className: _shims.dontSetMe,\n style: _shims.dontSetMe,\n transform: _shims.dontSetMe\n});\n_defineProperty(DraggableCore, \"defaultProps\", {\n allowAnyClick: false,\n // by default only accept left click\n disabled: false,\n enableUserSelectHack: true,\n onStart: function () {},\n onDrag: function () {},\n onStop: function () {},\n onMouseDown: function () {},\n scale: 1\n});","\"use strict\";\n\nconst {\n default: Draggable,\n DraggableCore\n} = require('./Draggable');\n\n// Previous versions of this lib exported as the root export. As to no-// them, or TypeScript, we export *both* as the root and as 'default'.\n// See https://github.com/mzabriskie/react-draggable/pull/254\n// and https://github.com/mzabriskie/react-draggable/issues/266\nmodule.exports = Draggable;\nmodule.exports.default = Draggable;\nmodule.exports.DraggableCore = DraggableCore;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.addClassName = addClassName;\nexports.addEvent = addEvent;\nexports.addUserSelectStyles = addUserSelectStyles;\nexports.createCSSTransform = createCSSTransform;\nexports.createSVGTransform = createSVGTransform;\nexports.getTouch = getTouch;\nexports.getTouchIdentifier = getTouchIdentifier;\nexports.getTranslation = getTranslation;\nexports.innerHeight = innerHeight;\nexports.innerWidth = innerWidth;\nexports.matchesSelector = matchesSelector;\nexports.matchesSelectorAndParentsTo = matchesSelectorAndParentsTo;\nexports.offsetXYFromParent = offsetXYFromParent;\nexports.outerHeight = outerHeight;\nexports.outerWidth = outerWidth;\nexports.removeClassName = removeClassName;\nexports.removeEvent = removeEvent;\nexports.removeUserSelectStyles = removeUserSelectStyles;\nvar _shims = require(\"./shims\");\nvar _getPrefix = _interopRequireWildcard(require(\"./getPrefix\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n/*:: import type {ControlPosition, PositionOffsetControlPosition, MouseTouchEvent} from './types';*/\nlet matchesSelectorFunc = '';\nfunction matchesSelector(el /*: Node*/, selector /*: string*/) /*: boolean*/{\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = (0, _shims.findInArray)(['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'], function (method) {\n // $FlowIgnore: Doesn't think elements are indexable\n return (0, _shims.isFunction)(el[method]);\n });\n }\n\n // Might not be found entirely (not an Element?) - in that case, bail\n // $FlowIgnore: Doesn't think elements are indexable\n if (!(0, _shims.isFunction)(el[matchesSelectorFunc])) return false;\n\n // $FlowIgnore: Doesn't think elements are indexable\n return el[matchesSelectorFunc](selector);\n}\n\n// Works up the tree to the draggable itself attempting to match selector.\nfunction matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/{\n let node = el;\n do {\n if (matchesSelector(node, selector)) return true;\n if (node === baseNode) return false;\n // $FlowIgnore[incompatible-type]\n node = node.parentNode;\n } while (node);\n return false;\n}\nfunction addEvent(el /*: ?Node*/, event /*: string*/, handler /*: Function*/, inputOptions /*: Object*/) /*: void*/{\n if (!el) return;\n const options = {\n capture: true,\n ...inputOptions\n };\n // $FlowIgnore[method-unbinding]\n if (el.addEventListener) {\n el.addEventListener(event, handler, options);\n } else if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = handler;\n }\n}\nfunction removeEvent(el /*: ?Node*/, event /*: string*/, handler /*: Function*/, inputOptions /*: Object*/) /*: void*/{\n if (!el) return;\n const options = {\n capture: true,\n ...inputOptions\n };\n // $FlowIgnore[method-unbinding]\n if (el.removeEventListener) {\n el.removeEventListener(event, handler, options);\n } else if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = null;\n }\n}\nfunction outerHeight(node /*: HTMLElement*/) /*: number*/{\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n let height = node.clientHeight;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height += (0, _shims.int)(computedStyle.borderTopWidth);\n height += (0, _shims.int)(computedStyle.borderBottomWidth);\n return height;\n}\nfunction outerWidth(node /*: HTMLElement*/) /*: number*/{\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n let width = node.clientWidth;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width += (0, _shims.int)(computedStyle.borderLeftWidth);\n width += (0, _shims.int)(computedStyle.borderRightWidth);\n return width;\n}\nfunction innerHeight(node /*: HTMLElement*/) /*: number*/{\n let height = node.clientHeight;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height -= (0, _shims.int)(computedStyle.paddingTop);\n height -= (0, _shims.int)(computedStyle.paddingBottom);\n return height;\n}\nfunction innerWidth(node /*: HTMLElement*/) /*: number*/{\n let width = node.clientWidth;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width -= (0, _shims.int)(computedStyle.paddingLeft);\n width -= (0, _shims.int)(computedStyle.paddingRight);\n return width;\n}\n/*:: interface EventWithOffset {\n clientX: number, clientY: number\n}*/\n// Get from offsetParent\nfunction offsetXYFromParent(evt /*: EventWithOffset*/, offsetParent /*: HTMLElement*/, scale /*: number*/) /*: ControlPosition*/{\n const isBody = offsetParent === offsetParent.ownerDocument.body;\n const offsetParentRect = isBody ? {\n left: 0,\n top: 0\n } : offsetParent.getBoundingClientRect();\n const x = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale;\n const y = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale;\n return {\n x,\n y\n };\n}\nfunction createCSSTransform(controlPos /*: ControlPosition*/, positionOffset /*: PositionOffsetControlPosition*/) /*: Object*/{\n const translation = getTranslation(controlPos, positionOffset, 'px');\n return {\n [(0, _getPrefix.browserPrefixToKey)('transform', _getPrefix.default)]: translation\n };\n}\nfunction createSVGTransform(controlPos /*: ControlPosition*/, positionOffset /*: PositionOffsetControlPosition*/) /*: string*/{\n const translation = getTranslation(controlPos, positionOffset, '');\n return translation;\n}\nfunction getTranslation(_ref /*:: */, positionOffset /*: PositionOffsetControlPosition*/, unitSuffix /*: string*/) /*: string*/{\n let {\n x,\n y\n } /*: ControlPosition*/ = _ref /*: ControlPosition*/;\n let translation = \"translate(\".concat(x).concat(unitSuffix, \",\").concat(y).concat(unitSuffix, \")\");\n if (positionOffset) {\n const defaultX = \"\".concat(typeof positionOffset.x === 'string' ? positionOffset.x : positionOffset.x + unitSuffix);\n const defaultY = \"\".concat(typeof positionOffset.y === 'string' ? positionOffset.y : positionOffset.y + unitSuffix);\n translation = \"translate(\".concat(defaultX, \", \").concat(defaultY, \")\") + translation;\n }\n return translation;\n}\nfunction getTouch(e /*: MouseTouchEvent*/, identifier /*: number*/) /*: ?{clientX: number, clientY: number}*/{\n return e.targetTouches && (0, _shims.findInArray)(e.targetTouches, t => identifier === t.identifier) || e.changedTouches && (0, _shims.findInArray)(e.changedTouches, t => identifier === t.identifier);\n}\nfunction getTouchIdentifier(e /*: MouseTouchEvent*/) /*: ?number*/{\n if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;\n if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;\n}\n\n// User-select Hacks:\n//\n// Useful for preventing blue highlights all over everything when dragging.\n\n// Note we're passing `document` b/c we could be iframed\nfunction addUserSelectStyles(doc /*: ?Document*/) {\n if (!doc) return;\n let styleEl = doc.getElementById('react-draggable-style-el');\n if (!styleEl) {\n styleEl = doc.createElement('style');\n styleEl.type = 'text/css';\n styleEl.id = 'react-draggable-style-el';\n styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {all: inherit;}\\n';\n styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {all: inherit;}\\n';\n doc.getElementsByTagName('head')[0].appendChild(styleEl);\n }\n if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection');\n}\nfunction removeUserSelectStyles(doc /*: ?Document*/) {\n if (!doc) return;\n try {\n if (doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection');\n // $FlowIgnore: IE\n if (doc.selection) {\n // $FlowIgnore: IE\n doc.selection.empty();\n } else {\n // Remove selection caused by scroll, unless it's a focused input\n // (we use doc.defaultView in case we're in an iframe)\n const selection = (doc.defaultView || window).getSelection();\n if (selection && selection.type !== 'Caret') {\n selection.removeAllRanges();\n }\n }\n } catch (e) {\n // probably IE\n }\n}\nfunction addClassName(el /*: HTMLElement*/, className /*: string*/) {\n if (el.classList) {\n el.classList.add(className);\n } else {\n if (!el.className.match(new RegExp(\"(?:^|\\\\s)\".concat(className, \"(?!\\\\S)\")))) {\n el.className += \" \".concat(className);\n }\n }\n}\nfunction removeClassName(el /*: HTMLElement*/, className /*: string*/) {\n if (el.classList) {\n el.classList.remove(className);\n } else {\n el.className = el.className.replace(new RegExp(\"(?:^|\\\\s)\".concat(className, \"(?!\\\\S)\"), 'g'), '');\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.browserPrefixToKey = browserPrefixToKey;\nexports.browserPrefixToStyle = browserPrefixToStyle;\nexports.default = void 0;\nexports.getPrefix = getPrefix;\nconst prefixes = ['Moz', 'Webkit', 'O', 'ms'];\nfunction getPrefix() /*: string*/{\n var _window$document;\n let prop /*: string*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transform';\n // Ensure we're running in an environment where there is actually a global\n // `window` obj\n if (typeof window === 'undefined') return '';\n\n // If we're in a pseudo-browser server-side environment, this access\n // path may not exist, so bail out if it doesn't.\n const style = (_window$document = window.document) === null || _window$document === void 0 || (_window$document = _window$document.documentElement) === null || _window$document === void 0 ? void 0 : _window$document.style;\n if (!style) return '';\n if (prop in style) return '';\n for (let i = 0; i < prefixes.length; i++) {\n if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];\n }\n return '';\n}\nfunction browserPrefixToKey(prop /*: string*/, prefix /*: string*/) /*: string*/{\n return prefix ? \"\".concat(prefix).concat(kebabToTitleCase(prop)) : prop;\n}\nfunction browserPrefixToStyle(prop /*: string*/, prefix /*: string*/) /*: string*/{\n return prefix ? \"-\".concat(prefix.toLowerCase(), \"-\").concat(prop) : prop;\n}\nfunction kebabToTitleCase(str /*: string*/) /*: string*/{\n let out = '';\n let shouldCapitalize = true;\n for (let i = 0; i < str.length; i++) {\n if (shouldCapitalize) {\n out += str[i].toUpperCase();\n shouldCapitalize = false;\n } else if (str[i] === '-') {\n shouldCapitalize = true;\n } else {\n out += str[i];\n }\n }\n return out;\n}\n\n// Default export is the prefix itself, like 'Moz', 'Webkit', etc\n// Note that you may have to re-test for certain things; for instance, Chrome 50\n// can handle unprefixed `transform`, but not unprefixed `user-select`\nvar _default = exports.default = (getPrefix() /*: string*/);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = log;\n/*eslint no-console:0*/\nfunction log() {\n if (undefined) console.log(...arguments);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.canDragX = canDragX;\nexports.canDragY = canDragY;\nexports.createCoreData = createCoreData;\nexports.createDraggableData = createDraggableData;\nexports.getBoundPosition = getBoundPosition;\nexports.getControlPosition = getControlPosition;\nexports.snapToGrid = snapToGrid;\nvar _shims = require(\"./shims\");\nvar _domFns = require(\"./domFns\");\n/*:: import type Draggable from '../Draggable';*/\n/*:: import type {Bounds, ControlPosition, DraggableData, MouseTouchEvent} from './types';*/\n/*:: import type DraggableCore from '../DraggableCore';*/\nfunction getBoundPosition(draggable /*: Draggable*/, x /*: number*/, y /*: number*/) /*: [number, number]*/{\n // If no bounds, short-circuit and move on\n if (!draggable.props.bounds) return [x, y];\n\n // Clone new bounds\n let {\n bounds\n } = draggable.props;\n bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);\n const node = findDOMNode(draggable);\n if (typeof bounds === 'string') {\n const {\n ownerDocument\n } = node;\n const ownerWindow = ownerDocument.defaultView;\n let boundNode;\n if (bounds === 'parent') {\n boundNode = node.parentNode;\n } else {\n boundNode = ownerDocument.querySelector(bounds);\n }\n if (!(boundNode instanceof ownerWindow.HTMLElement)) {\n throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n }\n const boundNodeEl /*: HTMLElement*/ = boundNode; // for Flow, can't seem to refine correctly\n const nodeStyle = ownerWindow.getComputedStyle(node);\n const boundNodeStyle = ownerWindow.getComputedStyle(boundNodeEl);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingLeft) + (0, _shims.int)(nodeStyle.marginLeft),\n top: -node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingTop) + (0, _shims.int)(nodeStyle.marginTop),\n right: (0, _domFns.innerWidth)(boundNodeEl) - (0, _domFns.outerWidth)(node) - node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingRight) - (0, _shims.int)(nodeStyle.marginRight),\n bottom: (0, _domFns.innerHeight)(boundNodeEl) - (0, _domFns.outerHeight)(node) - node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingBottom) - (0, _shims.int)(nodeStyle.marginBottom)\n };\n }\n\n // Keep x and y below right and bottom limits...\n if ((0, _shims.isNum)(bounds.right)) x = Math.min(x, bounds.right);\n if ((0, _shims.isNum)(bounds.bottom)) y = Math.min(y, bounds.bottom);\n\n // But above left and top limits.\n if ((0, _shims.isNum)(bounds.left)) x = Math.max(x, bounds.left);\n if ((0, _shims.isNum)(bounds.top)) y = Math.max(y, bounds.top);\n return [x, y];\n}\nfunction snapToGrid(grid /*: [number, number]*/, pendingX /*: number*/, pendingY /*: number*/) /*: [number, number]*/{\n const x = Math.round(pendingX / grid[0]) * grid[0];\n const y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\nfunction canDragX(draggable /*: Draggable*/) /*: boolean*/{\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\nfunction canDragY(draggable /*: Draggable*/) /*: boolean*/{\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\n// Get {x, y} positions from event.\nfunction getControlPosition(e /*: MouseTouchEvent*/, touchIdentifier /*: ?number*/, draggableCore /*: DraggableCore*/) /*: ?ControlPosition*/{\n const touchObj = typeof touchIdentifier === 'number' ? (0, _domFns.getTouch)(e, touchIdentifier) : null;\n if (typeof touchIdentifier === 'number' && !touchObj) return null; // not the right touch\n const node = findDOMNode(draggableCore);\n // User can provide an offsetParent if desired.\n const offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;\n return (0, _domFns.offsetXYFromParent)(touchObj || e, offsetParent, draggableCore.props.scale);\n}\n\n// Create an data object exposed by 's events\nfunction createCoreData(draggable /*: DraggableCore*/, x /*: number*/, y /*: number*/) /*: DraggableData*/{\n const isStart = !(0, _shims.isNum)(draggable.lastX);\n const node = findDOMNode(draggable);\n if (isStart) {\n // If this is our first move, use the x and y as last coords.\n return {\n node,\n deltaX: 0,\n deltaY: 0,\n lastX: x,\n lastY: y,\n x,\n y\n };\n } else {\n // Otherwise calculate proper values.\n return {\n node,\n deltaX: x - draggable.lastX,\n deltaY: y - draggable.lastY,\n lastX: draggable.lastX,\n lastY: draggable.lastY,\n x,\n y\n };\n }\n}\n\n// Create an data exposed by 's events\nfunction createDraggableData(draggable /*: Draggable*/, coreData /*: DraggableData*/) /*: DraggableData*/{\n const scale = draggable.props.scale;\n return {\n node: coreData.node,\n x: draggable.state.x + coreData.deltaX / scale,\n y: draggable.state.y + coreData.deltaY / scale,\n deltaX: coreData.deltaX / scale,\n deltaY: coreData.deltaY / scale,\n lastX: draggable.state.x,\n lastY: draggable.state.y\n };\n}\n\n// A lot faster than stringify/parse\nfunction cloneBounds(bounds /*: Bounds*/) /*: Bounds*/{\n return {\n left: bounds.left,\n top: bounds.top,\n right: bounds.right,\n bottom: bounds.bottom\n };\n}\nfunction findDOMNode(draggable /*: Draggable | DraggableCore*/) /*: HTMLElement*/{\n const node = draggable.findDOMNode();\n if (!node) {\n throw new Error(': Unmounted during event!');\n }\n // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME\n return node;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.dontSetMe = dontSetMe;\nexports.findInArray = findInArray;\nexports.int = int;\nexports.isFunction = isFunction;\nexports.isNum = isNum;\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nfunction findInArray(array /*: Array | TouchList*/, callback /*: Function*/) /*: any*/{\n for (let i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\nfunction isFunction(func /*: any*/) /*: boolean %checks*/{\n // $FlowIgnore[method-unbinding]\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\nfunction isNum(num /*: any*/) /*: boolean %checks*/{\n return typeof num === 'number' && !isNaN(num);\n}\nfunction int(a /*: string*/) /*: number*/{\n return parseInt(a, 10);\n}\nfunction dontSetMe(props /*: Object*/, propName /*: string*/, componentName /*: string*/) /*: ?Error*/{\n if (props[propName]) {\n return new Error(\"Invalid prop \".concat(propName, \" passed to \").concat(componentName, \" - do not set this, set it on the child.\"));\n }\n}","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n return {\n cols: props.cols,\n containerPadding: props.containerPadding,\n containerWidth: props.containerWidth,\n margin: props.margin,\n maxRows: props.maxRows,\n rowHeight: props.rowHeight\n };\n }\n /**\n * This is where we set the grid item's absolute placement. It gets a little tricky because we want to do it\n * well when server rendering, and the only way to do that properly is to use percentage width/left because\n * we don't know exactly what the browser viewport is.\n * Unfortunately, CSS Transforms, which are great for performance, break in this instance because a percentage\n * left is relative to the item itself, not its container! So we cannot use them on the server rendering pass.\n *\n * @param {Object} pos Position object with width, height, left, top.\n * @return {Object} Style object.\n */\n\n }, {\n key: \"createStyle\",\n value: function createStyle(pos\n /*: Position*/\n )\n /*: { [key: string]: ?string }*/\n {\n var _this$props5 = this.props,\n usePercentages = _this$props5.usePercentages,\n containerWidth = _this$props5.containerWidth,\n useCSSTransforms = _this$props5.useCSSTransforms;\n var style; // CSS Transforms support (default)\n\n if (useCSSTransforms) {\n style = (0, _utils.setTransform)(pos);\n } else {\n // top,left (slow)\n style = (0, _utils.setTopLeft)(pos); // This is used for server rendering.\n\n if (usePercentages) {\n style.left = (0, _utils.perc)(pos.left / containerWidth);\n style.width = (0, _utils.perc)(pos.width / containerWidth);\n }\n }\n\n return style;\n }\n /**\n * Mix a Draggable instance into a child.\n * @param {Element} child Child element.\n * @return {Element} Child wrapped in Draggable.\n */\n\n }, {\n key: \"mixinDraggable\",\n value: function mixinDraggable(child\n /*: ReactElement*/\n , isDraggable\n /*: boolean*/\n )\n /*: ReactElement*/\n {\n return /*#__PURE__*/_react.default.createElement(_reactDraggable.DraggableCore, {\n disabled: !isDraggable,\n onStart: this.onDragStart,\n onDrag: this.onDrag,\n onStop: this.onDragStop,\n handle: this.props.handle,\n cancel: \".react-resizable-handle\" + (this.props.cancel ? \",\" + this.props.cancel : \"\"),\n scale: this.props.transformScale,\n nodeRef: this.elementRef\n }, child);\n }\n /**\n * Mix a Resizable instance into a child.\n * @param {Element} child Child element.\n * @param {Object} position Position object (pixel values)\n * @return {Element} Child wrapped in Resizable.\n */\n\n }, {\n key: \"mixinResizable\",\n value: function mixinResizable(child\n /*: ReactElement*/\n , position\n /*: Position*/\n , isResizable\n /*: boolean*/\n )\n /*: ReactElement*/\n {\n var _this$props6 = this.props,\n cols = _this$props6.cols,\n x = _this$props6.x,\n minW = _this$props6.minW,\n minH = _this$props6.minH,\n maxW = _this$props6.maxW,\n maxH = _this$props6.maxH,\n transformScale = _this$props6.transformScale,\n resizeHandles = _this$props6.resizeHandles,\n resizeHandle = _this$props6.resizeHandle;\n var positionParams = this.getPositionParams(); // This is the max possible width - doesn't go to infinity because of the width of the window\n\n var maxWidth = (0, _calculateUtils.calcGridItemPosition)(positionParams, 0, 0, cols - x, 0).width; // Calculate min/max constraints using our min & maxes\n\n var mins = (0, _calculateUtils.calcGridItemPosition)(positionParams, 0, 0, minW, minH);\n var maxes = (0, _calculateUtils.calcGridItemPosition)(positionParams, 0, 0, maxW, maxH);\n var minConstraints = [mins.width, mins.height];\n var maxConstraints = [Math.min(maxes.width, maxWidth), Math.min(maxes.height, Infinity)];\n return /*#__PURE__*/_react.default.createElement(_reactResizable.Resizable // These are opts for the resize handle itself\n , {\n draggableOpts: {\n disabled: !isResizable\n },\n className: isResizable ? undefined : \"react-resizable-hide\",\n width: position.width,\n height: position.height,\n minConstraints: minConstraints,\n maxConstraints: maxConstraints,\n onResizeStop: this.onResizeStop,\n onResizeStart: this.onResizeStart,\n onResize: this.onResize,\n transformScale: transformScale,\n resizeHandles: resizeHandles,\n handle: resizeHandle\n }, child);\n }\n /**\n * onDragStart event handler\n * @param {Event} e event data\n * @param {Object} callbackData an object with node, delta and position information\n */\n\n }, {\n key: \"onResizeHandler\",\n value:\n /**\n * Wrapper around drag events to provide more useful data.\n * All drag events call the function with the given handler name,\n * with the signature (index, x, y).\n *\n * @param {String} handlerName Handler name to wrap.\n * @return {Function} Handler function.\n */\n function onResizeHandler(e\n /*: Event*/\n , _ref4, handlerName\n /*: string*/\n )\n /*: void*/\n {\n var node = _ref4.node,\n size = _ref4.size;\n var handler = this.props[handlerName];\n if (!handler) return;\n var _this$props7 = this.props,\n cols = _this$props7.cols,\n x = _this$props7.x,\n y = _this$props7.y,\n i = _this$props7.i,\n maxH = _this$props7.maxH,\n minH = _this$props7.minH;\n var _this$props8 = this.props,\n minW = _this$props8.minW,\n maxW = _this$props8.maxW; // Get new XY\n\n var _calcWH = (0, _calculateUtils.calcWH)(this.getPositionParams(), size.width, size.height, x, y),\n w = _calcWH.w,\n h = _calcWH.h; // minW should be at least 1 (TODO propTypes validation?)\n\n\n minW = Math.max(minW, 1); // maxW should be at most (cols - x)\n\n maxW = Math.min(maxW, cols - x); // Min/max capping\n\n w = (0, _calculateUtils.clamp)(w, minW, maxW);\n h = (0, _calculateUtils.clamp)(h, minH, maxH);\n this.setState({\n resizing: handlerName === \"onResizeStop\" ? null : size\n });\n handler.call(this, i, w, h, {\n e: e,\n node: node,\n size: size\n });\n }\n }, {\n key: \"render\",\n value: function render()\n /*: ReactNode*/\n {\n var _this$props9 = this.props,\n x = _this$props9.x,\n y = _this$props9.y,\n w = _this$props9.w,\n h = _this$props9.h,\n isDraggable = _this$props9.isDraggable,\n isResizable = _this$props9.isResizable,\n droppingPosition = _this$props9.droppingPosition,\n useCSSTransforms = _this$props9.useCSSTransforms;\n var pos = (0, _calculateUtils.calcGridItemPosition)(this.getPositionParams(), x, y, w, h, this.state);\n\n var child = _react.default.Children.only(this.props.children); // Create the child element. We clone the existing element but modify its className and style.\n\n\n var newChild = /*#__PURE__*/_react.default.cloneElement(child, {\n ref: this.elementRef,\n className: (0, _clsx.default)(\"react-grid-item\", child.props.className, this.props.className, {\n static: this.props.static,\n resizing: Boolean(this.state.resizing),\n \"react-draggable\": isDraggable,\n \"react-draggable-dragging\": Boolean(this.state.dragging),\n dropping: Boolean(droppingPosition),\n cssTransforms: useCSSTransforms\n }),\n // We can set the width and height on the child, but unfortunately we can't set the position.\n style: _objectSpread(_objectSpread(_objectSpread({}, this.props.style), child.props.style), this.createStyle(pos))\n }); // Resizable support. This is usually on but the user can toggle it off.\n\n\n newChild = this.mixinResizable(newChild, pos, isResizable); // Draggable support. This is always on, except for with placeholders.\n\n newChild = this.mixinDraggable(newChild, isDraggable);\n return newChild;\n }\n }]);\n\n return GridItem;\n}(_react.default.Component);\n\nexports.default = GridItem;\n\n_defineProperty(GridItem, \"propTypes\", {\n // Children must be only a single element\n children: _propTypes.default.element,\n // General grid attributes\n cols: _propTypes.default.number.isRequired,\n containerWidth: _propTypes.default.number.isRequired,\n rowHeight: _propTypes.default.number.isRequired,\n margin: _propTypes.default.array.isRequired,\n maxRows: _propTypes.default.number.isRequired,\n containerPadding: _propTypes.default.array.isRequired,\n // These are all in grid units\n x: _propTypes.default.number.isRequired,\n y: _propTypes.default.number.isRequired,\n w: _propTypes.default.number.isRequired,\n h: _propTypes.default.number.isRequired,\n // All optional\n minW: function minW(props\n /*: Props*/\n , propName\n /*: string*/\n ) {\n var value = props[propName];\n if (typeof value !== \"number\") return new Error(\"minWidth not Number\");\n if (value > props.w || value > props.maxW) return new Error(\"minWidth larger than item width/maxWidth\");\n },\n maxW: function maxW(props\n /*: Props*/\n , propName\n /*: string*/\n ) {\n var value = props[propName];\n if (typeof value !== \"number\") return new Error(\"maxWidth not Number\");\n if (value < props.w || value < props.minW) return new Error(\"maxWidth smaller than item width/minWidth\");\n },\n minH: function minH(props\n /*: Props*/\n , propName\n /*: string*/\n ) {\n var value = props[propName];\n if (typeof value !== \"number\") return new Error(\"minHeight not Number\");\n if (value > props.h || value > props.maxH) return new Error(\"minHeight larger than item height/maxHeight\");\n },\n maxH: function maxH(props\n /*: Props*/\n , propName\n /*: string*/\n ) {\n var value = props[propName];\n if (typeof value !== \"number\") return new Error(\"maxHeight not Number\");\n if (value < props.h || value < props.minH) return new Error(\"maxHeight smaller than item height/minHeight\");\n },\n // ID is nice to have for callbacks\n i: _propTypes.default.string.isRequired,\n // Resize handle options\n resizeHandles: _ReactGridLayoutPropTypes.resizeHandleAxesType,\n resizeHandle: _ReactGridLayoutPropTypes.resizeHandleType,\n // Functions\n onDragStop: _propTypes.default.func,\n onDragStart: _propTypes.default.func,\n onDrag: _propTypes.default.func,\n onResizeStop: _propTypes.default.func,\n onResizeStart: _propTypes.default.func,\n onResize: _propTypes.default.func,\n // Flags\n isDraggable: _propTypes.default.bool.isRequired,\n isResizable: _propTypes.default.bool.isRequired,\n isBounded: _propTypes.default.bool.isRequired,\n static: _propTypes.default.bool,\n // Use CSS transforms instead of top/left\n useCSSTransforms: _propTypes.default.bool.isRequired,\n transformScale: _propTypes.default.number,\n // Others\n className: _propTypes.default.string,\n // Selector for draggable handle\n handle: _propTypes.default.string,\n // Selector for draggable cancel (see react-draggable)\n cancel: _propTypes.default.string,\n // Current position of a dropping element\n droppingPosition: _propTypes.default.shape({\n e: _propTypes.default.object.isRequired,\n left: _propTypes.default.number.isRequired,\n top: _propTypes.default.number.isRequired\n })\n});\n\n_defineProperty(GridItem, \"defaultProps\", {\n className: \"\",\n cancel: \"\",\n handle: \"\",\n minH: 1,\n minW: 1,\n maxH: Infinity,\n maxW: Infinity,\n transformScale: 1\n});","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _lodash = _interopRequireDefault(require(\"lodash.isequal\"));\n\nvar _clsx = _interopRequireDefault(require(\"clsx\"));\n\nvar _utils = require(\"./utils\");\n\nvar _calculateUtils = require(\"./calculateUtils\");\n\nvar _GridItem = _interopRequireDefault(require(\"./GridItem\"));\n\nvar _ReactGridLayoutPropTypes = _interopRequireDefault(require(\"./ReactGridLayoutPropTypes\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// End Types\nvar layoutClassName = \"react-grid-layout\";\nvar isFirefox = false; // Try...catch will protect from navigator not existing (e.g. node) or a bad implementation of navigator\n\ntry {\n isFirefox = /firefox/i.test(navigator.userAgent);\n} catch (e) {\n /* Ignore */\n}\n/**\n * A reactive, fluid grid layout with draggable, resizable components.\n */\n\n\nvar ReactGridLayout = /*#__PURE__*/function (_React$Component) {\n _inherits(ReactGridLayout, _React$Component);\n\n var _super = _createSuper(ReactGridLayout);\n\n function ReactGridLayout() {\n var _this;\n\n _classCallCheck(this, ReactGridLayout);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n activeDrag: null,\n layout: (0, _utils.synchronizeLayoutWithChildren)(_this.props.layout, _this.props.children, _this.props.cols, // Legacy support for verticalCompact: false\n (0, _utils.compactType)(_this.props), _this.props.allowOverlap),\n mounted: false,\n oldDragItem: null,\n oldLayout: null,\n oldResizeItem: null,\n droppingDOMNode: null,\n children: []\n });\n\n _defineProperty(_assertThisInitialized(_this), \"dragEnterCounter\", 0);\n\n _defineProperty(_assertThisInitialized(_this), \"onDragStart\", function (i\n /*: string*/\n , x\n /*: number*/\n , y\n /*: number*/\n , _ref) {\n var e = _ref.e,\n node = _ref.node;\n var layout = _this.state.layout;\n var l = (0, _utils.getLayoutItem)(layout, i);\n if (!l) return;\n\n _this.setState({\n oldDragItem: (0, _utils.cloneLayoutItem)(l),\n oldLayout: layout\n });\n\n return _this.props.onDragStart(layout, l, l, null, e, node);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDrag\", function (i, x, y, _ref2) {\n var e = _ref2.e,\n node = _ref2.node;\n var oldDragItem = _this.state.oldDragItem;\n var layout = _this.state.layout;\n var _this$props = _this.props,\n cols = _this$props.cols,\n allowOverlap = _this$props.allowOverlap,\n preventCollision = _this$props.preventCollision;\n var l = (0, _utils.getLayoutItem)(layout, i);\n if (!l) return; // Create placeholder (display only)\n\n var placeholder = {\n w: l.w,\n h: l.h,\n x: l.x,\n y: l.y,\n placeholder: true,\n i: i\n }; // Move the element to the dragged location.\n\n var isUserAction = true;\n layout = (0, _utils.moveElement)(layout, l, x, y, isUserAction, preventCollision, (0, _utils.compactType)(_this.props), cols, allowOverlap);\n\n _this.props.onDrag(layout, oldDragItem, l, placeholder, e, node);\n\n _this.setState({\n layout: allowOverlap ? layout : (0, _utils.compact)(layout, (0, _utils.compactType)(_this.props), cols),\n activeDrag: placeholder\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDragStop\", function (i, x, y, _ref3) {\n var e = _ref3.e,\n node = _ref3.node;\n if (!_this.state.activeDrag) return;\n var oldDragItem = _this.state.oldDragItem;\n var layout = _this.state.layout;\n var _this$props2 = _this.props,\n cols = _this$props2.cols,\n preventCollision = _this$props2.preventCollision,\n allowOverlap = _this$props2.allowOverlap;\n var l = (0, _utils.getLayoutItem)(layout, i);\n if (!l) return; // Move the element here\n\n var isUserAction = true;\n layout = (0, _utils.moveElement)(layout, l, x, y, isUserAction, preventCollision, (0, _utils.compactType)(_this.props), cols, allowOverlap);\n\n _this.props.onDragStop(layout, oldDragItem, l, null, e, node); // Set state\n\n\n var newLayout = allowOverlap ? layout : (0, _utils.compact)(layout, (0, _utils.compactType)(_this.props), cols);\n var oldLayout = _this.state.oldLayout;\n\n _this.setState({\n activeDrag: null,\n layout: newLayout,\n oldDragItem: null,\n oldLayout: null\n });\n\n _this.onLayoutMaybeChanged(newLayout, oldLayout);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onResizeStart\", function (i, w, h, _ref4) {\n var e = _ref4.e,\n node = _ref4.node;\n var layout = _this.state.layout;\n var l = (0, _utils.getLayoutItem)(layout, i);\n if (!l) return;\n\n _this.setState({\n oldResizeItem: (0, _utils.cloneLayoutItem)(l),\n oldLayout: _this.state.layout\n });\n\n _this.props.onResizeStart(layout, l, l, null, e, node);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onResize\", function (i, w, h, _ref5) {\n var e = _ref5.e,\n node = _ref5.node;\n var _this$state = _this.state,\n layout = _this$state.layout,\n oldResizeItem = _this$state.oldResizeItem;\n var _this$props3 = _this.props,\n cols = _this$props3.cols,\n preventCollision = _this$props3.preventCollision,\n allowOverlap = _this$props3.allowOverlap;\n\n var _withLayoutItem = (0, _utils.withLayoutItem)(layout, i, function (l) {\n // Something like quad tree should be used\n // to find collisions faster\n var hasCollisions;\n\n if (preventCollision && !allowOverlap) {\n var collisions = (0, _utils.getAllCollisions)(layout, _objectSpread(_objectSpread({}, l), {}, {\n w: w,\n h: h\n })).filter(function (layoutItem) {\n return layoutItem.i !== l.i;\n });\n hasCollisions = collisions.length > 0; // If we're colliding, we need adjust the placeholder.\n\n // If we're colliding, we need adjust the placeholder.\n if (hasCollisions) {\n // adjust w && h to maximum allowed space\n var leastX = Infinity,\n leastY = Infinity;\n collisions.forEach(function (layoutItem) {\n if (layoutItem.x > l.x) leastX = Math.min(leastX, layoutItem.x);\n if (layoutItem.y > l.y) leastY = Math.min(leastY, layoutItem.y);\n });\n if (Number.isFinite(leastX)) l.w = leastX - l.x;\n if (Number.isFinite(leastY)) l.h = leastY - l.y;\n }\n }\n\n if (!hasCollisions) {\n // Set new width and height.\n l.w = w;\n l.h = h;\n }\n\n return l;\n }),\n _withLayoutItem2 = _slicedToArray(_withLayoutItem, 2),\n newLayout = _withLayoutItem2[0],\n l = _withLayoutItem2[1]; // Shouldn't ever happen, but typechecking makes it necessary\n\n\n if (!l) return; // Create placeholder element (display only)\n\n var placeholder = {\n w: l.w,\n h: l.h,\n x: l.x,\n y: l.y,\n static: true,\n i: i\n };\n\n _this.props.onResize(newLayout, oldResizeItem, l, placeholder, e, node); // Re-compact the newLayout and set the drag placeholder.\n\n\n _this.setState({\n layout: allowOverlap ? newLayout : (0, _utils.compact)(newLayout, (0, _utils.compactType)(_this.props), cols),\n activeDrag: placeholder\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onResizeStop\", function (i, w, h, _ref6) {\n var e = _ref6.e,\n node = _ref6.node;\n var _this$state2 = _this.state,\n layout = _this$state2.layout,\n oldResizeItem = _this$state2.oldResizeItem;\n var _this$props4 = _this.props,\n cols = _this$props4.cols,\n allowOverlap = _this$props4.allowOverlap;\n var l = (0, _utils.getLayoutItem)(layout, i);\n\n _this.props.onResizeStop(layout, oldResizeItem, l, null, e, node); // Set state\n\n\n var newLayout = allowOverlap ? layout : (0, _utils.compact)(layout, (0, _utils.compactType)(_this.props), cols);\n var oldLayout = _this.state.oldLayout;\n\n _this.setState({\n activeDrag: null,\n layout: newLayout,\n oldResizeItem: null,\n oldLayout: null\n });\n\n _this.onLayoutMaybeChanged(newLayout, oldLayout);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDragOver\", function (e) {\n var _e$nativeEvent$target;\n\n e.preventDefault(); // Prevent any browser native action\n\n e.stopPropagation(); // we should ignore events from layout's children in Firefox\n // to avoid unpredictable jumping of a dropping placeholder\n // FIXME remove this hack\n\n if (isFirefox && // $FlowIgnore can't figure this out\n !((_e$nativeEvent$target = e.nativeEvent.target) !== null && _e$nativeEvent$target !== void 0 && _e$nativeEvent$target.classList.contains(layoutClassName))) {\n return false;\n }\n\n var _this$props5 = _this.props,\n droppingItem = _this$props5.droppingItem,\n onDropDragOver = _this$props5.onDropDragOver,\n margin = _this$props5.margin,\n cols = _this$props5.cols,\n rowHeight = _this$props5.rowHeight,\n maxRows = _this$props5.maxRows,\n width = _this$props5.width,\n containerPadding = _this$props5.containerPadding,\n transformScale = _this$props5.transformScale; // Allow user to customize the dropping item or short-circuit the drop based on the results\n // of the `onDragOver(e: Event)` callback.\n\n var onDragOverResult = onDropDragOver === null || onDropDragOver === void 0 ? void 0 : onDropDragOver(e);\n\n if (onDragOverResult === false) {\n if (_this.state.droppingDOMNode) {\n _this.removeDroppingPlaceholder();\n }\n\n return false;\n }\n\n var finalDroppingItem = _objectSpread(_objectSpread({}, droppingItem), onDragOverResult);\n\n var layout = _this.state.layout; // This is relative to the DOM element that this event fired for.\n\n var _e$nativeEvent = e.nativeEvent,\n layerX = _e$nativeEvent.layerX,\n layerY = _e$nativeEvent.layerY;\n var droppingPosition = {\n left: layerX / transformScale,\n top: layerY / transformScale,\n e: e\n };\n\n if (!_this.state.droppingDOMNode) {\n var positionParams\n /*: PositionParams*/\n = {\n cols: cols,\n margin: margin,\n maxRows: maxRows,\n rowHeight: rowHeight,\n containerWidth: width,\n containerPadding: containerPadding || margin\n };\n var calculatedPosition = (0, _calculateUtils.calcXY)(positionParams, layerY, layerX, finalDroppingItem.w, finalDroppingItem.h);\n\n _this.setState({\n droppingDOMNode: /*#__PURE__*/React.createElement(\"div\", {\n key: finalDroppingItem.i\n }),\n droppingPosition: droppingPosition,\n layout: [].concat(_toConsumableArray(layout), [_objectSpread(_objectSpread({}, finalDroppingItem), {}, {\n x: calculatedPosition.x,\n y: calculatedPosition.y,\n static: false,\n isDraggable: true\n })])\n });\n } else if (_this.state.droppingPosition) {\n var _this$state$droppingP = _this.state.droppingPosition,\n left = _this$state$droppingP.left,\n top = _this$state$droppingP.top;\n var shouldUpdatePosition = left != layerX || top != layerY;\n\n if (shouldUpdatePosition) {\n _this.setState({\n droppingPosition: droppingPosition\n });\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"removeDroppingPlaceholder\", function () {\n var _this$props6 = _this.props,\n droppingItem = _this$props6.droppingItem,\n cols = _this$props6.cols;\n var layout = _this.state.layout;\n var newLayout = (0, _utils.compact)(layout.filter(function (l) {\n return l.i !== droppingItem.i;\n }), (0, _utils.compactType)(_this.props), cols);\n\n _this.setState({\n layout: newLayout,\n droppingDOMNode: null,\n activeDrag: null,\n droppingPosition: undefined\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDragLeave\", function (e) {\n e.preventDefault(); // Prevent any browser native action\n\n e.stopPropagation();\n _this.dragEnterCounter--; // onDragLeave can be triggered on each layout's child.\n // But we know that count of dragEnter and dragLeave events\n // will be balanced after leaving the layout's container\n // so we can increase and decrease count of dragEnter and\n // when it'll be equal to 0 we'll remove the placeholder\n\n if (_this.dragEnterCounter === 0) {\n _this.removeDroppingPlaceholder();\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDragEnter\", function (e) {\n e.preventDefault(); // Prevent any browser native action\n\n e.stopPropagation();\n _this.dragEnterCounter++;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDrop\", function (e\n /*: Event*/\n ) {\n e.preventDefault(); // Prevent any browser native action\n\n e.stopPropagation();\n var droppingItem = _this.props.droppingItem;\n var layout = _this.state.layout;\n var item = layout.find(function (l) {\n return l.i === droppingItem.i;\n }); // reset dragEnter counter on drop\n\n _this.dragEnterCounter = 0;\n\n _this.removeDroppingPlaceholder();\n\n _this.props.onDrop(layout, item, e);\n });\n\n return _this;\n }\n\n _createClass(ReactGridLayout, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.setState({\n mounted: true\n }); // Possibly call back with layout on mount. This should be done after correcting the layout width\n // to ensure we don't rerender with the wrong width.\n\n this.onLayoutMaybeChanged(this.state.layout, this.props.layout);\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps\n /*: Props*/\n , nextState\n /*: State*/\n )\n /*: boolean*/\n {\n return (// NOTE: this is almost always unequal. Therefore the only way to get better performance\n // from SCU is if the user intentionally memoizes children. If they do, and they can\n // handle changes properly, performance will increase.\n this.props.children !== nextProps.children || !(0, _utils.fastRGLPropsEqual)(this.props, nextProps, _lodash.default) || this.state.activeDrag !== nextState.activeDrag || this.state.mounted !== nextState.mounted || this.state.droppingPosition !== nextState.droppingPosition\n );\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps\n /*: Props*/\n , prevState\n /*: State*/\n ) {\n if (!this.state.activeDrag) {\n var newLayout = this.state.layout;\n var oldLayout = prevState.layout;\n this.onLayoutMaybeChanged(newLayout, oldLayout);\n }\n }\n /**\n * Calculates a pixel value for the container.\n * @return {String} Container height in pixels.\n */\n\n }, {\n key: \"containerHeight\",\n value: function containerHeight()\n /*: ?string*/\n {\n if (!this.props.autoSize) return;\n var nbRow = (0, _utils.bottom)(this.state.layout);\n var containerPaddingY = this.props.containerPadding ? this.props.containerPadding[1] : this.props.margin[1];\n return nbRow * this.props.rowHeight + (nbRow - 1) * this.props.margin[1] + containerPaddingY * 2 + \"px\";\n }\n /**\n * When dragging starts\n * @param {String} i Id of the child\n * @param {Number} x X position of the move\n * @param {Number} y Y position of the move\n * @param {Event} e The mousedown event\n * @param {Element} node The current dragging DOM element\n */\n\n }, {\n key: \"onLayoutMaybeChanged\",\n value: function onLayoutMaybeChanged(newLayout\n /*: Layout*/\n , oldLayout\n /*: ?Layout*/\n ) {\n if (!oldLayout) oldLayout = this.state.layout;\n\n if (!(0, _lodash.default)(oldLayout, newLayout)) {\n this.props.onLayoutChange(newLayout);\n }\n }\n }, {\n key: \"placeholder\",\n value:\n /**\n * Create a placeholder object.\n * @return {Element} Placeholder div.\n */\n function placeholder()\n /*: ?ReactElement*/\n {\n var activeDrag = this.state.activeDrag;\n if (!activeDrag) return null;\n var _this$props7 = this.props,\n width = _this$props7.width,\n cols = _this$props7.cols,\n margin = _this$props7.margin,\n containerPadding = _this$props7.containerPadding,\n rowHeight = _this$props7.rowHeight,\n maxRows = _this$props7.maxRows,\n useCSSTransforms = _this$props7.useCSSTransforms,\n transformScale = _this$props7.transformScale; // {...this.state.activeDrag} is pretty slow, actually\n\n return /*#__PURE__*/React.createElement(_GridItem.default, {\n w: activeDrag.w,\n h: activeDrag.h,\n x: activeDrag.x,\n y: activeDrag.y,\n i: activeDrag.i,\n className: \"react-grid-placeholder\",\n containerWidth: width,\n cols: cols,\n margin: margin,\n containerPadding: containerPadding || margin,\n maxRows: maxRows,\n rowHeight: rowHeight,\n isDraggable: false,\n isResizable: false,\n isBounded: false,\n useCSSTransforms: useCSSTransforms,\n transformScale: transformScale\n }, /*#__PURE__*/React.createElement(\"div\", null));\n }\n /**\n * Given a grid item, set its style attributes & surround in a .\n * @param {Element} child React element.\n * @return {Element} Element wrapped in draggable and properly placed.\n */\n\n }, {\n key: \"processGridItem\",\n value: function processGridItem(child\n /*: ReactElement*/\n , isDroppingItem\n /*: boolean*/\n )\n /*: ?ReactElement*/\n {\n if (!child || !child.key) return;\n var l = (0, _utils.getLayoutItem)(this.state.layout, String(child.key));\n if (!l) return null;\n var _this$props8 = this.props,\n width = _this$props8.width,\n cols = _this$props8.cols,\n margin = _this$props8.margin,\n containerPadding = _this$props8.containerPadding,\n rowHeight = _this$props8.rowHeight,\n maxRows = _this$props8.maxRows,\n isDraggable = _this$props8.isDraggable,\n isResizable = _this$props8.isResizable,\n isBounded = _this$props8.isBounded,\n useCSSTransforms = _this$props8.useCSSTransforms,\n transformScale = _this$props8.transformScale,\n draggableCancel = _this$props8.draggableCancel,\n draggableHandle = _this$props8.draggableHandle,\n resizeHandles = _this$props8.resizeHandles,\n resizeHandle = _this$props8.resizeHandle;\n var _this$state3 = this.state,\n mounted = _this$state3.mounted,\n droppingPosition = _this$state3.droppingPosition; // Determine user manipulations possible.\n // If an item is static, it can't be manipulated by default.\n // Any properties defined directly on the grid item will take precedence.\n\n var draggable = typeof l.isDraggable === \"boolean\" ? l.isDraggable : !l.static && isDraggable;\n var resizable = typeof l.isResizable === \"boolean\" ? l.isResizable : !l.static && isResizable;\n var resizeHandlesOptions = l.resizeHandles || resizeHandles; // isBounded set on child if set on parent, and child is not explicitly false\n\n var bounded = draggable && isBounded && l.isBounded !== false;\n return /*#__PURE__*/React.createElement(_GridItem.default, {\n containerWidth: width,\n cols: cols,\n margin: margin,\n containerPadding: containerPadding || margin,\n maxRows: maxRows,\n rowHeight: rowHeight,\n cancel: draggableCancel,\n handle: draggableHandle,\n onDragStop: this.onDragStop,\n onDragStart: this.onDragStart,\n onDrag: this.onDrag,\n onResizeStart: this.onResizeStart,\n onResize: this.onResize,\n onResizeStop: this.onResizeStop,\n isDraggable: draggable,\n isResizable: resizable,\n isBounded: bounded,\n useCSSTransforms: useCSSTransforms && mounted,\n usePercentages: !mounted,\n transformScale: transformScale,\n w: l.w,\n h: l.h,\n x: l.x,\n y: l.y,\n i: l.i,\n minH: l.minH,\n minW: l.minW,\n maxH: l.maxH,\n maxW: l.maxW,\n static: l.static,\n droppingPosition: isDroppingItem ? droppingPosition : undefined,\n resizeHandles: resizeHandlesOptions,\n resizeHandle: resizeHandle\n }, child);\n } // Called while dragging an element. Part of browser native drag/drop API.\n // Native event target might be the layout itself, or an element within the layout.\n\n }, {\n key: \"render\",\n value: function render()\n /*: React.Element<\"div\">*/\n {\n var _this2 = this;\n\n var _this$props9 = this.props,\n className = _this$props9.className,\n style = _this$props9.style,\n isDroppable = _this$props9.isDroppable,\n innerRef = _this$props9.innerRef;\n var mergedClassName = (0, _clsx.default)(layoutClassName, className);\n\n var mergedStyle = _objectSpread({\n height: this.containerHeight()\n }, style);\n\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: innerRef,\n className: mergedClassName,\n style: mergedStyle,\n onDrop: isDroppable ? this.onDrop : _utils.noop,\n onDragLeave: isDroppable ? this.onDragLeave : _utils.noop,\n onDragEnter: isDroppable ? this.onDragEnter : _utils.noop,\n onDragOver: isDroppable ? this.onDragOver : _utils.noop\n }, React.Children.map(this.props.children, function (child) {\n return _this2.processGridItem(child);\n }), isDroppable && this.state.droppingDOMNode && this.processGridItem(this.state.droppingDOMNode, true), this.placeholder());\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps\n /*: Props*/\n , prevState\n /*: State*/\n )\n /*: $Shape | null*/\n {\n var newLayoutBase;\n\n if (prevState.activeDrag) {\n return null;\n } // Legacy support for compactType\n // Allow parent to set layout directly.\n\n\n if (!(0, _lodash.default)(nextProps.layout, prevState.propsLayout) || nextProps.compactType !== prevState.compactType) {\n newLayoutBase = nextProps.layout;\n } else if (!(0, _utils.childrenEqual)(nextProps.children, prevState.children)) {\n // If children change, also regenerate the layout. Use our state\n // as the base in case because it may be more up to date than\n // what is in props.\n newLayoutBase = prevState.layout;\n } // We need to regenerate the layout.\n\n\n if (newLayoutBase) {\n var newLayout = (0, _utils.synchronizeLayoutWithChildren)(newLayoutBase, nextProps.children, nextProps.cols, (0, _utils.compactType)(nextProps), nextProps.allowOverlap);\n return {\n layout: newLayout,\n // We need to save these props to state for using\n // getDerivedStateFromProps instead of componentDidMount (in which we would get extra rerender)\n compactType: nextProps.compactType,\n children: nextProps.children,\n propsLayout: nextProps.layout\n };\n }\n\n return null;\n }\n }]);\n\n return ReactGridLayout;\n}(React.Component);\n\nexports.default = ReactGridLayout;\n\n_defineProperty(ReactGridLayout, \"displayName\", \"ReactGridLayout\");\n\n_defineProperty(ReactGridLayout, \"propTypes\", _ReactGridLayoutPropTypes.default);\n\n_defineProperty(ReactGridLayout, \"defaultProps\", {\n autoSize: true,\n cols: 12,\n className: \"\",\n style: {},\n draggableHandle: \"\",\n draggableCancel: \"\",\n containerPadding: null,\n rowHeight: 150,\n maxRows: Infinity,\n // infinite vertical growth\n layout: [],\n margin: [10, 10],\n isBounded: false,\n isDraggable: true,\n isResizable: true,\n allowOverlap: false,\n isDroppable: false,\n useCSSTransforms: true,\n transformScale: 1,\n verticalCompact: true,\n compactType: \"vertical\",\n preventCollision: false,\n droppingItem: {\n i: \"__dropping-elem__\",\n h: 1,\n w: 1\n },\n resizeHandles: [\"se\"],\n onLayoutChange: _utils.noop,\n onDragStart: _utils.noop,\n onDrag: _utils.noop,\n onDragStop: _utils.noop,\n onResizeStart: _utils.noop,\n onResize: _utils.noop,\n onResizeStop: _utils.noop,\n onDrop: _utils.noop,\n onDropDragOver: _utils.noop\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.resizeHandleType = exports.resizeHandleAxesType = exports.default = void 0;\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Defines which resize handles should be rendered (default: 'se')\n// Allows for any combination of:\n// 's' - South handle (bottom-center)\n// 'w' - West handle (left-center)\n// 'e' - East handle (right-center)\n// 'n' - North handle (top-center)\n// 'sw' - Southwest handle (bottom-left)\n// 'nw' - Northwest handle (top-left)\n// 'se' - Southeast handle (bottom-right)\n// 'ne' - Northeast handle (top-right)\nvar resizeHandleAxesType\n/*: ReactPropsChainableTypeChecker*/\n= _propTypes.default.arrayOf(_propTypes.default.oneOf([\"s\", \"w\", \"e\", \"n\", \"sw\", \"nw\", \"se\", \"ne\"])); // Custom component for resize handles\n\n\nexports.resizeHandleAxesType = resizeHandleAxesType;\n\nvar resizeHandleType\n/*: ReactPropsChainableTypeChecker*/\n= _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]);\n/*:: export type Props = {|\n className: string,\n style: Object,\n width: number,\n autoSize: boolean,\n cols: number,\n draggableCancel: string,\n draggableHandle: string,\n verticalCompact: boolean,\n compactType: CompactType,\n layout: Layout,\n margin: [number, number],\n containerPadding: ?[number, number],\n rowHeight: number,\n maxRows: number,\n isBounded: boolean,\n isDraggable: boolean,\n isResizable: boolean,\n isDroppable: boolean,\n preventCollision: boolean,\n useCSSTransforms: boolean,\n transformScale: number,\n droppingItem: $Shape,\n resizeHandles: ResizeHandleAxis[],\n resizeHandle?: ResizeHandle,\n allowOverlap: boolean,\n\n // Callbacks\n onLayoutChange: Layout => void,\n onDrag: EventCallback,\n onDragStart: EventCallback,\n onDragStop: EventCallback,\n onResize: EventCallback,\n onResizeStart: EventCallback,\n onResizeStop: EventCallback,\n onDropDragOver: (e: DragOverEvent) => ?({| w?: number, h?: number |} | false),\n onDrop: (layout: Layout, item: ?LayoutItem, e: Event) => void,\n children: ReactChildrenArray>,\n innerRef?: Ref<\"div\">\n|};*/\n\n/*:: export type DefaultProps = $Diff<\n Props,\n {\n children: ReactChildrenArray>,\n width: number\n }\n>;*/\n\n\nexports.resizeHandleType = resizeHandleType;\nvar _default = {\n //\n // Basic props\n //\n className: _propTypes.default.string,\n style: _propTypes.default.object,\n // This can be set explicitly. If it is not set, it will automatically\n // be set to the container width. Note that resizes will *not* cause this to adjust.\n // If you need that behavior, use WidthProvider.\n width: _propTypes.default.number,\n // If true, the container height swells and contracts to fit contents\n autoSize: _propTypes.default.bool,\n // # of cols.\n cols: _propTypes.default.number,\n // A selector that will not be draggable.\n draggableCancel: _propTypes.default.string,\n // A selector for the draggable handler\n draggableHandle: _propTypes.default.string,\n // Deprecated\n verticalCompact: function verticalCompact(props\n /*: Props*/\n ) {\n if (props.verticalCompact === false && process.env.NODE_ENV !== \"production\") {\n console.warn( // eslint-disable-line no-console\n \"`verticalCompact` on is deprecated and will be removed soon. \" + 'Use `compactType`: \"horizontal\" | \"vertical\" | null.');\n }\n },\n // Choose vertical or hotizontal compaction\n compactType: (_propTypes.default.oneOf([\"vertical\", \"horizontal\"])\n /*: ReactPropsChainableTypeChecker*/\n ),\n // layout is an array of object with the format:\n // {x: Number, y: Number, w: Number, h: Number, i: String}\n layout: function layout(props\n /*: Props*/\n ) {\n var layout = props.layout; // I hope you're setting the data-grid property on the grid items\n\n if (layout === undefined) return;\n\n require(\"./utils\").validateLayout(layout, \"layout\");\n },\n //\n // Grid Dimensions\n //\n // Margin between items [x, y] in px\n margin: (_propTypes.default.arrayOf(_propTypes.default.number)\n /*: ReactPropsChainableTypeChecker*/\n ),\n // Padding inside the container [x, y] in px\n containerPadding: (_propTypes.default.arrayOf(_propTypes.default.number)\n /*: ReactPropsChainableTypeChecker*/\n ),\n // Rows have a static height, but you can change this based on breakpoints if you like\n rowHeight: _propTypes.default.number,\n // Default Infinity, but you can specify a max here if you like.\n // Note that this isn't fully fleshed out and won't error if you specify a layout that\n // extends beyond the row capacity. It will, however, not allow users to drag/resize\n // an item past the barrier. They can push items beyond the barrier, though.\n // Intentionally not documented for this reason.\n maxRows: _propTypes.default.number,\n //\n // Flags\n //\n isBounded: _propTypes.default.bool,\n isDraggable: _propTypes.default.bool,\n isResizable: _propTypes.default.bool,\n // If true, grid can be placed one over the other.\n allowOverlap: _propTypes.default.bool,\n // If true, grid items won't change position when being dragged over.\n preventCollision: _propTypes.default.bool,\n // Use CSS transforms instead of top/left\n useCSSTransforms: _propTypes.default.bool,\n // parent layout transform scale\n transformScale: _propTypes.default.number,\n // If true, an external element can trigger onDrop callback with a specific grid position as a parameter\n isDroppable: _propTypes.default.bool,\n // Resize handle options\n resizeHandles: resizeHandleAxesType,\n resizeHandle: resizeHandleType,\n //\n // Callbacks\n //\n // Callback so you can save the layout. Calls after each drag & resize stops.\n onLayoutChange: _propTypes.default.func,\n // Calls when drag starts. Callback is of the signature (layout, oldItem, newItem, placeholder, e, ?node).\n // All callbacks below have the same signature. 'start' and 'stop' callbacks omit the 'placeholder'.\n onDragStart: _propTypes.default.func,\n // Calls on each drag movement.\n onDrag: _propTypes.default.func,\n // Calls when drag is complete.\n onDragStop: _propTypes.default.func,\n //Calls when resize starts.\n onResizeStart: _propTypes.default.func,\n // Calls when resize movement happens.\n onResize: _propTypes.default.func,\n // Calls when resize is complete.\n onResizeStop: _propTypes.default.func,\n // Calls when some element is dropped.\n onDrop: _propTypes.default.func,\n //\n // Other validations\n //\n droppingItem: (_propTypes.default.shape({\n i: _propTypes.default.string.isRequired,\n w: _propTypes.default.number.isRequired,\n h: _propTypes.default.number.isRequired\n })\n /*: ReactPropsChainableTypeChecker*/\n ),\n // Children must not have duplicate keys.\n children: function children(props\n /*: Props*/\n , propName\n /*: string*/\n ) {\n var children = props[propName]; // Check children keys for duplicates. Throw if found.\n\n var keys = {};\n\n _react.default.Children.forEach(children, function (child) {\n if ((child === null || child === void 0 ? void 0 : child.key) == null) return;\n\n if (keys[child.key]) {\n throw new Error('Duplicate child key \"' + child.key + '\" found! This will cause problems in ReactGridLayout.');\n }\n\n keys[child.key] = true;\n });\n },\n // Optional ref for getting a reference for the wrapping div.\n innerRef: _propTypes.default.any\n};\nexports.default = _default;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _lodash = _interopRequireDefault(require(\"lodash.isequal\"));\n\nvar _utils = require(\"./utils\");\n\nvar _responsiveUtils = require(\"./responsiveUtils\");\n\nvar _ReactGridLayout = _interopRequireDefault(require(\"./ReactGridLayout\"));\n\nvar _excluded = [\"breakpoint\", \"breakpoints\", \"cols\", \"layouts\", \"margin\", \"containerPadding\", \"onBreakpointChange\", \"onLayoutChange\", \"onWidthChange\"];\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// $FlowFixMe[method-unbinding]\nvar type = function type(obj) {\n return Object.prototype.toString.call(obj);\n};\n/**\n * Get a value of margin or containerPadding.\n *\n * @param {Array | Object} param Margin | containerPadding, e.g. [10, 10] | {lg: [10, 10], ...}.\n * @param {String} breakpoint Breakpoint: lg, md, sm, xs and etc.\n * @return {Array}\n */\n\n\nfunction getIndentationValue\n/*:: */\n(param\n/*: { [key: string]: T } | T*/\n, breakpoint\n/*: string*/\n)\n/*: T*/\n{\n // $FlowIgnore TODO fix this typedef\n if (param == null) return null; // $FlowIgnore TODO fix this typedef\n\n return Array.isArray(param) ? param : param[breakpoint];\n}\n/*:: type State = {\n layout: Layout,\n breakpoint: string,\n cols: number,\n layouts?: ResponsiveLayout\n};*/\n\n/*:: type Props = {|\n ...React.ElementConfig,\n\n // Responsive config\n breakpoint?: ?Breakpoint,\n breakpoints: Breakpoints,\n cols: { [key: Breakpoint]: number },\n layouts: ResponsiveLayout,\n width: number,\n margin: { [key: Breakpoint]: [number, number] } | [number, number],\n /* prettier-ignore *-/\n containerPadding: { [key: Breakpoint]: ?[number, number] } | ?[number, number],\n\n // Callbacks\n onBreakpointChange: (Breakpoint, cols: number) => void,\n onLayoutChange: OnLayoutChangeCallback,\n onWidthChange: (\n containerWidth: number,\n margin: [number, number],\n cols: number,\n containerPadding: ?[number, number]\n ) => void\n|};*/\n\n/*:: type DefaultProps = Pick<\n Props<>,\n {|\n allowOverlap: 0,\n breakpoints: 0,\n cols: 0,\n containerPadding: 0,\n layouts: 0,\n margin: 0,\n onBreakpointChange: 0,\n onLayoutChange: 0,\n onWidthChange: 0\n |}\n>;*/\n\n\nvar ResponsiveReactGridLayout = /*#__PURE__*/function (_React$Component) {\n _inherits(ResponsiveReactGridLayout, _React$Component);\n\n var _super = _createSuper(ResponsiveReactGridLayout);\n\n function ResponsiveReactGridLayout() {\n var _this;\n\n _classCallCheck(this, ResponsiveReactGridLayout);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", _this.generateInitialState());\n\n _defineProperty(_assertThisInitialized(_this), \"onLayoutChange\", function (layout\n /*: Layout*/\n ) {\n _this.props.onLayoutChange(layout, _objectSpread(_objectSpread({}, _this.props.layouts), {}, _defineProperty({}, _this.state.breakpoint, layout)));\n });\n\n return _this;\n }\n\n _createClass(ResponsiveReactGridLayout, [{\n key: \"generateInitialState\",\n value: function generateInitialState()\n /*: State*/\n {\n var _this$props = this.props,\n width = _this$props.width,\n breakpoints = _this$props.breakpoints,\n layouts = _this$props.layouts,\n cols = _this$props.cols;\n var breakpoint = (0, _responsiveUtils.getBreakpointFromWidth)(breakpoints, width);\n var colNo = (0, _responsiveUtils.getColsFromBreakpoint)(breakpoint, cols); // verticalCompact compatibility, now deprecated\n\n var compactType = this.props.verticalCompact === false ? null : this.props.compactType; // Get the initial layout. This can tricky; we try to generate one however possible if one doesn't exist\n // for this layout.\n\n var initialLayout = (0, _responsiveUtils.findOrGenerateResponsiveLayout)(layouts, breakpoints, breakpoint, breakpoint, colNo, compactType);\n return {\n layout: initialLayout,\n breakpoint: breakpoint,\n cols: colNo\n };\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps\n /*: Props<*>*/\n ) {\n // Allow parent to set width or breakpoint directly.\n if (this.props.width != prevProps.width || this.props.breakpoint !== prevProps.breakpoint || !(0, _lodash.default)(this.props.breakpoints, prevProps.breakpoints) || !(0, _lodash.default)(this.props.cols, prevProps.cols)) {\n this.onWidthChange(prevProps);\n }\n } // wrap layouts so we do not need to pass layouts to child\n\n }, {\n key: \"onWidthChange\",\n value:\n /**\n * When the width changes work through breakpoints and reset state with the new width & breakpoint.\n * Width changes are necessary to figure out the widget widths.\n */\n function onWidthChange(prevProps\n /*: Props<*>*/\n ) {\n var _this$props2 = this.props,\n breakpoints = _this$props2.breakpoints,\n cols = _this$props2.cols,\n layouts = _this$props2.layouts,\n compactType = _this$props2.compactType;\n var newBreakpoint = this.props.breakpoint || (0, _responsiveUtils.getBreakpointFromWidth)(this.props.breakpoints, this.props.width);\n var lastBreakpoint = this.state.breakpoint;\n var newCols\n /*: number*/\n = (0, _responsiveUtils.getColsFromBreakpoint)(newBreakpoint, cols);\n\n var newLayouts = _objectSpread({}, layouts); // Breakpoint change\n\n\n if (lastBreakpoint !== newBreakpoint || prevProps.breakpoints !== breakpoints || prevProps.cols !== cols) {\n // Preserve the current layout if the current breakpoint is not present in the next layouts.\n if (!(lastBreakpoint in newLayouts)) newLayouts[lastBreakpoint] = (0, _utils.cloneLayout)(this.state.layout); // Find or generate a new layout.\n\n var layout = (0, _responsiveUtils.findOrGenerateResponsiveLayout)(newLayouts, breakpoints, newBreakpoint, lastBreakpoint, newCols, compactType); // This adds missing items.\n\n layout = (0, _utils.synchronizeLayoutWithChildren)(layout, this.props.children, newCols, compactType, this.props.allowOverlap); // Store the new layout.\n\n newLayouts[newBreakpoint] = layout; // callbacks\n\n this.props.onLayoutChange(layout, newLayouts);\n this.props.onBreakpointChange(newBreakpoint, newCols);\n this.setState({\n breakpoint: newBreakpoint,\n layout: layout,\n cols: newCols\n });\n }\n\n var margin = getIndentationValue(this.props.margin, newBreakpoint);\n var containerPadding = getIndentationValue(this.props.containerPadding, newBreakpoint); //call onWidthChange on every change of width, not only on breakpoint changes\n\n this.props.onWidthChange(this.props.width, margin, newCols, containerPadding);\n }\n }, {\n key: \"render\",\n value: function render()\n /*: React.Element*/\n {\n /* eslint-disable no-unused-vars */\n var _this$props3 = this.props,\n breakpoint = _this$props3.breakpoint,\n breakpoints = _this$props3.breakpoints,\n cols = _this$props3.cols,\n layouts = _this$props3.layouts,\n margin = _this$props3.margin,\n containerPadding = _this$props3.containerPadding,\n onBreakpointChange = _this$props3.onBreakpointChange,\n onLayoutChange = _this$props3.onLayoutChange,\n onWidthChange = _this$props3.onWidthChange,\n other = _objectWithoutProperties(_this$props3, _excluded);\n /* eslint-enable no-unused-vars */\n\n\n return /*#__PURE__*/React.createElement(_ReactGridLayout.default, _extends({}, other, {\n // $FlowIgnore should allow nullable here due to DefaultProps\n margin: getIndentationValue(margin, this.state.breakpoint),\n containerPadding: getIndentationValue(containerPadding, this.state.breakpoint),\n onLayoutChange: this.onLayoutChange,\n layout: this.state.layout,\n cols: this.state.cols\n }));\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps\n /*: Props<*>*/\n , prevState\n /*: State*/\n )\n /*: ?$Shape*/\n {\n if (!(0, _lodash.default)(nextProps.layouts, prevState.layouts)) {\n // Allow parent to set layouts directly.\n var breakpoint = prevState.breakpoint,\n _cols = prevState.cols; // Since we're setting an entirely new layout object, we must generate a new responsive layout\n // if one does not exist.\n\n var newLayout = (0, _responsiveUtils.findOrGenerateResponsiveLayout)(nextProps.layouts, nextProps.breakpoints, breakpoint, breakpoint, _cols, nextProps.compactType);\n return {\n layout: newLayout,\n layouts: nextProps.layouts\n };\n }\n\n return null;\n }\n }]);\n\n return ResponsiveReactGridLayout;\n}(React.Component);\n\nexports.default = ResponsiveReactGridLayout;\n\n_defineProperty(ResponsiveReactGridLayout, \"propTypes\", {\n //\n // Basic props\n //\n // Optional, but if you are managing width yourself you may want to set the breakpoint\n // yourself as well.\n breakpoint: _propTypes.default.string,\n // {name: pxVal}, e.g. {lg: 1200, md: 996, sm: 768, xs: 480}\n breakpoints: _propTypes.default.object,\n allowOverlap: _propTypes.default.bool,\n // # of cols. This is a breakpoint -> cols map\n cols: _propTypes.default.object,\n // # of margin. This is a breakpoint -> margin map\n // e.g. { lg: [5, 5], md: [10, 10], sm: [15, 15] }\n // Margin between items [x, y] in px\n // e.g. [10, 10]\n margin: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.object]),\n // # of containerPadding. This is a breakpoint -> containerPadding map\n // e.g. { lg: [5, 5], md: [10, 10], sm: [15, 15] }\n // Padding inside the container [x, y] in px\n // e.g. [10, 10]\n containerPadding: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.object]),\n // layouts is an object mapping breakpoints to layouts.\n // e.g. {lg: Layout, md: Layout, ...}\n layouts: function layouts(props\n /*: Props<>*/\n , propName\n /*: string*/\n ) {\n if (type(props[propName]) !== \"[object Object]\") {\n throw new Error(\"Layout property must be an object. Received: \" + type(props[propName]));\n }\n\n Object.keys(props[propName]).forEach(function (key) {\n if (!(key in props.breakpoints)) {\n throw new Error(\"Each key in layouts must align with a key in breakpoints.\");\n }\n\n (0, _utils.validateLayout)(props.layouts[key], \"layouts.\" + key);\n });\n },\n // The width of this component.\n // Required in this propTypes stanza because generateInitialState() will fail without it.\n width: _propTypes.default.number.isRequired,\n //\n // Callbacks\n //\n // Calls back with breakpoint and new # cols\n onBreakpointChange: _propTypes.default.func,\n // Callback so you can save the layout.\n // Calls back with (currentLayout, allLayouts). allLayouts are keyed by breakpoint.\n onLayoutChange: _propTypes.default.func,\n // Calls back with (containerWidth, margin, cols, containerPadding)\n onWidthChange: _propTypes.default.func\n});\n\n_defineProperty(ResponsiveReactGridLayout, \"defaultProps\", {\n breakpoints: {\n lg: 1200,\n md: 996,\n sm: 768,\n xs: 480,\n xxs: 0\n },\n cols: {\n lg: 12,\n md: 10,\n sm: 6,\n xs: 4,\n xxs: 2\n },\n containerPadding: {\n lg: null,\n md: null,\n sm: null,\n xs: null,\n xxs: null\n },\n layouts: {},\n margin: [10, 10],\n allowOverlap: false,\n onBreakpointChange: _utils.noop,\n onLayoutChange: _utils.noop,\n onWidthChange: _utils.noop\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.calcGridColWidth = calcGridColWidth;\nexports.calcGridItemPosition = calcGridItemPosition;\nexports.calcGridItemWHPx = calcGridItemWHPx;\nexports.calcWH = calcWH;\nexports.calcXY = calcXY;\nexports.clamp = clamp;\n\n/*:: import type { Position } from \"./utils\";*/\n\n/*:: export type PositionParams = {\n margin: [number, number],\n containerPadding: [number, number],\n containerWidth: number,\n cols: number,\n rowHeight: number,\n maxRows: number\n};*/\n// Helper for generating column width\nfunction calcGridColWidth(positionParams\n/*: PositionParams*/\n)\n/*: number*/\n{\n var margin = positionParams.margin,\n containerPadding = positionParams.containerPadding,\n containerWidth = positionParams.containerWidth,\n cols = positionParams.cols;\n return (containerWidth - margin[0] * (cols - 1) - containerPadding[0] * 2) / cols;\n} // This can either be called:\n// calcGridItemWHPx(w, colWidth, margin[0])\n// or\n// calcGridItemWHPx(h, rowHeight, margin[1])\n\n\nfunction calcGridItemWHPx(gridUnits\n/*: number*/\n, colOrRowSize\n/*: number*/\n, marginPx\n/*: number*/\n)\n/*: number*/\n{\n // 0 * Infinity === NaN, which causes problems with resize contraints\n if (!Number.isFinite(gridUnits)) return gridUnits;\n return Math.round(colOrRowSize * gridUnits + Math.max(0, gridUnits - 1) * marginPx);\n}\n/**\n * Return position on the page given an x, y, w, h.\n * left, top, width, height are all in pixels.\n * @param {PositionParams} positionParams Parameters of grid needed for coordinates calculations.\n * @param {Number} x X coordinate in grid units.\n * @param {Number} y Y coordinate in grid units.\n * @param {Number} w W coordinate in grid units.\n * @param {Number} h H coordinate in grid units.\n * @return {Position} Object containing coords.\n */\n\n\nfunction calcGridItemPosition(positionParams\n/*: PositionParams*/\n, x\n/*: number*/\n, y\n/*: number*/\n, w\n/*: number*/\n, h\n/*: number*/\n, state\n/*: ?Object*/\n)\n/*: Position*/\n{\n var margin = positionParams.margin,\n containerPadding = positionParams.containerPadding,\n rowHeight = positionParams.rowHeight;\n var colWidth = calcGridColWidth(positionParams);\n var out = {}; // If resizing, use the exact width and height as returned from resizing callbacks.\n\n if (state && state.resizing) {\n out.width = Math.round(state.resizing.width);\n out.height = Math.round(state.resizing.height);\n } // Otherwise, calculate from grid units.\n else {\n out.width = calcGridItemWHPx(w, colWidth, margin[0]);\n out.height = calcGridItemWHPx(h, rowHeight, margin[1]);\n } // If dragging, use the exact width and height as returned from dragging callbacks.\n\n\n if (state && state.dragging) {\n out.top = Math.round(state.dragging.top);\n out.left = Math.round(state.dragging.left);\n } // Otherwise, calculate from grid units.\n else {\n out.top = Math.round((rowHeight + margin[1]) * y + containerPadding[1]);\n out.left = Math.round((colWidth + margin[0]) * x + containerPadding[0]);\n }\n\n return out;\n}\n/**\n * Translate x and y coordinates from pixels to grid units.\n * @param {PositionParams} positionParams Parameters of grid needed for coordinates calculations.\n * @param {Number} top Top position (relative to parent) in pixels.\n * @param {Number} left Left position (relative to parent) in pixels.\n * @param {Number} w W coordinate in grid units.\n * @param {Number} h H coordinate in grid units.\n * @return {Object} x and y in grid units.\n */\n\n\nfunction calcXY(positionParams\n/*: PositionParams*/\n, top\n/*: number*/\n, left\n/*: number*/\n, w\n/*: number*/\n, h\n/*: number*/\n)\n/*: { x: number, y: number }*/\n{\n var margin = positionParams.margin,\n cols = positionParams.cols,\n rowHeight = positionParams.rowHeight,\n maxRows = positionParams.maxRows;\n var colWidth = calcGridColWidth(positionParams); // left = colWidth * x + margin * (x + 1)\n // l = cx + m(x+1)\n // l = cx + mx + m\n // l - m = cx + mx\n // l - m = x(c + m)\n // (l - m) / (c + m) = x\n // x = (left - margin) / (coldWidth + margin)\n\n var x = Math.round((left - margin[0]) / (colWidth + margin[0]));\n var y = Math.round((top - margin[1]) / (rowHeight + margin[1])); // Capping\n\n x = clamp(x, 0, cols - w);\n y = clamp(y, 0, maxRows - h);\n return {\n x: x,\n y: y\n };\n}\n/**\n * Given a height and width in pixel values, calculate grid units.\n * @param {PositionParams} positionParams Parameters of grid needed for coordinates calcluations.\n * @param {Number} height Height in pixels.\n * @param {Number} width Width in pixels.\n * @param {Number} x X coordinate in grid units.\n * @param {Number} y Y coordinate in grid units.\n * @return {Object} w, h as grid units.\n */\n\n\nfunction calcWH(positionParams\n/*: PositionParams*/\n, width\n/*: number*/\n, height\n/*: number*/\n, x\n/*: number*/\n, y\n/*: number*/\n)\n/*: { w: number, h: number }*/\n{\n var margin = positionParams.margin,\n maxRows = positionParams.maxRows,\n cols = positionParams.cols,\n rowHeight = positionParams.rowHeight;\n var colWidth = calcGridColWidth(positionParams); // width = colWidth * w - (margin * (w - 1))\n // ...\n // w = (width + margin) / (colWidth + margin)\n\n var w = Math.round((width + margin[0]) / (colWidth + margin[0]));\n var h = Math.round((height + margin[1]) / (rowHeight + margin[1])); // Capping\n\n w = clamp(w, 0, cols - x);\n h = clamp(h, 0, maxRows - y);\n return {\n w: w,\n h: h\n };\n} // Similar to _.clamp\n\n\nfunction clamp(num\n/*: number*/\n, lowerBound\n/*: number*/\n, upperBound\n/*: number*/\n)\n/*: number*/\n{\n return Math.max(Math.min(num, upperBound), lowerBound);\n}","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = WidthProvideRGL;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _clsx = _interopRequireDefault(require(\"clsx\"));\n\nvar _excluded = [\"measureBeforeMount\"];\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar layoutClassName = \"react-grid-layout\";\n/*\n * A simple HOC that provides facility for listening to container resizes.\n *\n * The Flow type is pretty janky here. I can't just spread `WPProps` into this returned object - I wish I could - but it triggers\n * a flow bug of some sort that causes it to stop typechecking.\n */\n\nfunction WidthProvideRGL\n/*:: */\n(ComposedComponent\n/*: React.AbstractComponent*/\n)\n/*: React.AbstractComponent>*/\n{\n var _class;\n\n return _class = /*#__PURE__*/function (_React$Component) {\n _inherits(WidthProvider, _React$Component);\n\n var _super = _createSuper(WidthProvider);\n\n function WidthProvider() {\n var _this;\n\n _classCallCheck(this, WidthProvider);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n width: 1280\n });\n\n _defineProperty(_assertThisInitialized(_this), \"elementRef\", /*#__PURE__*/React.createRef());\n\n _defineProperty(_assertThisInitialized(_this), \"mounted\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"onWindowResize\", function () {\n if (!_this.mounted) return;\n var node = _this.elementRef.current; // Flow casts this to Text | Element\n // fix: grid position error when node or parentNode display is none by window resize\n // #924 #1084\n\n if (node instanceof HTMLElement && node.offsetWidth) {\n _this.setState({\n width: node.offsetWidth\n });\n }\n });\n\n return _this;\n }\n\n _createClass(WidthProvider, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.mounted = true;\n window.addEventListener(\"resize\", this.onWindowResize); // Call to properly set the breakpoint and resize the elements.\n // Note that if you're doing a full-width element, this can get a little wonky if a scrollbar\n // appears because of the grid. In that case, fire your own resize event, or set `overflow: scroll` on your body.\n\n this.onWindowResize();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.mounted = false;\n window.removeEventListener(\"resize\", this.onWindowResize);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n measureBeforeMount = _this$props.measureBeforeMount,\n rest = _objectWithoutProperties(_this$props, _excluded);\n\n if (measureBeforeMount && !this.mounted) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: (0, _clsx.default)(this.props.className, layoutClassName),\n style: this.props.style // $FlowIgnore ref types\n ,\n ref: this.elementRef\n });\n }\n\n return /*#__PURE__*/React.createElement(ComposedComponent, _extends({\n innerRef: this.elementRef\n }, rest, this.state));\n }\n }]);\n\n return WidthProvider;\n }(React.Component), _defineProperty(_class, \"defaultProps\", {\n measureBeforeMount: false\n }), _defineProperty(_class, \"propTypes\", {\n // If true, will not render children until mounted. Useful for getting the exact width before\n // rendering, to prevent any unsightly resizing.\n measureBeforeMount: _propTypes.default.bool\n }), _class;\n}","// this file was prevaled\nmodule.exports = function fastRGLPropsEqual(a, b, isEqualImpl) {\n if (a === b) return true;\n return a.className === b.className && isEqualImpl(a.style, b.style) && a.width === b.width && a.autoSize === b.autoSize && a.cols === b.cols && a.draggableCancel === b.draggableCancel && a.draggableHandle === b.draggableHandle && isEqualImpl(a.verticalCompact, b.verticalCompact) && isEqualImpl(a.compactType, b.compactType) && isEqualImpl(a.layout, b.layout) && isEqualImpl(a.margin, b.margin) && isEqualImpl(a.containerPadding, b.containerPadding) && a.rowHeight === b.rowHeight && a.maxRows === b.maxRows && a.isBounded === b.isBounded && a.isDraggable === b.isDraggable && a.isResizable === b.isResizable && a.allowOverlap === b.allowOverlap && a.preventCollision === b.preventCollision && a.useCSSTransforms === b.useCSSTransforms && a.transformScale === b.transformScale && a.isDroppable === b.isDroppable && isEqualImpl(a.resizeHandles, b.resizeHandles) && isEqualImpl(a.resizeHandle, b.resizeHandle) && a.onLayoutChange === b.onLayoutChange && a.onDragStart === b.onDragStart && a.onDrag === b.onDrag && a.onDragStop === b.onDragStop && a.onResizeStart === b.onResizeStart && a.onResize === b.onResize && a.onResizeStop === b.onResizeStop && a.onDrop === b.onDrop && isEqualImpl(a.droppingItem, b.droppingItem) && isEqualImpl(a.innerRef, b.innerRef);\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.findOrGenerateResponsiveLayout = findOrGenerateResponsiveLayout;\nexports.getBreakpointFromWidth = getBreakpointFromWidth;\nexports.getColsFromBreakpoint = getColsFromBreakpoint;\nexports.sortBreakpoints = sortBreakpoints;\n\nvar _utils = require(\"./utils\");\n\n/**\n * Given a width, find the highest breakpoint that matches is valid for it (width > breakpoint).\n *\n * @param {Object} breakpoints Breakpoints object (e.g. {lg: 1200, md: 960, ...})\n * @param {Number} width Screen width.\n * @return {String} Highest breakpoint that is less than width.\n */\nfunction getBreakpointFromWidth(breakpoints\n/*: Breakpoints*/\n, width\n/*: number*/\n)\n/*: Breakpoint*/\n{\n var sorted = sortBreakpoints(breakpoints);\n var matching = sorted[0];\n\n for (var i = 1, len = sorted.length; i < len; i++) {\n var breakpointName = sorted[i];\n if (width > breakpoints[breakpointName]) matching = breakpointName;\n }\n\n return matching;\n}\n/**\n * Given a breakpoint, get the # of cols set for it.\n * @param {String} breakpoint Breakpoint name.\n * @param {Object} cols Map of breakpoints to cols.\n * @return {Number} Number of cols.\n */\n\n\nfunction getColsFromBreakpoint(breakpoint\n/*: Breakpoint*/\n, cols\n/*: Breakpoints*/\n)\n/*: number*/\n{\n if (!cols[breakpoint]) {\n throw new Error(\"ResponsiveReactGridLayout: `cols` entry for breakpoint \" + breakpoint + \" is missing!\");\n }\n\n return cols[breakpoint];\n}\n/**\n * Given existing layouts and a new breakpoint, find or generate a new layout.\n *\n * This finds the layout above the new one and generates from it, if it exists.\n *\n * @param {Object} layouts Existing layouts.\n * @param {Array} breakpoints All breakpoints.\n * @param {String} breakpoint New breakpoint.\n * @param {String} breakpoint Last breakpoint (for fallback).\n * @param {Number} cols Column count at new breakpoint.\n * @param {Boolean} verticalCompact Whether or not to compact the layout\n * vertically.\n * @return {Array} New layout.\n */\n\n\nfunction findOrGenerateResponsiveLayout(layouts\n/*: ResponsiveLayout*/\n, breakpoints\n/*: Breakpoints*/\n, breakpoint\n/*: Breakpoint*/\n, lastBreakpoint\n/*: Breakpoint*/\n, cols\n/*: number*/\n, compactType\n/*: CompactType*/\n)\n/*: Layout*/\n{\n // If it already exists, just return it.\n if (layouts[breakpoint]) return (0, _utils.cloneLayout)(layouts[breakpoint]); // Find or generate the next layout\n\n var layout = layouts[lastBreakpoint];\n var breakpointsSorted = sortBreakpoints(breakpoints);\n var breakpointsAbove = breakpointsSorted.slice(breakpointsSorted.indexOf(breakpoint));\n\n for (var i = 0, len = breakpointsAbove.length; i < len; i++) {\n var b = breakpointsAbove[i];\n\n if (layouts[b]) {\n layout = layouts[b];\n break;\n }\n }\n\n layout = (0, _utils.cloneLayout)(layout || []); // clone layout so we don't modify existing items\n\n return (0, _utils.compact)((0, _utils.correctBounds)(layout, {\n cols: cols\n }), compactType, cols);\n}\n/**\n * Given breakpoints, return an array of breakpoints sorted by width. This is usually\n * e.g. ['xxs', 'xs', 'sm', ...]\n *\n * @param {Object} breakpoints Key/value pair of breakpoint names to widths.\n * @return {Array} Sorted breakpoints.\n */\n\n\nfunction sortBreakpoints(breakpoints\n/*: Breakpoints*/\n)\n/*: Array*/\n{\n var keys\n /*: Array*/\n = Object.keys(breakpoints);\n return keys.sort(function (a, b) {\n return breakpoints[a] - breakpoints[b];\n });\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.bottom = bottom;\nexports.childrenEqual = childrenEqual;\nexports.cloneLayout = cloneLayout;\nexports.cloneLayoutItem = cloneLayoutItem;\nexports.collides = collides;\nexports.compact = compact;\nexports.compactItem = compactItem;\nexports.compactType = compactType;\nexports.correctBounds = correctBounds;\nexports.fastPositionEqual = fastPositionEqual;\nexports.fastRGLPropsEqual = void 0;\nexports.getAllCollisions = getAllCollisions;\nexports.getFirstCollision = getFirstCollision;\nexports.getLayoutItem = getLayoutItem;\nexports.getStatics = getStatics;\nexports.modifyLayout = modifyLayout;\nexports.moveElement = moveElement;\nexports.moveElementAwayFromCollision = moveElementAwayFromCollision;\nexports.noop = void 0;\nexports.perc = perc;\nexports.setTopLeft = setTopLeft;\nexports.setTransform = setTransform;\nexports.sortLayoutItems = sortLayoutItems;\nexports.sortLayoutItemsByColRow = sortLayoutItemsByColRow;\nexports.sortLayoutItemsByRowCol = sortLayoutItemsByRowCol;\nexports.synchronizeLayoutWithChildren = synchronizeLayoutWithChildren;\nexports.validateLayout = validateLayout;\nexports.withLayoutItem = withLayoutItem;\n\nvar _lodash = _interopRequireDefault(require(\"lodash.isequal\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar isProduction = process.env.NODE_ENV === \"production\";\nvar DEBUG = false;\n/**\n * Return the bottom coordinate of the layout.\n *\n * @param {Array} layout Layout array.\n * @return {Number} Bottom coordinate.\n */\n\nfunction bottom(layout\n/*: Layout*/\n)\n/*: number*/\n{\n var max = 0,\n bottomY;\n\n for (var i = 0, len = layout.length; i < len; i++) {\n bottomY = layout[i].y + layout[i].h;\n if (bottomY > max) max = bottomY;\n }\n\n return max;\n}\n\nfunction cloneLayout(layout\n/*: Layout*/\n)\n/*: Layout*/\n{\n var newLayout = Array(layout.length);\n\n for (var i = 0, len = layout.length; i < len; i++) {\n newLayout[i] = cloneLayoutItem(layout[i]);\n }\n\n return newLayout;\n} // Modify a layoutItem inside a layout. Returns a new Layout,\n// does not mutate. Carries over all other LayoutItems unmodified.\n\n\nfunction modifyLayout(layout\n/*: Layout*/\n, layoutItem\n/*: LayoutItem*/\n)\n/*: Layout*/\n{\n var newLayout = Array(layout.length);\n\n for (var i = 0, len = layout.length; i < len; i++) {\n if (layoutItem.i === layout[i].i) {\n newLayout[i] = layoutItem;\n } else {\n newLayout[i] = layout[i];\n }\n }\n\n return newLayout;\n} // Function to be called to modify a layout item.\n// Does defensive clones to ensure the layout is not modified.\n\n\nfunction withLayoutItem(layout\n/*: Layout*/\n, itemKey\n/*: string*/\n, cb\n/*: LayoutItem => LayoutItem*/\n)\n/*: [Layout, ?LayoutItem]*/\n{\n var item = getLayoutItem(layout, itemKey);\n if (!item) return [layout, null];\n item = cb(cloneLayoutItem(item)); // defensive clone then modify\n // FIXME could do this faster if we already knew the index\n\n layout = modifyLayout(layout, item);\n return [layout, item];\n} // Fast path to cloning, since this is monomorphic\n\n\nfunction cloneLayoutItem(layoutItem\n/*: LayoutItem*/\n)\n/*: LayoutItem*/\n{\n return {\n w: layoutItem.w,\n h: layoutItem.h,\n x: layoutItem.x,\n y: layoutItem.y,\n i: layoutItem.i,\n minW: layoutItem.minW,\n maxW: layoutItem.maxW,\n minH: layoutItem.minH,\n maxH: layoutItem.maxH,\n moved: Boolean(layoutItem.moved),\n static: Boolean(layoutItem.static),\n // These can be null/undefined\n isDraggable: layoutItem.isDraggable,\n isResizable: layoutItem.isResizable,\n resizeHandles: layoutItem.resizeHandles,\n isBounded: layoutItem.isBounded\n };\n}\n/**\n * Comparing React `children` is a bit difficult. This is a good way to compare them.\n * This will catch differences in keys, order, and length.\n */\n\n\nfunction childrenEqual(a\n/*: ReactChildren*/\n, b\n/*: ReactChildren*/\n)\n/*: boolean*/\n{\n return (0, _lodash.default)(_react.default.Children.map(a, function (c) {\n return c === null || c === void 0 ? void 0 : c.key;\n }), _react.default.Children.map(b, function (c) {\n return c === null || c === void 0 ? void 0 : c.key;\n }));\n}\n/**\n * See `fastRGLPropsEqual.js`.\n * We want this to run as fast as possible - it is called often - and to be\n * resilient to new props that we add. So rather than call lodash.isEqual,\n * which isn't suited to comparing props very well, we use this specialized\n * function in conjunction with preval to generate the fastest possible comparison\n * function, tuned for exactly our props.\n */\n\n/*:: type FastRGLPropsEqual = (Object, Object, Function) => boolean;*/\n\n\nvar fastRGLPropsEqual\n/*: FastRGLPropsEqual*/\n= require(\"./fastRGLPropsEqual\"); // Like the above, but a lot simpler.\n\n\nexports.fastRGLPropsEqual = fastRGLPropsEqual;\n\nfunction fastPositionEqual(a\n/*: Position*/\n, b\n/*: Position*/\n)\n/*: boolean*/\n{\n return a.left === b.left && a.top === b.top && a.width === b.width && a.height === b.height;\n}\n/**\n * Given two layoutitems, check if they collide.\n */\n\n\nfunction collides(l1\n/*: LayoutItem*/\n, l2\n/*: LayoutItem*/\n)\n/*: boolean*/\n{\n if (l1.i === l2.i) return false; // same element\n\n if (l1.x + l1.w <= l2.x) return false; // l1 is left of l2\n\n if (l1.x >= l2.x + l2.w) return false; // l1 is right of l2\n\n if (l1.y + l1.h <= l2.y) return false; // l1 is above l2\n\n if (l1.y >= l2.y + l2.h) return false; // l1 is below l2\n\n return true; // boxes overlap\n}\n/**\n * Given a layout, compact it. This involves going down each y coordinate and removing gaps\n * between items.\n *\n * Does not modify layout items (clones). Creates a new layout array.\n *\n * @param {Array} layout Layout.\n * @param {Boolean} verticalCompact Whether or not to compact the layout\n * vertically.\n * @return {Array} Compacted Layout.\n */\n\n\nfunction compact(layout\n/*: Layout*/\n, compactType\n/*: CompactType*/\n, cols\n/*: number*/\n)\n/*: Layout*/\n{\n // Statics go in the compareWith array right away so items flow around them.\n var compareWith = getStatics(layout); // We go through the items by row and column.\n\n var sorted = sortLayoutItems(layout, compactType); // Holding for new items.\n\n var out = Array(layout.length);\n\n for (var i = 0, len = sorted.length; i < len; i++) {\n var l = cloneLayoutItem(sorted[i]); // Don't move static elements\n\n if (!l.static) {\n l = compactItem(compareWith, l, compactType, cols, sorted); // Add to comparison array. We only collide with items before this one.\n // Statics are already in this array.\n\n compareWith.push(l);\n } // Add to output array to make sure they still come out in the right order.\n\n\n out[layout.indexOf(sorted[i])] = l; // Clear moved flag, if it exists.\n\n l.moved = false;\n }\n\n return out;\n}\n\nvar heightWidth = {\n x: \"w\",\n y: \"h\"\n};\n/**\n * Before moving item down, it will check if the movement will cause collisions and move those items down before.\n */\n\nfunction resolveCompactionCollision(layout\n/*: Layout*/\n, item\n/*: LayoutItem*/\n, moveToCoord\n/*: number*/\n, axis\n/*: \"x\" | \"y\"*/\n) {\n var sizeProp = heightWidth[axis];\n item[axis] += 1;\n var itemIndex = layout.map(function (layoutItem) {\n return layoutItem.i;\n }).indexOf(item.i); // Go through each item we collide with.\n\n for (var i = itemIndex + 1; i < layout.length; i++) {\n var otherItem = layout[i]; // Ignore static items\n\n if (otherItem.static) continue; // Optimization: we can break early if we know we're past this el\n // We can do this b/c it's a sorted layout\n\n if (otherItem.y > item.y + item.h) break;\n\n if (collides(item, otherItem)) {\n resolveCompactionCollision(layout, otherItem, moveToCoord + item[sizeProp], axis);\n }\n }\n\n item[axis] = moveToCoord;\n}\n/**\n * Compact an item in the layout.\n *\n * Modifies item.\n *\n */\n\n\nfunction compactItem(compareWith\n/*: Layout*/\n, l\n/*: LayoutItem*/\n, compactType\n/*: CompactType*/\n, cols\n/*: number*/\n, fullLayout\n/*: Layout*/\n)\n/*: LayoutItem*/\n{\n var compactV = compactType === \"vertical\";\n var compactH = compactType === \"horizontal\";\n\n if (compactV) {\n // Bottom 'y' possible is the bottom of the layout.\n // This allows you to do nice stuff like specify {y: Infinity}\n // This is here because the layout must be sorted in order to get the correct bottom `y`.\n l.y = Math.min(bottom(compareWith), l.y); // Move the element up as far as it can go without colliding.\n\n while (l.y > 0 && !getFirstCollision(compareWith, l)) {\n l.y--;\n }\n } else if (compactH) {\n // Move the element left as far as it can go without colliding.\n while (l.x > 0 && !getFirstCollision(compareWith, l)) {\n l.x--;\n }\n } // Move it down, and keep moving it down if it's colliding.\n\n\n var collides;\n\n while (collides = getFirstCollision(compareWith, l)) {\n if (compactH) {\n resolveCompactionCollision(fullLayout, l, collides.x + collides.w, \"x\");\n } else {\n resolveCompactionCollision(fullLayout, l, collides.y + collides.h, \"y\");\n } // Since we can't grow without bounds horizontally, if we've overflown, let's move it down and try again.\n\n\n if (compactH && l.x + l.w > cols) {\n l.x = cols - l.w;\n l.y++;\n }\n } // Ensure that there are no negative positions\n\n\n l.y = Math.max(l.y, 0);\n l.x = Math.max(l.x, 0);\n return l;\n}\n/**\n * Given a layout, make sure all elements fit within its bounds.\n *\n * Modifies layout items.\n *\n * @param {Array} layout Layout array.\n * @param {Number} bounds Number of columns.\n */\n\n\nfunction correctBounds(layout\n/*: Layout*/\n, bounds\n/*: { cols: number }*/\n)\n/*: Layout*/\n{\n var collidesWith = getStatics(layout);\n\n for (var i = 0, len = layout.length; i < len; i++) {\n var l = layout[i]; // Overflows right\n\n if (l.x + l.w > bounds.cols) l.x = bounds.cols - l.w; // Overflows left\n\n if (l.x < 0) {\n l.x = 0;\n l.w = bounds.cols;\n }\n\n if (!l.static) collidesWith.push(l);else {\n // If this is static and collides with other statics, we must move it down.\n // We have to do something nicer than just letting them overlap.\n while (getFirstCollision(collidesWith, l)) {\n l.y++;\n }\n }\n }\n\n return layout;\n}\n/**\n * Get a layout item by ID. Used so we can override later on if necessary.\n *\n * @param {Array} layout Layout array.\n * @param {String} id ID\n * @return {LayoutItem} Item at ID.\n */\n\n\nfunction getLayoutItem(layout\n/*: Layout*/\n, id\n/*: string*/\n)\n/*: ?LayoutItem*/\n{\n for (var i = 0, len = layout.length; i < len; i++) {\n if (layout[i].i === id) return layout[i];\n }\n}\n/**\n * Returns the first item this layout collides with.\n * It doesn't appear to matter which order we approach this from, although\n * perhaps that is the wrong thing to do.\n *\n * @param {Object} layoutItem Layout item.\n * @return {Object|undefined} A colliding layout item, or undefined.\n */\n\n\nfunction getFirstCollision(layout\n/*: Layout*/\n, layoutItem\n/*: LayoutItem*/\n)\n/*: ?LayoutItem*/\n{\n for (var i = 0, len = layout.length; i < len; i++) {\n if (collides(layout[i], layoutItem)) return layout[i];\n }\n}\n\nfunction getAllCollisions(layout\n/*: Layout*/\n, layoutItem\n/*: LayoutItem*/\n)\n/*: Array*/\n{\n return layout.filter(function (l) {\n return collides(l, layoutItem);\n });\n}\n/**\n * Get all static elements.\n * @param {Array} layout Array of layout objects.\n * @return {Array} Array of static layout items..\n */\n\n\nfunction getStatics(layout\n/*: Layout*/\n)\n/*: Array*/\n{\n return layout.filter(function (l) {\n return l.static;\n });\n}\n/**\n * Move an element. Responsible for doing cascading movements of other elements.\n *\n * Modifies layout items.\n *\n * @param {Array} layout Full layout to modify.\n * @param {LayoutItem} l element to move.\n * @param {Number} [x] X position in grid units.\n * @param {Number} [y] Y position in grid units.\n */\n\n\nfunction moveElement(layout\n/*: Layout*/\n, l\n/*: LayoutItem*/\n, x\n/*: ?number*/\n, y\n/*: ?number*/\n, isUserAction\n/*: ?boolean*/\n, preventCollision\n/*: ?boolean*/\n, compactType\n/*: CompactType*/\n, cols\n/*: number*/\n, allowOverlap\n/*: ?boolean*/\n)\n/*: Layout*/\n{\n // If this is static and not explicitly enabled as draggable,\n // no move is possible, so we can short-circuit this immediately.\n if (l.static && l.isDraggable !== true) return layout; // Short-circuit if nothing to do.\n\n if (l.y === y && l.x === x) return layout;\n log(\"Moving element \".concat(l.i, \" to [\").concat(String(x), \",\").concat(String(y), \"] from [\").concat(l.x, \",\").concat(l.y, \"]\"));\n var oldX = l.x;\n var oldY = l.y; // This is quite a bit faster than extending the object\n\n if (typeof x === \"number\") l.x = x;\n if (typeof y === \"number\") l.y = y;\n l.moved = true; // If this collides with anything, move it.\n // When doing this comparison, we have to sort the items we compare with\n // to ensure, in the case of multiple collisions, that we're getting the\n // nearest collision.\n\n var sorted = sortLayoutItems(layout, compactType);\n var movingUp = compactType === \"vertical\" && typeof y === \"number\" ? oldY >= y : compactType === \"horizontal\" && typeof x === \"number\" ? oldX >= x : false; // $FlowIgnore acceptable modification of read-only array as it was recently cloned\n\n if (movingUp) sorted = sorted.reverse();\n var collisions = getAllCollisions(sorted, l);\n var hasCollisions = collisions.length > 0; // We may have collisions. We can short-circuit if we've turned off collisions or\n // allowed overlap.\n\n if (hasCollisions && allowOverlap) {\n // Easy, we don't need to resolve collisions. But we *did* change the layout,\n // so clone it on the way out.\n return cloneLayout(layout);\n } else if (hasCollisions && preventCollision) {\n // If we are preventing collision but not allowing overlap, we need to\n // revert the position of this element so it goes to where it came from, rather\n // than the user's desired location.\n log(\"Collision prevented on \".concat(l.i, \", reverting.\"));\n l.x = oldX;\n l.y = oldY;\n l.moved = false;\n return layout; // did not change so don't clone\n } // Move each item that collides away from this element.\n\n\n for (var i = 0, len = collisions.length; i < len; i++) {\n var collision = collisions[i];\n log(\"Resolving collision between \".concat(l.i, \" at [\").concat(l.x, \",\").concat(l.y, \"] and \").concat(collision.i, \" at [\").concat(collision.x, \",\").concat(collision.y, \"]\")); // Short circuit so we can't infinite loop\n\n if (collision.moved) continue; // Don't move static items - we have to move *this* element away\n\n if (collision.static) {\n layout = moveElementAwayFromCollision(layout, collision, l, isUserAction, compactType, cols);\n } else {\n layout = moveElementAwayFromCollision(layout, l, collision, isUserAction, compactType, cols);\n }\n }\n\n return layout;\n}\n/**\n * This is where the magic needs to happen - given a collision, move an element away from the collision.\n * We attempt to move it up if there's room, otherwise it goes below.\n *\n * @param {Array} layout Full layout to modify.\n * @param {LayoutItem} collidesWith Layout item we're colliding with.\n * @param {LayoutItem} itemToMove Layout item we're moving.\n */\n\n\nfunction moveElementAwayFromCollision(layout\n/*: Layout*/\n, collidesWith\n/*: LayoutItem*/\n, itemToMove\n/*: LayoutItem*/\n, isUserAction\n/*: ?boolean*/\n, compactType\n/*: CompactType*/\n, cols\n/*: number*/\n)\n/*: Layout*/\n{\n var compactH = compactType === \"horizontal\"; // Compact vertically if not set to horizontal\n\n var compactV = compactType !== \"horizontal\";\n var preventCollision = collidesWith.static; // we're already colliding (not for static items)\n // If there is enough space above the collision to put this element, move it there.\n // We only do this on the main collision as this can get funky in cascades and cause\n // unwanted swapping behavior.\n\n if (isUserAction) {\n // Reset isUserAction flag because we're not in the main collision anymore.\n isUserAction = false; // Make a mock item so we don't modify the item here, only modify in moveElement.\n\n var fakeItem\n /*: LayoutItem*/\n = {\n x: compactH ? Math.max(collidesWith.x - itemToMove.w, 0) : itemToMove.x,\n y: compactV ? Math.max(collidesWith.y - itemToMove.h, 0) : itemToMove.y,\n w: itemToMove.w,\n h: itemToMove.h,\n i: \"-1\"\n }; // No collision? If so, we can go up there; otherwise, we'll end up moving down as normal\n\n if (!getFirstCollision(layout, fakeItem)) {\n log(\"Doing reverse collision on \".concat(itemToMove.i, \" up to [\").concat(fakeItem.x, \",\").concat(fakeItem.y, \"].\"));\n return moveElement(layout, itemToMove, compactH ? fakeItem.x : undefined, compactV ? fakeItem.y : undefined, isUserAction, preventCollision, compactType, cols);\n }\n }\n\n return moveElement(layout, itemToMove, compactH ? itemToMove.x + 1 : undefined, compactV ? itemToMove.y + 1 : undefined, isUserAction, preventCollision, compactType, cols);\n}\n/**\n * Helper to convert a number to a percentage string.\n *\n * @param {Number} num Any number\n * @return {String} That number as a percentage.\n */\n\n\nfunction perc(num\n/*: number*/\n)\n/*: string*/\n{\n return num * 100 + \"%\";\n}\n\nfunction setTransform(_ref)\n/*: Object*/\n{\n var top = _ref.top,\n left = _ref.left,\n width = _ref.width,\n height = _ref.height;\n // Replace unitless items with px\n var translate = \"translate(\".concat(left, \"px,\").concat(top, \"px)\");\n return {\n transform: translate,\n WebkitTransform: translate,\n MozTransform: translate,\n msTransform: translate,\n OTransform: translate,\n width: \"\".concat(width, \"px\"),\n height: \"\".concat(height, \"px\"),\n position: \"absolute\"\n };\n}\n\nfunction setTopLeft(_ref2)\n/*: Object*/\n{\n var top = _ref2.top,\n left = _ref2.left,\n width = _ref2.width,\n height = _ref2.height;\n return {\n top: \"\".concat(top, \"px\"),\n left: \"\".concat(left, \"px\"),\n width: \"\".concat(width, \"px\"),\n height: \"\".concat(height, \"px\"),\n position: \"absolute\"\n };\n}\n/**\n * Get layout items sorted from top left to right and down.\n *\n * @return {Array} Array of layout objects.\n * @return {Array} Layout, sorted static items first.\n */\n\n\nfunction sortLayoutItems(layout\n/*: Layout*/\n, compactType\n/*: CompactType*/\n)\n/*: Layout*/\n{\n if (compactType === \"horizontal\") return sortLayoutItemsByColRow(layout);\n if (compactType === \"vertical\") return sortLayoutItemsByRowCol(layout);else return layout;\n}\n/**\n * Sort layout items by row ascending and column ascending.\n *\n * Does not modify Layout.\n */\n\n\nfunction sortLayoutItemsByRowCol(layout\n/*: Layout*/\n)\n/*: Layout*/\n{\n // Slice to clone array as sort modifies\n return layout.slice(0).sort(function (a, b) {\n if (a.y > b.y || a.y === b.y && a.x > b.x) {\n return 1;\n } else if (a.y === b.y && a.x === b.x) {\n // Without this, we can get different sort results in IE vs. Chrome/FF\n return 0;\n }\n\n return -1;\n });\n}\n/**\n * Sort layout items by column ascending then row ascending.\n *\n * Does not modify Layout.\n */\n\n\nfunction sortLayoutItemsByColRow(layout\n/*: Layout*/\n)\n/*: Layout*/\n{\n return layout.slice(0).sort(function (a, b) {\n if (a.x > b.x || a.x === b.x && a.y > b.y) {\n return 1;\n }\n\n return -1;\n });\n}\n/**\n * Generate a layout using the initialLayout and children as a template.\n * Missing entries will be added, extraneous ones will be truncated.\n *\n * Does not modify initialLayout.\n *\n * @param {Array} initialLayout Layout passed in through props.\n * @param {String} breakpoint Current responsive breakpoint.\n * @param {?String} compact Compaction option.\n * @return {Array} Working layout.\n */\n\n\nfunction synchronizeLayoutWithChildren(initialLayout\n/*: Layout*/\n, children\n/*: ReactChildren*/\n, cols\n/*: number*/\n, compactType\n/*: CompactType*/\n, allowOverlap\n/*: ?boolean*/\n)\n/*: Layout*/\n{\n initialLayout = initialLayout || []; // Generate one layout item per child.\n\n var layout\n /*: LayoutItem[]*/\n = [];\n\n _react.default.Children.forEach(children, function (child\n /*: ReactElement*/\n ) {\n // Child may not exist\n if ((child === null || child === void 0 ? void 0 : child.key) == null) return; // Don't overwrite if it already exists.\n\n var exists = getLayoutItem(initialLayout, String(child.key));\n\n if (exists) {\n layout.push(cloneLayoutItem(exists));\n } else {\n if (!isProduction && child.props._grid) {\n console.warn(\"`_grid` properties on children have been deprecated as of React 15.2. \" + \"Please use `data-grid` or add your properties directly to the `layout`.\");\n }\n\n var g = child.props[\"data-grid\"] || child.props._grid; // Hey, this item has a data-grid property, use it.\n\n if (g) {\n if (!isProduction) {\n validateLayout([g], \"ReactGridLayout.children\");\n } // FIXME clone not really necessary here\n\n\n layout.push(cloneLayoutItem(_objectSpread(_objectSpread({}, g), {}, {\n i: child.key\n })));\n } else {\n // Nothing provided: ensure this is added to the bottom\n // FIXME clone not really necessary here\n layout.push(cloneLayoutItem({\n w: 1,\n h: 1,\n x: 0,\n y: bottom(layout),\n i: String(child.key)\n }));\n }\n }\n }); // Correct the layout.\n\n\n var correctedLayout = correctBounds(layout, {\n cols: cols\n });\n return allowOverlap ? correctedLayout : compact(correctedLayout, compactType, cols);\n}\n/**\n * Validate a layout. Throws errors.\n *\n * @param {Array} layout Array of layout items.\n * @param {String} [contextName] Context name for errors.\n * @throw {Error} Validation error.\n */\n\n\nfunction validateLayout(layout\n/*: Layout*/\n)\n/*: void*/\n{\n var contextName\n /*: string*/\n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"Layout\";\n var subProps = [\"x\", \"y\", \"w\", \"h\"];\n if (!Array.isArray(layout)) throw new Error(contextName + \" must be an array!\");\n\n for (var i = 0, len = layout.length; i < len; i++) {\n var item = layout[i];\n\n for (var j = 0; j < subProps.length; j++) {\n if (typeof item[subProps[j]] !== \"number\") {\n throw new Error(\"ReactGridLayout: \" + contextName + \"[\" + i + \"].\" + subProps[j] + \" must be a number!\");\n }\n }\n }\n} // Legacy support for verticalCompact: false\n\n\nfunction compactType(props\n/*: ?{ verticalCompact: boolean, compactType: CompactType }*/\n)\n/*: CompactType*/\n{\n var _ref3 = props || {},\n verticalCompact = _ref3.verticalCompact,\n compactType = _ref3.compactType;\n\n return verticalCompact === false ? null : compactType;\n}\n\nfunction log() {\n var _console;\n\n if (!DEBUG) return; // eslint-disable-next-line no-console\n\n (_console = console).log.apply(_console, arguments);\n}\n\nvar noop = function noop() {};\n\nexports.noop = noop;","module.exports = require(\"./build/ReactGridLayout\").default;\nmodule.exports.utils = require(\"./build/utils\");\nmodule.exports.Responsive =\n require(\"./build/ResponsiveReactGridLayout\").default;\nmodule.exports.Responsive.utils = require(\"./build/responsiveUtils\");\nmodule.exports.WidthProvider =\n require(\"./build/components/WidthProvider\").default;\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t= 0) continue; target[key] = source[key]; } return target; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n// The base component.\n// This component does not have state and relies on the parent to set its props based on callback data.\nvar Resizable = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Resizable, _React$Component);\n function Resizable() {\n var _this;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.handleRefs = {};\n _this.lastHandleRect = null;\n _this.slack = null;\n return _this;\n }\n var _proto = Resizable.prototype;\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.resetData();\n };\n _proto.resetData = function resetData() {\n this.lastHandleRect = this.slack = null;\n }\n\n // Clamp width and height within provided constraints\n ;\n _proto.runConstraints = function runConstraints(width, height) {\n var _this$props = this.props,\n minConstraints = _this$props.minConstraints,\n maxConstraints = _this$props.maxConstraints,\n lockAspectRatio = _this$props.lockAspectRatio;\n // short circuit\n if (!minConstraints && !maxConstraints && !lockAspectRatio) return [width, height];\n\n // If constraining to min and max, we need to also fit width and height to aspect ratio.\n if (lockAspectRatio) {\n var ratio = this.props.width / this.props.height;\n var deltaW = width - this.props.width;\n var deltaH = height - this.props.height;\n\n // Find which coordinate was greater and should push the other toward it.\n // E.g.:\n // ratio = 1, deltaW = 10, deltaH = 5, deltaH should become 10.\n // ratio = 2, deltaW = 10, deltaH = 6, deltaW should become 12.\n if (Math.abs(deltaW) > Math.abs(deltaH * ratio)) {\n height = width / ratio;\n } else {\n width = height * ratio;\n }\n }\n var oldW = width,\n oldH = height;\n\n // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n var _ref = this.slack || [0, 0],\n slackW = _ref[0],\n slackH = _ref[1];\n width += slackW;\n height += slackH;\n if (minConstraints) {\n width = Math.max(minConstraints[0], width);\n height = Math.max(minConstraints[1], height);\n }\n if (maxConstraints) {\n width = Math.min(maxConstraints[0], width);\n height = Math.min(maxConstraints[1], height);\n }\n\n // If the width or height changed, we must have introduced some slack. Record it for the next iteration.\n this.slack = [slackW + (oldW - width), slackH + (oldH - height)];\n return [width, height];\n }\n\n /**\n * Wrapper around drag events to provide more useful data.\n *\n * @param {String} handlerName Handler name to wrap.\n * @return {Function} Handler function.\n */;\n _proto.resizeHandler = function resizeHandler(handlerName, axis) {\n var _this2 = this;\n return function (e, _ref2) {\n var node = _ref2.node,\n deltaX = _ref2.deltaX,\n deltaY = _ref2.deltaY;\n // Reset data in case it was left over somehow (should not be possible)\n if (handlerName === 'onResizeStart') _this2.resetData();\n\n // Axis restrictions\n var canDragX = (_this2.props.axis === 'both' || _this2.props.axis === 'x') && axis !== 'n' && axis !== 's';\n var canDragY = (_this2.props.axis === 'both' || _this2.props.axis === 'y') && axis !== 'e' && axis !== 'w';\n // No dragging possible.\n if (!canDragX && !canDragY) return;\n\n // Decompose axis for later use\n var axisV = axis[0];\n var axisH = axis[axis.length - 1]; // intentionally not axis[1], so that this catches axis === 'w' for example\n\n // Track the element being dragged to account for changes in position.\n // If a handle's position is changed between callbacks, we need to factor this in to the next callback.\n // Failure to do so will cause the element to \"skip\" when resized upwards or leftwards.\n var handleRect = node.getBoundingClientRect();\n if (_this2.lastHandleRect != null) {\n // If the handle has repositioned on either axis since last render,\n // we need to increase our callback values by this much.\n // Only checking 'n', 'w' since resizing by 's', 'w' won't affect the overall position on page,\n if (axisH === 'w') {\n var deltaLeftSinceLast = handleRect.left - _this2.lastHandleRect.left;\n deltaX += deltaLeftSinceLast;\n }\n if (axisV === 'n') {\n var deltaTopSinceLast = handleRect.top - _this2.lastHandleRect.top;\n deltaY += deltaTopSinceLast;\n }\n }\n // Storage of last rect so we know how much it has really moved.\n _this2.lastHandleRect = handleRect;\n\n // Reverse delta if using top or left drag handles.\n if (axisH === 'w') deltaX = -deltaX;\n if (axisV === 'n') deltaY = -deltaY;\n\n // Update w/h by the deltas. Also factor in transformScale.\n var width = _this2.props.width + (canDragX ? deltaX / _this2.props.transformScale : 0);\n var height = _this2.props.height + (canDragY ? deltaY / _this2.props.transformScale : 0);\n\n // Run user-provided constraints.\n var _this2$runConstraints = _this2.runConstraints(width, height);\n width = _this2$runConstraints[0];\n height = _this2$runConstraints[1];\n var dimensionsChanged = width !== _this2.props.width || height !== _this2.props.height;\n\n // Call user-supplied callback if present.\n var cb = typeof _this2.props[handlerName] === 'function' ? _this2.props[handlerName] : null;\n // Don't call 'onResize' if dimensions haven't changed.\n var shouldSkipCb = handlerName === 'onResize' && !dimensionsChanged;\n if (cb && !shouldSkipCb) {\n e.persist == null ? void 0 : e.persist();\n cb(e, {\n node: node,\n size: {\n width: width,\n height: height\n },\n handle: axis\n });\n }\n\n // Reset internal data\n if (handlerName === 'onResizeStop') _this2.resetData();\n };\n }\n\n // Render a resize handle given an axis & DOM ref. Ref *must* be attached for\n // the underlying draggable library to work properly.\n ;\n _proto.renderResizeHandle = function renderResizeHandle(handleAxis, ref) {\n var handle = this.props.handle;\n // No handle provided, make the default\n if (!handle) {\n return /*#__PURE__*/React.createElement(\"span\", {\n className: \"react-resizable-handle react-resizable-handle-\" + handleAxis,\n ref: ref\n });\n }\n // Handle is a function, such as:\n // `handle={(handleAxis) => }`\n if (typeof handle === 'function') {\n return handle(handleAxis, ref);\n }\n // Handle is a React component (composite or DOM).\n var isDOMElement = typeof handle.type === 'string';\n var props = _objectSpread({\n ref: ref\n }, isDOMElement ? {} : {\n handleAxis: handleAxis\n });\n return /*#__PURE__*/React.cloneElement(handle, props);\n };\n _proto.render = function render() {\n var _this3 = this;\n // Pass along only props not meant for the ``.`\n // eslint-disable-next-line no-unused-vars\n var _this$props2 = this.props,\n children = _this$props2.children,\n className = _this$props2.className,\n draggableOpts = _this$props2.draggableOpts,\n width = _this$props2.width,\n height = _this$props2.height,\n handle = _this$props2.handle,\n handleSize = _this$props2.handleSize,\n lockAspectRatio = _this$props2.lockAspectRatio,\n axis = _this$props2.axis,\n minConstraints = _this$props2.minConstraints,\n maxConstraints = _this$props2.maxConstraints,\n onResize = _this$props2.onResize,\n onResizeStop = _this$props2.onResizeStop,\n onResizeStart = _this$props2.onResizeStart,\n resizeHandles = _this$props2.resizeHandles,\n transformScale = _this$props2.transformScale,\n p = _objectWithoutPropertiesLoose(_this$props2, _excluded);\n\n // What we're doing here is getting the child of this element, and cloning it with this element's props.\n // We are then defining its children as:\n // 1. Its original children (resizable's child's children), and\n // 2. One or more draggable handles.\n return (0, _utils.cloneElement)(children, _objectSpread(_objectSpread({}, p), {}, {\n className: (className ? className + \" \" : '') + \"react-resizable\",\n children: [].concat(children.props.children, resizeHandles.map(function (handleAxis) {\n var _this3$handleRefs$han;\n // Create a ref to the handle so that `` doesn't have to use ReactDOM.findDOMNode().\n var ref = (_this3$handleRefs$han = _this3.handleRefs[handleAxis]) != null ? _this3$handleRefs$han : _this3.handleRefs[handleAxis] = /*#__PURE__*/React.createRef();\n return /*#__PURE__*/React.createElement(_reactDraggable.DraggableCore, _extends({}, draggableOpts, {\n nodeRef: ref,\n key: \"resizableHandle-\" + handleAxis,\n onStop: _this3.resizeHandler('onResizeStop', handleAxis),\n onStart: _this3.resizeHandler('onResizeStart', handleAxis),\n onDrag: _this3.resizeHandler('onResize', handleAxis)\n }), _this3.renderResizeHandle(handleAxis, ref));\n }))\n }));\n };\n return Resizable;\n}(React.Component);\nexports.default = Resizable;\nResizable.propTypes = _propTypes.resizableProps;\nResizable.defaultProps = {\n axis: 'both',\n handleSize: [20, 20],\n lockAspectRatio: false,\n minConstraints: [20, 20],\n maxConstraints: [Infinity, Infinity],\n resizeHandles: ['se'],\n transformScale: 1\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nvar _Resizable = _interopRequireDefault(require(\"./Resizable\"));\nvar _propTypes2 = require(\"./propTypes\");\nvar _excluded = [\"handle\", \"handleSize\", \"onResize\", \"onResizeStart\", \"onResizeStop\", \"draggableOpts\", \"minConstraints\", \"maxConstraints\", \"lockAspectRatio\", \"axis\", \"width\", \"height\", \"resizeHandles\", \"style\", \"transformScale\"];\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar ResizableBox = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ResizableBox, _React$Component);\n function ResizableBox() {\n var _this;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.state = {\n width: _this.props.width,\n height: _this.props.height,\n propsWidth: _this.props.width,\n propsHeight: _this.props.height\n };\n _this.onResize = function (e, data) {\n var size = data.size;\n if (_this.props.onResize) {\n e.persist == null ? void 0 : e.persist();\n _this.setState(size, function () {\n return _this.props.onResize && _this.props.onResize(e, data);\n });\n } else {\n _this.setState(size);\n }\n };\n return _this;\n }\n ResizableBox.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {\n // If parent changes height/width, set that in our state.\n if (state.propsWidth !== props.width || state.propsHeight !== props.height) {\n return {\n width: props.width,\n height: props.height,\n propsWidth: props.width,\n propsHeight: props.height\n };\n }\n return null;\n };\n var _proto = ResizableBox.prototype;\n _proto.render = function render() {\n // Basic wrapper around a Resizable instance.\n // If you use Resizable directly, you are responsible for updating the child component\n // with a new width and height.\n var _this$props = this.props,\n handle = _this$props.handle,\n handleSize = _this$props.handleSize,\n onResize = _this$props.onResize,\n onResizeStart = _this$props.onResizeStart,\n onResizeStop = _this$props.onResizeStop,\n draggableOpts = _this$props.draggableOpts,\n minConstraints = _this$props.minConstraints,\n maxConstraints = _this$props.maxConstraints,\n lockAspectRatio = _this$props.lockAspectRatio,\n axis = _this$props.axis,\n width = _this$props.width,\n height = _this$props.height,\n resizeHandles = _this$props.resizeHandles,\n style = _this$props.style,\n transformScale = _this$props.transformScale,\n props = _objectWithoutPropertiesLoose(_this$props, _excluded);\n return /*#__PURE__*/React.createElement(_Resizable.default, {\n axis: axis,\n draggableOpts: draggableOpts,\n handle: handle,\n handleSize: handleSize,\n height: this.state.height,\n lockAspectRatio: lockAspectRatio,\n maxConstraints: maxConstraints,\n minConstraints: minConstraints,\n onResizeStart: onResizeStart,\n onResize: this.onResize,\n onResizeStop: onResizeStop,\n resizeHandles: resizeHandles,\n transformScale: transformScale,\n width: this.state.width\n }, /*#__PURE__*/React.createElement(\"div\", _extends({}, props, {\n style: _objectSpread(_objectSpread({}, style), {}, {\n width: this.state.width + 'px',\n height: this.state.height + 'px'\n })\n })));\n };\n return ResizableBox;\n}(React.Component);\nexports.default = ResizableBox;\n// PropTypes are identical to , except that children are not strictly required to be present.\nResizableBox.propTypes = _objectSpread(_objectSpread({}, _propTypes2.resizableProps), {}, {\n children: _propTypes.default.element\n});","\"use strict\";\n\nexports.__esModule = true;\nexports.resizableProps = void 0;\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nvar _reactDraggable = require(\"react-draggable\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar resizableProps = {\n /*\n * Restricts resizing to a particular axis (default: 'both')\n * 'both' - allows resizing by width or height\n * 'x' - only allows the width to be changed\n * 'y' - only allows the height to be changed\n * 'none' - disables resizing altogether\n * */\n axis: _propTypes.default.oneOf(['both', 'x', 'y', 'none']),\n className: _propTypes.default.string,\n /*\n * Require that one and only one child be present.\n * */\n children: _propTypes.default.element.isRequired,\n /*\n * These will be passed wholesale to react-draggable's DraggableCore\n * */\n draggableOpts: _propTypes.default.shape({\n allowAnyClick: _propTypes.default.bool,\n cancel: _propTypes.default.string,\n children: _propTypes.default.node,\n disabled: _propTypes.default.bool,\n enableUserSelectHack: _propTypes.default.bool,\n offsetParent: _propTypes.default.node,\n grid: _propTypes.default.arrayOf(_propTypes.default.number),\n handle: _propTypes.default.string,\n nodeRef: _propTypes.default.object,\n onStart: _propTypes.default.func,\n onDrag: _propTypes.default.func,\n onStop: _propTypes.default.func,\n onMouseDown: _propTypes.default.func,\n scale: _propTypes.default.number\n }),\n /*\n * Initial height\n * */\n height: function height() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var props = args[0];\n // Required if resizing height or both\n if (props.axis === 'both' || props.axis === 'y') {\n var _PropTypes$number;\n return (_PropTypes$number = _propTypes.default.number).isRequired.apply(_PropTypes$number, args);\n }\n return _propTypes.default.number.apply(_propTypes.default, args);\n },\n /*\n * Customize cursor resize handle\n * */\n handle: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),\n /*\n * If you change this, be sure to update your css\n * */\n handleSize: _propTypes.default.arrayOf(_propTypes.default.number),\n lockAspectRatio: _propTypes.default.bool,\n /*\n * Max X & Y measure\n * */\n maxConstraints: _propTypes.default.arrayOf(_propTypes.default.number),\n /*\n * Min X & Y measure\n * */\n minConstraints: _propTypes.default.arrayOf(_propTypes.default.number),\n /*\n * Called on stop resize event\n * */\n onResizeStop: _propTypes.default.func,\n /*\n * Called on start resize event\n * */\n onResizeStart: _propTypes.default.func,\n /*\n * Called on resize event\n * */\n onResize: _propTypes.default.func,\n /*\n * Defines which resize handles should be rendered (default: 'se')\n * 's' - South handle (bottom-center)\n * 'w' - West handle (left-center)\n * 'e' - East handle (right-center)\n * 'n' - North handle (top-center)\n * 'sw' - Southwest handle (bottom-left)\n * 'nw' - Northwest handle (top-left)\n * 'se' - Southeast handle (bottom-right)\n * 'ne' - Northeast handle (top-center)\n * */\n resizeHandles: _propTypes.default.arrayOf(_propTypes.default.oneOf(['s', 'w', 'e', 'n', 'sw', 'nw', 'se', 'ne'])),\n /*\n * If `transform: scale(n)` is set on the parent, this should be set to `n`.\n * */\n transformScale: _propTypes.default.number,\n /*\n * Initial width\n */\n width: function width() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n var props = args[0];\n // Required if resizing width or both\n if (props.axis === 'both' || props.axis === 'x') {\n var _PropTypes$number2;\n return (_PropTypes$number2 = _propTypes.default.number).isRequired.apply(_PropTypes$number2, args);\n }\n return _propTypes.default.number.apply(_propTypes.default, args);\n }\n};\nexports.resizableProps = resizableProps;","\"use strict\";\n\nexports.__esModule = true;\nexports.cloneElement = cloneElement;\nvar _react = _interopRequireDefault(require(\"react\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n// React.addons.cloneWithProps look-alike that merges style & className.\nfunction cloneElement(element, props) {\n if (props.style && element.props.style) {\n props.style = _objectSpread(_objectSpread({}, element.props.style), props.style);\n }\n if (props.className && element.props.className) {\n props.className = element.props.className + \" \" + props.className;\n }\n return /*#__PURE__*/_react.default.cloneElement(element, props);\n}","'use strict';\nmodule.exports = function() {\n throw new Error(\"Don't instantiate Resizable directly! Use require('react-resizable').Resizable\");\n};\n\nmodule.exports.Resizable = require('./build/Resizable').default;\nmodule.exports.ResizableBox = require('./build/ResizableBox').default;\n","\nvar content = require(\"!!../../css-loader/dist/cjs.js!./styles.css\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../css-loader/dist/cjs.js!./styles.css\", function() {\n\t\tvar newContent = require(\"!!../../css-loader/dist/cjs.js!./styles.css\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","\nvar content = require(\"!!../../css-loader/dist/cjs.js!./styles.css\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../css-loader/dist/cjs.js!./styles.css\", function() {\n\t\tvar newContent = require(\"!!../../css-loader/dist/cjs.js!./styles.css\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","\nvar content = require(\"!!../../../node_modules/css-loader/dist/cjs.js!./style.css\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../node_modules/css-loader/dist/cjs.js!./style.css\", function() {\n\t\tvar newContent = require(\"!!../../../node_modules/css-loader/dist/cjs.js!./style.css\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getTarget = function (target, parent) {\n if (parent){\n return parent.querySelector(target);\n }\n return document.querySelector(target);\n};\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(target, parent) {\n // If passing function in options, then use it for resolve \"head\" element.\n // Useful for Shadow Root style i.e\n // {\n // insertInto: function () { return document.querySelector(\"#foo\").shadowRoot }\n // }\n if (typeof target === 'function') {\n return target();\n }\n if (typeof memo[target] === \"undefined\") {\n\t\t\tvar styleTarget = getTarget.call(this, target, parent);\n\t\t\t// Special case to return head of iframe instead of iframe itself\n\t\t\tif (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n\t\t\t\ttry {\n\t\t\t\t\t// This will throw an exception if access to iframe is blocked\n\t\t\t\t\t// due to cross-origin restrictions\n\t\t\t\t\tstyleTarget = styleTarget.contentDocument.head;\n\t\t\t\t} catch(e) {\n\t\t\t\t\tstyleTarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmemo[target] = styleTarget;\n\t\t}\n\t\treturn memo[target]\n\t};\n})();\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = require(\"./urls\");\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif (typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === \"object\" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of