From 9aa465e46e1d4d20c9fb27df0f003ed98abce6d2 Mon Sep 17 00:00:00 2001 From: Samuel Reed Date: Mon, 20 Jul 2020 13:10:20 -0400 Subject: [PATCH] release 1.0.0 --- dist/react-grid-layout.min.js | 4 ++-- dist/react-grid-layout.min.js.map | 2 +- package.json | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/react-grid-layout.min.js b/dist/react-grid-layout.min.js index f8f5d75a5..518b7e3b1 100644 --- a/dist/react-grid-layout.min.js +++ b/dist/react-grid-layout.min.js @@ -1,4 +1,4 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],e):"object"==typeof exports?exports.ReactGridLayout=e(require("react"),require("react-dom")):t.ReactGridLayout=e(t.React,t.ReactDOM)}(window,(function(t,e){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=11)}([function(t,e,n){t.exports=n(15)()},function(t,e,n){"use strict";n.r(e),n.d(e,"bottom",(function(){return c})),n.d(e,"cloneLayout",(function(){return l})),n.d(e,"cloneLayoutItem",(function(){return p})),n.d(e,"childrenEqual",(function(){return f})),n.d(e,"fastRGLPropsEqual",(function(){return h})),n.d(e,"fastPositionEqual",(function(){return d})),n.d(e,"collides",(function(){return y})),n.d(e,"compact",(function(){return g})),n.d(e,"compactItem",(function(){return v})),n.d(e,"correctBounds",(function(){return w})),n.d(e,"getLayoutItem",(function(){return O})),n.d(e,"getFirstCollision",(function(){return S})),n.d(e,"getAllCollisions",(function(){return j})),n.d(e,"getStatics",(function(){return x})),n.d(e,"moveElement",(function(){return D})),n.d(e,"moveElementAwayFromCollision",(function(){return P})),n.d(e,"perc",(function(){return _})),n.d(e,"setTransform",(function(){return R})),n.d(e,"setTopLeft",(function(){return z})),n.d(e,"sortLayoutItems",(function(){return k})),n.d(e,"sortLayoutItemsByRowCol",(function(){return C})),n.d(e,"sortLayoutItemsByColRow",(function(){return E})),n.d(e,"synchronizeLayoutWithChildren",(function(){return T})),n.d(e,"validateLayout",(function(){return M})),n.d(e,"compactType",(function(){return L})),n.d(e,"autoBindHandlers",(function(){return N})),n.d(e,"noop",(function(){return W}));var r=n(3),o=n.n(r),a=n(2),i=n.n(a);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t){for(var e,n=0,r=0,o=t.length;rn&&(n=e);return n}function l(t){for(var e=Array(t.length),n=0,r=t.length;n=e.x+e.w)&&(!(t.y+t.h<=e.y)&&!(t.y>=e.y+e.h))))}function g(t,e,n){for(var r=x(t),o=k(t,e),a=Array(t.length),i=0,s=o.length;ie.y+e.h)break;y(e,i)&&m(t,i,n+e[o],r)}}e[r]=n}function v(t,e,n,r,o){var a,i="horizontal"===n;if("vertical"===n)for(e.y=Math.min(c(t),e.y);e.y>0&&!S(t,e);)e.y--;else if(i)for(e.y=Math.min(c(t),e.y);e.x>0&&!S(t,e);)e.x--;for(;a=S(t,e);)i?m(o,e,a.x+a.w,"x"):m(o,e,a.y+a.h,"y"),i&&e.x+e.w>r&&(e.x=r-e.w,e.y++);return e}function w(t,e){for(var n=x(t),r=0,o=t.length;re.cols&&(a.x=e.cols-a.w),a.x<0&&(a.x=0,a.w=e.cols),a.static)for(;S(n,a);)a.y++;else n.push(a)}return t}function O(t,e){for(var n=0,r=t.length;n=r:"horizontal"===i&&"number"==typeof n&&u>=n)&&(l=l.reverse());var p=j(l,e);if(a&&p.length)return H("Collision prevented on ".concat(e.i,", reverting.")),e.x=u,e.y=c,e.moved=!1,t;for(var f=0,h=p.length;fe.y||t.y===e.y&&t.x>e.x?1:t.y===e.y&&t.x===e.x?0:-1}))}function E(t){return t.slice(0).sort((function(t,e){return t.x>e.x||t.x===e.x&&t.y>e.y?1:-1}))}function T(t,e,n,r){t=t||[];var o=[];return i.a.Children.forEach(e,(function(e,n){var r=O(t,String(e.key));if(r)o[n]=p(r);else{0;var a=e.props["data-grid"]||e.props._grid;o[n]=p(a?function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"Layout",n=["x","y","w","h"];if(!Array.isArray(t))throw new Error(e+" must be an array!");for(var r=0,o=t.length;rs))return!1;var c=a.get(t);if(c&&a.get(e))return c==e;var l=-1,p=!0,f=2&n?new at:void 0;for(a.set(t,e),a.set(e,t);++l-1},rt.prototype.set=function(t,e){var n=this.__data__,r=ut(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},ot.prototype.clear=function(){this.size=0,this.__data__={hash:new nt,map:new(U||rt),string:new nt}},ot.prototype.delete=function(t){var e=gt(this,t).delete(t);return this.size-=e?1:0,e},ot.prototype.get=function(t){return gt(this,t).get(t)},ot.prototype.has=function(t){return gt(this,t).has(t)},ot.prototype.set=function(t,e){var n=gt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},at.prototype.add=at.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},at.prototype.has=function(t){return this.__data__.has(t)},it.prototype.clear=function(){this.__data__=new rt,this.size=0},it.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},it.prototype.get=function(t){return this.__data__.get(t)},it.prototype.has=function(t){return this.__data__.has(t)},it.prototype.set=function(t,e){var n=this.__data__;if(n instanceof rt){var r=n.__data__;if(!U||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new ot(r)}return n.set(t,e),this.size=n.size,this};var mt=I?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,a=[];++n-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991}function Rt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function zt(t){return null!=t&&"object"==typeof t}var kt=m?function(t){return function(e){return t(e)}}(m):function(t){return zt(t)&&_t(t.length)&&!!c[ct(t)]};function Ct(t){return null!=(e=t)&&_t(e.length)&&!Pt(e)?st(t):ht(t);var e}n.exports=function(t,e){return pt(t,e)}}).call(this,n(12),n(13)(t))},function(t,e,n){"use strict";n.r(e),n.d(e,"getBreakpointFromWidth",(function(){return o})),n.d(e,"getColsFromBreakpoint",(function(){return a})),n.d(e,"findOrGenerateResponsiveLayout",(function(){return i})),n.d(e,"sortBreakpoints",(function(){return s}));var r=n(1);function o(t,e){for(var n=s(t),r=n[0],o=1,a=n.length;ot[i]&&(r=i)}return r}function a(t,e){if(!e[t])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+t+" is missing!");return e[t]}function i(t,e,n,o,a,i){if(t[n])return Object(r.cloneLayout)(t[n]);for(var u=t[o],c=s(e),l=c.slice(c.indexOf(n)),p=0,f=l.length;pn&&(n=e);return n}function p(t){for(var e=Array(t.length),n=0,r=t.length;n=e.x+e.w)&&(!(t.y+t.h<=e.y)&&!(t.y>=e.y+e.h))))}function b(t,e,n){for(var r=D(t),o=C(t,e),a=Array(t.length),i=0,s=o.length;ie.y+e.h)break;g(e,i)&&v(t,i,n+e[o],r)}}e[r]=n}function w(t,e,n,r,o){var a,i="horizontal"===n;if("vertical"===n)for(e.y=Math.min(l(t),e.y);e.y>0&&!j(t,e);)e.y--;else if(i)for(e.y=Math.min(l(t),e.y);e.x>0&&!j(t,e);)e.x--;for(;a=j(t,e);)i?v(o,e,a.x+a.w,"x"):v(o,e,a.y+a.h,"y"),i&&e.x+e.w>r&&(e.x=r-e.w,e.y++);return e}function O(t,e){for(var n=D(t),r=0,o=t.length;re.cols&&(a.x=e.cols-a.w),a.x<0&&(a.x=0,a.w=e.cols),a.static)for(;j(n,a);)a.y++;else n.push(a)}return t}function S(t,e){for(var n=0,r=t.length;n=r:"horizontal"===i&&"number"==typeof n&&u>=n)&&(l=l.reverse());var p=x(l,e);if(a&&p.length)return W("Collision prevented on ".concat(e.i,", reverting.")),e.x=u,e.y=c,e.moved=!1,t;for(var f=0,d=p.length;fe.y||t.y===e.y&&t.x>e.x?1:t.y===e.y&&t.x===e.x?0:-1}))}function T(t){return t.slice(0).sort((function(t,e){return t.x>e.x||t.x===e.x&&t.y>e.y?1:-1}))}function M(t,e,n,r){t=t||[];var o=[];return i.a.Children.forEach(e,(function(e,n){var r=S(t,String(e.key));if(r)o[n]=f(r);else{0;var a=e.props["data-grid"]||e.props._grid;o[n]=f(a?u(u({},a),{},{i:e.key}):{w:1,h:1,x:0,y:l(o),i:String(e.key)})}})),b(O(o,{cols:n}),r,n)}function L(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout",n=["x","y","w","h"];if(!Array.isArray(t))throw new Error(e+" must be an array!");for(var r=0,o=t.length;rs))return!1;var c=a.get(t);if(c&&a.get(e))return c==e;var l=-1,p=!0,f=2&n?new at:void 0;for(a.set(t,e),a.set(e,t);++l-1},rt.prototype.set=function(t,e){var n=this.__data__,r=ut(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},ot.prototype.clear=function(){this.size=0,this.__data__={hash:new nt,map:new(Y||rt),string:new nt}},ot.prototype.delete=function(t){var e=gt(this,t).delete(t);return this.size-=e?1:0,e},ot.prototype.get=function(t){return gt(this,t).get(t)},ot.prototype.has=function(t){return gt(this,t).has(t)},ot.prototype.set=function(t,e){var n=gt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},at.prototype.add=at.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},at.prototype.has=function(t){return this.__data__.has(t)},it.prototype.clear=function(){this.__data__=new rt,this.size=0},it.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},it.prototype.get=function(t){return this.__data__.get(t)},it.prototype.has=function(t){return this.__data__.has(t)},it.prototype.set=function(t,e){var n=this.__data__;if(n instanceof rt){var r=n.__data__;if(!Y||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new ot(r)}return n.set(t,e),this.size=n.size,this};var mt=I?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,a=[];++n-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991}function _t(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function zt(t){return null!=t&&"object"==typeof t}var kt=m?function(t){return function(e){return t(e)}}(m):function(t){return zt(t)&&Rt(t.length)&&!!c[ct(t)]};function Ct(t){return null!=(e=t)&&Rt(e.length)&&!Pt(e)?st(t):dt(t);var e}n.exports=function(t,e){return pt(t,e)}}).call(this,n(12),n(13)(t))},function(t,e,n){"use strict";n.r(e),n.d(e,"getBreakpointFromWidth",(function(){return o})),n.d(e,"getColsFromBreakpoint",(function(){return a})),n.d(e,"findOrGenerateResponsiveLayout",(function(){return i})),n.d(e,"sortBreakpoints",(function(){return s}));var r=n(1);function o(t,e){for(var n=s(t),r=n[0],o=1,a=n.length;ot[i]&&(r=i)}return r}function a(t,e){if(!e[t])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+t+" is missing!");return e[t]}function i(t,e,n,o,a,i){if(t[n])return Object(r.cloneLayout)(t[n]);for(var u=t[o],c=s(e),l=c.slice(c.indexOf(n)),p=0,f=l.length;p0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window||void 0===window.document)return"";var e=window.document.documentElement.style;if(t in e)return"";for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{})}function M(t){return"both"===t.props.axis||"x"===t.props.axis}function L(t){return"both"===t.props.axis||"y"===t.props.axis}function N(t,e,n){var r="number"==typeof e?function(t,e){return t.targetTouches&&p(t.targetTouches,(function(t){return e===t.identifier}))||t.changedTouches&&p(t.changedTouches,(function(t){return e===t.identifier}))}(t,e):null;if("number"==typeof e&&!r)return null;var o=A(n);return function(t,e,n){var r=e===e.ownerDocument.body?{left:0,top:0}:e.getBoundingClientRect();return{x:(t.clientX+e.scrollLeft-r.left)/n,y:(t.clientY+e.scrollTop-r.top)/n}}(r||t,n.props.offsetParent||o.offsetParent||o.ownerDocument.body,n.props.scale)}function H(t,e,n){var r=t.state,o=!h(r.lastX),a=A(t);return o?{node:a,deltaX:0,deltaY:0,lastX:e,lastY:n,x:e,y:n}:{node:a,deltaX:e-r.lastX,deltaY:n-r.lastY,lastX:r.lastX,lastY:r.lastY,x:e,y:n}}function W(t,e){var n=t.props.scale;return{node:e.node,x:t.state.x+e.deltaX/n,y:t.state.y+e.deltaY/n,deltaX:e.deltaX/n,deltaY:e.deltaY/n,lastX:t.state.x,lastY:t.state.y}}function A(t){var e=u.a.findDOMNode(t);if(!e)throw new Error(": Unmounted during event!");return e}function I(t){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function B(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function q(t,e){for(var n=0;n not mounted on DragStart!");var r=e.ownerDocument;if(!(n.props.disabled||!(t.target instanceof r.defaultView.Node)||n.props.handle&&!j(t.target,n.props.handle,e)||n.props.cancel&&j(t.target,n.props.cancel,e))){var o=function(t){return t.targetTouches&&t.targetTouches[0]?t.targetTouches[0].identifier:t.changedTouches&&t.changedTouches[0]?t.changedTouches[0].identifier:void 0}(t);n.setState({touchIdentifier:o});var a=N(t,o,U(n));if(null!=a){var i=a.x,s=a.y,c=H(U(n),i,s);n.props.onStart,!1!==n.props.onStart(t,c)&&(n.props.enableUserSelectHack&&C(r),n.setState({dragging:!0,lastX:i,lastY:s}),x(r,$.move,n.handleDrag),x(r,$.stop,n.handleDragStop))}}})),F(U(n),"handleDrag",(function(t){"touchmove"===t.type&&t.preventDefault();var e=N(t,n.state.touchIdentifier,U(n));if(null!=e){var r,o,a,i=e.x,s=e.y;if(Array.isArray(n.props.grid)){var u=i-n.state.lastX,c=s-n.state.lastY,l=B((r=n.props.grid,o=u,a=c,[Math.round(o/r[0])*r[0],Math.round(a/r[1])*r[1]]),2);if(u=l[0],c=l[1],!u&&!c)return;i=n.state.lastX+u,s=n.state.lastY+c}var p=H(U(n),i,s);if(!1!==n.props.onDrag(t,p))n.setState({lastX:i,lastY:s});else try{n.handleDragStop(new MouseEvent("mouseup"))}catch(t){var f=document.createEvent("MouseEvents");f.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.handleDragStop(f)}}})),F(U(n),"handleDragStop",(function(t){if(n.state.dragging){var e=N(t,n.state.touchIdentifier,U(n));if(null!=e){var r=e.x,o=e.y,a=H(U(n),r,o),i=u.a.findDOMNode(U(n));i&&n.props.enableUserSelectHack&&E(i.ownerDocument),n.setState({dragging:!1,lastX:NaN,lastY:NaN}),n.props.onStop(t,a),i&&(D(i.ownerDocument,$.move,n.handleDrag),D(i.ownerDocument,$.stop,n.handleDragStop))}}})),F(U(n),"onMouseDown",(function(t){return $=V,n.handleDragStart(t)})),F(U(n),"onMouseUp",(function(t){return $=V,n.handleDragStop(t)})),F(U(n),"onTouchStart",(function(t){return $=G,n.handleDragStart(t)})),F(U(n),"onTouchEnd",(function(t){return $=G,n.handleDragStop(t)})),n}var n,r;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&X(t,e)}(e,o.a.Component),n=e,(r=[{key:"componentWillUnmount",value:function(){var t=u.a.findDOMNode(this);if(t){var e=t.ownerDocument;D(e,V.move,this.handleDrag),D(e,G.move,this.handleDrag),D(e,V.stop,this.handleDragStop),D(e,G.stop,this.handleDragStop),this.props.enableUserSelectHack&&E(e)}}},{key:"render",value:function(){return o.a.cloneElement(o.a.Children.only(this.props.children),{style:T(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&q(n.prototype,r),e}();function K(t){return(K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Q(){return(Q=Object.assign||function(t){for(var e=1;e, 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}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&at(t,e)}(e,o.a.Component),ot(e,null,[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.position,r=e.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:{x:n.x,y:n.y,prevPropsPosition:tt({},n)}}}]),ot(e,[{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&u.a.findDOMNode(this)instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"render",value:function(){var t,e=this.props,n=(e.axis,e.bounds,e.children),r=e.defaultPosition,a=e.defaultClassName,i=e.defaultClassNameDragging,s=e.defaultClassNameDragged,u=e.position,c=e.positionOffset,p=(e.scale,function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},a=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(e,["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"])),f={},h=null,d=!Boolean(u)||this.state.dragging,y=u||r,g={x:M(this)&&d?this.state.x:y.x,y:L(this)&&d?this.state.y:y.y};this.state.isElementSVG?h=function(t,e){return k(t,e,"")}(g,c):f=function(t,e){var n=k(t,e,"px");return w({},b("transform",m),n)}(g,c);var v=l()(n.props.className||"",a,(it(t={},i,this.state.dragging),it(t,s,this.state.dragged),t));return o.a.createElement(J,Q({},p,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),o.a.cloneElement(o.a.Children.only(n),{className:v,style:tt({},n.props.style,{},f),transform:h}))}}]),e}();it(st,"displayName","Draggable"),it(st,"propTypes",tt({},J.propTypes,{axis:i.a.oneOf(["both","x","y","none"]),bounds:i.a.oneOfType([i.a.shape({left:i.a.number,right:i.a.number,top:i.a.number,bottom:i.a.number}),i.a.string,i.a.oneOf([!1])]),defaultClassName:i.a.string,defaultClassNameDragging:i.a.string,defaultClassNameDragged:i.a.string,defaultPosition:i.a.shape({x:i.a.number,y:i.a.number}),positionOffset:i.a.shape({x:i.a.oneOfType([i.a.number,i.a.string]),y:i.a.oneOfType([i.a.number,i.a.string])}),position:i.a.shape({x:i.a.number,y:i.a.number}),className:y,style:y,transform:y})),it(st,"defaultProps",tt({},J.defaultProps,{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},position:null,scale:1}))}]))},function(t,e,n){"use strict";n.r(e);var r=n(2),o=n.n(r),a=n(3),i=n.n(a),s=n(6),u=n.n(s),c=n(1);function l(t){var e=t.margin,n=t.containerPadding,r=t.containerWidth,o=t.cols;return(r-e[0]*(o-1)-2*n[0])/o}function p(t,e,n,r,o,a){var i=t.margin,s=t.containerPadding,u=t.rowHeight,c=l(t),p={};return a&&a.resizing?(p.width=Math.round(a.resizing.width),p.height=Math.round(a.resizing.height)):(p.width=r===1/0?r:Math.round(c*r+Math.max(0,r-1)*i[0]),p.height=o===1/0?o:Math.round(u*o+Math.max(0,o-1)*i[1])),a&&a.dragging?(p.top=Math.round(a.dragging.top),p.left=Math.round(a.dragging.left)):(p.top=Math.round((u+i[1])*n+s[1]),p.left=Math.round((c+i[0])*e+s[0])),p}function f(t,e,n,r,o){var a=t.margin,i=t.cols,s=t.rowHeight,u=t.maxRows,c=l(t),p=Math.round((n-a[0])/(c+a[0])),f=Math.round((e-a[1])/(s+a[1]));return{x:p=Math.max(Math.min(p,i-r),0),y:f=Math.max(Math.min(f,u-o),0)}}var h=n(5),d=n.n(h),y=n(0),g=n.n(y),b=n(7),m=n(10);function v(t){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function O(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:t.cols,containerPadding:t.containerPadding,containerWidth:t.containerWidth,margin:t.margin,maxRows:t.maxRows,rowHeight:t.rowHeight}}},{key:"createStyle",value:function(t){var e,n=this.props,r=n.usePercentages,o=n.containerWidth;return n.useCSSTransforms?e=Object(c.setTransform)(t):(e=Object(c.setTopLeft)(t),r&&(e.left=Object(c.perc)(t.left/o),e.width=Object(c.perc)(t.width/o))),e}},{key:"mixinDraggable",value:function(t,e){return o.a.createElement(b.DraggableCore,{disabled:!e,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},t)}},{key:"mixinResizable",value:function(t,e,n){var r=this.props,a=r.cols,i=r.x,s=r.minW,u=r.minH,c=r.maxW,l=r.maxH,f=r.transformScale,h=this.getPositionParams(),d=p(h,0,0,a-i,0).width,y=p(h,0,0,s,u),g=p(h,0,0,c,l),b=[y.width,y.height],v=[Math.min(g.width,d),Math.min(g.height,1/0)];return o.a.createElement(m.Resizable,{draggableOpts:{disabled:!n},className:n?void 0:"react-resizable-hide",width:e.width,height:e.height,minConstraints:b,maxConstraints:v,onResizeStop:this.onResizeStop,onResizeStart:this.onResizeStart,onResize:this.onResize,transformScale:f},t)}},{key:"onResizeHandler",value:function(t,e,n){var r=e.node,o=e.size,a=this.props[n];if(a){var i=this.props,s=i.cols,u=i.x,c=i.y,p=i.i,f=i.maxW,h=i.minW,d=i.maxH,y=i.minH,g=function(t,e,n,r,o){var a=t.margin,i=t.maxRows,s=t.cols,u=t.rowHeight,c=l(t),p=Math.round((e+a[0])/(c+a[0])),f=Math.round((n+a[1])/(u+a[1]));return{w:p=Math.max(Math.min(p,s-r),0),h:f=Math.max(Math.min(f,i-o),0)}}(this.getPositionParams(),o.width,o.height,u,c),b=g.w,m=g.h;b=Math.min(b,s-u),b=Math.max(b,1),b=Math.max(Math.min(b,f),h),m=Math.max(Math.min(m,d),y),this.setState({resizing:"onResizeStop"===n?null:o}),a.call(this,p,b,m,{e:t,node:r,size:o})}}},{key:"render",value:function(){var t=this.props,e=t.x,n=t.y,r=t.w,a=t.h,i=t.isDraggable,s=t.isResizable,c=t.droppingPosition,l=t.useCSSTransforms,f=p(this.getPositionParams(),e,n,r,a,this.state),h=o.a.Children.only(this.props.children),d=o.a.cloneElement(h,{className:u()("react-grid-item",h.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":i,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(c),cssTransforms:l}),style:O({},this.props.style,{},h.props.style,{},this.createStyle(f))});return d=this.mixinResizable(d,f,s),d=this.mixinDraggable(d,i)}}])&&j(n.prototype,r),a&&j(n,a),e}(o.a.Component);R(z,"propTypes",{children:g.a.element,cols:g.a.number.isRequired,containerWidth:g.a.number.isRequired,rowHeight:g.a.number.isRequired,margin:g.a.array.isRequired,maxRows:g.a.number.isRequired,containerPadding:g.a.array.isRequired,x:g.a.number.isRequired,y:g.a.number.isRequired,w:g.a.number.isRequired,h:g.a.number.isRequired,minW:function(t,e){var n=t[e];return"number"!=typeof n?new Error("minWidth not Number"):n>t.w||n>t.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(t,e){var n=t[e];return"number"!=typeof n?new Error("maxWidth not Number"):nt.h||n>t.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(t,e){var n=t[e];return"number"!=typeof n?new Error("maxHeight not Number"):n0){var g=1/0,b=1/0;y.forEach((function(t){t.x>h.x&&(g=Math.min(g,t.x)),t.y>h.y&&(b=Math.min(b,t.y))})),Number.isFinite(g)&&(h.w=g-h.x),Number.isFinite(b)&&(h.h=b-h.y)}}d||(h.w=e,h.h=n);var m={w:h.w,h:h.h,x:h.x,y:h.y,static:!0,i:t};this.props.onResize(s,u,h,m,o,a),this.setState({layout:Object(c.compact)(s,Object(c.compactType)(this.props),p),activeDrag:m})}}},{key:"onResizeStop",value:function(t,e,n,r){var o=r.e,a=r.node,i=this.state,s=i.layout,u=i.oldResizeItem,l=this.props.cols,p=Object(c.getLayoutItem)(s,t);this.props.onResizeStop(s,u,p,null,o,a);var f=Object(c.compact)(s,Object(c.compactType)(this.props),l),h=this.state.oldLayout;this.setState({activeDrag:null,layout:f,oldResizeItem:null,oldLayout:null}),this.onLayoutMaybeChanged(f,h)}},{key:"placeholder",value:function(){var t=this.state.activeDrag;if(!t)return null;var e=this.props,n=e.width,r=e.cols,a=e.margin,i=e.containerPadding,s=e.rowHeight,u=e.maxRows,c=e.useCSSTransforms,l=e.transformScale;return o.a.createElement(z,{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,className:"react-grid-placeholder",containerWidth:n,cols:r,margin:a,containerPadding:i||a,maxRows:u,rowHeight:s,isDraggable:!1,isResizable:!1,useCSSTransforms:c,transformScale:l},o.a.createElement("div",null))}},{key:"processGridItem",value:function(t,e){if(t&&t.key){var n=Object(c.getLayoutItem)(this.state.layout,String(t.key));if(!n)return null;var r=this.props,a=r.width,i=r.cols,s=r.margin,u=r.containerPadding,l=r.rowHeight,p=r.maxRows,f=r.isDraggable,h=r.isResizable,d=r.useCSSTransforms,y=r.transformScale,g=r.draggableCancel,b=r.draggableHandle,m=this.state,v=m.mounted,w=m.droppingPosition,O="boolean"==typeof n.isDraggable?n.isDraggable:!n.static&&f,S="boolean"==typeof n.isResizable?n.isResizable:!n.static&&h;return o.a.createElement(z,{containerWidth:a,cols:i,margin:s,containerPadding:u||s,maxRows:p,rowHeight:l,cancel:g,handle:b,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:O,isResizable:S,useCSSTransforms:d&&v,usePercentages:!v,transformScale:y,w:n.w,h:n.h,x:n.x,y:n.y,i:n.i,minH:n.minH,minW:n.minW,maxH:n.maxH,maxW:n.maxW,static:n.static,droppingPosition:e?w:void 0},t)}}},{key:"render",value:function(){var t=this,e=this.props,n=e.className,r=e.style,a=e.isDroppable,i=u()("react-grid-layout",n),s=T({height:this.containerHeight()},r);return o.a.createElement("div",{className:i,style:s,onDrop:a?this.onDrop:c.noop,onDragLeave:a?this.onDragLeave:c.noop,onDragEnter:a?this.onDragEnter:c.noop,onDragOver:a?this.onDragOver:c.noop},o.a.Children.map(this.props.children,(function(e){return t.processGridItem(e)})),a&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}])&&L(n.prototype,r),a&&L(n,a),e}(o.a.Component);A(B,"displayName","ReactGridLayout"),A(B,"propTypes",k),A(B,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isDraggable:!0,isResizable:!0,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},onLayoutChange:c.noop,onDragStart:c.noop,onDrag:c.noop,onDragStop:c.noop,onResizeStart:c.noop,onResize:c.noop,onResizeStop:c.noop,onDrop:c.noop})},function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r=s(n(2)),o=s(n(0)),a=n(7),i=n(17);function s(t){return t&&t.__esModule?t:{default:t}}function u(){return(u=Object.assign||function(t){for(var e=1;e=0||(o[n]=t[n]);return o}(e,["children","draggableOpts","width","height","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"])),f=l.className?l.className+" react-resizable":"react-resizable";return(0,i.cloneElement)(n,function(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles"]);return r.default.createElement(a.default,{handle:e,handleSize:n,width:this.state.width,height:this.state.height,onResizeStart:o,onResize:this.onResize,onResizeStop:i,draggableOpts:u,minConstraints:c,maxConstraints:l,lockAspectRatio:p,axis:f,resizeHandles:h},r.default.createElement("div",s({style:{width:this.state.width+"px",height:this.state.height+"px"}},d)))},o}(r.default.Component);e.default=l,c(l,"propTypes",{height:o.default.number,width:o.default.number}),c(l,"defaultProps",{handleSize:[20,20]})},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return D}));var r=n(2),o=n(0),a=n.n(o),i=n(3),s=n.n(i),u=n(1),c=n(4),l=n(8);function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(){return(f=Object.assign||function(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function y(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window||void 0===window.document)return"";var e=window.document.documentElement.style;if(t in e)return"";for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{})}function M(t){return"both"===t.props.axis||"x"===t.props.axis}function L(t){return"both"===t.props.axis||"y"===t.props.axis}function N(t,e,n){var r="number"==typeof e?function(t,e){return t.targetTouches&&p(t.targetTouches,(function(t){return e===t.identifier}))||t.changedTouches&&p(t.changedTouches,(function(t){return e===t.identifier}))}(t,e):null;if("number"==typeof e&&!r)return null;var o=A(n);return function(t,e,n){var r=e===e.ownerDocument.body?{left:0,top:0}:e.getBoundingClientRect();return{x:(t.clientX+e.scrollLeft-r.left)/n,y:(t.clientY+e.scrollTop-r.top)/n}}(r||t,n.props.offsetParent||o.offsetParent||o.ownerDocument.body,n.props.scale)}function H(t,e,n){var r=t.state,o=!d(r.lastX),a=A(t);return o?{node:a,deltaX:0,deltaY:0,lastX:e,lastY:n,x:e,y:n}:{node:a,deltaX:e-r.lastX,deltaY:n-r.lastY,lastX:r.lastX,lastY:r.lastY,x:e,y:n}}function W(t,e){var n=t.props.scale;return{node:e.node,x:t.state.x+e.deltaX/n,y:t.state.y+e.deltaY/n,deltaX:e.deltaX/n,deltaY:e.deltaY/n,lastX:t.state.x,lastY:t.state.y}}function A(t){var e=u.a.findDOMNode(t);if(!e)throw new Error(": Unmounted during event!");return e}function I(t){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function B(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function q(t,e){for(var n=0;n not mounted on DragStart!");var r=e.ownerDocument;if(!(n.props.disabled||!(t.target instanceof r.defaultView.Node)||n.props.handle&&!j(t.target,n.props.handle,e)||n.props.cancel&&j(t.target,n.props.cancel,e))){var o=function(t){return t.targetTouches&&t.targetTouches[0]?t.targetTouches[0].identifier:t.changedTouches&&t.changedTouches[0]?t.changedTouches[0].identifier:void 0}(t);n.setState({touchIdentifier:o});var a=N(t,o,Y(n));if(null!=a){var i=a.x,s=a.y,c=H(Y(n),i,s);n.props.onStart,!1!==n.props.onStart(t,c)&&(n.props.enableUserSelectHack&&C(r),n.setState({dragging:!0,lastX:i,lastY:s}),x(r,$.move,n.handleDrag),x(r,$.stop,n.handleDragStop))}}})),F(Y(n),"handleDrag",(function(t){"touchmove"===t.type&&t.preventDefault();var e=N(t,n.state.touchIdentifier,Y(n));if(null!=e){var r,o,a,i=e.x,s=e.y;if(Array.isArray(n.props.grid)){var u=i-n.state.lastX,c=s-n.state.lastY,l=B((r=n.props.grid,o=u,a=c,[Math.round(o/r[0])*r[0],Math.round(a/r[1])*r[1]]),2);if(u=l[0],c=l[1],!u&&!c)return;i=n.state.lastX+u,s=n.state.lastY+c}var p=H(Y(n),i,s);if(!1!==n.props.onDrag(t,p))n.setState({lastX:i,lastY:s});else try{n.handleDragStop(new MouseEvent("mouseup"))}catch(t){var f=document.createEvent("MouseEvents");f.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.handleDragStop(f)}}})),F(Y(n),"handleDragStop",(function(t){if(n.state.dragging){var e=N(t,n.state.touchIdentifier,Y(n));if(null!=e){var r=e.x,o=e.y,a=H(Y(n),r,o),i=u.a.findDOMNode(Y(n));i&&n.props.enableUserSelectHack&&E(i.ownerDocument),n.setState({dragging:!1,lastX:NaN,lastY:NaN}),n.props.onStop(t,a),i&&(D(i.ownerDocument,$.move,n.handleDrag),D(i.ownerDocument,$.stop,n.handleDragStop))}}})),F(Y(n),"onMouseDown",(function(t){return $=V,n.handleDragStart(t)})),F(Y(n),"onMouseUp",(function(t){return $=V,n.handleDragStop(t)})),F(Y(n),"onTouchStart",(function(t){return $=G,n.handleDragStart(t)})),F(Y(n),"onTouchEnd",(function(t){return $=G,n.handleDragStop(t)})),n}var n,r;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&X(t,e)}(e,o.a.Component),n=e,(r=[{key:"componentWillUnmount",value:function(){var t=u.a.findDOMNode(this);if(t){var e=t.ownerDocument;D(e,V.move,this.handleDrag),D(e,G.move,this.handleDrag),D(e,V.stop,this.handleDragStop),D(e,G.stop,this.handleDragStop),this.props.enableUserSelectHack&&E(e)}}},{key:"render",value:function(){return o.a.cloneElement(o.a.Children.only(this.props.children),{style:T(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&q(n.prototype,r),e}();function K(t){return(K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Q(){return(Q=Object.assign||function(t){for(var e=1;e, 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}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&at(t,e)}(e,o.a.Component),ot(e,null,[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.position,r=e.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:{x:n.x,y:n.y,prevPropsPosition:tt({},n)}}}]),ot(e,[{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&u.a.findDOMNode(this)instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"render",value:function(){var t,e=this.props,n=(e.axis,e.bounds,e.children),r=e.defaultPosition,a=e.defaultClassName,i=e.defaultClassNameDragging,s=e.defaultClassNameDragged,u=e.position,c=e.positionOffset,p=(e.scale,function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},a=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(e,["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"])),f={},d=null,h=!Boolean(u)||this.state.dragging,y=u||r,g={x:M(this)&&h?this.state.x:y.x,y:L(this)&&h?this.state.y:y.y};this.state.isElementSVG?d=function(t,e){return k(t,e,"")}(g,c):f=function(t,e){var n=k(t,e,"px");return w({},b("transform",m),n)}(g,c);var v=l()(n.props.className||"",a,(it(t={},i,this.state.dragging),it(t,s,this.state.dragged),t));return o.a.createElement(J,Q({},p,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),o.a.cloneElement(o.a.Children.only(n),{className:v,style:tt({},n.props.style,{},f),transform:d}))}}]),e}();it(st,"displayName","Draggable"),it(st,"propTypes",tt({},J.propTypes,{axis:i.a.oneOf(["both","x","y","none"]),bounds:i.a.oneOfType([i.a.shape({left:i.a.number,right:i.a.number,top:i.a.number,bottom:i.a.number}),i.a.string,i.a.oneOf([!1])]),defaultClassName:i.a.string,defaultClassNameDragging:i.a.string,defaultClassNameDragged:i.a.string,defaultPosition:i.a.shape({x:i.a.number,y:i.a.number}),positionOffset:i.a.shape({x:i.a.oneOfType([i.a.number,i.a.string]),y:i.a.oneOfType([i.a.number,i.a.string])}),position:i.a.shape({x:i.a.number,y:i.a.number}),className:y,style:y,transform:y})),it(st,"defaultProps",tt({},J.defaultProps,{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},position:null,scale:1}))}]))},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return G}));var r=n(2),o=n.n(r),a=n(3),i=n.n(a),s=n(6),u=n.n(s),c=n(1);function l(t){var e=t.margin,n=t.containerPadding,r=t.containerWidth,o=t.cols;return(r-e[0]*(o-1)-2*n[0])/o}function p(t,e,n){return Number.isFinite(t)?Math.round(e*t+Math.max(0,t-1)*n):t}function f(t,e,n,r,o,a){var i=t.margin,s=t.containerPadding,u=t.rowHeight,c=l(t),f={};return a&&a.resizing?(f.width=Math.round(a.resizing.width),f.height=Math.round(a.resizing.height)):(f.width=p(r,c,i[0]),f.height=p(o,u,i[1])),a&&a.dragging?(f.top=Math.round(a.dragging.top),f.left=Math.round(a.dragging.left)):(f.top=Math.round((u+i[1])*n+s[1]),f.left=Math.round((c+i[0])*e+s[0])),f}function d(t,e,n,r,o){var a=t.margin,i=t.cols,s=t.rowHeight,u=t.maxRows,c=l(t),p=Math.round((n-a[0])/(c+a[0])),f=Math.round((e-a[1])/(s+a[1]));return{x:p=h(p,0,i-r),y:f=h(f,0,u-o)}}function h(t,e,n){return Math.max(Math.min(t,n),e)}var y=n(5),g=n.n(y),b=n(0),m=n.n(b),v=n(7),w=n(10);function O(t){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function S(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function j(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:t.cols,containerPadding:t.containerPadding,containerWidth:t.containerWidth,margin:t.margin,maxRows:t.maxRows,rowHeight:t.rowHeight}}},{key:"createStyle",value:function(t){var e,n=this.props,r=n.usePercentages,o=n.containerWidth;return n.useCSSTransforms?e=Object(c.setTransform)(t):(e=Object(c.setTopLeft)(t),r&&(e.left=Object(c.perc)(t.left/o),e.width=Object(c.perc)(t.width/o))),e}},{key:"mixinDraggable",value:function(t,e){return o.a.createElement(v.DraggableCore,{disabled:!e,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},t)}},{key:"mixinResizable",value:function(t,e,n){var r=this.props,a=r.cols,i=r.x,s=r.minW,u=r.minH,c=r.maxW,l=r.maxH,p=r.transformScale,d=this.getPositionParams(),h=f(d,0,0,a-i,0).width,y=f(d,0,0,s,u),g=f(d,0,0,c,l),b=[y.width,y.height],m=[Math.min(g.width,h),Math.min(g.height,1/0)];return o.a.createElement(w.Resizable,{draggableOpts:{disabled:!n},className:n?void 0:"react-resizable-hide",width:e.width,height:e.height,minConstraints:b,maxConstraints:m,onResizeStop:this.onResizeStop,onResizeStart:this.onResizeStart,onResize:this.onResize,transformScale:p},t)}},{key:"onResizeHandler",value:function(t,e,n){var r=e.node,o=e.size,a=this.props[n];if(a){var i=this.props,s=i.cols,u=i.x,c=i.y,p=i.i,f=i.maxH,d=i.minH,y=this.props,g=y.minW,b=y.maxW,m=function(t,e,n,r,o){var a=t.margin,i=t.maxRows,s=t.cols,u=t.rowHeight,c=l(t),p=Math.round((e+a[0])/(c+a[0])),f=Math.round((n+a[1])/(u+a[1]));return{w:p=h(p,0,s-r),h:f=h(f,0,i-o)}}(this.getPositionParams(),o.width,o.height,u,c),v=m.w,w=m.h;v=h(v,g=Math.max(g,1),b=Math.min(b,s-u)),w=h(w,d,f),this.setState({resizing:"onResizeStop"===n?null:o}),a.call(this,p,v,w,{e:t,node:r,size:o})}}},{key:"render",value:function(){var t=this.props,e=t.x,n=t.y,r=t.w,a=t.h,i=t.isDraggable,s=t.isResizable,c=t.droppingPosition,l=t.useCSSTransforms,p=f(this.getPositionParams(),e,n,r,a,this.state),d=o.a.Children.only(this.props.children),h=o.a.cloneElement(d,{className:u()("react-grid-item",d.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":i,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(c),cssTransforms:l}),style:j(j(j({},this.props.style),d.props.style),this.createStyle(p))});return h=this.mixinResizable(h,p,s),h=this.mixinDraggable(h,i)}}])&&D(e.prototype,n),r&&D(e,r),i}(o.a.Component);C(E,"propTypes",{children:m.a.element,cols:m.a.number.isRequired,containerWidth:m.a.number.isRequired,rowHeight:m.a.number.isRequired,margin:m.a.array.isRequired,maxRows:m.a.number.isRequired,containerPadding:m.a.array.isRequired,x:m.a.number.isRequired,y:m.a.number.isRequired,w:m.a.number.isRequired,h:m.a.number.isRequired,minW:function(t,e){var n=t[e];return"number"!=typeof n?new Error("minWidth not Number"):n>t.w||n>t.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(t,e){var n=t[e];return"number"!=typeof n?new Error("maxWidth not Number"):nt.h||n>t.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(t,e){var n=t[e];return"number"!=typeof n?new Error("maxHeight not Number"):nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0){var g=1/0,b=1/0;y.forEach((function(t){t.x>d.x&&(g=Math.min(g,t.x)),t.y>d.y&&(b=Math.min(b,t.y))})),Number.isFinite(g)&&(d.w=g-d.x),Number.isFinite(b)&&(d.h=b-d.y)}}h||(d.w=e,d.h=n);var m={w:d.w,h:d.h,x:d.x,y:d.y,static:!0,i:t};this.props.onResize(s,u,d,m,o,a),this.setState({layout:Object(c.compact)(s,Object(c.compactType)(this.props),p),activeDrag:m})}}},{key:"onResizeStop",value:function(t,e,n,r){var o=r.e,a=r.node,i=this.state,s=i.layout,u=i.oldResizeItem,l=this.props.cols,p=Object(c.getLayoutItem)(s,t);this.props.onResizeStop(s,u,p,null,o,a);var f=Object(c.compact)(s,Object(c.compactType)(this.props),l),d=this.state.oldLayout;this.setState({activeDrag:null,layout:f,oldResizeItem:null,oldLayout:null}),this.onLayoutMaybeChanged(f,d)}},{key:"placeholder",value:function(){var t=this.state.activeDrag;if(!t)return null;var e=this.props,n=e.width,r=e.cols,a=e.margin,i=e.containerPadding,s=e.rowHeight,u=e.maxRows,c=e.useCSSTransforms,l=e.transformScale;return(o.a.createElement(E,{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,className:"react-grid-placeholder",containerWidth:n,cols:r,margin:a,containerPadding:i||a,maxRows:u,rowHeight:s,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:c,transformScale:l},o.a.createElement("div",null)))}},{key:"processGridItem",value:function(t,e){if(t&&t.key){var n=Object(c.getLayoutItem)(this.state.layout,String(t.key));if(!n)return null;var r=this.props,a=r.width,i=r.cols,s=r.margin,u=r.containerPadding,l=r.rowHeight,p=r.maxRows,f=r.isDraggable,d=r.isResizable,h=r.isBounded,y=r.useCSSTransforms,g=r.transformScale,b=r.draggableCancel,m=r.draggableHandle,v=this.state,w=v.mounted,O=v.droppingPosition,S="boolean"==typeof n.isDraggable?n.isDraggable:!n.static&&f,j="boolean"==typeof n.isResizable?n.isResizable:!n.static&&d,x=S&&h&&!1!==n.isBounded;return o.a.createElement(E,{containerWidth:a,cols:i,margin:s,containerPadding:u||s,maxRows:p,rowHeight:l,cancel:b,handle:m,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:S,isResizable:j,isBounded:x,useCSSTransforms:y&&w,usePercentages:!w,transformScale:g,w:n.w,h:n.h,x:n.x,y:n.y,i:n.i,minH:n.minH,minW:n.minW,maxH:n.maxH,maxW:n.maxW,static:n.static,droppingPosition:e?O:void 0},t)}}},{key:"render",value:function(){var t=this,e=this.props,n=e.className,r=e.style,a=e.isDroppable,i=e.innerRef,s=u()("react-grid-layout",n),l=N({height:this.containerHeight()},r);return o.a.createElement("div",{ref:i,className:s,style:l,onDrop:a?this.onDrop:c.noop,onDragLeave:a?this.onDragLeave:c.noop,onDragEnter:a?this.onDragEnter:c.noop,onDragOver:a?this.onDragOver:c.noop},o.a.Children.map(this.props.children,(function(e){return t.processGridItem(e)})),a&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}])&&A(e.prototype,n),r&&A(e,r),s}(o.a.Component);X(G,"displayName","ReactGridLayout"),X(G,"propTypes",T),X(G,"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,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},onLayoutChange:c.noop,onDragStart:c.noop,onDrag:c.noop,onDragStop:c.noop,onResizeStart:c.noop,onResize:c.noop,onResizeStop:c.noop,onDrop:c.noop})},function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r=s(n(2)),o=s(n(0)),a=n(7),i=n(17);function s(t){return t&&t.__esModule?t:{default:t}}function u(){return(u=Object.assign||function(t){for(var e=1;e=0||(o[n]=t[n]);return o}(e,["children","draggableOpts","width","height","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"])),f=l.className?l.className+" react-resizable":"react-resizable";return(0,i.cloneElement)(n,function(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles"]);return r.default.createElement(a.default,{handle:e,handleSize:n,width:this.state.width,height:this.state.height,onResizeStart:o,onResize:this.onResize,onResizeStop:i,draggableOpts:u,minConstraints:c,maxConstraints:l,lockAspectRatio:p,axis:f,resizeHandles:d},r.default.createElement("div",s({style:{width:this.state.width+"px",height:this.state.height+"px"}},h)))},o}(r.default.Component);e.default=l,c(l,"propTypes",{height:o.default.number,width:o.default.number}),c(l,"defaultProps",{handleSize:[20,20]})},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return P}));var r=n(2),o=n(0),a=n.n(o),i=n(3),s=n.n(i),u=n(1),c=n(4),l=n(8);function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(){return(f=Object.assign||function(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function y(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var n=0;n;\nexport type Position = {\n left: number,\n top: number,\n width: number,\n height: number\n};\nexport type ReactDraggableCallbackData = {\n node: HTMLElement,\n x?: number,\n y?: number,\n deltaX: number,\n deltaY: number,\n lastX?: number,\n lastY?: number\n};\n\nexport type PartialPosition = { left: number, top: number };\nexport type DroppingPosition = { left: number, top: number, e: Event };\nexport type Size = { width: number, height: number };\nexport type GridDragEvent = {\n e: Event,\n node: HTMLElement,\n newPosition: PartialPosition\n};\nexport type GridResizeEvent = { e: Event, node: HTMLElement, size: Size };\nexport type DragOverEvent = MouseEvent & {\n nativeEvent: {\n layerX: number,\n layerY: number,\n target: {\n className: String\n }\n }\n};\n\ntype REl = ReactElement;\nexport type ReactChildren = ReactChildrenArray;\n\n// All callbacks are of the signature (layout, oldItem, newItem, placeholder, e).\nexport type EventCallback = (\n Layout,\n oldItem: ?LayoutItem,\n newItem: ?LayoutItem,\n placeholder: ?LayoutItem,\n Event,\n ?HTMLElement\n) => void;\nexport type CompactType = ?(\"horizontal\" | \"vertical\");\n\nconst isProduction = process.env.NODE_ENV === \"production\";\nconst DEBUG = false;\n\n/**\n * Return the bottom coordinate of the layout.\n *\n * @param {Array} layout Layout array.\n * @return {Number} Bottom coordinate.\n */\nexport function bottom(layout: Layout): number {\n let max = 0,\n bottomY;\n for (let i = 0, len = layout.length; i < len; i++) {\n bottomY = layout[i].y + layout[i].h;\n if (bottomY > max) max = bottomY;\n }\n return max;\n}\n\nexport function cloneLayout(layout: Layout): Layout {\n const newLayout = Array(layout.length);\n for (let i = 0, len = layout.length; i < len; i++) {\n newLayout[i] = cloneLayoutItem(layout[i]);\n }\n return newLayout;\n}\n\n// Fast path to cloning, since this is monomorphic\nexport function cloneLayoutItem(layoutItem: LayoutItem): LayoutItem {\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\n isDraggable: layoutItem.isDraggable,\n isResizable: layoutItem.isResizable\n };\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 */\nexport function childrenEqual(a: ReactChildren, b: ReactChildren): boolean {\n return isEqual(\n React.Children.map(a, c => c.key),\n React.Children.map(b, c => c.key)\n );\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 */\ntype FastRGLPropsEqual = (Object, Object, Function) => boolean;\nexport const fastRGLPropsEqual: FastRGLPropsEqual = require(\"./fastRGLPropsEqual\");\n\n// Like the above, but a lot simpler.\nexport function fastPositionEqual(a: Position, b: Position) {\n return (\n a.left === b.left &&\n a.top === b.top &&\n a.width === b.width &&\n a.height === b.height\n );\n}\n\n/**\n * Given two layoutitems, check if they collide.\n */\nexport function collides(l1: LayoutItem, l2: LayoutItem): boolean {\n if (l1.i === l2.i) return false; // same element\n if (l1.x + l1.w <= l2.x) return false; // l1 is left of l2\n if (l1.x >= l2.x + l2.w) return false; // l1 is right of l2\n if (l1.y + l1.h <= l2.y) return false; // l1 is above l2\n if (l1.y >= l2.y + l2.h) return false; // l1 is below l2\n return true; // boxes overlap\n}\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 */\nexport function compact(\n layout: Layout,\n compactType: CompactType,\n cols: number\n): Layout {\n // Statics go in the compareWith array right away so items flow around them.\n const compareWith = getStatics(layout);\n // We go through the items by row and column.\n const sorted = sortLayoutItems(layout, compactType);\n // Holding for new items.\n const out = Array(layout.length);\n\n for (let i = 0, len = sorted.length; i < len; i++) {\n let l = cloneLayoutItem(sorted[i]);\n\n // Don't move static elements\n if (!l.static) {\n l = compactItem(compareWith, l, compactType, cols, sorted);\n\n // Add to comparison array. We only collide with items before this one.\n // Statics are already in this array.\n compareWith.push(l);\n }\n\n // Add to output array to make sure they still come out in the right order.\n out[layout.indexOf(sorted[i])] = l;\n\n // Clear moved flag, if it exists.\n l.moved = false;\n }\n\n return out;\n}\n\nconst heightWidth = { x: \"w\", y: \"h\" };\n/**\n * Before moving item down, it will check if the movement will cause collisions and move those items down before.\n */\nfunction resolveCompactionCollision(\n layout: Layout,\n item: LayoutItem,\n moveToCoord: number,\n axis: \"x\" | \"y\"\n) {\n const sizeProp = heightWidth[axis];\n item[axis] += 1;\n const itemIndex = layout\n .map(layoutItem => {\n return layoutItem.i;\n })\n .indexOf(item.i);\n\n // Go through each item we collide with.\n for (let i = itemIndex + 1; i < layout.length; i++) {\n const otherItem = layout[i];\n // Ignore static items\n if (otherItem.static) continue;\n\n // 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 if (otherItem.y > item.y + item.h) break;\n\n if (collides(item, otherItem)) {\n resolveCompactionCollision(\n layout,\n otherItem,\n moveToCoord + item[sizeProp],\n axis\n );\n }\n }\n\n item[axis] = moveToCoord;\n}\n\n/**\n * Compact an item in the layout.\n *\n * Modifies item.\n *\n */\nexport function compactItem(\n compareWith: Layout,\n l: LayoutItem,\n compactType: CompactType,\n cols: number,\n fullLayout: Layout\n): LayoutItem {\n const compactV = compactType === \"vertical\";\n const compactH = compactType === \"horizontal\";\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);\n // Move the element up as far as it can go without colliding.\n while (l.y > 0 && !getFirstCollision(compareWith, l)) {\n l.y--;\n }\n } else if (compactH) {\n l.y = Math.min(bottom(compareWith), l.y);\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 }\n\n // Move it down, and keep moving it down if it's colliding.\n let collides;\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 }\n // Since we can't grow without bounds horizontally, if we've overflown, let's move it down and try again.\n if (compactH && l.x + l.w > cols) {\n l.x = cols - l.w;\n l.y++;\n }\n }\n return l;\n}\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 */\nexport function correctBounds(\n layout: Layout,\n bounds: { cols: number }\n): Layout {\n const collidesWith = getStatics(layout);\n for (let i = 0, len = layout.length; i < len; i++) {\n const l = layout[i];\n // Overflows right\n if (l.x + l.w > bounds.cols) l.x = bounds.cols - l.w;\n // Overflows left\n if (l.x < 0) {\n l.x = 0;\n l.w = bounds.cols;\n }\n if (!l.static) collidesWith.push(l);\n 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 return layout;\n}\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 */\nexport function getLayoutItem(layout: Layout, id: string): ?LayoutItem {\n for (let i = 0, len = layout.length; i < len; i++) {\n if (layout[i].i === id) return layout[i];\n }\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 */\nexport function getFirstCollision(\n layout: Layout,\n layoutItem: LayoutItem\n): ?LayoutItem {\n for (let i = 0, len = layout.length; i < len; i++) {\n if (collides(layout[i], layoutItem)) return layout[i];\n }\n}\n\nexport function getAllCollisions(\n layout: Layout,\n layoutItem: LayoutItem\n): Array {\n return layout.filter(l => 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 */\nexport function getStatics(layout: Layout): Array {\n return layout.filter(l => 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 */\nexport function moveElement(\n layout: Layout,\n l: LayoutItem,\n x: ?number,\n y: ?number,\n isUserAction: ?boolean,\n preventCollision: ?boolean,\n compactType: CompactType,\n cols: number\n): Layout {\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;\n\n // Short-circuit if nothing to do.\n if (l.y === y && l.x === x) return layout;\n\n log(\n `Moving element ${l.i} to [${String(x)},${String(y)}] from [${l.x},${l.y}]`\n );\n const oldX = l.x;\n const oldY = l.y;\n\n // This is quite a bit faster than extending the object\n if (typeof x === \"number\") l.x = x;\n if (typeof y === \"number\") l.y = y;\n l.moved = true;\n\n // 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 let sorted = sortLayoutItems(layout, compactType);\n const movingUp =\n compactType === \"vertical\" && typeof y === \"number\"\n ? oldY >= y\n : compactType === \"horizontal\" && typeof x === \"number\"\n ? oldX >= x\n : false;\n // $FlowIgnore acceptable modification of read-only array as it was recently cloned\n if (movingUp) sorted = sorted.reverse();\n const collisions = getAllCollisions(sorted, l);\n\n // There was a collision; abort\n if (preventCollision && collisions.length) {\n log(`Collision prevented on ${l.i}, reverting.`);\n l.x = oldX;\n l.y = oldY;\n l.moved = false;\n return layout;\n }\n\n // Move each item that collides away from this element.\n for (let i = 0, len = collisions.length; i < len; i++) {\n const collision = collisions[i];\n log(\n `Resolving collision between ${l.i} at [${l.x},${l.y}] and ${collision.i} at [${collision.x},${collision.y}]`\n );\n\n // Short circuit so we can't infinite loop\n if (collision.moved) continue;\n\n // Don't move static items - we have to move *this* element away\n if (collision.static) {\n layout = moveElementAwayFromCollision(\n layout,\n collision,\n l,\n isUserAction,\n compactType,\n cols\n );\n } else {\n layout = moveElementAwayFromCollision(\n layout,\n l,\n collision,\n isUserAction,\n compactType,\n cols\n );\n }\n }\n\n return layout;\n}\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 */\nexport function moveElementAwayFromCollision(\n layout: Layout,\n collidesWith: LayoutItem,\n itemToMove: LayoutItem,\n isUserAction: ?boolean,\n compactType: CompactType,\n cols: number\n): Layout {\n const compactH = compactType === \"horizontal\";\n // Compact vertically if not set to horizontal\n const compactV = compactType !== \"horizontal\";\n const preventCollision = collidesWith.static; // we're already colliding (not for static items)\n\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 if (isUserAction) {\n // Reset isUserAction flag because we're not in the main collision anymore.\n isUserAction = false;\n\n // Make a mock item so we don't modify the item here, only modify in moveElement.\n const fakeItem: LayoutItem = {\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 };\n\n // No collision? If so, we can go up there; otherwise, we'll end up moving down as normal\n if (!getFirstCollision(layout, fakeItem)) {\n log(\n `Doing reverse collision on ${itemToMove.i} up to [${fakeItem.x},${fakeItem.y}].`\n );\n return moveElement(\n layout,\n itemToMove,\n compactH ? fakeItem.x : undefined,\n compactV ? fakeItem.y : undefined,\n isUserAction,\n preventCollision,\n compactType,\n cols\n );\n }\n }\n\n return moveElement(\n layout,\n itemToMove,\n compactH ? itemToMove.x + 1 : undefined,\n compactV ? itemToMove.y + 1 : undefined,\n isUserAction,\n preventCollision,\n compactType,\n cols\n );\n}\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 */\nexport function perc(num: number): string {\n return num * 100 + \"%\";\n}\n\nexport function setTransform({ top, left, width, height }: Position): Object {\n // Replace unitless items with px\n const translate = `translate(${left}px,${top}px)`;\n return {\n transform: translate,\n WebkitTransform: translate,\n MozTransform: translate,\n msTransform: translate,\n OTransform: translate,\n width: `${width}px`,\n height: `${height}px`,\n position: \"absolute\"\n };\n}\n\nexport function setTopLeft({ top, left, width, height }: Position): Object {\n return {\n top: `${top}px`,\n left: `${left}px`,\n width: `${width}px`,\n height: `${height}px`,\n position: \"absolute\"\n };\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 */\nexport function sortLayoutItems(\n layout: Layout,\n compactType: CompactType\n): Layout {\n if (compactType === \"horizontal\") return sortLayoutItemsByColRow(layout);\n else return sortLayoutItemsByRowCol(layout);\n}\n\n/**\n * Sort layout items by row ascending and column ascending.\n *\n * Does not modify Layout.\n */\nexport function sortLayoutItemsByRowCol(layout: Layout): Layout {\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 return -1;\n });\n}\n\n/**\n * Sort layout items by column ascending then row ascending.\n *\n * Does not modify Layout.\n */\nexport function sortLayoutItemsByColRow(layout: Layout): Layout {\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 return -1;\n });\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 */\nexport function synchronizeLayoutWithChildren(\n initialLayout: Layout,\n children: ReactChildren,\n cols: number,\n compactType: CompactType\n): Layout {\n initialLayout = initialLayout || [];\n\n // Generate one layout item per child.\n const layout: LayoutItem[] = [];\n React.Children.forEach(children, (child: ReactElement, i: number) => {\n // Don't overwrite if it already exists.\n const exists = getLayoutItem(initialLayout, String(child.key));\n if (exists) {\n layout[i] = cloneLayoutItem(exists);\n } else {\n if (!isProduction && child.props._grid) {\n console.warn(\n \"`_grid` properties on children have been deprecated as of React 15.2. \" + // eslint-disable-line\n \"Please use `data-grid` or add your properties directly to the `layout`.\"\n );\n }\n const g = child.props[\"data-grid\"] || child.props._grid;\n\n // Hey, this item has a data-grid property, use it.\n if (g) {\n if (!isProduction) {\n validateLayout([g], \"ReactGridLayout.children\");\n }\n layout[i] = cloneLayoutItem({ ...g, i: child.key });\n } else {\n // Nothing provided: ensure this is added to the bottom\n layout[i] = cloneLayoutItem({\n w: 1,\n h: 1,\n x: 0,\n y: bottom(layout),\n i: String(child.key)\n });\n }\n }\n });\n\n // Correct the layout.\n const correctedLayout = correctBounds(layout, { cols: cols });\n return compact(correctedLayout, compactType, cols);\n}\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 */\nexport function validateLayout(\n layout: Layout,\n contextName: string = \"Layout\"\n): void {\n const subProps = [\"x\", \"y\", \"w\", \"h\"];\n if (!Array.isArray(layout))\n throw new Error(contextName + \" must be an array!\");\n for (let i = 0, len = layout.length; i < len; i++) {\n const item = layout[i];\n for (let j = 0; j < subProps.length; j++) {\n if (typeof item[subProps[j]] !== \"number\") {\n throw new Error(\n \"ReactGridLayout: \" +\n contextName +\n \"[\" +\n i +\n \"].\" +\n subProps[j] +\n \" must be a number!\"\n );\n }\n }\n if (item.i && typeof item.i !== \"string\") {\n throw new Error(\n \"ReactGridLayout: \" + contextName + \"[\" + i + \"].i must be a string!\"\n );\n }\n if (item.static !== undefined && typeof item.static !== \"boolean\") {\n throw new Error(\n \"ReactGridLayout: \" +\n contextName +\n \"[\" +\n i +\n \"].static must be a boolean!\"\n );\n }\n }\n}\n\n// Legacy support for verticalCompact: false\nexport function compactType(\n props: ?{ verticalCompact: boolean, compactType: CompactType }\n): CompactType {\n const { verticalCompact, compactType } = props || {};\n return verticalCompact === false ? null : compactType;\n}\n\n// Flow can't really figure this out, so we just use Object\nexport function autoBindHandlers(el: Object, fns: Array): void {\n fns.forEach(key => (el[key] = el[key].bind(el)));\n}\n\nfunction log(...args) {\n if (!DEBUG) return;\n // eslint-disable-next-line no-console\n console.log(...args);\n}\n\nexport const noop = () => {};\n","module.exports = __WEBPACK_EXTERNAL_MODULE__2__;","/**\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","// @flow\n\nimport { cloneLayout, compact, correctBounds } from \"./utils\";\n\nimport type { CompactType, Layout } from \"./utils\";\n\nexport type Breakpoint = string;\nexport type DefaultBreakpoints = 'lg' | 'md' | 'sm' | 'xs' | 'xxs';\n\n// + indicates read-only\nexport type ResponsiveLayout = {\n +[breakpoint: T]: Layout\n};\nexport type Breakpoints = {\n +[breakpoint: T]: number\n};\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 */\nexport function getBreakpointFromWidth(\n breakpoints: Breakpoints,\n width: number\n): Breakpoint {\n const sorted = sortBreakpoints(breakpoints);\n let matching = sorted[0];\n for (let i = 1, len = sorted.length; i < len; i++) {\n const breakpointName = sorted[i];\n if (width > breakpoints[breakpointName]) matching = breakpointName;\n }\n return matching;\n}\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 */\nexport function getColsFromBreakpoint(\n breakpoint: Breakpoint,\n cols: Breakpoints\n): number {\n if (!cols[breakpoint]) {\n throw new Error(\n \"ResponsiveReactGridLayout: `cols` entry for breakpoint \" +\n breakpoint +\n \" is missing!\"\n );\n }\n return cols[breakpoint];\n}\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 */\nexport function findOrGenerateResponsiveLayout(\n layouts: ResponsiveLayout,\n breakpoints: Breakpoints,\n breakpoint: Breakpoint,\n lastBreakpoint: Breakpoint,\n cols: number,\n compactType: CompactType\n): Layout {\n // If it already exists, just return it.\n if (layouts[breakpoint]) return cloneLayout(layouts[breakpoint]);\n // Find or generate the next layout\n let layout = layouts[lastBreakpoint];\n const breakpointsSorted = sortBreakpoints(breakpoints);\n const breakpointsAbove = breakpointsSorted.slice(\n breakpointsSorted.indexOf(breakpoint)\n );\n for (let i = 0, len = breakpointsAbove.length; i < len; i++) {\n const b = breakpointsAbove[i];\n if (layouts[b]) {\n layout = layouts[b];\n break;\n }\n }\n layout = cloneLayout(layout || []); // clone layout so we don't modify existing items\n return compact(correctBounds(layout, { cols: cols }), compactType, cols);\n}\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 */\nexport function sortBreakpoints(breakpoints: Breakpoints): Array {\n const keys: Array = Object.keys(breakpoints);\n return keys.sort(function(a, b) {\n return breakpoints[a] - breakpoints[b];\n });\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__5__;","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e(require(\"react\"),require(\"react-dom\")):\"function\"==typeof define&&define.amd?define([\"react\",\"react-dom\"],e):\"object\"==typeof exports?exports.ReactDraggable=e(require(\"react\"),require(\"react-dom\")):t.ReactDraggable=e(t.React,t.ReactDOM)}(window,function(t,e){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,\"a\",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p=\"\",n(n.s=4)}([function(t,e,n){t.exports=n(5)()},function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){var r;\n/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/!function(){\"use strict\";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e0&&void 0!==arguments[0]?arguments[0]:\"transform\";if(\"undefined\"==typeof window||void 0===window.document)return\"\";var e=window.document.documentElement.style;if(t in e)return\"\";for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{})}function X(t){return\"both\"===t.props.axis||\"x\"===t.props.axis}function Y(t){return\"both\"===t.props.axis||\"y\"===t.props.axis}function L(t,e,n){var r=\"number\"==typeof e?function(t,e){return t.targetTouches&&f(t.targetTouches,function(t){return e===t.identifier})||t.changedTouches&&f(t.changedTouches,function(t){return e===t.identifier})}(t,e):null;if(\"number\"==typeof e&&!r)return null;var o=I(n);return function(t,e,n){var r=e===e.ownerDocument.body?{left:0,top:0}:e.getBoundingClientRect();return{x:(t.clientX+e.scrollLeft-r.left)/n,y:(t.clientY+e.scrollTop-r.top)/n}}(r||t,n.props.offsetParent||o.offsetParent||o.ownerDocument.body,n.props.scale)}function R(t,e,n){var r=t.state,o=!d(r.lastX),a=I(t);return o?{node:a,deltaX:0,deltaY:0,lastX:e,lastY:n,x:e,y:n}:{node:a,deltaX:e-r.lastX,deltaY:n-r.lastY,lastX:r.lastX,lastY:r.lastY,x:e,y:n}}function A(t,e){var n=t.props.scale;return{node:e.node,x:t.state.x+e.deltaX/n,y:t.state.y+e.deltaY/n,deltaX:e.deltaX/n,deltaY:e.deltaY/n,lastX:t.state.x,lastY:t.state.y}}function I(t){var e=u.a.findDOMNode(t);if(!e)throw new Error(\": Unmounted during event!\");return e}function U(t){return(U=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function V(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}()}function W(t,e){for(var n=0;n not mounted on DragStart!\");var r=e.ownerDocument;if(!(n.props.disabled||!(t.target instanceof r.defaultView.Node)||n.props.handle&&!D(t.target,n.props.handle,e)||n.props.cancel&&D(t.target,n.props.cancel,e))){var o=function(t){return t.targetTouches&&t.targetTouches[0]?t.targetTouches[0].identifier:t.changedTouches&&t.changedTouches[0]?t.changedTouches[0].identifier:void 0}(t);n.setState({touchIdentifier:o});var a=L(t,o,H(n));if(null!=a){var i=a.x,s=a.y,c=R(H(n),i,s);n.props.onStart,!1!==n.props.onStart(t,c)&&(n.props.enableUserSelectHack&&M(r),n.setState({dragging:!0,lastX:i,lastY:s}),x(r,F.move,n.handleDrag),x(r,F.stop,n.handleDragStop))}}}),G(H(n),\"handleDrag\",function(t){\"touchmove\"===t.type&&t.preventDefault();var e=L(t,n.state.touchIdentifier,H(n));if(null!=e){var r,o,a,i=e.x,s=e.y;if(Array.isArray(n.props.grid)){var u=i-n.state.lastX,c=s-n.state.lastY,l=V((r=n.props.grid,o=u,a=c,[Math.round(o/r[0])*r[0],Math.round(a/r[1])*r[1]]),2);if(u=l[0],c=l[1],!u&&!c)return;i=n.state.lastX+u,s=n.state.lastY+c}var f=R(H(n),i,s);if(!1!==n.props.onDrag(t,f))n.setState({lastX:i,lastY:s});else try{n.handleDragStop(new MouseEvent(\"mouseup\"))}catch(t){var p=document.createEvent(\"MouseEvents\");p.initMouseEvent(\"mouseup\",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.handleDragStop(p)}}}),G(H(n),\"handleDragStop\",function(t){if(n.state.dragging){var e=L(t,n.state.touchIdentifier,H(n));if(null!=e){var r=e.x,o=e.y,a=R(H(n),r,o),i=u.a.findDOMNode(H(n));i&&n.props.enableUserSelectHack&&k(i.ownerDocument),n.setState({dragging:!1,lastX:NaN,lastY:NaN}),n.props.onStop(t,a),i&&(P(i.ownerDocument,F.move,n.handleDrag),P(i.ownerDocument,F.stop,n.handleDragStop))}}}),G(H(n),\"onMouseDown\",function(t){return F=z.mouse,n.handleDragStart(t)}),G(H(n),\"onMouseUp\",function(t){return F=z.mouse,n.handleDragStop(t)}),G(H(n),\"onTouchStart\",function(t){return F=z.touch,n.handleDragStart(t)}),G(H(n),\"onTouchEnd\",function(t){return F=z.touch,n.handleDragStop(t)}),n}var n,r,a;return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&q(t,e)}(e,o.a.Component),n=e,(r=[{key:\"componentWillUnmount\",value:function(){var t=u.a.findDOMNode(this);if(t){var e=t.ownerDocument;P(e,z.mouse.move,this.handleDrag),P(e,z.touch.move,this.handleDrag),P(e,z.mouse.stop,this.handleDragStop),P(e,z.touch.stop,this.handleDragStop),this.props.enableUserSelectHack&&k(e)}}},{key:\"render\",value:function(){return o.a.cloneElement(o.a.Children.only(this.props.children),{style:_(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&W(n.prototype,r),a&&W(n,a),e}();function K(t){return(K=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function Q(){return(Q=Object.assign||function(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function $(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}()}function tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function et(t){for(var e=1;e, 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}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&it(t,e)}(e,o.a.Component),at(e,null,[{key:\"getDerivedStateFromProps\",value:function(t,e){var n=t.position,r=e.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:{x:n.x,y:n.y,prevPropsPosition:et({},n)}}}]),at(e,[{key:\"componentDidMount\",value:function(){void 0!==window.SVGElement&&u.a.findDOMNode(this)instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:\"componentWillUnmount\",value:function(){this.setState({dragging:!1})}},{key:\"render\",value:function(){var t,e=this.props,n=(e.axis,e.bounds,e.children),r=e.defaultPosition,a=e.defaultClassName,i=e.defaultClassNameDragging,s=e.defaultClassNameDragged,u=e.position,c=e.positionOffset,f=(e.scale,Z(e,[\"axis\",\"bounds\",\"children\",\"defaultPosition\",\"defaultClassName\",\"defaultClassNameDragging\",\"defaultClassNameDragged\",\"position\",\"positionOffset\",\"scale\"])),p={},d=null,g=!Boolean(u)||this.state.dragging,y=u||r,h={x:X(this)&&g?this.state.x:y.x,y:Y(this)&&g?this.state.y:y.y};this.state.isElementSVG?d=function(t,e){return C(t,e,\"\")}(h,c):p=function(t,e){var n=C(t,e,\"px\");return w({},b(\"transform\",m),n)}(h,c);var v=l()(n.props.className||\"\",a,(st(t={},i,this.state.dragging),st(t,s,this.state.dragged),t));return o.a.createElement(J,Q({},f,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),o.a.cloneElement(o.a.Children.only(n),{className:v,style:et({},n.props.style,{},p),transform:d}))}}]),e}();st(ut,\"displayName\",\"Draggable\"),st(ut,\"propTypes\",et({},J.propTypes,{axis:i.a.oneOf([\"both\",\"x\",\"y\",\"none\"]),bounds:i.a.oneOfType([i.a.shape({left:i.a.number,right:i.a.number,top:i.a.number,bottom:i.a.number}),i.a.string,i.a.oneOf([!1])]),defaultClassName:i.a.string,defaultClassNameDragging:i.a.string,defaultClassNameDragged:i.a.string,defaultPosition:i.a.shape({x:i.a.number,y:i.a.number}),positionOffset:i.a.shape({x:i.a.oneOfType([i.a.number,i.a.string]),y:i.a.oneOfType([i.a.number,i.a.string])}),position:i.a.shape({x:i.a.number,y:i.a.number}),className:y,style:y,transform:y})),st(ut,\"defaultProps\",et({},J.defaultProps,{axis:\"both\",bounds:!1,defaultClassName:\"react-draggable\",defaultClassNameDragging:\"react-draggable-dragging\",defaultClassNameDragged:\"react-draggable-dragged\",defaultPosition:{x:0,y:0},position:null,scale:1}))}])});\n//# sourceMappingURL=react-draggable.min.js.map","// @flow\nimport type { Position } from \"./utils\";\n\nexport type PositionParams = {\n margin: [number, number],\n containerPadding: [number, number],\n containerWidth: number,\n cols: number,\n rowHeight: number,\n maxRows: number\n};\n\n// Helper for generating column width\nexport function calcGridColWidth(positionParams: PositionParams): number {\n const { margin, containerPadding, containerWidth, cols } = positionParams;\n return (\n (containerWidth - margin[0] * (cols - 1) - containerPadding[0] * 2) / cols\n );\n}\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 */\nexport function calcGridItemPosition(\n positionParams: PositionParams,\n x: number,\n y: number,\n w: number,\n h: number,\n state: ?Object\n): Position {\n const { margin, containerPadding, rowHeight } = positionParams;\n const colWidth = calcGridColWidth(positionParams);\n const out = {};\n\n // If resizing, use the exact width and height as returned from resizing callbacks.\n if (state && state.resizing) {\n out.width = Math.round(state.resizing.width);\n out.height = Math.round(state.resizing.height);\n }\n // Otherwise, calculate from grid units.\n else {\n // 0 * Infinity === NaN, which causes problems with resize constraints;\n // Fix this if it occurs.\n // Note we do it here rather than later because Math.round(Infinity) causes deopt\n out.width =\n w === Infinity\n ? w\n : Math.round(colWidth * w + Math.max(0, w - 1) * margin[0]);\n out.height =\n h === Infinity\n ? h\n : Math.round(rowHeight * h + Math.max(0, h - 1) * margin[1]);\n }\n\n // If dragging, use the exact width and height as returned from dragging callbacks.\n if (state && state.dragging) {\n out.top = Math.round(state.dragging.top);\n out.left = Math.round(state.dragging.left);\n }\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/**\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 */\nexport function calcXY(\n positionParams: PositionParams,\n top: number,\n left: number,\n w: number,\n h: number\n): { x: number, y: number } {\n const { margin, cols, rowHeight, maxRows } = positionParams;\n const colWidth = calcGridColWidth(positionParams);\n\n // 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 let x = Math.round((left - margin[0]) / (colWidth + margin[0]));\n let y = Math.round((top - margin[1]) / (rowHeight + margin[1]));\n\n // Capping\n x = Math.max(Math.min(x, cols - w), 0);\n y = Math.max(Math.min(y, maxRows - h), 0);\n\n return { x, 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 */\nexport function calcWH(\n positionParams: PositionParams,\n width: number,\n height: number,\n x: number,\n y: number\n): { w: number, h: number } {\n const { margin, maxRows, cols, rowHeight } = positionParams;\n const colWidth = calcGridColWidth(positionParams);\n\n // width = colWidth * w - (margin * (w - 1))\n // ...\n // w = (width + margin) / (colWidth + margin)\n let w = Math.round((width + margin[0]) / (colWidth + margin[0]));\n let h = Math.round((height + margin[1]) / (rowHeight + margin[1]));\n\n // Capping\n w = Math.max(Math.min(w, cols - x), 0);\n h = Math.max(Math.min(h, maxRows - y), 0);\n return { w, h };\n}\n","// @flow\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport PropTypes from \"prop-types\";\nimport { DraggableCore } from \"react-draggable\";\nimport { Resizable } from \"react-resizable\";\nimport { fastPositionEqual, perc, setTopLeft, setTransform } from \"./utils\";\nimport { calcGridItemPosition, calcXY, calcWH } from \"./calculateUtils\";\nimport classNames from \"classnames\";\nimport type { Element as ReactElement, Node as ReactNode } from \"react\";\n\nimport type {\n ReactDraggableCallbackData,\n GridDragEvent,\n GridResizeEvent,\n DroppingPosition,\n Position\n} from \"./utils\";\n\nimport type { PositionParams } from \"./calculateUtils\";\n\ntype PartialPosition = { top: number, left: number };\ntype GridItemCallback = (\n i: string,\n w: number,\n h: number,\n Data\n) => void;\n\ntype State = {\n resizing: ?{ width: number, height: number },\n dragging: ?{ top: number, left: number },\n className: string\n};\n\ntype Props = {\n children: ReactElement,\n cols: number,\n containerWidth: number,\n margin: [number, number],\n containerPadding: [number, number],\n rowHeight: number,\n maxRows: number,\n isDraggable: boolean,\n isResizable: boolean,\n static?: boolean,\n useCSSTransforms?: boolean,\n usePercentages?: boolean,\n transformScale: number,\n droppingPosition?: DroppingPosition,\n\n className: string,\n style?: Object,\n // Draggability\n cancel: string,\n handle: string,\n\n x: number,\n y: number,\n w: number,\n h: number,\n\n minW: number,\n maxW: number,\n minH: number,\n maxH: number,\n i: string,\n\n onDrag?: GridItemCallback,\n onDragStart?: GridItemCallback,\n onDragStop?: GridItemCallback,\n onResize?: GridItemCallback,\n onResizeStart?: GridItemCallback,\n onResizeStop?: GridItemCallback\n};\n\n/**\n * An individual item within a ReactGridLayout.\n */\nexport default class GridItem extends React.Component {\n static propTypes = {\n // Children must be only a single element\n children: PropTypes.element,\n\n // General grid attributes\n cols: PropTypes.number.isRequired,\n containerWidth: PropTypes.number.isRequired,\n rowHeight: PropTypes.number.isRequired,\n margin: PropTypes.array.isRequired,\n maxRows: PropTypes.number.isRequired,\n containerPadding: PropTypes.array.isRequired,\n\n // These are all in grid units\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n w: PropTypes.number.isRequired,\n h: PropTypes.number.isRequired,\n\n // All optional\n minW: function(props: Props, propName: string) {\n const value = props[propName];\n if (typeof value !== \"number\") return new Error(\"minWidth not Number\");\n if (value > props.w || value > props.maxW)\n return new Error(\"minWidth larger than item width/maxWidth\");\n },\n\n maxW: function(props: Props, propName: string) {\n const value = props[propName];\n if (typeof value !== \"number\") return new Error(\"maxWidth not Number\");\n if (value < props.w || value < props.minW)\n return new Error(\"maxWidth smaller than item width/minWidth\");\n },\n\n minH: function(props: Props, propName: string) {\n const value = props[propName];\n if (typeof value !== \"number\") return new Error(\"minHeight not Number\");\n if (value > props.h || value > props.maxH)\n return new Error(\"minHeight larger than item height/maxHeight\");\n },\n\n maxH: function(props: Props, propName: string) {\n const value = props[propName];\n if (typeof value !== \"number\") return new Error(\"maxHeight not Number\");\n if (value < props.h || value < props.minH)\n return new Error(\"maxHeight smaller than item height/minHeight\");\n },\n\n // ID is nice to have for callbacks\n i: PropTypes.string.isRequired,\n\n // Functions\n onDragStop: PropTypes.func,\n onDragStart: PropTypes.func,\n onDrag: PropTypes.func,\n onResizeStop: PropTypes.func,\n onResizeStart: PropTypes.func,\n onResize: PropTypes.func,\n\n // Flags\n isDraggable: PropTypes.bool.isRequired,\n isResizable: PropTypes.bool.isRequired,\n static: PropTypes.bool,\n\n // Use CSS transforms instead of top/left\n useCSSTransforms: PropTypes.bool.isRequired,\n transformScale: PropTypes.number,\n\n // Others\n className: PropTypes.string,\n // Selector for draggable handle\n handle: PropTypes.string,\n // Selector for draggable cancel (see react-draggable)\n cancel: PropTypes.string,\n // Current position of a dropping element\n droppingPosition: PropTypes.shape({\n e: PropTypes.object.isRequired,\n left: PropTypes.number.isRequired,\n top: PropTypes.number.isRequired\n })\n };\n\n static defaultProps = {\n className: \"\",\n cancel: \"\",\n handle: \"\",\n minH: 1,\n minW: 1,\n maxH: Infinity,\n maxW: Infinity,\n transformScale: 1\n };\n\n state: State = {\n resizing: null,\n dragging: null,\n className: \"\"\n };\n\n currentNode: HTMLElement;\n\n shouldComponentUpdate(nextProps: Props, nextState: State) {\n // We can't deeply compare children. If the developer memoizes them, we can\n // use this optimization.\n if (this.props.children !== nextProps.children) return true;\n if (this.props.droppingPosition !== nextProps.droppingPosition) return true;\n // TODO memoize these calculations so they don't take so long?\n const oldPosition = calcGridItemPosition(\n this.getPositionParams(this.props),\n this.props.x,\n this.props.y,\n this.props.w,\n this.props.h,\n this.state\n );\n const newPosition = calcGridItemPosition(\n this.getPositionParams(nextProps),\n nextProps.x,\n nextProps.y,\n nextProps.w,\n nextProps.h,\n nextState\n );\n return (\n !fastPositionEqual(oldPosition, newPosition) ||\n this.props.useCSSTransforms !== nextProps.useCSSTransforms\n );\n }\n\n componentDidMount() {\n this.moveDroppingItem({});\n }\n\n componentDidUpdate(prevProps: Props) {\n this.moveDroppingItem(prevProps);\n }\n\n // When a droppingPosition is present, this means we should fire a move event, as if we had moved\n // this element by `x, y` pixels.\n moveDroppingItem(prevProps: Props) {\n const { droppingPosition } = this.props;\n if (!droppingPosition) return;\n\n const prevDroppingPosition = prevProps.droppingPosition || {\n left: 0,\n top: 0\n };\n const { dragging } = this.state;\n\n if (!this.currentNode) {\n // eslint-disable-next-line react/no-find-dom-node\n this.currentNode = ((ReactDOM.findDOMNode(this): any): HTMLElement);\n }\n\n const shouldDrag =\n (dragging && droppingPosition.left !== prevDroppingPosition.left) ||\n droppingPosition.top !== prevDroppingPosition.top;\n\n if (!dragging) {\n this.onDragStart(droppingPosition.e, {\n node: this.currentNode,\n deltaX: droppingPosition.left,\n deltaY: droppingPosition.top\n });\n } else if (shouldDrag) {\n const deltaX = droppingPosition.left - dragging.left;\n const deltaY = droppingPosition.top - dragging.top;\n\n this.onDrag(droppingPosition.e, {\n node: this.currentNode,\n deltaX,\n deltaY\n });\n }\n }\n\n getPositionParams(props: Props = this.props): PositionParams {\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 /**\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 createStyle(pos: Position): { [key: string]: ?string } {\n const { usePercentages, containerWidth, useCSSTransforms } = this.props;\n\n let style;\n // CSS Transforms support (default)\n if (useCSSTransforms) {\n style = setTransform(pos);\n } else {\n // top,left (slow)\n style = setTopLeft(pos);\n\n // This is used for server rendering.\n if (usePercentages) {\n style.left = perc(pos.left / containerWidth);\n style.width = perc(pos.width / containerWidth);\n }\n }\n\n return style;\n }\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 mixinDraggable(\n child: ReactElement,\n isDraggable: boolean\n ): ReactElement {\n return (\n \n {child}\n \n );\n }\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 mixinResizable(\n child: ReactElement,\n position: Position,\n isResizable: boolean\n ): ReactElement {\n const { cols, x, minW, minH, maxW, maxH, transformScale } = this.props;\n const positionParams = this.getPositionParams();\n\n // This is the max possible width - doesn't go to infinity because of the width of the window\n const maxWidth = calcGridItemPosition(positionParams, 0, 0, cols - x, 0)\n .width;\n\n // Calculate min/max constraints using our min & maxes\n const mins = calcGridItemPosition(positionParams, 0, 0, minW, minH);\n const maxes = calcGridItemPosition(positionParams, 0, 0, maxW, maxH);\n const minConstraints = [mins.width, mins.height];\n const maxConstraints = [\n Math.min(maxes.width, maxWidth),\n Math.min(maxes.height, Infinity)\n ];\n return (\n \n {child}\n \n );\n }\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 onDragStart = (e: Event, { node }: ReactDraggableCallbackData) => {\n if (!this.props.onDragStart) return;\n\n const newPosition: PartialPosition = { top: 0, left: 0 };\n\n // TODO: this wont work on nested parents\n const { offsetParent } = node;\n if (!offsetParent) return;\n const parentRect = offsetParent.getBoundingClientRect();\n const clientRect = node.getBoundingClientRect();\n const cLeft = clientRect.left / this.props.transformScale;\n const pLeft = parentRect.left / this.props.transformScale;\n const cTop = clientRect.top / this.props.transformScale;\n const pTop = parentRect.top / this.props.transformScale;\n newPosition.left = cLeft - pLeft + offsetParent.scrollLeft;\n newPosition.top = cTop - pTop + offsetParent.scrollTop;\n this.setState({ dragging: newPosition });\n\n const { x, y } = calcXY(\n this.getPositionParams(),\n newPosition.top,\n newPosition.left,\n this.props.w,\n this.props.h\n );\n\n return (\n this.props.onDragStart &&\n this.props.onDragStart.call(this, this.props.i, x, y, {\n e,\n node,\n newPosition\n })\n );\n };\n\n /**\n * onDrag event handler\n * @param {Event} e event data\n * @param {Object} callbackData an object with node, delta and position information\n */\n onDrag = (e: Event, { node, deltaX, deltaY }: ReactDraggableCallbackData) => {\n const { onDrag, transformScale } = this.props;\n if (!onDrag) return;\n deltaX /= transformScale;\n deltaY /= transformScale;\n\n const newPosition: PartialPosition = { top: 0, left: 0 };\n\n if (!this.state.dragging)\n throw new Error(\"onDrag called before onDragStart.\");\n newPosition.left = this.state.dragging.left + deltaX;\n newPosition.top = this.state.dragging.top + deltaY;\n this.setState({ dragging: newPosition });\n\n const { x, y } = calcXY(\n this.getPositionParams(),\n newPosition.top,\n newPosition.left,\n this.props.w,\n this.props.h\n );\n\n return (\n onDrag &&\n onDrag.call(this, this.props.i, x, y, {\n e,\n node,\n newPosition\n })\n );\n };\n\n /**\n * onDragStop event handler\n * @param {Event} e event data\n * @param {Object} callbackData an object with node, delta and position information\n */\n onDragStop = (e: Event, { node }: ReactDraggableCallbackData) => {\n if (!this.props.onDragStop) return;\n\n const newPosition: PartialPosition = { top: 0, left: 0 };\n\n if (!this.state.dragging)\n throw new Error(\"onDragEnd called before onDragStart.\");\n newPosition.left = this.state.dragging.left;\n newPosition.top = this.state.dragging.top;\n this.setState({ dragging: null });\n\n const { x, y } = calcXY(\n this.getPositionParams(),\n newPosition.top,\n newPosition.left,\n this.props.w,\n this.props.h\n );\n\n return (\n this.props.onDragStop &&\n this.props.onDragStop.call(this, this.props.i, x, y, {\n e,\n node,\n newPosition\n })\n );\n };\n\n /**\n * onResizeStop event handler\n * @param {Event} e event data\n * @param {Object} callbackData an object with node and size information\n */\n onResizeStop = (\n e: Event,\n callbackData: { node: HTMLElement, size: Position }\n ) => {\n this.onResizeHandler(e, callbackData, \"onResizeStop\");\n };\n\n /**\n * onResizeStart event handler\n * @param {Event} e event data\n * @param {Object} callbackData an object with node and size information\n */\n onResizeStart = (\n e: Event,\n callbackData: { node: HTMLElement, size: Position }\n ) => {\n this.onResizeHandler(e, callbackData, \"onResizeStart\");\n };\n\n /**\n * onResize event handler\n * @param {Event} e event data\n * @param {Object} callbackData an object with node and size information\n */\n onResize = (\n e: Event,\n callbackData: { node: HTMLElement, size: Position }\n ) => {\n this.onResizeHandler(e, callbackData, \"onResize\");\n };\n\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 onResizeHandler(\n e: Event,\n { node, size }: { node: HTMLElement, size: Position },\n handlerName: string\n ) {\n const handler = this.props[handlerName];\n if (!handler) return;\n const { cols, x, y, i, maxW, minW, maxH, minH } = this.props;\n\n // Get new XY\n let { w, h } = calcWH(\n this.getPositionParams(),\n size.width,\n size.height,\n x,\n y\n );\n\n // Cap w at numCols\n w = Math.min(w, cols - x);\n // Ensure w is at least 1\n w = Math.max(w, 1);\n\n // Min/max capping\n w = Math.max(Math.min(w, maxW), minW);\n h = Math.max(Math.min(h, maxH), minH);\n\n this.setState({ resizing: handlerName === \"onResizeStop\" ? null : size });\n\n handler.call(this, i, w, h, { e, node, size });\n }\n\n render(): ReactNode {\n const {\n x,\n y,\n w,\n h,\n isDraggable,\n isResizable,\n droppingPosition,\n useCSSTransforms\n } = this.props;\n\n const pos = calcGridItemPosition(\n this.getPositionParams(),\n x,\n y,\n w,\n h,\n this.state\n );\n const child = React.Children.only(this.props.children);\n\n // Create the child element. We clone the existing element but modify its className and style.\n let newChild = React.cloneElement(child, {\n className: classNames(\n \"react-grid-item\",\n child.props.className,\n this.props.className,\n {\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 ),\n // We can set the width and height on the child, but unfortunately we can't set the position.\n style: {\n ...this.props.style,\n ...child.props.style,\n ...this.createStyle(pos)\n }\n });\n\n // Resizable support. This is usually on but the user can toggle it off.\n newChild = this.mixinResizable(newChild, pos, isResizable);\n\n // Draggable support. This is always on, except for with placeholders.\n newChild = this.mixinDraggable(newChild, isDraggable);\n\n return newChild;\n }\n}\n","// @flow\nimport PropTypes from \"prop-types\";\nimport React from \"react\";\nimport type {\n ChildrenArray as ReactChildrenArray,\n Element as ReactElement\n} from \"react\";\nimport type { EventCallback, CompactType, Layout, LayoutItem } from \"./utils\";\n\nexport 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] | null,\n rowHeight: number,\n maxRows: number,\n isDraggable: boolean,\n isResizable: boolean,\n isDroppable: boolean,\n preventCollision: boolean,\n useCSSTransforms: boolean,\n transformScale: number,\n droppingItem: $Shape,\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 onDrop: (itemPosition: {\n x: number,\n y: number,\n w: number,\n h: number,\n e: Event\n }) => void,\n children: ReactChildrenArray>\n|};\n\nexport default {\n //\n // Basic props\n //\n className: PropTypes.string,\n style: PropTypes.object,\n\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.number,\n\n // If true, the container height swells and contracts to fit contents\n autoSize: PropTypes.bool,\n // # of cols.\n cols: PropTypes.number,\n\n // A selector that will not be draggable.\n draggableCancel: PropTypes.string,\n // A selector for the draggable handler\n draggableHandle: PropTypes.string,\n\n // Deprecated\n verticalCompact: function(props: Props) {\n if (\n props.verticalCompact === false &&\n process.env.NODE_ENV !== \"production\"\n ) {\n console.warn(\n // eslint-disable-line no-console\n \"`verticalCompact` on is deprecated and will be removed soon. \" +\n 'Use `compactType`: \"horizontal\" | \"vertical\" | null.'\n );\n }\n },\n // Choose vertical or hotizontal compaction\n compactType: PropTypes.oneOf([\"vertical\", \"horizontal\"]),\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(props: Props) {\n var layout = props.layout;\n // I hope you're setting the data-grid property on the grid items\n if (layout === undefined) return;\n require(\"./utils\").validateLayout(layout, \"layout\");\n },\n\n //\n // Grid Dimensions\n //\n\n // Margin between items [x, y] in px\n margin: PropTypes.arrayOf(PropTypes.number),\n // Padding inside the container [x, y] in px\n containerPadding: PropTypes.arrayOf(PropTypes.number),\n // Rows have a static height, but you can change this based on breakpoints if you like\n rowHeight: PropTypes.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.number,\n\n //\n // Flags\n //\n isDraggable: PropTypes.bool,\n isResizable: PropTypes.bool,\n // If true, grid items won't change position when being dragged over.\n preventCollision: PropTypes.bool,\n // Use CSS transforms instead of top/left\n useCSSTransforms: PropTypes.bool,\n // parent layout transform scale\n transformScale: PropTypes.number,\n // If true, an external element can trigger onDrop callback with a specific grid position as a parameter\n isDroppable: PropTypes.bool,\n\n //\n // Callbacks\n //\n\n // Callback so you can save the layout. Calls after each drag & resize stops.\n onLayoutChange: PropTypes.func,\n\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.func,\n // Calls on each drag movement.\n onDrag: PropTypes.func,\n // Calls when drag is complete.\n onDragStop: PropTypes.func,\n //Calls when resize starts.\n onResizeStart: PropTypes.func,\n // Calls when resize movement happens.\n onResize: PropTypes.func,\n // Calls when resize is complete.\n onResizeStop: PropTypes.func,\n // Calls when some element is dropped.\n onDrop: PropTypes.func,\n\n //\n // Other validations\n //\n\n droppingItem: PropTypes.shape({\n i: PropTypes.string.isRequired,\n w: PropTypes.number.isRequired,\n h: PropTypes.number.isRequired\n }),\n\n // Children must not have duplicate keys.\n children: function(props: Props, propName: string) {\n var children = props[propName];\n\n // Check children keys for duplicates. Throw if found.\n var keys = {};\n React.Children.forEach(children, function(child) {\n if (keys[child.key]) {\n throw new Error(\n 'Duplicate child key \"' +\n child.key +\n '\" found! This will cause problems in ReactGridLayout.'\n );\n }\n keys[child.key] = true;\n });\n }\n};\n","// @flow\nimport React from \"react\";\n\nimport isEqual from \"lodash.isequal\";\nimport classNames from \"classnames\";\nimport {\n autoBindHandlers,\n bottom,\n childrenEqual,\n cloneLayoutItem,\n compact,\n getLayoutItem,\n moveElement,\n synchronizeLayoutWithChildren,\n getAllCollisions,\n compactType,\n noop,\n fastRGLPropsEqual\n} from \"./utils\";\n\nimport { calcXY } from \"./calculateUtils\";\n\nimport GridItem from \"./GridItem\";\nimport ReactGridLayoutPropTypes from \"./ReactGridLayoutPropTypes\";\nimport type {\n ChildrenArray as ReactChildrenArray,\n Element as ReactElement\n} from \"react\";\n\n// Types\nimport type {\n CompactType,\n GridResizeEvent,\n GridDragEvent,\n DragOverEvent,\n Layout,\n DroppingPosition,\n LayoutItem\n} from \"./utils\";\n\nimport type { PositionParams } from \"./calculateUtils\";\n\ntype State = {\n activeDrag: ?LayoutItem,\n layout: Layout,\n mounted: boolean,\n oldDragItem: ?LayoutItem,\n oldLayout: ?Layout,\n oldResizeItem: ?LayoutItem,\n droppingDOMNode: ?ReactElement,\n droppingPosition?: DroppingPosition,\n // Mirrored props\n children: ReactChildrenArray>,\n compactType?: CompactType,\n propsLayout?: Layout\n};\n\nimport type { Props } from \"./ReactGridLayoutPropTypes\";\n\n// End Types\n\nconst layoutClassName = \"react-grid-layout\";\nlet isFirefox = false;\n// Try...catch will protect from navigator not existing (e.g. node) or a bad implementation of navigator\ntry {\n isFirefox = /firefox/i.test(navigator.userAgent);\n} catch (e) {\n /* Ignore */\n}\n\n/**\n * A reactive, fluid grid layout with draggable, resizable components.\n */\n\nexport default class ReactGridLayout extends React.Component {\n // TODO publish internal ReactClass displayName transform\n static displayName = \"ReactGridLayout\";\n\n // Refactored to another module to make way for preval\n static propTypes = ReactGridLayoutPropTypes;\n\n static defaultProps = {\n autoSize: true,\n cols: 12,\n className: \"\",\n style: {},\n draggableHandle: \"\",\n draggableCancel: \"\",\n containerPadding: null,\n rowHeight: 150,\n maxRows: Infinity, // infinite vertical growth\n layout: [],\n margin: [10, 10],\n isDraggable: true,\n isResizable: true,\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 onLayoutChange: noop,\n onDragStart: noop,\n onDrag: noop,\n onDragStop: noop,\n onResizeStart: noop,\n onResize: noop,\n onResizeStop: noop,\n onDrop: noop\n };\n\n state: State = {\n activeDrag: null,\n layout: synchronizeLayoutWithChildren(\n this.props.layout,\n this.props.children,\n this.props.cols,\n // Legacy support for verticalCompact: false\n compactType(this.props)\n ),\n mounted: false,\n oldDragItem: null,\n oldLayout: null,\n oldResizeItem: null,\n droppingDOMNode: null,\n children: []\n };\n\n dragEnterCounter = 0;\n\n constructor(props: Props, context: any): void {\n super(props, context);\n autoBindHandlers(this, [\n \"onDragStart\",\n \"onDrag\",\n \"onDragStop\",\n \"onResizeStart\",\n \"onResize\",\n \"onResizeStop\"\n ]);\n }\n\n componentDidMount() {\n this.setState({ 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 this.onLayoutMaybeChanged(this.state.layout, this.props.layout);\n }\n\n static getDerivedStateFromProps(nextProps: Props, prevState: State) {\n let newLayoutBase;\n\n if (prevState.activeDrag) {\n return null;\n }\n\n // Legacy support for compactType\n // Allow parent to set layout directly.\n if (\n !isEqual(nextProps.layout, prevState.propsLayout) ||\n nextProps.compactType !== prevState.compactType\n ) {\n newLayoutBase = nextProps.layout;\n } else if (!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 }\n\n // We need to regenerate the layout.\n if (newLayoutBase) {\n const newLayout = synchronizeLayoutWithChildren(\n newLayoutBase,\n nextProps.children,\n nextProps.cols,\n compactType(nextProps)\n );\n\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 shouldComponentUpdate(nextProps: Props, nextState: State) {\n return (\n // 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 ||\n !fastRGLPropsEqual(this.props, nextProps, isEqual) ||\n this.state.activeDrag !== nextState.activeDrag ||\n this.state.droppingPosition !== nextState.droppingPosition\n );\n }\n\n componentDidUpdate(prevProps: Props, prevState: State) {\n if (!this.state.activeDrag) {\n const newLayout = this.state.layout;\n const oldLayout = prevState.layout;\n\n this.onLayoutMaybeChanged(newLayout, oldLayout);\n }\n }\n\n /**\n * Calculates a pixel value for the container.\n * @return {String} Container height in pixels.\n */\n containerHeight() {\n if (!this.props.autoSize) return;\n const nbRow = bottom(this.state.layout);\n const containerPaddingY = this.props.containerPadding\n ? this.props.containerPadding[1]\n : this.props.margin[1];\n return (\n nbRow * this.props.rowHeight +\n (nbRow - 1) * this.props.margin[1] +\n containerPaddingY * 2 +\n \"px\"\n );\n }\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 onDragStart(i: string, x: number, y: number, { e, node }: GridDragEvent) {\n const { layout } = this.state;\n var l = getLayoutItem(layout, i);\n if (!l) return;\n\n this.setState({\n oldDragItem: cloneLayoutItem(l),\n oldLayout: this.state.layout\n });\n\n return this.props.onDragStart(layout, l, l, null, e, node);\n }\n\n /**\n * Each drag movement create a new dragelement and move the element to the dragged location\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 onDrag(i: string, x: number, y: number, { e, node }: GridDragEvent) {\n const { oldDragItem } = this.state;\n let { layout } = this.state;\n const { cols } = this.props;\n var l = getLayoutItem(layout, i);\n if (!l) return;\n\n // Create placeholder (display only)\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 };\n\n // Move the element to the dragged location.\n const isUserAction = true;\n layout = moveElement(\n layout,\n l,\n x,\n y,\n isUserAction,\n this.props.preventCollision,\n compactType(this.props),\n cols\n );\n\n this.props.onDrag(layout, oldDragItem, l, placeholder, e, node);\n\n this.setState({\n layout: compact(layout, compactType(this.props), cols),\n activeDrag: placeholder\n });\n }\n\n /**\n * When dragging stops, figure out which position the element is closest to and update its x and y.\n * @param {String} i Index 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 onDragStop(i: string, x: number, y: number, { e, node }: GridDragEvent) {\n if (!this.state.activeDrag) return;\n\n const { oldDragItem } = this.state;\n let { layout } = this.state;\n const { cols, preventCollision } = this.props;\n const l = getLayoutItem(layout, i);\n if (!l) return;\n\n // Move the element here\n const isUserAction = true;\n layout = moveElement(\n layout,\n l,\n x,\n y,\n isUserAction,\n preventCollision,\n compactType(this.props),\n cols\n );\n\n this.props.onDragStop(layout, oldDragItem, l, null, e, node);\n\n // Set state\n const newLayout = compact(layout, compactType(this.props), cols);\n const { oldLayout } = this.state;\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 onLayoutMaybeChanged(newLayout: Layout, oldLayout: ?Layout) {\n if (!oldLayout) oldLayout = this.state.layout;\n\n if (!isEqual(oldLayout, newLayout)) {\n this.props.onLayoutChange(newLayout);\n }\n }\n\n onResizeStart(i: string, w: number, h: number, { e, node }: GridResizeEvent) {\n const { layout } = this.state;\n var l = getLayoutItem(layout, i);\n if (!l) return;\n\n this.setState({\n oldResizeItem: cloneLayoutItem(l),\n oldLayout: this.state.layout\n });\n\n this.props.onResizeStart(layout, l, l, null, e, node);\n }\n\n onResize(i: string, w: number, h: number, { e, node }: GridResizeEvent) {\n const { layout, oldResizeItem } = this.state;\n const { cols, preventCollision } = this.props;\n const l: ?LayoutItem = getLayoutItem(layout, i);\n if (!l) return;\n\n // Something like quad tree should be used\n // to find collisions faster\n let hasCollisions;\n if (preventCollision) {\n const collisions = getAllCollisions(layout, { ...l, w, h }).filter(\n layoutItem => layoutItem.i !== l.i\n );\n hasCollisions = collisions.length > 0;\n\n // If we're colliding, we need adjust the placeholder.\n if (hasCollisions) {\n // adjust w && h to maximum allowed space\n let leastX = Infinity,\n leastY = Infinity;\n collisions.forEach(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\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 // Create placeholder element (display only)\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(layout, oldResizeItem, l, placeholder, e, node);\n\n // Re-compact the layout and set the drag placeholder.\n this.setState({\n layout: compact(layout, compactType(this.props), cols),\n activeDrag: placeholder\n });\n }\n\n onResizeStop(i: string, w: number, h: number, { e, node }: GridResizeEvent) {\n const { layout, oldResizeItem } = this.state;\n const { cols } = this.props;\n var l = getLayoutItem(layout, i);\n\n this.props.onResizeStop(layout, oldResizeItem, l, null, e, node);\n\n // Set state\n const newLayout = compact(layout, compactType(this.props), cols);\n const { oldLayout } = this.state;\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 /**\n * Create a placeholder object.\n * @return {Element} Placeholder div.\n */\n placeholder(): ?ReactElement {\n const { activeDrag } = this.state;\n if (!activeDrag) return null;\n const {\n width,\n cols,\n margin,\n containerPadding,\n rowHeight,\n maxRows,\n useCSSTransforms,\n transformScale\n } = this.props;\n\n // {...this.state.activeDrag} is pretty slow, actually\n return (\n \n
\n \n );\n }\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 processGridItem(\n child: ReactElement,\n isDroppingItem?: boolean\n ): ?ReactElement {\n if (!child || !child.key) return;\n const l = getLayoutItem(this.state.layout, String(child.key));\n if (!l) return null;\n const {\n width,\n cols,\n margin,\n containerPadding,\n rowHeight,\n maxRows,\n isDraggable,\n isResizable,\n useCSSTransforms,\n transformScale,\n draggableCancel,\n draggableHandle\n } = this.props;\n const { mounted, droppingPosition } = this.state;\n\n // 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 const draggable =\n typeof l.isDraggable === \"boolean\"\n ? l.isDraggable\n : !l.static && isDraggable;\n const resizable =\n typeof l.isResizable === \"boolean\"\n ? l.isResizable\n : !l.static && isResizable;\n\n return (\n \n {child}\n \n );\n }\n\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 onDragOver = (e: DragOverEvent) => {\n // 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 if (\n isFirefox &&\n e.nativeEvent.target.className.indexOf(layoutClassName) === -1\n ) {\n return false;\n }\n\n const {\n droppingItem,\n margin,\n cols,\n rowHeight,\n maxRows,\n width,\n containerPadding\n } = this.props;\n const { layout } = this.state;\n // This is relative to the DOM element that this event fired for.\n const { layerX, layerY } = e.nativeEvent;\n const droppingPosition = { left: layerX, top: layerY, e };\n\n if (!this.state.droppingDOMNode) {\n const positionParams: PositionParams = {\n cols,\n margin,\n maxRows,\n rowHeight,\n containerWidth: width,\n containerPadding: containerPadding || margin\n };\n\n const calculatedPosition = calcXY(\n positionParams,\n layerY,\n layerX,\n droppingItem.w,\n droppingItem.h\n );\n\n this.setState({\n droppingDOMNode:
,\n droppingPosition,\n layout: [\n ...layout,\n {\n ...droppingItem,\n x: calculatedPosition.x,\n y: calculatedPosition.y,\n static: false,\n isDraggable: true\n }\n ]\n });\n } else if (this.state.droppingPosition) {\n const { left, top } = this.state.droppingPosition;\n const shouldUpdatePosition = left != layerX || top != layerY;\n if (shouldUpdatePosition) {\n this.setState({ droppingPosition });\n }\n }\n\n e.stopPropagation();\n e.preventDefault();\n };\n\n removeDroppingPlaceholder = () => {\n const { droppingItem, cols } = this.props;\n const { layout } = this.state;\n\n const newLayout = compact(\n layout.filter(l => l.i !== droppingItem.i),\n compactType(this.props),\n cols\n );\n\n this.setState({\n layout: newLayout,\n droppingDOMNode: null,\n activeDrag: null,\n droppingPosition: undefined\n });\n };\n\n onDragLeave = () => {\n this.dragEnterCounter--;\n\n // 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 if (this.dragEnterCounter === 0) {\n this.removeDroppingPlaceholder();\n }\n };\n\n onDragEnter = () => {\n this.dragEnterCounter++;\n };\n\n onDrop = (e: Event) => {\n const { droppingItem } = this.props;\n const { layout } = this.state;\n const { x, y, w, h } = layout.find(l => l.i === droppingItem.i) || {};\n\n // reset gragEnter counter on drop\n this.dragEnterCounter = 0;\n\n this.removeDroppingPlaceholder();\n\n this.props.onDrop({ x, y, w, h, e });\n };\n\n render() {\n const { className, style, isDroppable } = this.props;\n\n const mergedClassName = classNames(layoutClassName, className);\n const mergedStyle = {\n height: this.containerHeight(),\n ...style\n };\n\n return (\n \n {React.Children.map(this.props.children, child =>\n this.processGridItem(child)\n )}\n {isDroppable &&\n this.state.droppingDOMNode &&\n this.processGridItem(this.state.droppingDOMNode, true)}\n {this.placeholder()}\n
\n );\n }\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _reactDraggable = require(\"react-draggable\");\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\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 Resizable =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Resizable, _React$Component);\n\n function Resizable() {\n var _this;\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 = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n slackW: 0,\n slackH: 0\n });\n\n return _this;\n }\n\n var _proto = Resizable.prototype;\n\n _proto.lockAspectRatio = function lockAspectRatio(width, height, aspectRatio) {\n height = width / aspectRatio;\n width = height * aspectRatio;\n return [width, height];\n } // If you do this, be careful of constraints\n ;\n\n _proto.runConstraints = function runConstraints(width, height) {\n var _ref = [this.props.minConstraints, this.props.maxConstraints],\n min = _ref[0],\n max = _ref[1];\n if (!min && !max) return [width, height]; // Fit width & height to aspect ratio\n\n if (this.props.lockAspectRatio) {\n if (height === this.props.height) {\n var ratio = this.props.width / this.props.height;\n height = width / ratio;\n width = height * ratio;\n } else {\n // Take into account vertical resize with N/S handles on locked aspect\n // ratio. Calculate the change height-first, instead of width-first\n var _ratio = this.props.height / this.props.width;\n\n width = height / _ratio;\n height = width * _ratio;\n }\n }\n\n var oldW = width,\n oldH = height; // 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\n var _this$state = this.state,\n slackW = _this$state.slackW,\n slackH = _this$state.slackH;\n width += slackW;\n height += slackH;\n\n if (min) {\n width = Math.max(min[0], width);\n height = Math.max(min[1], height);\n }\n\n if (max) {\n width = Math.min(max[0], width);\n height = Math.min(max[1], height);\n } // If the numbers changed, we must have introduced some slack. Record it for the next iteration.\n\n\n slackW += oldW - width;\n slackH += oldH - height;\n\n if (slackW !== this.state.slackW || slackH !== this.state.slackH) {\n this.setState({\n slackW: slackW,\n slackH: slackH\n });\n }\n\n return [width, height];\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 ;\n\n _proto.resizeHandler = function resizeHandler(handlerName, axis) {\n var _this2 = this;\n\n return function (e, _ref2) {\n var node = _ref2.node,\n deltaX = _ref2.deltaX,\n deltaY = _ref2.deltaY;\n deltaX /= _this2.props.transformScale;\n deltaY /= _this2.props.transformScale; // Axis restrictions\n\n var canDragX = (_this2.props.axis === 'both' || _this2.props.axis === 'x') && ['n', 's'].indexOf(axis) === -1;\n var canDragY = (_this2.props.axis === 'both' || _this2.props.axis === 'y') && ['e', 'w'].indexOf(axis) === -1; // reverse delta if using top or left drag handles\n\n if (canDragX && axis[axis.length - 1] === 'w') {\n deltaX = -deltaX;\n }\n\n if (canDragY && axis[0] === 'n') {\n deltaY = -deltaY;\n } // Update w/h\n\n\n var width = _this2.props.width + (canDragX ? deltaX : 0);\n var height = _this2.props.height + (canDragY ? deltaY : 0); // Early return if no change\n\n var widthChanged = width !== _this2.props.width,\n heightChanged = height !== _this2.props.height;\n if (handlerName === 'onResize' && !widthChanged && !heightChanged) return;\n\n var _this2$runConstraints = _this2.runConstraints(width, height);\n\n width = _this2$runConstraints[0];\n height = _this2$runConstraints[1];\n // Set the appropriate state for this handler.\n var newState = {};\n\n if (handlerName === 'onResizeStart') {// nothing\n } else if (handlerName === 'onResizeStop') {\n newState.slackW = newState.slackH = 0;\n } else {\n // Early return if no change after constraints\n if (width === _this2.props.width && height === _this2.props.height) return;\n }\n\n var hasCb = typeof _this2.props[handlerName] === 'function';\n\n if (hasCb) {\n // $FlowIgnore isn't refining this correctly to SyntheticEvent\n if (typeof e.persist === 'function') e.persist();\n\n _this2.setState(newState, function () {\n return _this2.props[handlerName](e, {\n node: node,\n size: {\n width: width,\n height: height\n },\n handle: axis\n });\n });\n } else {\n _this2.setState(newState);\n }\n };\n };\n\n _proto.renderResizeHandle = function renderResizeHandle(resizeHandle) {\n var handle = this.props.handle;\n\n if (handle) {\n if (typeof handle === 'function') {\n return handle(resizeHandle);\n }\n\n return handle;\n }\n\n return _react.default.createElement(\"span\", {\n className: \"react-resizable-handle react-resizable-handle-\" + resizeHandle\n });\n };\n\n _proto.render = function render() {\n var _this3 = this;\n\n // eslint-disable-next-line no-unused-vars\n var _this$props = this.props,\n children = _this$props.children,\n draggableOpts = _this$props.draggableOpts,\n width = _this$props.width,\n height = _this$props.height,\n handleSize = _this$props.handleSize,\n lockAspectRatio = _this$props.lockAspectRatio,\n axis = _this$props.axis,\n minConstraints = _this$props.minConstraints,\n maxConstraints = _this$props.maxConstraints,\n onResize = _this$props.onResize,\n onResizeStop = _this$props.onResizeStop,\n onResizeStart = _this$props.onResizeStart,\n resizeHandles = _this$props.resizeHandles,\n transformScale = _this$props.transformScale,\n p = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"draggableOpts\", \"width\", \"height\", \"handleSize\", \"lockAspectRatio\", \"axis\", \"minConstraints\", \"maxConstraints\", \"onResize\", \"onResizeStop\", \"onResizeStart\", \"resizeHandles\", \"transformScale\"]);\n\n var className = p.className ? p.className + \" react-resizable\" : 'react-resizable'; // 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 // Its original children (resizable's child's children), and\n // One or more draggable handles.\n\n return (0, _utils.cloneElement)(children, _objectSpread({}, p, {\n className: className,\n children: [children.props.children, resizeHandles.map(function (h) {\n return _react.default.createElement(_reactDraggable.DraggableCore, _extends({}, draggableOpts, {\n key: \"resizableHandle-\" + h,\n onStop: _this3.resizeHandler('onResizeStop', h),\n onStart: _this3.resizeHandler('onResizeStart', h),\n onDrag: _this3.resizeHandler('onResize', h)\n }), _this3.renderResizeHandle(h));\n })]\n }));\n };\n\n return Resizable;\n}(_react.default.Component);\n\nexports.default = Resizable;\n\n_defineProperty(Resizable, \"propTypes\", {\n //\n // Required Props\n //\n // Require that one and only one child be present.\n children: _propTypes.default.element.isRequired,\n // Initial w/h\n width: _propTypes.default.number.isRequired,\n height: _propTypes.default.number.isRequired,\n //\n // Optional props\n //\n // Custom resize handle\n handle: _propTypes.default.element,\n // If you change this, be sure to update your css\n handleSize: _propTypes.default.array,\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-center)\n resizeHandles: _propTypes.default.arrayOf(_propTypes.default.oneOf(['s', 'w', 'e', 'n', 'sw', 'nw', 'se', 'ne'])),\n transformScale: _propTypes.default.number,\n // If true, will only allow width/height to move in lockstep\n lockAspectRatio: _propTypes.default.bool,\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 axis: _propTypes.default.oneOf(['both', 'x', 'y', 'none']),\n // Min/max size\n minConstraints: _propTypes.default.arrayOf(_propTypes.default.number),\n maxConstraints: _propTypes.default.arrayOf(_propTypes.default.number),\n // Callbacks\n onResizeStop: _propTypes.default.func,\n onResizeStart: _propTypes.default.func,\n onResize: _propTypes.default.func,\n // These will be passed wholesale to react-draggable's DraggableCore\n draggableOpts: _propTypes.default.object\n});\n\n_defineProperty(Resizable, \"defaultProps\", {\n handleSize: [20, 20],\n lockAspectRatio: false,\n axis: 'both',\n minConstraints: [20, 20],\n maxConstraints: [Infinity, Infinity],\n resizeHandles: ['se'],\n transformScale: 1\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","module.exports = require(\"./lib/ReactGridLayout\").default;\nmodule.exports.utils = require(\"./lib/utils\");\nmodule.exports.Responsive = require(\"./lib/ResponsiveReactGridLayout\").default;\nmodule.exports.Responsive.utils = require(\"./lib/responsiveUtils\");\nmodule.exports.WidthProvider = require(\"./lib/components/WidthProvider\").default;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\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 = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\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\nexports.__esModule = true;\nexports.cloneElement = cloneElement;\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); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(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\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({}, element.props.style, {}, props.style);\n }\n\n if (props.className && element.props.className) {\n props.className = element.props.className + \" \" + props.className;\n }\n\n return _react.default.cloneElement(element, props);\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _Resizable = _interopRequireDefault(require(\"./Resizable\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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 _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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\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// An example use of Resizable.\nvar ResizableBox =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(ResizableBox, _React$Component);\n\n function ResizableBox() {\n var _this;\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 = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n width: _this.props.width,\n height: _this.props.height,\n propsWidth: _this.props.width,\n propsHeight: _this.props.height\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onResize\", function (e, data) {\n var size = data.size;\n var width = size.width,\n height = size.height;\n\n if (_this.props.onResize) {\n e.persist && e.persist();\n\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\n return _this;\n }\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\n return null;\n };\n\n var _proto = ResizableBox.prototype;\n\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 props = _objectWithoutPropertiesLoose(_this$props, [\"handle\", \"handleSize\", \"onResize\", \"onResizeStart\", \"onResizeStop\", \"draggableOpts\", \"minConstraints\", \"maxConstraints\", \"lockAspectRatio\", \"axis\", \"width\", \"height\", \"resizeHandles\"]);\n\n return _react.default.createElement(_Resizable.default, {\n handle: handle,\n handleSize: handleSize,\n width: this.state.width,\n height: this.state.height,\n onResizeStart: onResizeStart,\n onResize: this.onResize,\n onResizeStop: onResizeStop,\n draggableOpts: draggableOpts,\n minConstraints: minConstraints,\n maxConstraints: maxConstraints,\n lockAspectRatio: lockAspectRatio,\n axis: axis,\n resizeHandles: resizeHandles\n }, _react.default.createElement(\"div\", _extends({\n style: {\n width: this.state.width + 'px',\n height: this.state.height + 'px'\n }\n }, props)));\n };\n\n return ResizableBox;\n}(_react.default.Component);\n\nexports.default = ResizableBox;\n\n_defineProperty(ResizableBox, \"propTypes\", {\n height: _propTypes.default.number,\n width: _propTypes.default.number\n});\n\n_defineProperty(ResizableBox, \"defaultProps\", {\n handleSize: [20, 20]\n});","// @flow\nimport * as React from \"react\";\nimport PropTypes from \"prop-types\";\nimport isEqual from \"lodash.isequal\";\n\nimport {\n cloneLayout,\n synchronizeLayoutWithChildren,\n validateLayout,\n noop,\n type Layout\n} from \"./utils\";\nimport {\n getBreakpointFromWidth,\n getColsFromBreakpoint,\n findOrGenerateResponsiveLayout,\n type ResponsiveLayout,\n type Breakpoints,\n} from \"./responsiveUtils\";\nimport ReactGridLayout from \"./ReactGridLayout\";\n\nconst type = obj => 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\nfunction getIndentationValue(\n param: { [key: string]: [number, number] } | [number, number],\n breakpoint: string\n) {\n return Array.isArray(param) ? param : param[breakpoint];\n}\n\ntype State = {\n layout: Layout,\n breakpoint: string,\n cols: number,\n layouts?: { [key: string]: Layout }\n};\n\ntype 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 containerPadding: { [key: Breakpoint]: [number, number] } | [number, number],\n\n // Callbacks\n onBreakpointChange: (Breakpoint, cols: number) => void,\n onLayoutChange: (Layout, { [key: Breakpoint]: Layout }) => void,\n onWidthChange: (\n containerWidth: number,\n margin: [number, number],\n cols: number,\n containerPadding: [number, number] | null\n ) => void\n|};\n\nexport default class ResponsiveReactGridLayout extends React.Component<\n Props<>,\n State\n> {\n // This should only include propTypes needed in this code; RGL itself\n // will do validation of the rest props passed to it.\n static propTypes = {\n //\n // Basic props\n //\n\n // Optional, but if you are managing width yourself you may want to set the breakpoint\n // yourself as well.\n breakpoint: PropTypes.string,\n\n // {name: pxVal}, e.g. {lg: 1200, md: 996, sm: 768, xs: 480}\n breakpoints: PropTypes.object,\n\n // # of cols. This is a breakpoint -> cols map\n cols: PropTypes.object,\n\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.oneOfType([PropTypes.array, PropTypes.object]),\n\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.oneOfType([PropTypes.array, PropTypes.object]),\n\n // layouts is an object mapping breakpoints to layouts.\n // e.g. {lg: Layout, md: Layout, ...}\n layouts(props: Props<>, propName: string) {\n if (type(props[propName]) !== \"[object Object]\") {\n throw new Error(\n \"Layout property must be an object. Received: \" +\n type(props[propName])\n );\n }\n Object.keys(props[propName]).forEach(key => {\n if (!(key in props.breakpoints)) {\n throw new Error(\n \"Each key in layouts must align with a key in breakpoints.\"\n );\n }\n validateLayout(props.layouts[key], \"layouts.\" + key);\n });\n },\n\n // The width of this component.\n // Required in this propTypes stanza because generateInitialState() will fail without it.\n width: PropTypes.number.isRequired,\n\n //\n // Callbacks\n //\n\n // Calls back with breakpoint and new # cols\n onBreakpointChange: PropTypes.func,\n\n // Callback so you can save the layout.\n // Calls back with (currentLayout, allLayouts). allLayouts are keyed by breakpoint.\n onLayoutChange: PropTypes.func,\n\n // Calls back with (containerWidth, margin, cols, containerPadding)\n onWidthChange: PropTypes.func\n };\n\n static defaultProps = {\n breakpoints: { lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 },\n cols: { lg: 12, md: 10, sm: 6, xs: 4, xxs: 2 },\n layouts: {},\n margin: [10, 10],\n containerPadding: {\n lg: [0, 0],\n md: [0, 0],\n sm: [0, 0],\n xs: [0, 0],\n xxs: [0, 0]\n },\n onBreakpointChange: noop,\n onLayoutChange: noop,\n onWidthChange: noop\n };\n\n state = this.generateInitialState();\n\n generateInitialState(): State {\n const { width, breakpoints, layouts, cols } = this.props;\n const breakpoint = getBreakpointFromWidth(breakpoints, width);\n const colNo = getColsFromBreakpoint(breakpoint, cols);\n // verticalCompact compatibility, now deprecated\n const compactType =\n this.props.verticalCompact === false ? null : this.props.compactType;\n // Get the initial layout. This can tricky; we try to generate one however possible if one doesn't exist\n // for this layout.\n const initialLayout = findOrGenerateResponsiveLayout(\n layouts,\n breakpoints,\n breakpoint,\n breakpoint,\n colNo,\n compactType\n );\n\n return {\n layout: initialLayout,\n breakpoint: breakpoint,\n cols: colNo\n };\n }\n\n static getDerivedStateFromProps(nextProps: Props<*>, prevState: State) {\n if (!isEqual(nextProps.layouts, prevState.layouts)) {\n // Allow parent to set layouts directly.\n const { breakpoint, cols } = prevState;\n\n // Since we're setting an entirely new layout object, we must generate a new responsive layout\n // if one does not exist.\n const newLayout = findOrGenerateResponsiveLayout(\n nextProps.layouts,\n nextProps.breakpoints,\n breakpoint,\n breakpoint,\n cols,\n nextProps.compactType\n );\n return { layout: newLayout, layouts: nextProps.layouts };\n }\n\n return null;\n }\n\n componentDidUpdate(prevProps: Props<*>) {\n // Allow parent to set width or breakpoint directly.\n if (\n this.props.width != prevProps.width ||\n this.props.breakpoint !== prevProps.breakpoint ||\n !isEqual(this.props.breakpoints, prevProps.breakpoints) ||\n !isEqual(this.props.cols, prevProps.cols)\n ) {\n this.onWidthChange(prevProps);\n }\n }\n\n // wrap layouts so we do not need to pass layouts to child\n onLayoutChange = (layout: Layout) => {\n this.props.onLayoutChange(layout, {\n ...this.props.layouts,\n [this.state.breakpoint]: layout\n });\n };\n\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 onWidthChange(prevProps: Props<*>) {\n const { breakpoints, cols, layouts, compactType } = this.props;\n const newBreakpoint =\n this.props.breakpoint ||\n getBreakpointFromWidth(this.props.breakpoints, this.props.width);\n\n const lastBreakpoint = this.state.breakpoint;\n const newCols: number = getColsFromBreakpoint(newBreakpoint, cols);\n const newLayouts = { ...layouts };\n\n // Breakpoint change\n if (\n lastBreakpoint !== newBreakpoint ||\n prevProps.breakpoints !== breakpoints ||\n prevProps.cols !== cols\n ) {\n // Preserve the current layout if the current breakpoint is not present in the next layouts.\n if (!(lastBreakpoint in newLayouts))\n newLayouts[lastBreakpoint] = cloneLayout(this.state.layout);\n\n // Find or generate a new layout.\n let layout = findOrGenerateResponsiveLayout(\n newLayouts,\n breakpoints,\n newBreakpoint,\n lastBreakpoint,\n newCols,\n compactType\n );\n\n // This adds missing items.\n layout = synchronizeLayoutWithChildren(\n layout,\n this.props.children,\n newCols,\n compactType\n );\n\n // Store the new layout.\n newLayouts[newBreakpoint] = layout;\n\n // callbacks\n this.props.onLayoutChange(layout, newLayouts);\n this.props.onBreakpointChange(newBreakpoint, newCols);\n\n this.setState({\n breakpoint: newBreakpoint,\n layout: layout,\n cols: newCols\n });\n }\n\n const margin = getIndentationValue(this.props.margin, newBreakpoint);\n const containerPadding = getIndentationValue(\n this.props.containerPadding,\n newBreakpoint\n );\n\n //call onWidthChange on every change of width, not only on breakpoint changes\n this.props.onWidthChange(\n this.props.width,\n margin,\n newCols,\n containerPadding\n );\n }\n\n render() {\n /* eslint-disable no-unused-vars */\n const {\n breakpoint,\n breakpoints,\n cols,\n layouts,\n margin,\n containerPadding,\n onBreakpointChange,\n onLayoutChange,\n onWidthChange,\n ...other\n } = this.props;\n /* eslint-enable no-unused-vars */\n\n return (\n \n );\n }\n}\n","// @flow\nimport * as React from \"react\";\nimport PropTypes from \"prop-types\";\nimport ReactDOM from \"react-dom\";\n\ntype WPDefaultProps = {|\n measureBeforeMount: boolean\n|};\n\n// eslint-disable-next-line no-unused-vars\ntype WPProps = {|\n className?: string,\n style?: Object,\n ...WPDefaultProps\n|};\n\ntype WPState = {|\n width: number\n|};\n\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 */\nexport default function WidthProvider(\n ComposedComponent: React.AbstractComponent\n): React.AbstractComponent<{|\n ...Config,\n measureBeforeMount?: boolean,\n className?: string,\n style?: Object,\n width?: number\n|}> {\n return class WidthProvider extends React.Component<\n {|\n ...Config,\n measureBeforeMount?: boolean,\n className?: string,\n style?: Object,\n width?: number\n |},\n WPState\n > {\n static defaultProps: WPDefaultProps = {\n measureBeforeMount: false\n };\n\n static 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.bool\n };\n\n state = {\n width: 1280\n };\n\n mounted: boolean = false;\n\n componentDidMount() {\n this.mounted = true;\n\n window.addEventListener(\"resize\", this.onWindowResize);\n // 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 this.onWindowResize();\n }\n\n componentWillUnmount() {\n this.mounted = false;\n window.removeEventListener(\"resize\", this.onWindowResize);\n }\n\n onWindowResize = () => {\n if (!this.mounted) return;\n // eslint-disable-next-line react/no-find-dom-node\n const node = ReactDOM.findDOMNode(this); // Flow casts this to Text | Element\n if (node instanceof HTMLElement)\n this.setState({ width: node.offsetWidth });\n };\n\n render() {\n const { measureBeforeMount, ...rest } = this.props;\n if (measureBeforeMount && !this.mounted) {\n return (\n
\n );\n }\n\n return ;\n }\n };\n}\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://ReactGridLayout/webpack/universalModuleDefinition","webpack://ReactGridLayout/webpack/bootstrap","webpack://ReactGridLayout/./node_modules/prop-types/index.js","webpack://ReactGridLayout/./lib/utils.js","webpack://ReactGridLayout/external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","webpack://ReactGridLayout/./node_modules/lodash.isequal/index.js","webpack://ReactGridLayout/./lib/responsiveUtils.js","webpack://ReactGridLayout/external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}","webpack://ReactGridLayout/./node_modules/classnames/index.js","webpack://ReactGridLayout/./node_modules/react-draggable/build/web/react-draggable.min.js","webpack://ReactGridLayout/./lib/calculateUtils.js","webpack://ReactGridLayout/./lib/GridItem.jsx","webpack://ReactGridLayout/./lib/ReactGridLayoutPropTypes.js","webpack://ReactGridLayout/./lib/ReactGridLayout.jsx","webpack://ReactGridLayout/./node_modules/react-resizable/build/Resizable.js","webpack://ReactGridLayout/./node_modules/react-resizable/index.js","webpack://ReactGridLayout/./index-dev.js","webpack://ReactGridLayout/(webpack)/buildin/global.js","webpack://ReactGridLayout/(webpack)/buildin/module.js","webpack://ReactGridLayout/./node_modules/prop-types/factoryWithThrowingShims.js","webpack://ReactGridLayout/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://ReactGridLayout/./node_modules/react-resizable/build/utils.js","webpack://ReactGridLayout/./node_modules/react-resizable/build/ResizableBox.js","webpack://ReactGridLayout/./lib/ResponsiveReactGridLayout.jsx","webpack://ReactGridLayout/./lib/components/WidthProvider.jsx"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__2__","__WEBPACK_EXTERNAL_MODULE__5__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","bottom","layout","bottomY","max","len","length","y","h","cloneLayout","newLayout","Array","cloneLayoutItem","layoutItem","w","x","minW","maxW","minH","maxH","moved","Boolean","static","isDraggable","isResizable","isBounded","childrenEqual","a","b","isEqual","React","Children","map","fastRGLPropsEqual","fastPositionEqual","left","top","width","height","collides","l1","l2","compact","compactType","cols","compareWith","getStatics","sorted","sortLayoutItems","out","compactItem","push","indexOf","heightWidth","resolveCompactionCollision","item","moveToCoord","axis","sizeProp","otherItem","fullLayout","compactH","Math","min","getFirstCollision","correctBounds","bounds","collidesWith","getLayoutItem","id","getAllCollisions","filter","moveElement","isUserAction","preventCollision","log","String","oldX","oldY","reverse","collisions","collision","moveElementAwayFromCollision","itemToMove","compactV","fakeItem","undefined","perc","num","setTransform","translate","transform","WebkitTransform","MozTransform","msTransform","OTransform","position","setTopLeft","sortLayoutItemsByColRow","sortLayoutItemsByRowCol","slice","sort","synchronizeLayoutWithChildren","initialLayout","children","forEach","child","exists","g","props","_grid","validateLayout","contextName","subProps","isArray","Error","j","verticalCompact","autoBindHandlers","el","fns","noop","argsTag","mapTag","objectTag","setTag","reIsHostCtor","reIsUint","typedArrayTags","freeGlobal","global","freeSelf","self","Function","freeExports","nodeType","freeModule","moduleExports","freeProcess","process","nodeUtil","binding","e","nodeIsTypedArray","isTypedArray","arraySome","array","predicate","index","mapToArray","result","size","setToArray","set","uid","func","arrayProto","funcProto","objectProto","coreJsData","funcToString","toString","maskSrcKey","exec","keys","IE_PROTO","nativeObjectToString","reIsNative","RegExp","replace","Buffer","Uint8Array","propertyIsEnumerable","splice","symToStringTag","nativeGetSymbols","getOwnPropertySymbols","nativeIsBuffer","isBuffer","nativeKeys","arg","DataView","getNative","Map","Promise","Set","WeakMap","nativeCreate","dataViewCtorString","toSource","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","symbolValueOf","valueOf","Hash","entries","this","clear","entry","ListCache","MapCache","SetCache","values","__data__","add","Stack","data","arrayLikeKeys","inherited","isArr","isArg","isArguments","isBuff","isType","skipIndexes","iteratee","baseTimes","isIndex","assocIndexOf","eq","baseGetTag","isOwn","tag","unmasked","getRawTag","objectToString","baseIsArguments","isObjectLike","baseIsEqual","other","bitmask","customizer","stack","equalFunc","objIsArr","othIsArr","objTag","getTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","byteLength","byteOffset","buffer","message","convert","isPartial","stacked","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","objProps","getAllKeys","objLength","othLength","skipCtor","objValue","othValue","compared","objCtor","constructor","othCtor","equalObjects","baseIsEqualDeep","baseIsNative","isObject","isMasked","isFunction","test","baseKeys","Ctor","proto","arrLength","seen","arrValue","othIndex","has","keysFunc","symbolsFunc","offset","arrayPush","baseGetAllKeys","getSymbols","getMapData","type","getValue","pop","pairs","LARGE_ARRAY_SIZE","resIndex","arrayFilter","symbol","ArrayBuffer","resolve","ctorString","arguments","isLength","baseUnary","getBreakpointFromWidth","breakpoints","sortBreakpoints","matching","breakpointName","getColsFromBreakpoint","breakpoint","findOrGenerateResponsiveLayout","layouts","lastBreakpoint","breakpointsSorted","breakpointsAbove","hasOwn","classNames","classes","argType","inner","apply","join","default","DraggableCore","resetWarningCache","isRequired","bool","number","string","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","u","f","isNaN","parseInt","concat","toUpperCase","document","documentElement","style","v","getOwnPropertyDescriptor","configurable","writable","O","S","D","parentNode","attachEvent","addEventListener","P","detachEvent","removeEventListener","clientHeight","ownerDocument","defaultView","getComputedStyle","borderTopWidth","borderBottomWidth","E","clientWidth","borderLeftWidth","borderRightWidth","T","paddingTop","paddingBottom","N","paddingLeft","paddingRight","C","M","getElementById","createElement","innerHTML","getElementsByTagName","appendChild","body","classList","className","match","k","remove","selection","empty","getSelection","removeAllRanges","_","getOwnPropertyDescriptors","defineProperties","touchAction","X","Y","L","targetTouches","identifier","changedTouches","I","getBoundingClientRect","clientX","scrollLeft","clientY","scrollTop","offsetParent","scale","R","state","lastX","deltaX","deltaY","lastY","A","findDOMNode","U","iterator","V","next","done","return","TypeError","W","B","setPrototypeOf","getPrototypeOf","__proto__","H","ReferenceError","q","G","z","start","move","stop","F","J","dragging","NaN","touchIdentifier","onMouseDown","allowAnyClick","button","disabled","target","Node","handle","cancel","setState","onStart","enableUserSelectHack","handleDrag","handleDragStop","preventDefault","grid","round","onDrag","MouseEvent","createEvent","initMouseEvent","onStop","handleDragStart","Component","cloneElement","only","onTouchStart","onMouseUp","onTouchEnd","K","Q","assign","tt","et","st","nt","rt","ot","at","it","ut","dragged","slackX","slackY","$","right","querySelector","HTMLElement","offsetLeft","marginLeft","offsetTop","marginTop","marginRight","marginBottom","defaultPosition","prevPropsPosition","isElementSVG","console","warn","SVGElement","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","positionOffset","Z","onDragStart","onDragStop","propTypes","defaultProps","calcGridColWidth","positionParams","margin","containerPadding","containerWidth","calcGridItemWHPx","gridUnits","colOrRowSize","marginPx","Number","isFinite","calcGridItemPosition","rowHeight","colWidth","resizing","calcXY","maxRows","clamp","lowerBound","upperBound","GridItem","newPosition","parentRect","clientRect","cLeft","transformScale","pLeft","cTop","pTop","getPositionParams","callbackData","onResizeHandler","nextProps","nextState","droppingPosition","oldPosition","useCSSTransforms","moveDroppingItem","prevProps","prevDroppingPosition","currentNode","ReactDOM","shouldDrag","pos","usePercentages","maxWidth","mins","maxes","minConstraints","maxConstraints","Infinity","draggableOpts","onResizeStop","onResizeStart","onResize","handlerName","handler","calcWH","newChild","dropping","cssTransforms","createStyle","mixinResizable","mixinDraggable","propName","autoSize","draggableCancel","draggableHandle","isDroppable","onLayoutChange","onDrop","droppingItem","innerRef","isFirefox","navigator","userAgent","ReactGridLayout","context","activeDrag","mounted","oldDragItem","oldLayout","oldResizeItem","droppingDOMNode","nativeEvent","layerX","layerY","calculatedPosition","stopPropagation","dragEnterCounter","removeDroppingPlaceholder","find","prevState","newLayoutBase","propsLayout","onLayoutMaybeChanged","nbRow","containerPaddingY","placeholder","hasCollisions","leastX","leastY","isDroppingItem","draggable","resizable","bounded","mergedClassName","mergedStyle","containerHeight","ref","onDragLeave","onDragEnter","onDragOver","processGridItem","ReactGridLayoutPropTypes","_react","_interopRequireDefault","_propTypes","_reactDraggable","_utils","obj","_extends","source","ownKeys","enumerableOnly","symbols","sym","_assertThisInitialized","_defineProperty","Resizable","_React$Component","subClass","superClass","_this","_len","args","_key","slackW","slackH","_proto","lockAspectRatio","aspectRatio","runConstraints","_ref","ratio","_ratio","oldW","oldH","_this$state","resizeHandler","_this2","_ref2","canDragX","canDragY","widthChanged","heightChanged","_this2$runConstraints","newState","persist","renderResizeHandle","resizeHandle","render","_this3","_this$props","resizeHandles","handleSize","excluded","sourceKeys","_objectWithoutPropertiesLoose","_objectSpread","ResizableBox","utils","Responsive","WidthProvider","webpackPolyfill","deprecate","paths","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","shim","componentName","location","propFullName","secret","err","getShim","ReactPropTypes","_Resizable","propsWidth","propsHeight","getDerivedStateFromProps","getIndentationValue","param","ResponsiveReactGridLayout","generateInitialState","colNo","onWidthChange","newBreakpoint","newCols","newLayouts","onBreakpointChange","lg","md","sm","xs","xxs","ComposedComponent","offsetWidth","onWindowResize","measureBeforeMount","rest"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,SAAUA,QAAQ,cAC1B,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,QAAS,aAAcJ,GACL,iBAAZC,QACdA,QAAyB,gBAAID,EAAQG,QAAQ,SAAUA,QAAQ,cAE/DJ,EAAsB,gBAAIC,EAAQD,EAAY,MAAGA,EAAe,UARlE,CASGO,QAAQ,SAASC,EAAgCC,GACpD,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUV,QAGnC,IAAIC,EAASO,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHZ,QAAS,IAUV,OANAa,EAAQH,GAAUI,KAAKb,EAAOD,QAASC,EAAQA,EAAOD,QAASS,GAG/DR,EAAOW,GAAI,EAGJX,EAAOD,QA0Df,OArDAS,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASjB,EAASkB,EAAMC,GAC3CV,EAAoBW,EAAEpB,EAASkB,IAClCG,OAAOC,eAAetB,EAASkB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAASzB,GACX,oBAAX0B,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAetB,EAAS0B,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAA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inition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"react-dom\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactGridLayout\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"ReactGridLayout\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__5__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 11);\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\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","// @flow\nimport isEqual from \"lodash.isequal\";\nimport React from \"react\";\nimport type {\n ChildrenArray as ReactChildrenArray,\n Element as ReactElement\n} from \"react\";\nexport type LayoutItem = {\n w: number,\n h: number,\n x: number,\n y: number,\n i: string,\n minW?: number,\n minH?: number,\n maxW?: number,\n maxH?: number,\n moved?: boolean,\n static?: boolean,\n isDraggable?: ?boolean,\n isResizable?: ?boolean,\n isBounded?: ?boolean\n};\nexport type Layout = $ReadOnlyArray;\nexport type Position = {\n left: number,\n top: number,\n width: number,\n height: number\n};\nexport type ReactDraggableCallbackData = {\n node: HTMLElement,\n x?: number,\n y?: number,\n deltaX: number,\n deltaY: number,\n lastX?: number,\n lastY?: number\n};\n\nexport type PartialPosition = { left: number, top: number };\nexport type DroppingPosition = { left: number, top: number, e: Event };\nexport type Size = { width: number, height: number };\nexport type GridDragEvent = {\n e: Event,\n node: HTMLElement,\n newPosition: PartialPosition\n};\nexport type GridResizeEvent = { e: Event, node: HTMLElement, size: Size };\nexport type DragOverEvent = MouseEvent & {\n nativeEvent: {\n layerX: number,\n layerY: number,\n target: {\n className: String\n }\n }\n};\n\ntype REl = ReactElement;\nexport type ReactChildren = ReactChildrenArray;\n\n// All callbacks are of the signature (layout, oldItem, newItem, placeholder, e).\nexport type EventCallback = (\n Layout,\n oldItem: ?LayoutItem,\n newItem: ?LayoutItem,\n placeholder: ?LayoutItem,\n Event,\n ?HTMLElement\n) => void;\nexport type CompactType = ?(\"horizontal\" | \"vertical\");\n\nconst isProduction = process.env.NODE_ENV === \"production\";\nconst DEBUG = false;\n\n/**\n * Return the bottom coordinate of the layout.\n *\n * @param {Array} layout Layout array.\n * @return {Number} Bottom coordinate.\n */\nexport function bottom(layout: Layout): number {\n let max = 0,\n bottomY;\n for (let i = 0, len = layout.length; i < len; i++) {\n bottomY = layout[i].y + layout[i].h;\n if (bottomY > max) max = bottomY;\n }\n return max;\n}\n\nexport function cloneLayout(layout: Layout): Layout {\n const newLayout = Array(layout.length);\n for (let i = 0, len = layout.length; i < len; i++) {\n newLayout[i] = cloneLayoutItem(layout[i]);\n }\n return newLayout;\n}\n\n// Fast path to cloning, since this is monomorphic\nexport function cloneLayoutItem(layoutItem: LayoutItem): LayoutItem {\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 isBounded: layoutItem.isBounded\n };\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 */\nexport function childrenEqual(a: ReactChildren, b: ReactChildren): boolean {\n return isEqual(\n React.Children.map(a, c => c.key),\n React.Children.map(b, c => c.key)\n );\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 */\ntype FastRGLPropsEqual = (Object, Object, Function) => boolean;\nexport const fastRGLPropsEqual: FastRGLPropsEqual = require(\"./fastRGLPropsEqual\");\n\n// Like the above, but a lot simpler.\nexport function fastPositionEqual(a: Position, b: Position) {\n return (\n a.left === b.left &&\n a.top === b.top &&\n a.width === b.width &&\n a.height === b.height\n );\n}\n\n/**\n * Given two layoutitems, check if they collide.\n */\nexport function collides(l1: LayoutItem, l2: LayoutItem): boolean {\n if (l1.i === l2.i) return false; // same element\n if (l1.x + l1.w <= l2.x) return false; // l1 is left of l2\n if (l1.x >= l2.x + l2.w) return false; // l1 is right of l2\n if (l1.y + l1.h <= l2.y) return false; // l1 is above l2\n if (l1.y >= l2.y + l2.h) return false; // l1 is below l2\n return true; // boxes overlap\n}\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 */\nexport function compact(\n layout: Layout,\n compactType: CompactType,\n cols: number\n): Layout {\n // Statics go in the compareWith array right away so items flow around them.\n const compareWith = getStatics(layout);\n // We go through the items by row and column.\n const sorted = sortLayoutItems(layout, compactType);\n // Holding for new items.\n const out = Array(layout.length);\n\n for (let i = 0, len = sorted.length; i < len; i++) {\n let l = cloneLayoutItem(sorted[i]);\n\n // Don't move static elements\n if (!l.static) {\n l = compactItem(compareWith, l, compactType, cols, sorted);\n\n // Add to comparison array. We only collide with items before this one.\n // Statics are already in this array.\n compareWith.push(l);\n }\n\n // Add to output array to make sure they still come out in the right order.\n out[layout.indexOf(sorted[i])] = l;\n\n // Clear moved flag, if it exists.\n l.moved = false;\n }\n\n return out;\n}\n\nconst heightWidth = { x: \"w\", y: \"h\" };\n/**\n * Before moving item down, it will check if the movement will cause collisions and move those items down before.\n */\nfunction resolveCompactionCollision(\n layout: Layout,\n item: LayoutItem,\n moveToCoord: number,\n axis: \"x\" | \"y\"\n) {\n const sizeProp = heightWidth[axis];\n item[axis] += 1;\n const itemIndex = layout\n .map(layoutItem => {\n return layoutItem.i;\n })\n .indexOf(item.i);\n\n // Go through each item we collide with.\n for (let i = itemIndex + 1; i < layout.length; i++) {\n const otherItem = layout[i];\n // Ignore static items\n if (otherItem.static) continue;\n\n // 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 if (otherItem.y > item.y + item.h) break;\n\n if (collides(item, otherItem)) {\n resolveCompactionCollision(\n layout,\n otherItem,\n moveToCoord + item[sizeProp],\n axis\n );\n }\n }\n\n item[axis] = moveToCoord;\n}\n\n/**\n * Compact an item in the layout.\n *\n * Modifies item.\n *\n */\nexport function compactItem(\n compareWith: Layout,\n l: LayoutItem,\n compactType: CompactType,\n cols: number,\n fullLayout: Layout\n): LayoutItem {\n const compactV = compactType === \"vertical\";\n const compactH = compactType === \"horizontal\";\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);\n // Move the element up as far as it can go without colliding.\n while (l.y > 0 && !getFirstCollision(compareWith, l)) {\n l.y--;\n }\n } else if (compactH) {\n l.y = Math.min(bottom(compareWith), l.y);\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 }\n\n // Move it down, and keep moving it down if it's colliding.\n let collides;\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 }\n // Since we can't grow without bounds horizontally, if we've overflown, let's move it down and try again.\n if (compactH && l.x + l.w > cols) {\n l.x = cols - l.w;\n l.y++;\n }\n }\n return l;\n}\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 */\nexport function correctBounds(\n layout: Layout,\n bounds: { cols: number }\n): Layout {\n const collidesWith = getStatics(layout);\n for (let i = 0, len = layout.length; i < len; i++) {\n const l = layout[i];\n // Overflows right\n if (l.x + l.w > bounds.cols) l.x = bounds.cols - l.w;\n // Overflows left\n if (l.x < 0) {\n l.x = 0;\n l.w = bounds.cols;\n }\n if (!l.static) collidesWith.push(l);\n 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 return layout;\n}\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 */\nexport function getLayoutItem(layout: Layout, id: string): ?LayoutItem {\n for (let i = 0, len = layout.length; i < len; i++) {\n if (layout[i].i === id) return layout[i];\n }\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 */\nexport function getFirstCollision(\n layout: Layout,\n layoutItem: LayoutItem\n): ?LayoutItem {\n for (let i = 0, len = layout.length; i < len; i++) {\n if (collides(layout[i], layoutItem)) return layout[i];\n }\n}\n\nexport function getAllCollisions(\n layout: Layout,\n layoutItem: LayoutItem\n): Array {\n return layout.filter(l => 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 */\nexport function getStatics(layout: Layout): Array {\n return layout.filter(l => 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 */\nexport function moveElement(\n layout: Layout,\n l: LayoutItem,\n x: ?number,\n y: ?number,\n isUserAction: ?boolean,\n preventCollision: ?boolean,\n compactType: CompactType,\n cols: number\n): Layout {\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;\n\n // Short-circuit if nothing to do.\n if (l.y === y && l.x === x) return layout;\n\n log(\n `Moving element ${l.i} to [${String(x)},${String(y)}] from [${l.x},${l.y}]`\n );\n const oldX = l.x;\n const oldY = l.y;\n\n // This is quite a bit faster than extending the object\n if (typeof x === \"number\") l.x = x;\n if (typeof y === \"number\") l.y = y;\n l.moved = true;\n\n // 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 let sorted = sortLayoutItems(layout, compactType);\n const movingUp =\n compactType === \"vertical\" && typeof y === \"number\"\n ? oldY >= y\n : compactType === \"horizontal\" && typeof x === \"number\"\n ? oldX >= x\n : false;\n // $FlowIgnore acceptable modification of read-only array as it was recently cloned\n if (movingUp) sorted = sorted.reverse();\n const collisions = getAllCollisions(sorted, l);\n\n // There was a collision; abort\n if (preventCollision && collisions.length) {\n log(`Collision prevented on ${l.i}, reverting.`);\n l.x = oldX;\n l.y = oldY;\n l.moved = false;\n return layout;\n }\n\n // Move each item that collides away from this element.\n for (let i = 0, len = collisions.length; i < len; i++) {\n const collision = collisions[i];\n log(\n `Resolving collision between ${l.i} at [${l.x},${l.y}] and ${collision.i} at [${collision.x},${collision.y}]`\n );\n\n // Short circuit so we can't infinite loop\n if (collision.moved) continue;\n\n // Don't move static items - we have to move *this* element away\n if (collision.static) {\n layout = moveElementAwayFromCollision(\n layout,\n collision,\n l,\n isUserAction,\n compactType,\n cols\n );\n } else {\n layout = moveElementAwayFromCollision(\n layout,\n l,\n collision,\n isUserAction,\n compactType,\n cols\n );\n }\n }\n\n return layout;\n}\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 */\nexport function moveElementAwayFromCollision(\n layout: Layout,\n collidesWith: LayoutItem,\n itemToMove: LayoutItem,\n isUserAction: ?boolean,\n compactType: CompactType,\n cols: number\n): Layout {\n const compactH = compactType === \"horizontal\";\n // Compact vertically if not set to horizontal\n const compactV = compactType !== \"horizontal\";\n const preventCollision = collidesWith.static; // we're already colliding (not for static items)\n\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 if (isUserAction) {\n // Reset isUserAction flag because we're not in the main collision anymore.\n isUserAction = false;\n\n // Make a mock item so we don't modify the item here, only modify in moveElement.\n const fakeItem: LayoutItem = {\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 };\n\n // No collision? If so, we can go up there; otherwise, we'll end up moving down as normal\n if (!getFirstCollision(layout, fakeItem)) {\n log(\n `Doing reverse collision on ${itemToMove.i} up to [${fakeItem.x},${fakeItem.y}].`\n );\n return moveElement(\n layout,\n itemToMove,\n compactH ? fakeItem.x : undefined,\n compactV ? fakeItem.y : undefined,\n isUserAction,\n preventCollision,\n compactType,\n cols\n );\n }\n }\n\n return moveElement(\n layout,\n itemToMove,\n compactH ? itemToMove.x + 1 : undefined,\n compactV ? itemToMove.y + 1 : undefined,\n isUserAction,\n preventCollision,\n compactType,\n cols\n );\n}\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 */\nexport function perc(num: number): string {\n return num * 100 + \"%\";\n}\n\nexport function setTransform({ top, left, width, height }: Position): Object {\n // Replace unitless items with px\n const translate = `translate(${left}px,${top}px)`;\n return {\n transform: translate,\n WebkitTransform: translate,\n MozTransform: translate,\n msTransform: translate,\n OTransform: translate,\n width: `${width}px`,\n height: `${height}px`,\n position: \"absolute\"\n };\n}\n\nexport function setTopLeft({ top, left, width, height }: Position): Object {\n return {\n top: `${top}px`,\n left: `${left}px`,\n width: `${width}px`,\n height: `${height}px`,\n position: \"absolute\"\n };\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 */\nexport function sortLayoutItems(\n layout: Layout,\n compactType: CompactType\n): Layout {\n if (compactType === \"horizontal\") return sortLayoutItemsByColRow(layout);\n else return sortLayoutItemsByRowCol(layout);\n}\n\n/**\n * Sort layout items by row ascending and column ascending.\n *\n * Does not modify Layout.\n */\nexport function sortLayoutItemsByRowCol(layout: Layout): Layout {\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 return -1;\n });\n}\n\n/**\n * Sort layout items by column ascending then row ascending.\n *\n * Does not modify Layout.\n */\nexport function sortLayoutItemsByColRow(layout: Layout): Layout {\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 return -1;\n });\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 */\nexport function synchronizeLayoutWithChildren(\n initialLayout: Layout,\n children: ReactChildren,\n cols: number,\n compactType: CompactType\n): Layout {\n initialLayout = initialLayout || [];\n\n // Generate one layout item per child.\n const layout: LayoutItem[] = [];\n React.Children.forEach(children, (child: ReactElement, i: number) => {\n // Don't overwrite if it already exists.\n const exists = getLayoutItem(initialLayout, String(child.key));\n if (exists) {\n layout[i] = cloneLayoutItem(exists);\n } else {\n if (!isProduction && child.props._grid) {\n console.warn(\n \"`_grid` properties on children have been deprecated as of React 15.2. \" + // eslint-disable-line\n \"Please use `data-grid` or add your properties directly to the `layout`.\"\n );\n }\n const g = child.props[\"data-grid\"] || child.props._grid;\n\n // Hey, this item has a data-grid property, use it.\n if (g) {\n if (!isProduction) {\n validateLayout([g], \"ReactGridLayout.children\");\n }\n layout[i] = cloneLayoutItem({ ...g, i: child.key });\n } else {\n // Nothing provided: ensure this is added to the bottom\n layout[i] = cloneLayoutItem({\n w: 1,\n h: 1,\n x: 0,\n y: bottom(layout),\n i: String(child.key)\n });\n }\n }\n });\n\n // Correct the layout.\n const correctedLayout = correctBounds(layout, { cols: cols });\n return compact(correctedLayout, compactType, cols);\n}\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 */\nexport function validateLayout(\n layout: Layout,\n contextName: string = \"Layout\"\n): void {\n const subProps = [\"x\", \"y\", \"w\", \"h\"];\n if (!Array.isArray(layout))\n throw new Error(contextName + \" must be an array!\");\n for (let i = 0, len = layout.length; i < len; i++) {\n const item = layout[i];\n for (let j = 0; j < subProps.length; j++) {\n if (typeof item[subProps[j]] !== \"number\") {\n throw new Error(\n \"ReactGridLayout: \" +\n contextName +\n \"[\" +\n i +\n \"].\" +\n subProps[j] +\n \" must be a number!\"\n );\n }\n }\n if (item.i && typeof item.i !== \"string\") {\n throw new Error(\n \"ReactGridLayout: \" + contextName + \"[\" + i + \"].i must be a string!\"\n );\n }\n if (item.static !== undefined && typeof item.static !== \"boolean\") {\n throw new Error(\n \"ReactGridLayout: \" +\n contextName +\n \"[\" +\n i +\n \"].static must be a boolean!\"\n );\n }\n }\n}\n\n// Legacy support for verticalCompact: false\nexport function compactType(\n props: ?{ verticalCompact: boolean, compactType: CompactType }\n): CompactType {\n const { verticalCompact, compactType } = props || {};\n return verticalCompact === false ? null : compactType;\n}\n\n// Flow can't really figure this out, so we just use Object\nexport function autoBindHandlers(el: Object, fns: Array): void {\n fns.forEach(key => (el[key] = el[key].bind(el)));\n}\n\nfunction log(...args) {\n if (!DEBUG) return;\n // eslint-disable-next-line no-console\n console.log(...args);\n}\n\nexport const noop = () => {};\n","module.exports = __WEBPACK_EXTERNAL_MODULE__2__;","/**\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","// @flow\n\nimport { cloneLayout, compact, correctBounds } from \"./utils\";\n\nimport type { CompactType, Layout } from \"./utils\";\n\nexport type Breakpoint = string;\nexport type DefaultBreakpoints = \"lg\" | \"md\" | \"sm\" | \"xs\" | \"xxs\";\n\n// + indicates read-only\nexport type ResponsiveLayout = {\n +[breakpoint: T]: Layout\n};\nexport type Breakpoints = {\n +[breakpoint: T]: number\n};\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 */\nexport function getBreakpointFromWidth(\n breakpoints: Breakpoints,\n width: number\n): Breakpoint {\n const sorted = sortBreakpoints(breakpoints);\n let matching = sorted[0];\n for (let i = 1, len = sorted.length; i < len; i++) {\n const breakpointName = sorted[i];\n if (width > breakpoints[breakpointName]) matching = breakpointName;\n }\n return matching;\n}\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 */\nexport function getColsFromBreakpoint(\n breakpoint: Breakpoint,\n cols: Breakpoints\n): number {\n if (!cols[breakpoint]) {\n throw new Error(\n \"ResponsiveReactGridLayout: `cols` entry for breakpoint \" +\n breakpoint +\n \" is missing!\"\n );\n }\n return cols[breakpoint];\n}\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 */\nexport function findOrGenerateResponsiveLayout(\n layouts: ResponsiveLayout,\n breakpoints: Breakpoints,\n breakpoint: Breakpoint,\n lastBreakpoint: Breakpoint,\n cols: number,\n compactType: CompactType\n): Layout {\n // If it already exists, just return it.\n if (layouts[breakpoint]) return cloneLayout(layouts[breakpoint]);\n // Find or generate the next layout\n let layout = layouts[lastBreakpoint];\n const breakpointsSorted = sortBreakpoints(breakpoints);\n const breakpointsAbove = breakpointsSorted.slice(\n breakpointsSorted.indexOf(breakpoint)\n );\n for (let i = 0, len = breakpointsAbove.length; i < len; i++) {\n const b = breakpointsAbove[i];\n if (layouts[b]) {\n layout = layouts[b];\n break;\n }\n }\n layout = cloneLayout(layout || []); // clone layout so we don't modify existing items\n return compact(correctBounds(layout, { cols: cols }), compactType, cols);\n}\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 */\nexport function sortBreakpoints(\n breakpoints: Breakpoints\n): Array {\n const keys: Array = Object.keys(breakpoints);\n return keys.sort(function (a, b) {\n return breakpoints[a] - breakpoints[b];\n });\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__5__;","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e(require(\"react\"),require(\"react-dom\")):\"function\"==typeof define&&define.amd?define([\"react\",\"react-dom\"],e):\"object\"==typeof exports?exports.ReactDraggable=e(require(\"react\"),require(\"react-dom\")):t.ReactDraggable=e(t.React,t.ReactDOM)}(window,function(t,e){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,\"a\",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p=\"\",n(n.s=4)}([function(t,e,n){t.exports=n(5)()},function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){var r;\n/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/!function(){\"use strict\";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e0&&void 0!==arguments[0]?arguments[0]:\"transform\";if(\"undefined\"==typeof window||void 0===window.document)return\"\";var e=window.document.documentElement.style;if(t in e)return\"\";for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{})}function X(t){return\"both\"===t.props.axis||\"x\"===t.props.axis}function Y(t){return\"both\"===t.props.axis||\"y\"===t.props.axis}function L(t,e,n){var r=\"number\"==typeof e?function(t,e){return t.targetTouches&&f(t.targetTouches,function(t){return e===t.identifier})||t.changedTouches&&f(t.changedTouches,function(t){return e===t.identifier})}(t,e):null;if(\"number\"==typeof e&&!r)return null;var o=I(n);return function(t,e,n){var r=e===e.ownerDocument.body?{left:0,top:0}:e.getBoundingClientRect();return{x:(t.clientX+e.scrollLeft-r.left)/n,y:(t.clientY+e.scrollTop-r.top)/n}}(r||t,n.props.offsetParent||o.offsetParent||o.ownerDocument.body,n.props.scale)}function R(t,e,n){var r=t.state,o=!d(r.lastX),a=I(t);return o?{node:a,deltaX:0,deltaY:0,lastX:e,lastY:n,x:e,y:n}:{node:a,deltaX:e-r.lastX,deltaY:n-r.lastY,lastX:r.lastX,lastY:r.lastY,x:e,y:n}}function A(t,e){var n=t.props.scale;return{node:e.node,x:t.state.x+e.deltaX/n,y:t.state.y+e.deltaY/n,deltaX:e.deltaX/n,deltaY:e.deltaY/n,lastX:t.state.x,lastY:t.state.y}}function I(t){var e=u.a.findDOMNode(t);if(!e)throw new Error(\": Unmounted during event!\");return e}function U(t){return(U=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function V(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}()}function W(t,e){for(var n=0;n not mounted on DragStart!\");var r=e.ownerDocument;if(!(n.props.disabled||!(t.target instanceof r.defaultView.Node)||n.props.handle&&!D(t.target,n.props.handle,e)||n.props.cancel&&D(t.target,n.props.cancel,e))){var o=function(t){return t.targetTouches&&t.targetTouches[0]?t.targetTouches[0].identifier:t.changedTouches&&t.changedTouches[0]?t.changedTouches[0].identifier:void 0}(t);n.setState({touchIdentifier:o});var a=L(t,o,H(n));if(null!=a){var i=a.x,s=a.y,c=R(H(n),i,s);n.props.onStart,!1!==n.props.onStart(t,c)&&(n.props.enableUserSelectHack&&M(r),n.setState({dragging:!0,lastX:i,lastY:s}),x(r,F.move,n.handleDrag),x(r,F.stop,n.handleDragStop))}}}),G(H(n),\"handleDrag\",function(t){\"touchmove\"===t.type&&t.preventDefault();var e=L(t,n.state.touchIdentifier,H(n));if(null!=e){var r,o,a,i=e.x,s=e.y;if(Array.isArray(n.props.grid)){var u=i-n.state.lastX,c=s-n.state.lastY,l=V((r=n.props.grid,o=u,a=c,[Math.round(o/r[0])*r[0],Math.round(a/r[1])*r[1]]),2);if(u=l[0],c=l[1],!u&&!c)return;i=n.state.lastX+u,s=n.state.lastY+c}var f=R(H(n),i,s);if(!1!==n.props.onDrag(t,f))n.setState({lastX:i,lastY:s});else try{n.handleDragStop(new MouseEvent(\"mouseup\"))}catch(t){var p=document.createEvent(\"MouseEvents\");p.initMouseEvent(\"mouseup\",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.handleDragStop(p)}}}),G(H(n),\"handleDragStop\",function(t){if(n.state.dragging){var e=L(t,n.state.touchIdentifier,H(n));if(null!=e){var r=e.x,o=e.y,a=R(H(n),r,o),i=u.a.findDOMNode(H(n));i&&n.props.enableUserSelectHack&&k(i.ownerDocument),n.setState({dragging:!1,lastX:NaN,lastY:NaN}),n.props.onStop(t,a),i&&(P(i.ownerDocument,F.move,n.handleDrag),P(i.ownerDocument,F.stop,n.handleDragStop))}}}),G(H(n),\"onMouseDown\",function(t){return F=z.mouse,n.handleDragStart(t)}),G(H(n),\"onMouseUp\",function(t){return F=z.mouse,n.handleDragStop(t)}),G(H(n),\"onTouchStart\",function(t){return F=z.touch,n.handleDragStart(t)}),G(H(n),\"onTouchEnd\",function(t){return F=z.touch,n.handleDragStop(t)}),n}var n,r,a;return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&q(t,e)}(e,o.a.Component),n=e,(r=[{key:\"componentWillUnmount\",value:function(){var t=u.a.findDOMNode(this);if(t){var e=t.ownerDocument;P(e,z.mouse.move,this.handleDrag),P(e,z.touch.move,this.handleDrag),P(e,z.mouse.stop,this.handleDragStop),P(e,z.touch.stop,this.handleDragStop),this.props.enableUserSelectHack&&k(e)}}},{key:\"render\",value:function(){return o.a.cloneElement(o.a.Children.only(this.props.children),{style:_(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&W(n.prototype,r),a&&W(n,a),e}();function K(t){return(K=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function Q(){return(Q=Object.assign||function(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function $(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}()}function tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function et(t){for(var e=1;e, 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}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&it(t,e)}(e,o.a.Component),at(e,null,[{key:\"getDerivedStateFromProps\",value:function(t,e){var n=t.position,r=e.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:{x:n.x,y:n.y,prevPropsPosition:et({},n)}}}]),at(e,[{key:\"componentDidMount\",value:function(){void 0!==window.SVGElement&&u.a.findDOMNode(this)instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:\"componentWillUnmount\",value:function(){this.setState({dragging:!1})}},{key:\"render\",value:function(){var t,e=this.props,n=(e.axis,e.bounds,e.children),r=e.defaultPosition,a=e.defaultClassName,i=e.defaultClassNameDragging,s=e.defaultClassNameDragged,u=e.position,c=e.positionOffset,f=(e.scale,Z(e,[\"axis\",\"bounds\",\"children\",\"defaultPosition\",\"defaultClassName\",\"defaultClassNameDragging\",\"defaultClassNameDragged\",\"position\",\"positionOffset\",\"scale\"])),p={},d=null,g=!Boolean(u)||this.state.dragging,y=u||r,h={x:X(this)&&g?this.state.x:y.x,y:Y(this)&&g?this.state.y:y.y};this.state.isElementSVG?d=function(t,e){return C(t,e,\"\")}(h,c):p=function(t,e){var n=C(t,e,\"px\");return w({},b(\"transform\",m),n)}(h,c);var v=l()(n.props.className||\"\",a,(st(t={},i,this.state.dragging),st(t,s,this.state.dragged),t));return o.a.createElement(J,Q({},f,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),o.a.cloneElement(o.a.Children.only(n),{className:v,style:et({},n.props.style,{},p),transform:d}))}}]),e}();st(ut,\"displayName\",\"Draggable\"),st(ut,\"propTypes\",et({},J.propTypes,{axis:i.a.oneOf([\"both\",\"x\",\"y\",\"none\"]),bounds:i.a.oneOfType([i.a.shape({left:i.a.number,right:i.a.number,top:i.a.number,bottom:i.a.number}),i.a.string,i.a.oneOf([!1])]),defaultClassName:i.a.string,defaultClassNameDragging:i.a.string,defaultClassNameDragged:i.a.string,defaultPosition:i.a.shape({x:i.a.number,y:i.a.number}),positionOffset:i.a.shape({x:i.a.oneOfType([i.a.number,i.a.string]),y:i.a.oneOfType([i.a.number,i.a.string])}),position:i.a.shape({x:i.a.number,y:i.a.number}),className:y,style:y,transform:y})),st(ut,\"defaultProps\",et({},J.defaultProps,{axis:\"both\",bounds:!1,defaultClassName:\"react-draggable\",defaultClassNameDragging:\"react-draggable-dragging\",defaultClassNameDragged:\"react-draggable-dragged\",defaultPosition:{x:0,y:0},position:null,scale:1}))}])});\n//# sourceMappingURL=react-draggable.min.js.map","// @flow\nimport type { Position } from \"./utils\";\n\nexport type PositionParams = {\n margin: [number, number],\n containerPadding: [number, number],\n containerWidth: number,\n cols: number,\n rowHeight: number,\n maxRows: number\n};\n\n// Helper for generating column width\nexport function calcGridColWidth(positionParams: PositionParams): number {\n const { margin, containerPadding, containerWidth, cols } = positionParams;\n return (\n (containerWidth - margin[0] * (cols - 1) - containerPadding[0] * 2) / cols\n );\n}\n\n// This can either be called:\n// calcGridItemWHPx(w, colWidth, margin[0])\n// or\n// calcGridItemWHPx(h, rowHeight, margin[1])\nexport function calcGridItemWHPx(\n gridUnits: number,\n colOrRowSize: number,\n marginPx: number\n) {\n // 0 * Infinity === NaN, which causes problems with resize contraints\n if (!Number.isFinite(gridUnits)) return gridUnits;\n return Math.round(\n colOrRowSize * gridUnits + Math.max(0, gridUnits - 1) * marginPx\n );\n}\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 */\nexport function calcGridItemPosition(\n positionParams: PositionParams,\n x: number,\n y: number,\n w: number,\n h: number,\n state: ?Object\n): Position {\n const { margin, containerPadding, rowHeight } = positionParams;\n const colWidth = calcGridColWidth(positionParams);\n const out = {};\n\n // If resizing, use the exact width and height as returned from resizing callbacks.\n if (state && state.resizing) {\n out.width = Math.round(state.resizing.width);\n out.height = Math.round(state.resizing.height);\n }\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 }\n\n // If dragging, use the exact width and height as returned from dragging callbacks.\n if (state && state.dragging) {\n out.top = Math.round(state.dragging.top);\n out.left = Math.round(state.dragging.left);\n }\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/**\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 */\nexport function calcXY(\n positionParams: PositionParams,\n top: number,\n left: number,\n w: number,\n h: number\n): { x: number, y: number } {\n const { margin, cols, rowHeight, maxRows } = positionParams;\n const colWidth = calcGridColWidth(positionParams);\n\n // 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 let x = Math.round((left - margin[0]) / (colWidth + margin[0]));\n let y = Math.round((top - margin[1]) / (rowHeight + margin[1]));\n\n // Capping\n x = clamp(x, 0, cols - w);\n y = clamp(y, 0, maxRows - h);\n return { x, 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 */\nexport function calcWH(\n positionParams: PositionParams,\n width: number,\n height: number,\n x: number,\n y: number\n): { w: number, h: number } {\n const { margin, maxRows, cols, rowHeight } = positionParams;\n const colWidth = calcGridColWidth(positionParams);\n\n // width = colWidth * w - (margin * (w - 1))\n // ...\n // w = (width + margin) / (colWidth + margin)\n let w = Math.round((width + margin[0]) / (colWidth + margin[0]));\n let h = Math.round((height + margin[1]) / (rowHeight + margin[1]));\n\n // Capping\n w = clamp(w, 0, cols - x);\n h = clamp(h, 0, maxRows - y);\n return { w, h };\n}\n\n// Similar to _.clamp\nexport function clamp(num: number, lowerBound: number, upperBound: number) {\n return Math.max(Math.min(num, upperBound), lowerBound);\n}\n","// @flow\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport PropTypes from \"prop-types\";\nimport { DraggableCore } from \"react-draggable\";\nimport { Resizable } from \"react-resizable\";\nimport { fastPositionEqual, perc, setTopLeft, setTransform } from \"./utils\";\nimport {\n calcGridItemPosition,\n calcGridItemWHPx,\n calcGridColWidth,\n calcXY,\n calcWH,\n clamp\n} from \"./calculateUtils\";\nimport classNames from \"classnames\";\nimport type { Element as ReactElement, Node as ReactNode } from \"react\";\n\nimport type {\n ReactDraggableCallbackData,\n GridDragEvent,\n GridResizeEvent,\n DroppingPosition,\n Position\n} from \"./utils\";\n\nimport type { PositionParams } from \"./calculateUtils\";\n\ntype PartialPosition = { top: number, left: number };\ntype GridItemCallback = (\n i: string,\n w: number,\n h: number,\n Data\n) => void;\n\ntype State = {\n resizing: ?{ width: number, height: number },\n dragging: ?{ top: number, left: number },\n className: string\n};\n\ntype Props = {\n children: ReactElement,\n cols: number,\n containerWidth: number,\n margin: [number, number],\n containerPadding: [number, number],\n rowHeight: number,\n maxRows: number,\n isDraggable: boolean,\n isResizable: boolean,\n isBounded: boolean,\n static?: boolean,\n useCSSTransforms?: boolean,\n usePercentages?: boolean,\n transformScale: number,\n droppingPosition?: DroppingPosition,\n\n className: string,\n style?: Object,\n // Draggability\n cancel: string,\n handle: string,\n\n x: number,\n y: number,\n w: number,\n h: number,\n\n minW: number,\n maxW: number,\n minH: number,\n maxH: number,\n i: string,\n\n onDrag?: GridItemCallback,\n onDragStart?: GridItemCallback,\n onDragStop?: GridItemCallback,\n onResize?: GridItemCallback,\n onResizeStart?: GridItemCallback,\n onResizeStop?: GridItemCallback\n};\n\n/**\n * An individual item within a ReactGridLayout.\n */\nexport default class GridItem extends React.Component {\n static propTypes = {\n // Children must be only a single element\n children: PropTypes.element,\n\n // General grid attributes\n cols: PropTypes.number.isRequired,\n containerWidth: PropTypes.number.isRequired,\n rowHeight: PropTypes.number.isRequired,\n margin: PropTypes.array.isRequired,\n maxRows: PropTypes.number.isRequired,\n containerPadding: PropTypes.array.isRequired,\n\n // These are all in grid units\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n w: PropTypes.number.isRequired,\n h: PropTypes.number.isRequired,\n\n // All optional\n minW: function (props: Props, propName: string) {\n const value = props[propName];\n if (typeof value !== \"number\") return new Error(\"minWidth not Number\");\n if (value > props.w || value > props.maxW)\n return new Error(\"minWidth larger than item width/maxWidth\");\n },\n\n maxW: function (props: Props, propName: string) {\n const value = props[propName];\n if (typeof value !== \"number\") return new Error(\"maxWidth not Number\");\n if (value < props.w || value < props.minW)\n return new Error(\"maxWidth smaller than item width/minWidth\");\n },\n\n minH: function (props: Props, propName: string) {\n const value = props[propName];\n if (typeof value !== \"number\") return new Error(\"minHeight not Number\");\n if (value > props.h || value > props.maxH)\n return new Error(\"minHeight larger than item height/maxHeight\");\n },\n\n maxH: function (props: Props, propName: string) {\n const value = props[propName];\n if (typeof value !== \"number\") return new Error(\"maxHeight not Number\");\n if (value < props.h || value < props.minH)\n return new Error(\"maxHeight smaller than item height/minHeight\");\n },\n\n // ID is nice to have for callbacks\n i: PropTypes.string.isRequired,\n\n // Functions\n onDragStop: PropTypes.func,\n onDragStart: PropTypes.func,\n onDrag: PropTypes.func,\n onResizeStop: PropTypes.func,\n onResizeStart: PropTypes.func,\n onResize: PropTypes.func,\n\n // Flags\n isDraggable: PropTypes.bool.isRequired,\n isResizable: PropTypes.bool.isRequired,\n isBounded: PropTypes.bool.isRequired,\n static: PropTypes.bool,\n\n // Use CSS transforms instead of top/left\n useCSSTransforms: PropTypes.bool.isRequired,\n transformScale: PropTypes.number,\n\n // Others\n className: PropTypes.string,\n // Selector for draggable handle\n handle: PropTypes.string,\n // Selector for draggable cancel (see react-draggable)\n cancel: PropTypes.string,\n // Current position of a dropping element\n droppingPosition: PropTypes.shape({\n e: PropTypes.object.isRequired,\n left: PropTypes.number.isRequired,\n top: PropTypes.number.isRequired\n })\n };\n\n static defaultProps = {\n className: \"\",\n cancel: \"\",\n handle: \"\",\n minH: 1,\n minW: 1,\n maxH: Infinity,\n maxW: Infinity,\n transformScale: 1\n };\n\n state: State = {\n resizing: null,\n dragging: null,\n className: \"\"\n };\n\n currentNode: HTMLElement;\n\n shouldComponentUpdate(nextProps: Props, nextState: State) {\n // We can't deeply compare children. If the developer memoizes them, we can\n // use this optimization.\n if (this.props.children !== nextProps.children) return true;\n if (this.props.droppingPosition !== nextProps.droppingPosition) return true;\n // TODO memoize these calculations so they don't take so long?\n const oldPosition = calcGridItemPosition(\n this.getPositionParams(this.props),\n this.props.x,\n this.props.y,\n this.props.w,\n this.props.h,\n this.state\n );\n const newPosition = calcGridItemPosition(\n this.getPositionParams(nextProps),\n nextProps.x,\n nextProps.y,\n nextProps.w,\n nextProps.h,\n nextState\n );\n return (\n !fastPositionEqual(oldPosition, newPosition) ||\n this.props.useCSSTransforms !== nextProps.useCSSTransforms\n );\n }\n\n componentDidMount() {\n this.moveDroppingItem({});\n }\n\n componentDidUpdate(prevProps: Props) {\n this.moveDroppingItem(prevProps);\n }\n\n // When a droppingPosition is present, this means we should fire a move event, as if we had moved\n // this element by `x, y` pixels.\n moveDroppingItem(prevProps: Props) {\n const { droppingPosition } = this.props;\n if (!droppingPosition) return;\n\n const prevDroppingPosition = prevProps.droppingPosition || {\n left: 0,\n top: 0\n };\n const { dragging } = this.state;\n\n if (!this.currentNode) {\n // eslint-disable-next-line react/no-find-dom-node\n this.currentNode = ((ReactDOM.findDOMNode(this): any): HTMLElement);\n }\n\n const shouldDrag =\n (dragging && droppingPosition.left !== prevDroppingPosition.left) ||\n droppingPosition.top !== prevDroppingPosition.top;\n\n if (!dragging) {\n this.onDragStart(droppingPosition.e, {\n node: this.currentNode,\n deltaX: droppingPosition.left,\n deltaY: droppingPosition.top\n });\n } else if (shouldDrag) {\n const deltaX = droppingPosition.left - dragging.left;\n const deltaY = droppingPosition.top - dragging.top;\n\n this.onDrag(droppingPosition.e, {\n node: this.currentNode,\n deltaX,\n deltaY\n });\n }\n }\n\n getPositionParams(props: Props = this.props): PositionParams {\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 /**\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 createStyle(pos: Position): { [key: string]: ?string } {\n const { usePercentages, containerWidth, useCSSTransforms } = this.props;\n\n let style;\n // CSS Transforms support (default)\n if (useCSSTransforms) {\n style = setTransform(pos);\n } else {\n // top,left (slow)\n style = setTopLeft(pos);\n\n // This is used for server rendering.\n if (usePercentages) {\n style.left = perc(pos.left / containerWidth);\n style.width = perc(pos.width / containerWidth);\n }\n }\n\n return style;\n }\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 mixinDraggable(\n child: ReactElement,\n isDraggable: boolean\n ): ReactElement {\n return (\n \n {child}\n \n );\n }\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 mixinResizable(\n child: ReactElement,\n position: Position,\n isResizable: boolean\n ): ReactElement {\n const { cols, x, minW, minH, maxW, maxH, transformScale } = this.props;\n const positionParams = this.getPositionParams();\n\n // This is the max possible width - doesn't go to infinity because of the width of the window\n const maxWidth = calcGridItemPosition(positionParams, 0, 0, cols - x, 0)\n .width;\n\n // Calculate min/max constraints using our min & maxes\n const mins = calcGridItemPosition(positionParams, 0, 0, minW, minH);\n const maxes = calcGridItemPosition(positionParams, 0, 0, maxW, maxH);\n const minConstraints = [mins.width, mins.height];\n const maxConstraints = [\n Math.min(maxes.width, maxWidth),\n Math.min(maxes.height, Infinity)\n ];\n return (\n \n {child}\n \n );\n }\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 onDragStart = (e: Event, { node }: ReactDraggableCallbackData) => {\n const { onDragStart } = this.props;\n if (!onDragStart) return;\n\n const newPosition: PartialPosition = { top: 0, left: 0 };\n\n // TODO: this wont work on nested parents\n const { offsetParent } = node;\n if (!offsetParent) return;\n const parentRect = offsetParent.getBoundingClientRect();\n const clientRect = node.getBoundingClientRect();\n const cLeft = clientRect.left / this.props.transformScale;\n const pLeft = parentRect.left / this.props.transformScale;\n const cTop = clientRect.top / this.props.transformScale;\n const pTop = parentRect.top / this.props.transformScale;\n newPosition.left = cLeft - pLeft + offsetParent.scrollLeft;\n newPosition.top = cTop - pTop + offsetParent.scrollTop;\n this.setState({ dragging: newPosition });\n\n // Call callback with this data\n const { x, y } = calcXY(\n this.getPositionParams(),\n newPosition.top,\n newPosition.left,\n this.props.w,\n this.props.h\n );\n\n return onDragStart.call(this, this.props.i, x, y, {\n e,\n node,\n newPosition\n });\n };\n\n /**\n * onDrag event handler\n * @param {Event} e event data\n * @param {Object} callbackData an object with node, delta and position information\n */\n onDrag = (e: Event, { node, deltaX, deltaY }: ReactDraggableCallbackData) => {\n const { onDrag, transformScale } = this.props;\n if (!onDrag) return;\n deltaX /= transformScale;\n deltaY /= transformScale;\n\n if (!this.state.dragging) {\n throw new Error(\"onDrag called before onDragStart.\");\n }\n let top = this.state.dragging.top + deltaY;\n let left = this.state.dragging.left + deltaX;\n\n const { isBounded, i, w, h, containerWidth } = this.props;\n const positionParams = this.getPositionParams();\n\n // Boundary calculations; keeps items within the grid\n if (isBounded) {\n const { offsetParent } = node;\n\n if (offsetParent) {\n const { margin, rowHeight } = this.props;\n const bottomBoundary =\n offsetParent.clientHeight - calcGridItemWHPx(h, rowHeight, margin[1]);\n top = clamp(top, 0, bottomBoundary);\n\n const colWidth = calcGridColWidth(positionParams);\n const rightBoundary =\n containerWidth - calcGridItemWHPx(w, colWidth, margin[0]);\n left = clamp(left, 0, rightBoundary);\n }\n }\n\n const newPosition: PartialPosition = { top, left };\n this.setState({ dragging: newPosition });\n\n // Call callback with this data\n const { x, y } = calcXY(positionParams, top, left, w, h);\n return onDrag.call(this, i, x, y, {\n e,\n node,\n newPosition\n });\n };\n\n /**\n * onDragStop event handler\n * @param {Event} e event data\n * @param {Object} callbackData an object with node, delta and position information\n */\n onDragStop = (e: Event, { node }: ReactDraggableCallbackData) => {\n const { onDragStop } = this.props;\n if (!onDragStop) return;\n\n if (!this.state.dragging) {\n throw new Error(\"onDragEnd called before onDragStart.\");\n }\n const { w, h, i } = this.props;\n const { left, top } = this.state.dragging;\n const newPosition: PartialPosition = { top, left };\n this.setState({ dragging: null });\n\n const { x, y } = calcXY(this.getPositionParams(), top, left, w, h);\n\n return onDragStop.call(this, i, x, y, {\n e,\n node,\n newPosition\n });\n };\n\n /**\n * onResizeStop event handler\n * @param {Event} e event data\n * @param {Object} callbackData an object with node and size information\n */\n onResizeStop = (\n e: Event,\n callbackData: { node: HTMLElement, size: Position }\n ) => {\n this.onResizeHandler(e, callbackData, \"onResizeStop\");\n };\n\n /**\n * onResizeStart event handler\n * @param {Event} e event data\n * @param {Object} callbackData an object with node and size information\n */\n onResizeStart = (\n e: Event,\n callbackData: { node: HTMLElement, size: Position }\n ) => {\n this.onResizeHandler(e, callbackData, \"onResizeStart\");\n };\n\n /**\n * onResize event handler\n * @param {Event} e event data\n * @param {Object} callbackData an object with node and size information\n */\n onResize = (\n e: Event,\n callbackData: { node: HTMLElement, size: Position }\n ) => {\n this.onResizeHandler(e, callbackData, \"onResize\");\n };\n\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 onResizeHandler(\n e: Event,\n { node, size }: { node: HTMLElement, size: Position },\n handlerName: string\n ) {\n const handler = this.props[handlerName];\n if (!handler) return;\n const { cols, x, y, i, maxH, minH } = this.props;\n let { minW, maxW } = this.props;\n\n // Get new XY\n let { w, h } = calcWH(\n this.getPositionParams(),\n size.width,\n size.height,\n x,\n y\n );\n\n // minW should be at least 1 (TODO propTypes validation?)\n minW = Math.max(minW, 1);\n\n // maxW should be at most (cols - x)\n maxW = Math.min(maxW, cols - x);\n\n // Min/max capping\n w = clamp(w, minW, maxW);\n h = clamp(h, minH, maxH);\n\n this.setState({ resizing: handlerName === \"onResizeStop\" ? null : size });\n\n handler.call(this, i, w, h, { e, node, size });\n }\n\n render(): ReactNode {\n const {\n x,\n y,\n w,\n h,\n isDraggable,\n isResizable,\n droppingPosition,\n useCSSTransforms\n } = this.props;\n\n const pos = calcGridItemPosition(\n this.getPositionParams(),\n x,\n y,\n w,\n h,\n this.state\n );\n const child = React.Children.only(this.props.children);\n\n // Create the child element. We clone the existing element but modify its className and style.\n let newChild = React.cloneElement(child, {\n className: classNames(\n \"react-grid-item\",\n child.props.className,\n this.props.className,\n {\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 ),\n // We can set the width and height on the child, but unfortunately we can't set the position.\n style: {\n ...this.props.style,\n ...child.props.style,\n ...this.createStyle(pos)\n }\n });\n\n // Resizable support. This is usually on but the user can toggle it off.\n newChild = this.mixinResizable(newChild, pos, isResizable);\n\n // Draggable support. This is always on, except for with placeholders.\n newChild = this.mixinDraggable(newChild, isDraggable);\n\n return newChild;\n }\n}\n","// @flow\nimport PropTypes from \"prop-types\";\nimport React from \"react\";\nimport type {\n Ref,\n ChildrenArray as ReactChildrenArray,\n Element as ReactElement\n} from \"react\";\nimport type { EventCallback, CompactType, Layout, LayoutItem } from \"./utils\";\n\nexport 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] | null,\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\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 onDrop: (layout: Layout, item: ?LayoutItem, e: Event) => void,\n children: ReactChildrenArray>,\n innerRef?: Ref<\"div\">\n|};\n\nexport default {\n //\n // Basic props\n //\n className: PropTypes.string,\n style: PropTypes.object,\n\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.number,\n\n // If true, the container height swells and contracts to fit contents\n autoSize: PropTypes.bool,\n // # of cols.\n cols: PropTypes.number,\n\n // A selector that will not be draggable.\n draggableCancel: PropTypes.string,\n // A selector for the draggable handler\n draggableHandle: PropTypes.string,\n\n // Deprecated\n verticalCompact: function (props: Props) {\n if (\n props.verticalCompact === false &&\n process.env.NODE_ENV !== \"production\"\n ) {\n console.warn(\n // eslint-disable-line no-console\n \"`verticalCompact` on is deprecated and will be removed soon. \" +\n 'Use `compactType`: \"horizontal\" | \"vertical\" | null.'\n );\n }\n },\n // Choose vertical or hotizontal compaction\n compactType: PropTypes.oneOf([\"vertical\", \"horizontal\"]),\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 (props: Props) {\n var layout = props.layout;\n // I hope you're setting the data-grid property on the grid items\n if (layout === undefined) return;\n require(\"./utils\").validateLayout(layout, \"layout\");\n },\n\n //\n // Grid Dimensions\n //\n\n // Margin between items [x, y] in px\n margin: PropTypes.arrayOf(PropTypes.number),\n // Padding inside the container [x, y] in px\n containerPadding: PropTypes.arrayOf(PropTypes.number),\n // Rows have a static height, but you can change this based on breakpoints if you like\n rowHeight: PropTypes.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.number,\n\n //\n // Flags\n //\n isBounded: PropTypes.bool,\n isDraggable: PropTypes.bool,\n isResizable: PropTypes.bool,\n // If true, grid items won't change position when being dragged over.\n preventCollision: PropTypes.bool,\n // Use CSS transforms instead of top/left\n useCSSTransforms: PropTypes.bool,\n // parent layout transform scale\n transformScale: PropTypes.number,\n // If true, an external element can trigger onDrop callback with a specific grid position as a parameter\n isDroppable: PropTypes.bool,\n\n //\n // Callbacks\n //\n\n // Callback so you can save the layout. Calls after each drag & resize stops.\n onLayoutChange: PropTypes.func,\n\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.func,\n // Calls on each drag movement.\n onDrag: PropTypes.func,\n // Calls when drag is complete.\n onDragStop: PropTypes.func,\n //Calls when resize starts.\n onResizeStart: PropTypes.func,\n // Calls when resize movement happens.\n onResize: PropTypes.func,\n // Calls when resize is complete.\n onResizeStop: PropTypes.func,\n // Calls when some element is dropped.\n onDrop: PropTypes.func,\n\n //\n // Other validations\n //\n\n droppingItem: PropTypes.shape({\n i: PropTypes.string.isRequired,\n w: PropTypes.number.isRequired,\n h: PropTypes.number.isRequired\n }),\n\n // Children must not have duplicate keys.\n children: function (props: Props, propName: string) {\n var children = props[propName];\n\n // Check children keys for duplicates. Throw if found.\n var keys = {};\n React.Children.forEach(children, function (child) {\n if (keys[child.key]) {\n throw new Error(\n 'Duplicate child key \"' +\n child.key +\n '\" found! This will cause problems in ReactGridLayout.'\n );\n }\n keys[child.key] = true;\n });\n },\n\n // Optional ref for getting a reference for the wrapping div.\n innerRef: PropTypes.any\n};\n","// @flow\nimport React from \"react\";\n\nimport isEqual from \"lodash.isequal\";\nimport classNames from \"classnames\";\nimport {\n autoBindHandlers,\n bottom,\n childrenEqual,\n cloneLayoutItem,\n compact,\n getLayoutItem,\n moveElement,\n synchronizeLayoutWithChildren,\n getAllCollisions,\n compactType,\n noop,\n fastRGLPropsEqual\n} from \"./utils\";\n\nimport { calcXY } from \"./calculateUtils\";\n\nimport GridItem from \"./GridItem\";\nimport ReactGridLayoutPropTypes from \"./ReactGridLayoutPropTypes\";\nimport type {\n ChildrenArray as ReactChildrenArray,\n Element as ReactElement\n} from \"react\";\n\n// Types\nimport type {\n CompactType,\n GridResizeEvent,\n GridDragEvent,\n DragOverEvent,\n Layout,\n DroppingPosition,\n LayoutItem\n} from \"./utils\";\n\nimport type { PositionParams } from \"./calculateUtils\";\n\ntype State = {\n activeDrag: ?LayoutItem,\n layout: Layout,\n mounted: boolean,\n oldDragItem: ?LayoutItem,\n oldLayout: ?Layout,\n oldResizeItem: ?LayoutItem,\n droppingDOMNode: ?ReactElement,\n droppingPosition?: DroppingPosition,\n // Mirrored props\n children: ReactChildrenArray>,\n compactType?: CompactType,\n propsLayout?: Layout\n};\n\nimport type { Props } from \"./ReactGridLayoutPropTypes\";\n\n// End Types\n\nconst layoutClassName = \"react-grid-layout\";\nlet isFirefox = false;\n// Try...catch will protect from navigator not existing (e.g. node) or a bad implementation of navigator\ntry {\n isFirefox = /firefox/i.test(navigator.userAgent);\n} catch (e) {\n /* Ignore */\n}\n\n/**\n * A reactive, fluid grid layout with draggable, resizable components.\n */\n\nexport default class ReactGridLayout extends React.Component {\n // TODO publish internal ReactClass displayName transform\n static displayName = \"ReactGridLayout\";\n\n // Refactored to another module to make way for preval\n static propTypes = ReactGridLayoutPropTypes;\n\n static defaultProps = {\n autoSize: true,\n cols: 12,\n className: \"\",\n style: {},\n draggableHandle: \"\",\n draggableCancel: \"\",\n containerPadding: null,\n rowHeight: 150,\n maxRows: Infinity, // infinite vertical growth\n layout: [],\n margin: [10, 10],\n isBounded: false,\n isDraggable: true,\n isResizable: true,\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 onLayoutChange: noop,\n onDragStart: noop,\n onDrag: noop,\n onDragStop: noop,\n onResizeStart: noop,\n onResize: noop,\n onResizeStop: noop,\n onDrop: noop\n };\n\n state: State = {\n activeDrag: null,\n layout: synchronizeLayoutWithChildren(\n this.props.layout,\n this.props.children,\n this.props.cols,\n // Legacy support for verticalCompact: false\n compactType(this.props)\n ),\n mounted: false,\n oldDragItem: null,\n oldLayout: null,\n oldResizeItem: null,\n droppingDOMNode: null,\n children: []\n };\n\n dragEnterCounter = 0;\n\n constructor(props: Props, context: any): void {\n super(props, context);\n autoBindHandlers(this, [\n \"onDragStart\",\n \"onDrag\",\n \"onDragStop\",\n \"onResizeStart\",\n \"onResize\",\n \"onResizeStop\"\n ]);\n }\n\n componentDidMount() {\n this.setState({ 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 this.onLayoutMaybeChanged(this.state.layout, this.props.layout);\n }\n\n static getDerivedStateFromProps(nextProps: Props, prevState: State) {\n let newLayoutBase;\n\n if (prevState.activeDrag) {\n return null;\n }\n\n // Legacy support for compactType\n // Allow parent to set layout directly.\n if (\n !isEqual(nextProps.layout, prevState.propsLayout) ||\n nextProps.compactType !== prevState.compactType\n ) {\n newLayoutBase = nextProps.layout;\n } else if (!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 }\n\n // We need to regenerate the layout.\n if (newLayoutBase) {\n const newLayout = synchronizeLayoutWithChildren(\n newLayoutBase,\n nextProps.children,\n nextProps.cols,\n compactType(nextProps)\n );\n\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 shouldComponentUpdate(nextProps: Props, nextState: State) {\n return (\n // 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 ||\n !fastRGLPropsEqual(this.props, nextProps, isEqual) ||\n this.state.activeDrag !== nextState.activeDrag ||\n this.state.mounted !== nextState.mounted ||\n this.state.droppingPosition !== nextState.droppingPosition\n );\n }\n\n componentDidUpdate(prevProps: Props, prevState: State) {\n if (!this.state.activeDrag) {\n const newLayout = this.state.layout;\n const oldLayout = prevState.layout;\n\n this.onLayoutMaybeChanged(newLayout, oldLayout);\n }\n }\n\n /**\n * Calculates a pixel value for the container.\n * @return {String} Container height in pixels.\n */\n containerHeight() {\n if (!this.props.autoSize) return;\n const nbRow = bottom(this.state.layout);\n const containerPaddingY = this.props.containerPadding\n ? this.props.containerPadding[1]\n : this.props.margin[1];\n return (\n nbRow * this.props.rowHeight +\n (nbRow - 1) * this.props.margin[1] +\n containerPaddingY * 2 +\n \"px\"\n );\n }\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 onDragStart(i: string, x: number, y: number, { e, node }: GridDragEvent) {\n const { layout } = this.state;\n var l = getLayoutItem(layout, i);\n if (!l) return;\n\n this.setState({\n oldDragItem: cloneLayoutItem(l),\n oldLayout: this.state.layout\n });\n\n return this.props.onDragStart(layout, l, l, null, e, node);\n }\n\n /**\n * Each drag movement create a new dragelement and move the element to the dragged location\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 onDrag(i: string, x: number, y: number, { e, node }: GridDragEvent) {\n const { oldDragItem } = this.state;\n let { layout } = this.state;\n const { cols } = this.props;\n var l = getLayoutItem(layout, i);\n if (!l) return;\n\n // Create placeholder (display only)\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 };\n\n // Move the element to the dragged location.\n const isUserAction = true;\n layout = moveElement(\n layout,\n l,\n x,\n y,\n isUserAction,\n this.props.preventCollision,\n compactType(this.props),\n cols\n );\n\n this.props.onDrag(layout, oldDragItem, l, placeholder, e, node);\n\n this.setState({\n layout: compact(layout, compactType(this.props), cols),\n activeDrag: placeholder\n });\n }\n\n /**\n * When dragging stops, figure out which position the element is closest to and update its x and y.\n * @param {String} i Index 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 onDragStop(i: string, x: number, y: number, { e, node }: GridDragEvent) {\n if (!this.state.activeDrag) return;\n\n const { oldDragItem } = this.state;\n let { layout } = this.state;\n const { cols, preventCollision } = this.props;\n const l = getLayoutItem(layout, i);\n if (!l) return;\n\n // Move the element here\n const isUserAction = true;\n layout = moveElement(\n layout,\n l,\n x,\n y,\n isUserAction,\n preventCollision,\n compactType(this.props),\n cols\n );\n\n this.props.onDragStop(layout, oldDragItem, l, null, e, node);\n\n // Set state\n const newLayout = compact(layout, compactType(this.props), cols);\n const { oldLayout } = this.state;\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 onLayoutMaybeChanged(newLayout: Layout, oldLayout: ?Layout) {\n if (!oldLayout) oldLayout = this.state.layout;\n\n if (!isEqual(oldLayout, newLayout)) {\n this.props.onLayoutChange(newLayout);\n }\n }\n\n onResizeStart(i: string, w: number, h: number, { e, node }: GridResizeEvent) {\n const { layout } = this.state;\n var l = getLayoutItem(layout, i);\n if (!l) return;\n\n this.setState({\n oldResizeItem: cloneLayoutItem(l),\n oldLayout: this.state.layout\n });\n\n this.props.onResizeStart(layout, l, l, null, e, node);\n }\n\n onResize(i: string, w: number, h: number, { e, node }: GridResizeEvent) {\n const { layout, oldResizeItem } = this.state;\n const { cols, preventCollision } = this.props;\n const l: ?LayoutItem = getLayoutItem(layout, i);\n if (!l) return;\n\n // Something like quad tree should be used\n // to find collisions faster\n let hasCollisions;\n if (preventCollision) {\n const collisions = getAllCollisions(layout, { ...l, w, h }).filter(\n layoutItem => layoutItem.i !== l.i\n );\n hasCollisions = collisions.length > 0;\n\n // If we're colliding, we need adjust the placeholder.\n if (hasCollisions) {\n // adjust w && h to maximum allowed space\n let leastX = Infinity,\n leastY = Infinity;\n collisions.forEach(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\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 // Create placeholder element (display only)\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(layout, oldResizeItem, l, placeholder, e, node);\n\n // Re-compact the layout and set the drag placeholder.\n this.setState({\n layout: compact(layout, compactType(this.props), cols),\n activeDrag: placeholder\n });\n }\n\n onResizeStop(i: string, w: number, h: number, { e, node }: GridResizeEvent) {\n const { layout, oldResizeItem } = this.state;\n const { cols } = this.props;\n var l = getLayoutItem(layout, i);\n\n this.props.onResizeStop(layout, oldResizeItem, l, null, e, node);\n\n // Set state\n const newLayout = compact(layout, compactType(this.props), cols);\n const { oldLayout } = this.state;\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 /**\n * Create a placeholder object.\n * @return {Element} Placeholder div.\n */\n placeholder(): ?ReactElement {\n const { activeDrag } = this.state;\n if (!activeDrag) return null;\n const {\n width,\n cols,\n margin,\n containerPadding,\n rowHeight,\n maxRows,\n useCSSTransforms,\n transformScale\n } = this.props;\n\n // {...this.state.activeDrag} is pretty slow, actually\n return (\n \n
\n \n );\n }\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 processGridItem(\n child: ReactElement,\n isDroppingItem?: boolean\n ): ?ReactElement {\n if (!child || !child.key) return;\n const l = getLayoutItem(this.state.layout, String(child.key));\n if (!l) return null;\n const {\n width,\n cols,\n margin,\n containerPadding,\n rowHeight,\n maxRows,\n isDraggable,\n isResizable,\n isBounded,\n useCSSTransforms,\n transformScale,\n draggableCancel,\n draggableHandle\n } = this.props;\n const { mounted, droppingPosition } = this.state;\n\n // 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 const draggable =\n typeof l.isDraggable === \"boolean\"\n ? l.isDraggable\n : !l.static && isDraggable;\n const resizable =\n typeof l.isResizable === \"boolean\"\n ? l.isResizable\n : !l.static && isResizable;\n\n // isBounded set on child if set on parent, and child is not explicitly false\n const bounded = draggable && isBounded && l.isBounded !== false;\n\n return (\n \n {child}\n \n );\n }\n\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 onDragOver = (e: DragOverEvent) => {\n // 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 if (\n isFirefox &&\n e.nativeEvent.target.className.indexOf(layoutClassName) === -1\n ) {\n return false;\n }\n\n const {\n droppingItem,\n margin,\n cols,\n rowHeight,\n maxRows,\n width,\n containerPadding\n } = this.props;\n const { layout } = this.state;\n // This is relative to the DOM element that this event fired for.\n const { layerX, layerY } = e.nativeEvent;\n const droppingPosition = { left: layerX, top: layerY, e };\n\n if (!this.state.droppingDOMNode) {\n const positionParams: PositionParams = {\n cols,\n margin,\n maxRows,\n rowHeight,\n containerWidth: width,\n containerPadding: containerPadding || margin\n };\n\n const calculatedPosition = calcXY(\n positionParams,\n layerY,\n layerX,\n droppingItem.w,\n droppingItem.h\n );\n\n this.setState({\n droppingDOMNode:
,\n droppingPosition,\n layout: [\n ...layout,\n {\n ...droppingItem,\n x: calculatedPosition.x,\n y: calculatedPosition.y,\n static: false,\n isDraggable: true\n }\n ]\n });\n } else if (this.state.droppingPosition) {\n const { left, top } = this.state.droppingPosition;\n const shouldUpdatePosition = left != layerX || top != layerY;\n if (shouldUpdatePosition) {\n this.setState({ droppingPosition });\n }\n }\n\n e.stopPropagation();\n e.preventDefault();\n };\n\n removeDroppingPlaceholder = () => {\n const { droppingItem, cols } = this.props;\n const { layout } = this.state;\n\n const newLayout = compact(\n layout.filter(l => l.i !== droppingItem.i),\n compactType(this.props),\n cols\n );\n\n this.setState({\n layout: newLayout,\n droppingDOMNode: null,\n activeDrag: null,\n droppingPosition: undefined\n });\n };\n\n onDragLeave = () => {\n this.dragEnterCounter--;\n\n // 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 if (this.dragEnterCounter === 0) {\n this.removeDroppingPlaceholder();\n }\n };\n\n onDragEnter = () => {\n this.dragEnterCounter++;\n };\n\n onDrop = (e: Event) => {\n const { droppingItem } = this.props;\n const { layout } = this.state;\n const item = layout.find(l => l.i === droppingItem.i);\n\n // reset gragEnter counter on drop\n this.dragEnterCounter = 0;\n\n this.removeDroppingPlaceholder();\n\n this.props.onDrop(layout, item, e);\n };\n\n render() {\n const { className, style, isDroppable, innerRef } = this.props;\n\n const mergedClassName = classNames(layoutClassName, className);\n const mergedStyle = {\n height: this.containerHeight(),\n ...style\n };\n\n return (\n \n {React.Children.map(this.props.children, child =>\n this.processGridItem(child)\n )}\n {isDroppable &&\n this.state.droppingDOMNode &&\n this.processGridItem(this.state.droppingDOMNode, true)}\n {this.placeholder()}\n
\n );\n }\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _reactDraggable = require(\"react-draggable\");\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\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 Resizable =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Resizable, _React$Component);\n\n function Resizable() {\n var _this;\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 = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n slackW: 0,\n slackH: 0\n });\n\n return _this;\n }\n\n var _proto = Resizable.prototype;\n\n _proto.lockAspectRatio = function lockAspectRatio(width, height, aspectRatio) {\n height = width / aspectRatio;\n width = height * aspectRatio;\n return [width, height];\n } // If you do this, be careful of constraints\n ;\n\n _proto.runConstraints = function runConstraints(width, height) {\n var _ref = [this.props.minConstraints, this.props.maxConstraints],\n min = _ref[0],\n max = _ref[1];\n if (!min && !max) return [width, height]; // Fit width & height to aspect ratio\n\n if (this.props.lockAspectRatio) {\n if (height === this.props.height) {\n var ratio = this.props.width / this.props.height;\n height = width / ratio;\n width = height * ratio;\n } else {\n // Take into account vertical resize with N/S handles on locked aspect\n // ratio. Calculate the change height-first, instead of width-first\n var _ratio = this.props.height / this.props.width;\n\n width = height / _ratio;\n height = width * _ratio;\n }\n }\n\n var oldW = width,\n oldH = height; // 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\n var _this$state = this.state,\n slackW = _this$state.slackW,\n slackH = _this$state.slackH;\n width += slackW;\n height += slackH;\n\n if (min) {\n width = Math.max(min[0], width);\n height = Math.max(min[1], height);\n }\n\n if (max) {\n width = Math.min(max[0], width);\n height = Math.min(max[1], height);\n } // If the numbers changed, we must have introduced some slack. Record it for the next iteration.\n\n\n slackW += oldW - width;\n slackH += oldH - height;\n\n if (slackW !== this.state.slackW || slackH !== this.state.slackH) {\n this.setState({\n slackW: slackW,\n slackH: slackH\n });\n }\n\n return [width, height];\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 ;\n\n _proto.resizeHandler = function resizeHandler(handlerName, axis) {\n var _this2 = this;\n\n return function (e, _ref2) {\n var node = _ref2.node,\n deltaX = _ref2.deltaX,\n deltaY = _ref2.deltaY;\n deltaX /= _this2.props.transformScale;\n deltaY /= _this2.props.transformScale; // Axis restrictions\n\n var canDragX = (_this2.props.axis === 'both' || _this2.props.axis === 'x') && ['n', 's'].indexOf(axis) === -1;\n var canDragY = (_this2.props.axis === 'both' || _this2.props.axis === 'y') && ['e', 'w'].indexOf(axis) === -1; // reverse delta if using top or left drag handles\n\n if (canDragX && axis[axis.length - 1] === 'w') {\n deltaX = -deltaX;\n }\n\n if (canDragY && axis[0] === 'n') {\n deltaY = -deltaY;\n } // Update w/h\n\n\n var width = _this2.props.width + (canDragX ? deltaX : 0);\n var height = _this2.props.height + (canDragY ? deltaY : 0); // Early return if no change\n\n var widthChanged = width !== _this2.props.width,\n heightChanged = height !== _this2.props.height;\n if (handlerName === 'onResize' && !widthChanged && !heightChanged) return;\n\n var _this2$runConstraints = _this2.runConstraints(width, height);\n\n width = _this2$runConstraints[0];\n height = _this2$runConstraints[1];\n // Set the appropriate state for this handler.\n var newState = {};\n\n if (handlerName === 'onResizeStart') {// nothing\n } else if (handlerName === 'onResizeStop') {\n newState.slackW = newState.slackH = 0;\n } else {\n // Early return if no change after constraints\n if (width === _this2.props.width && height === _this2.props.height) return;\n }\n\n var hasCb = typeof _this2.props[handlerName] === 'function';\n\n if (hasCb) {\n // $FlowIgnore isn't refining this correctly to SyntheticEvent\n if (typeof e.persist === 'function') e.persist();\n\n _this2.setState(newState, function () {\n return _this2.props[handlerName](e, {\n node: node,\n size: {\n width: width,\n height: height\n },\n handle: axis\n });\n });\n } else {\n _this2.setState(newState);\n }\n };\n };\n\n _proto.renderResizeHandle = function renderResizeHandle(resizeHandle) {\n var handle = this.props.handle;\n\n if (handle) {\n if (typeof handle === 'function') {\n return handle(resizeHandle);\n }\n\n return handle;\n }\n\n return _react.default.createElement(\"span\", {\n className: \"react-resizable-handle react-resizable-handle-\" + resizeHandle\n });\n };\n\n _proto.render = function render() {\n var _this3 = this;\n\n // eslint-disable-next-line no-unused-vars\n var _this$props = this.props,\n children = _this$props.children,\n draggableOpts = _this$props.draggableOpts,\n width = _this$props.width,\n height = _this$props.height,\n handleSize = _this$props.handleSize,\n lockAspectRatio = _this$props.lockAspectRatio,\n axis = _this$props.axis,\n minConstraints = _this$props.minConstraints,\n maxConstraints = _this$props.maxConstraints,\n onResize = _this$props.onResize,\n onResizeStop = _this$props.onResizeStop,\n onResizeStart = _this$props.onResizeStart,\n resizeHandles = _this$props.resizeHandles,\n transformScale = _this$props.transformScale,\n p = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"draggableOpts\", \"width\", \"height\", \"handleSize\", \"lockAspectRatio\", \"axis\", \"minConstraints\", \"maxConstraints\", \"onResize\", \"onResizeStop\", \"onResizeStart\", \"resizeHandles\", \"transformScale\"]);\n\n var className = p.className ? p.className + \" react-resizable\" : 'react-resizable'; // 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 // Its original children (resizable's child's children), and\n // One or more draggable handles.\n\n return (0, _utils.cloneElement)(children, _objectSpread({}, p, {\n className: className,\n children: [children.props.children, resizeHandles.map(function (h) {\n return _react.default.createElement(_reactDraggable.DraggableCore, _extends({}, draggableOpts, {\n key: \"resizableHandle-\" + h,\n onStop: _this3.resizeHandler('onResizeStop', h),\n onStart: _this3.resizeHandler('onResizeStart', h),\n onDrag: _this3.resizeHandler('onResize', h)\n }), _this3.renderResizeHandle(h));\n })]\n }));\n };\n\n return Resizable;\n}(_react.default.Component);\n\nexports.default = Resizable;\n\n_defineProperty(Resizable, \"propTypes\", {\n //\n // Required Props\n //\n // Require that one and only one child be present.\n children: _propTypes.default.element.isRequired,\n // Initial w/h\n width: _propTypes.default.number.isRequired,\n height: _propTypes.default.number.isRequired,\n //\n // Optional props\n //\n // Custom resize handle\n handle: _propTypes.default.element,\n // If you change this, be sure to update your css\n handleSize: _propTypes.default.array,\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-center)\n resizeHandles: _propTypes.default.arrayOf(_propTypes.default.oneOf(['s', 'w', 'e', 'n', 'sw', 'nw', 'se', 'ne'])),\n transformScale: _propTypes.default.number,\n // If true, will only allow width/height to move in lockstep\n lockAspectRatio: _propTypes.default.bool,\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 axis: _propTypes.default.oneOf(['both', 'x', 'y', 'none']),\n // Min/max size\n minConstraints: _propTypes.default.arrayOf(_propTypes.default.number),\n maxConstraints: _propTypes.default.arrayOf(_propTypes.default.number),\n // Callbacks\n onResizeStop: _propTypes.default.func,\n onResizeStart: _propTypes.default.func,\n onResize: _propTypes.default.func,\n // These will be passed wholesale to react-draggable's DraggableCore\n draggableOpts: _propTypes.default.object\n});\n\n_defineProperty(Resizable, \"defaultProps\", {\n handleSize: [20, 20],\n lockAspectRatio: false,\n axis: 'both',\n minConstraints: [20, 20],\n maxConstraints: [Infinity, Infinity],\n resizeHandles: ['se'],\n transformScale: 1\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","module.exports = require(\"./lib/ReactGridLayout\").default;\nmodule.exports.utils = require(\"./lib/utils\");\nmodule.exports.Responsive = require(\"./lib/ResponsiveReactGridLayout\").default;\nmodule.exports.Responsive.utils = require(\"./lib/responsiveUtils\");\nmodule.exports.WidthProvider = require(\"./lib/components/WidthProvider\").default;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\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 = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\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\nexports.__esModule = true;\nexports.cloneElement = cloneElement;\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); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(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\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({}, element.props.style, {}, props.style);\n }\n\n if (props.className && element.props.className) {\n props.className = element.props.className + \" \" + props.className;\n }\n\n return _react.default.cloneElement(element, props);\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _Resizable = _interopRequireDefault(require(\"./Resizable\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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 _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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\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// An example use of Resizable.\nvar ResizableBox =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(ResizableBox, _React$Component);\n\n function ResizableBox() {\n var _this;\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 = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n width: _this.props.width,\n height: _this.props.height,\n propsWidth: _this.props.width,\n propsHeight: _this.props.height\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onResize\", function (e, data) {\n var size = data.size;\n var width = size.width,\n height = size.height;\n\n if (_this.props.onResize) {\n e.persist && e.persist();\n\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\n return _this;\n }\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\n return null;\n };\n\n var _proto = ResizableBox.prototype;\n\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 props = _objectWithoutPropertiesLoose(_this$props, [\"handle\", \"handleSize\", \"onResize\", \"onResizeStart\", \"onResizeStop\", \"draggableOpts\", \"minConstraints\", \"maxConstraints\", \"lockAspectRatio\", \"axis\", \"width\", \"height\", \"resizeHandles\"]);\n\n return _react.default.createElement(_Resizable.default, {\n handle: handle,\n handleSize: handleSize,\n width: this.state.width,\n height: this.state.height,\n onResizeStart: onResizeStart,\n onResize: this.onResize,\n onResizeStop: onResizeStop,\n draggableOpts: draggableOpts,\n minConstraints: minConstraints,\n maxConstraints: maxConstraints,\n lockAspectRatio: lockAspectRatio,\n axis: axis,\n resizeHandles: resizeHandles\n }, _react.default.createElement(\"div\", _extends({\n style: {\n width: this.state.width + 'px',\n height: this.state.height + 'px'\n }\n }, props)));\n };\n\n return ResizableBox;\n}(_react.default.Component);\n\nexports.default = ResizableBox;\n\n_defineProperty(ResizableBox, \"propTypes\", {\n height: _propTypes.default.number,\n width: _propTypes.default.number\n});\n\n_defineProperty(ResizableBox, \"defaultProps\", {\n handleSize: [20, 20]\n});","// @flow\nimport * as React from \"react\";\nimport PropTypes from \"prop-types\";\nimport isEqual from \"lodash.isequal\";\n\nimport {\n cloneLayout,\n synchronizeLayoutWithChildren,\n validateLayout,\n noop,\n type Layout\n} from \"./utils\";\nimport {\n getBreakpointFromWidth,\n getColsFromBreakpoint,\n findOrGenerateResponsiveLayout,\n type ResponsiveLayout,\n type Breakpoints\n} from \"./responsiveUtils\";\nimport ReactGridLayout from \"./ReactGridLayout\";\n\nconst type = obj => 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\nfunction getIndentationValue(\n param: { [key: string]: [number, number] } | [number, number],\n breakpoint: string\n) {\n return Array.isArray(param) ? param : param[breakpoint];\n}\n\ntype State = {\n layout: Layout,\n breakpoint: string,\n cols: number,\n layouts?: { [key: string]: Layout }\n};\n\ntype 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 containerPadding: { [key: Breakpoint]: [number, number] } | [number, number],\n\n // Callbacks\n onBreakpointChange: (Breakpoint, cols: number) => void,\n onLayoutChange: (Layout, { [key: Breakpoint]: Layout }) => void,\n onWidthChange: (\n containerWidth: number,\n margin: [number, number],\n cols: number,\n containerPadding: [number, number] | null\n ) => void\n|};\n\nexport default class ResponsiveReactGridLayout extends React.Component<\n Props<>,\n State\n> {\n // This should only include propTypes needed in this code; RGL itself\n // will do validation of the rest props passed to it.\n static propTypes = {\n //\n // Basic props\n //\n\n // Optional, but if you are managing width yourself you may want to set the breakpoint\n // yourself as well.\n breakpoint: PropTypes.string,\n\n // {name: pxVal}, e.g. {lg: 1200, md: 996, sm: 768, xs: 480}\n breakpoints: PropTypes.object,\n\n // # of cols. This is a breakpoint -> cols map\n cols: PropTypes.object,\n\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.oneOfType([PropTypes.array, PropTypes.object]),\n\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.oneOfType([PropTypes.array, PropTypes.object]),\n\n // layouts is an object mapping breakpoints to layouts.\n // e.g. {lg: Layout, md: Layout, ...}\n layouts(props: Props<>, propName: string) {\n if (type(props[propName]) !== \"[object Object]\") {\n throw new Error(\n \"Layout property must be an object. Received: \" +\n type(props[propName])\n );\n }\n Object.keys(props[propName]).forEach(key => {\n if (!(key in props.breakpoints)) {\n throw new Error(\n \"Each key in layouts must align with a key in breakpoints.\"\n );\n }\n validateLayout(props.layouts[key], \"layouts.\" + key);\n });\n },\n\n // The width of this component.\n // Required in this propTypes stanza because generateInitialState() will fail without it.\n width: PropTypes.number.isRequired,\n\n //\n // Callbacks\n //\n\n // Calls back with breakpoint and new # cols\n onBreakpointChange: PropTypes.func,\n\n // Callback so you can save the layout.\n // Calls back with (currentLayout, allLayouts). allLayouts are keyed by breakpoint.\n onLayoutChange: PropTypes.func,\n\n // Calls back with (containerWidth, margin, cols, containerPadding)\n onWidthChange: PropTypes.func\n };\n\n static defaultProps = {\n breakpoints: { lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 },\n cols: { lg: 12, md: 10, sm: 6, xs: 4, xxs: 2 },\n layouts: {},\n margin: [10, 10],\n containerPadding: {\n lg: [0, 0],\n md: [0, 0],\n sm: [0, 0],\n xs: [0, 0],\n xxs: [0, 0]\n },\n onBreakpointChange: noop,\n onLayoutChange: noop,\n onWidthChange: noop\n };\n\n state = this.generateInitialState();\n\n generateInitialState(): State {\n const { width, breakpoints, layouts, cols } = this.props;\n const breakpoint = getBreakpointFromWidth(breakpoints, width);\n const colNo = getColsFromBreakpoint(breakpoint, cols);\n // verticalCompact compatibility, now deprecated\n const compactType =\n this.props.verticalCompact === false ? null : this.props.compactType;\n // Get the initial layout. This can tricky; we try to generate one however possible if one doesn't exist\n // for this layout.\n const initialLayout = findOrGenerateResponsiveLayout(\n layouts,\n breakpoints,\n breakpoint,\n breakpoint,\n colNo,\n compactType\n );\n\n return {\n layout: initialLayout,\n breakpoint: breakpoint,\n cols: colNo\n };\n }\n\n static getDerivedStateFromProps(nextProps: Props<*>, prevState: State) {\n if (!isEqual(nextProps.layouts, prevState.layouts)) {\n // Allow parent to set layouts directly.\n const { breakpoint, cols } = prevState;\n\n // Since we're setting an entirely new layout object, we must generate a new responsive layout\n // if one does not exist.\n const newLayout = findOrGenerateResponsiveLayout(\n nextProps.layouts,\n nextProps.breakpoints,\n breakpoint,\n breakpoint,\n cols,\n nextProps.compactType\n );\n return { layout: newLayout, layouts: nextProps.layouts };\n }\n\n return null;\n }\n\n componentDidUpdate(prevProps: Props<*>) {\n // Allow parent to set width or breakpoint directly.\n if (\n this.props.width != prevProps.width ||\n this.props.breakpoint !== prevProps.breakpoint ||\n !isEqual(this.props.breakpoints, prevProps.breakpoints) ||\n !isEqual(this.props.cols, prevProps.cols)\n ) {\n this.onWidthChange(prevProps);\n }\n }\n\n // wrap layouts so we do not need to pass layouts to child\n onLayoutChange = (layout: Layout) => {\n this.props.onLayoutChange(layout, {\n ...this.props.layouts,\n [this.state.breakpoint]: layout\n });\n };\n\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 onWidthChange(prevProps: Props<*>) {\n const { breakpoints, cols, layouts, compactType } = this.props;\n const newBreakpoint =\n this.props.breakpoint ||\n getBreakpointFromWidth(this.props.breakpoints, this.props.width);\n\n const lastBreakpoint = this.state.breakpoint;\n const newCols: number = getColsFromBreakpoint(newBreakpoint, cols);\n const newLayouts = { ...layouts };\n\n // Breakpoint change\n if (\n lastBreakpoint !== newBreakpoint ||\n prevProps.breakpoints !== breakpoints ||\n prevProps.cols !== cols\n ) {\n // Preserve the current layout if the current breakpoint is not present in the next layouts.\n if (!(lastBreakpoint in newLayouts))\n newLayouts[lastBreakpoint] = cloneLayout(this.state.layout);\n\n // Find or generate a new layout.\n let layout = findOrGenerateResponsiveLayout(\n newLayouts,\n breakpoints,\n newBreakpoint,\n lastBreakpoint,\n newCols,\n compactType\n );\n\n // This adds missing items.\n layout = synchronizeLayoutWithChildren(\n layout,\n this.props.children,\n newCols,\n compactType\n );\n\n // Store the new layout.\n newLayouts[newBreakpoint] = layout;\n\n // callbacks\n this.props.onLayoutChange(layout, newLayouts);\n this.props.onBreakpointChange(newBreakpoint, newCols);\n\n this.setState({\n breakpoint: newBreakpoint,\n layout: layout,\n cols: newCols\n });\n }\n\n const margin = getIndentationValue(this.props.margin, newBreakpoint);\n const containerPadding = getIndentationValue(\n this.props.containerPadding,\n newBreakpoint\n );\n\n //call onWidthChange on every change of width, not only on breakpoint changes\n this.props.onWidthChange(\n this.props.width,\n margin,\n newCols,\n containerPadding\n );\n }\n\n render() {\n /* eslint-disable no-unused-vars */\n const {\n breakpoint,\n breakpoints,\n cols,\n layouts,\n margin,\n containerPadding,\n onBreakpointChange,\n onLayoutChange,\n onWidthChange,\n ...other\n } = this.props;\n /* eslint-enable no-unused-vars */\n\n return (\n \n );\n }\n}\n","// @flow\nimport * as React from \"react\";\nimport PropTypes from \"prop-types\";\nimport ReactDOM from \"react-dom\";\n\ntype WPDefaultProps = {|\n measureBeforeMount: boolean\n|};\n\n// eslint-disable-next-line no-unused-vars\ntype WPProps = {|\n className?: string,\n style?: Object,\n ...WPDefaultProps\n|};\n\ntype WPState = {|\n width: number\n|};\n\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 */\nexport default function WidthProvider(\n ComposedComponent: React.AbstractComponent\n): React.AbstractComponent<{|\n ...Config,\n measureBeforeMount?: boolean,\n className?: string,\n style?: Object,\n width?: number\n|}> {\n return class WidthProvider extends React.Component<\n {|\n ...Config,\n measureBeforeMount?: boolean,\n className?: string,\n style?: Object,\n width?: number\n |},\n WPState\n > {\n static defaultProps: WPDefaultProps = {\n measureBeforeMount: false\n };\n\n static 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.bool\n };\n\n state = {\n width: 1280\n };\n\n mounted: boolean = false;\n\n componentDidMount() {\n this.mounted = true;\n\n window.addEventListener(\"resize\", this.onWindowResize);\n // 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 this.onWindowResize();\n }\n\n componentWillUnmount() {\n this.mounted = false;\n window.removeEventListener(\"resize\", this.onWindowResize);\n }\n\n onWindowResize = () => {\n if (!this.mounted) return;\n // eslint-disable-next-line react/no-find-dom-node\n const node = ReactDOM.findDOMNode(this); // Flow casts this to Text | Element\n if (node instanceof HTMLElement)\n this.setState({ width: node.offsetWidth });\n };\n\n render() {\n const { measureBeforeMount, ...rest } = this.props;\n if (measureBeforeMount && !this.mounted) {\n return (\n
\n );\n }\n\n return ;\n }\n };\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/package.json b/package.json index fb01645ea..0f8818df0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-grid-layout", - "version": "0.18.3", + "version": "1.0.0", "description": "A draggable and resizable grid layout with responsive breakpoints, for React.", "main": "index.js", "scripts": { @@ -108,4 +108,4 @@ "pre-commit": "lint-staged && make lint && make test" } } -} +} \ No newline at end of file