UNPKG

@syncfusion/ej2-layouts

Version:

A package of Essential JS 2 layout pure CSS components such as card and avatar. The card is used as small container to show content in specific structure, whereas the avatars are icons, initials or figures representing particular person.

10 lines 137 kB
/*! * filename: ej2-layouts.min.js * version : 29.1.35 * Copyright Syncfusion Inc. 2001 - 2024. 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-static-pane",d="e-resize-handler",p="e-arrow-left",c="e-arrow-up",u="e-arrow-down",g="e-icon-hidden",m=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.needsID=!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.clearTemplate(),this.destroyPaneSettings(),this.allBars=[],this.allPanes=[],this.createSplitPane(this.element),this.addSeparator(this.element),this.getPanesDimensions(),this.setRTL(this.enableRtl),this.isCollapsed();else{var l=Object.keys(e.paneSettings),r=l.some(function(i){return!t.isNullOrUndefined(e.paneSettings[i].content)});if(this.isReact&&r){for(var o=0,h=0;h<this.paneSettings.length;h++)"function"==typeof this.paneSettings[h].content&&(o+=1);o===this.paneSettings.length&&this.clearTemplate()}for(var d=0;d<l.length;d++)for(var p=parseInt(Object.keys(e.paneSettings)[d],10),c=Object.keys(e.paneSettings[p]).length,u=0;u<c;u++){var g=Object.keys(e.paneSettings[p])[u];switch(g){case"content":var m=Object(e.paneSettings[p])[""+g];t.isNullOrUndefined(m)||(this.allPanes[p].innerHTML="",this.setTemplate(m,this.allPanes[p]));break;case"resizable":var f=Object(e.paneSettings[p])[""+g];this.resizableModel(p,f);break;case"collapsible":this.collapsibleModelUpdate(p);break;case"collapsed":e.paneSettings[p].collapsed?this.isCollapsed(p):this.collapsedOnchange(p);break;case"cssClass":this.setCssClass(this.allPanes[p],e.paneSettings[p].cssClass);break;case"size":var v=Object(e.paneSettings[p])[""+g];""===v||t.isNullOrUndefined(v)||this.updatePaneSize(v,p)}}}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&&(this.allPanes[s[r]].style.flexBasis=l+"px");this.allPanes[t].classList.add(h)},f.prototype.initializeValues=function(){this.allPanes=[],this.paneOrder=[],this.separatorOrder=[],this.allBars=[],this.previousCoordinates={},this.currentCoordinates={},this.updatePrePaneInPercentage=!1,this.updateNextPaneInPercentage=!1,this.panesDimensions=[],this.border=0,this.validDataAttributes=["data-size","data-min","data-max","data-collapsible","data-resizable","data-content","data-collapsed"],this.validElementAttributes=["data-orientation","data-width","data-height"],this.iconsDelay=300,this.templateElement=[],this.collapseFlag=!1,this.expandFlag=!0},f.prototype.preRender=function(){this.initializeValues(),this.onReportWindowSize=this.reportWindowSize.bind(this),this.onMouseMoveHandler=this.onMouseMove.bind(this),this.onMouseUpHandler=this.onMouseUp.bind(this),this.onTouchMoveHandler=this.onMouseMove.bind(this),this.onTouchEndHandler=this.onMouseUp.bind(this),this.wrapper=this.element.cloneNode(!0),this.wrapperParent=this.element.parentElement,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.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.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.previousPane.style.flexBasis.indexOf("p")>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.getMinInPixel(this.paneSettings[this.nextPaneIndex].min)<this.convertPercentageToPixel(l-1+"%")?(this.previousPane.style.flexBasis=a+1+"%",this.nextPane.style.flexBasis=l-1+"%"):(37===e.keyCode||38===e.keyCode)&&i>0&&this.getMinInPixel(this.paneSettings[this.prevPaneIndex].min)<this.convertPercentageToPixel(a-1+"%")&&(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.getMinInPixel(this.paneSettings[this.nextPaneIndex].min)<s+n?(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.getMinInPixel(this.paneSettings[this.prevPaneIndex].min)<i-n&&(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?(e.preventDefault(),this.checkPaneSize(e),this.triggerResizing(e)):13===e.keyCode&&this.paneSettings[i].collapsible&&document.activeElement.classList.contains(o)&&this.currentSeparator.classList.contains("e-split-bar-active")&&(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.getMinInPixel=function(e){if(t.isNullOrUndefined(e))return 0;var i=this.convertPixelToNumber(e.toString());return e.indexOf("%")>0&&(i=this.convertPercentageToPixel(e)),this.convertPixelToNumber(i.toString())},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.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("."+d,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("."+d,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("."+d,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,p):this.checkArrow(t,c),s="Horizontal"===this.orientation?this.checkArrow(t,"e-arrow-right"):this.checkArrow(t,u);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":u;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?p:c,lastBarArrow:"Vertical"===this.orientation?u:"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?"e-split-bar-horizontal":"e-split-bar-vertical",n=0;n<this.allBars.length;n++){var a=t.selectAll("."+s,this.element)[n],l=t.selectAll("."+d,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){var i,s;s="pane"===t?this.allPanes:this.allBars;for(var 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],[d,"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],[g]):t.addClass([s],[g]),t.isNullOrUndefined(this.paneSettings[e+1])||(this.paneSettings[e+1].collapsible?t.removeClass([i],[g]):t.addClass([i],[g])),t.isNullOrUndefined(this.paneSettings[e+1])||this.paneSettings[e+1].collapsible&&(this.paneSettings[e+1].collapsible?t.removeClass([i],[g]):t.addClass([i],[g])))},f.prototype.updateIconClass=function(){"Horizontal"===this.orientation?(this.leftArrow=p,this.rightArrow="e-arrow-right"):(this.leftArrow=c,this.rightArrow=u)},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",p,g]),t.addClass([s],["e-navigate-arrow","e-arrow-right",g]),t.addClass([i],[o,"e-split-bar-horizontal"]),i.style.width=a):(t.addClass([s],["e-navigate-arrow",u,g]),t.addClass([n],["e-navigate-arrow",c,g]),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","-1"),i.setAttribute("aria-hidden","true"),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){for(var i,s=this.allPanes.length,n=e.children,a=0;a<s;a++)if(a<s-1){if(i=this.createSeparator(a),t.setStyleAttribute(i,{order:2*a+1}),this.separatorOrder.push(2*a+1),n[a].parentNode.appendChild(i),this.currentSeparator=i,i.setAttribute("role","separator"),i.setAttribute("aria-valuenow",a.toString()),t.isNullOrUndefined(this.orientation)||i.setAttribute("aria-orientation",this.orientation.toLowerCase()),this.wireClickEvents(),!t.isNullOrUndefined(i))if(this.isResizable()){t.EventHandler.add(i,"mousedown",this.onMouseDown,this);var l="msie"===t.Browser.info.name?"pointerdown":"touchstart";t.EventHandler.add(i,l,this.onMouseDown,this),i.classList.add("e-resizable-split-bar"),this.updateResizablePanes(a)}else t.addClass([t.select("."+d,i)],"e-hide-handler")}else i&&t.addClass([i],"e-last-bar"),s>1&&this.updateResizablePanes(a);if("msie"===t.Browser.info.name)for(var r=this.element.querySelectorAll(".e-splitter .e-resize-handler"),a=0;a<r.length;a++){var o=t.isNullOrUndefined(this.separatorSize)?1:this.separatorSize;r[a].style.paddingLeft=o/2+"px",r[a].style.paddingRight=o/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"])})})},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(h),i-1===s&&this.element.querySelectorAll("."+h).length===i&&""===this.allPanes[s].style.flexBasis&&t.removeClass([this.allPanes[s]],h);i>0&&setTimeout(function(){e.updateSplitterSize(!0)},200)},f.prototype.updateSplitterSize=function(e){for(var i=0,s=[],n=0,a=this.element.children,l=0,r=a.length;l<r;l++)i+="Horizontal"===this.orientation?a[l].offsetWidth:a[l].offsetHeight;for(var o=0,r=this.allBars.length;o<r;o++)i+="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 d="Horizontal"===this.orientation?this.element.offsetWidth-(2*this.border+i):this.element.offsetHeight-(2*this.border+i),l=0,r=this.allPanes.length;l<r;l++)(""===this.allPanes[l].innerText?this.paneSettings[l].size&&""===this.allPanes[l].innerText:this.paneSettings[l].size||""===this.allPanes[l].innerText)||(s[n]=l,n++);for(var p=d/s.length,o=0,r=s.length;o<r;o++)""!==this.allPanes[s[o]].style.flexBasis&&(this.allPanes[s[o]].style.flexBasis="Horizontal"===this.orientation?this.allPanes[s[o]].offsetWidth+p+"px":this.allPanes[s[o]].offsetHeight+p+"px");if(2===this.allPanes.length&&e)for(var c=this.allPanes.length,u=void 0,g=void 0,m=void 0,f=void 0,l=0;l<c;l++)if(!t.isNullOrUndefined(this.paneSettings[l].min)&&(g=this.convertPixelToNumber(this.paneSettings[l].min.toString()),this.paneSettings[l].min.indexOf("%")>0&&(g=this.convertPercentageToPixel(this.paneSettings[l].min)),u=this.convertPixelToNumber(g.toString()),("Horizontal"===this.orientation?this.allPanes[l].offsetWidth:this.allPanes[l].offsetHeight)<u)){0===l?(m=this.allPanes[l],f=this.allPanes[l+1]):(m=this.allPanes[l],f=this.allPanes[l-1]);var v=u-("Horizontal"===this.orientation?this.allPanes[l].offsetWidth:this.allPanes[l].offsetHeight),y=m.style.flexBasis.indexOf("%")>-1,P="Horizontal"===this.orientation?m.offsetWidth:m.offsetHeight;!t.isNullOrUndefined(m)&&""!==m.style.flexBasis&&m.classList.contains(h)&&(m.style.flexBasis=y?this.convertPixelToPercentage(P+v)+"%":P+v+"px");var C="Horizontal"===this.orientation?f.offsetWidth:f.offsetHeight;t.isNullOrUndefined(f)||""===f.style.flexBasis||f.classList.contains(h)||(f.style.flexBasis=f.style.flexBasis.indexOf("%")>-1?this.convertPixelToPercentage(C-v)+"%":C-v+"px")}},f.prototype.wireResizeEvents=function(){document.addEventListener("mousemove",this.onMouseMoveHandler,!0),document.addEventListener("mouseup",this.onMouseUpHandler,!0);var e="msie"===t.Browser.info.name?"pointermove":"touchmove",i="msie"===t.Browser.info.name?"pointerup":"touchend";document.addEventListener(e,this.onTouchMoveHandler,!0),document.addEventListener(i,this.onTouchEndHandler,!0)},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";document.removeEventListener("mousemove",this.onMouseMoveHandler,!0),document.removeEventListener("mouseup",this.onMouseUpHandler,!0),document.removeEventListener(e,this.onTouchMoveHandler,!0),document.removeEventListener(i,this.onTouchEndHandler,!0)},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")}this.splitterDetails(e);var s=e.target;(s.classList.contains(p)||s.classList.contains("e-arrow-right")||s.classList.contains(u)||s.classList.contains(c))&&(this.nextPane.classList.contains("e-pane-hidden")||this.previousPane.classList.contains("e-pane-hidden")?this.expandAction(e):this.collapseAction(e),this.updateSplitterSize())},f.prototype.expandAction=function(e){var t=this,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.getIcon=function(e){return e.target.className.split(" ").filter(function(e){return"e-navigate-arrow"!==e&&e!==g})[0]},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(h)&&!this.nextPane.classList.contains("e-collapsed")&&!this.nextPane.classList.contains("e-expanded")&&this.nextPane.nextElementSibling.classList.contains(a)&&!this.nextPane.nextElementSibling.classList.contains(h)&&!(i===this.allPanes.length-2),n=["e-collapsed","e-pane-hidden"],l=this.getIcon(e),r=l===p||l===c,o=r?this.nextPane:this.previousPane,d=r?this.previousPane:this.nextPane,u=r?this.nextPaneIndex:this.prevPaneIndex;t.removeClass([o],n),o.setAttribute("aria-hidden","false");var g=this.element.querySelectorAll(".e-collapsed").length;if(g>0)d.classList.contains("e-collapsed")||(t.addClass([d],"e-expanded"),d.setAttribute("aria-expanded","true"));else if(0===g)for(var m=0;m<this.allPanes.length;m++)this.allPanes[m].classList.contains("e-collapsed")||(t.removeClass([this.allPanes[m]],"e-expanded"),this.allPanes[m].setAttribute("aria-expanded","false"));this.expandFlag&&this.updatePaneSettings(u,!1),this.updateIconsOnExpand(e,l),this.updateFlexGrow(),s&&(this.previousPane.classList.remove("e-expanded"),this.previousPane.setAttribute("aria-expanded","false"),this.previousPane.style.flexGrow="")},f.prototype.updateFlexGrow=function(){for(var e=0,t=0;t<this.element.children.length;t++)this.element.children[t].classList.contains("e-collapsed")&&(e+=1);for(var i=e===this.allPanes.length-2,s=this.allPanes,n=0;n<s.length;n++)s[n].style.flexGrow="",i&&this.allPanes[n].classList.contains("e-collapsed")&&this.paneSettings[n].size&&n!==this.allPanes.length-1&&(s[n].style.flexGrow=""),s[n].classList.contains("e-expanded")?s[n].style.flexGrow="1":s[n].classList.contains("e-collapsed")&&(s[n].style.flexGrow="0")},f.prototype.hideTargetBarIcon=function(e,i){t.addClass([t.select("."+i,e)],g)},f.prototype.showTargetBarIcon=function(e,i){t.removeClass([t.select("."+i,e)],g)},f.prototype.updateIconsOnCollapse=function(e,i){this.splitterProperty();var s=this.arrow,n=this.currentBarIndex===this.allBars.length-1?this.prevBar:this.nextBar,a=this.currentBarIndex===this.allBars.length-1?this.currentBarIndex-1:this.currentBarIndex+1;if(e.target.classList.contains(g))this.resizableModel(this.currentBarIndex,!1),t.isNullOrUndefined(n)||this.resizableModel(a,!0),this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible?(t.isNullOrUndefined(n)||this.hideTargetBarIcon(n,s),this.showTargetBarIcon(this.currentSeparator,s)):(t.isNullOrUndefined(n)||this.hideTargetBarIcon(n,i),this.hideTargetBarIcon(this.currentSeparator,s));else if(this.splitInstance.prevPaneCollapsed||this.splitInstance.nextPaneCollapsed)if(this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible){if(this.resizableModel(this.currentBarIndex,!1),this.hideTargetBarIcon(this.currentSeparator,i),!t.isNullOrUndefined(n)){var l=a,r=a+1,o=this.getCollapseCount(l,r);this.paneSettings[l].collapsible&&this.paneSettings[r].collapsible&&(1===o?(this.hideTargetBarIcon(n,s),this.resizableModel(a,!1)):2===o&&(this.hideBarIcons(n),this.resizableModel(a,!1)),this.paneSettings[l].collapsible&&this.paneSettings[r].collapsible||this.hideTargetBarIcon(n,i))}}else this.showTargetBarIcon(this.currentSeparator,s),this.hideTargetBarIcon(this.currentSeparator,i),this.resizableModel(this.currentBarIndex,!1)},f.prototype.collapseAction=function(e){var t=this,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(h)&&!this.previousPane.classList.contains("e-collapsed")&&!this.nextPane.classList.contains("e-collapsed")&&this.nextPane.nextElementSibling.classList.contains(a)&&!this.nextPane.nextElementSibling.classList.contains(h)&&!this.nextPane.nextElementSibling.classList.contains("e-collapsed")&&!(i===this.allPanes.length-2)||this.nextPane.classList.contains("e-collapsed")&&!this.previousPane.classList.contains(h)&&this.nextPane.classList.contains(h),n=["e-collapsed","e-pane-hidden"],l=this.getIcon(e),r=l===p||l===c,o=r?this.previousPane:this.nextPane,d=r?this.nextPane:this.previousPane,u=r?this.prevPaneIndex:this.nextPaneIndex;if(t.removeClass([o],"e-expanded"),o.setAttribute("aria-expanded","false"),t.addClass([o],n),o.setAttribute("aria-hidden","true"),""===o.style.flexBasis)t.addClass([d],"e-expanded"),d.setAttribute("aria-expanded","true");else{for(var g=!0,m=0;m<this.allPanes.length;m++)if(!this.allPanes[m].classList.contains("e-collapsed")&&""===this.allPanes[m].style.flexBasis&&!this.allPanes[m].classList.contains("e-collapsed")&&!this.allPanes[m].classList.contains("e-expanded")){t.addClass([this.allPanes[m]],"e-expanded"),this.allPanes[m].setAttribute("aria-expanded","true"),g=!1;break}g&&(t.addClass([d],"e-expanded"),d.setAttribute("aria-expanded","true"))}this.collapseFlag||this.updatePaneSettings(u,!0),this.updateIconsOnCollapse(e,l),this.updateFlexGrow(),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(h)},f.prototype.beforeAction=function(e){return{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.showCurrentBarIcons=function(){t.removeClass([t.select("."+this.arrow,this.currentSeparator)],g)},f.prototype.hideBarIcons=function(e){t.addClass([t.select("."+this.arrow,e)],g)},f.prototype.getCollapseCount=function(e,t){var i=0;return this.allPanes[e].classList.contains("e-collapsed")&&(i+=1),this.allPanes[t].classList.contains("e-collapsed")&&(i+=1),i},f.prototype.checkResizableProp=function(e,t){return!(!this.paneSettings[e].resizable||!this.paneSettings[t].resizable)},f.prototype.updateIconsOnExpand=function(e,i){this.splitterProperty();var s=this.arrow,n=this.currentBarIndex===this.allBars.length-1?this.prevBar:this.nextBar,a=this.currentBarIndex===this.allBars.length-1?this.currentBarIndex-1:this.currentBarIndex+1;if(e.target.classList.contains(g))this.paneSettings[this.prevPaneIndex].collapsible||this.paneSettings[this.nextPaneIndex].collapsible||this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)&&this.resizableModel(this.currentBarIndex,!0);else if(!this.splitInstance.prevPaneCollapsed&&!this.splitInstance.nextPaneCollapsed)if(this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible){if(this.showCurrentBarIcons(),this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)?this.resizableModel(this.currentBarIndex,!0):this.resizableModel(this.currentBarIndex,!1),!t.isNullOrUndefined(n)){var l=a,r=a+1,o=this.getCollapseCount(l,r);this.paneSettings[l].collapsible&&this.paneSettings[r].collapsible&&(0===o?(this.showTargetBarIcon(n,i),this.showTargetBarIcon(n,s),this.checkResizableProp(l,r)&&this.resizableModel(a,!0)):1===o&&(this.hideBarIcons(n),this.allPanes[l].classList.contains("e-expanded")||this.allPanes[r].classList.contains("e-expanded")?this.showTargetBarIcon(n,s):this.showTargetBarIcon(n,i),this.resizableModel(a,!1)))}}else this.hideTargetBarIcon(this.currentSeparator,i),this.showTargetBarIcon(this.currentSeparator,s),this.splitInstance.prevPaneCollapsed||this.splitInstance.nextPaneCollapsed?this.resizableModel(this.currentBarIndex,!1):this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)&&this.resizableModel(this.currentBarIndex,!0)},f.prototype.afterAction=function(e){return{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 t=[].slice.call(this.allBars);return(t=this.enableReversePanes?t.reverse():t).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(p)?"e-arrow-right":p:this.arrow=e.target.classList.contains(c)?u:c,this.updateCurrentSeparator(e.target),this.currentIndex(e),this.updateBars(this.currentBarIndex),this.getPaneDetails()},f.prototype.triggerResizing=function(e){var t={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",t)},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={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=e.toString(),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+window.scrollX: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 i,s=this.validateDraggedPosition(this.getSeparatorPosition(e),this.prePaneDimenson,this.nextPaneDimension);if(this.getBorder(),i="Horizontal"===this.orientation?this.element.getBoundingClientRect().left+s-this.currentSeparator.getBoundingClientRect().left+this.border:this.element.getBoundingClientRect().top+s-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.previousPaneHeightWidth="string"==typeof this.previousPaneHeightWidth&&this.previousPaneHeightWidth.indexOf("p")>-1?this.convertPixelToNumber(this.previousPaneHeightWidth):parseInt(this.previousPaneHeightWidth,10),this.prevPaneCurrentWidth=i+this.previousPaneHeightWidth,this.nextPaneCurrentWidth=this.nextPaneHeightWidth-i,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 n=this.totalWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth);this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+n}this.calculateCurrentDimensions(),this.addStaticPaneClass();for(var a=0,l=0;l<this.paneSettings.length;l++)""===this.paneSettings[l].size?a+=1:""!==this.allPanes[l].style.flexBasis&&(this.paneSettings[l].size=this.allPanes[l].style.flexBasis);var r=a===this.allPanes.length;if(""!==this.previousPane.style.flexBasis||""!==this.nextPane.style.flexBasis||r)r?(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,t.addClass([this.previousPane],h),this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,t.addClass([this.nextPane],h)):(""!==this.previousPane.style.flexBasis&&this.previousPane.classList.contains(h)&&(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth),""!==this.nextPane.style.flexBasis&&this.nextPane.classList.contains(h)&&(this.nextPane.style.flexBasis=this.nextPaneCurrentWidth));else{var o=this.allPanes.length%this.allBars.length;this.prevPaneIndex===o?(this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,t.addClass([this.nextPane],h)):this.nextPaneIndex===o?(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,t.addClass([this.previousPane],h)):(this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,t.addClass([this.nextPane],h))}var d=""!==this.previousPane.style.flexBasis&&""!==this.nextPane.style.flexBasis;this.allPanes.length>2||!d||this.updateSplitterSize()}},f.prototype.validateMinRange=function(e,i){var s,n,a=null,l=0;return t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].min)||(a=this.paneSettings[e].min.toString()),t.isNullOrUndefined(a)||(a.indexOf("%")>0&&(a=this.convertPercentageToPixel(a).toString()),i<(s=this.convertPixelToNumber(a))&&(l=i-s<=0?0:i-s,this.totalWidth=this.totalWidth-l,this.totalPercent=this.convertPixelToPercentage(this.totalWidth),n=s)),t.isNullOrUndefined(n)?i:n},f.prototype.validateMaxRange=function(e,i){var s,n,a=null;return t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].max)||(a=this.paneSettings[e].max.toString()),t.isNullOrUndefined(a)||(a.indexOf("%")>0&&(a=this.convertPercentageToPixel(a).toString()),i>(s=this.convertPixelToNumber(a))&&(this.totalWidth=this.totalWidth-(i-s),this.totalPercent=this.convertPixelToPercentage(this.totalWidth),n=s)),t.isNullOrUndefined(n)?i:n},f.prototype.validateMinMaxValues=function(){this.prevPaneCurrentWidth=this.validateMinRange(this.prevPaneIndex,this.prevPaneCurrentWidth),this.nextPaneCurrentWidth=this.validateMinRange(this.nextPaneIndex,this.nextPaneCurrentWidth),this.prevPaneCurrentWidth=this.validateMaxRange(this.prevPaneIndex,this.prevPaneCurrentWidth),this.nextPaneCurrentWidth=this.validateMaxRange(this.nextPaneIndex,this.nextPaneCurrentWidth)},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=t