/*! For license information please see dll.EnlargeableGrid.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[44],{837:function(e,r,t){"use strict";t.r(r);var n=t(14),a=t.n(n),i=t(12),l=t.n(i),s=t(10),o=t.n(s),c=t(15),u=t.n(c),g=t(16),h=t.n(g),b=t(8),d=t.n(b),f=t(7),p=t.n(f),y=t(0),m=t.n(y),v=t(1),D=t.n(v),R=t(1321),w=t.n(R),z=t(138),k=t.n(z),x=t(135),H=t.n(x);function S(e){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,n=d()(e);if(r){var a=d()(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return h()(this,t)}}var P=Object(R.WidthProvider)(w.a),_=function(e){u()(t,e);var r=S(t);function t(e){var n;a()(this,t),n=r.call(this,e),p()(o()(n),"enlargeDivFactory",(function(e){return function(){var r=k()(n.state.layout),t=k()(n.state.enlarged),a=n.props,i=a.itemHeight,l=a.enlargedHeight,s=a.isDraggable,o=a.isResizable;if(n.state.enlarged[e])for(var c=0;c<r.length;c++)r[c]={i:String(c),x:4*c%12,y:H()(c/i)*i,w:4,h:i,isDraggable:s,isResizable:o},t[c]=!1;else for(var u=0;u<r.length;u++)u<e?(r[u]={i:String(u),x:4*u%12,y:H()(u/i)*i,w:4,h:i,isDraggable:s,isResizable:o},t[u]=!1):u===e?(r[u]={i:String(u),x:0,y:H()(u/i)*i,w:12,h:l,isDraggable:s,isResizable:o},t[e]=!0):(r[u]={i:String(u),x:4*(u-e)%12,y:H()(u/i)*i+l,w:4,h:i,isDraggable:s,isResizable:o},t[u]=!1);n.setState({layout:r,enlarged:t})}}));var i=e.children.map((function(r,t){var a=n.props.itemHeight;return{i:String(t),x:4*t%12,y:H()(t/a)*a,w:4,h:a,isDraggable:e.isDraggable,isResizable:e.isResizable}}));return n.state={layout:i,enlarged:[],children:e.children},n}return l()(t,[{key:"render",value:function(){var e=this;return m.a.createElement(P,{className:"layout",layout:this.state.layout,cols:12,rowHeight:30},this.props.enlargeable?this.props.children.map((function(r,t){return m.a.createElement("button",{key:t,onClick:e.enlargeDivFactory(t),style:{border:"2px solid darkgray",cursor:"zoom-in",background:"none"}},r)})):this.props.children.map((function(e,r){return m.a.createElement("div",{key:r,style:{border:"2px solid darkgray"}},e)})))}}],[{key:"getDerivedStateFromProps",value:function(e,r){if(e.children!==r.children){var t=e.itemHeight;return{layout:e.children.map((function(r,n){return{i:String(n),x:4*n%12,y:H()(n/t)*t,w:4,h:t,isDraggable:e.isDraggable,isResizable:e.isResizable}})),children:e.children}}return null}}]),t}(y.Component);_.defaultProps={enlargeable:!0,enlargedHeight:18,isDraggable:!1,isResizable:!1,itemHeight:9},_.propTypes={enlargeable:D.a.bool,enlargedHeight:D.a.number,isDraggable:D.a.bool,isResizable:D.a.bool,itemHeight:D.a.number},r.default=_}}]);