12345678910 |
- /*!
- * filename: ej2-layouts.min.js
- * version : 19.1.63
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.layouts=function(e,t){"use strict";var i=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),s=function(e,t,i,s){var n,a=arguments.length,l=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(l=(a<3?n(l):a>3?n(t,i,l):n(t,i))||l);return a>3&&l&&Object.defineProperty(t,i,l),l},n="e-splitter",a="e-pane",l="e-pane-horizontal",r="e-pane-vertical",o="e-split-bar",h="e-split-bar-horizontal",d="e-static-pane",p="e-resize-handler",c="e-arrow-left",u="e-arrow-up",g="e-arrow-down",m="e-icon-hidden",v=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return i(n,e),s([t.Property()],n.prototype,"size",void 0),s([t.Property(!1)],n.prototype,"collapsible",void 0),s([t.Property(!1)],n.prototype,"collapsed",void 0),s([t.Property(!0)],n.prototype,"resizable",void 0),s([t.Property(null)],n.prototype,"min",void 0),s([t.Property(null)],n.prototype,"max",void 0),s([t.Property()],n.prototype,"content",void 0),s([t.Property("")],n.prototype,"cssClass",void 0),n}(t.ChildProperty),f=function(e){function f(t,i){var s=e.call(this,t,i)||this;return s.allPanes=[],s.paneOrder=[],s.separatorOrder=[],s.allBars=[],s.previousCoordinates={},s.currentCoordinates={},s.updatePrePaneInPercentage=!1,s.updateNextPaneInPercentage=!1,s.panesDimensions=[],s.border=0,s.validDataAttributes=["data-size","data-min","data-max","data-collapsible","data-resizable","data-content","data-collapsed"],s.validElementAttributes=["data-orientation","data-width","data-height"],s.iconsDelay=300,s.templateElement=[],s.collapseFlag=!1,s.expandFlag=!0,s}return i(f,e),f.prototype.onPropertyChanged=function(e,i){if(this.element.classList.contains(n))for(var s=0,a=Object.keys(e);s<a.length;s++)switch(a[s]){case"height":this.setSplitterSize(this.element,e.height,"height");break;case"width":this.setSplitterSize(this.element,e.width,"width");break;case"cssClass":this.setCssClass(this.element,e.cssClass);break;case"enabled":this.isEnabled(this.enabled);break;case"enableReversePanes":this.setReversePane();break;case"separatorSize":this.setSeparatorSize(e.separatorSize);break;case"orientation":this.changeOrientation(e.orientation);break;case"paneSettings":if(e.paneSettings instanceof Array&&i.paneSettings instanceof Array)this.destroyPaneSettings(),this.allBars=[],this.allPanes=[],this.createSplitPane(this.element),this.addSeparator(this.element),this.getPanesDimensions(),this.setRTL(this.enableRtl),this.isCollapsed();else for(var l=Object.keys(e.paneSettings),r=0;r<l.length;r++)for(var o=parseInt(Object.keys(e.paneSettings)[r],10),h=Object.keys(e.paneSettings[o]).length,d=0;d<h;d++){var p=Object.keys(e.paneSettings[o])[d];switch(p){case"content":var c=Object(e.paneSettings[o])[p];t.isNullOrUndefined(c)||(this.allPanes[o].innerHTML="",this.setTemplate(c,this.allPanes[o]));break;case"resizable":var u=Object(e.paneSettings[o])[p];this.resizableModel(o,u);break;case"collapsible":this.collapsibleModelUpdate(o);break;case"collapsed":e.paneSettings[o].collapsed?this.isCollapsed(o):this.collapsedOnchange(o);break;case"cssClass":this.setCssClass(this.allPanes[o],e.paneSettings[o].cssClass);break;case"size":var g=Object(e.paneSettings[o])[p];""===g||t.isNullOrUndefined(g)||this.updatePaneSize(g,o)}}break;case"enableRtl":this.setRTL(e.enableRtl)}},f.prototype.updatePaneSize=function(e,t){this.allPanes[t].style.flexBasis=e;for(var i,s=[],n=0,a=0;a<this.allPanes.length;a++)this.paneSettings[a].size||""===this.allPanes[a].innerText?this.paneSettings[a].size&&(i="Horizontal"===this.orientation?this.allPanes[t].offsetWidth:this.allPanes[t].offsetHeight):(s[n]=a,n++);i="Horizontal"===this.orientation?this.allBars[0].offsetWidth*this.allBars.length+i:this.allBars[0].offsetHeight*this.allBars.length+i;for(var l=(("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)-i-2*this.border)/s.length,r=0;r<s.length;r++)this.allPanes[s[r]].style.flexBasis=l+"px";this.allPanes[t].classList.add(d)},f.prototype.preRender=function(){if(this.onReportWindowSize=this.reportWindowSize.bind(this),this.wrapper=this.element.cloneNode(!0),this.wrapperParent=this.element.parentElement,!this.checkBlazor()){t.removeClass([this.wrapper],["e-control","e-lib",n]);var e="Horizontal"===this.orientation?"e-splitter-horizontal":"e-splitter-vertical";t.addClass([this.element],e)}var i="msie"===t.Browser.info.name?"e-ie":"";this.setCssClass(this.element,i),t.Browser.isDevice&&t.addClass([this.element],"e-splitter-touch")},f.prototype.getPersistData=function(){return this.addOnPersist(["paneSettings"])},f.prototype.getModuleName=function(){return"splitter"},f.prototype.render=function(){this.checkBlazor()||(this.checkDataAttributes(),this.setCssClass(this.element,this.cssClass),this.isEnabled(this.enabled),this.setDimension(this.getHeight(this.element),this.getWidth(this.element))),this.createSplitPane(this.element),this.addSeparator(this.element),this.getPanesDimensions(),this.setPaneSettings(),this.checkBlazor()||this.setRTL(this.enableRtl),this.enableReversePanes&&this.setReversePane(),this.collapseFlag=!0,this.isCollapsed(),this.collapseFlag=!1,t.EventHandler.add(document,"touchstart click",this.onDocumentClick,this),this.renderComplete(),this.element.ownerDocument.defaultView.addEventListener("resize",this.onReportWindowSize,!0),t.EventHandler.add(this.element,"keydown",this.onMove,this)},f.prototype.onDocumentClick=function(e){e.target.classList.contains(o)||t.isNullOrUndefined(this.currentSeparator)||(this.currentSeparator.classList.remove("e-split-bar-hover"),this.currentSeparator.classList.remove("e-split-bar-active"))},f.prototype.checkPaneSize=function(e){var i="Horizontal"===this.orientation?this.previousPane.offsetWidth:this.previousPane.offsetHeight,s="Horizontal"===this.orientation?this.nextPane.offsetWidth:this.nextPane.offsetHeight,n=t.isNullOrUndefined(this.separatorSize)?1:this.separatorSize;if(this.previousPane.style.flexBasis.indexOf("%")>0||this.nextPane.style.flexBasis.indexOf("%")>0){var a=this.updatePaneFlexBasis(this.previousPane),l=this.updatePaneFlexBasis(this.nextPane);this.totalPercent=a+l,this.totalWidth=this.convertPercentageToPixel(this.totalPercent+"%"),"keydown"!==e.type||t.isNullOrUndefined(e.keyCode)||((39===e.keyCode||40===e.keyCode)&&s>0?(this.previousPane.style.flexBasis=a+1+"%",this.nextPane.style.flexBasis=l-1+"%"):(37===e.keyCode||38===e.keyCode)&&i>0&&(this.previousPane.style.flexBasis=a-1+"%",this.nextPane.style.flexBasis=l+1+"%"))}else this.totalWidth="Horizontal"===this.orientation?this.previousPane.offsetWidth+this.nextPane.offsetWidth:this.previousPane.offsetHeight+this.nextPane.offsetHeight,"keydown"!==e.type||t.isNullOrUndefined(e.keyCode)||((39===e.keyCode||40===e.keyCode)&&s>0?(this.addStaticPaneClass(),this.previousPane.style.flexBasis=i+n+"px",this.nextPane.style.flexBasis=s<n?"0px":s-n+"px"):(37===e.keyCode||38===e.keyCode)&&i>0&&(this.addStaticPaneClass(),this.previousPane.style.flexBasis=i<n?"0px":i-n+"px",this.nextPane.style.flexBasis=s+n+"px"))},f.prototype.onMove=function(e){if(this.allPanes.length>1){var i=this.getSeparatorIndex(this.currentSeparator),s=this.previousPane.classList.contains("e-collapsed"),n=this.previousPane.classList.contains("e-expanded"),a=this.nextPane.classList.contains("e-collapsed");("Horizontal"!==this.orientation&&38===e.keyCode||"Horizontal"===this.orientation&&39===e.keyCode||"Horizontal"===this.orientation&&37===e.keyCode||"Horizontal"!==this.orientation&&40===e.keyCode)&&(!n&&!a&&!s||n&&!a)&&document.activeElement.classList.contains(o)&&this.paneSettings[i].resizable&&this.paneSettings[i+1].resizable?(this.checkPaneSize(e),this.triggerResizing(e)):13===e.keyCode&&this.paneSettings[i].collapsible&&document.activeElement.classList.contains(o)&&(this.previousPane.classList.contains("e-collapsed")?(this.expand(i),t.addClass([this.currentSeparator],"e-split-bar-active")):(this.collapse(i),t.addClass([this.currentSeparator],"e-split-bar-active")))}},f.prototype.sanitizeHelper=function(e){if(this.enableHtmlSanitizer){var i=t.SanitizeHtmlHelper.beforeSanitize(),s={cancel:!1,helper:null};t.extend(i,i,s),this.trigger("beforeSanitizeHtml",i),i.cancel&&!t.isNullOrUndefined(i.helper)?e=i.helper(e):i.cancel||(e=t.SanitizeHtmlHelper.serializeValue(i,e))}return e},f.prototype.checkDataAttributes=function(){for(var e,i,s=0;s<this.validElementAttributes.length;s++)i=this.element.getAttribute(this.validElementAttributes[s]),t.isNullOrUndefined(i)||(this[e=this.removeDataPrefix(this.validElementAttributes[s])]=i);for(var n=0;n<this.element.children.length;n++)for(var a=0;a<this.validDataAttributes.length;a++)if(i=this.element.children[n].getAttribute(this.validDataAttributes[a]),!t.isNullOrUndefined(i)){i="collapsible"===(e=this.removeDataPrefix(this.validDataAttributes[a]))||"resizable"===e?"true"===i:i,t.isNullOrUndefined(this.paneSettings[n])&&(this.paneSettings[n]={size:"",min:null,max:null,content:"",resizable:!0,collapsible:!1,collapsed:!1});var l=this.paneSettings[n][e];"resizable"!==e&&"collapsible"!==e&&"collapsed"!==e||(this.paneSettings[n][e]=i),(t.isNullOrUndefined(l)||""===l)&&(this.paneSettings[n][e]=i)}},f.prototype.destroyPaneSettings=function(){[].slice.call(this.element.children).forEach(function(e){t.detach(e)}),this.restoreElem()},f.prototype.checkBlazor=function(){return t.isBlazor()&&this.isServerRendered},f.prototype.setPaneSettings=function(){for(var e=this.allPanes.length,i=[],s={size:"",min:null,max:null,content:"",resizable:!0,collapsed:!1,collapsible:!1,cssClass:""},n=0;n<e;n++)t.isNullOrUndefined(this.paneSettings[n])?i[n]=s:i[n]=this.paneSettings[n];this.setProperties({paneSettings:i},!0)},f.prototype.checkArrow=function(e,t){return this.allBars[e].querySelector(".e-navigate-arrow."+t)},f.prototype.removeDataPrefix=function(e){return e.slice(e.lastIndexOf("-")+1)},f.prototype.setRTL=function(e){e?t.addClass([this.element],"e-rtl"):t.removeClass([this.element],"e-rtl")},f.prototype.setReversePane=function(){this.allPanes=this.allPanes.reverse(),this.allBars=this.allBars.reverse(),t.addClass([this.allBars[this.allBars.length-1]],"e-last-bar"),t.removeClass([this.allBars[0]],"e-last-bar"),this.setProperties({paneSettings:this.paneSettings.reverse()},!0),this.enableReversePanes?this.element.setAttribute("dir","rtl"):this.element.removeAttribute("dir")},f.prototype.setSplitterSize=function(e,i,s){var n="width"===s?{width:t.formatUnit(i)}:{height:t.formatUnit(i)};t.setStyleAttribute(e,n)},f.prototype.getPanesDimensions=function(){for(var e=0;e<this.allPanes.length;e++)"Horizontal"===this.orientation?this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().width):this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().height)},f.prototype.setCssClass=function(e,i){i&&t.addClass([e],i.split(i.indexOf(",")>-1?",":" "))},f.prototype.hideResizer=function(e){t.addClass([t.select("."+p,e)],"e-hide-handler")},f.prototype.showResizer=function(e){!t.isNullOrUndefined(this.previousPane)&&this.previousPane.classList.contains("e-resizable")&&!t.isNullOrUndefined(this.nextPane)&&this.nextPane.classList.contains("e-resizable")&&t.removeClass([t.select("."+p,e)],"e-hide-handler")},f.prototype.resizableModel=function(e,i){var s=e===this.allBars.length?e-1:e,n=e;t.EventHandler.remove(this.allBars[s],"mousedown",this.onMouseDown),i?(t.EventHandler.add(this.allBars[s],"mousedown",this.onMouseDown,this),this.isResizable()&&(this.showResizer(this.allBars[s]),t.removeClass([t.select("."+p,this.allBars[s])],"e-hide-handler"),this.allBars[s].classList.add("e-resizable-split-bar"),e===this.allBars.length?this.allPanes[e].classList.add("e-resizable"):this.allPanes[s].classList.add("e-resizable"),this.updateResizablePanes(n))):(this.updateResizablePanes(n),this.hideResizer(this.allBars[s]),this.allBars[s].classList.remove("e-resizable-split-bar"),e===this.allBars.length?this.allPanes[e].classList.remove("e-resizable"):this.allPanes[s].classList.remove("e-resizable"))},f.prototype.collapsibleModelUpdate=function(e){var t=e===this.allBars.length?e-1:e,i="Horizontal"===this.orientation?this.checkArrow(t,c):this.checkArrow(t,u),s="Horizontal"===this.orientation?this.checkArrow(t,"e-arrow-right"):this.checkArrow(t,g);this.paneCollapsible(this.allPanes[e],e),this.updateCollapseIcons(t,s,i)},f.prototype.collapseArrow=function(e,i){return t.selectAll("."+i,this.allBars[e])[0]},f.prototype.updateIsCollapsed=function(e,i,s){if(!t.isNullOrUndefined(e)){var n=e===this.allBars.length,a=n?e-1:e;(!n&&this.allPanes[e+1].classList.contains("e-collapsed")&&0!==e?this.collapseArrow(a-1,s):n?this.collapseArrow(a,s):this.collapseArrow(a,i)).click()}},f.prototype.isCollapsed=function(e){var i=this;if(t.isNullOrUndefined(e)||!this.paneSettings[e].collapsed||!t.isNullOrUndefined(this.allPanes[e].classList.contains("e-collapsed"))){if(this.expandFlag=!1,t.isNullOrUndefined(e)){for(s=0;s<this.allPanes.length;s++)!t.isNullOrUndefined(this.paneSettings[s])&&this.paneSettings[s].collapsed&&this.updateIsCollapsed(s,this.targetArrows().collapseArrow,this.targetArrows().lastBarArrow);for(var s=this.allPanes.length-1;s>=0;s--)if(!t.isNullOrUndefined(this.paneSettings[s])&&this.paneSettings[s].collapsed&&!this.allPanes[s].classList.contains("e-collapsed")){var n="Horizontal"===this.orientation?"e-arrow-right":g;0!==s&&(a=this.collapseArrow(s-1,n)).click(),this.nextPane.classList.contains("e-collapsed")||(a=this.collapseArrow(s-1,n)).click()}}else{this.collapseFlag=!0;var a=void 0,l=e===this.allBars.length,r=l?e-1:e,o={target:a=!l&&this.allPanes[e+1].classList.contains("e-collapsed")&&0!==e?this.collapseArrow(r-1,this.targetArrows().lastBarArrow):l?this.collapseArrow(r,this.targetArrows().lastBarArrow):this.collapseArrow(r,this.targetArrows().collapseArrow)},h=this.beforeAction(o);this.trigger("beforeCollapse",h,function(t){if(!t.cancel){var s=[];s[0]=e;for(var n=1,a=0;a<i.allPanes.length;a++)i.allPanes[a].classList.contains("e-collapsed")&&(s[n]=a,n++);s=s.sort(),i.updateIsCollapsed(e,i.targetArrows().collapseArrow,i.targetArrows().lastBarArrow);for(a=0;a<s.length;a++)i.allPanes[s[a]].classList.contains("e-collapsed")||i.updateIsCollapsed(s[a],i.targetArrows().collapseArrow,i.targetArrows().lastBarArrow);for(a=s.length;a>0;a--)if(!i.allPanes[s[a-1]].classList.contains("e-collapsed")){var l=i.targetArrows();i.updateIsCollapsed(s[a-1],l.collapseArrow,l.lastBarArrow)}var r=i.afterAction(o);i.trigger("collapsed",r),i.collapseFlag=!1}})}this.expandFlag=!0}},f.prototype.targetArrows=function(){return this.splitterProperty(),{collapseArrow:"Horizontal"===this.orientation?c:u,lastBarArrow:"Vertical"===this.orientation?g:"e-arrow-right"}},f.prototype.collapsedOnchange=function(e){t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].collapsed)||!this.allPanes[e].classList.contains("e-collapsed")||this.updateIsCollapsed(e,this.targetArrows().lastBarArrow,this.targetArrows().collapseArrow)},f.prototype.isEnabled=function(e){e?t.removeClass([this.element],"e-disabled"):t.addClass([this.element],"e-disabled")},f.prototype.setSeparatorSize=function(e){for(var i=t.isNullOrUndefined(e)?"auto":e+"px",s="Horizontal"===this.orientation?h:"e-split-bar-vertical",n=0;n<this.allBars.length;n++){var a=t.selectAll("."+s,this.element)[n],l=t.selectAll("."+p,a)[0];"Horizontal"===this.orientation?(a.style.width=i,t.isNullOrUndefined(l)||(l.style.width=i)):(a.style.height=i,t.isNullOrUndefined(l)||(l.style.height=i))}},f.prototype.changeOrientation=function(e){var i="Vertical"===e;this.element.classList.remove(i?"e-splitter-horizontal":"e-splitter-vertical"),this.element.classList.add(i?"e-splitter-vertical":"e-splitter-horizontal");for(s=0;s<this.allPanes.length;s++)this.allPanes[s].classList.remove(i?l:r),this.allPanes[s].classList.add(i?r:l);for(var s=0;s<this.allBars.length;s++)t.detach(this.allBars[s]);this.allBars=[],this.addSeparator(this.element)},f.prototype.checkSplitPane=function(e,t){return this.collectPanes(e.parentElement.children)[t]},f.prototype.collectPanes=function(e){for(var t=[],i=0;i<e.length;i++)e[i].classList.contains(a)&&t.push(e[i]);return t},f.prototype.getPrevPane=function(e){return this.enableReversePanes?this.getOrderPane(e+1):this.getOrderPane(e-1)},f.prototype.getNextPane=function(e){return this.enableReversePanes?this.getOrderPane(e-1):this.getOrderPane(e+1)},f.prototype.getOrderPane=function(e){for(var t,i=0;i<this.element.children.length;i++)parseInt(this.element.children[i].style.order,10)===e&&(t=this.element.children[i]);return t},f.prototype.getOrderIndex=function(e,t){for(var i,s="pane"===t?this.allPanes:this.allBars,n=0;n<s.length;n++)parseInt(s[n].style.order,10)===e&&(i=n);return i},f.prototype.updateSeparatorSize=function(e){var i=t.isNullOrUndefined(this.separatorSize)?"1px":this.separatorSize+"px";"Horizontal"===this.orientation?e.style.width=i:e.style.height=i},f.prototype.addResizeHandler=function(e){var i=this.createElement("div");t.addClass([i],[p,"e-icons"]),this.updateSeparatorSize(i),e.appendChild(i)},f.prototype.getHeight=function(e){this.height;return""!==e.style.height&&"100%"===this.height?e.style.height:this.height},f.prototype.getWidth=function(e){this.width;return""!==e.style.width&&"100%"===this.width?e.style.width:this.width},f.prototype.setDimension=function(e,i){t.setStyleAttribute(this.element,{height:e,width:i})},f.prototype.updateCollapseIcons=function(e,i,s){t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].collapsible)||(this.paneSettings[e].collapsible?t.removeClass([s],[m]):t.addClass([s],[m]),t.isNullOrUndefined(this.paneSettings[e+1])||(this.paneSettings[e+1].collapsible?t.removeClass([i],[m]):t.addClass([i],[m])),t.isNullOrUndefined(this.paneSettings[e+1])||this.paneSettings[e+1].collapsible&&(this.paneSettings[e+1].collapsible?t.removeClass([i],[m]):t.addClass([i],[m])))},f.prototype.updateIconClass=function(){"Horizontal"===this.orientation?(this.leftArrow=c,this.rightArrow="e-arrow-right"):(this.leftArrow=u,this.rightArrow=g)},f.prototype.createSeparator=function(e){var i=this.createElement("div");this.allBars.push(i);var s=this.createElement("button"),n=this.createElement("button");s.setAttribute("tabindex","-1"),n.setAttribute("tabindex","-1"),s.setAttribute("aria-label","Toggle navigation"),n.setAttribute("aria-label","Toggle navigation"),s.setAttribute("type","button"),n.setAttribute("type","button");var a=t.isNullOrUndefined(this.separatorSize)?"1px":this.separatorSize+"px",l=this;return"Horizontal"===this.orientation?(this.updateIconClass(),t.addClass([n],["e-navigate-arrow",c,m]),t.addClass([s],["e-navigate-arrow","e-arrow-right",m]),t.addClass([i],[o,h]),i.style.width=a):(t.addClass([s],["e-navigate-arrow",g,m]),t.addClass([n],["e-navigate-arrow",u,m]),t.addClass([i],[o,"e-split-bar-vertical"]),this.updateIconClass(),i.style.height=a),this.addMouseActions(i),i.appendChild(n),this.addResizeHandler(i),i.appendChild(s),this.updateCollapseIcons(e,s,n),i.setAttribute("tabindex","0"),this.enableReversePanes?i.setAttribute("dir","ltr"):i.removeAttribute("dir"),i.addEventListener("focus",function(){i.classList.add("e-split-bar-active"),l.currentSeparator=i,l.getPaneDetails()}),i.addEventListener("blur",function(){i.classList.remove("e-split-bar-active")}),i},f.prototype.updateResizablePanes=function(e){this.getPaneDetails(),this.isResizable()?this.allPanes[e].classList.add("e-resizable"):this.allPanes[e].classList.remove("e-resizable")},f.prototype.addSeparator=function(e){var i,s,n=this,a=this.allPanes.length,l=e.children;if(this.checkBlazor())for(var r=0;r<this.element.children.length;r++)this.element.children[r].classList.contains(o)&&this.allBars.push(this.element.children[r]);for(c=0;c<a;c++)if(c<a-1){if(this.checkBlazor()||(i=this.createSeparator(c),t.setStyleAttribute(i,{order:2*c+1}),this.separatorOrder.push(2*c+1),l[c].parentNode.appendChild(i),this.currentSeparator=i,i.setAttribute("role","separator"),i.setAttribute("aria-orientation",this.orientation.toLowerCase())),this.checkBlazor()&&(s=this,i=this.allBars[c],this.updateIconClass()),this.checkBlazor()||this.wireClickEvents(),this.checkBlazor()&&!t.isNullOrUndefined(i)&&(this.currentSeparator=i,this.addMouseActions(i),this.wireClickEvents(),i.addEventListener("focus",function(){document.activeElement.classList.contains("e-split-bar")&&(s.currentSeparator=document.activeElement,s.currentSeparator.classList.add("e-split-bar-active")),n.getPaneDetails()}),i.addEventListener("blur",function(){s.currentSeparator.classList.remove("e-split-bar-active")})),!t.isNullOrUndefined(i))if(this.isResizable()){t.EventHandler.add(i,"mousedown",this.onMouseDown,this);var h="msie"===t.Browser.info.name?"pointerdown":"touchstart";t.EventHandler.add(i,h,this.onMouseDown,this),i.classList.add("e-resizable-split-bar"),this.updateResizablePanes(c)}else t.addClass([t.select("."+p,i)],"e-hide-handler")}else i&&t.addClass([i],"e-last-bar"),a>1&&this.updateResizablePanes(c);if("msie"===t.Browser.info.name)for(var d=this.element.querySelectorAll(".e-splitter .e-resize-handler"),c=0;c<d.length;c++){var u=t.isNullOrUndefined(this.separatorSize)?1:this.separatorSize;d[c].style.paddingLeft=u/2+"px",d[c].style.paddingRight=u/2+"px"}},f.prototype.isResizable=function(){var e=!1;return(!t.isNullOrUndefined(this.paneSettings[this.getPreviousPaneIndex()])&&this.paneSettings[this.getPreviousPaneIndex()].resizable&&!t.isNullOrUndefined(this.paneSettings[this.getNextPaneIndex()])&&this.paneSettings[this.getNextPaneIndex()].resizable||t.isNullOrUndefined(this.paneSettings[this.getNextPaneIndex()]))&&(e=!0),e},f.prototype.addMouseActions=function(e){var i,s,n=this;e.addEventListener("mouseenter",function(){i=setTimeout(function(){t.addClass([e],["e-split-bar-hover"])},n.iconsDelay)}),e.addEventListener("mouseleave",function(){clearTimeout(i),t.removeClass([e],["e-split-bar-hover"])}),e.addEventListener("mouseout",function(){clearTimeout(s)}),e.addEventListener("mouseover",function(){s=setTimeout(function(){t.addClass([e],["e-split-bar-hover"])},n.iconsDelay)})},f.prototype.getEventType=function(e){return e.indexOf("mouse")>-1?"mouse":"touch"},f.prototype.updateCurrentSeparator=function(e){this.currentSeparator=this.isSeparator(e)?e.parentElement:e},f.prototype.isSeparator=function(e){return!e.classList.contains(o)},f.prototype.isMouseEvent=function(e){var i=!1;return("mouse"===this.getEventType(e.type)||!t.isNullOrUndefined(e.pointerType)&&"mouse"===this.getEventType(e.pointerType))&&(i=!0),i},f.prototype.updateCursorPosition=function(e,i){if(this.isMouseEvent(e))this.changeCoordinates({x:e.pageX,y:e.pageY},i);else{var s="msie"!==t.Browser.info.name?e.touches[0]:e;this.changeCoordinates({x:s.pageX,y:s.pageY},i)}},f.prototype.changeCoordinates=function(e,t){"previous"===t?this.previousCoordinates=e:this.currentCoordinates=e},f.prototype.reportWindowSize=function(){var e=this,i=this.allPanes.length;if(!document.body.contains(this.element))return void document.defaultView.removeEventListener("resize",this.onReportWindowSize);for(var s=0;s<i;s++)t.isNullOrUndefined(this.paneSettings[s].size)&&this.allPanes[s].classList.remove(d),i-1===s&&this.element.querySelectorAll("."+d).length===i&&t.removeClass([this.allPanes[s]],d);i>0&&setTimeout(function(){e.updateSplitterSize(!0)},200)},f.prototype.updateSplitterSize=function(e){for(var t=0,i=[],s=0,n=this.element.children,a=0;a<n.length;a++)t+="Horizontal"===this.orientation?n[a].offsetWidth:n[a].offsetHeight;for(o=0;o<this.allBars.length;o++)t+="Horizontal"===this.orientation?parseInt(getComputedStyle(this.allBars[o]).marginLeft,10)+parseInt(getComputedStyle(this.allBars[o]).marginLeft,10):parseInt(getComputedStyle(this.allBars[o]).marginTop,10)+parseInt(getComputedStyle(this.allBars[o]).marginBottom,10);for(var l="Horizontal"===this.orientation?this.element.offsetWidth-(2*this.border+t):this.element.offsetHeight-(2*this.border+t),a=0;a<this.allPanes.length;a++)this.paneSettings[a].size||""===this.allPanes[a].innerText||(i[s]=a,s++);for(var r=l/i.length,o=0;o<i.length;o++)this.allPanes[i[o]].style.flexBasis="Horizontal"===this.orientation?this.allPanes[i[o]].offsetWidth+r+"px":this.allPanes[i[o]].offsetHeight+r+"px";if(2===this.allPanes.length&&e)for(var h=this.allPanes.length,d=void 0,p=void 0,c=void 0,u=void 0,a=0;a<h;a++)if(null!==this.paneSettings[a].min&&(p=this.convertPixelToNumber(this.paneSettings[a].min.toString()),this.paneSettings[a].min.indexOf("%")>0&&(p=this.convertPercentageToPixel(this.paneSettings[a].min)),d=this.convertPixelToNumber(p.toString()),this.allPanes[a].offsetWidth<d)){0===a?(c=this.allPanes[a],u=this.allPanes[a+1]):(c=this.allPanes[a],u=this.allPanes[a-1]);var g=d-this.allPanes[a].offsetWidth,m=c.style.flexBasis.indexOf("%")>-1;c.style.flexBasis=m?this.convertPixelToPercentage(c.offsetWidth+g)+"%":c.offsetWidth+g+"px",u.style.flexBasis=u.style.flexBasis.indexOf("%")>-1?this.convertPixelToPercentage(u.offsetWidth-g)+"%":u.offsetWidth-g+"px"}},f.prototype.wireResizeEvents=function(){t.EventHandler.add(document,"mousemove",this.onMouseMove,this),t.EventHandler.add(document,"mouseup",this.onMouseUp,this);var e="msie"===t.Browser.info.name?"pointermove":"touchmove",i="msie"===t.Browser.info.name?"pointerup":"touchend";t.EventHandler.add(document,e,this.onMouseMove,this),t.EventHandler.add(document,i,this.onMouseUp,this)},f.prototype.unwireResizeEvents=function(){this.element.ownerDocument.defaultView.removeEventListener("resize",this.onReportWindowSize);var e="msie"===t.Browser.info.name?"pointermove":"touchmove",i="msie"===t.Browser.info.name?"pointerup":"touchend";t.EventHandler.remove(document,"mousemove",this.onMouseMove),t.EventHandler.remove(document,"mouseup",this.onMouseUp),t.EventHandler.remove(document,e,this.onMouseMove),t.EventHandler.remove(document,i,this.onMouseUp)},f.prototype.wireClickEvents=function(){t.EventHandler.add(this.currentSeparator,"touchstart click",this.clickHandler,this)},f.prototype.clickHandler=function(e){if(!e.target.classList.contains("e-navigate-arrow")){var i=t.selectAll(".e-splitter > .e-split-bar.e-split-bar-hover");i.length>0&&t.removeClass(i,"e-split-bar-hover"),e.target.classList.add("e-split-bar-hover")}var s=e.target;(s.classList.contains(c)||s.classList.contains(u))&&this.collapseAction(e),(s.classList.contains("e-arrow-right")||s.classList.contains(g))&&this.expandAction(e);for(var n=0,a=this.element.children,l=0;l<a.length;l++)n+="Horizontal"===this.orientation?a[l].offsetWidth:a[l].offsetHeight;n>this.element.offsetWidth&&this.updateSplitterSize()},f.prototype.expandAction=function(e){var t=this;this.splitterDetails(e);var i=this.beforeAction(e);this.expandFlag?this.trigger("beforeExpand",i,function(i){i.cancel||t.expandPane(e);var s=t.afterAction(e);t.trigger("expanded",s)}):this.expandPane(e)},f.prototype.expandPane=function(e){this.removeStaticPanes();var i=this.element.querySelectorAll(".e-collapsed").length,s=!this.previousPane.classList.contains("e-collapsed")&&this.previousPane.classList.contains(d)&&!this.nextPane.classList.contains("e-collapsed")&&!this.nextPane.classList.contains("e-expanded")&&this.nextPane.nextElementSibling.classList.contains(a)&&!this.nextPane.nextElementSibling.classList.contains(d)&&!(i===this.allPanes.length-2),n=["e-collapsed","e-pane-hidden"];this.previousPane.classList.contains("e-collapsed")?(t.removeClass([this.previousPane],n),t.removeClass([this.nextPane],"e-expanded"),this.expandFlag&&this.updatePaneSettings(this.prevPaneIndex,!1)):(t.removeClass([this.nextPane],"e-expanded"),t.removeClass([this.previousPane],n),t.addClass([this.previousPane],"e-expanded"),t.addClass([this.nextPane],n),this.expandFlag&&this.updatePaneSettings(this.nextPaneIndex,!0)),this.updateIconsOnExpand(e),this.previousPane.setAttribute("aria-expanded","true"),this.nextPane.setAttribute("aria-expanded","false"),this.updateFlexGrow(this.checkStaticPanes()),s&&(this.previousPane.classList.remove("e-expanded"),this.previousPane.style.flexGrow="")},f.prototype.checkStaticPanes=function(){for(var e=!0,t=0;t<this.allPanes.length;t++)!this.allPanes[t].classList.contains("e-collapsed")&&e&&(e=!!this.allPanes[t].classList.contains(d));return e},f.prototype.updateFlexGrow=function(e){for(var t=0,i=0;i<this.element.children.length;i++)this.element.children[i].classList.contains("e-collapsed")&&(t+=1);for(var s=t===this.allPanes.length-2,n=this.allPanes,a=0;a<n.length;a++)n[a].classList.contains("e-expanded")?n[a].style.flexGrow="1":n[a].classList.contains("e-collapsed")?n[a].style.flexGrow="0":n[a].style.flexGrow="",e&&!this.nextPane.classList.contains("e-collapsed")&&(this.nextPane.style.flexGrow="1"),s&&!this.allPanes[a].classList.contains("e-collapsed")&&this.paneSettings[a].size&&a!==this.allPanes.length-1&&(n[a].style.flexGrow="")},f.prototype.hideTargetBarIcon=function(e,i){t.addClass([t.select("."+i,e)],m)},f.prototype.showTargetBarIcon=function(e,i){t.removeClass([t.select("."+i,e)],m)},f.prototype.updateIconsOnCollapse=function(e){this.splitterProperty(),this.previousPane.classList.contains("e-collapsed")&&!this.nextPane.classList.contains("e-collapsed")?(t.addClass([e.target],m),this.paneSettings[this.prevPaneIndex].collapsible&&this.showCurrentBarIcon(),this.resizableModel(this.currentBarIndex,!1),!this.previousPane.classList.contains("e-collapsed")||this.nextPane.classList.contains("e-collapsed")||this.paneSettings[this.prevPaneIndex].collapsible||this.hideTargetBarIcon(this.prevBar,this.rightArrow),this.previousPane.previousElementSibling&&!this.previousPane.previousElementSibling.classList.contains("e-collapsed")&&(this.previousPane.classList.contains("e-collapsed")&&this.paneSettings[this.prevPaneIndex].collapsible?this.showTargetBarIcon(this.prevBar,this.leftArrow):this.paneSettings[this.prevPaneIndex].collapsible||this.hideTargetBarIcon(this.prevBar,this.leftArrow)),t.isNullOrUndefined(this.prevBar)||(this.resizableModel(this.currentBarIndex-1,!1),this.hideTargetBarIcon(this.prevBar,this.arrow)),this.paneSettings[this.prevPaneIndex].collapsible||this.hideTargetBarIcon(this.currentSeparator,this.rightArrow)):this.splitInstance.prevPaneCollapsed||this.splitInstance.nextPaneExpanded||(this.paneSettings[this.currentBarIndex].resizable&&this.resizableModel(this.currentBarIndex,!0),!this.splitInstance.nextPaneNextEle.classList.contains("e-collapsed")&&this.paneSettings[this.currentBarIndex+1].resizable&&this.resizableModel(this.currentBarIndex+1,!0),this.paneSettings[this.currentBarIndex].collapsible||t.addClass([e.target],m),this.previousPane&&0===this.prevPaneIndex&&this.paneSettings[this.prevPaneIndex].collapsible&&this.showTargetBarIcon(this.currentSeparator,this.leftArrow),this.nextPane&&this.nextPaneIndex===this.allPanes.length-1&&this.paneSettings[this.nextPaneIndex].collapsible&&this.showTargetBarIcon(this.getPrevBar(this.nextPaneIndex),this.rightArrow),!this.previousPane.classList.contains("e-collapsed")&&this.paneSettings[this.nextPaneIndex].collapsible&&this.showTargetBarIcon(this.currentSeparator,this.rightArrow),t.isNullOrUndefined(this.nextBar)||(this.nextPane.nextElementSibling&&this.nextPane.nextElementSibling.classList.contains("e-collapsed")&&this.paneSettings[this.nextPaneIndex+1].collapsible||!this.nextPane.nextElementSibling.classList.contains("e-collapsed")&&this.paneSettings[this.nextPaneIndex].collapsible?this.showTargetBarIcon(this.nextBar,this.leftArrow):!this.paneSettings[this.splitInstance.nextPaneIndex+1].collapsible&&this.paneSettings[this.currentBarIndex]&&this.hideTargetBarIcon(this.nextBar,this.arrow)),this.nextPaneIndex===this.allPanes.length-1||!this.nextPane.nextElementSibling||this.nextPane.classList.contains("e-collapsed")||this.nextPane.nextElementSibling.classList.contains("e-collapsed")||this.paneSettings[this.nextPaneIndex+1].collapsible||this.hideTargetBarIcon(this.nextBar,this.rightArrow))},f.prototype.collapseAction=function(e){var t=this;this.splitterDetails(e);var i=this.beforeAction(e);this.collapseFlag?this.collapsePane(e):this.trigger("beforeCollapse",i,function(i){if(!i.cancel){t.collapsePane(e);var s=t.afterAction(e);t.trigger("collapsed",s)}})},f.prototype.collapsePane=function(e){this.removeStaticPanes();var i=this.element.querySelectorAll(".e-collapsed").length,s=this.previousPane.classList.contains(d)&&!this.previousPane.classList.contains("e-collapsed")&&!this.nextPane.classList.contains("e-collapsed")&&this.nextPane.nextElementSibling.classList.contains(a)&&!this.nextPane.nextElementSibling.classList.contains(d)&&!this.nextPane.nextElementSibling.classList.contains("e-collapsed")&&!(i===this.allPanes.length-2)||this.nextPane.classList.contains("e-collapsed")&&!this.previousPane.classList.contains(d)&&this.nextPane.classList.contains(d),n=["e-collapsed","e-pane-hidden"];this.nextPane.classList.contains("e-collapsed")?(t.removeClass([this.previousPane],"e-expanded"),t.removeClass([this.nextPane],n),this.collapseFlag||this.updatePaneSettings(this.nextPaneIndex,!1)):(t.removeClass([this.previousPane],"e-expanded"),t.removeClass([this.nextPane],n),t.addClass([this.nextPane],"e-expanded"),t.addClass([this.previousPane],n),this.collapseFlag||this.updatePaneSettings(this.prevPaneIndex,!0)),this.updateIconsOnCollapse(e),this.previousPane.setAttribute("aria-expanded","false"),this.nextPane.setAttribute("aria-expanded","true"),this.updateFlexGrow(this.checkStaticPanes()),s&&(this.nextPane.classList.remove("e-expanded"),this.nextPane.style.flexGrow="")},f.prototype.removeStaticPanes=function(){for(var e=0;e<this.allPanes.length;e++)t.isNullOrUndefined(this.paneSettings[e].size)&&this.allPanes[e].classList.remove(d)},f.prototype.beforeAction=function(e){return t.isBlazor()?{element:this.element,event:e,index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,cancel:!1}:{element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,cancel:!1}},f.prototype.updatePaneSettings=function(e,t){var i=this.paneSettings;i[e].collapsed=t,this.setProperties({paneSettings:i},!0)},f.prototype.splitterProperty=function(){this.splitInstance={currentBarIndex:this.currentBarIndex,nextPaneCollapsible:this.nextPane.classList.contains("e-collapsible"),prevPaneCollapsible:this.previousPane.classList.contains("e-collapsible"),prevPaneExpanded:this.previousPane.classList.contains("e-expanded"),nextPaneExpanded:this.nextPane.classList.contains("e-expanded"),nextPaneCollapsed:this.nextPane.classList.contains("e-collapsed"),prevPaneCollapsed:this.previousPane.classList.contains("e-collapsed"),nextPaneIndex:this.getNextPaneIndex(),prevPaneIndex:this.getPreviousPaneIndex(),nextPaneNextEle:this.nextPane.nextElementSibling,prevPanePreEle:this.previousPane.previousElementSibling}},f.prototype.showCurrentBarIcon=function(){t.removeClass([t.select("."+this.arrow,this.currentSeparator)],m)},f.prototype.updateIconsOnExpand=function(e){this.splitterProperty(),t.addClass([e.target],m),this.splitInstance.prevPaneExpanded||this.splitInstance.nextPaneCollapsed?this.splitInstance.prevPaneExpanded&&this.splitInstance.nextPaneCollapsed&&(this.resizableModel(this.currentBarIndex,!1),this.resizableModel(this.currentBarIndex+1,!1),this.paneSettings[this.nextPaneIndex].collapsible&&this.showCurrentBarIcon(),t.isNullOrUndefined(this.nextBar)||this.hideTargetBarIcon(this.nextBar,this.arrow),this.nextPane&&this.nextPaneIndex===this.allPanes.length-1&&!this.paneSettings[this.nextPaneIndex].collapsible&&this.splitInstance.nextPaneCollapsed&&this.hideTargetBarIcon(this.currentSeparator,this.arrow),this.nextPaneIndex!==this.allPanes.length-1&&this.nextPane.nextElementSibling&&this.nextPane.classList.contains("e-collapsed")&&!this.nextPane.nextElementSibling.classList.contains("e-collapsed")&&this.paneSettings[this.nextPaneIndex].collapsible&&this.showTargetBarIcon(this.nextBar,this.rightArrow)):(this.paneSettings[this.prevPaneIndex].collapsible&&this.showCurrentBarIcon(),this.paneSettings[this.nextPaneIndex].collapsible&&t.removeClass([e.target],m),this.paneSettings[this.currentBarIndex].resizable&&this.resizableModel(this.currentBarIndex,!0),t.isNullOrUndefined(this.prevBar)||this.splitInstance.prevPanePreEle.classList.contains("e-collapsed")?(this.previousPane.previousElementSibling&&this.paneSettings[this.prevPaneIndex].collapsible&&this.previousPane.previousElementSibling.classList.contains("e-collapsed")&&this.paneSettings[this.prevPaneIndex-1].collapsible&&this.showTargetBarIcon(this.prevBar,this.rightArrow),this.paneSettings[this.currentBarIndex+1].collapsible||this.hideTargetBarIcon(this.currentSeparator,this.rightArrow)):(this.paneSettings[this.currentBarIndex-1].resizable&&this.resizableModel(this.currentBarIndex-1,!0),this.paneSettings[this.prevPaneIndex].collapsible&&this.showTargetBarIcon(this.prevBar,this.rightArrow),this.paneSettings[this.currentBarIndex-1].collapsible?this.paneSettings[this.currentBarIndex].collapsible&&!this.paneSettings[this.currentBarIndex+1].collapsible&&this.hideTargetBarIcon(this.currentSeparator,this.rightArrow):(this.hideTargetBarIcon(this.prevBar,this.arrow),this.paneSettings[this.currentBarIndex].collapsible&&!this.paneSettings[this.currentBarIndex+1].collapsible&&this.hideTargetBarIcon(this.currentSeparator,this.rightArrow))))},f.prototype.afterAction=function(e){return t.isBlazor()?{element:this.element,event:e,index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator}:{element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator}},f.prototype.currentIndex=function(e){this.currentBarIndex=this.getOrderIndex(parseInt(e.target.parentElement.style.order,10),"splitbar")},f.prototype.getSeparatorIndex=function(e){var i="Horizontal"===this.orientation?h:"e-split-bar-vertical";this.checkBlazor()&&this.allBars.length<1&&(this.allBars=t.selectAll("."+i,this.element));var s=[].slice.call(this.allBars);return(s=this.enableReversePanes?s.reverse():s).indexOf(e)},f.prototype.getPrevBar=function(e){return this.allBars[e-1]},f.prototype.getNextBar=function(e){return this.allBars[e+1]},f.prototype.updateBars=function(e){this.prevBar=this.getPrevBar(e),this.nextBar=this.getNextBar(e)},f.prototype.splitterDetails=function(e){"Horizontal"===this.orientation?this.arrow=e.target.classList.contains(c)?"e-arrow-right":c:this.arrow=e.target.classList.contains(u)?g:u,this.updateCurrentSeparator(e.target),this.currentIndex(e),this.updateBars(this.currentBarIndex),this.getPaneDetails()},f.prototype.triggerResizing=function(e){var i=t.isBlazor()?{element:this.element,event:e,index:[this.prevPaneIndex,this.nextPaneIndex],paneSize:[this.prePaneDimenson,this.nextPaneDimension],separator:this.currentSeparator}:{element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],paneSize:[this.prePaneDimenson,this.nextPaneDimension],separator:this.currentSeparator};this.trigger("resizing",i)},f.prototype.onMouseDown=function(e){var i=this;e.preventDefault();var s=e.target;if(!s.classList.contains("e-navigate-arrow")){this.updateCurrentSeparator(s),t.addClass([this.currentSeparator],"e-split-bar-active"),this.updateCursorPosition(e,"previous"),this.getPaneDetails();for(var n=t.isBlazor()?{element:this.element,event:e,index:[this.getPreviousPaneIndex(),this.getNextPaneIndex()],separator:this.currentSeparator,cancel:!1}:{element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.getPreviousPaneIndex(),this.getNextPaneIndex()],separator:this.currentSeparator,cancel:!1},a=0;a<this.element.querySelectorAll("iframe").length;a++)this.element.querySelectorAll("iframe")[a].style.pointerEvents="none";this.trigger("resizeStart",n,function(t){t.cancel||(i.wireResizeEvents(),i.checkPaneSize(e))})}},f.prototype.updatePaneFlexBasis=function(e){var t;if(e.style.flexBasis.indexOf("%")>0)t=this.removePercentageUnit(e.style.flexBasis);else if(""!==e.style.flexBasis)t=this.convertPixelToPercentage(this.convertPixelToNumber(e.style.flexBasis));else{var i="Horizontal"===this.orientation?e.offsetWidth:e.offsetHeight;t=this.convertPixelToPercentage(i)}return t},f.prototype.removePercentageUnit=function(e){return parseFloat(e.slice(0,e.indexOf("%")))},f.prototype.convertPercentageToPixel=function(e,i){var s,n=e.toString();if(n.indexOf("%")>-1){s=parseFloat(n.slice(0,n.indexOf("%")));var a=void 0;a=t.isNullOrUndefined(i)?"Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight:this.panesDimensions[this.allPanes.indexOf(i)],s=Math.ceil(a*(s/100))}else s=parseInt(n,10);return s},f.prototype.convertPixelToPercentage=function(e){return e/("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)*100},f.prototype.convertPixelToNumber=function(e){return e.indexOf("p")>-1?parseFloat(e.slice(0,e.indexOf("p"))):parseFloat(e)},f.prototype.calcDragPosition=function(e,t){var i;return i=("Horizontal"===this.orientation?this.currentCoordinates.x-e:this.currentCoordinates.y-e)/t,(i=i>1?1:i<0?0:i)*t},f.prototype.getSeparatorPosition=function(e){this.updateCursorPosition(e,"current");var t="Horizontal"===this.orientation?this.element.getBoundingClientRect().left:this.element.getBoundingClientRect().top+window.scrollY,i="Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight;return this.calcDragPosition(t,i)},f.prototype.getMinMax=function(e,i,s){var n="min"===s?0:null,a=null;return"min"===s?t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].min)||(a=this.paneSettings[e].min):t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].max)||(a=this.paneSettings[e].max),this.paneSettings.length>0&&!t.isNullOrUndefined(this.paneSettings[e])&&!t.isNullOrUndefined(a)?(a.indexOf("%")>0&&(a=this.convertPercentageToPixel(a).toString()),this.convertPixelToNumber(a)):n},f.prototype.getPreviousPaneIndex=function(){var e=this.enableReversePanes?parseInt(this.currentSeparator.style.order,10)+1:parseInt(this.currentSeparator.style.order,10)-1;return this.getOrderIndex(e,"pane")},f.prototype.getNextPaneIndex=function(){var e=this.enableReversePanes?parseInt(this.currentSeparator.style.order,10)-1:parseInt(this.currentSeparator.style.order,10)+1;return this.getOrderIndex(e,"pane")},f.prototype.getPaneDetails=function(){var e=null,t=null;this.order=parseInt(this.currentSeparator.style.order,10),this.allPanes.length>1&&(e=this.getPrevPane(this.order),t=this.getNextPane(this.order)),e&&t&&(this.previousPane=e,this.nextPane=t,this.prevPaneIndex=this.getPreviousPaneIndex(),this.nextPaneIndex=this.getNextPaneIndex())},f.prototype.getPaneHeight=function(e){return"Horizontal"===this.orientation?e.offsetWidth.toString():e.offsetHeight.toString()},f.prototype.isValidSize=function(e){var i=!1;return!t.isNullOrUndefined(this.paneSettings[e])&&!t.isNullOrUndefined(this.paneSettings[e].size)&&this.paneSettings[e].size.indexOf("%")>-1&&(i=!0),i},f.prototype.getPaneDimensions=function(){this.previousPaneHeightWidth=""===this.previousPane.style.flexBasis?this.getPaneHeight(this.previousPane):this.previousPane.style.flexBasis,this.nextPaneHeightWidth=""===this.nextPane.style.flexBasis?this.getPaneHeight(this.nextPane):this.nextPane.style.flexBasis,this.isValidSize(this.prevPaneIndex)&&(this.previousPaneHeightWidth=this.convertPercentageToPixel(this.previousPaneHeightWidth).toString(),this.updatePrePaneInPercentage=!0),this.isValidSize(this.nextPaneIndex)&&(this.nextPaneHeightWidth=this.convertPercentageToPixel(this.nextPaneHeightWidth).toString(),this.updateNextPaneInPercentage=!0),this.prePaneDimenson=this.convertPixelToNumber(this.previousPaneHeightWidth.toString()),this.nextPaneDimension=this.convertPixelToNumber(this.nextPaneHeightWidth.toString())},f.prototype.checkCoordinates=function(e,t){var i=!0;return e!==this.previousCoordinates.x&&t!==this.previousCoordinates.y||(i=!1),i},f.prototype.isCursorMoved=function(e){return"mouse"===this.getEventType(e.type)||!t.isNullOrUndefined(e.pointerType)&&"mouse"===this.getEventType(e.pointerType)?this.checkCoordinates(e.pageX,e.pageY):"msie"!==t.Browser.info.name?this.checkCoordinates(e.touches[0].pageX,e.touches[0].pageY):this.checkCoordinates(e.pageX,e.pageY)},f.prototype.getBorder=function(){this.border=0;var e="Horizontal"===this.orientation?(this.element.offsetWidth-this.element.clientWidth)/2:(this.element.offsetHeight-this.element.clientHeight)/2;this.border="chrome"!==t.Browser.info.name?this.border:e},f.prototype.onMouseMove=function(e){if(this.isCursorMoved(e)){this.getPaneDetails(),this.getPaneDimensions(),this.triggerResizing(e);var t,i=this.validateDraggedPosition(this.getSeparatorPosition(e),this.prePaneDimenson,this.nextPaneDimension);if(this.getBorder(),t="Horizontal"===this.orientation?this.element.getBoundingClientRect().left+i-this.currentSeparator.getBoundingClientRect().left+this.border:this.element.getBoundingClientRect().top+i-this.currentSeparator.getBoundingClientRect().top+this.border,this.nextPaneHeightWidth="string"==typeof this.nextPaneHeightWidth&&this.nextPaneHeightWidth.indexOf("p")>-1?this.convertPixelToNumber(this.nextPaneHeightWidth):parseInt(this.nextPaneHeightWidth,10),this.prevPaneCurrentWidth=t+this.convertPixelToNumber(this.previousPaneHeightWidth),this.nextPaneCurrentWidth=this.nextPaneHeightWidth-t,this.validateMinMaxValues(),this.nextPaneCurrentWidth<0&&(this.nextPaneCurrentWidth=0),this.prevPaneCurrentWidth<0&&(this.prevPaneCurrentWidth=0),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth>this.totalWidth&&(this.nextPaneCurrentWidth<this.prevPaneCurrentWidth?this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth):this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth)),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth<this.totalWidth){var s=this.totalWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth);this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+s}this.calculateCurrentDimensions(),this.addStaticPaneClass(),this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,this.allPanes.length>2||this.updateSplitterSize()}},f.prototype.validateMinRange=function(e,i,s){var n,a,l=null,r=0;return t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].min)||(l=this.paneSettings[e].min.toString()),t.isNullOrUndefined(l)||(l.indexOf("%")>0&&(l=this.convertPercentageToPixel(l).toString()),i<(n=this.convertPixelToNumber(l))&&(r=i-n<=0?0:i-n,this.totalWidth=this.totalWidth-r,this.totalPercent=this.convertPixelToPercentage(this.totalWidth),a=n)),t.isNullOrUndefined(a)?i:a},f.prototype.validateMaxRange=function(e,i,s){var n,a,l=null;return t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].max)||(l=this.paneSettings[e].max.toString()),t.isNullOrUndefined(l)||(l.indexOf("%")>0&&(l=this.convertPercentageToPixel(l).toString()),i>(n=this.convertPixelToNumber(l))&&(this.totalWidth=this.totalWidth-(i-n),this.totalPercent=this.convertPixelToPercentage(this.totalWidth),a=n)),t.isNullOrUndefined(a)?i:a},f.prototype.validateMinMaxValues=function(){this.prevPaneCurrentWidth=this.validateMinRange(this.prevPaneIndex,this.prevPaneCurrentWidth,this.previousPane),this.nextPaneCurrentWidth=this.validateMinRange(this.nextPaneIndex,this.nextPaneCurrentWidth,this.nextPane),this.prevPaneCurrentWidth=this.validateMaxRange(this.prevPaneIndex,this.prevPaneCurrentWidth,this.previousPane),this.nextPaneCurrentWidth=this.validateMaxRange(this.nextPaneIndex,this.nextPaneCurrentWidth,this.nextPane)},f.prototype.equatePaneWidths=function(){var e;this.prevPaneCurrentWidth+this.nextPaneCurrentWidth>this.totalPercent&&(e=this.prevPaneCurrentWidth+this.nextPaneCurrentWidth-this.totalPercent,this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-e/2+"%"),this.prevPaneCurrentWidth+this.nextPaneCurrentWidth<this.totalPercent&&(e=this.totalPercent-(this.prevPaneCurrentWidth+this.nextPaneCurrentWidth),this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+e/2+"%")},f.prototype.calculateCurrentDimensions=function(){this.updatePrePaneInPercentage||this.updateNextPaneInPercentage?(this.prevPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.prevPaneCurrentWidth))/10)),this.nextPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.nextPaneCurrentWidth))/10)),0===this.prevPaneCurrentWidth&&(this.nextPaneCurrentWidth=this.totalPercent),0===this.nextPaneCurrentWidth&&(this.prevPaneCurrentWidth=this.totalPercent),this.prevPaneCurrentWidth+this.nextPaneCurrentWidth!==this.totalPercent?this.equatePaneWidths():(this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+"%"),this.prevPaneCurrentWidth=this.updatePrePaneInPercentage?this.prevPaneCurrentWidth:this.convertPercentageToPixel(this.prevPaneCurrentWidth)+"px",this.nextPaneCurrentWidth=this.updateNextPaneInPercentage?this.nextPaneCurrentWidth:this.convertPercentageToPixel(this.nextPaneCurrentWidth)+"px",this.updatePrePaneInPercentage=!1,this.updateNextPaneInPercentage=!1):(this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+"px",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+"px")},f.prototype.addStaticPaneClass=function(){this.previousPane.classList.contains(d)||this.previousPane.classList.add(d),this.nextPane.classList.contains(d)||this.nextPane.classList.add(d)},f.prototype.validateDraggedPosition=function(e,i,s){var n="Horizontal"===this.orientation?this.currentSeparator.offsetLeft:this.currentSeparator.offsetTop,a=n-i,l=s+n,r=this.getMinMax(this.prevPaneIndex,this.previousPane,"min"),o=this.getMinMax(this.nextPaneIndex,this.nextPane,"min"),h=this.getMinMax(this.prevPaneIndex,this.previousPane,"max"),d=this.getMinMax(this.nextPaneIndex,this.nextPane,"max"),p=e;return e>l-o?p=l-o:e<a+r&&(p=a+r),t.isNullOrUndefined(h)?t.isNullOrUndefined(d)||e<l-d&&(p=l-d):e>a+h&&(p=a+h),p},f.prototype.onMouseUp=function(e){t.removeClass([this.currentSeparator],"e-split-bar-active"),this.unwireResizeEvents();for(var i=t.isBlazor()?{event:e,element:this.element,index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,paneSize:[this.prePaneDimenson,this.nextPaneDimension]}:{event:e,element:this.element,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,paneSize:[this.prePaneDimenson,this.nextPaneDimension]},s=0;s<this.element.querySelectorAll("iframe").length;s++)this.element.querySelectorAll("iframe")[s].style.pointerEvents="auto";if(this.trigger("resizeStop",i),this.enablePersistence){var n=this.paneSettings;n[this.getPreviousPaneIndex()].size=this.allPanes[this.getPreviousPaneIndex()].style.flexBasis,n[this.getNextPaneIndex()].size=this.allPanes[this.getNextPaneIndex()].style.flexBasis,this.setProperties({paneSettings:n},!0)}},f.prototype.panesDimension=function(e,i){var s,n=i.length;parseInt(this.getHeight(this.element),10),t.isNullOrUndefined(this.paneSettings[e])?t.setStyleAttribute(i[e],{order:2*e}):t.isNullOrUndefined(this.paneSettings[e].size)?(this.sizeFlag=!0,t.setStyleAttribute(i[e],{order:2*e})):(s=this.paneSettings[e].size,e<n&&(t.setStyleAttribute(i[e],{"flex-basis":s,order:2*e}),e<n-1&&""!==this.paneSettings[e].size?t.addClass([i[e]],d):this.sizeFlag||(i[e].style.flexBasis=null),e===n-1&&this.sizeFlag&&""!==this.paneSettings[e].size&&t.addClass([i[e]],d))),this.paneOrder.push(2*e)},f.prototype.setTemplate=function(e,t){t.innerHTML="",e="string"==typeof e?this.sanitizeHelper(e):e,this.templateCompile(t,e),this.isReact&&this.renderReactTemplates()},f.prototype.templateCompile=function(e,t){var i=this.createElement("div");this.compileElement(i,t,"content"),0!==i.childNodes.length&&[].slice.call(i.childNodes).forEach(function(t){e.appendChild(t)})},f.prototype.compileElement=function(e,i,s){if("string"==typeof i)if("."===i[0]||"#"===i[0]){var n=document.querySelector(i);if(!t.isNullOrUndefined(n))return this.templateElement.push(n),"none"===n.style.display&&n.style.removeProperty("display"),""===n.getAttribute("style")&&n.removeAttribute("style"),void e.appendChild(n);i=i.trim()}else i=i.trim();var a;a=t.isNullOrUndefined(i.outerHTML)?t.compile(i):t.compile(i.outerHTML);var l;t.isNullOrUndefined(a)||(l=t.isBlazor()&&!this.isStringTemplate?a({},this,s,this.element.id+"content"+this.allPanes.length.toString(),this.isStringTemplate):a({},this,s,this.element.id+"content"+this.allPanes.length.toString(),!0)),!t.isNullOrUndefined(a)&&l&&l.length>0&&[].slice.call(l).forEach(function(t){e.appendChild(t)})},f.prototype.paneCollapsible=function(e,i){this.paneSettings[i].collapsible?t.addClass([e],"e-collapsible"):t.removeClass([e],"e-collapsible")},f.prototype.createSplitPane=function(e){var i=e.children.length;if(!this.checkBlazor())for(o=0;o<this.paneSettings.length;o++)if(i<this.paneSettings.length){var s=this.createElement("div");this.element.appendChild(s),i+=1}i=e.children.length;var n=[].slice.call(e.children);if(this.sizeFlag=!1,i>0)for(var o=0;o<i;o++)"DIV"!==n[o].nodeName&&"SPAN"!==n[o].nodeName||(this.checkBlazor()&&n[o].classList.contains(a)?this.allPanes.push(n[o]):this.checkBlazor()||this.allPanes.push(n[o]),this.checkBlazor()||("Horizontal"===this.orientation?(t.addClass([n[o]],[a,l,"e-scrollable"]),this.panesDimension(o,n)):(t.addClass([n[o]],[a,r,"e-scrollable"]),this.panesDimension(o,n)),t.isNullOrUndefined(this.paneSettings[o])||t.isNullOrUndefined(this.paneSettings[o].content)||this.setTemplate(this.paneSettings[o].content,n[o]),!t.isNullOrUndefined(this.paneSettings[o])&&this.paneSettings[o].cssClass&&this.setCssClass(n[o],this.paneSettings[o].cssClass),t.isNullOrUndefined(this.paneSettings[o])||this.paneCollapsible(n[o],o)))},f.prototype.expand=function(e){this.collapsedOnchange(e),this.updatePaneSettings(e,!1)},f.prototype.collapse=function(e){this.isCollapsed(e),this.updatePaneSettings(e,!0)},f.prototype.destroy=function(){if(!this.isDestroyed){for(this.checkBlazor()||e.prototype.destroy.call(this),t.EventHandler.remove(document,"touchstart click",this.onDocumentClick);this.element.attributes.length>0;)this.element.removeAttribute(this.element.attributes[0].name);if(this.checkBlazor())for(var i=this.element.children,s=i.length-1;s>=0;s--)t.detach(i[s]);else{this.element.innerHTML=this.wrapper.innerHTML;for(s=0;s<this.wrapper.attributes.length;s++)this.element.setAttribute(this.wrapper.attributes[s].name,this.wrapper.attributes[s].value)}this.refreshing&&(t.addClass([this.element],["e-control","e-lib",n]),this.allBars=[],this.allPanes=[]),this.restoreElem(),this.isReact&&this.clearTemplate()}},f.prototype.restoreElem=function(){if(this.templateElement.length>0)for(var e=0;e<this.templateElement.length;e++)this.templateElement[e].style.display="none",document.body.appendChild(this.templateElement[e])},f.prototype.addPaneClass=function(e){return"Horizontal"===this.orientation?t.addClass([e],[a,l,"e-scrollable"]):t.addClass([e],[a,r,"e-scrollable"]),e},f.prototype.removePaneOrders=function(e){for(var t=this.element.childNodes,i=[],s=0;t.length<0;s++)t[s].classList.contains(e)&&i.push(t[s]);for(s=0;s<i.length;s++)i[s].style.removeProperty("order")},f.prototype.setPaneOrder=function(){for(var e=0;e<this.allPanes.length;e++)this.panesDimension(e,this.allPanes)},f.prototype.removeSeparator=function(){for(var e=0;e<this.allBars.length;e++)t.detach(this.allBars[e]);this.allBars=[]},f.prototype.updatePanes=function(){this.setPaneOrder(),this.removeSeparator(),this.addSeparator(this.element)},f.prototype.addPane=function(e,i){var s=this.createElement("div");s=this.addPaneClass(s),i=i>this.allPanes.length+1?this.allPanes.length:i;var n={size:t.isNullOrUndefined(e.size)?"":e.size,min:t.isNullOrUndefined(e.min)?null:e.min,max:t.isNullOrUndefined(e.max)?null:e.max,content:t.isNullOrUndefined(e.content)?"":e.content,resizable:!!t.isNullOrUndefined(e.resizable)||e.resizable,collapsible:!t.isNullOrUndefined(e.collapsible)&&e.collapsible,collapsed:!t.isNullOrUndefined(e.collapsed)&&e.collapsed,cssClass:t.isNullOrUndefined(e.cssClass)?"":e.cssClass};this.paneSettings.splice(i,0,n),this.setProperties({paneSettings:this.paneSettings},!0),"Horizontal"===this.orientation?(this.element.insertBefore(s,this.element.querySelectorAll("."+l)[i]),this.removePaneOrders(l)):(this.element.insertBefore(s,this.element.querySelectorAll("."+r)[i]),this.removePaneOrders(r)),this.allPanes.splice(i,0,s),this.updatePanes(),this.setTemplate(this.paneSettings[i].content,s),this.setCssClass(this.allPanes[i],e.cssClass),this.allPanes[this.allPanes.length-1].classList.remove(d)},f.prototype.removePane=function(e){e=e>this.allPanes.length+1?this.allPanes.length:e;var i="Horizontal"===this.orientation?l:r;t.isNullOrUndefined(this.element.querySelectorAll("."+i)[e])||(t.detach(this.element.querySelectorAll("."+i)[e]),this.allPanes.splice(e,1),this.removePaneOrders(i),this.updatePanes(),this.paneSettings.splice(e,1),this.setProperties({paneSettings:this.paneSettings},!0),this.allPanes.length>0&&this.allPanes[this.allPanes.length-1].classList.remove(d))},s([t.Property("100%")],f.prototype,"height",void 0),s([t.Property(!1)],f.prototype,"enableReversePanes",void 0),s([t.Property("100%")],f.prototype,"width",void 0),s([t.Property(!1)],f.prototype,"enablePersistence",void 0),s([t.Collection([],v)],f.prototype,"paneSettings",void 0),s([t.Property("Horizontal")],f.prototype,"orientation",void 0),s([t.Property("")],f.prototype,"cssClass",void 0),s([t.Property(!0)],f.prototype,"enabled",void 0),s([t.Property(!0)],f.prototype,"enableHtmlSanitizer",void 0),s([t.Property(null)],f.prototype,"separatorSize",void 0),s([t.Event()],f.prototype,"beforeSanitizeHtml",void 0),s([t.Event()],f.prototype,"created",void 0),s([t.Event()],f.prototype,"resizeStart",void 0),s([t.Event()],f.prototype,"resizing",void 0),s([t.Event()],f.prototype,"resizeStop",void 0),s([t.Event()],f.prototype,"beforeCollapse",void 0),s([t.Event()],f.prototype,"beforeExpand",void 0),s([t.Event()],f.prototype,"collapsed",void 0),s([t.Event()],f.prototype,"expanded",void 0),f=s([t.NotifyPropertyChanges],f)}(t.Component),P=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),y=function(e,t,i,s){var n,a=arguments.length,l=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(l=(a<3?n(l):a>3?n(t,i,l):n(t,i))||l);return a>3&&l&&Object.defineProperty(t,i,l),l},C="e-drag",x=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return P(i,e),y([t.Property("")],i.prototype,"id",void 0),y([t.Property("")],i.prototype,"cssClass",void 0),y([t.Property("")],i.prototype,"header",void 0),y([t.Property("")],i.prototype,"content",void 0),y([t.Property(!0)],i.prototype,"enabled",void 0),y([t.Property(0)],i.prototype,"row",void 0),y([t.Property(0)],i.prototype,"col",void 0),y([t.Property(1)],i.prototype,"sizeX",void 0),y([t.Property(1)],i.prototype,"sizeY",void 0),y([t.Property(1)],i.prototype,"minSizeY",void 0),y([t.Property(1)],i.prototype,"minSizeX",void 0),y([t.Property(null)],i.prototype,"maxSizeY",void 0),y([t.Property(null)],i.prototype,"maxSizeX",void 0),y([t.Property(1e3)],i.prototype,"zIndex",void 0),i}(t.ChildProperty),S=function(e){function i(i,s){var n=e.call(this,i,s)||this;return n.rows=1,n.panelID=0,n.movePanelCalled=!1,n.resizeCalled=!1,n.mOffX=0,n.mOffY=0,n.maxTop=9999,n.maxRows=100,n.mouseX=0,n.mouseY=0,n.minTop=0,n.minLeft=0,n.isBlazor=!1,n.isInlineRendering=!1,n.removeAllCalled=!1,n.isPanelRemoved=!1,n.panelsSizeY=0,n.resizeHeight=!1,t.setValue("mergePersistData",n.mergePersistPanelData,n),n}return P(i,e),i.prototype.preRender=function(){this.isBlazor=t.isBlazor()&&this.isServerRendered,this.panelCollection=[],this.sortedArray=[],this.gridPanelCollection=[],this.overlapElement=[],this.overlapElementClone=[],this.overlapSubElementClone=[],this.collisionChecker={},this.dragCollection=[],this.elementRef={top:"",left:"",height:"",width:""},this.dimensions=[],this.allItems=[],this.oldRowCol={},this.availableClasses=[],this.setOldRowCol(),this.calculateCellSize(),this.contentTemplateChild=[].slice.call(this.element.children)},i.prototype.setOldRowCol=function(){for(var e=0;e<this.panels.length;e++)this.panels[e].id||(this.panelPropertyChange(this.panels[e],{id:"layout_"+this.panelID.toString()}),this.panelID=this.panelID+1),this.oldRowCol[this.panels[e].id]={row:this.panels[e].row,col:this.panels[e].col}},i.prototype.createPanelElement=function(e,i){var s=this.createElement("div");return e&&e.length>0&&t.addClass([s],e),i&&s.setAttribute("id",i),s},i.prototype.render=function(){this.initialize(),this.isRenderComplete=!0,this.showGridLines&&!this.checkMediaQuery()&&this.initGridLines(),this.updateDragArea(),this.renderComplete(),this.updateServerPanelData(),this.renderReactTemplates()},i.prototype.updateServerPanelData=function(){t.isBlazor()&&this.isServerRendered&&(this.setProperties({panels:this.panels},!0),this.allowServerDataBinding=!0,this.serverDataBind())},i.prototype.initGridLines=function(){this.table=document.createElement("table");var e=document.createElement("tbody");this.table.classList.add("e-dashboard-gridline-table");for(var t=0;t<this.maxRow();t++){for(var i=document.createElement("tr"),s=0;s<this.columns;s++){var n=document.createElement("td");n.classList.add("e-dashboard-gridline"),this.setAttributes({value:{row:t.toString(),col:s.toString(),sizeX:"1",sizeY:"1"}},n),n.setAttribute("id",""+s),this.setPanelPosition(n,t,s),this.setHeightAndWidth(n,{row:t,col:s,sizeX:1,sizeY:1}),i.appendChild(n)}e.appendChild(i)}this.table.appendChild(e),this.element.appendChild(this.table),this.renderReactTemplates()},i.prototype.initialize=function(){if(this.updateRowHeight(),this.element.childElementCount>0&&this.element.querySelectorAll(".e-panel").length>0&&!(this.isBlazor&&this.panels.length>0)){var e=[];this.setProperties({panels:[]},!0),this.isInlineRendering=!0;for(i=0;i<this.element.querySelectorAll(".e-panel").length;i++)e.push(this.element.querySelectorAll(".e-panel")[i]);for(i=0;i<e.length;i++){s=e[i];this.enableRtl&&t.addClass([s],"e-rtl"),this.getInlinePanels(s),this.maxCol(),this.maxRow()}for(var i=0;i<this.panels.length;i++){var s=this.element.querySelector("#"+this.panels[i].id);if(this.setMinMaxValues(this.panels[i]),this.maxColumnValue<this.panels[i].col||this.maxColumnValue<this.panels[i].col+this.panels[i].sizeX){var n=this.maxColumnValue-this.panels[i].sizeX;this.panelPropertyChange(this.panels[i],{col:n<0?0:n})}this.setXYAttributes(s,this.panels[i]),this.isBlazor=!1;var a=this.renderPanels(s,this.panels[i],this.panels[i].id,!1);this.isBlazor=t.isBlazor()&&this.isServerRendered,this.panelCollection.push(a),this.setHeightAndWidth(s,this.panels[i]),this.tempObject=this,this.mediaQuery&&!window.matchMedia("("+this.mediaQuery+")").matches&&(this.setPanelPosition(s,this.panels[i].row,this.panels[i].col),this.mainElement=s,this.updatePanelLayout(s,this.panels[i]),this.mainElement=null),this.setClasses([s])}this.updateOldRowColumn(),this.checkMediaQuery()&&this.checkMediaQuerySizing()}else this.renderDashBoardCells(this.panels);!this.allowDragging||this.mediaQuery&&window.matchMedia("("+this.mediaQuery+")").matches||this.enableDraggingContent(this.panelCollection),this.sortedPanel(),this.bindEvents(),this.updatePanels(),this.updateCloneArrayObject(),this.checkColumnValue=this.maxColumnValue,this.checkMediaQuery()||this.panelResponsiveUpdate(),this.isBlazor||this.setEnableRtl()},i.prototype.checkMediaQuery=function(){return this.mediaQuery&&window.matchMedia("("+this.mediaQuery+")").matches},i.prototype.calculateCellSize=function(){this.cellSize=[],this.checkMediaQuery()?this.cellSize[1]=this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio:(this.cellSize[0]=this.element.parentElement&&this.element.parentElement.offsetWidth,this.cellSize[0]=this.element.parentElement&&(this.element.parentElement.offsetWidth-(this.maxCol()-1)*this.cellSpacing[0])/this.maxCol(),this.cellSize[1]=this.cellSize[0]/this.cellAspectRatio)},i.prototype.maxRow=function(e){var i=1;if(this.rows>1&&t.isNullOrUndefined(e))return i=this.rows;for(var s=0;s<this.panels.length;s++)this.panels[s].sizeY+this.panels[s].row>i&&(i=this.panels[s].sizeY+this.panels[s].row);return 0===this.panels.length&&(i=this.columns),i},i.prototype.maxCol=function(){var e=1;return e=this.columns,this.maxColumnValue=e,e},i.prototype.updateOldRowColumn=function(){for(var e=0;e<this.panels.length;e++){var t=this.panels[e].id;if(document.getElementById(t)){var i=parseInt(document.getElementById(t).getAttribute("data-row"),10),s=parseInt(document.getElementById(t).getAttribute("data-col"),10);this.oldRowCol[this.panels[e].id]={row:i,col:s}}}},i.prototype.createSubElement=function(e,i,s){var n=this.createElement("div");return s&&t.addClass([n],[s]),e&&e.length>0&&t.addClass([n],e),i&&n.setAttribute("id",i),n},i.prototype.templateParser=function(e){if(e)try{if(document.querySelectorAll(e).length)return t.compile(document.querySelector(e).innerHTML.trim())}catch(s){var i=t.SanitizeHtmlHelper.sanitize(e);return t.compile(this.enableHtmlSanitizer&&"string"==typeof e?i:e)}},i.prototype.renderTemplate=function(e,i,s,n,a){var l=this.templateParser(e),r=[];if("."!==e[0]&&"#"!==e[0]||"SCRIPT"===document.querySelector(e).tagName){var o=l({},this,a,s,n,null,i);if(o){for(var h=0,d=o;h<d.length;h++){var p=d[h];r.push(p)}t.append([].slice.call(r),i)}}else{var c=document.querySelector(e);if(!t.isNullOrUndefined(c))return"none"===c.style.display&&c.style.removeProperty("display"),""===c.getAttribute("style")&&c.removeAttribute("style"),void i.appendChild(c);e=e.trim()}},i.prototype.renderPanels=function(e,i,s,n){this.isBlazor||t.addClass([e],["e-panel","e-panel-transition"]);var a=i.cssClass?i.cssClass.split(" "):null;if(this.panelContent=e.querySelector(".e-panel-container")?e.querySelector(".e-panel-container"):this.createSubElement(a,e.id+"_content","e-panel-container"),this.isBlazor||(e.appendChild(this.panelContent),i.enabled||this.disablePanel(e)),i.header){var l=e.querySelector(".e-panel-header")?e.querySelector(".e-panel-header"):this.createSubElement([],e.id+"template","");if(this.isBlazor||t.addClass([l],["e-panel-header"]),!e.querySelector(".e-panel-header")&&!this.isBlazor){h=this.element.id+"HeaderTemplate"+s;this.renderTemplate(i.header,l,h,n,"header"),this.panelContent.appendChild(l),this.renderReactTemplates(),t.updateBlazorTemplate(h,"HeaderTemplate",i)}}if(i.content){var r=i.cssClass?i.cssClass.split(" "):null;this.panelBody=e.querySelector(".e-panel-content")?e.querySelector(".e-panel-content"):this.createSubElement(r,e.id+"_body","e-panel-content");var o="calc( 100% - "+(this.panelContent.querySelector(".e-panel-header")?window.getComputedStyle(this.panelContent.querySelector(".e-panel-header")).height:"0px")+")";if(t.setStyleAttribute(this.panelBody,{height:o}),!e.querySelector(".e-panel-content")&&!this.isBlazor){var h=this.element.id+"ContentTemplate"+s;this.renderTemplate(i.content,this.panelBody,h,n,"content"),this.panelContent.appendChild(this.panelBody),this.renderReactTemplates(),t.updateBlazorTemplate(h,"ContentTemplate",i)}}return e},i.prototype.disablePanel=function(e){t.addClass([e],["e-disabled"])},i.prototype.getInlinePanels=function(e){var i={sizeX:e.hasAttribute("data-sizex")?parseInt(e.getAttribute("data-sizex"),10):1,sizeY:e.hasAttribute("data-sizey")?parseInt(e.getAttribute("data-sizey"),10):1,minSizeX:e.hasAttribute("data-minsizex")?parseInt(e.getAttribute("data-minsizex"),10):1,minSizeY:e.hasAttribute("data-minsizey")?parseInt(e.getAttribute("data-minsizey"),10):1,maxSizeX:e.hasAttribute("data-maxsizex")?parseInt(e.getAttribute("data-maxsizex"),10):null,maxSizeY:e.hasAttribute("data-maxsizey")?parseInt(e.getAttribute("data-maxsizey"),10):null,row:e.hasAttribute("data-row")?parseInt(e.getAttribute("data-row"),10):0,col:e.hasAttribute("data-col")?parseInt(e.getAttribute("data-col"),10):0,id:e.getAttribute("id"),zIndex:e.hasAttribute("data-zindex")?parseInt(e.getAttribute("data-zIndex"),10):1e3,header:e.querySelector(".e-panel-header")&&".e-panel-header",content:e.querySelector(".e-panel-content")&&".e-panel-content"};i.id||(i.id="layout_"+this.panelID.toString(),e.setAttribute("id",i.id),this.panelID=this.panelID+1),t.isUndefined(i.enabled)&&(i.enabled=!0),e.style.zIndex=""+i.zIndex;var s=new x(this,"panels",i,!0);this.panels.push(s)},i.prototype.resizeEvents=function(){if(this.allowResizing)for(var e=this.element.querySelectorAll(".e-panel .e-panel-container .e-resize"),i=0;i<e.length;i++){var s="msie"===t.Browser.info.name?"mousedown pointerdown":"mousedown";t.EventHandler.add(e[i],s,this.downResizeHandler,this),"msie"!==t.Browser.info.name&&t.EventHandler.add(e[i],"touchstart",this.touchDownResizeHandler,this)}},i.prototype.bindEvents=function(){this.refreshListener=this.refresh.bind(this),t.EventHandler.add(window,"resize",this.refreshListener),this.resizeEvents()},i.prototype.downResizeHandler=function(e){this.downHandler(e),this.lastMouseX=e.pageX,this.lastMouseY=e.pageY;var i="msie"===t.Browser.info.name?"mousemove pointermove":"mousemove",s="msie"===t.Browser.info.name?"mouseup pointerup":"mouseup";this.isMouseMoveBound||(t.EventHandler.add(document,i,this.moveResizeHandler,this),this.isMouseMoveBound=!0),this.isMouseUpBound||(t.EventHandler.add(document,s,this.upResizeHandler,this),this.isMouseUpBound=!0)},i.prototype.downHandler=function(e){this.resizeCalled=!1,this.panelsInitialModel=this.cloneModels(this.panels);var i=t.closest(e.currentTarget,".e-panel"),s={event:e,element:i,isInteracted:!0};this.trigger("resizeStart",s),this.downTarget=e.currentTarget,this.shadowEle=document.createElement("div"),this.shadowEle.classList.add("e-holder"),t.addClass([this.element],["e-prevent"]),this.element.appendChild(this.shadowEle),this.renderReactTemplates(),this.elementX=parseFloat(i.style.left),this.elementY=parseFloat(i.style.top),this.elementWidth=i.offsetWidth,this.elementHeight=i.offsetHeight,this.originalWidth=this.getCellInstance(i.id).sizeX,this.originalHeight=this.getCellInstance(i.id).sizeY,this.previousRow=this.getCellInstance(i.id).row},i.prototype.touchDownResizeHandler=function(e){this.downHandler(e),this.lastMouseX=e.changedTouches[0].pageX,this.lastMouseY=e.changedTouches[0].pageY,this.isMouseMoveBound||(t.EventHandler.add(document,"touchmove",this.touchMoveResizeHandler,this),this.isMouseMoveBound=!0),this.isMouseUpBound||(t.EventHandler.add(document,"touchend",this.upResizeHandler,this),this.isMouseUpBound=!0)},i.prototype.getCellSize=function(){return[this.cellSize[0],this.cellSize[1]]},i.prototype.updateMaxTopLeft=function(e){this.moveTarget=this.downTarget;var i={event:e,element:t.closest(this.moveTarget,".e-panel"),isInteracted:!0};this.trigger("resize",i)},i.prototype.updateResizeElement=function(e){this.maxLeft=this.element.offsetWidth-1,this.maxTop=this.cellSize[1]*this.maxRows-1,t.removeClass([e],"e-panel-transition"),t.addClass([e],["e-dragging"]);for(var i=["e-east","e-west","e-north","e-south","e-south-east","e-north-east","e-north-west","e-south-west"],s=0;s<this.moveTarget.classList.length;s++)-1!==i.indexOf(this.moveTarget.classList[s])&&(this.handleClass=this.moveTarget.classList[s])},i.prototype.moveResizeHandler=function(e){this.updateMaxTopLeft(e);var i=t.closest(this.moveTarget,".e-panel");if(this.lastMouseX!==e.pageX&&this.lastMouseY!==e.pageY){this.updateResizeElement(i);var s=this.getCellInstance(i.getAttribute("id"));this.mouseX=e.pageX,this.mouseY=e.pageY;var n=this.mouseY-this.lastMouseY+this.mOffY,a=this.mouseX-this.lastMouseX+this.mOffX;this.mOffX=this.mOffY=0,this.lastMouseY=this.mouseY,this.lastMouseX=this.mouseX,this.resizingPanel(i,s,a,n)}},i.prototype.touchMoveResizeHandler=function(e){this.updateMaxTopLeft(e);var i=t.closest(this.moveTarget,".e-panel");if(this.lastMouseX!==e.changedTouches[0].pageX&&this.lastMouseY!==e.changedTouches[0].pageY){this.updateResizeElement(i);var s=this.getCellInstance(i.getAttribute("id"));this.mouseX=e.changedTouches[0].pageX,this.mouseY=e.changedTouches[0].pageY;var n=this.mouseX-this.lastMouseX+this.mOffX,a=this.mouseY-this.lastMouseY+this.mOffY;this.mOffX=this.mOffY=0,this.lastMouseX=this.mouseX,this.lastMouseY=this.mouseY,this.resizingPanel(i,s,n,a)}},i.prototype.resizingPanel=function(e,t,i,s){var n=this.getCellInstance(e.id).sizeX,a=this.getCellInstance(e.id).sizeY,l=s,r=i;this.handleClass.indexOf("north")>=0&&(this.elementHeight-l<this.getMinHeight(t)?(s=this.elementHeight-this.getMinHeight(t),this.mOffY=l-s):t.maxSizeY&&this.elementHeight-l>this.getMaxHeight(t)?(s=this.elementHeight-this.getMaxHeight(t),this.mOffY=l-s):this.elementY+l<this.minTop&&(s=this.minTop-this.elementY,this.mOffY=l-s),this.elementY+=s,this.elementHeight-=s),this.handleClass.indexOf("south")>=0&&(this.elementHeight+l<this.getMinHeight(t)?(s=this.getMinHeight(t)-this.elementHeight,this.mOffY=l-s):t.maxSizeY&&this.elementHeight+l>this.getMaxHeight(t)&&(s=this.getMaxHeight(t)-this.elementHeight,this.mOffY=l-s),this.elementHeight+=s),this.handleClass.indexOf("west")>=0&&(this.elementWidth-r<this.getMinWidth(t)?(i=this.elementWidth-this.getMinWidth(t),this.mOffX=r-i):t.maxSizeX&&this.elementWidth-r>this.getMaxWidth(t)?(i=this.elementWidth-this.getMaxWidth(t),this.mOffX=r-i):this.elementX+r<this.minLeft&&(i=this.minLeft-this.elementX,this.mOffX=r-i),this.elementX+=i,this.elementWidth-=i),this.handleClass.indexOf("east")>=0&&(this.elementWidth+r<this.getMinWidth(t)?(i=this.getMinWidth(t)-this.elementWidth,this.mOffX=r-i):t.maxSizeX&&this.elementWidth+r>this.getMaxWidth(t)?(i=this.getMaxWidth(t)-this.elementWidth,this.mOffX=r-i):this.elementX+this.elementWidth+r>this.maxLeft&&(i=this.maxLeft-this.elementX-this.elementWidth,this.mOffX=r-i),this.elementWidth+=i),e.style.top=this.elementY+"px",e.style.left=this.elementX+"px",e.style.width=this.elementWidth+"px",e.style.height=this.elementHeight+"px";var o=this.getResizeRowColumn(t);if(o.col+o.sizeX>this.columns&&this.panelPropertyChange(o,{sizeX:o.sizeX-1}),this.shadowEle.style.top=o.row*this.getCellSize()[1]+o.row*this.cellSpacing[1]+"px",this.shadowEle.style.left=o.col*this.getCellSize()[0]+o.col*this.cellSpacing[0]+"px",this.shadowEle.style.height=o.sizeY*(this.getCellSize()[1]+this.cellSpacing[1])+"px",this.shadowEle.style.width=o.sizeX*(this.getCellSize()[0]+this.cellSpacing[0])+"px",n!==o.sizeX||a!==o.sizeY){n=o.sizeX,a=o.sizeY;var h=this.getCellInstance(e.id),d={attributes:{row:h.row.toString(),col:h.col.toString(),sizeX:h.sizeX.toString(),sizeY:h.sizeY.toString()}};this.setAttributes(d,e),this.mainElement=e,this.updatePanelLayout(e,this.getCellInstance(e.id)),this.updateOldRowColumn(),this.sortedPanel()}},i.prototype.upResizeHandler=function(e){if(!t.isNullOrUndefined(this.downTarget)){this.updateServerPanelData(),this.upTarget=this.downTarget;var i=t.closest(this.upTarget,".e-panel"),s={event:e,element:i,isInteracted:!0};if(i){t.addClass([i],"e-panel-transition");var n="msie"===t.Browser.info.name?"mousemove pointermove":"mousemove",a="msie"===t.Browser.info.name?"mouseup pointerup":"mouseup";t.EventHandler.remove(document,n,this.moveResizeHandler),t.EventHandler.remove(document,a,this.upResizeHandler),"msie"!==t.Browser.info.name&&(t.EventHandler.remove(document,"touchmove",this.touchMoveResizeHandler),t.EventHandler.remove(document,"touchend",this.upResizeHandler)),this.isMouseUpBound=!1,this.isMouseMoveBound=!1,this.shadowEle&&t.detach(this.shadowEle),this.shadowEle=null;var l=this.getCellInstance(i.getAttribute("id"));this.setPanelPosition(i,l.row,l.col),this.setHeightAndWidth(i,l)}t.removeClass([i],["e-dragging"]),this.trigger("resizeStop",s),this.resizeCalled=!1,this.lastMouseX=this.lastMouseY=void 0,this.mOffX=this.mOffY=0,this.mainElement=null,this.allowFloating&&this.moveItemsUpwards(),this.updatePanels(),this.updateCloneArrayObject(),this.checkForChanges(!0)}},i.prototype.getResizeRowColumn=function(e){var t=!1,i=e.col;-1!==["e-west","e-south-west"].indexOf(this.handleClass)&&(i=this.pixelsToColumns(this.elementX,!1));var s=e.row;-1!==["e-north"].indexOf(this.handleClass)&&(s=this.pixelsToRows(this.elementY,!1),this.previousRow!==s&&(this.previousRow=s,t=!0));var n=e.sizeX;-1===["e-north","e-south"].indexOf(this.handleClass)&&(n=this.pixelsToColumns(this.elementWidth-n*this.cellSpacing[1],!0));var a=e.sizeY;return-1===["e-east","e-west"].indexOf(this.handleClass)&&("e-north"!==this.handleClass||t)&&(a=this.pixelsToRows(this.elementHeight-a*this.cellSpacing[0],!0)),e.col+e.sizeX>this.columns&&(e.sizeX=e.sizeX-1),(s>-1&&i>-1&&n+i<=this.maxCol()&&a+s<=this.maxRow()&&0===this.collisions(s,i,n,a,this.getPanelBase(e.id)).length||!1!==this.allowPushing)&&this.panelPropertyChange(e,{row:s,col:i,sizeX:n,sizeY:a}),e},i.prototype.pixelsToColumns=function(e,t){var i=this.cellSize[0];return t?Math.ceil(e/i):Math.floor(e/i)},i.prototype.pixelsToRows=function(e,t){return t?Math.round(e/this.cellSize[1]):Math.round(e/(this.cellSize[1]+this.cellSpacing[0]))},i.prototype.getMinWidth=function(e){return e.minSizeX*this.getCellSize()[0]},i.prototype.getMaxWidth=function(e){return e.maxSizeX*this.getCellSize()[0]},i.prototype.getMinHeight=function(e){return e.minSizeY*this.getCellSize()[1]},i.prototype.getMaxHeight=function(e){return e.maxSizeY*this.getCellSize()[1]},i.prototype.sortedPanel=function(){this.sortedArray=[];for(var e=0,t=this.panelCollection.length;e<t;++e)this.sortItem(this.panelCollection[e])},i.prototype.moveItemsUpwards=function(){if(!1!==this.allowFloating){for(var e=0,t=this.sortedArray.length;e<t;++e){var i=this.sortedArray[e];if(i)for(var s=0,n=i.length;s<n;++s){var a=i[s];a&&this.moveItemUpwards(a)}}this.updateGridLines()}},i.prototype.moveItemUpwards=function(e){if(!1!==this.allowFloating&&e!==this.mainElement){for(var t=this.getCellInstance(e.id).col,i=parseInt(e.getAttribute("data-sizeY"),10),s=parseInt(e.getAttribute("data-sizeX"),10),n=null,a=null,l=parseInt(e.getAttribute("data-row"),10)-1;l>-1&&0===this.collisions(l,t,s,i,e).length;)n=l,a=t,--l;null!==n&&this.sortItem(e,n,a)}},i.prototype.sortItem=function(e,t,i){this.overlapElement=[];var s=parseInt(e.getAttribute("data-col"),10),n=parseInt(e.getAttribute("data-row"),10);if(this.sortedArray[n]||(this.sortedArray[n]=[]),this.sortedArray[n][s]=e,void 0!==e&&void 0!==t&&void 0!==i){if(void 0!==this.oldRowCol[e.id]&&null!==this.oldRowCol[e.id].row&&void 0!==this.oldRowCol[e.id].col){var a=this.sortedArray[this.oldRowCol[e.id].row];this.oldRowCol[e.id]&&a[this.oldRowCol[e.id].col]===e&&(delete a[this.oldRowCol[e.id].col],this.updateOldRowColumn(),this.sortedPanel())}this.oldRowCol[e.id].row=t,this.oldRowCol[e.id].row=i,this.sortedArray[n]||(this.sortedArray[n]=[]),this.sortedArray[n][s]=e,-1===this.allItems.indexOf(e)&&this.allItems.push(e),this.panelPropertyChange(this.getCellInstance(e.id),{row:t,col:i});var l=this.getCellInstance(e.id);this.setAttributes({value:{col:l.col.toString(),row:l.row.toString()}},e),this.updateLayout(e,this.getCellInstance(e.id))}},i.prototype.updateLayout=function(e,t){this.setPanelPosition(e,t.row,t.col),this.setHeightAndWidth(e,t),this.updateRowHeight(),this.sortedPanel()},i.prototype.refresh=function(){if(this.panelsSizeY=0,this.updateDragArea(),this.checkMediaQuery())this.checkMediaQuerySizing();else{if(this.element.classList.contains("e-responsive")){t.removeClass([this.element],["e-responsive"]);for(var e=0;e<this.element.querySelectorAll(".e-panel").length;e++){var i=this.element.querySelectorAll(".e-panel")[e],s=this.getCellInstance(i.id),n=parseInt(i.getAttribute("data-row"),10),a=parseInt(i.getAttribute("data-col"),10);this.panelPropertyChange(s,{row:n,col:a}),this.updatePanelLayout(i,s),this.setHeightAndWidth(i,this.getCellInstance(i.id)),this.setPanelPosition(i,n,a),this.updateRowHeight()}}this.panelResponsiveUpdate(),this.updateGridLines()}this.removeResizeClasses(this.panelCollection),this.setClasses(this.panelCollection),this.resizeEvents(),this.checkDragging(this.dragCollection)},i.prototype.updateGridLines=function(){this.element.querySelector(".e-dashboard-gridline-table")&&(this.table&&t.detach(this.table),this.initGridLines())},i.prototype.checkDragging=function(e){if(this.checkMediaQuery()||!this.allowDragging)for(t=0;t<e.length;t++)e[t].destroy();else{for(var t=0;t<e.length;t++)e[t].destroy();this.enableDraggingContent(this.panelCollection)}},i.prototype.sortPanels=function(){for(var e=[],t=this,i=0;i<=this.rows;i++)!function(i){for(var s=0;s<t.columns;s++)!function(s){t.panels.filter(function(t){t.row===i&&t.col===s&&e.push(t)})}(s)}(i);return e},i.prototype.checkMediaQuerySizing=function(){t.addClass([this.element],["e-responsive"]);var e;e=this.isPanelRemoved&&this.panels?this.panels:this.sortPanels(),this.updatedRows=e.length;for(var i=0;i<e.length;i++){var s=document.getElementById(e[i].id),n=void 0;if(s){if(t.setStyleAttribute(s,{width:"100%"}),s.style.height=" "+(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)*e[i].sizeY+"px",e[i].sizeY>1&&(n=(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)*e[i].sizeY+parseInt((Math.round(e[i].sizeY/2)*this.cellSpacing[1]).toString(),0),s.style.height=n+"px"),this.resizeHeight=!0,this.addPanelCalled&&this.isBlazor){var a=this.getActualProperties(e[i]);a.row=i,a.col=0,this.panelPropertyChange(e[i],a),this.setPanelPosition(s,i,0)}else this.panelPropertyChange(e[i],{row:i,col:0}),this.setPanelPosition(s,e[i].row,e[i].col),this.panelsSizeY=this.panelsSizeY+e[i].sizeY;this.setClasses(this.panelCollection),this.checkDragging(this.dragCollection),this.removeResizeClasses(this.panelCollection)}}this.updateRowHeight()},i.prototype.panelResponsiveUpdate=function(){this.element.classList.add("e-responsive"),this.calculateCellSize();for(i=0;i<this.element.querySelectorAll(".e-panel").length;i++){var e=this.element.querySelectorAll(".e-panel")[i],t=this.getCellInstance(e.id);this.setHeightAndWidth(e,t)}for(var i=0;i<this.panels.length;i++)this.setPanelPosition(document.getElementById(this.panels[i].id),this.panels[i].row,this.panels[i].col);this.updateRowHeight()},i.prototype.updateRowHeight=function(){this.getRowColumn(),this.setHeightWidth()},i.prototype.setHeightWidth=function(){var e,i;e=this.checkMediaQuery()?this.maxRow()*(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)+(this.maxRow()-1)*this.cellSpacing[1]+"px":this.maxRow()*(this.cellSize[0]/this.cellAspectRatio)+(this.maxRow()-1)*this.cellSpacing[1]+"px",t.setStyleAttribute(this.element,{height:e}),i=window.getComputedStyle(this.element).width,t.setStyleAttribute(this.element,{width:i})},i.prototype.setHeightAndWidth=function(e,i){t.setStyleAttribute(e,{height:t.formatUnit(this.setXYDimensions(i)[0])}),t.setStyleAttribute(e,{width:t.formatUnit(this.setXYDimensions(i)[1])})},i.prototype.renderCell=function(e,i,s){var n;this.dimensions=this.setXYDimensions(e),t.isUndefined(e.enabled)&&(e.enabled=!0),this.isBlazor?n=document.getElementById(e.id):(this.contentTemplateChild.length>0&&!t.isNullOrUndefined(s)?(n=this.contentTemplateChild[s],e.cssClass&&t.addClass([n],[e.cssClass]),e.id&&n.setAttribute("id",e.id)):n=this.createPanelElement(e.cssClass?e.cssClass.split(" "):null,e.id),n.style.zIndex=""+e.zIndex,this.element.appendChild(n),this.renderReactTemplates());var a=this.renderPanels(n,e,e.id,i);if(this.panelCollection.push(a),this.isBlazor){var l=n.querySelector(".e-panel-content");if(l){var r="calc( 100% - "+(n.querySelector(".e-panel-header")?window.getComputedStyle(n.querySelector(".e-panel-header")).height:"0px")+")";t.setStyleAttribute(l,{height:r})}}else this.setXYAttributes(n,e);return this.setHeightAndWidth(n,e),n},i.prototype.setPanelPosition=function(e,i,s){if(e){this.checkMediaQuery()&&this.calculateCellSize();var n=this.getCellSize()[1],a=this.getCellSize()[0],l=0===s?0:s*(a+this.cellSpacing[0]),r=0===i?0:i*(n+this.cellSpacing[1]);this.checkMediaQuery()&&(r=0===i?0:this.panelsSizeY*(n+this.cellSpacing[1])),t.setStyleAttribute(e,{left:l+"px",top:r+"px"})}},i.prototype.getRowColumn=function(){if(this.rows=null,this.element.querySelectorAll(".e-panel").length>0&&!this.updatedRows)for(var e=this.element.querySelectorAll(".e-panel"),t=0;t<e.length;t++){var i=e[t],s=parseInt(i.getAttribute("data-row"),10),n=parseInt(i.getAttribute("data-sizeY"),10);this.rows=Math.max(this.rows,s+n)}else{this.updatedRows&&(this.rows=this.updatedRows,this.updatedRows=null);for(t=0;t<this.panels.length;t++)this.rows=Math.max(this.rows,this.panels[t].row)}},i.prototype.setMinMaxValues=function(e){!e.sizeX||e.sizeX<e.minSizeX?this.panelPropertyChange(e,{sizeX:e.minSizeX}):e.maxSizeX&&e.sizeX>e.maxSizeX?this.panelPropertyChange(e,{sizeX:e.maxSizeX}):e.sizeX>this.columns?this.panelPropertyChange(e,{sizeX:this.columns}):this.panelPropertyChange(e,{sizeX:e.sizeX}),!e.sizeY||e.sizeY<e.minSizeY?this.panelPropertyChange(e,{sizeY:e.minSizeY}):e.maxSizeY&&e.sizeY>e.maxSizeY?this.panelPropertyChange(e,{sizeY:e.maxSizeY}):this.panelPropertyChange(e,{sizeY:e.sizeY})},i.prototype.checkMinMaxValues=function(e){e.col+e.sizeX>this.columns&&this.panelPropertyChange(e,{sizeX:e.sizeX+(this.columns-(e.col+e.sizeX))})},i.prototype.panelPropertyChange=function(e,t){this.allowServerDataBinding=!1,e.setProperties(t,!0)},i.prototype.renderDashBoardCells=function(e){if(this.element.querySelectorAll(".e-panel").length>0||this.panels.length>0)for(var i=0;i<e.length;i++){this.gridPanelCollection.push(e[i]),this.isBlazor&&this.panels.length>0||this.setMinMaxValues(e[i]),(this.maxColumnValue<e[i].col||this.maxColumnValue<e[i].col+e[i].sizeX)&&this.panelPropertyChange(e[i],{col:this.maxColumnValue-e[i].sizeX});var s=this.renderCell(e[i],!1,i);this.isBlazor||(this.enableRtl&&t.addClass([s],"e-rtl"),this.element.appendChild(s),this.renderReactTemplates()),this.checkMediaQuery()&&i===e.length-1?this.checkMediaQuerySizing():(this.setPanelPosition(s,e[i].row,e[i].col),this.mainElement=s,this.updatePanelLayout(s,e[i]),this.mainElement=null)}this.setClasses(this.panelCollection)},i.prototype.collisions=function(e,t,i,s,n){var a=[];i&&s||(i=s=1),!n||n instanceof Array||(n=[n]);for(var l,r=0;r<s;++r)for(var o=0;o<i;++o)!(l=this.getPanel(e+r,t+o,n))||n&&-1!==n.indexOf(document.getElementById(l.id))||-1!==a.indexOf(document.getElementById(l.id))||a.push(document.getElementById(l.id));return a},i.prototype.rightWardsSpaceChecking=function(e,t,i){var s=this,n=[],a=[];if(e.forEach(function(e){var i=parseInt(e.getAttribute("data-col"),10),a=parseInt(e.getAttribute("data-sizeX"),10);if(t<s.columns&&i>=t)if(a>1)for(var l=i;l<i+a;l++)n.push(l);else n.push(i)}),n.length>0)for(var l=t+1;l<=this.columns-1;l++)-1===n.indexOf(l)&&l!==t&&-1===a.indexOf(l)&&a.push(l);var r=this.getOccupiedColumns(i);return r.forEach(function(e){e>t&&-1!==a.indexOf(e)&&a.splice(a.indexOf(e),1)}),this.getOccupiedColumns(this.checkingElement).forEach(function(e){e>parseInt(i.getAttribute("data-col"),10)&&-1===r.indexOf(e)&&-1===a.indexOf(e)&&a.push(e)}),a=a.sort(function(e,t){return e-t})},i.prototype.getOccupiedColumns=function(e){for(var t=[],i=parseInt(e.getAttribute("data-sizeX"),10),s=parseInt(e.getAttribute("data-col"),10),n=s;n<s+i&&n<=this.columns;n++)t.push(n);return t},i.prototype.leftWardsSpaceChecking=function(e,t,i){var s=this,n=[],a=[];if(e.forEach(function(e){var i=parseInt(e.getAttribute("data-col"),10),n=parseInt(e.getAttribute("data-sizeX"),10);if(t<=s.columns&&i<=t)if(n>1)for(var l=i;l<i+n;l++)a.push(l);else a.push(i)}),a.length>0)for(var l=0;l<=t;l++)-1===a.indexOf(l)&&l!==t&&-1===n.indexOf(l)&&n.push(l);var r=this.getOccupiedColumns(i);return r.forEach(function(e){e<t&&-1!==n.indexOf(e)&&n.splice(n.indexOf(e),1)}),this.getOccupiedColumns(this.checkingElement).forEach(function(e){e<parseInt(i.getAttribute("data-col"),10)&&-1===r.indexOf(e)&&-1===n.indexOf(e)&&n.push(e)}),n=n.sort(function(e,t){return e-t}),n=n.reverse()},i.prototype.adjustmentAvailable=function(e,i,s,n,a){this.leftAdjustable=void 0,this.rightAdjustable=void 0;var l,r=!1,o=[];this.topAdjustable=void 0;var h=parseInt(a.getAttribute("data-sizeX"),10),d=parseInt(a.getAttribute("data-col"),10);-1===(o=this.getRowElements(this.collisions(e,0,this.columns,s,[]))).indexOf(a)&&o.push(a);var p=this.leftWardsSpaceChecking(o,i,a);if(p.length>0?(this.leftAdjustable=this.isLeftAdjustable(p,a,e,i,n,s),this.spacedColumnValue!==d-this.getCellInstance(this.checkingElement.id).sizeX&&(this.leftAdjustable=!1),this.leftAdjustable?this.rightAdjustable=!1:(this.leftAdjustable=!1,l=this.rightWardsSpaceChecking(o,i,a),this.rightAdjustable=l.length>0&&this.isRightAdjustable(l,a,e,i,n,s),this.spacedColumnValue!==h+d&&(this.rightAdjustable=!1),this.rightAdjustable||(this.rightAdjustable=!1))):(l=this.rightWardsSpaceChecking(o,i,a),this.rightAdjustable=l.length>0&&this.isRightAdjustable(l,a,e,i,n,s),this.spacedColumnValue!==h+d&&(this.rightAdjustable=!1),this.rightAdjustable&&(this.leftAdjustable=!1)),!this.rightAdjustable&&!this.leftAdjustable&&e>0){var c=this.getCellInstance(a.id).row,u=!1;this.startRow!==c&&(u=!0);for(var g=e;g>=0;g--){var m=this.getCellInstance(a.id).sizeY>1&&u?this.checkingElement:a;g!==c&&g===c-s&&0===this.collisions(g,i,n,s,m).length&&(u=!1,this.topAdjustable=!0,this.spacedRowValue=t.isNullOrUndefined(this.spacedRowValue)?g:this.spacedRowValue,this.spacedColumnValue=i)}}return(this.rightAdjustable||this.leftAdjustable||this.topAdjustable)&&(r=!0,t.isNullOrUndefined(this.spacedRowValue)&&(this.spacedRowValue=e)),r},i.prototype.isXSpacingAvailable=function(e,t){for(var i=!1,s=[],n=0;n<e.length;n++)if(e[n+1]-e[n]==1||e[n+1]-e[n]==-1){if(s.push(e[n]),2===t&&s.push(e[n+1]),n===e.length-2&&(s.push(e[n+1]),s.length>t&&s.splice(-1)),s.length===t)return i=!0,this.spacedColumnValue=s.sort(function(e,t){return e-t})[0],this.spacedColumnValue<0&&(this.spacedColumnValue=1),i}else s=[];return i},i.prototype.getRowElements=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t},i.prototype.isLeftAdjustable=function(e,t,i,s,n,a){var l;if(1===n&&1===a&&e.length>0)this.spacedColumnValue=e[0],l=!0;else if(n>1&&1===a)l=this.isXSpacingAvailable(e,n);else if(a>1)if(1===n){var r=void 0;if(e.length>=1&&(r=!0),r)for(var o=0;o<e.length;o++){if(0===this.collisions(i,e[o],n,a,this.checkingElement).length)return this.spacedColumnValue=e[o],l=!0;l=!1}}else l=this.replacable(e,n,i,a,t);return l},i.prototype.isRightAdjustable=function(e,t,i,s,n,a){var l;if(1===n&&1===a&&e.length>0)this.spacedColumnValue=e[0],l=!0;else if(n>1&&1===a)l=this.isXSpacingAvailable(e,n);else if(a>1)if(1===n){var r=void 0;if(e.length>=1&&(r=!0),r)for(var o=0;o<e.length;o++){for(var h=this.collisions(i,e[o],n,a,this.checkingElement),d=0;d<h.length;d++)parseInt(t.getAttribute("data-col"),10)!==e[o]&&h.splice(h.indexOf(h[d]),1);if(0===h.length)return l=!0,this.spacedColumnValue=e[o],l;l=!1}}else l=this.replacable(e,n,i,a,t);return l},i.prototype.replacable=function(e,t,i,s,n){for(var a,l=[],r=0;r<e.length;r++)if(this.isXSpacingAvailable(e,t)){var o=[];if(o.push(this.checkingElement),o.push(n),0===l.length)return a=!0,this.spacedColumnValue=this.spacedColumnValue,a;a=!1}return a},i.prototype.sortCollisionItems=function(e){for(var t,i=[],s=this,n=this.rows-1;n>=0;n--)!function(n){t=[],e.forEach(function(e){e&&e.getAttribute("data-row")===n.toString()&&t.push(e)});for(var a=s.columns-1;a>=0;a--)!function(e){t.forEach(function(t){t&&t.getAttribute("data-col")===e.toString()&&i.push(t)})}(a)}(n);return i},i.prototype.updatedModels=function(e,t,i){var s=this,n=[];return this.mainElement||this.sortedPanel(),e.forEach(function(a){s.checkingElement=a;var l=s.getCellInstance(a.id),r=!s.adjustmentAvailable(l.row,l.col,l.sizeY,l.sizeX,i);if(l.sizeX>1&&r)for(var o=l.row;o<t.row+t.sizeY;o++)s.collisions(o,l.col,l.sizeX,l.sizeY,a).forEach(function(t){e.indexOf(t)>=0&&-1===n.indexOf(t)&&n.push(t)})}),n.forEach(function(t){n.indexOf(t)>=0&&e.splice(e.indexOf(t),1)}),e},i.prototype.resetLayout=function(e){var t=this.collisions(e.row,e.col,e.sizeX,e.sizeY,this.mainElement);if(!this.mainElement||this.addPanelCalled||this.resizeCalled||this.movePanelCalled)return t;if(this.mainElement&&this.oldRowCol!==this.cloneObject)for(var i=0;i<this.panels.length;i++){var s=document.getElementById(this.panels[i].id);if(s!==this.mainElement){var n=this.cloneObject[s.id].row,a=this.cloneObject[s.id].col;this.setPanelPosition(s,n,a),this.panelPropertyChange(this.getCellInstance(s.id),{row:n,col:a}),this.setAttributes({value:{col:a.toString(),row:n.toString()}},s),this.updateOldRowColumn()}}return this.sortedArray=this.cloneArray,t=this.collisions(e.row,e.col,e.sizeX,e.sizeY,this.mainElement),this.sortedPanel(),this.updateOldRowColumn(),this.checkCollision&&this.checkCollision.length>0&&-1===t.indexOf(this.checkCollision[0])&&this.cloneObject[this.checkCollision[0].id].row===e.row&&t.push(this.checkCollision[0]),t},i.prototype.swapAvailability=function(e,t){for(var i=!0,s=this.getCellInstance(t.id),n=0;n<e.length;n++)for(var a=this.getCellInstance(e[n].id),l=1;l<s.sizeY;l++){var r=[];if(r.push(t),r.push(e[n]),this.collisions(s.row+l,a.col,a.sizeX,a.sizeY,r).length>0)return i=!1,!1}return i},i.prototype.checkForSwapping=function(e,t){if(!this.mainElement||0===e.length)return!1;var i,s=parseInt(e[0].getAttribute("data-row"),10);if(this.startRow<s?i=1:this.startRow>s&&(i=0),!this.swapAvailability(e,t))return!1;for(var n=!1,a=0;a<e.length;a++)if(e.length>=1&&this.cloneObject[this.mainElement.id].row===this.oldRowCol[this.mainElement.id].row)return!1;for(var l=0===i?this.getCellInstance(this.mainElement.id).row+this.getCellInstance(this.mainElement.id).sizeY:this.startRow,r=0;r<e.length;r++){var o=this.getCellInstance(e[r].id),h=this.getCellInstance(t.id),d=[];if(1===o.sizeY&&-1===d.indexOf(e[r]))d.push(e[r]);else if(o.sizeY>1&&-1===d.indexOf(e[r]))if(1===i&&h.row===this.cloneObject[o.id].row+o.sizeY-1)d.push(e[r]);else{if(0!==i||h.row!==this.cloneObject[o.id].row)return!1;d.push(e[r])}if(o.sizeY<=h.sizeY&&-1===d.indexOf(e[r])&&d.push(e[r]),d.push(this.mainElement),this.collisions(l,o.col,o.sizeX,o.sizeY,d).length>0)return n=!1;r===e.length-1&&(n=!0)}return n},i.prototype.swapItems=function(e,t,i){var s,n=this,a=[];a.push(t);var l=parseInt(e[0].getAttribute("data-row"),10);this.startRow<l?s=1:this.startRow>l&&(s=0);var r=0===s?l+i.sizeY:this.startRow;if(!this.movePanelCalled){var o=this.getCellInstance(e[0].id);this.panelPropertyChange(i,{row:0===s?l:r+o.sizeY})}for(var h=0;h<e.length;h++)a.push(e[h]),this.setPanelPosition(e[h],r,this.getCellInstance(e[h].id).col),this.panelPropertyChange(this.getCellInstance(e[h].id),{row:r}),e[h].setAttribute("data-row",r.toString());t.setAttribute("data-row",i.row.toString()),this.setPanelPosition(this.shadowEle,i.row,i.col);for(var d=0;d<this.panels.length;d++)this.oldRowCol[this.panels[d].id]={row:this.panels[d].row,col:this.panels[d].col};this.startRow=i.row,this.updateOldRowColumn(),a.forEach(function(e){n.cloneObject[e.id]=n.oldRowCol[e.id];for(var t=n.getCellInstance(e.id),i=0;i<n.sortedArray.length;i++)if(n.sortedArray[i])for(var s=0;s<n.sortedArray[i].length;s++)n.sortedArray[i][s]===e&&(n.sortedArray[i][s]=void 0);n.sortedArray[t.row]||(n.sortedArray[t.row]=[]),n.sortedArray[t.row][t.col]=e,n.cloneArray=n.sortedArray})},i.prototype.updatePanelLayout=function(e,i){this.collisionChecker={};var s=[],n=[];if((s=this.mainElement&&this.isRenderComplete?this.resetLayout(i):this.collisions(i.row,i.col,i.sizeX,i.sizeY,e)).length>0)if(s=this.sortCollisionItems(s),s=this.updatedModels(s,i,e),!t.isNullOrUndefined(this.startRow)&&this.checkForSwapping(s,e))this.swapItems(s,e,i);else for(var a=0;a<s.length;a++){var l=this.getCellInstance(s[a].id);if(this.checkingElement=s[a],this.spacedRowValue=null,this.spacedColumnValue=null,this.adjustmentAvailable(l.row,l.col,l.sizeY,l.sizeX,e)&&!t.isNullOrUndefined(this.spacedColumnValue)){this.setPanelPosition(s[a],this.spacedRowValue,this.spacedColumnValue),this.oldRowCol[s[a].id]={row:this.spacedRowValue,col:this.spacedColumnValue};var r={attributes:{row:this.spacedRowValue.toString(),col:this.spacedColumnValue.toString()}};if(this.setAttributes(r,s[a]),this.panelPropertyChange(l,{col:this.spacedColumnValue,row:this.spacedRowValue}),this.topAdjustable&&this.allowFloating&&(this.updatePanels(),this.updateCloneArrayObject()),this.spacedRowValue=null,a<s.length)continue}else n.push(s[a])}if(n.length>0){var o=this;n.forEach(function(e){-1===o.overlapElement.indexOf(e)&&o.overlapElement.push(e)}),this.overlapElement&&-1!==this.overlapElement.indexOf(e)&&this.overlapElement.splice(this.overlapElement.indexOf(e),1),n.length>0&&(this.updateRowColumn(i.row,this.overlapElement,e),this.checkForCompletePushing())}this.isSubValue||this.sortedPanel(),this.updateRowHeight(),this.updateGridLines()},i.prototype.checkForCompletePushing=function(){for(var e=0;e<this.panels.length;e++)if(this.collisionChecker[this.panels[e].id]&&null!==this.collisionChecker[this.panels[e].id]){this.overlapElement=[this.collisionChecker[this.panels[e].id].ele];var t=this.panels[e].id;this.updateRowColumn(this.collisionChecker[t].row,this.overlapElement,this.collisionChecker[t].srcEle)}},i.prototype.updateCollisionChecked=function(e){for(var t=0;t<Object.keys(this.collisionChecker).length;t++)this.collisionChecker[e.id]=null},i.prototype.updateRowColumn=function(e,t,i){if(i){var s=parseInt(i.getAttribute("data-sizeY"),10),n=parseInt(i.getAttribute("data-row"),10);this.overlapElementClone=(this.overlapElement&&this.shouldRestrict,this.overlapElement);for(var a=0;a<this.overlapElementClone.length;a++){if(0===this.overlapElementClone.length)return;for(var l=0;l<this.overlapElementClone.length;l++)this.collisionChecker[this.overlapElementClone[l].id]={ele:this.overlapElementClone[l],row:e,srcEle:i};var r=n+s,o=parseInt(this.overlapElementClone[a].getAttribute("data-sizeY"),10),h=parseInt(this.overlapElementClone[a].getAttribute("data-col"),10),d=parseInt(this.overlapElementClone[a].getAttribute("data-sizeX"),10),p=void 0,c=void 0;if(-1===this.overlapSubElementClone.indexOf(i)&&this.overlapSubElementClone.push(i),-1===this.overlapSubElementClone.indexOf(this.overlapElementClone[a])&&this.overlapSubElementClone.push(this.overlapElementClone[a]),o>1||d>1){var u=this.getCellInstance(this.overlapElementClone[a].id);p=u.col;for(var g=document.getElementById(u.id),m=u.row;m<n+s;m++){this.isSubValue=!0,this.panelPropertyChange(u,{row:u.row+1}),g.setAttribute("data-row",u.row.toString()),this.setPanelPosition(g,u.row,p),this.updateCollisionChecked(g),this.oldRowCol[g.id]={row:u.row,col:p};S=this.getCellInstance(g.id);this.panelPropertyChange(S,{col:p,row:u.row});var v=parseInt(g.getAttribute("data-row"),10),f=parseInt(g.getAttribute("data-col"),10),P=parseInt(g.getAttribute("data-sizeX"),10),y=parseInt(g.getAttribute("data-sizeY"),10),C=[];C.push(g),C.push(i),c=this.collisions(v,f,P,y,C),this.mainElement&&-1!==c.indexOf(this.mainElement)&&c.splice(c.indexOf(this.mainElement),1),this.collisionPanel(c,f,v,g)}this.isSubValue=!1}else{this.addPanelCalled&&(this.addPanelCalled=!1),this.overlapElementClone[a].setAttribute("data-row",r.toString());var x=[];x.push(this.overlapElementClone[a]),x.push(i),c=this.collisions(r,h,d,o,x),this.mainElement&&-1!==c.indexOf(this.mainElement)&&c.splice(c.indexOf(this.mainElement),1),p=parseInt(this.overlapElementClone[a].getAttribute("data-col"),10),this.setPanelPosition(this.overlapElementClone[a],r,p),this.updateCollisionChecked(this.overlapElementClone[a]),this.oldRowCol[this.overlapElementClone[a].id]={row:r,col:p};var S=this.getCellInstance(this.overlapElementClone[a].id);this.panelPropertyChange(S,{col:p,row:r}),this.collisionPanel(c,p,r,this.overlapElementClone[a])}}}},i.prototype.collisionPanel=function(e,t,i,s){var n=this.getCellInstance(s.id);if(this.panelPropertyChange(n,{row:i,col:t}),e.length>0){var a=this;this.overlapElement=[],this.shouldRestrict=!0,e.forEach(function(e){a.overlapElement.push(e)});for(var l=parseInt(s.getAttribute("data-row"),10),r=0;r<this.overlapElement.length;r++)this.updateRowColumn(l,this.overlapElement,s);this.shouldRestrict=!1}else{if(this.addPanelCalled||this.sortedPanel(),this.overlapSubElementClone.length>0)for(var o=this,h=0;h<this.overlapSubElementClone.length;h++)!function(e){var t=parseInt(o.overlapSubElementClone[e].getAttribute("data-row"),10),i=parseInt(o.overlapSubElementClone[e].getAttribute("data-col"),10),s=parseInt(o.overlapSubElementClone[e].getAttribute("data-sizeX"),10),n=parseInt(o.overlapSubElementClone[e].getAttribute("data-sizeY"),10),a=o.collisions(t,i,s,n,o.overlapSubElementClone);o.mainElement&&-1!==a.indexOf(o.mainElement)&&a.splice(a.indexOf(o.mainElement),1);var l=o;a.forEach(function(e){l.overlapElement.push(e)}),a.length>0&&o.updateRowColumn(t,o.overlapElement,o.overlapSubElementClone[e])}(h);this.overlapSubElementClone=[]}},i.prototype.removeResizeClasses=function(e){for(var i=0;i<e.length;i++)for(var s=e[i].querySelectorAll(".e-resize"),n=0;n<s.length;n++)t.detach(s[n])},i.prototype.ensureDrag=function(){this.checkDragging(this.dragCollection);var e=this.element.querySelectorAll("."+C);t.removeClass(e,[C]),this.setClasses(this.panelCollection)},i.prototype.setClasses=function(e){for(var i=0;i<e.length;i++){var s=e[i],n=e[i].querySelector(".e-panel-container");this.allowDragging&&(this.draggableHandle&&s.querySelectorAll(this.draggableHandle)[0]?t.addClass([s.querySelectorAll(this.draggableHandle)[0]],[C]):t.addClass([s],[C])),this.allowResizing&&this.mediaQuery&&!this.checkMediaQuery()&&this.setResizingClass(s,n)}},i.prototype.setResizingClass=function(e,i){if(this.availableClasses=this.resizableHandles,!e.querySelector(".e-resize"))for(var s=0;s<this.availableClasses.length;s++){var n=this.createElement("span"),a=void 0;i.appendChild(n),a="e-east"===this.availableClasses[s]||"e-west"===this.availableClasses[s]||"e-north"===this.availableClasses[s]||"e-south"===this.availableClasses[s]?"e-single":"e-double",t.addClass([n],[a,this.availableClasses[s],"e-resize","e-dl-icon"])}},i.prototype.setXYAttributes=function(e,i){var s={value:{sizeX:i.sizeX.toString(),sizeY:i.sizeY.toString(),minSizeX:i.minSizeX.toString(),minSizeY:i.minSizeY.toString(),maxSizeX:t.isNullOrUndefined(i.maxSizeX)?void 0:i.maxSizeX.toString(),maxSizeY:t.isNullOrUndefined(i.maxSizeY)?void 0:i.maxSizeY.toString(),row:i.row.toString(),col:i.col.toString()}};this.setAttributes(s,e)},i.prototype.setXYDimensions=function(e){var i,s,n=this.getCellSize()[1],a=this.getCellSize()[0];return i=e&&"number"==typeof a&&"number"==typeof e.sizeX&&e.sizeX>1?e.sizeX*a+(e.sizeX-1)*this.cellSpacing[0]:a,s=e&&"number"==typeof n&&e.sizeY>1&&"number"==typeof e.sizeY?e.sizeY*n+(e.sizeY-1)*this.cellSpacing[1]:t.formatUnit(n),[s,i]},i.prototype.getRowColumnDragValues=function(e){var t=parseFloat(e.element.style.top),i=parseFloat(e.element.style.left);return[Math.round(t/(this.getCellSize()[1]+this.cellSpacing[1])),Math.round(i/(this.getCellSize()[0]+ +this.cellSpacing[0]))]},i.prototype.checkForChanges=function(e,i,s){var n=[];if(this.removeAllCalled)n=[];else for(var a=0;a<this.panels.length;a++)!t.isNullOrUndefined(i)&&this.panels[a].id===i[0].id||!t.isNullOrUndefined(s)&&this.panels[a].id===s[0].id||this.panels[a].row===this.panelsInitialModel[a].row&&this.panels[a].col===this.panelsInitialModel[a].col||n.push(this.panels[a]);if(n.length>0||this.removeAllCalled){var l={changedPanels:n,isInteracted:e,addedPanels:t.isNullOrUndefined(i)?[]:i,removedPanels:t.isNullOrUndefined(s)?[]:s};this.trigger("change",l)}},i.prototype.enableDraggingContent=function(e){for(var i=this,s=0;s<e.length;s++){var n=[".e-resize",".e-drag-restrict"],a=e[s];this.dragobj=new t.Draggable(a,{preventDefault:!1,clone:!1,dragArea:this.element,isDragScroll:!0,handle:this.draggableHandle?this.draggableHandle:".e-panel",abort:n,dragStart:this.onDraggingStart.bind(this),dragStop:function(e){var s=i.getCellInstance(i.mainElement.id);i.allowPushing&&i.collisions(s.row,s.col,s.sizeX,s.sizeY,i.mainElement).length>0?(i.setHolderPosition(e),i.setPanelPosition(i.mainElement,s.row,s.col),i.updatePanelLayout(i.mainElement,s)):i.setPanelPosition(i.mainElement,s.row,s.col),i.mainElement=null;var n=i.getPanelBase(e);i.shadowEle&&t.detach(i.shadowEle),t.removeClass([i.element],["e-prevent"]),t.removeClass([e.element],["e-dragging"]),i.shadowEle=null,e.element.classList.remove("e-dragging");var a=i.getRowColumnDragValues(e)[0],l=i.getRowColumnDragValues(e)[1],r=i.getCellInstance(e.element.id);i.allowPushing&&0===i.collisions(a,l,r.sizeX,r.sizeY,document.getElementById(n.id)).length?(i.panelPropertyChange(i.getCellInstance(e.element.id),{row:a,col:l}),i.oldRowCol[e.element.id].row=a,i.oldRowCol[e.element.id].col=l,i.setAttributes({value:{col:l.toString(),row:a.toString()}},e.element),i.sortedPanel()):(i.panelPropertyChange(i.getCellInstance(e.element.id),{row:i.oldRowCol[e.element.id].row,col:i.oldRowCol[e.element.id].col}),e.element.setAttribute("data-col",i.getCellInstance(e.element.id).col.toString()),e.element.setAttribute("data-row",i.getCellInstance(e.element.id).row.toString()),i.sortedPanel());var o=i.getCellInstance(e.element.id);i.setPanelPosition(e.element,o.row,o.col),i.updatePanels(),i.updateServerPanelData(),i.updateCloneArrayObject(),i.checkForChanges(!0),i.dragStopEventArgs={event:e.event,element:e.element},i.trigger("dragStop",e),i.resizeEvents(),i.rows=i.maxRow(!0),i.setHeightWidth(),i.updateDragArea()},drag:function(e){i.draggedEventArgs={event:e.event,element:e.element,target:t.closest(e.target,".e-panel")},i.trigger("drag",i.draggedEventArgs),i.onDragStart(e)}}),-1===this.dragCollection.indexOf(this.dragobj)&&this.dragCollection.push(this.dragobj)}},i.prototype.updatePanels=function(){this.moveItemsUpwards(),this.updateOldRowColumn(),this.sortedPanel()},i.prototype.updateDragArea=function(){this.dragCollection.forEach(function(e){e.setDragArea()})},i.prototype.updateRowsHeight=function(e,t,i){e+t>=this.rows&&(this.rows=this.rows+i,this.setHeightWidth())},i.prototype.onDraggingStart=function(e){var i=e;this.trigger("dragStart",i,function(i){t.isBlazor()&&i.bindEvents(e.element)}),this.panelsInitialModel=this.cloneModels(this.panels),this.mainElement=e.element,this.cloneObject=JSON.parse(JSON.stringify(this.cloneObject));var s=this.startRow=parseInt(e.element.getAttribute("data-row"),10);this.startCol=parseInt(e.element.getAttribute("data-col"),10);var n=parseInt(e.element.getAttribute("data-sizeY"),10);this.updateRowsHeight(s,n,n),this.updateDragArea(),this.shadowEle=document.createElement("div"),this.shadowEle.classList.add("e-holder"),this.shadowEle.classList.add("e-holder-transition"),t.setStyleAttribute(this.shadowEle,{position:"absolute"}),t.addClass([this.element],["e-prevent"]),t.addClass([e.element],["e-dragging"]),this.element.appendChild(this.shadowEle),this.renderReactTemplates(),this.shadowEle=document.querySelector(".e-holder"),this.shadowEle.style.height=this.getCellInstance(e.element.id).sizeY*this.cellSize[1]+"px",this.shadowEle.style.width=this.getCellInstance(e.element.id).sizeX*this.cellSize[0]+"px";var a=this.getCellInstance(e.element.id);this.setPanelPosition(this.shadowEle,a.row,a.col)},i.prototype.cloneModels=function(e,t){void 0===t&&(t=[]);for(var i=0;i<e.length;i++){t[i]||(t[i]={});for(var s in e[i])t[i][s]=e[i][s]}return t},i.prototype.onDragStart=function(e){var t,i,s,n=s=this.getRowColumnDragValues(e)[1],a=this.getRowColumnDragValues(e)[0];if(!(n<0||a<0)){this.panelPropertyChange(this.getCellInstance(e.element.id),{row:a,col:n});var l=this.getCellInstance(e.element.id);if(this.updateRowsHeight(l.row,l.sizeY,1),this.updateDragArea(),this.allowPushing&&(this.setAttributes({value:{col:n.toString(),row:a.toString()}},e.element),this.panelPropertyChange(this.getCellInstance(e.element.id),{row:a,col:n}),t=this.oldRowCol[e.element.id].col,i=this.oldRowCol[e.element.id].row,this.oldRowCol[e.element.id]={row:a,col:n},this.updateOldRowColumn(),(this.startCol!==t||this.startRow!==i)&&(this.setHolderPosition(e),this.startCol!==t&&(this.startRow=i),this.startRow!==i&&(this.startCol=t),this.allowPushing))){this.mainElement=e.element;var r=l;this.checkCollision=this.collisions(r.row,r.col,r.sizeX,r.sizeY,e.element),l.col>=this.checkColumnValue&&(this.checkCollision=[]),this.updatePanelLayout(e.element,l),this.moveItemsUpwards()}!1!==this.allowPushing&&this.panelPropertyChange(this.getCellInstance(e.element.id),{row:a,col:n}),this.oldRowCol[e.element.id].row===a&&this.oldRowCol[e.element.id].col===n||(this.panelPropertyChange(this.getCellInstance(e.element.id),{row:a,col:n}),this.setAttributes({value:{col:n.toString(),row:a.toString()}},e.element)),this.startCol!==s&&(this.startCol=t,this.moveItemsUpwards()),this.allowPushing||this.setHolderPosition(e),this.removeResizeClasses(this.panelCollection),this.setClasses(this.panelCollection),this.allowPushing}},i.prototype.getPanelBase=function(e){for(var t,i=0;i<this.panelCollection.length;i++)this.panelCollection[i].id===(e.element&&e.element.id||e)&&(t=this.panelCollection[i]);return t},i.prototype.getPanel=function(e,t,i){!i||i instanceof Array||(i=[i]);for(var s=1;e>-1;){for(var n=1,a=t;a>-1;){var l=this.sortedArray[e];if(l){var r=l[a];if(r&&(!i||-1===i.indexOf(r))&&parseInt(r.getAttribute("data-sizeX"),10)>=n&&parseInt(r.getAttribute("data-sizeY"),10)>=s)return r}++n,--a}--e,++s}return null},i.prototype.setHolderPosition=function(e){var t=parseInt(e.element.getAttribute("data-sizeY"),10),i=parseInt(e.element.getAttribute("data-col"),10),s=parseInt(e.element.getAttribute("data-row"),10),n=parseInt(e.element.getAttribute("data-sizeX"),10),a=this.getCellSize()[0],l=this.getCellSize()[1],r=0===s?0:s*(l+this.cellSpacing[1]),o=0===i?0:i*(a+this.cellSpacing[0]),h=this.getCellSize()[1],d=this.getCellSize()[0];this.elementRef.top=this.shadowEle.style.top=r+"px",this.elementRef.left=this.shadowEle.style.left=o+"px",this.elementRef.height=this.shadowEle.style.height=t*h+(t-1)*this.cellSpacing[1]+"px",this.elementRef.width=this.shadowEle.style.width=n*d+(n-1)*this.cellSpacing[0]+"px"},i.prototype.getCellInstance=function(e){for(var t,i=0;i<this.panels.length;i++)this.panels[i].id===e&&(t=this.panels[i]);return t},i.prototype.addPanel=function(e){this.panelsSizeY=0,this.allowServerDataBinding=!1,this.maxCol(),e.minSizeX||(e.minSizeX=1),e.minSizeY||(e.minSizeY=1),e.id||(e.id="layout_"+this.panelID.toString(),this.panelID=this.panelID+1);var i=new x(this,"panels",e,!0);this.panels.push(i),this.panelsInitialModel=this.cloneModels(this.panels),this.setMinMaxValues(i),(this.maxColumnValue<i.col||this.maxColumnValue<i.col+i.sizeX)&&this.panelPropertyChange(i,{col:this.maxColumnValue-i.sizeX});var s=this.renderCell(i,!0,null);if(this.oldRowCol[i.id]={row:i.row,col:i.col},this.cloneObject[i.id]={row:i.row,col:i.col},this.updateOldRowColumn(),this.element.insertAdjacentElement("afterbegin",s),this.addPanelCalled=!0,this.checkMediaQuery()?(this.checkMediaQuerySizing(),this.isBlazor&&s.style.removeProperty("visibility"),this.removeResizeClasses(this.panelCollection)):(this.mainElement=s,this.checkCollision||(this.checkCollision=[]),this.setPanelPosition(s,i.row,i.col),this.isBlazor&&s.style.removeProperty("visibility"),this.updatePanelLayout(s,i)),this.addPanelCalled=!1,this.allowDragging&&this.mediaQuery&&!this.checkMediaQuery()&&this.enableDraggingContent([document.getElementById(i.id)]),this.setClasses([s]),this.allowFloating&&(this.mainElement=null,this.moveItemsUpwards()),this.updateOldRowColumn(),this.sortedPanel(),this.updateCloneArrayObject(),this.allowResizing)for(var n=0;n<s.querySelectorAll(".e-resize").length;n++){var a="msie"===t.Browser.info.name?"mousedown pointerdown":"mousedown";t.EventHandler.add(s.querySelectorAll(".e-resize")[n],a,this.downResizeHandler,this),"msie"!==t.Browser.info.name&&t.EventHandler.add(s.querySelectorAll(".e-resize")[n],"touchstart",this.touchDownResizeHandler,this)}this.checkForChanges(!1,[i]),this.allowServerDataBinding=!0,this.serverDataBind()},i.prototype.updatePanel=function(e){if(this.panelsSizeY=0,e.id){var i=this.getCellInstance(e.id);if(i){this.maxCol(),e.col=e.col<1?0:e.col>this.columns?this.columns-1:e.col,t.isNullOrUndefined(e.col)&&(e.col=i.col),this.panelPropertyChange(i,e),this.setMinMaxValues(i);var s=document.getElementById(e.id);this.mainElement=s;var n=i.cssClass?i.cssClass.split(" "):null;if(this.panelContent=s.querySelector(".e-panel-container")?s.querySelector(".e-panel-container"):this.createSubElement(n,s.id+"_content","e-panel-container"),s.appendChild(this.panelContent),i.header){var a=s.querySelector(".e-panel-header")?s.querySelector(".e-panel-header"):this.createSubElement([],s.id+"template","");t.addClass([a],["e-panel-header"]),a.innerHTML="";o=this.element.id+"HeaderTemplate"+i.id;this.renderTemplate(i.header,a,o,!0,"header"),this.panelContent.appendChild(a),this.renderReactTemplates()}else s.querySelector(".e-panel-header")&&t.detach(s.querySelector(".e-panel-header"));if(i.content){var l=i.cssClass?i.cssClass.split(" "):null;this.panelBody=s.querySelector(".e-panel-content")?s.querySelector(".e-panel-content"):this.createSubElement(l,s.id+"_body","e-panel-content"),this.panelBody.innerHTML="";var r="calc( 100% - "+(this.panelContent.querySelector(".e-panel-header")?window.getComputedStyle(this.panelContent.querySelector(".e-panel-header")).height:"0px")+")";t.setStyleAttribute(this.panelBody,{height:r});var o=this.element.id+"ContentTemplate"+i.id;this.renderTemplate(i.content,this.panelBody,o,!0,"content"),this.panelContent.appendChild(this.panelBody),this.renderReactTemplates()}else s.querySelector(".e-panel-content")&&t.detach(s.querySelector(".e-panel-content"));this.setXYAttributes(s,i),this.setHeightAndWidth(s,i),this.setPanelPosition(s,i.row,i.col),this.updatePanelLayout(s,i),this.checkMediaQuery()&&this.checkMediaQuerySizing(),this.mainElement=null,this.updatePanels(),this.updateCloneArrayObject()}}},i.prototype.updateCloneArrayObject=function(){this.cloneArray=this.sortedArray,this.cloneObject=JSON.parse(JSON.stringify(this.oldRowCol))},i.prototype.serialize=function(){for(var e=this.cloneModels(this.panels),t=[],i=0;i<e.length;i++)t.push({id:e[i].id,row:e[i].row,col:e[i].col,sizeX:e[i].sizeX,sizeY:e[i].sizeY,minSizeX:e[i].minSizeX,minSizeY:e[i].minSizeY,maxSizeX:e[i].maxSizeX,maxSizeY:e[i].maxSizeY});return t},i.prototype.removeAll=function(){this.removeAllCalled=!0;for(var e=0;e<this.panelCollection.length;e++)t.detach(this.panelCollection[e]),this.clearTemplate();this.removeAllPanel(),this.updateServerPanelData(),this.rows=0,this.gridPanelCollection=[],this.setHeightWidth(),this.sortedPanel(),this.sortedArray=[],this.overlapElementClone=[],this.overlapElement=[],this.overlapSubElementClone=[],this.panelCollection=[],this.oldRowCol={},this.cloneObject={};var i=this.cloneModels(this.panels);this.setProperties({panels:[]},!0),this.updatePanels(),this.updateCloneArrayObject(),this.checkForChanges(!1,null,i),this.removeAllCalled=!1},i.prototype.removePanel=function(e){var i=this;this.panelsSizeY=0,this.panelsInitialModel=this.cloneModels(this.panels);for(var s,n=0;n<this.panelCollection.length;n++)this.panelCollection[n].id===e&&(t.detach(this.panelCollection[n]),this.panelCollection.splice(n,1)),this.panels[n].id===e&&(s=this.panels[n],this.panels.splice(n,1),this.panelsInitialModel.splice(n,1),this.updateOldRowColumn(),this.sortedPanel());this.updatePanels(),this.checkMediaQuery()&&(this.isPanelRemoved=!0,this.checkMediaQuerySizing(),this.isPanelRemoved=!1),this.updateServerPanelData(),this.gridPanelCollection.forEach(function(t){t.id===e&&i.gridPanelCollection.splice(i.gridPanelCollection.indexOf(t),1)}),this.updateCloneArrayObject(),this.checkForChanges(!1,null,[s])},i.prototype.movePanel=function(e,t,i){this.movePanelCalled=!0,this.panelsInitialModel=this.cloneModels(this.panels);var s=this.getCellInstance(e);if(!isNaN(t)&&null!==t&&!isNaN(i)&&null!==i&&s){i<0?i=0:i>this.columns&&(i=this.columns-s.sizeX),this.panelPropertyChange(s,{row:t,col:i});var n=document.getElementById(e);this.mainElement=n,this.startRow=parseInt(n.getAttribute("data-row"),10),this.startCol=parseInt(n.getAttribute("data-col"),10),this.setAttributes({value:{col:i.toString(),row:t.toString()}},n),this.updateOldRowColumn(),this.setPanelPosition(n,t,i),this.updatePanelLayout(n,s),this.updateRowHeight(),this.updatePanels(),this.updateServerPanelData(),this.updateCloneArrayObject(),this.mainElement=null,this.allowFloating&&this.moveItemsUpwards(),this.movePanelCalled=!1,this.checkForChanges(!1)}},i.prototype.setAttributes=function(e,t){for(var i=0;i<Object.keys(e).length;i++)Object.keys(e)&&(e[Object.keys(e)[i]].col&&t.setAttribute("data-col",e[Object.keys(e)[i]].col.toString()),e[Object.keys(e)[i]].row&&t.setAttribute("data-row",e[Object.keys(e)[i]].row.toString()),e[Object.keys(e)[i]].sizeX&&t.setAttribute("data-sizeX",e[Object.keys(e)[i]].sizeX.toString()),e[Object.keys(e)[i]].sizeY&&t.setAttribute("data-sizeY",e[Object.keys(e)[i]].sizeY.toString()),e[Object.keys(e)[i]].minSizeX&&t.setAttribute("data-minSizeX",e[Object.keys(e)[i]].minSizeX.toString()),e[Object.keys(e)[i]].minSizeY&&t.setAttribute("data-minSizeY",e[Object.keys(e)[i]].minSizeY.toString()),e[Object.keys(e)[i]].maxSizeX&&t.setAttribute("data-maxSizeY",e[Object.keys(e)[i]].maxSizeX.toString()),e[Object.keys(e)[i]].maxSizeY&&t.setAttribute("data-maxSizeY",e[Object.keys(e)[i]].maxSizeY.toString()))},i.prototype.resizePanel=function(e,t,i){this.panelsInitialModel=this.cloneModels(this.panels);var s=this.getCellInstance(e);this.resizeCalled=!0;var n=document.getElementById(e),a={event:null,element:n,isInteracted:!1};this.trigger("resizeStart",a),this.panelPropertyChange(s,{sizeX:t,sizeY:i}),this.setMinMaxValues(s),this.checkMinMaxValues(s),this.mainElement=n,this.setAttributes({value:{sizeX:s.sizeX.toString(),sizeY:s.sizeY.toString()}},n),this.setHeightAndWidth(n,s),this.updatePanelLayout(n,s),this.updatePanels(),this.updateServerPanelData(),this.updateRowHeight(),this.resizeCalled=!1,this.trigger("resizeStop",a),this.checkForChanges(!1)},i.prototype.destroy=function(){t.EventHandler.remove(window,"resize",this.refreshListener),t.removeClass([this.element],["e-dashboardlayout","e-lib","e-responsive","e-control"]),this.element.removeAttribute("style");for(var i=0;i<this.dragCollection.length;i++)this.dragCollection[i].destroy();this.removeAllPanel(),e.prototype.destroy.call(this),this.clearTemplate(),this.renderReactTemplates()},i.prototype.removeAllPanel=function(){for(;this.element.firstElementChild;)t.detach(this.element.firstElementChild),this.clearTemplate()},i.prototype.setEnableRtl=function(){!0===this.enableRtl?t.addClass([this.element],"e-rtl"):t.removeClass([this.element],"e-rtl")},i.prototype.updateCellSizeAndSpacing=function(){this.panelResponsiveUpdate(),this.setHeightWidth(),this.getRowColumn();for(var e=0;e<this.element.querySelectorAll(".e-panel").length;e++){var t=this.element.querySelectorAll(".e-panel")[e],i=this.getCellInstance(t.id);this.setHeightAndWidth(t,i),this.setPanelPosition(t,i.row,i.col)}},i.prototype.updatePanelsDynamically=function(e){this.removeAll(),this.setProperties({panels:e},!0),this.setOldRowCol(),this.table&&this.table.remove(),this.isBlazor=!1,this.initialize(),this.checkMediaQuery()&&this.refresh(),this.isBlazor=t.isBlazor()&&this.isServerRendered,this.showGridLines&&this.initGridLines()},i.prototype.checkForIDValues=function(e){var i=this;!t.isNullOrUndefined(e)&&e.length>0?(this.panelID=0,e.forEach(function(e){e.id||(i.panelPropertyChange(e,{id:"layout_"+i.panelID.toString()}),i.panelID=i.panelID+1)})):this.restrictDynamicUpdate=!0},i.prototype.onPropertyChanged=function(e,i){var s=this;e.panels&&e.panels.length>0&&e.panels[0]instanceof x&&this.checkForIDValues(e.panels);for(var n=0,a=Object.keys(e);n<a.length;n++)switch(a[n]){case"enableRtl":this.setProperties({enableRtl:e.enableRtl},!0),this.setEnableRtl();break;case"mediaQuery":this.setProperties({mediaQuery:e.mediaQuery},!0),this.checkMediaQuery()&&this.checkMediaQuerySizing();break;case"allowDragging":this.setProperties({allowDragging:e.allowDragging},!0),this.ensureDrag();break;case"allowResizing":if(this.setProperties({allowResizing:e.allowResizing},!0),this.allowResizing)this.setClasses(this.panelCollection),this.resizeEvents();else{for(var l=this.element.querySelectorAll(".e-panel .e-panel-container .e-resize"),r=0;r<l.length;r++){var o="msie"===t.Browser.info.name?"mousedown pointerdown":"mousedown",h=l[r];t.EventHandler.remove(h,o,this.downResizeHandler),"msie"!==t.Browser.info.name&&t.EventHandler.remove(h,"touchstart",this.touchDownResizeHandler)}this.removeResizeClasses(this.panelCollection)}break;case"cellSpacing":this.setProperties({cellSpacing:e.cellSpacing},!0),this.updateCellSizeAndSpacing(),this.updateGridLines();break;case"draggableHandle":this.setProperties({draggableHandle:e.draggableHandle},!0),this.ensureDrag();break;case"allowFloating":this.setProperties({allowFloating:e.allowFloating},!0),this.moveItemsUpwards();break;case"showGridLines":this.showGridLines?(this.setProperties({showGridLines:e.showGridLines},!0),this.initGridLines()):this.table&&t.detach(this.table);break;case"allowPushing":this.setProperties({allowPushing:e.allowPushing},!0);break;case"panels":!e.columns&&!this.restrictDynamicUpdate&&e.panels[0]&&e.panels.length>0?(this.isRenderComplete=!1,this.updatePanelsDynamically(e.panels),this.isRenderComplete=!0):e.panels[0]&&e.panels.length?this.restrictDynamicUpdate=!1:(this.isRenderComplete=!1,this.updatePanelsDynamically(this.panels),this.isRenderComplete=!0);break;case"columns":this.isRenderComplete=!1,e.panels&&this.updatePanelsDynamically(e.panels),this.setProperties({columns:e.columns},!0),this.panelCollection=[],this.maxColumnValue=this.columns,this.calculateCellSize(),this.panels.forEach(function(e){if(s.setMinMaxValues(e),s.maxColumnValue<e.col||s.maxColumnValue<e.col+e.sizeX){var t=s.maxColumnValue-e.sizeX;s.panelPropertyChange(e,{col:t<0?0:t}),s.setXYAttributes(document.getElementById(e.id),e)}s.setHeightAndWidth(document.getElementById(e.id),e),s.panelCollection.push(document.getElementById(e.id)),s.setPanelPosition(document.getElementById(e.id),e.row,e.col),s.mainElement=document.getElementById(e.id),s.updatePanelLayout(document.getElementById(e.id),e),s.mainElement=null}),this.updatePanels(),this.updateCloneArrayObject(),this.isRenderComplete=!0,this.updateGridLines()}},i.prototype.getPersistData=function(){var e=["panels"];return this.addOnPersist(e)},i.prototype.mergePersistPanelData=function(e){var i=window.localStorage.getItem(this.getModuleName()+this.element.id);if(!t.isNullOrUndefined(i)&&""!==i||!t.isNullOrUndefined(e)){var s=t.isNullOrUndefined(e)?JSON.parse(i):e,n=Object.keys(s);this.isProtectedOnChange=!0;for(var a=0,l=n;a<l.length;a++){var r=l[a];"object"!=typeof t.getValue(r,this)||t.isNullOrUndefined(t.getValue(r,this))||Array.isArray(t.getValue(r,this))&&"panels"===r&&this.mergePanels(s[r],this[r])}this.isProtectedOnChange=!1}},i.prototype.mergePanels=function(e,i){for(var s=e,n=this,a=0;a<s.length;a++)!function(e){n.checkForIDValues(i);var a=i.filter(function(t){return t.id===s[e].id})[0];t.isNullOrUndefined(a)||(s[e]=t.extend(a,s[e],{},!0))}(a)},i.prototype.getModuleName=function(){return"DashboardLayout"},y([t.Property(!0)],i.prototype,"allowDragging",void 0),y([t.Property(!1)],i.prototype,"allowResizing",void 0),y([t.Property(!0)],i.prototype,"allowPushing",void 0),y([t.Property(!0)],i.prototype,"enableHtmlSanitizer",void 0),y([t.Property(!0)],i.prototype,"allowFloating",void 0),y([t.Property(1)],i.prototype,"cellAspectRatio",void 0),y([t.Property([5,5])],i.prototype,"cellSpacing",void 0),y([t.Property(1)],i.prototype,"columns",void 0),y([t.Property(!1)],i.prototype,"showGridLines",void 0),y([t.Property(null)],i.prototype,"draggableHandle",void 0),y([t.Property("en-US")],i.prototype,"locale",void 0),y([t.Property("max-width: 600px")],i.prototype,"mediaQuery",void 0),y([t.Collection([],x)],i.prototype,"panels",void 0),y([t.Property(["e-south-east"])],i.prototype,"resizableHandles",void 0),y([t.Event()],i.prototype,"change",void 0),y([t.Event()],i.prototype,"dragStart",void 0),y([t.Event()],i.prototype,"drag",void 0),y([t.Event()],i.prototype,"dragStop",void 0),y([t.Event()],i.prototype,"resizeStart",void 0),y([t.Event()],i.prototype,"resize",void 0),y([t.Event()],i.prototype,"resizeStop",void 0),y([t.Event()],i.prototype,"created",void 0),y([t.Event()],i.prototype,"destroyed",void 0),i=y([t.NotifyPropertyChanges],i)}(t.Component);return e.PaneProperties=v,e.Splitter=f,e.Panel=x,e.DashboardLayout=S,e}({},ej.base),this.ejs=ej;
|