/*!@license
 * Infragistics.Web.ClientUI Splitter 21.2.12
 *
 * Copyright (c) 2011-2022 Infragistics Inc.
 *
 * http://www.infragistics.com/
 *
 * Depends on:
 *  jquery.js
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *	infragistics.util.js
 *  infragistics.util.jquery.js
 *  infragistics.ui.widget.js
 *	infragistics.ui.splitter-en.js
 */
"use strict";(function(factory){if(typeof define==="function"&&define.amd){define(["./infragistics.ui.widget"],factory)}else{return factory(jQuery)}})(function($){/*!@license
* Infragistics.Web.ClientUI Splitter localization resources 21.2.12
*
* Copyright (c) 2011-2022 Infragistics Inc.
*
* http://www.infragistics.com/
*
*/
(function($){$.ig=$.ig||{};$.ig.Splitter=$.ig.Splitter||{};$.ig.locale=$.ig.locale||{};$.ig.locale.en=$.ig.locale.en||{};$.ig.locale.en.Splitter={errorPanels:"The number of panels have to be no more than two.",errorSettingOption:"Error setting option."};$.ig.Splitter.locale=$.ig.Splitter.locale||$.ig.locale.en.Splitter;return $.ig.locale.en.Splitter})($);$.widget("ui.igSplitter",$.ui.igWidget,{_const:{orientations:{horizontal:{size:"height",oppositeSize:"width",outerSize:"outerHeight",dimention:"top",start:"_startY",mouse:"_mouseStartY",page:"pageY",keyboard:["UP","DOWN"]},vertical:{size:"width",oppositeSize:"height",outerSize:"outerWidth",dimention:"left",start:"_startX",mouse:"_mouseStartX",page:"pageX",keyboard:["LEFT","RIGHT"]}},properties:["max","_max","min","_min","size","collapsed","collapsible","resizable"],step:10,touchEvents:{mousedown:"touchstart",mouseup:"touchend",mousemove:"touchmove",mouseenter:"",mouseleave:"",focus:"focus",blur:"blur",keydown:"keydown"}},css:{splitter:"ui-igsplitter ui-widget ui-widget-content",verticalPanel:"ui-igsplitter-panel-vertical ui-widget-content",horizontalPanel:"ui-igsplitter-panel-horizontal ui-widget-content",bar:"ui-igsplitter-splitbar",barNormal:"ui-igsplitter-splitbar-default ui-state-default",barCollapsed:"ui-igsplitter-splitbar-collapsed",barHover:"ui-igsplitter-splitbar-hover ui-state-hover",barActive:"ui-igsplitter-splitbar-focus ui-state-focus",barInvalid:"ui-igsplitter-splitbar-invalid",resizeHandler:"ui-igsplitter-splitbar-resize-handler",resizeHandlerInner:"ui-igsplitter-splitbar-resize-handler-inner",verticalCollapseButtonLeftExpanded:"ui-igsplitter-collapse-button-vertical-left",verticalCollapseButtonLeftExpandedIcon:"ui-icon ui-icon-triangle-1-w",verticalCollapseButtonLeftCollapsed:"ui-igsplitter-collapse-button-vertical-left",verticalCollapseButtonLeftCollapsedIcon:"ui-icon ui-icon-triangle-1-e",verticalCollapseButtonRightExpanded:"ui-igsplitter-collapse-button-vertical-right",verticalCollapseButtonRightExpandedIcon:"ui-icon ui-icon-triangle-1-e",verticalCollapseButtonRightCollapsed:"ui-igsplitter-collapse-button-vertical-right",verticalCollapseButtonRightCollapsedIcon:"ui-icon ui-icon-triangle-1-w",horizontalCollapseButtonLeftExpanded:"ui-igsplitter-collapse-button-horizontal-left",horizontalCollapseButtonLeftExpandedIcon:"ui-icon ui-icon-triangle-1-n",horizontalCollapseButtonLeftCollapsed:"ui-igsplitter-collapse-button-horizontal-left",horizontalCollapseButtonLeftCollapsedIcon:"ui-icon ui-icon-triangle-1-s",horizontalCollapseButtonRightExpanded:"ui-igsplitter-collapse-button-horizontal-right",horizontalCollapseButtonRightExpandedIcon:"ui-icon ui-icon-triangle-1-s",horizontalCollapseButtonRightCollapsed:"ui-igsplitter-collapse-button-horizontal-right",horizontalCollapseButtonRightCollapsedIcon:"ui-icon ui-icon-triangle-1-n",collapseButtonDefault:"ui-state-default",collapseButtonSingle:"ui-igsplitter-collapse-single-button",collapseButtonPressed:"ui-igsplitter-collapse-button-pressed",collapseButtonHover:"ui-igsplitter-collapse-button-hover ui-state-hover",noScroll:"ui-igsplitter-no-scroll"},events:{collapsed:"collapsed",expanded:"expanded",resizeStarted:"resizeStarted",resizing:"resizing",resizeEnded:"resizeEnded",layoutRefreshing:"layoutRefreshing",layoutRefreshed:"layoutRefreshed"},options:{width:null,height:null,orientation:"vertical",panels:[{size:null,min:null,max:null,resizable:false,collapsed:false,collapsible:false}],dragDelta:3,resizeOtherSplitters:true},widget:function(){return this.element},_createWidget:function(){this.options.panels=[];this._opt={eventHandlers:{},defaultPanelSize:"50%",defaultPanelMaxSize:9007199254740992,calculateSizeCloneObject:{element:null,panels:[{options:{},element:null},{options:{},element:null}],bar:{element:null}}};this._superApply(arguments)},_create:function(){var splitters,length=$(this.element.children("div")).length;this._htmlMarkup=this.element.html();if(this.options.panels.length>2||length>2){throw new Error(this._getLocaleValue("errorPanels"))}if(length===1){this.element.append("<div/>")}else if(length===0){this.element.append("<div/>");this.element.append("<div/>")}this._panels=[];this._splitter={};splitters=$.data(document.body,"ig-splitters")||[];splitters.push(this.element);$.data(document.body,"ig-splitters",splitters);if(this.options.width){this.element.css("width",this.options.width)}if(this.options.height){this.element.css("height",this.options.height)}this._opt.barMouseDown=false;this._render();this._removeClasses();this._addClasses();this._removeEventHandlers();this._addEventHandlers();this._panelsLayout({isInit:true})},_setOption:function(option,value){var oldWidth,oldHeight;if(this.options[option]===value){return}this._super(option,value);switch(option){case"width":oldWidth=this.element.width();this.element.css("width",value);if(this.options.orientation==="vertical"){this._setPanelsNewWidth(value,oldWidth)}this._panelsLayout();break;case"height":oldHeight=this.element.height();this.element.css("height",value);if(this.options.orientation==="horizontal"){this._setPanelsNewHeight(value,oldHeight)}this._panelsLayout();break;case"orientation":case"panels":throw new Error(this._getLocaleValue("errorSettingOption"));default:break}},_setPanelsNewWidth:function(newWidth,oldWidth){var secondPanelRatio=this.secondPanel().width()/oldWidth;this.setSecondPanelSize(newWidth*secondPanelRatio)},_setPanelsNewHeight:function(newHeight,oldHeight){var secondPanelRatio=this.secondPanel().height()/oldHeight;this.setSecondPanelSize(newHeight*secondPanelRatio)},_render:function(){var panels=$(this.element.children("div")),panel,self=this,reducedSize,defaultSize=0,j,elementSize;reducedSize=this._reducedSize();if(this.options[this._getOrientation("size")]){elementSize=this._getOrientation("size")==="width"?this.element.width():this.element.height();defaultSize=elementSize-reducedSize.size}else{defaultSize=this._getSize(this._getOrientation("size"))-reducedSize.size}if(panels.length-reducedSize.length!==0){defaultSize=Math.floor(defaultSize/(panels.length-reducedSize.length))}if(this._panels.length<1){panels.each(function(i,element){panel=$(element);panel.options={max:self._opt.defaultPanelMaxSize,_max:"100%",min:0,_min:"0",collapsible:false,resizable:true,collapsed:false,size:panel[self._getOrientation("size")]()};for(j=0;j<self._const.properties.length;j++){if(self.options.panels[i]&&self.options.panels[i][self._const.properties[j]]!==undefined&&self.options.panels[i][self._const.properties[j]]!==null){panel.options[self._const.properties[j]]=self.options.panels[i][self._const.properties[j]]}else{if(self._const.properties[j]==="size"){if(panel[0].style[self._getOrientation("size")]!=="auto"&&panel[0].style[self._getOrientation("size")]!==""){panel.options.size=panel[self._getOrientation("size")]()}else{panel.options.size=defaultSize}}}}self._panels.push(panel)});this._createSplitter()}},_reducedSize:function(){var i,reducedSize={size:0,length:0},size=0;for(i=0;i<this.options.panels.length;i++){size=0;if(this.options.panels[i].size!==undefined){if(/%/.test(this.options.panels[i].size)){this.options.panels[i].size=this.options.panels[i].size.replace("%","")*this._getSize(this._getOrientation("size"))/100;this._isPercentLayout=true}if(/px/.test(this.options.panels[i].size)){this.options.panels[i].size=parseInt(this.options.panels[i].size,10)}size=this.options.panels[i].size;reducedSize.length+=1}if(this.options.panels[i].min!==undefined){if(/px/.test(this.options.panels[i].min)){this.options.panels[i].min=parseInt(this.options.panels[i].min,10)}if(/%/.test(this.options.panels[i].min)){this.options.panels[i]._min=this.options.panels[i].min;this.options.panels[i].min=this.options.panels[i].min.replace("%","")*this._getSize(this._getOrientation("size"))/100}}if(this.options.panels[i].max!==undefined){if(/px/.test(this.options.panels[i].max)){this.options.panels[i].max=parseInt(this.options.panels[i].max,10)}if(/%/.test(this.options.panels[i].max)){this.options.panels[i]._max=this.options.panels[i].max;this.options.panels[i].max=this.options.panels[i].max.replace("%","")*this._getSize(this._getOrientation("size"))/100}}reducedSize.size+=size}return reducedSize},_getSize:function(size){var borderWidth,boxSizing=this.element.css("box-sizing"),value;if(window.getComputedStyle!==undefined){value=parseInt(window.getComputedStyle(this.element[0])[size],10);var _getBorderWidth=function(element,orientation){var computedStyle=window.getComputedStyle(element[0]);if(orientation==="horizontal"){var leftBorder=isNaN(parseInt(computedStyle.borderLeftWidth,10))?0:parseInt(computedStyle.borderLeftWidth,10);var rightBorder=isNaN(parseInt(computedStyle.borderRightWidth,10))?0:parseInt(computedStyle.borderRightWidth,10);return Math.max(leftBorder,rightBorder)}else{var topBorder=isNaN(parseInt(computedStyle.borderTopWidth,10))?0:parseInt(computedStyle.borderTopWidth,10);var bottomBorder=isNaN(parseInt(computedStyle.borderBottomWidth,10))?0:parseInt(computedStyle.borderBottomWidth,10);return Math.max(topBorder,bottomBorder)}};if(boxSizing==="border-box"){if($.ig.util.isChrome&&$.ig.util.isChrome.webstore){borderWidth=this.element.css("border-width")===""?0:this.element.css("border-width");borderWidth=parseInt(borderWidth,10)}else{borderWidth=_getBorderWidth(this.element,this.options.orientation)}value-=borderWidth*2;return value}return value}return this.element[size]()},_getOrientation:function(property){return this._const.orientations[this.options.orientation][property]},_getEvent:function(event){if(this._isTouch()){return event+" "+this._const.touchEvents[event]}return event},_isTouch:function(event){var isTouch=$.ig.util.isTouch;if(event){isTouch=isTouch&&event.originalEvent.touches}return isTouch},_createSplitter:function(){var collapseButtons=$("<div><span></span></div><div><span></span></div>"),bar=$("<div></div>").attr("tabindex",0),div;this._splitter={left:this._panels[0],right:this._panels[1]};bar.insertAfter(this._panels[0]);this._splitter.bar=bar;this._splitter.bar.append(collapseButtons);div=$("<div/>").appendTo(this._splitter.bar);$("<span></span>")[this._getOrientation("size")](this._splitter.bar[this._getOrientation("size")]).attr("title","").appendTo(div)},_removeClasses:function(){var buttonLeft,buttonRight,resizeHandler,i;this.element.removeClass(this.css.splitter);if(!this._splitter&&!this._panels){return}for(i=0;i<this._panels.length;i++){this._panels[i].removeClass(this.css[this.options.orientation+"Panel"])}this._splitter.bar.removeClass(this.css.bar+"-"+this.options.orientation);this._splitter.bar.removeClass(this.css.barNormal);this._splitter.bar.removeClass(this.css.barCollapsed);buttonLeft=$(this._splitter.bar.children()[0]);buttonRight=$(this._splitter.bar.children()[1]);buttonLeft.removeClass(this.css[this.options.orientation+"CollapseButtonLeftExpanded"]);buttonRight.removeClass(this.css[this.options.orientation+"CollapseButtonRightExpanded"]);buttonLeft.removeClass(this.css.collapseButtonDefault);buttonRight.removeClass(this.css.collapseButtonDefault);resizeHandler=$(this._splitter.bar.children()[2]);resizeHandler.removeClass(this.css.resizeHandler+"-"+this.options.orientation);$(resizeHandler.children()[0]).removeClass(this.css.resizeHandlerInner+"-"+this.options.orientation)},_addClasses:function(){var buttonLeft,buttonRight,i,resizeHandler;this.element.addClass(this.css.splitter);for(i=0;i<this._panels.length;i++){this._panels[i].addClass(this.css[this.options.orientation+"Panel"])}this._splitter.bar.addClass(this.css.bar+"-"+this.options.orientation);this._splitter.bar.addClass(this.css.barNormal);if(this._panels[0].options.collapsed||this._panels[1].options.collapsed){this._splitter.bar.addClass(this.css.barCollapsed)}buttonLeft=$(this._splitter.bar.children()[0]);buttonRight=$(this._splitter.bar.children()[1]);buttonLeft.addClass(this.css[this.options.orientation+"CollapseButtonLeftExpanded"]);$(buttonLeft.children()).addClass(this.css[this.options.orientation+"CollapseButtonLeftExpandedIcon"]);buttonRight.addClass(this.css[this.options.orientation+"CollapseButtonRightExpanded"]);$(buttonRight.children()).addClass(this.css[this.options.orientation+"CollapseButtonRightExpandedIcon"]);resizeHandler=$(this._splitter.bar.children()[2]);resizeHandler.addClass(this.css.resizeHandler+"-"+this.options.orientation);$(resizeHandler.children()[0]).addClass(this.css.resizeHandlerInner+"-"+this.options.orientation);if(!this._panels[0].options.collapsible){buttonLeft.hide();buttonRight.addClass(this.css.collapseButtonSingle)}if(!this._panels[1].options.collapsible){buttonRight.hide();buttonLeft.addClass(this.css.collapseButtonSingle)}buttonLeft.addClass(this.css.collapseButtonDefault);buttonRight.addClass(this.css.collapseButtonDefault);if(this.options.disabled){this.options.disabled=false;this._setOption("disabled",true)}},_removeEventHandlers:function(){if(!this._splitter){return}$(this._splitter.bar).unbind(this._getEvent("focus"),this._getEvent("blur"),this._getEvent("keydown"));$(this._splitter.bar.children()[0]).unbind(this._getEvent("mousedown"));$(this._splitter.bar.children()[1]).unbind(this._getEvent("mousedown"));if(!this._isTouch()){$(this._splitter.bar).unbind(this._getEvent("mouseenter"),this._getEvent("mouseleave"));$(this._splitter.bar.children()[0]).unbind(this._getEvent("mouseenter"),this._getEvent("mouseleave"));$(this._splitter.bar.children()[1]).unbind(this._getEvent("mouseenter"),this._getEvent("mouseleave"))}},_addEventHandlers:function(){var self=this,options=this.options;self.autoResize=true;this._opt.eventHandlers.documentMouseUp=function(){if(options.disabled){return}self.autoResize=false;self._stopDrag(self);self.autoResize=true;self._lastMove=null;self._opt.barMouseDown=false};this._opt.eventHandlers.documentMouseMove=function(ev){if(options.disabled){return}var noCancel=true;self._currentMove=self._isTouch(ev)?ev.originalEvent.touches[0][self._getOrientation("page")]:ev[self._getOrientation("page")];if(self._capturedElement&&self._isDragging()&&!self._isDrag){self._triggerResizeStarted();self._isDrag=true}if(self._capturedElement&&self._isDragging()){noCancel=self._triggerResizing()}if(noCancel&&self._isDragging()){self._performDrag(self,ev)}else{return false}};this._opt.eventHandlers.windowResize=function(){var noCancel=self._triggerLayoutRefreshing();if(noCancel){self._panelsLayout({isWindowResize:true});self._triggerLayoutRefreshed()}};$(document).bind(this._getEvent("mouseup")+"."+this.element.attr("id"),this._opt.eventHandlers.documentMouseUp).bind(this._getEvent("mousemove")+"."+this.element.attr("id"),this._opt.eventHandlers.documentMouseMove);$(window).bind("resize."+this.element.attr("id"),this._opt.eventHandlers.windowResize);this._addBarHandlers();this._addCollapseButtonHandlers($(this._splitter.bar.children()[0]),0);this._addCollapseButtonHandlers($(this._splitter.bar.children()[1]),1)},_isDragging:function(){if(this.element.find("iframe").length){return true}return Math.abs(this._currentMove-this._lastMove)>this.options.dragDelta},_addBarHandlers:function(){var self=this,splitter=this._splitter,options=this.options;splitter.bar.bind(this._getEvent("mousedown"),{self:this},this._startDrag).bind(this._getEvent("mousedown"),function(){if(options.disabled){return}self._opt.barMouseDown=true});this._splitter.bar.find("."+this.css.resizeHandler+"-"+this.options.orientation).bind(this._getEvent("mousedown"),{self:this},this._startDrag);splitter.bar.bind(this._getEvent("keydown"),{self:this},this._kbNavigation);if(!this._isTouch()){splitter.bar.bind(this._getEvent("mouseenter"),function(){if(options.disabled){return}$(this).addClass(self.css.barHover)});splitter.bar.bind(this._getEvent("mouseleave"),function(){if(options.disabled){return}$(this).removeClass(self.css.barHover)})}splitter.bar.bind(this._getEvent("focus"),function(){if(options.disabled){return}$(this).addClass(self.css.barActive)});splitter.bar.bind(this._getEvent("blur"),function(){if(options.disabled){return}$(this).removeClass(self.css.barActive)})},_kbNavigation:function(event){var splitter=event.data.self,noCancel=true;if(splitter.options.disabled){return}if(event.keyCode===$.ui.keyCode[splitter._getOrientation("keyboard")[0]]){if(event.ctrlKey){splitter._stopDrag(splitter,true,true);if(splitter._panels[1].options.collapsed){splitter.expandAt(1)}else if(!splitter._panels[0].options.collapsed){splitter.collapseAt(0)}}else{splitter._startDrag(event);splitter._kbMove-=splitter._kbLockRight?0:splitter._getStep();if(splitter._capturedElement&&!splitter._isDrag){splitter._triggerResizeStarted();splitter._isDrag=true}if(splitter._capturedElement){noCancel=splitter._triggerResizing()}if(noCancel){splitter._performDrag(splitter,event)}else{return false}if(splitter._capturedElement&&splitter._capturedElement.hasClass(splitter.css.barInvalid)){splitter._kbLockRight=true;splitter._kbLockLeft=false}else{splitter._kbLockRight=false;splitter._kbLockLeft=false}}event.preventDefault()}else if(event.keyCode===$.ui.keyCode[splitter._getOrientation("keyboard")[1]]){if(event.ctrlKey){splitter._stopDrag(splitter,true,true);if(splitter._panels[0].options.collapsed){splitter.expandAt(0)}else if(!splitter._panels[1].options.collapsed){splitter.collapseAt(1)}}else{splitter._startDrag(event);splitter._kbMove+=splitter._kbLockLeft?0:splitter._getStep();if(splitter._capturedElement&&!splitter._isDrag){splitter._triggerResizeStarted();splitter._isDrag=true}if(splitter._capturedElement){noCancel=splitter._triggerResizing()}if(noCancel){splitter._performDrag(splitter,event)}else{return false}if(splitter._capturedElement&&splitter._capturedElement.hasClass(splitter.css.barInvalid)){splitter._kbLockRight=false;splitter._kbLockLeft=true}else{splitter._kbLockRight=false;splitter._kbLockLeft=false}}event.preventDefault()}else if(event.keyCode===$.ui.keyCode.ENTER||event.keyCode===$.ui.keyCode.SPACE){splitter._stopDrag(splitter,false,true);event.preventDefault()}else if(event.keyCode===$.ui.keyCode.ESCAPE){splitter._stopDrag(splitter,true)}else if(event.keyCode===$.ui.keyCode.TAB){splitter._stopDrag(splitter,false,true)}},_startDrag:function(event){var left,right,capturedElementOffset,splitter=event.data.self;if(splitter.options.disabled){return}splitter._splitter.bar.focus();splitter._resizeArea=splitter._splitter;if(splitter._resizeArea!==null){if((splitter._resizeArea.left.options.resizable===undefined||splitter._resizeArea.left.options.resizable)&&(splitter._resizeArea.right.options.resizable===undefined||splitter._resizeArea.right.options.resizable)){left=splitter._resizeArea.left;right=splitter._resizeArea.right;if(!left.options.collapsed&&!right.options.collapsed&&!(right.options.max<=right[splitter._getOrientation("outerSize")]()&&left.options.max<=left[splitter._getOrientation("outerSize")]())){if(!splitter._capturedElement){splitter._lastMove=splitter._isTouch(event)?event.originalEvent.touches[0][splitter._getOrientation("page")]:event[splitter._getOrientation("page")];if($(event.target).is("span")){splitter._capturedElement=splitter._clone($($(event.target).parent()).parent(),splitter)}else{splitter._capturedElement=splitter._clone(event.target,splitter)}capturedElementOffset=$.ig.util.offset(splitter._capturedElement);splitter._startX=capturedElementOffset.left;splitter._startY=capturedElementOffset.top;splitter._kbMove=0;splitter._kbLockLeft=false;splitter._kbLockRight=false;splitter._mouseStartX=splitter._isTouch(event)?event.originalEvent.touches[0].pageX:event.pageX;splitter._mouseStartY=splitter._isTouch(event)?event.originalEvent.touches[0].pageY:event.pageY}}}return false}return false},_clone:function(bar,splitter){var opt=this._opt,$bar=$(bar),clonedBar=$bar.clone(),offset=$.ig.util.offset($bar);clonedBar.css({position:"absolute",top:offset.top,left:offset.left,"z-index":9999}).fadeTo(0,.7);clonedBar.mouseup(function(){if(splitter.options.orientation==="vertical"){if(opt.barMouseDown&&Math.round(offset.left)===Math.round($.ig.util.offset(clonedBar).left)){$bar.trigger("click")}}else{if(opt.barMouseDown&&Math.round(offset.top)===Math.round($.ig.util.offset(clonedBar).top)){$bar.trigger("click")}}opt.barMouseDown=false});$(document.body).append(clonedBar);return clonedBar},_addCollapseButtonHandlers:function(button,index){var self=this,options=this.options;button.bind(this._getEvent("mouseenter"),function(e){if(options.disabled){return}$($(this).parent()).removeClass(self.css.barHover);$(this).addClass(self.css.collapseButtonHover);if(e.stopPropagation!==undefined){e.stopPropagation()}if(e.preventDefault!==undefined){e.preventDefault()}return false});button.bind(this._getEvent("mouseleave"),function(){if(options.disabled){return}$($(this).parent()).addClass(self.css.barHover);$(this).removeClass(self.css.collapseButtonHover)});button.bind("mousedown touchstart",function(e){if(options.disabled){return}$(this).toggleClass(self.css.collapseButtonPressed);if(self._panels[index].options.collapsed){self.expandAt(index)}else{self.collapseAt(index)}if(e.stopPropagation!==undefined){e.stopPropagation()}if(e.preventDefault!==undefined){e.preventDefault()}return false})},_performDrag:function(self,ev){var page=self._isTouch(ev)?ev.originalEvent.touches[0][self._getOrientation("page")]:ev[self._getOrientation("page")],bar;if(self._capturedElement){if(ev.type==="keydown"){bar=self[self._getOrientation("start")]+self._kbMove}else{bar=page-self[self._getOrientation("mouse")]+self[self._getOrientation("start")]}self._moveBar(bar);return false}return true},_moveBar:function(bar){bar=this._validatePosition(bar);if(bar.invalid){this._capturedElement.addClass(this.css.barInvalid)}else{this._capturedElement.removeClass(this.css.barInvalid)}this._capturedElement.css(this._getOrientation("dimention"),bar.position)},_validatePosition:function(bar){var resizeArea=this._resizeArea,rightBoundary=this._getNextBoundary(resizeArea),getPreviousBoundary=this._getPreviousBoundary(resizeArea),min=Math.min(rightBoundary,rightBoundary-resizeArea.right.options.min,getPreviousBoundary+resizeArea.left.options.max),max=Math.max(getPreviousBoundary,getPreviousBoundary+resizeArea.left.options.min,rightBoundary-resizeArea.right.options.max),pos;if(max>min){pos=resizeArea.right.igOffset()[this._getOrientation("dimention")]-this._capturedElement[this._getOrientation("outerSize")](true);return{position:pos,invalid:true}}if(bar<max){return{position:max,invalid:true}}if(bar>min){return{position:min,invalid:true}}return{position:bar,invalid:false}},_getNextBoundary:function(panel){var size=panel.right.igOffset()[this._getOrientation("dimention")]+panel.right[this._getOrientation("size")]()-this._capturedElement[this._getOrientation("outerSize")](true);if(panel.right.options.collapsed){size-=panel.right.options.min}return size},_getPreviousBoundary:function(panel){var size=panel.left.igOffset()[this._getOrientation("dimention")];if(panel.left.options.collapsed){size+=panel.left.options.min}return size},_stopDrag:function(self,cancel,kbMove){if(self._capturedElement){if(!cancel&&(self._isDrag||kbMove)){self._performAreaResize()}self._capturedElement.remove();self._isDrag=false}self._capturedElement=null},_performAreaResize:function(){var resizeArea=this._resizeArea,offset=$.ig.util.offset(this._capturedElement)[this._getOrientation("dimention")]-this[this._getOrientation("start")],left=resizeArea.left[this._getOrientation("size")]()+offset,right=resizeArea.right[this._getOrientation("size")]()-offset;this._setPanelSize(resizeArea.left,left);this._setPanelSize(resizeArea.right,right);if(offset!==0){this._triggerResizeEnded()}this._splittersLayout()},_splittersLayout:function(){var splitters=$.data(document.body,"ig-splitters")||[],$currSplitter,i;for(i=0;i<splitters.length;i++){$currSplitter=splitters[i];if($currSplitter===this.element){$currSplitter.data("igSplitter")._panelsLayout()}else if(this.options.resizeOtherSplitters){$currSplitter.data("igSplitter")._panelsLayout()}}},_getSplitBarSize:function(){var style,innerSize,border,size,elem=this._splitter.bar[0],sizeKey=this._const.orientations[this.options.orientation].size;if(window.getComputedStyle){style=window.getComputedStyle(elem,null)}else{style=elem.currentStyle}innerSize=style[sizeKey];border=style.borderLeftWidth;size=parseFloat(innerSize)+2*parseFloat(border);return Math.ceil(size)},_panelsLayout:function(parameterObject){var i,$currChild,$currChildChildren,oppositeSize,panelsSizeInPercentages,outerSize=(this._panels.length-1)*this._getSplitBarSize(),sizeKey=this._getOrientation("size"),oppositeSizeKey=this._getOrientation("oppositeSize"),size=this._getSize(sizeKey),$splitBarChildren=this._splitter.bar.children(),regExp=new RegExp("%"),cloneObjPanels=this._opt.calculateSizeCloneObject.panels,outerOppositeSizeKey;for(i=0;i<this._panels.length;i++){if(!this._panels[i].options.collapsed){outerSize+=this._handlerPanelSize(this._panels[i],outerSize,size)}else{$currChild=$splitBarChildren.eq(i);$currChildChildren=$currChild.children();this._handlerPanelSize(this._panels[i],outerSize,size);$splitBarChildren.eq((i+1)%2).hide();$currChild.removeClass(this.css[this.options.orientation+"CollapseButton"+(i%2===0?"Left":"Right")+"Expanded"]).addClass(this.css[this.options.orientation+"CollapseButton"+(i%2===0?"Left":"Right")+"Collapsed"]);$currChildChildren.removeClass(this.css[this.options.orientation+"CollapseButton"+(i%2===0?"Left":"Right")+"ExpandedIcon"]).addClass(this.css[this.options.orientation+"CollapseButton"+(i%2===0?"Left":"Right")+"CollapsedIcon"])}}if(regExp.test(this.options[sizeKey])||!this.options[sizeKey]){if(parameterObject&&parameterObject.isWindowResize){this._calculateSizeWithClone()}else{cloneObjPanels[0].options={min:this._getPanelInitMin(0),max:this._getPanelInitMax(0)};cloneObjPanels[1].options={min:this._getPanelInitMin(1),max:this._getPanelInitMax(1)};if(this._isPercentLayout||!this.options.panels.length||(this.options.panels[0]===undefined||this.options.panels[0].size===undefined)&&(this.options.panels[1]===undefined||this.options.panels[1].size===undefined)){panelsSizeInPercentages=this._getPanelsSizeInPercentages.call(this,sizeKey);cloneObjPanels[0].options.size=panelsSizeInPercentages[0];cloneObjPanels[1].options.size=panelsSizeInPercentages[1]}else{cloneObjPanels[0].options.size=this.options.panels[0]&&this.options.panels[0].size&&this._panels[0].options.size;cloneObjPanels[1].options.size=this.options.panels[1]&&this.options.panels[1].size&&this._panels[1].options.size}if(parameterObject&&parameterObject.isInit){this._calculateSizeWithClone()}if(outerSize<size&&!(parameterObject&&parameterObject.isInit)){this._createPanel(size,outerSize,this._panels.length-1)}}}else if(outerSize<size){this._createPanel(size,outerSize,this._panels.length-1)}oppositeSize=this.element[oppositeSizeKey]();outerOppositeSizeKey="outer"+oppositeSizeKey.charAt(0).toUpperCase()+oppositeSizeKey.slice(1);if(oppositeSize===this._splitter.bar[outerOppositeSizeKey](true)){oppositeSize-=this._splitter.bar[outerOppositeSizeKey](true)-this._splitter.bar[oppositeSizeKey]()}this._splitter.bar[oppositeSizeKey](oppositeSize);$splitBarChildren.eq(2).find("span")[oppositeSizeKey](oppositeSize)},_calculateSizeWithClone:function(){var $splitterClone,sizeWithoutBarSize,panel1RecalculatedSize,panel2RecalculatedSize,min,max,oppositeSizeKey=this._getOrientation("oppositeSize"),cloneObj=this._opt.calculateSizeCloneObject,cloneObjPanels=cloneObj.panels,$bar=cloneObj.bar.element,$panel1=cloneObjPanels[0].element,$panel2=cloneObjPanels[1].element,sizeKey=this._getOrientation("size"),outerSizeKey="outer"+sizeKey.charAt(0).toUpperCase()+sizeKey.slice(1),minSize="min-"+sizeKey,maxSize="max-"+sizeKey,cssObj={},size=this._getSize(sizeKey),barSize=this._getSplitBarSize(),panel1Size=cloneObjPanels[0].options.size&&/%/.test(cloneObjPanels[0].options.size)?size*cloneObjPanels[0].options.size.replace("%","")/100:cloneObjPanels[0].options.size,panel2Size=size-panel1Size-barSize,isPanel1Collapsed=this._panels[0].options.collapsed,isPanel2Collapsed=this._panels[1].options.collapsed,isAnyPanelCollapsed=isPanel1Collapsed||isPanel2Collapsed;if(!cloneObj.element||!$panel1||!$panel2||!$bar){$splitterClone=this.element.clone().html("");$splitterClone.removeAttr("id").css({top:-99999,left:-99999,position:"absolute"}).addClass("calc-size-clone");$panel2=$("<div>");cssObj={"float":"right"};cssObj[oppositeSizeKey]="100%";$panel2.prop("className",this._panels[1].prop("className"));$panel2.css(cssObj).appendTo($splitterClone);$bar=$("<div>");$bar.css(cssObj).appendTo($splitterClone);cssObj={};cssObj[oppositeSizeKey]="100%";cssObj.overflow="hidden";$panel1=$("<div>");$panel1.prop("className",this._panels[0].prop("className"));$panel1.css(cssObj).appendTo($splitterClone);cssObj={};cloneObj.element=$splitterClone;cloneObjPanels[0].element=$panel1;cloneObjPanels[1].element=$panel2;cloneObj.bar.element=$bar}cssObj[maxSize]=isAnyPanelCollapsed?"":cloneObjPanels[1].options.max;cssObj[minSize]=isAnyPanelCollapsed?0:cloneObjPanels[1].options.min;cssObj[sizeKey]=isPanel2Collapsed?0:isPanel1Collapsed?size:panel2Size;$panel2.css(cssObj);$bar[sizeKey](barSize);cssObj[maxSize]=isAnyPanelCollapsed?"":cloneObjPanels[0].options.max;cssObj[minSize]=isAnyPanelCollapsed?0:cloneObjPanels[0].options.min;cssObj[sizeKey]=isPanel1Collapsed?0:isPanel2Collapsed?size-barSize+"px":panel1Size;$panel1.css(cssObj);cloneObj.element[sizeKey](size);cloneObj.element.appendTo($("body"));sizeWithoutBarSize=size-barSize;panel2RecalculatedSize=sizeWithoutBarSize-panel1Size;if(panel2Size===undefined&&panel1Size===undefined){$panel1[sizeKey](this._opt.defaultPanelSize)}else if(panel1Size>sizeWithoutBarSize&&!this._panels[1].options.size){$panel1[sizeKey](sizeWithoutBarSize)}if(panel2Size!==panel2RecalculatedSize||panel2Size===undefined&&panel1Size!==undefined){if(panel1Size===undefined&&panel2Size>0&&!this.options[sizeKey]){if(sizeWithoutBarSize<panel2Size){$panel1[sizeKey](0);$panel2[sizeKey](panel2RecalculatedSize)}else{panel1RecalculatedSize=sizeWithoutBarSize-panel2Size;$panel1[sizeKey](panel1RecalculatedSize)}}else{$panel2[sizeKey](panel2RecalculatedSize)}}if($panel1[outerSizeKey]()+$panel2[outerSizeKey]()+barSize!==cloneObj.element[sizeKey]()){this._resolveSizeConflictsOfCloneObject($panel1,$panel2,cloneObj.element,sizeKey)}this._resolveRoundingConflictsOfCloneObject($panel1,$panel1.css(minSize),$panel2,size,sizeKey);this._resolveRoundingConflictsOfCloneObject($panel2,$panel2.css(minSize),$panel1,size,sizeKey);if(this.options.orientation==="vertical"){var panel1BorderWidth=this._panels[0][0].offsetWidth-this._panels[0][0].clientWidth;$panel1[sizeKey](panel1Size-panel1BorderWidth);var panel2BorderWidth=this._panels[1][0].offsetWidth-this._panels[1][0].clientWidth;$panel2[sizeKey](panel2Size-panel2BorderWidth)}this._setPanelSize(this._panels[1],panel2Size);if($panel2.css(minSize)&&$panel2.css(minSize)!=="none"&&!isAnyPanelCollapsed){min=$panel2.css(minSize);this._setPanelActualMin(1,min)}else{this._panels[1].css(minSize,"")}if($panel2.css(maxSize)&&$panel2.css(maxSize)!=="none"&&!isAnyPanelCollapsed){max=$panel2.css(maxSize);this._setPanelActualMax(1,max)}else{this._panels[1].css(maxSize,"")}this._setPanelSize(this._panels[0],panel1Size);if($panel1.css(minSize)&&$panel1.css(minSize)!=="none"&&!isAnyPanelCollapsed){min=$panel1.css(minSize);this._setPanelActualMin(0,min)}else{this._panels[0].css(minSize,"")}if($panel1.css(maxSize)&&$panel1.css(maxSize)!=="none"&&!isAnyPanelCollapsed){max=$panel1.css(maxSize);this._setPanelActualMax(0,max)}else{this._panels[0].css(maxSize,"")}cloneObj.element.detach()},_resolveSizeConflictsOfCloneObject:function(clonePanel1,clonePanel2,cloneSplitter,sizeKey){var barSize=this._getSplitBarSize(),size=cloneSplitter[sizeKey](),size1=this._getSizeInPixels(clonePanel1[sizeKey](),size),size2=this._getSizeInPixels(clonePanel2[sizeKey](),size),outerSizeKey="outer"+sizeKey.charAt(0).toUpperCase()+sizeKey.slice(1),outerSize1=this._getSizeInPixels(clonePanel1[outerSizeKey](),size),outerSize2=this._getSizeInPixels(clonePanel2[outerSizeKey](),size),clonePanel1NeededArea=size-barSize-size2,clonePanel2NeededArea=size-barSize-size1,clonePanel1Min=this._getSizeInPixels(clonePanel1.css("min-"+sizeKey),size),clonePanel2Min=this._getSizeInPixels(clonePanel2.css("min-"+sizeKey),size);
if(size1>clonePanel1NeededArea&&(clonePanel1Min||clonePanel2Min)){if(clonePanel1Min&&!clonePanel2Min){clonePanel2[sizeKey](clonePanel2NeededArea)}else if(!clonePanel1Min&&clonePanel2Min){if(clonePanel2NeededArea>clonePanel2Min){clonePanel2[sizeKey](clonePanel2NeededArea)}else{clonePanel2[sizeKey](clonePanel2Min);clonePanel1[sizeKey](size-barSize-clonePanel2Min)}}else{if(clonePanel2NeededArea>clonePanel2Min){clonePanel2[sizeKey](clonePanel2NeededArea)}else if(clonePanel1NeededArea>clonePanel1Min){clonePanel2[sizeKey](clonePanel2Min);clonePanel1[sizeKey](size-barSize-clonePanel2Min)}else{clonePanel1[sizeKey](Math.floor(clonePanel1Min));clonePanel2.css("min-"+sizeKey,size-barSize-Math.floor(clonePanel1Min))}}}else if(outerSize1!==size-barSize-outerSize2&&(size1!==outerSize1||size2!==outerSize2)){if(size2!==outerSize2){clonePanel2[sizeKey](size2-(outerSize2-size2))}outerSize2=this._getSizeInPixels(clonePanel2[outerSizeKey](),size);if(outerSize1!==size-barSize-outerSize2&&size1!==outerSize1){clonePanel1[sizeKey](size1-(outerSize1-size1))}}},_resolveRoundingConflictsOfCloneObject:function(checkedPanel,checkedPanelMin,oppositePanel,sizeSplitter,sizeKey){var floatSize,diff,newSize,outerSizeKey="outer"+sizeKey.charAt(0).toUpperCase()+sizeKey.slice(1),barSize=this._getSplitBarSize();floatSize=Math.floor(checkedPanel[0].getBoundingClientRect()[sizeKey]*1e3)/1e3;diff=Math.abs(this._getSizeInPixels(checkedPanel[outerSizeKey]())-floatSize);if(0<diff&&diff<=1){if(checkedPanelMin){checkedPanelMin=this._getSizeInPixels(checkedPanelMin,sizeSplitter);diff=Math.abs(Math.floor(checkedPanelMin)-checkedPanelMin);if(0<diff&&diff<=1){checkedPanel.css("min-"+sizeKey,Math.floor(checkedPanelMin)+"px")}}newSize=Math.floor(floatSize);checkedPanel[sizeKey](newSize+"px");oppositePanel[sizeKey](sizeSplitter-barSize-newSize+"px")}},_getSizeInPixels:function(candidateValue,sizeOfParentInPixels){if(/%/.test(candidateValue)){return parseFloat(sizeOfParentInPixels*candidateValue.replace("%","")/100)}else{return parseFloat(candidateValue)}},_getPanelInitMin:function(panelIndex){var optionsPanel=this.options.panels[panelIndex];return optionsPanel&&(optionsPanel._min||optionsPanel.min)},_getPanelInitMax:function(panelIndex){var optionsPanel=this.options.panels[panelIndex];return optionsPanel&&(optionsPanel._max||optionsPanel.max)},_getStep:function(){return this._const.step+this._splitter.bar[this._getOrientation("size")]()},_handlerPanelSize:function(panel,outerSize,size){if(this._isPercentLayout){if(panel.options._min!==undefined){panel.options.min=panel.options._min.replace("%","")*this._getSize(this._getOrientation("size"))/100}if(panel.options._max!==undefined){panel.options.max=panel.options._max.replace("%","")*this._getSize(this._getOrientation("size"))/100}}this._setPanelSize(panel,panel.options.size);var newSize;if(outerSize+panel.options.size>=size&&!panel.options.collapsed){newSize=size-outerSize;if(!panel.options.collapsed){if(this._isPercentLayout){panel[this._getOrientation("size")](newSize/this._getSize(this._getOrientation("size"))*100+"%")}else{panel[this._getOrientation("size")](newSize)}panel.options.size=newSize}}return panel[this._getOrientation("outerSize")](true)},_setPanelSize:function(panel,size){if(!panel.options.collapsed){panel.options.size=parseInt(size,10);if(panel.options.size===0||this._isPercentLayout&&panel.options.size<=$.ig.util.getScrollWidth()){panel.addClass(this.css.noScroll)}else{panel.removeClass(this.css.noScroll)}if(this._isPercentLayout){size=parseInt(size,10);panel[this._getOrientation("size")](size/this._getSize(this._getOrientation("size"))*100+"%")}else{panel[this._getOrientation("size")](size)}}else{panel.addClass(this.css.noScroll);panel[this._getOrientation("size")](0)}},_setPanelActualMin:function(panelIndex,min){var convertedMin,panel=this._panels[panelIndex],sizeKey=this._getOrientation("size"),size=this._getSize(sizeKey);if(min===undefined){return}if(/%/.test(min)){if(this._isInitMinDefinedInPercentages(panelIndex)){panel.options._min=min}convertedMin=size*parseFloat(min,10)/100;panel.options.min=convertedMin}else{min=parseInt(min,10);if(this._isInitMinDefinedInPercentages(panelIndex)){convertedMin=min/size*100;panel.options._min=convertedMin+"%"}panel.options.min=min;min+="px"}if(!panel.options.collapsed){panel.css("min-"+this._getOrientation("size"),min)}},_setPanelActualMax:function(panelIndex,max){var convertedMax,panel=this._panels[panelIndex],sizeKey=this._getOrientation("size"),size=this._getSize(sizeKey);if(max===undefined){return}if(/%/.test(max)){if(this._isInitMaxDefinedInPercentages(panelIndex)){panel.options._max=max}convertedMax=size*parseFloat(max,10)/100;panel.options.max=convertedMax}else{max=parseInt(max,10);if(this._isInitMaxDefinedInPercentages(panelIndex)){convertedMax=max/size*100;panel.options._max=convertedMax+"%"}panel.options.max=max;max+="px"}if(!panel.options.collapsed){panel.css("max-"+this._getOrientation("size"),max)}},_isInitMinDefinedInPercentages:function(panelIndex){var initPanelOptions=this.options.panels[panelIndex];return initPanelOptions!==undefined&&(initPanelOptions._min!==undefined||/%/.test(initPanelOptions.min))},_isInitMaxDefinedInPercentages:function(panelIndex){var initPanelOptions=this.options.panels[panelIndex];return initPanelOptions!==undefined&&(initPanelOptions._max!==undefined||/%/.test(initPanelOptions.max))},_createPanel:function(size,outerSize,index,overrideMax){var panel,newSize,panelSize,maxSize;if(overrideMax===undefined){overrideMax=true}if(index===undefined){index=0}panel=this._panels[index];newSize=size-outerSize;panelSize=panel[this._getOrientation("size")]();maxSize=newSize+panelSize;if(panel.options.collapsed){this._panelHelper(outerSize,size)}else{if(maxSize>panel.options.max&&overrideMax){panel.options.max=maxSize}if(this._isPercentLayout){panel[this._getOrientation("size")](maxSize/this._getSize(this._getOrientation("size"))*100+"%")}else{panel[this._getOrientation("size")](maxSize)}panel.options.size=maxSize}},_panelHelper:function(outerSize,size){var panel,flag=false,i;for(i=0;i<this._panels.length&&!flag;i++){panel=this._panels[i];if(!panel.options.collapsed){flag=true}}panel[this._getOrientation("size")](size-outerSize+panel[this._getOrientation("size")]())},expandAt:function(index){var neighborPanel,sizeProperty=this._getOrientation("size"),panel=this._panels[index];if(index<=this._panels.length&&index>=0&&panel.options.collapsed){neighborPanel=this._panels[index%2===0?1:0];panel.options.collapsed=false;panel.options.size=Math.min(panel.options.size,neighborPanel[this._getOrientation("size")]());neighborPanel.options.size=neighborPanel[this._getOrientation("size")]()-panel.options.size;this._splitter.bar.removeClass(this.css.barCollapsed);if(this._panels[(index+1)%2].options.collapsible){$(this._splitter.bar.children()[(index+1)%2]).show()}$(this._splitter.bar.children()[index]).removeClass(this.css.collapseButtonPressed);$(this._splitter.bar.children()[index]).removeClass(this.css[this.options.orientation+"CollapseButton"+(index%2===0?"Left":"Right")+"Collapsed"]);$($(this._splitter.bar.children()[index]).children()).removeClass(this.css[this.options.orientation+"CollapseButton"+(index%2===0?"Left":"Right")+"CollapsedIcon"]);$(this._splitter.bar.children()[index]).addClass(this.css[this.options.orientation+"CollapseButton"+(index%2===0?"Left":"Right")+"Expanded"]);$($(this._splitter.bar.children()[index]).children()).addClass(this.css[this.options.orientation+"CollapseButton"+(index%2===0?"Left":"Right")+"ExpandedIcon"]);neighborPanel.css(sizeProperty,neighborPanel.options.size);panel.css(sizeProperty,panel.options.size);this._setPanelMinMax(panel);this._setPanelMinMax(neighborPanel);this._splittersLayout();this._triggerExpanded(index)}},collapseAt:function(index){var size,neighborPanel,panel=this._panels[index],sizeProperty=this._getOrientation("size");if(index<this._panels.length&&index>=0&&!panel.options.collapsed&&panel.options.collapsible){size=panel[this._getOrientation("size")]();neighborPanel=this._panels[index%2===0?1:0];panel.options.size=size||panel.options.size;panel.options.collapsed=true;this._splitter.bar.addClass(this.css.barCollapsed);$(this._splitter.bar.children()[(index+1)%2]).hide();$(this._splitter.bar.children()[index]).addClass(this.css.collapseButtonPressed);$(this._splitter.bar.children()[index]).removeClass(this.css[this.options.orientation+"CollapseButton"+(index%2===0?"Left":"Right")+"Expanded"]);$($(this._splitter.bar.children()[index]).children()).removeClass(this.css[this.options.orientation+"CollapseButton"+(index%2===0?"Left":"Right")+"ExpandedIcon"]);$(this._splitter.bar.children()[index]).addClass(this.css[this.options.orientation+"CollapseButton"+(index%2===0?"Left":"Right")+"Collapsed"]);$($(this._splitter.bar.children()[index]).children()).addClass(this.css[this.options.orientation+"CollapseButton"+(index%2===0?"Left":"Right")+"CollapsedIcon"]);neighborPanel.options.size=neighborPanel[this._getOrientation("size")]()+size;neighborPanel.css(sizeProperty,neighborPanel.options.size);panel.css(sizeProperty,0);this._clearPanelMinMax(panel);this._clearPanelMinMax(neighborPanel);this._splittersLayout();this._triggerCollapsed(index)}},_clearPanelMinMax:function(panel){var sizeProperty=this._getOrientation("size");if(parseFloat(panel.css("min-"+sizeProperty))){panel.css("min-"+sizeProperty,"")}if(panel.css("max-"+sizeProperty)){panel.css("max-"+sizeProperty,"")}},_setPanelMinMax:function(panel){var sizeProperty=this._getOrientation("size");if(panel.options&&panel.options.min){panel.css("min-"+sizeProperty,panel.options.min+"px")}if(panel.options&&panel.options.max&&panel.options.max<this._opt.defaultPanelMaxSize){panel.css("max-"+sizeProperty,panel.options.max+"px")}},_triggerCollapsed:function(index){var args={owner:this,index:index};this._trigger(this.events.collapsed,null,args)},_triggerExpanded:function(index){var args={owner:this,index:index};this._trigger(this.events.expanded,null,args)},_triggerResizeStarted:function(){var args={owner:this},iframes=this.element.find("iframe");if(iframes.length>0){iframes.css("pointer-events","none")}this._trigger(this.events.resizeStarted,null,args)},_triggerResizing:function(){var args={owner:this};return this._trigger(this.events.resizing,null,args)},_triggerResizeEnded:function(){var args={owner:this},iframes=this.element.find("iframe");if(iframes.length>0){iframes.css("pointer-events","auto")}this._trigger(this.events.resizeEnded,null,args)},_triggerLayoutRefreshing:function(){var args={owner:this};return this._trigger(this.events.layoutRefreshing,null,args)},_triggerLayoutRefreshed:function(){var args={owner:this};return this._trigger(this.events.layoutRefreshed,null,args)},firstPanel:function(){return this._panels[0]},secondPanel:function(){return this._panels[1]},refreshLayout:function(){this._panelsLayout()},setFirstPanelSize:function(size){if(/%/.test(size)){size=size.replace("%","")*this._getSize(this._getOrientation("size"))/100;this._isPercentLayout=true}if(/px/.test(size)){size=parseInt(size,10)}this._setPanelSize(this._panels[0],size);this._splittersLayout()},setSecondPanelSize:function(size){if(/%/.test(size)){size=size.replace("%","")*this._getSize(this._getOrientation("size"))/100;this._isPercentLayout=true}if(/px/.test(size)){size=parseInt(size,10)}this._setPanelSize(this._panels[0],this._getSize(this._getOrientation("size"))-size);this._splittersLayout()},_getPanelsSizeInPercentages:function(sizeKey){var size=this._getSize(sizeKey),barSize=this._getSplitBarSize(),panel1CalculatedSize=size-barSize===this._panels[0].options.size?100:this._panels[0].options.size/size*100,panel1Size=panel1CalculatedSize<0?0:panel1CalculatedSize>100?100:panel1CalculatedSize,panel2CalculatedSize=100-panel1Size,panel2Size=panel2CalculatedSize<0?0:panel2CalculatedSize>100?100:panel2CalculatedSize;return[panel1Size+"%",panel2Size+"%"]},destroy:function(){var evtHandlers=this._opt?this._opt.eventHandlers:null,i,splitters,index;this._removeEventHandlers();this._removeClasses();this.element.html(this._htmlMarkup);splitters=$.data(document.body,"ig-splitters")||[];for(i=0;i<splitters.length;i++){if(splitters[i][0].id===this.element[0].id){index=i;break}}splitters.splice(index,1);$.data(document.body,"ig-splitters",splitters);if(evtHandlers){$(document).unbind(this._getEvent("mouseup"),evtHandlers.documentMouseUp);$(document).unbind(this._getEvent("mousemove"),evtHandlers.documentMouseMove);$(window).unbind("resize",evtHandlers.windowResize)}this._superApply(arguments);this._opt=null;return this}});$.extend($.ui.igSplitter,{version:"21.2.12"});return $});