dock-spawn-ts 2.402.0 → 2.403.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/es5/dock-spawn-ts.js +1 -1
- package/lib/js/DockManager.js +10 -0
- package/lib/js/DockManager.js.map +1 -1
- package/lib/js/DraggableContainer.js +6 -6
- package/lib/js/DraggableContainer.js.map +1 -1
- package/lib/js/ResizableContainer.js +6 -6
- package/lib/js/ResizableContainer.js.map +1 -1
- package/package.json +1 -1
- package/src/DockManager.ts +11 -0
- package/src/DraggableContainer.ts +6 -6
- package/src/ResizableContainer.ts +6 -6
package/lib/es5/dock-spawn-ts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver)}return desc.value}}return _get.apply(this,arguments)}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break}return object}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined")}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e31){throw _e31},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e32){didErr=true;err=_e32},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value}catch(error){reject(error);return}if(info.done){resolve(value)}else{Promise.resolve(value).then(_next,_throw)}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(undefined)})}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var DockSpawnTS;(function(){"use strict";var e,t,i,n,s={d:function d(e,t){for(var i in t){s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}},o:function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function r(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};s.r(o),s.d(o,{ContainerType:function ContainerType(){return e},Dialog:function Dialog(){return g},DockConfig:function DockConfig(){return p},DockGraphSerializer:function DockGraphSerializer(){return v},DockLayoutEngine:function DockLayoutEngine(){return x},DockManager:function DockManager(){return U},DockManagerContext:function DockManagerContext(){return z},DockModel:function DockModel(){return P},DockNode:function DockNode(){return f},DockWheel:function DockWheel(){return _},DockWheelItem:function DockWheelItem(){return T},DocumentManagerContainer:function DocumentManagerContainer(){return B},DocumentTabPage:function DocumentTabPage(){return L},DraggableContainer:function DraggableContainer(){return c},EventHandler:function EventHandler(){return h},FillDockContainer:function FillDockContainer(){return D},HorizontalDockContainer:function HorizontalDockContainer(){return y},PanelContainer:function PanelContainer(){return d},Point:function Point(){return l},ResizableContainer:function ResizableContainer(){return m},ResizeHandle:function ResizeHandle(){return u},SplitterBar:function SplitterBar(){return w},SplitterDockContainer:function SplitterDockContainer(){return k},SplitterPanel:function SplitterPanel(){return M},TabHandle:function TabHandle(){return b},TabHost:function TabHost(){return H},TabPage:function TabPage(){return E},UndockInitiator:function UndockInitiator(){return r},Utils:function Utils(){return a},VerticalDockContainer:function VerticalDockContainer(){return C}}),function(e){e.horizontal="horizontal",e.vertical="vertical",e.fill="fill",e.panel="panel"}(e||(e={}));var l=_createClass(function l(e,t){_classCallCheck(this,l);this.x=e,this.y=t});var a=function(){function a(){_classCallCheck(this,a)}_createClass(a,null,[{key:"getPixels",value:function getPixels(e){return null===e?0:parseInt(e.replace("px",""))}},{key:"disableGlobalTextSelection",value:function disableGlobalTextSelection(e){e.classList.add("disable-selection")}},{key:"enableGlobalTextSelection",value:function enableGlobalTextSelection(e){e.classList.remove("disable-selection")}},{key:"isPointInsideNode",value:function isPointInsideNode(e,t,i){var n=i.container.containerElement.getBoundingClientRect();return e>=n.left&&e<=n.left+n.width&&t>=n.top&&t<=n.top+n.height}},{key:"getNextId",value:function getNextId(e){return e+a._counter++}},{key:"removeNode",value:function removeNode(e){return null!==e.parentNode&&(e.parentNode.removeChild(e),!0)}},{key:"orderByIndexes",value:function orderByIndexes(e,t){var i=[];for(var _n=0;_n<t.length;_n++){i.push(e[t[_n]])}return i}},{key:"arrayRemove",value:function arrayRemove(e,t){var i=e.indexOf(t);return-1!==i&&e.splice(i,1)}},{key:"arrayContains",value:function arrayContains(e,t){var i=e.length;for(;i--;){if(e[i]===t)return!0}return!1}},{key:"arrayEqual",value:function arrayEqual(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var _i=0;_i<e.length;++_i){if(e[_i]!==t[_i])return!1}return!0}}]);return a}();a._counter=0;var h=function(){function h(e,t,i,n){_classCallCheck(this,h);this.target=i,this.eventName=t,this.source=e,this.source.addEventListener(t,this.target,n)}_createClass(h,[{key:"cancel",value:function cancel(){this.source.removeEventListener(this.eventName,this.target)}}]);return h}();var r=function(){function r(e,t,i){_classCallCheck(this,r);i||(i=7),this.element=e,this._undockededCallback=t,this.thresholdPixels=i,this._enabled=!1}_createClass(r,[{key:"enabled",get:function get(){return this._enabled},set:function set(e){this._enabled=e,this._enabled?(this.mouseDownHandler&&(this.mouseDownHandler.cancel(),delete this.mouseDownHandler),this.touchDownHandler&&(this.touchDownHandler.cancel(),delete this.touchDownHandler),this.mouseDownHandler=new h(this.element,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new h(this.element,"touchstart",this.onMouseDown.bind(this),{passive:!1})):(this.mouseDownHandler&&(this.mouseDownHandler.cancel(),delete this.mouseDownHandler),this.touchDownHandler&&(this.touchDownHandler.cancel(),delete this.touchDownHandler),this.mouseUpHandler&&(this.mouseUpHandler.cancel(),delete this.mouseUpHandler),this.touchUpHandler&&(this.touchUpHandler.cancel(),delete this.touchUpHandler),this.mouseMoveHandler&&(this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler),this.touchMoveHandler&&(this.touchMoveHandler.cancel(),delete this.touchMoveHandler))}},{key:"onMouseDown",value:function onMouseDown(e){if(e.preventDefault(),this.enabled){if(e.touches){if(e.touches.length>1)return;e=e.touches[0]}this.mouseUpHandler&&(this.mouseUpHandler.cancel(),delete this.mouseUpHandler),this.touchUpHandler&&(this.touchUpHandler.cancel(),delete this.touchUpHandler),this.mouseMoveHandler&&(this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler),this.touchMoveHandler&&(this.touchMoveHandler.cancel(),delete this.touchMoveHandler),this.mouseUpHandler=new h(window,"mouseup",this.onMouseUp.bind(this)),this.touchUpHandler=new h(window,"touchend",this.onMouseUp.bind(this)),this.mouseMoveHandler=new h(window,"mousemove",this.onMouseMove.bind(this)),this.touchMoveHandler=new h(window,"touchmove",this.onMouseMove.bind(this)),this.dragStartPosition=new l(e.clientX,e.clientY)}}},{key:"onMouseUp",value:function onMouseUp(){this.mouseUpHandler&&(this.mouseUpHandler.cancel(),delete this.mouseUpHandler),this.touchUpHandler&&(this.touchUpHandler.cancel(),delete this.touchUpHandler),this.mouseMoveHandler&&(this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler),this.touchMoveHandler&&(this.touchMoveHandler.cancel(),delete this.touchMoveHandler)}},{key:"onMouseMove",value:function onMouseMove(e){if(e.touches){if(e.touches.length>1)return;e=e.touches[0]}var t=new l(e.clientX,e.clientY).y-this.dragStartPosition.y;(t>this.thresholdPixels||t<-this.thresholdPixels)&&(this.enabled=!1,this._requestUndock(e))}},{key:"_requestUndock",value:function _requestUndock(e){var t=0,i=0,n=this.element;do{t+=n.offsetTop||0,i+=n.offsetLeft||0,n=n.offsetParent}while(n);var s=this.dragStartPosition.x-i,o=this.dragStartPosition.y-t,a=new l(s,o);this._undockededCallback(e,a)}}]);return r}();!function(e){e.document="document",e.panel="panel"}(t||(t={}));var d=function(){function d(i,n,s,o,l){_classCallCheck(this,d);s||(s="Panel"),o||(o=t.panel),this.panelType=o,this.elementContent=Object.assign(i,{_dockSpawnPanelContainer:this}),this.dockManager=n,this.title=s,this.containerType=e.panel,this.icon=null,this.minimumAllowedChildNodes=0,this._floatingDialog=void 0,this.isDialog=!1,this._canUndock=n._undockEnabled,this.eventListeners=[],this._hideCloseButton=l,this._initialize()}_createClass(d,[{key:"canUndock",value:function canUndock(e){var _this=this;this._canUndock=e,this.undockInitiator.enabled=e,this.eventListeners.forEach(function(t){t.onDockEnabled&&t.onDockEnabled({self:_this,state:e})})}},{key:"addListener",value:function addListener(e){this.eventListeners.push(e)}},{key:"removeListener",value:function removeListener(e){this.eventListeners.splice(this.eventListeners.indexOf(e),1)}},{key:"floatingDialog",get:function get(){return this._floatingDialog},set:function set(e){this._floatingDialog=e;var t=void 0===this._floatingDialog;this.undockInitiator.enabled=t}},{key:"saveState",value:function saveState(e){e.element=this.elementContent.id,e.width=this.width,e.height=this.height,e.canUndock=this._canUndock,e.hideCloseButton=this._hideCloseButton,e.panelType=this.panelType}},{key:"loadState",value:function loadState(e){this.width=e.width,this.height=e.height,this.state={width:e.width,height:e.height},this.canUndock(e.canUndock),this.hideCloseButton(e.hideCloseButton),this.panelType=e.panelType}},{key:"setActiveChild",value:function setActiveChild(){}},{key:"containerElement",get:function get(){return this.elementPanel}},{key:"grayOut",value:function grayOut(e){var _this2=this;!e&&this._grayOut?(this.elementContentWrapper.removeChild(this._grayOut),this.elementButtonClose.style.display=this._hideCloseButton?"none":"block",this._grayOut=null,this._hideCloseButton||this.eventListeners.forEach(function(e){e.onHideCloseButton&&e.onHideCloseButton({self:_this2,state:_this2._hideCloseButton})})):e&&!this._grayOut&&(this._grayOut=document.createElement("div"),this._grayOut.className="panel-grayout",this.elementButtonClose.style.display="none",this.elementContentWrapper.appendChild(this._grayOut),this.eventListeners.forEach(function(e){e.onHideCloseButton&&e.onHideCloseButton({self:_this2,state:!0})}))}},{key:"_initialize",value:function _initialize(){this.name=a.getNextId("panel_"),this.elementPanel=document.createElement("div"),this.elementPanel.tabIndex=0,this.elementTitle=document.createElement("div"),this.elementTitleText=document.createElement("div"),this.elementContentHost=document.createElement("div"),this.elementButtonClose=document.createElement("div"),this.elementPanel.appendChild(this.elementTitle),this.elementTitle.appendChild(this.elementTitleText),this.elementTitle.appendChild(this.elementButtonClose),this.elementButtonClose.classList.add("panel-titlebar-button-close"),this.elementButtonClose.style.display=this._hideCloseButton?"none":"block",this.elementPanel.appendChild(this.elementContentHost),this.elementPanel.classList.add("panel-base"),this.elementTitle.classList.add("panel-titlebar"),this.elementTitle.classList.add("disable-selection"),this.elementTitleText.classList.add("panel-titlebar-text"),this.elementContentHost.classList.add("panel-content");var e=this.elementContent.clientWidth,t=this.elementContent.clientHeight,i=this.elementTitle.clientHeight;this._setPanelDimensions(e,t+i),this._hideCloseButton||(this.closeButtonClickedHandler=new h(this.elementButtonClose,"mousedown",this.onCloseButtonClicked.bind(this)),this.closeButtonTouchedHandler=new h(this.elementButtonClose,"touchstart",this.onCloseButtonClicked.bind(this))),this.elementContentWrapper=document.createElement("div"),this.elementContentWrapper.classList.add("panel-content-wrapper"),this.elementContentWrapper.appendChild(this.elementContent),a.removeNode(this.elementContentWrapper),this.elementContentHost.appendChild(this.elementContentWrapper);var n=this.elementContent.dataset.panelCaption,s=this.elementContent.dataset.panelIcon;n&&(this.title=n),s&&(this.icon=s),this._updateTitle(),this.undockInitiator=new r(this.elementTitle,this.performUndockToDialog.bind(this)),delete this.floatingDialog,this.mouseDownHandler=new h(this.elementPanel,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new h(this.elementPanel,"touchstart",this.onMouseDown.bind(this)),this.elementContent.removeAttribute("hidden")}},{key:"onMouseDown",value:function onMouseDown(){this.dockManager.activePanel=this}},{key:"hideCloseButton",value:function hideCloseButton(e){var _this3=this;this._hideCloseButton=e,this.elementButtonClose.style.display=e?"none":"block",this.eventListeners.forEach(function(t){t.onHideCloseButton&&t.onHideCloseButton({self:_this3,state:e})})}},{key:"destroy",value:function destroy(){this.mouseDownHandler&&(this.mouseDownHandler.cancel(),delete this.mouseDownHandler),this.touchDownHandler&&(this.touchDownHandler.cancel(),delete this.touchDownHandler),a.removeNode(this.elementPanel),this.closeButtonClickedHandler&&(this.closeButtonClickedHandler.cancel(),delete this.closeButtonClickedHandler),this.closeButtonTouchedHandler&&(this.closeButtonTouchedHandler.cancel(),delete this.closeButtonTouchedHandler)}},{key:"performUndockToDialog",value:function performUndockToDialog(e,t){return this.isDialog=!0,this.undockInitiator.enabled=!1,this.elementContentWrapper.style.display="block",this.elementPanel.style.position="",this.dockManager.requestUndockToDialog(this,e,t)}},{key:"performClose",value:function performClose(){this.isDialog=!0,this.undockInitiator.enabled=!1,this.elementContentWrapper.style.display="block",this.elementPanel.style.position="",this.dockManager.requestClose(this)}},{key:"performUndock",value:function performUndock(){this.undockInitiator.enabled=!1,this.dockManager.requestUndock(this)}},{key:"prepareForDocking",value:function prepareForDocking(){this.isDialog=!1,this.undockInitiator.enabled=this._canUndock}},{key:"width",get:function get(){return this._cachedWidth},set:function set(e){e!==this._cachedWidth&&(this._cachedWidth=e,this.elementPanel.style.width=e+"px")}},{key:"height",get:function get(){return this._cachedHeight},set:function set(e){e!==this._cachedHeight&&(this._cachedHeight=e,this.elementPanel.style.height=e+"px")}},{key:"resize",value:function resize(e,t){this._setPanelDimensions(e,t),this._cachedWidth=e,this._cachedHeight=t;try{null!=this.elementContent&&"function"==typeof this.elementContent.resizeHandler&&this.elementContent.resizeHandler(e,t-this.elementTitle.clientHeight)}catch(e){console.log("error calling resizeHandler:",e," elt:",this.elementContent)}}},{key:"_setPanelDimensions",value:function _setPanelDimensions(e,t){this.elementTitle.style.width=e+"px",this.elementContentHost.style.width=e+"px",this.elementContent.style.width=e+"px",this.elementPanel.style.width=e+"px";var i=t-this.elementTitle.clientHeight;this.elementContentHost.style.height=i+"px",this.elementContent.style.height=i+"px",this.elementPanel.style.height=t+"px"}},{key:"setTitle",value:function setTitle(e){this.title=e,this._updateTitle(),this.onTitleChanged&&this.onTitleChanged(this,e)}},{key:"setTitleIcon",value:function setTitleIcon(e){this.icon=e,this._updateTitle(),this.onTitleChanged&&this.onTitleChanged(this,this.title)}},{key:"setHasChanges",value:function setHasChanges(e){this.hasChanges=e,this._updateTitle(),e?this.elementTitleText.classList.add("panel-has-changes"):this.elementTitleText.classList.remove("panel-has-changes"),this.onTitleChanged&&this.onTitleChanged(this,this.title)}},{key:"setCloseIconTemplate",value:function setCloseIconTemplate(e){this.elementButtonClose.innerHTML=e}},{key:"_updateTitle",value:function _updateTitle(){null===this.icon?this.elementTitleText.innerHTML=this.title:this.elementTitleText.innerHTML='<img class="panel-titlebar-icon" src="'+this.icon+'"><span>'+this.title+"</span>"}},{key:"getRawTitle",value:function getRawTitle(){return this.elementTitleText.innerHTML}},{key:"performLayout",value:function performLayout(e,t){}},{key:"onCloseButtonClicked",value:function onCloseButtonClicked(e){e.preventDefault(),e.stopPropagation(),this.close()}},{key:"close",value:function(){var _close=_asyncToGenerator(regeneratorRuntime.mark(function _callee(){var e;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:e=!0;if(!this.closePanelContainerCallback){_context.next=7;break}_context.next=4;return this.closePanelContainerCallback(this);case 4:e=_context.sent;_context.next=12;break;case 7:_context.t0=this.dockManager.closePanelContainerCallback;if(!_context.t0){_context.next=12;break}_context.next=11;return this.dockManager.closePanelContainerCallback(this);case 11:e=_context.sent;case 12:e&&(this.isDialog?this.floatingDialog&&this.floatingDialog.close():(this.performClose(),this.dockManager.notifyOnClosePanel(this)));case 13:case"end":return _context.stop()}}},_callee,this)}));function close(){return _close.apply(this,arguments)}return close}()}],[{key:"loadFromState",value:function loadFromState(e,t){var i=e.element,n=document.getElementById(i);if(null===n)return null;var s=new d(n,t);return s.loadState(e),s}}]);return d}();var c=function(){function c(e,t,i,n){_classCallCheck(this,c);this.dialog=e,this.delegate=t,this.containerElement=t.containerElement,this.dockManager=t.dockManager,this.topLevelElement=i,this.containerType=t.containerType,this.mouseDownHandler=new h(n,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new h(n,"touchstart",this.onMouseDown.bind(this)),this.topLevelElement.style.marginLeft=i.offsetLeft+"px",this.topLevelElement.style.marginTop=i.offsetTop+"px",this.minimumAllowedChildNodes=t.minimumAllowedChildNodes,this.iframeEventHandlers=[]}_createClass(c,[{key:"destroy",value:function destroy(){this.removeDecorator(),this.delegate.destroy()}},{key:"saveState",value:function saveState(e){this.delegate.saveState(e)}},{key:"loadState",value:function loadState(e){this.delegate.loadState(e)}},{key:"setActiveChild",value:function setActiveChild(){}},{key:"width",get:function get(){return this.delegate.width}},{key:"height",get:function get(){return this.delegate.height}},{key:"name",get:function get(){return this.delegate.name},set:function set(e){e&&(this.delegate.name=e)}},{key:"resize",value:function resize(e,t){this.delegate.resize(e,t)}},{key:"performLayout",value:function performLayout(e){this.delegate.performLayout(e,!1)}},{key:"removeDecorator",value:function removeDecorator(){this.mouseDownHandler&&(this.mouseDownHandler.cancel(),delete this.mouseDownHandler),this.touchDownHandler&&(this.touchDownHandler.cancel(),delete this.touchDownHandler)}},{key:"onMouseDown",value:function onMouseDown(e){var _this4=this;e.preventDefault&&e.preventDefault();var t=null;if(e.touches){if(e.touches.length>1)return;t=e.touches[0]}else t=e;if(this._startDragging(t),this.previousMousePosition={x:t.clientX,y:t.clientY},this.mouseMoveHandler&&(this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler),this.touchMoveHandler&&(this.touchMoveHandler.cancel(),delete this.touchMoveHandler),this.mouseUpHandler&&(this.mouseUpHandler.cancel(),delete this.mouseUpHandler),this.touchUpHandler&&(this.touchUpHandler.cancel(),delete this.touchUpHandler),this.mouseMoveHandler=new h(window,"mousemove",this.onMouseMove.bind(this)),this.touchMoveHandler=new h(e.target,"touchmove",this.onMouseMove.bind(this),{passive:!1}),this.mouseUpHandler=new h(window,"mouseup",this.onMouseUp.bind(this)),this.touchUpHandler=new h(e.target,"touchend",this.onMouseUp.bind(this)),this.dockManager.iframes){var _iterator=_createForOfIteratorHelper(this.dockManager.iframes),_step;try{var _loop=function _loop(){var e=_step.value;var t=_this4.onMouseMovedIframe.bind(_this4);_this4.iframeEventHandlers.push(new h(e.contentWindow,"mousemove",function(i){return t(i,e)})),_this4.iframeEventHandlers.push(new h(e.contentWindow,"mouseup",_this4.onMouseUp.bind(_this4))),_this4.iframeEventHandlers.push(new h(e.contentWindow,"touchmove",function(i){return t(i,e)})),_this4.iframeEventHandlers.push(new h(e.contentWindow,"touchend",_this4.onMouseUp.bind(_this4)))};for(_iterator.s();!(_step=_iterator.n()).done;){_loop()}}catch(err){_iterator.e(err)}finally{_iterator.f()}}}},{key:"onMouseUp",value:function onMouseUp(e){this._stopDragging(e),this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler,this.touchMoveHandler.cancel(),delete this.touchMoveHandler,this.mouseUpHandler.cancel(),delete this.mouseUpHandler,this.touchUpHandler.cancel(),delete this.touchUpHandler;var _iterator2=_createForOfIteratorHelper(this.iframeEventHandlers),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var _e=_step2.value;_e.cancel()}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}this.iframeEventHandlers=[]}},{key:"_startDragging",value:function _startDragging(e){this.containerElement.classList.add("draggable-dragging-active"),this.dialog.eventListener&&this.dialog.eventListener._onDialogDragStarted(this.dialog,e),a.disableGlobalTextSelection(this.dockManager.config.dialogRootElement)}},{key:"_stopDragging",value:function _stopDragging(e){this.containerElement.classList.remove("draggable-dragging-active"),this.dialog.eventListener&&this.dialog.eventListener._onDialogDragEnded(this.dialog,e),a.enableGlobalTextSelection(this.dockManager.config.dialogRootElement)}},{key:"onMouseMovedIframe",value:function onMouseMovedIframe(e,t){var i=t.getBoundingClientRect();this.onMouseMove(e,{x:i.x,y:i.y})}},{key:"onMouseMove",value:function onMouseMove(e,t){e.preventDefault&&e.preventDefault();var i=document.body.getBoundingClientRect();if(null!=e.touches){if(e.touches.length>1)return;for(var _t in this.dockManager.dockWheel.wheelItems){var _n2=this.dockManager.dockWheel.wheelItems[_t],_s=_n2.element.getBoundingClientRect();e.touches[0].clientX>_s.left-i.left&&e.touches[0].clientX<_s.left+_n2.element.clientWidth-i.left&&e.touches[0].clientY>_s.top-i.top&&e.touches[0].clientY<_s.top+_n2.element.clientHeight-i.top?_n2.onMouseMoved():_n2.active&&_n2.onMouseOut()}}var n=null;if(e.changedTouches){if(e.changedTouches.length>1)return;n=e.changedTouches[0]}else n=e;var s=new l(n.clientX,n.clientY);t&&(s=new l(n.clientX+t.x,n.clientY+t.y));var o=this.dockManager.checkXBounds(this.topLevelElement,s,this.previousMousePosition,!1,!1),a=this.dockManager.checkYBounds(this.topLevelElement,s,this.previousMousePosition,!1,!1);this._performDrag(o,a),this.previousMousePosition=s}},{key:"_performDrag",value:function _performDrag(e,t){var i=e+a.getPixels(this.topLevelElement.style.marginLeft),n=t+a.getPixels(this.topLevelElement.style.marginTop);this.topLevelElement.style.marginLeft=i+"px",this.topLevelElement.style.marginTop=n+"px"}}]);return c}();var u=function(){function u(){_classCallCheck(this,u);this.element=void 0,this.handleSize=6,this.cornerSize=12,this.east=!1,this.west=!1,this.north=!1,this.south=!1,this.corner=!1}_createClass(u,[{key:"adjustSize",value:function adjustSize(e,t){this.corner?(this.west&&(this.element.style.left="0px"),this.east&&(this.element.style.left=e-this.cornerSize+"px"),this.north&&(this.element.style.top="0px"),this.south&&(this.element.style.top=t-this.cornerSize+"px")):(this.west&&(this.element.style.left="0px",this.element.style.top=this.cornerSize+"px"),this.east&&(this.element.style.left=e-this.handleSize+"px",this.element.style.top=this.cornerSize+"px"),this.north&&(this.element.style.left=this.cornerSize+"px",this.element.style.top="0px"),this.south&&(this.element.style.left=this.cornerSize+"px",this.element.style.top=t-this.handleSize+"px"),this.west||this.east?this.element.style.height=t-2*this.cornerSize+"px":this.element.style.width=e-2*this.cornerSize+"px")}}]);return u}();var m=function(){function m(e,t,i){_classCallCheck(this,m);this.dialog=e,this.delegate=t,this.containerElement=t.containerElement,this.dockManager=t.dockManager,this.topLevelElement=i,this.containerType=t.containerType,this.topLevelElement.style.marginLeft=this.topLevelElement.offsetLeft+"px",this.topLevelElement.style.marginTop=this.topLevelElement.offsetTop+"px",this.minimumAllowedChildNodes=t.minimumAllowedChildNodes,this._buildResizeHandles(),this.readyToProcessNextResize=!0,this.dockSpawnResizedEvent=new CustomEvent("DockSpawnResizedEvent",{composed:!0,bubbles:!0}),this.iframeEventHandlers=[]}_createClass(m,[{key:"setActiveChild",value:function setActiveChild(){}},{key:"_buildResizeHandles",value:function _buildResizeHandles(){this.resizeHandles=[],this._buildResizeHandle(!1,!0,!0,!1),this._buildResizeHandle(!0,!1,!1,!0),this._buildResizeHandle(!1,!0,!1,!0),this._buildResizeHandle(!0,!1,!1,!1),this._buildResizeHandle(!1,!0,!1,!1),this._buildResizeHandle(!1,!1,!0,!1),this._buildResizeHandle(!1,!1,!1,!0)}},{key:"_buildResizeHandle",value:function _buildResizeHandle(e,t,i,n){var _this5=this;var s=new u;s.east=e,s.west=t,s.north=i,s.south=n,s.element=document.createElement("div"),this.topLevelElement.appendChild(s.element);var o="",l="";i&&(o="n"),n&&(o="s"),e&&(l="e"),t&&(l="w");var a="resize-handle-"+o+l;o.length>0&&l.length>0&&(s.corner=!0),s.element.classList.add(s.corner?"resize-handle-corner":"resize-handle"),s.element.classList.add(a),this.resizeHandles.push(s),s.mouseDownHandler=new h(s.element,"mousedown",function(e){_this5.onMouseDown(s,e)}),s.touchDownHandler=new h(s.element,"touchstart",function(e){_this5.onMouseDown(s,e)})}},{key:"saveState",value:function saveState(e){this.delegate.saveState(e)}},{key:"loadState",value:function loadState(e){this.delegate.loadState(e)}},{key:"width",get:function get(){return this.delegate.width}},{key:"height",get:function get(){return this.delegate.height}},{key:"name",get:function get(){return this.delegate.name},set:function set(e){e&&(this.delegate.name=e)}},{key:"resize",value:function resize(e,t){this.delegate.resize(e,t),this._adjustResizeHandles(e,t),document.dispatchEvent(this.dockSpawnResizedEvent)}},{key:"_adjustResizeHandles",value:function _adjustResizeHandles(e,t){this.resizeHandles.forEach(function(i){i.adjustSize(e,t)})}},{key:"performLayout",value:function performLayout(e){this.delegate.performLayout(e,!1)}},{key:"destroy",value:function destroy(){this.removeDecorator(),this.delegate.destroy()}},{key:"removeDecorator",value:function removeDecorator(){}},{key:"onMouseMovedIframe",value:function onMouseMovedIframe(e,t,i){var n=i.getBoundingClientRect();this.onMouseMoved(e,t,{x:n.x,y:n.y})}},{key:"onMouseMoved",value:function onMouseMoved(e,t,i){var n=null;if(t.changedTouches){if(t.changedTouches.length>1)return;n=t.changedTouches[0]}else n=t;if(!this.readyToProcessNextResize)return;this.readyToProcessNextResize=!1,this.dialog.panel&&this.dockManager.suspendLayout(this.dialog.panel);var s=new l(n.clientX,n.clientY);i&&(s=new l(n.clientX+i.x,n.clientY+i.y));var o=this.dockManager.checkXBounds(this.topLevelElement,s,this.previousMousePosition,e.west,e.east),a=this.dockManager.checkYBounds(this.topLevelElement,s,this.previousMousePosition,e.north,e.south);this._performDrag(e,o,a),this.previousMousePosition=s,this.readyToProcessNextResize=!0,this.dialog.panel&&this.dockManager.resumeLayout(this.dialog.panel),this.dockManager.notifyOnContainerResized(this)}},{key:"onMouseDown",value:function onMouseDown(e,t){var _this6=this;var i=null;if(t.touches){if(t.touches.length>1)return;i=t.touches[0]}else i=t;this.previousMousePosition=new l(i.clientX,i.clientY),e.mouseMoveHandler&&(e.mouseMoveHandler.cancel(),delete e.mouseMoveHandler),e.touchMoveHandler&&(e.touchMoveHandler.cancel(),delete e.touchMoveHandler),e.mouseUpHandler&&(e.mouseUpHandler.cancel(),delete e.mouseUpHandler),e.touchUpHandler&&(e.touchUpHandler.cancel(),delete e.touchUpHandler);var _iterator3=_createForOfIteratorHelper(this.iframeEventHandlers),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var _e2=_step3.value;_e2.cancel()}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}if(this.iframeEventHandlers=[],e.mouseMoveHandler=new h(window,"mousemove",function(t){_this6.onMouseMoved(e,t)}),e.touchMoveHandler=new h(window,"touchmove",function(t){_this6.onMouseMoved(e,t)}),e.mouseUpHandler=new h(window,"mouseup",function(t){_this6.onMouseUp(e)}),e.touchUpHandler=new h(window,"touchend",function(t){_this6.onMouseUp(e)}),this.dockManager.iframes){var _iterator4=_createForOfIteratorHelper(this.dockManager.iframes),_step4;try{var _loop2=function _loop2(){var t=_step4.value;var i=_this6.onMouseMovedIframe.bind(_this6);_this6.iframeEventHandlers.push(new h(t.contentWindow,"mousemove",function(n){return i(e,n,t)})),_this6.iframeEventHandlers.push(new h(t.contentWindow,"mouseup",function(t){return _this6.onMouseUp(e)})),_this6.iframeEventHandlers.push(new h(t.contentWindow,"touchmove",function(n){return i(e,n,t)})),_this6.iframeEventHandlers.push(new h(t.contentWindow,"touchend",function(t){return _this6.onMouseUp(e)}))};for(_iterator4.s();!(_step4=_iterator4.n()).done;){_loop2()}}catch(err){_iterator4.e(err)}finally{_iterator4.f()}}a.disableGlobalTextSelection(this.dockManager.config.dialogRootElement)}},{key:"onMouseUp",value:function onMouseUp(e){e.mouseMoveHandler.cancel(),e.touchMoveHandler.cancel(),e.mouseUpHandler.cancel(),e.touchUpHandler.cancel(),delete e.mouseMoveHandler,delete e.touchMoveHandler,delete e.mouseUpHandler,delete e.touchUpHandler;var _iterator5=_createForOfIteratorHelper(this.iframeEventHandlers),_step5;try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){var _e3=_step5.value;_e3.cancel()}}catch(err){_iterator5.e(err)}finally{_iterator5.f()}this.iframeEventHandlers=[],a.enableGlobalTextSelection(this.dockManager.config.dialogRootElement)}},{key:"_performDrag",value:function _performDrag(e,t,i){var n={};n.left=a.getPixels(this.topLevelElement.style.marginLeft),n.top=a.getPixels(this.topLevelElement.style.marginTop),n.width=this.topLevelElement.clientWidth,n.height=this.topLevelElement.clientHeight,e.east&&this._resizeEast(t,n),e.west&&this._resizeWest(t,n),e.north&&this._resizeNorth(i,n),e.south&&this._resizeSouth(i,n)}},{key:"_resizeWest",value:function _resizeWest(e,t){this._resizeContainer(e,0,-e,0,t)}},{key:"_resizeEast",value:function _resizeEast(e,t){this._resizeContainer(0,0,e,0,t)}},{key:"_resizeNorth",value:function _resizeNorth(e,t){this._resizeContainer(0,e,0,-e,t)}},{key:"_resizeSouth",value:function _resizeSouth(e,t){this._resizeContainer(0,0,0,e,t)}},{key:"_resizeContainer",value:function _resizeContainer(e,t,i,n,s){s.left+=e,s.top+=t,s.width+=i,s.height+=n,s.width=Math.max(s.width,50),s.height=Math.max(s.height,50),this.topLevelElement.style.marginLeft=s.left+"px",this.topLevelElement.style.marginTop=s.top+"px",this.resize(s.width,s.height)}}]);return m}();var g=function(){function g(e,t,i){_classCallCheck(this,g);this.panel=e,this.dockManager=t,this.eventListener=t,this.grayoutParent=i,this._initialize(),this.dockManager.context.model.dialogs.push(this),this.position=t.defaultDialogPosition,this.dockManager.notifyOnCreateDialog(this),e.isDialog=!0}_createClass(g,[{key:"saveState",value:function saveState(e,t){this.position=new l(e,t),this.dockManager.notifyOnChangeDialogPosition(this,e,t)}},{key:"_initialize",value:function _initialize(){this.panel.floatingDialog=this,this.elementDialog=Object.assign(document.createElement("div"),{floatingDialog:this}),this.elementDialog.tabIndex=0,this.elementDialog.appendChild(this.panel.elementPanel),this.draggable=new c(this,this.panel,this.elementDialog,this.panel.elementTitle),this.resizable=new m(this,this.draggable,this.draggable.topLevelElement),this.dockManager.config.dialogRootElement.appendChild(this.elementDialog),this.elementDialog.classList.add("dialog-floating"),this.focusHandler=new h(this.elementDialog,"focus",this.onFocus.bind(this),!0),this.mouseDownHandler=new h(this.elementDialog,"mousedown",this.onMouseDown.bind(this),!0),this.touchDownHandler=new h(this.elementDialog,"touchstart",this.onMouseDown.bind(this)),this.keyPressHandler=new h(this.elementDialog,"keypress",this.dockManager.onKeyPressBound,!0),this.resize(this.panel.elementPanel.clientWidth,this.panel.elementPanel.clientHeight),this.isHidden=!1,null!=this.grayoutParent&&this.grayoutParent.grayOut(!0),this.bringToFront()}},{key:"setPosition",value:function setPosition(e,t){var i=this.dockManager.config.dialogRootElement.getBoundingClientRect();this.position=new l(e-i.left,t-i.top),this.elementDialog.style.left=e-i.left+"px",this.elementDialog.style.top=t-i.top+"px",this.dockManager.notifyOnChangeDialogPosition(this,e,t)}},{key:"getPosition",value:function getPosition(){return new l(this.position?this.position.x:0,this.position?this.position.y:0)}},{key:"onFocus",value:function onFocus(){this.dockManager.activePanel!=this.panel&&(this.dockManager.activePanel=this.panel)}},{key:"onMouseDown",value:function onMouseDown(){this.bringToFront()}},{key:"destroy",value:function destroy(){this.panel.lastDialogSize={width:this.resizable.width,height:this.resizable.height},this.focusHandler&&(this.focusHandler.cancel(),delete this.focusHandler),this.mouseDownHandler&&(this.mouseDownHandler.cancel(),delete this.mouseDownHandler),this.touchDownHandler&&(this.touchDownHandler.cancel(),delete this.touchDownHandler),this.keyPressHandler&&(this.keyPressHandler.cancel(),delete this.keyPressHandler),a.removeNode(this.elementDialog),this.draggable.removeDecorator(),a.removeNode(this.panel.elementPanel),a.arrayRemove(this.dockManager.context.model.dialogs,this),delete this.panel.floatingDialog,this.grayoutParent&&this.grayoutParent.grayOut(!1)}},{key:"resize",value:function resize(e,t){this.resizable.resize(e,t)}},{key:"setTitle",value:function setTitle(e){this.panel.setTitle(e)}},{key:"setTitleIcon",value:function setTitleIcon(e){this.panel.setTitleIcon(e)}},{key:"bringToFront",value:function bringToFront(){this.elementDialog.style.zIndex=this.dockManager.zIndexDialogCounter++,this.dockManager.activePanel=this.panel}},{key:"hide",value:function hide(){this.elementDialog.style.zIndex="0",this.elementDialog.style.display="none",this.isHidden||(this.isHidden=!0,this.dockManager.notifyOnHideDialog(this)),this.grayoutParent&&this.grayoutParent.grayOut(!1)}},{key:"close",value:function close(){this.hide(),this.remove(),this.dockManager.notifyOnClosePanel(this.panel),this.destroy()}},{key:"remove",value:function remove(){this.elementDialog.parentNode.removeChild(this.elementDialog)}},{key:"show",value:function show(){this.elementDialog.style.zIndex=this.dockManager.zIndexDialogCounter++,this.elementDialog.style.display="block",this.isHidden&&(this.isHidden=!1,this.dockManager.notifyOnShowDialog(this))}}],[{key:"fromElement",value:function fromElement(e,t){return new g(new d(document.getElementById(e),t),t,null)}}]);return g}();var p=_createClass(function p(){_classCallCheck(this,p);this.escClosesWindow=!0,this.escClosesDialog=!0,this.dialogRootElement=document.body,this.moveOnlyWithinDockConatiner=!1});var v=function(){function v(){_classCallCheck(this,v)}_createClass(v,[{key:"serialize",value:function serialize(e){var t=this._buildGraphInfo(e.rootNode),i=this._buildDialogsInfo(e.dialogs.sort(function(e,t){return e.elementDialog.style.zIndex-t.elementDialog.style.zIndex}));return JSON.stringify({graphInfo:t,dialogsInfo:i})}},{key:"_buildGraphInfo",value:function _buildGraphInfo(e){var _this7=this;var t={};e.container.saveState(t);var i=[];return e.children.forEach(function(e){i.push(_this7._buildGraphInfo(e))}),{containerType:e.container.containerType,state:t,children:i}}},{key:"_buildDialogsInfo",value:function _buildDialogsInfo(e){var t=[];return e.forEach(function(e){var i={},n=e.panel;n.saveState(i);var s={containerType:n.containerType,state:i,position:e.getPosition(),isHidden:e.isHidden};t.push(s)}),t}}]);return v}();var f=function(){function f(e){_classCallCheck(this,f);this.container=e,this.children=[]}_createClass(f,[{key:"detachFromParent",value:function detachFromParent(){this.parent&&(this.parent.removeChild(this),delete this.parent)}},{key:"removeChild",value:function removeChild(e){var t=this.children.indexOf(e);t>=0&&this.children.splice(t,1)}},{key:"addChild",value:function addChild(e){e.detachFromParent(),e.parent=this,this.children.push(e)}},{key:"addChildBefore",value:function addChildBefore(e,t){this._addChildWithDirection(e,t,!0)}},{key:"addChildAfter",value:function addChildAfter(e,t){this._addChildWithDirection(e,t,!1)}},{key:"_addChildWithDirection",value:function _addChildWithDirection(e,t,i){t.detachFromParent(),t.parent=this;var n=this.children.indexOf(e),s=this.children.slice(0,n),o=this.children.slice(n+1,this.children.length);this.children=s.slice(0),i?(this.children.push(t),this.children.push(e)):(this.children.push(e),this.children.push(t)),Array.prototype.push.apply(this.children,o)}},{key:"performLayout",value:function performLayout(e){var t=this.children.map(function(e){return e.container});this.container.performLayout(t,e)}},{key:"debugDumpTree",value:function debugDumpTree(e){void 0===e&&(e=0);var t=this.container.name;for(var _i2=0;_i2<e;_i2++){t="\t"+t}var i=void 0===this.parent?"null":this.parent.container.containerType;console.log(">>"+t+" ["+i+"]"),this.children.forEach(function(t){t.debugDumpTree(e+1)})}}]);return f}();var w=function(){function w(e,t,i){_classCallCheck(this,w);this.previousContainer=e,this.nextContainer=t,this.stackedVertical=i,this.barElement=document.createElement("div"),this.barElement.classList.add(i?"splitbar-horizontal":"splitbar-vertical"),this.mouseDownHandler=new h(this.barElement,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new h(this.barElement,"touchstart",this.onMouseDown.bind(this)),this.minPanelSize=50,this.readyToProcessNextDrag=!0,this.dockSpawnResizedEvent=new CustomEvent("DockSpawnResizedEvent",{composed:!0,bubbles:!0}),this.iframeEventHandlers=[]}_createClass(w,[{key:"onMouseDown",value:function onMouseDown(e){if(e.touches){if(e.touches.length>1)return;e=e.touches[0]}this._startDragging(e)}},{key:"onMouseUp",value:function onMouseUp(){this._stopDragging()}},{key:"onMouseMovedIframe",value:function onMouseMovedIframe(e,t){null!=e.changedTouches&&(e=e.changedTouches[0]);var i=t.getBoundingClientRect();this.handleMoveEvent({x:e.clientX+i.x,y:e.clientY+i.y})}},{key:"onMouseMoved",value:function onMouseMoved(e){null!=e.changedTouches&&(e=e.changedTouches[0]),this.handleMoveEvent({x:e.clientX,y:e.clientY})}},{key:"handleMoveEvent",value:function handleMoveEvent(e){if(!this.readyToProcessNextDrag)return;this.readyToProcessNextDrag=!1;var t=this.previousContainer.dockManager;t.suspendLayout(this.previousContainer),t.suspendLayout(this.nextContainer);var i=e.x-this.previousMouseEvent.x,n=e.y-this.previousMouseEvent.y;this._performDrag(i,n),this.previousMouseEvent=e,this.readyToProcessNextDrag=!0,t.resumeLayout(this.previousContainer),t.resumeLayout(this.nextContainer)}},{key:"_performDrag",value:function _performDrag(e,t){var i=this.previousContainer.containerElement.clientWidth,n=this.previousContainer.containerElement.clientHeight,s=this.nextContainer.containerElement.clientWidth,o=this.nextContainer.containerElement.clientHeight,l=this.stackedVertical?n:i,a=this.stackedVertical?o:s,h=this.stackedVertical?t:e,r=l+h,d=a-h;(!(r<this.minPanelSize||d<this.minPanelSize)||r<this.minPanelSize&&r>l||d<this.minPanelSize&&d>a)&&(this.stackedVertical?(this.previousContainer.resize(i,r),this.nextContainer.resize(s,d)):(this.previousContainer.resize(r,n),this.nextContainer.resize(d,o)),document.dispatchEvent(this.dockSpawnResizedEvent))}},{key:"_startDragging",value:function _startDragging(e){var _this8=this;if(a.disableGlobalTextSelection(this.previousContainer.dockManager.config.dialogRootElement),this.mouseMovedHandler&&(this.mouseMovedHandler.cancel(),delete this.mouseMovedHandler),this.touchMovedHandler&&(this.touchMovedHandler.cancel(),delete this.touchMovedHandler),this.mouseUpHandler&&(this.mouseUpHandler.cancel(),delete this.mouseUpHandler),this.touchUpHandler&&(this.touchUpHandler.cancel(),delete this.touchUpHandler),this.mouseMovedHandler=new h(window,"mousemove",this.onMouseMoved.bind(this)),this.mouseUpHandler=new h(window,"mouseup",this.onMouseUp.bind(this)),this.touchMovedHandler=new h(window,"touchmove",this.onMouseMoved.bind(this)),this.touchUpHandler=new h(window,"touchend",this.onMouseUp.bind(this)),this.previousContainer.dockManager.iframes){var _iterator6=_createForOfIteratorHelper(this.previousContainer.dockManager.iframes),_step6;try{var _loop3=function _loop3(){var e=_step6.value;var t=_this8.onMouseMovedIframe.bind(_this8);_this8.iframeEventHandlers.push(new h(e.contentWindow,"mousemove",function(i){return t(i,e)})),_this8.iframeEventHandlers.push(new h(e.contentWindow,"mouseup",_this8.onMouseUp.bind(_this8))),_this8.iframeEventHandlers.push(new h(e.contentWindow,"touchmove",function(i){return t(i,e)})),_this8.iframeEventHandlers.push(new h(e.contentWindow,"touchend",_this8.onMouseUp.bind(_this8)))};for(_iterator6.s();!(_step6=_iterator6.n()).done;){_loop3()}}catch(err){_iterator6.e(err)}finally{_iterator6.f()}}this.previousMouseEvent={x:e.clientX,y:e.clientY}}},{key:"_stopDragging",value:function _stopDragging(){a.enableGlobalTextSelection(this.previousContainer.dockManager.config.dialogRootElement),this.mouseMovedHandler&&(this.mouseMovedHandler.cancel(),delete this.mouseMovedHandler),this.touchMovedHandler&&(this.touchMovedHandler.cancel(),delete this.touchMovedHandler),this.mouseUpHandler&&(this.mouseUpHandler.cancel(),delete this.mouseUpHandler),this.touchUpHandler&&(this.touchUpHandler.cancel(),delete this.touchUpHandler);var _iterator7=_createForOfIteratorHelper(this.iframeEventHandlers),_step7;try{for(_iterator7.s();!(_step7=_iterator7.n()).done;){var _e4=_step7.value;_e4.cancel()}}catch(err){_iterator7.e(err)}finally{_iterator7.f()}this.iframeEventHandlers=[]}}]);return w}();var M=function(){function M(e,t){_classCallCheck(this,M);this.childContainers=e,this.stackedVertical=t,this.panelElement=document.createElement("div"),this.spiltterBars=[],this._buildSplitterDOMAndAddElements()}_createClass(M,[{key:"_buildSplitterDOMAndAddElements",value:function _buildSplitterDOMAndAddElements(){if(this.childContainers.length<=1)throw new Error("Splitter panel should contain atleast 2 panels");this.spiltterBars=[];var e=null;for(var _t2=0;_t2<this.childContainers.length-1;_t2++){var _i3=this.childContainers[_t2],_n3=this.childContainers[_t2+1],_s2=new w(_i3,_n3,this.stackedVertical);this.spiltterBars.push(_s2),Array.from(this.panelElement.children).includes(_i3.containerElement)||this._insertContainerIntoPanel(_i3,e),this.panelElement.insertBefore(_s2.barElement,_i3.containerElement.nextSibling),e=_s2.barElement}var t=this.childContainers.slice(-1)[0];Array.from(this.panelElement.children).includes(t.containerElement)||this._insertContainerIntoPanel(t,e)}},{key:"performLayout",value:function performLayout(e,t){a.arrayEqual(this.childContainers,e)&&!t||(this.childContainers.forEach(function(t){e.some(function(e){return e==t})||t.containerElement&&(t.containerElement.classList.remove("splitter-container-vertical"),t.containerElement.classList.remove("splitter-container-horizontal"),a.removeNode(t.containerElement))}),this.spiltterBars.forEach(function(e){a.removeNode(e.barElement)}),this.childContainers=e,this._buildSplitterDOMAndAddElements())}},{key:"removeFromDOM",value:function removeFromDOM(){this.childContainers.forEach(function(e){e.containerElement&&(e.containerElement.classList.remove("splitter-container-vertical"),e.containerElement.classList.remove("splitter-container-horizontal"),a.removeNode(e.containerElement))}),this.spiltterBars.forEach(function(e){a.removeNode(e.barElement)})}},{key:"destroy",value:function destroy(){this.removeFromDOM(),this.panelElement.parentNode.removeChild(this.panelElement)}},{key:"_insertContainerIntoPanel",value:function _insertContainerIntoPanel(e,t){e?(e.containerElement.parentNode!=this.panelElement&&(a.removeNode(e.containerElement),t?this.panelElement.insertBefore(e.containerElement,t.nextSibling):this.panelElement.children.length>0?this.panelElement.insertBefore(e.containerElement,this.panelElement.children[0]):this.panelElement.appendChild(e.containerElement)),e.containerElement.classList.add(this.stackedVertical?"splitter-container-vertical":"splitter-container-horizontal")):console.error("container is undefined")}},{key:"setContainerRatio",value:function setContainerRatio(e,t){var i=this.stackedVertical?this.panelElement.clientHeight:this.panelElement.clientWidth,n=i*t,s=(i-n-(this.stackedVertical?this.spiltterBars[0].barElement.clientHeight:this.spiltterBars[0].barElement.clientWidth)*this.spiltterBars.length)/i;for(var _t3=0;_t3<this.childContainers.length;_t3++){var _i4=void 0,_o=this.childContainers[_t3];_o!==e?(_i4=this.stackedVertical?_o.containerElement.parentElement.clientHeight:_o.containerElement.parentElement.clientWidth,_i4*=s):_i4=n,this.stackedVertical?_o.resize(_o.width,Math.floor(_i4)):_o.resize(Math.floor(_i4),_o.height)}}},{key:"getRatios",value:function getRatios(){var e=this.stackedVertical?this.spiltterBars[0].barElement.clientHeight:this.spiltterBars[0].barElement.clientWidth,t=(this.stackedVertical?this.panelElement.clientHeight:this.panelElement.clientWidth)-e*this.spiltterBars.length,i=[];for(var _e5=0;_e5<this.childContainers.length;_e5++){var _n4=this.childContainers[_e5],_s3=this.stackedVertical?_n4.containerElement.clientHeight:_n4.containerElement.clientWidth;i.push(_s3/t)}return i}},{key:"setRatios",value:function setRatios(e){var t=this.stackedVertical?this.spiltterBars[0].barElement.clientHeight:this.spiltterBars[0].barElement.clientWidth,i=(this.stackedVertical?this.panelElement.clientHeight:this.panelElement.clientWidth)-t*this.spiltterBars.length;for(var _t4=0;_t4<this.childContainers.length;_t4++){var _n5=this.childContainers[_t4],_s4=i*e[_t4];this.stackedVertical?_n5.resize(_n5.width,Math.floor(_s4)):_n5.resize(Math.floor(_s4),_n5.height)}}},{key:"resize",value:function resize(e,t){var _this9=this;if(this.childContainers.length<=1)return;var i;for(i=0;i<this.childContainers.length;i++){var _n6=this.childContainers[i];if(this.stackedVertical?_n6.resize(e,_n6.height?_n6.height:t):_n6.resize(_n6.width?_n6.width:e,t),i<this.spiltterBars.length){var _n7=this.spiltterBars[i];this.stackedVertical?_n7.barElement.style.width=e+"px":_n7.barElement.style.height=t+"px"}}var n=0;this.childContainers.forEach(function(e){var t=_this9.stackedVertical?e.height:e.width;n+=t});var s=this.spiltterBars[0].barElement.getBoundingClientRect();var o=this.stackedVertical?s.height:s.width,l=this.stackedVertical?t:e;l-=o*this.spiltterBars.length,n=Math.max(n,1);var a=l/n,h=0;for(i=0;i<this.childContainers.length;i++){var _e6=this.childContainers[i];"none"==_e6.containerElement.style.display&&(_e6.containerElement.style.display="block");var _t5=this.stackedVertical?_e6.containerElement.clientHeight:_e6.containerElement.clientWidth,_n8=a>1?Math.floor(_t5*a):Math.ceil(_t5*a);h+=_n8,i===this.childContainers.length-1&&(_n8+=l-h),this.stackedVertical?_e6.resize(_e6.width,_n8):_e6.resize(_n8,_e6.height)}this.panelElement.style.width=e+"px",this.panelElement.style.height=t+"px"}}]);return M}();var k=function(){function k(e,t,i,n){_classCallCheck(this,k);0!==arguments.length&&(this.name=e,this.dockManager=t,this.stackedVertical=n,this.splitterPanel=new M(i,this.stackedVertical),this.containerElement=this.splitterPanel.panelElement,this.minimumAllowedChildNodes=2)}_createClass(k,[{key:"resize",value:function resize(e,t){this.splitterPanel.resize(e,t),this._cachedWidth=e,this._cachedHeight=t}},{key:"performLayout",value:function performLayout(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;this.splitterPanel.performLayout(e,t)}},{key:"setActiveChild",value:function setActiveChild(){}},{key:"destroy",value:function destroy(){this.splitterPanel.destroy()}},{key:"setContainerRatio",value:function setContainerRatio(e,t){this.splitterPanel.setContainerRatio(e,t),this.resize(this.width,this.height)}},{key:"getRatios",value:function getRatios(){return this.splitterPanel.getRatios()}},{key:"setRatios",value:function setRatios(e){this.splitterPanel.setRatios(e),this.resize(this.width,this.height)}},{key:"saveState",value:function saveState(e){e.width=this.width,e.height=this.height}},{key:"loadState",value:function loadState(e){this.state={width:e.width,height:e.height}}},{key:"width",get:function get(){return void 0===this._cachedWidth&&(this._cachedWidth=this.splitterPanel.panelElement.clientWidth),this._cachedWidth}},{key:"height",get:function get(){return void 0===this._cachedHeight&&(this._cachedHeight=this.splitterPanel.panelElement.clientHeight),this._cachedHeight}}]);return k}();var y=function(_k){_inherits(y,_k);var _super=_createSuper(y);function y(t,i){var _this10;_classCallCheck(this,y);_this10=_super.call(this,a.getNextId("horizontal_splitter_"),t,i,!1),_this10.containerType=e.horizontal;return _this10}return _createClass(y)}(k);var C=function(_k2){_inherits(C,_k2);var _super2=_createSuper(C);function C(t,i){var _this11;_classCallCheck(this,C);_this11=_super2.call(this,a.getNextId("vertical_splitter_"),t,i,!0),_this11.containerType=e.vertical;return _this11}return _createClass(C)}(k);var b=function(){function b(e){var _this12=this;_classCallCheck(this,b);this.parent=e;var t=this._performUndock.bind(this);this.elementBase=document.createElement("div"),this.elementText=document.createElement("div"),this.elementCloseButton=document.createElement("div"),this.elementBase.classList.add("dockspan-tab-handle"),this.elementBase.classList.add("disable-selection"),this.elementText.classList.add("dockspan-tab-handle-text"),this.elementCloseButton.classList.add("dockspan-tab-handle-close-button"),this.elementBase.appendChild(this.elementText),this.parent.host.displayCloseButton&&this.elementBase.appendChild(this.elementCloseButton),(this.parent.container._hideCloseButton||this.parent.container._grayOut)&&(this.elementCloseButton.style.display="none"),this.parent.host.tabListElement.appendChild(this.elementBase);var i=e.container,n=i.getRawTitle();this.undockListener={onDockEnabled:function onDockEnabled(e){_this12.undockEnabled(e.state)},onHideCloseButton:function onHideCloseButton(e){_this12.hideCloseButton(e.state)}},this.eventListeners=[],i.addListener(this.undockListener),this.elementText.innerHTML=n,this.elementText.title=this.elementText.innerText,this._bringToFront(this.elementBase),this.undockInitiator=new r(this.elementBase,t),this.undockInitiator.enabled=!0,this.mouseDownHandler=new h(this.elementBase,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new h(this.elementBase,"touchstart",this.onMouseDown.bind(this),{passive:!1}),this.closeButtonHandler=new h(this.elementCloseButton,"click",this.onCloseButtonClicked.bind(this)),this.closeButtonTouchHandler=new h(this.elementCloseButton,"touchstart",this.onCloseButtonClicked.bind(this)),this.auxClickHandler=new h(this.elementBase,"auxclick",this.onCloseButtonClicked.bind(this)),this.contextMenuHandler=new h(this.elementBase,"contextmenu",this.oncontextMenuClicked.bind(this)),this.zIndexCounter=e.host.dockManager.zIndexTabHandle}_createClass(b,[{key:"addListener",value:function addListener(e){this.eventListeners.push(e)}},{key:"removeListener",value:function removeListener(e){this.eventListeners.splice(this.eventListeners.indexOf(e),1)}},{key:"undockEnabled",value:function undockEnabled(e){this.undockInitiator.enabled=e}},{key:"oncontextMenuClicked",value:function oncontextMenuClicked(e){e.preventDefault(),!this._ctxMenu&&b.createContextMenuContentCallback?(this._ctxMenu=document.createElement("div"),this._ctxMenu.className="dockspab-tab-handle-context-menu",b.createContextMenuContentCallback(this,this._ctxMenu,this.parent.container.dockManager.context.model.documentManagerNode.children),this._ctxMenu.style.left=e.pageX+"px",this._ctxMenu.style.top=e.pageY+"px",document.body.appendChild(this._ctxMenu),this._windowsContextMenuCloseBound=this.windowsContextMenuClose.bind(this),window.addEventListener("mouseup",this._windowsContextMenuCloseBound)):this.closeContextMenu()}},{key:"closeContextMenu",value:function closeContextMenu(){this._ctxMenu&&(document.body.removeChild(this._ctxMenu),delete this._ctxMenu,window.removeEventListener("mouseup",this._windowsContextMenuCloseBound))}},{key:"windowsContextMenuClose",value:function windowsContextMenuClose(e){var t=e.composedPath();for(var _e7 in t){if(t[_e7]==this._ctxMenu)return}this.closeContextMenu()}},{key:"onMouseDown",value:function onMouseDown(e){e.preventDefault(),this.parent.onSelected(),this.mouseMoveHandler&&(this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler),this.touchMoveHandler&&(this.touchMoveHandler.cancel(),delete this.touchMoveHandler),this.mouseUpHandler&&(this.mouseUpHandler.cancel(),delete this.mouseUpHandler),this.touchUpHandler&&(this.touchUpHandler.cancel(),delete this.touchUpHandler),this.stargDragPosition=e.clientX,this.mouseMoveHandler=new h(window,"mousemove",this.onMouseMove.bind(this)),this.touchMoveHandler=new h(window,"touchmove",this.onMouseMove.bind(this),{passive:!1}),this.mouseUpHandler=new h(window,"mouseup",this.onMouseUp.bind(this)),this.touchUpHandler=new h(window,"touchend",this.onMouseUp.bind(this))}},{key:"onMouseUp",value:function onMouseUp(e){this.elementBase&&this.elementBase.classList.remove("dockspan-tab-handle-dragged"),this.dragged=!1,this.mouseMoveHandler&&this.mouseMoveHandler.cancel(),this.touchMoveHandler&&this.touchMoveHandler.cancel(),this.mouseUpHandler&&this.mouseUpHandler.cancel(),this.touchUpHandler&&this.touchUpHandler.cancel(),delete this.mouseMoveHandler,delete this.touchMoveHandler,delete this.mouseUpHandler,delete this.touchUpHandler}},{key:"moveTabEvent",value:function moveTabEvent(e,t){e.eventListeners.forEach(function(i){i.onMoveTab&&i.onMoveTab({self:e,state:t})})}},{key:"onMouseMove",value:function onMouseMove(e){if(e.preventDefault(),!(Math.abs(this.stargDragPosition-e.clientX)<10)&&null!=this.elementBase){this.elementBase.classList.add("dockspan-tab-handle-dragged"),this.dragged=!0,this.prev=this.current,this.current=e.clientX,this.direction=this.current-this.prev;var _t6=this.elementBase.getBoundingClientRect(),_i5=this.direction<0?{state:"left",bound:_t6.left,rect:_t6}:{state:"right",bound:_t6.right,rect:_t6};(e.clientX<_t6.left&&this.direction<0||e.clientX>_t6.left+_t6.width&&this.direction>0)&&this.moveTabEvent(this,_i5.state)}}},{key:"hideCloseButton",value:function hideCloseButton(e){this.elementCloseButton.style.display=e?"none":"block"}},{key:"updateTitle",value:function updateTitle(){if(this.parent.container instanceof d){var _e8=this.parent.container.getRawTitle();this.elementText.innerHTML=_e8}}},{key:"destroy",value:function destroy(){this.parent.container.removeListener(this.undockListener),this.mouseDownHandler.cancel(),this.touchDownHandler.cancel(),this.closeButtonHandler.cancel(),this.closeButtonTouchHandler.cancel(),this.auxClickHandler.cancel(),this.mouseMoveHandler&&this.mouseMoveHandler.cancel(),this.touchMoveHandler&&this.touchMoveHandler.cancel(),this.mouseUpHandler&&this.mouseUpHandler.cancel(),this.touchUpHandler&&this.touchUpHandler.cancel(),this.contextMenuHandler&&this.contextMenuHandler.cancel(),a.removeNode(this.elementBase),a.removeNode(this.elementCloseButton),delete this.elementBase,delete this.elementCloseButton}},{key:"_performUndock",value:function _performUndock(e,t){return"panel"===this.parent.container.containerType?(this.undockInitiator.enabled=!1,this.parent.container.performUndockToDialog(e,t)):null}},{key:"onCloseButtonClicked",value:function onCloseButtonClicked(e){"none"!==this.elementCloseButton.style.display&&2!==e.button&&"panel"===this.parent.container.containerType&&this.parent.container.close()}},{key:"setSelected",value:function setSelected(e){e?this.elementBase.classList.add("dockspan-tab-handle-selected"):(this.elementBase.classList.remove("dockspan-tab-handle-selected"),this.elementBase.classList.remove("dockspan-tab-handle-active"))}},{key:"setActive",value:function setActive(e){this.elementBase&&(e?this.elementBase.classList.add("dockspan-tab-handle-active"):this.elementBase.classList.remove("dockspan-tab-handle-active"))}},{key:"setZIndex",value:function setZIndex(e){this.elementBase.style.zIndex=e}},{key:"_bringToFront",value:function _bringToFront(e){e.style.zIndex=this.zIndexCounter,this.zIndexCounter++}}]);return b}();b.createContextMenuContentCallback=function(e,i,n){var s=document.createElement("div");s.innerText="Close all documents",i.append(s);var o=document.createElement("div");o.innerText="Close all documents but this",i.append(o),s.onclick=function(){for(var _e9=n.length-1;_e9>=0;_e9--){var _i6=n[_e9].container;_i6.panelType==t.document&&_i6.close()}e.closeContextMenu()},o.onclick=function(){for(var _i7=n.length-1;_i7>=0;_i7--){var _s5=n[_i7].container;e.parent.container!=_s5&&_s5.panelType==t.document&&_s5.close()}e.closeContextMenu()}};var E=function(){function E(e,t){_classCallCheck(this,E);0!==arguments.length&&(this.selected=!1,this.host=e,this.container=t,this.handle=new b(this),this.containerElement=t.containerElement,t instanceof d&&(this.panel=t,this.panel.onTitleChanged=this.onTitleChanged.bind(this),this.onTitleChanged()),t.tabPage=this)}_createClass(E,[{key:"onTitleChanged",value:function onTitleChanged(){this.handle.updateTitle(),this.panel&&(this.panel.hasChanges?this.handle.elementText.classList.add("panel-has-changes"):this.handle.elementText.classList.remove("panel-has-changes"))}},{key:"destroy",value:function destroy(){this.handle.destroy(),this.container instanceof d&&delete this.container.onTitleChanged,this.host.dockManager.activePanel==this.panel&&(this.host.dockManager.activePanel=null),this.container.tabPage=null,a.removeNode(this.containerElement)}},{key:"onSelected",value:function onSelected(){this.host.onTabPageSelected(this),this.container instanceof d&&this.container.dockManager.notifyOnTabChange(this)}},{key:"setSelected",value:function setSelected(e){if(this.selected=e,this.handle.setSelected(e),this._initContent||this.host.contentElement.appendChild(this.containerElement),this._initContent=!0,this.selected){this.containerElement.style.display="block";var _e10=this.host.contentElement.clientWidth,_t7=this.host.contentElement.clientHeight;this.container.resize(_e10,_t7),this.host.dockManager.activePanel=this.container}else this.containerElement.style.display="none"}},{key:"resize",value:function resize(e,t){this.container.resize(e,t)}}]);return E}();!function(e){e[e.TOP=0]="TOP",e[e.BOTTOM=1]="BOTTOM",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT"}(i||(i={}));var H=function(){function H(e,t,n){var _this13=this;_classCallCheck(this,H);if(void 0===t&&(t=i.BOTTOM),void 0===n&&(n=!1),this.dockManager=e,this.tabStripDirection=t,this.displayCloseButton=n,this.pages=[],this.eventListeners=[],this.tabHandleListener={onMoveTab:function onMoveTab(e){_this13.onMoveTab(e)}},this.hostElement=document.createElement("div"),this.tabListElement=document.createElement("div"),this.separatorElement=document.createElement("div"),this.contentElement=document.createElement("div"),this.contentElement.tabIndex=0,this.createTabPage=this._createDefaultTabPage,this.tabStripDirection===i.BOTTOM)this.hostElement.appendChild(this.contentElement),this.hostElement.appendChild(this.separatorElement),this.hostElement.appendChild(this.tabListElement);else{if(this.tabStripDirection!==i.TOP)throw new Error("Only top and bottom tab strip orientations are supported");this.hostElement.appendChild(this.tabListElement),this.hostElement.appendChild(this.separatorElement),this.hostElement.appendChild(this.contentElement)}this.hostElement.classList.add("dockspan-tab-host"),this.tabListElement.classList.add("dockspan-tab-handle-list-container"),this.separatorElement.classList.add("dockspan-tab-handle-content-seperator"),this.contentElement.classList.add("dockspan-tab-content"),this.contentElement.tabIndex=0,this.focusHandler=new h(this.contentElement,"focus",this.onFocus.bind(this),!0),this.mouseDownHandler=new h(this.contentElement,"mousedown",this.onMousedown.bind(this),!0)}_createClass(H,[{key:"onFocus",value:function onFocus(){this.activeTab&&this.dockManager.activePanel!=this.activeTab.panel&&(this.dockManager.activePanel=this.activeTab.panel)}},{key:"setActive",value:function setActive(e){e?this.separatorElement.classList.add("dockspan-tab-handle-content-seperator-active"):this.separatorElement.classList.remove("dockspan-tab-handle-content-seperator-active"),this.activeTab&&this.activeTab.handle.setActive(e)}},{key:"onMousedown",value:function onMousedown(){this.activeTab&&this.dockManager.activePanel!=this.activeTab.panel&&(this.dockManager.activePanel=this.activeTab.panel)}},{key:"onMoveTab",value:function onMoveTab(e){var t=Array.prototype.slice.call(this.tabListElement.childNodes).indexOf(e.self.elementBase);this.change(this,e.self,e.state,t)}},{key:"performTabsLayout",value:function performTabsLayout(e){this.pages=a.orderByIndexes(this.pages,e);var t=this.tabListElement.childNodes,i=[];for(var _e11 in t){1===t[_e11].nodeType&&i.push(t[_e11])}i=a.orderByIndexes(i,e);for(var _e12=0;_e12<i.length;++_e12){this.tabListElement.appendChild(i[_e12])}this.activeTab&&this.onTabPageSelected(this.activeTab)}},{key:"getActiveTab",value:function getActiveTab(){return this.activeTab}},{key:"addListener",value:function addListener(e){this.eventListeners.push(e)}},{key:"removeListener",value:function removeListener(e){this.eventListeners.splice(this.eventListeners.indexOf(e),1)}},{key:"change",value:function change(e,t,i,n){this.eventListeners.forEach(function(s){s.onChange&&s.onChange({host:e,handle:t,state:i,index:n})})}},{key:"_createDefaultTabPage",value:function _createDefaultTabPage(e,t){return new E(e,t)}},{key:"setActiveTab",value:function setActiveTab(e){var t;this.pages.forEach(function(i){i.container===e&&(t=i)}),this.pages.length>0&&t&&(this.onTabPageSelected(t),this.dockManager.activePanel=e)}},{key:"resize",value:function resize(e,t){var _this14=this;this.hostElement.style.width=e+"px",this.hostElement.style.height=t+"px";var i=this.tabListElement.clientHeight;this._resizeRequested||requestAnimationFrame(function(){return _this14.resizeTabListElement(e,t)}),this._resizeRequested=!0;var n=this.separatorElement.clientHeight,s=t-i-n;this.contentElement.style.height=s+"px",this.activeTab&&this.activeTab.resize(e,s)}},{key:"resizeTabListElement",value:function resizeTabListElement(e,t){var _this15=this;if(this._resizeRequested=!1,0===this.pages.length)return;var i=0;this.pages.forEach(function(e){var t=e.handle;t.elementBase.style.width="",i+=t.elementBase.clientWidth});var n=e/i;n>1.2||this.pages.forEach(function(e,t){var i=e.handle,s=n*i.elementBase.clientWidth;t===_this15.pages.length-1&&(s-=5),i.elementBase.style.width=s+"px"})}},{key:"performLayout",value:function performLayout(e){var _this16=this;this.pages.forEach(function(t){if(!e.some(function(e){return e==t.container})){t.handle.removeListener(_this16.tabHandleListener),t.destroy();var _e13=_this16.pages.indexOf(t);_e13>-1&&_this16.pages.splice(_e13,1)}});var t=this.activeTab;delete this.activeTab;var i=e.filter(function(e){return"panel"===e.containerType});i.length>0?(i.forEach(function(e){var i=null;_this16.pages.some(function(t){return t.container==e&&(i=t,!0)})||(i=_this16.createTabPage(_this16,e),i.handle.addListener(_this16.tabHandleListener),_this16.pages.push(i)),t&&i.container===t.container&&(_this16.activeTab=i)}),this._setTabHandlesVisible(!0)):this._setTabHandlesVisible(!1),this.activeTab&&this.onTabPageSelected(this.activeTab)}},{key:"_setTabHandlesVisible",value:function _setTabHandlesVisible(e){e?(this.tabListElement.classList.add("dockspan-tab-handle-list-container-visible"),this.separatorElement.classList.add("dockspan-tab-handle-content-seperator-visible")):(this.tabListElement.classList.remove("dockspan-tab-handle-list-container-visible"),this.separatorElement.classList.remove("dockspan-tab-handle-content-seperator-visible"))}},{key:"onTabPageSelected",value:function onTabPageSelected(e){this.activeTab=e,this.pages.forEach(function(t){var i=t===e;t.setSelected(i)});var t=1,i=this.dockManager.zIndexTabHost;this.pages.forEach(function(n){n.handle.setZIndex(i),n===e&&(t=-1),i+=t})}}]);return H}();var D=function(){function D(t,n){var _this17=this;_classCallCheck(this,D);void 0===n&&(n=i.BOTTOM),this.dockManager=t,this.tabOrientation=n,this.name=a.getNextId("fill_"),this.element=document.createElement("div"),this.containerElement=this.element,this.containerType=e.fill,this.minimumAllowedChildNodes=2,this.element.classList.add("dock-container"),this.element.classList.add("dock-container-fill"),this.tabHost=new H(t,this.tabOrientation),this.tabHostListener={onChange:function onChange(e){_this17.dockManager._requestTabReorder(_this17,e)}},this.tabHost.addListener(this.tabHostListener),this.element.appendChild(this.tabHost.hostElement)}_createClass(D,[{key:"setActiveChild",value:function setActiveChild(e){this.tabHost.setActiveTab(e)}},{key:"resize",value:function resize(e,t){this.element.style.width=e+"px",this.element.style.height=t+"px",this.tabHost.resize(e,t)}},{key:"performLayout",value:function performLayout(e){this.tabHost.performLayout(e)}},{key:"destroy",value:function destroy(){a.removeNode(this.element)&&delete this.element}},{key:"saveState",value:function saveState(e){e.width=this.width,e.height=this.height}},{key:"loadState",value:function loadState(e){this.state={width:e.width,height:e.height}}},{key:"width",get:function get(){return this.element.clientWidth},set:function set(e){this.element.style.width=e+"px"}},{key:"height",get:function get(){return this.element.clientHeight},set:function set(e){this.element.style.height=e+"px"}}]);return D}();var x=function(){function x(e){_classCallCheck(this,x);this._forceResizeCompositeContainer=function(e){var t=e.containerElement.clientWidth,i=e.containerElement.clientHeight;e.resize(t,i)},this.dockManager=e}_createClass(x,[{key:"dockLeft",value:function dockLeft(e,t){this._performDock(e,t,"horizontal",!0)}},{key:"dockRight",value:function dockRight(e,t){this._performDock(e,t,"horizontal",!1)}},{key:"dockUp",value:function dockUp(e,t){this._performDock(e,t,"vertical",!0)}},{key:"dockDown",value:function dockDown(e,t){this._performDock(e,t,"vertical",!1)}},{key:"dockFill",value:function dockFill(e,t){this._performDock(e,t,"fill",!1)}},{key:"undock",value:function undock(e){var t=e.parent;if(!t)throw new Error("Cannot undock. panel is not a leaf node");var i=t.children.indexOf(e);if(e.detachFromParent(),t.children.length<t.container.minimumAllowedChildNodes){var _e14=t.parent;for(var _i8=0;_i8<t.children.length;_i8++){var _n9=t.children[_i8];if(_e14){_e14.addChildAfter(t,_n9),t.detachFromParent();var _i9=t.container.containerElement.clientWidth,_s6=t.container.containerElement.clientHeight;t.container.destroy(),_n9.container.resize(_i9,_s6),_e14.performLayout(!1)}else t.detachFromParent(),t.container.destroy(),this.dockManager.setRootNode(_n9)}}else if(t.performLayout(!1),t.children.length>0){var _e15=t.children[Math.max(0,i-1)];t.container.setActiveChild(_e15.container)}this.dockManager.invalidate(),this.dockManager.notifyOnUnDock(e)}},{key:"close",value:function close(e){var t=e.parent;if(!t)throw new Error("Cannot undock. panel is not a leaf node");var i=!1;t.children.length>0&&null!=t.container.tabHost&&(i=t.container.tabHost.getActiveTab().container==e.container);var n=t.children.indexOf(e);if(e.detachFromParent(),t.children.length<t.container.minimumAllowedChildNodes){var _e16=t.parent;for(var _i10=0;_i10<t.children.length;_i10++){var _n10=t.children[_i10];if(_e16){_e16.addChildAfter(t,_n10),t.detachFromParent();var _i11=t.container.containerElement.clientWidth,_s7=t.container.containerElement.clientHeight;_n10.container.resize(_i11,_s7),t.container.destroy(),_e16.performLayout(!1)}else t.detachFromParent(),t.container.destroy(),this.dockManager.setRootNode(_n10)}}else if(t.performLayout(!1),i){var _e17=t.children[Math.max(0,n-1)];null!=_e17&&t.container.setActiveChild(_e17.container)}this.dockManager.invalidate(),this.dockManager.notifyOnUnDock(e)}},{key:"reorderTabs",value:function reorderTabs(e,t,i,n){var s=e.children.length,o="left"===i?n:n+1;if("right"==i&&o>=e.children.length)return;if("left"==i&&0==o)return;var l=Array.apply(null,{length:s}).map(Number.call,Number),h=l.splice(o,1)[0];l.splice("left"===i?n-1:n,0,h),e.children=a.orderByIndexes(e.children,l),e.container.tabHost.performTabsLayout(l),this.dockManager.notifyOnTabsReorder(e)}},{key:"_performDock",value:function _performDock(e,t,i,n){if(e.parent&&"fill"===e.parent.container.containerType&&(e=e.parent),"fill"===i&&"fill"===e.container.containerType)return e.addChild(t),e.performLayout(!1),e.container.setActiveChild(t.container),this.dockManager.invalidate(),void this.dockManager.notifyOnDock(t);var s,o,l;if(e===this.dockManager.context.model.rootNode)return n?(s=this._createDockContainer(i,t,e),o=new f(s),o.addChild(t),o.addChild(e)):(s=this._createDockContainer(i,e,t),o=new f(s),o.addChild(e),o.addChild(t)),this.dockManager.setRootNode(o),this.dockManager.rebuildLayout(this.dockManager.context.model.rootNode),o.container.setActiveChild(t.container),this.dockManager.invalidate(),void this.dockManager.notifyOnDock(t);if(e.parent.container.containerType!==i){l=e.parent;var _h=e.container.containerElement.clientWidth,_r=e.container.containerElement.clientHeight,_d=l.container.containerElement.clientWidth,_c=l.container.containerElement.clientHeight;s=this._createDockContainer(i,t,e),o=new f(s),l.addChildAfter(e,o),e.detachFromParent(),a.removeNode(e.container.containerElement),n?(o.addChild(t),o.addChild(e)):(o.addChild(e),o.addChild(t)),l.performLayout(!1),o.performLayout(!0),o.container.setActiveChild(t.container),o.container.resize(_h,_r),l.container.resize(_d,_c)}else l=e.parent,n?l.addChildBefore(e,t):l.addChildAfter(e,t),l.performLayout(!1),l.container.setActiveChild(t.container);var h=t.container.containerElement.clientWidth,r=t.container.containerElement.clientHeight;t.container.resize(h,r),this.dockManager.invalidate(),this.dockManager.notifyOnDock(t)}},{key:"_createDockContainer",value:function _createDockContainer(e,t,i){if("horizontal"===e)return new y(this.dockManager,[t.container,i.container]);if("vertical"===e)return new C(this.dockManager,[t.container,i.container]);if("fill"===e)return new D(this.dockManager);throw new Error("Failed to create dock container of type: "+e)}},{key:"getDockBounds",value:function getDockBounds(e,t,i,n){var s,o,l,a;if("fill"===i){var _t8=e.container.containerElement,_i12=this.dockManager.element.getBoundingClientRect(),_n11=_t8.getBoundingClientRect();return{x:_n11.left-_i12.left,y:_n11.top-_i12.top,width:_t8.clientWidth,height:_t8.clientHeight}}e.parent&&"fill"===e.parent.container.containerType&&(e=e.parent);var h=!1;e.parent&&e.parent.container.containerType===i?(s=e.parent,o=s.children.length,l=s.children.indexOf(e)+(n?0:1)):(s=e,o=1,l=n?0:1,h=!0);var r=0,d=0;if("vertical"===i||"horizontal"===i){var _e18=this._getVaringDimension(s.container,i)-5*(o-1),_a=this._getVaringDimension(t,i),_c2=_e18/(_e18+_a);if(r=_a*_c2,h)d=n?0:_e18*_c2;else{for(var _e19=0;_e19<l;_e19++){d+=this._getVaringDimension(s.children[_e19].container,i)}d*=_c2}}a={};var c=this.dockManager.element.getBoundingClientRect(),u=s.container.containerElement.getBoundingClientRect();return"vertical"===i?(a.x=u.left-c.left,a.y=u.top-c.top+d,a.width=s.container.width,a.height=r):"horizontal"===i&&(a.x=u.left-c.left+d,a.y=u.top-c.top,a.width=r,a.height=s.container.height),a}},{key:"_getVaringDimension",value:function _getVaringDimension(e,t){return"vertical"===t?e.height:"horizontal"===t?e.width:0}}]);return x}();var T=function(){function T(e,t){_classCallCheck(this,T);this.wheel=e,this.id=t;var i=t.replace("-s","");this.element=document.createElement("div"),this.element.classList.add("dock-wheel-item"),this.element.classList.add("disable-selection"),this.element.classList.add("dock-wheel-"+i),this.element.classList.add("dock-wheel-"+i+"-icon"),this.hoverIconClass="dock-wheel-"+i+"-icon-hover",this.mouseOverHandler=new h(this.element,"mouseover",this.onMouseMoved.bind(this)),this.mouseOutHandler=new h(this.element,"mouseout",this.onMouseOut.bind(this)),this.active=!1}_createClass(T,[{key:"onMouseMoved",value:function onMouseMoved(){this.active=!0,this.element.classList.add(this.hoverIconClass),this.wheel.onMouseOver(this)}},{key:"onMouseOut",value:function onMouseOut(){this.active=!1,this.element.classList.remove(this.hoverIconClass),this.wheel.onMouseOut()}}]);return T}();!function(e){e.left="left",e.right="right",e.top="top",e.down="down",e.fill="fill",e["left-s"]="left-s",e["right-s"]="right-s",e["top-s"]="top-s",e["down-s"]="down-s"}(n||(n={}));var _=function(){function _(e){_classCallCheck(this,_);this.dockManager=e,this.elementMainWheel=document.createElement("div"),this.elementSideWheel=document.createElement("div"),this.wheelItems={};for(var _e20 in n){this.wheelItems[_e20]=new T(this,_e20),"-s"===_e20.substr(-2,2)?this.elementSideWheel.appendChild(this.wheelItems[_e20].element):this.elementMainWheel.appendChild(this.wheelItems[_e20].element)}this.elementMainWheel.classList.add("dock-wheel-base"),this.elementSideWheel.classList.add("dock-wheel-base"),this.elementMainWheel.style.zIndex=String(9000001),this.elementSideWheel.style.zIndex=String(9e6),this.elementPanelPreview=document.createElement("div"),this.elementPanelPreview.classList.add("dock-wheel-panel-preview"),this.elementPanelPreview.style.zIndex=String(8999999),this.activeDialog=void 0,this._activeNode=void 0,this._visible=!1}_createClass(_,[{key:"activeNode",get:function get(){return this._activeNode},set:function set(e){var t=this._activeNode;this._activeNode=e,t!==this._activeNode&&this._visible&&this.showWheel()}},{key:"showWheel",value:function showWheel(){if(this._visible=!0,!this.activeNode)return a.removeNode(this.elementMainWheel),void a.removeNode(this.elementSideWheel);var e=this.activeNode.container.containerElement,t=e.clientWidth,i=e.clientHeight,s=Math.floor(t/2),o=Math.floor(i/2),l=e.getBoundingClientRect(),h=this.dockManager.element.getBoundingClientRect();this.elementMainWheel.style.left=l.left-h.left+s+"px",this.elementMainWheel.style.top=l.top-h.top+o+"px";var r=this.dockManager.element.clientWidth,d=this.dockManager.element.clientHeight;a.removeNode(this.elementMainWheel),a.removeNode(this.elementSideWheel),this.dockManager.element.appendChild(this.elementMainWheel),this.dockManager.element.appendChild(this.elementSideWheel),this._setWheelButtonPosition(n["left-s"],20,-d/2),this._setWheelButtonPosition(n["right-s"],r-40,-d/2),this._setWheelButtonPosition(n["top-s"],r/2,20-d),this._setWheelButtonPosition(n["down-s"],r/2,-20)}},{key:"_setWheelButtonPosition",value:function _setWheelButtonPosition(e,t,i){var n=this.wheelItems[e],s=n.element.clientWidth/2,o=n.element.clientHeight/2,l=Math.floor(t-s),a=Math.floor(i-o);n.element.style.marginLeft=l+"px",n.element.style.marginTop=a+"px"}},{key:"hideWheel",value:function hideWheel(){this._visible=!1,this.activeNode=void 0,a.removeNode(this.elementMainWheel),a.removeNode(this.elementSideWheel),a.removeNode(this.elementPanelPreview);for(var _e21 in this.wheelItems){this.wheelItems[_e21].active=!1}}},{key:"onMouseOver",value:function onMouseOver(e){if(!this.activeDialog)return;var t,i=this.dockManager.context.model.rootNode;e.id===n.top?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"vertical",!0):e.id===n.down?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"vertical",!1):e.id===n.left?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"horizontal",!0):e.id===n.right?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"horizontal",!1):e.id===n.fill?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"fill",!1):e.id===n["top-s"]?t=this.dockManager.layoutEngine.getDockBounds(i,this.activeDialog.panel,"vertical",!0):e.id===n["down-s"]?t=this.dockManager.layoutEngine.getDockBounds(i,this.activeDialog.panel,"vertical",!1):e.id===n["left-s"]?t=this.dockManager.layoutEngine.getDockBounds(i,this.activeDialog.panel,"horizontal",!0):e.id===n["right-s"]&&(t=this.dockManager.layoutEngine.getDockBounds(i,this.activeDialog.panel,"horizontal",!1)),t&&(this.dockManager.element.appendChild(this.elementPanelPreview),this.elementPanelPreview.style.left=Math.round(t.x)+"px",this.elementPanelPreview.style.top=Math.round(t.y)+"px",this.elementPanelPreview.style.width=Math.round(t.width)+"px",this.elementPanelPreview.style.height=Math.round(t.height)+"px")}},{key:"onMouseOut",value:function onMouseOut(){a.removeNode(this.elementPanelPreview)}},{key:"onDialogDropped",value:function onDialogDropped(e){var t=this._getActiveWheelItem();t&&this._handleDockRequest(t,e)}},{key:"_getActiveWheelItem",value:function _getActiveWheelItem(){for(var _e22 in this.wheelItems){var _t9=this.wheelItems[_e22];if(_t9.active)return _t9}}},{key:"_handleDockRequest",value:function _handleDockRequest(e,t){e.active=!1,e.element.classList.remove(e.hoverIconClass),this.activeNode&&(e.id===n.left?this.dockManager.dockDialogLeft(this.activeNode,t):e.id===n.right?this.dockManager.dockDialogRight(this.activeNode,t):e.id===n.top?this.dockManager.dockDialogUp(this.activeNode,t):e.id===n.down?this.dockManager.dockDialogDown(this.activeNode,t):e.id===n.fill?this.dockManager.dockDialogFill(this.activeNode,t):e.id===n["left-s"]?this.dockManager.dockDialogLeft(this.dockManager.context.model.rootNode,t):e.id===n["right-s"]?this.dockManager.dockDialogRight(this.dockManager.context.model.rootNode,t):e.id===n["top-s"]?this.dockManager.dockDialogUp(this.dockManager.context.model.rootNode,t):e.id===n["down-s"]&&this.dockManager.dockDialogDown(this.dockManager.context.model.rootNode,t))}}]);return _}();var P=_createClass(function P(){_classCallCheck(this,P);this.rootNode=this.documentManagerNode=void 0});var L=function(_E){_inherits(L,_E);var _super3=_createSuper(L);function L(e,t){var _this18;_classCallCheck(this,L);_this18=_super3.call(this,e,t),"panel"===_this18.container.containerType&&(_this18.panel=t,_this18.containerElement=_this18.panel.elementContentWrapper,a.removeNode(_this18.containerElement));return _this18}_createClass(L,[{key:"destroy",value:function destroy(){_get(_getPrototypeOf(L.prototype),"destroy",this).call(this),this.panel.elementContentHost.appendChild(this.containerElement)}}]);return L}(E);var B=function(_D){_inherits(B,_D);var _super4=_createSuper(B);function B(e){var _this19;_classCallCheck(this,B);_this19=_super4.call(this,e,i.TOP),_this19.minimumAllowedChildNodes=0,_this19.element.classList.add("document-manager"),_this19.tabHost.createTabPage=_this19._createDocumentTabPage,_this19.tabHost.displayCloseButton=!0;return _this19}_createClass(B,[{key:"_createDocumentTabPage",value:function _createDocumentTabPage(e,t){return new L(e,t)}},{key:"saveState",value:function saveState(e){_get(_getPrototypeOf(B.prototype),"saveState",this).call(this,e),e.documentManager=!0}},{key:"selectedTab",value:function selectedTab(){return this.tabHost.activeTab}}]);return B}(D);var z=_createClass(function z(e){_classCallCheck(this,z);this.dockManager=e,this.model=new P,this.documentManagerView=new B(this.dockManager)});var N=function(){function N(e){_classCallCheck(this,N);this.dockManager=e}_createClass(N,[{key:"deserialize",value:function deserialize(e){var t=JSON.parse(e),i=new P;return i.rootNode=this._buildGraph(t.graphInfo),i.dialogs=this._buildDialogs(t.dialogsInfo),i.documentManagerNode=this.documentManagerNode,i}},{key:"_buildGraph",value:function _buildGraph(e){var _this20=this;var t=e.children,i=[];t.forEach(function(e){var t=_this20._buildGraph(e);null!==t&&i.push(t)});var n=this._createContainer(e,i);if(null===n)return null;var s=new f(n);return n instanceof B&&(this.documentManagerNode=s),s.children=i,s.children.reverse().forEach(function(e){e.parent=s}),s.children.reverse(),s}},{key:"_createContainer",value:function _createContainer(e,t){var i,n=e.containerType,s=e.state,o=[];if(t.forEach(function(e){o.push(e.container)}),"panel"===n){if(i=d.loadFromState(s,this.dockManager),!i.prepareForDocking)return null;i.prepareForDocking(),a.removeNode(i.elementPanel)}else if("horizontal"===n)i=new y(this.dockManager,o);else if("vertical"===n)i=new C(this.dockManager,o);else{if("fill"!==n)throw new Error("Cannot create dock container of unknown type: "+n);i=s.documentManager?new B(this.dockManager):new D(this.dockManager)}return i.loadState(s),i}},{key:"_buildDialogs",value:function _buildDialogs(e){var _this21=this;var t=[];return e.forEach(function(e){var i,n=e.containerType,s=e.state;if("panel"===n&&(i=d.loadFromState(s,_this21.dockManager),i.prepareForDocking)){a.removeNode(i.elementPanel),i.isDialog=!0;var _n12=new g(i,_this21.dockManager);(e.position.x>document.body.clientWidth||e.position.y>document.body.clientHeight-70)&&(e.position.x=20,e.position.y=70),_n12.setPosition(e.position.x,e.position.y),_n12.isHidden=e.isHidden,_n12.isHidden&&_n12.hide(),t.push(_n12)}}),t}}]);return N}();var U=function(){function U(e,t){_classCallCheck(this,U);if(void 0===e)throw new Error("Invalid Dock Manager element provided");this._config=Object.assign(new p,t),this.element=e,this.context=this.dockWheel=this.layoutEngine=this.mouseMoveHandler=this.touchMoveHandler=void 0,this.layoutEventListeners=[],this.defaultDialogPosition=new l(0,0)}_createClass(U,[{key:"config",get:function get(){return this._config}},{key:"initialize",value:function initialize(){this.backgroundContext=this.element.children[0],this.context=new z(this);var e=new f(this.context.documentManagerView);this.context.model.rootNode=e,this.context.model.documentManagerNode=e,this.context.model.dialogs=[],this.setRootNode(this.context.model.rootNode),this.resize(this.element.clientWidth,this.element.clientHeight),this.dockWheel=new _(this),this.layoutEngine=new x(this),this._undockEnabled=!0,this.rebuildLayout(this.context.model.rootNode),this.zIndexCounter=1001,this.zIndexTabHost=1e3,this.zIndexTabHandle=100,this.zIndexDialogCounter=10001,null!=this.backgroundContext&&this.context.model.rootNode.container.tabHost.hostElement.insertBefore(this.backgroundContext,this.context.model.rootNode.container.tabHost.hostElement.firstChild),this.onKeyPressBound=this.onKeyPress.bind(this),this.element.addEventListener("keydown",this.onKeyPressBound)}},{key:"onKeyPress",value:function onKeyPress(e){if("Escape"==e.key&&this.activePanel&&!this.activePanel._hideCloseButton&&(this.activePanel.isDialog&&this._config.escClosesDialog||!this.activePanel.isDialog&&this._config.escClosesWindow)){var _e23=this.activePanel;this.activePanel=null,_e23.close()}}},{key:"checkXBounds",value:function checkXBounds(e,t,i,n,s){if(this._config.moveOnlyWithinDockConatiner)return this.checkXBoundsWithinDockContainer(e,t,i,n,s);var o=Math.floor(t.x-i.x),l=e.offsetLeft+e.offsetWidth+o<40,a=e.offsetLeft+o>window.innerWidth-40;if(l){i.x=t.x,o=0;var _n13=40-(e.offsetWidth+e.offsetLeft);_n13>0&&(o=_n13)}else if(a){i.x=t.x,o=0;var _n14=window.innerWidth-40-e.offsetLeft;_n14>0&&(o=_n14)}return o}},{key:"checkXBoundsWithinDockContainer",value:function checkXBoundsWithinDockContainer(e,t,i,n,s){var o=t.x-i.x,l=this.element.getBoundingClientRect(),a=e.getBoundingClientRect(),h=o<0&&a.left+o<l.left&&!s,r=o>0&&a.right+o>l.right&&!n;return h?(t.x-=o,o=l.left-a.left,t.x-=o):r&&(t.x-=o,o=l.right-a.right,t.x-=o),o}},{key:"checkYBounds",value:function checkYBounds(e,t,i,n,s){if(this._config.moveOnlyWithinDockConatiner)return this.checkYBoundsWithinDockContainer(e,t,i,n,s);var o=Math.floor(t.y-i.y),l=e.offsetTop+o<0,a=e.offsetTop+o>window.innerHeight-16;if(l)i.y=t.y,o=0;else if(a){i.y=t.y,o=0;var _n15=window.innerHeight-25-e.offsetTop;_n15>0&&(o=_n15)}return o}},{key:"checkYBoundsWithinDockContainer",value:function checkYBoundsWithinDockContainer(e,t,i,n,s){var o=t.y-i.y,l=this.element.getBoundingClientRect(),a=e.getBoundingClientRect(),h=o<0&&a.top+o<l.top&&!s,r=o>0&&a.bottom+o>l.bottom&&!n;return h?(t.y-=o,o=l.top-a.top,t.y-=o):r&&(t.y-=o,o=l.bottom-a.bottom,t.y-=o),o}},{key:"rebuildLayout",value:function rebuildLayout(e){var _this22=this;e.children.forEach(function(e){_this22.rebuildLayout(e)}),e.performLayout(!1)}},{key:"invalidate",value:function invalidate(){this.resize(this.element.clientWidth,this.element.clientHeight)}},{key:"resize",value:function resize(e,t){this.element.style.width=e+"px",this.element.style.height=t+"px",this.context.model.rootNode.container.resize(e,t)}},{key:"setModel",value:function setModel(e){a.removeNode(this.context.documentManagerView.containerElement),this.context.model=e,this.setRootNode(e.rootNode),this.rebuildLayout(e.rootNode),this.loadResize(e.rootNode)}},{key:"loadResize",value:function loadResize(e){var _this23=this;e.children.reverse().forEach(function(t){_this23.loadResize(t),e.container.setActiveChild(t.container)}),e.children.reverse();var t=e.container;e.container.resize(t.state.width,t.state.height)}},{key:"setRootNode",value:function setRootNode(e){e.detachFromParent(),this.context.model.rootNode=e,this.element.appendChild(e.container.containerElement)}},{key:"_onDialogDragStarted",value:function _onDialogDragStarted(e,t){this.dockWheel.activeNode=this._findNodeOnPoint(t.clientX,t.clientY),this.dockWheel.activeDialog=e,null!=e.noDocking&&!0===e.noDocking||this.dockWheel.showWheel(),this.mouseMoveHandler&&(this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler),this.touchMoveHandler&&(this.touchMoveHandler.cancel(),delete this.touchMoveHandler),this.mouseMoveHandler=new h(window,"mousemove",this._onMouseMoved.bind(this)),this.touchMoveHandler=new h(window,"touchmove",this._onMouseMoved.bind(this))}},{key:"_onDialogDragEnded",value:function _onDialogDragEnded(e,t){this.mouseMoveHandler&&(this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler),this.touchMoveHandler&&(this.touchMoveHandler.cancel(),delete this.touchMoveHandler),this.dockWheel.onDialogDropped(e),this.dockWheel.hideWheel(),delete this.dockWheel.activeDialog,e.saveState(e.elementDialog.offsetLeft,e.elementDialog.offsetTop)}},{key:"_onMouseMoved",value:function _onMouseMoved(e){null!=e.changedTouches&&(e=e.changedTouches[0]),this.dockWheel.activeNode=this._findNodeOnPoint(e.clientX,e.clientY)}},{key:"_findNodeOnPoint",value:function _findNodeOnPoint(e,t){var i,n=[];for(n.push(this.context.model.rootNode);n.length>0;){var _s8=n.pop();a.isPointInsideNode(e,t,_s8)&&(i=_s8,[].push.apply(n,_s8.children))}return i}},{key:"dockDialogLeft",value:function dockDialogLeft(e,t){return this._requestDockDialog(e,t,this.layoutEngine.dockLeft.bind(this.layoutEngine))}},{key:"dockDialogRight",value:function dockDialogRight(e,t){return this._requestDockDialog(e,t,this.layoutEngine.dockRight.bind(this.layoutEngine))}},{key:"dockDialogUp",value:function dockDialogUp(e,t){return this._requestDockDialog(e,t,this.layoutEngine.dockUp.bind(this.layoutEngine))}},{key:"dockDialogDown",value:function dockDialogDown(e,t){return this._requestDockDialog(e,t,this.layoutEngine.dockDown.bind(this.layoutEngine))}},{key:"dockDialogFill",value:function dockDialogFill(e,t){return this._requestDockDialog(e,t,this.layoutEngine.dockFill.bind(this.layoutEngine))}},{key:"dockLeft",value:function dockLeft(e,t,i){return this._requestDockContainer(e,t,this.layoutEngine.dockLeft.bind(this.layoutEngine),!1,i)}},{key:"dockRight",value:function dockRight(e,t,i){return this._requestDockContainer(e,t,this.layoutEngine.dockRight.bind(this.layoutEngine),!0,i)}},{key:"dockUp",value:function dockUp(e,t,i){return this._requestDockContainer(e,t,this.layoutEngine.dockUp.bind(this.layoutEngine),!1,i)}},{key:"dockDown",value:function dockDown(e,t,i){return this._requestDockContainer(e,t,this.layoutEngine.dockDown.bind(this.layoutEngine),!0,i)}},{key:"dockFill",value:function dockFill(e,t){return this._requestDockContainer(e,t,this.layoutEngine.dockFill.bind(this.layoutEngine),!1)}},{key:"floatDialog",value:function floatDialog(e,t,i,n){var s;if(this.context.model.dialogs.forEach(function(n){e==n.panel&&(n.show(),n.setPosition(t,i),s=n)}),s)return s;try{var _t10=this._findNodeFromContainer(e);this.layoutEngine.undock(_t10)}catch(e){}var o=e;a.removeNode(o.elementPanel),o.isDialog=!0;var l=new g(o,this,n);return l.setPosition(t,i),l}},{key:"_requestDockDialog",value:function _requestDockDialog(e,t,i){var n=t.panel,s=new f(n);return n.prepareForDocking(),t.destroy(),i(e,s),s}},{key:"_checkShowBackgroundContext",value:function _checkShowBackgroundContext(){null!=this.backgroundContext&&(this.context.model.documentManagerNode.children.length>0?this.backgroundContext.style.display="none":this.backgroundContext.style.display="block")}},{key:"_requestDockContainer",value:function _requestDockContainer(e,t,i,n,s){var o=new f(t);if("panel"===t.containerType){var _e24=t;_e24.prepareForDocking(),a.removeNode(_e24.elementPanel)}var l,h=null;if(e.parent&&e.parent.container&&(l=e.parent.container,l.getRatios&&(h=l.getRatios())),i(e,o),s&&o.parent&&("vertical"===o.parent.container.containerType||"horizontal"===o.parent.container.containerType)){var _e25=o.parent.container;if(h&&l==_e25){if(n){for(var _e26=0;_e26<h.length;_e26++){h[_e26]=h[_e26]-h[_e26]*s}h.push(s)}else h[0]=h[0]-s,h.unshift(s);_e25.setRatios(h)}else _e25.setContainerRatio(t,s)}return this.rebuildLayout(this.context.model.rootNode),this.invalidate(),this._checkShowBackgroundContext(),o}},{key:"_requestTabReorder",value:function _requestTabReorder(e,t){var i=this._findNodeFromContainer(e);this.layoutEngine.reorderTabs(i,t.handle,t.state,t.index)}},{key:"requestUndockToDialog",value:function requestUndockToDialog(e,t,i){var n=this._findNodeFromContainer(e);this.layoutEngine.undock(n);var s=n.container;s.elementPanel.style.display="block";var o=new g(s,this,null);if(s.lastDialogSize&&o.resize(s.lastDialogSize.width,s.lastDialogSize.height),void 0!==t){var _e27=o.elementDialog.clientWidth;i.x>_e27&&(i.x=.75*_e27),o.setPosition(t.clientX-i.x,t.clientY-i.y),o.draggable.onMouseDown(t)}return o}},{key:"requestClose",value:function requestClose(e){var t=this._findNodeFromContainer(e);if(this.layoutEngine.close(t),this.activePanel==e&&(this.activePanel=null),this._activeDocument==e){var _e28=this._activeDocument;this._activeDocument=null,this.notifyOnActiveDocumentChange(null,_e28)}}},{key:"openInDialog",value:function openInDialog(e,t,i){var n=new g(e,this,null);if(void 0!==t){var _e29=n.elementDialog.clientWidth;i.x>_e29&&(i.x=.75*_e29),n.setPosition(t.clientX-i.x,t.clientY-i.y),n.draggable.onMouseDown(t)}return n}},{key:"requestUndock",value:function requestUndock(e){var t=this._findNodeFromContainer(e);this.layoutEngine.undock(t)}},{key:"requestRemove",value:function requestRemove(e){var t=this._findNodeFromContainer(e),i=t.parent;return t.detachFromParent(),i&&this.rebuildLayout(i),t}},{key:"getNodeByElementId",value:function getNodeByElementId(e){var t=[];for(t.push(this.context.model.rootNode);t.length>0;){var _i13=t.pop();if(_i13.container instanceof d&&_i13.container.elementContent.id===e)return _i13;[].push.apply(t,_i13.children)}return null}},{key:"_findNodeFromContainer",value:function _findNodeFromContainer(e){var t=[];for(t.push(this.context.model.rootNode);t.length>0;){var _i14=t.pop();if(_i14.container===e)return _i14;[].push.apply(t,_i14.children)}return null}},{key:"findNodeFromContainerElement",value:function findNodeFromContainerElement(e){var t=[];for(t.push(this.context.model.rootNode);t.length>0;){var _i15=t.pop();if(_i15.container.containerElement===e)return _i15;[].push.apply(t,_i15.children)}return null}},{key:"addLayoutListener",value:function addLayoutListener(e){this.layoutEventListeners.push(e)}},{key:"removeLayoutListener",value:function removeLayoutListener(e){this.layoutEventListeners.splice(this.layoutEventListeners.indexOf(e),1)}},{key:"suspendLayout",value:function suspendLayout(e){var _this24=this;this.layoutEventListeners.forEach(function(t){t.onSuspendLayout&&t.onSuspendLayout(_this24,e)})}},{key:"resumeLayout",value:function resumeLayout(e){var _this25=this;this.layoutEventListeners.forEach(function(t){t.onResumeLayout&&t.onResumeLayout(_this25,e)})}},{key:"notifyOnDock",value:function notifyOnDock(e){var _this26=this;this._checkShowBackgroundContext(),this.layoutEventListeners.forEach(function(t){t.onDock&&t.onDock(_this26,e)})}},{key:"notifyOnTabsReorder",value:function notifyOnTabsReorder(e){var _this27=this;this.layoutEventListeners.forEach(function(t){t.onTabsReorder&&t.onTabsReorder(_this27,e)})}},{key:"notifyOnUnDock",value:function notifyOnUnDock(e){var _this28=this;this._checkShowBackgroundContext(),this.layoutEventListeners.forEach(function(t){t.onUndock&&t.onUndock(_this28,e)})}},{key:"notifyOnClosePanel",value:function notifyOnClosePanel(e){var _this29=this;if(this._checkShowBackgroundContext(),this.activePanel==e&&(this.activePanel=null),this._activeDocument==e){var _e30=this._activeDocument;this._activeDocument=null,this.notifyOnActiveDocumentChange(null,_e30)}this.layoutEventListeners.forEach(function(t){t.onClosePanel&&t.onClosePanel(_this29,e)})}},{key:"notifyOnCreateDialog",value:function notifyOnCreateDialog(e){var _this30=this;this.layoutEventListeners.forEach(function(t){t.onCreateDialog&&t.onCreateDialog(_this30,e)})}},{key:"notifyOnHideDialog",value:function notifyOnHideDialog(e){var _this31=this;this.layoutEventListeners.forEach(function(t){t.onHideDialog&&t.onHideDialog(_this31,e)})}},{key:"notifyOnShowDialog",value:function notifyOnShowDialog(e){var _this32=this;this.layoutEventListeners.forEach(function(t){t.onShowDialog&&t.onShowDialog(_this32,e)})}},{key:"notifyOnChangeDialogPosition",value:function notifyOnChangeDialogPosition(e,t,i){var _this33=this;this.layoutEventListeners.forEach(function(n){n.onChangeDialogPosition&&n.onChangeDialogPosition(_this33,e,t,i)})}},{key:"notifyOnContainerResized",value:function notifyOnContainerResized(e){var _this34=this;this.layoutEventListeners.forEach(function(t){t.onContainerResized&&t.onContainerResized(_this34,e)})}},{key:"notifyOnTabChange",value:function notifyOnTabChange(e){var _this35=this;this.layoutEventListeners.forEach(function(t){t.onTabChanged&&t.onTabChanged(_this35,e)})}},{key:"notifyOnActivePanelChange",value:function notifyOnActivePanelChange(e,t){var _this36=this;this.layoutEventListeners.forEach(function(i){i.onActivePanelChange&&i.onActivePanelChange(_this36,e,t)})}},{key:"notifyOnActiveDocumentChange",value:function notifyOnActiveDocumentChange(e,t){var _this37=this;this.layoutEventListeners.forEach(function(i){i.onActiveDocumentChange&&i.onActiveDocumentChange(_this37,e,t)})}},{key:"saveState",value:function saveState(){return(new v).serialize(this.context.model)}},{key:"loadState",value:function loadState(e){var t=new N(this);this.context.model=t.deserialize(e),this.setModel(this.context.model)}},{key:"getPanels",value:function getPanels(){var e=[];return this._allPanels(this.context.model.rootNode,e),this.context.model.dialogs.forEach(function(t){e.push(t.panel)}),e}},{key:"undockEnabled",value:function undockEnabled(e){this._undockEnabled=e,this.getPanels().forEach(function(t){t.canUndock(e)})}},{key:"lockDockState",value:function lockDockState(e){this.undockEnabled(!e),this.hideCloseButton(e)}},{key:"hideCloseButton",value:function hideCloseButton(e){this.getPanels().forEach(function(t){t.hideCloseButton(e)})}},{key:"updatePanels",value:function updatePanels(e){var t=[];return this._allPanels(this.context.model.rootNode,t),t.forEach(function(t){a.arrayContains(e,t.elementContent.id)||t.close()}),this.context.model.dialogs.forEach(function(t){a.arrayContains(e,t.panel.elementContent.id)?t.show():t.hide()}),t}},{key:"getVisiblePanels",value:function getVisiblePanels(){var e=[];return this._allPanels(this.context.model.rootNode,e),this.context.model.dialogs.forEach(function(t){t.isHidden||e.push(t.panel)}),e}},{key:"_allPanels",value:function _allPanels(e,t){var _this38=this;e.children.forEach(function(e){_this38._allPanels(e,t)}),"panel"===e.container.containerType&&t.push(e.container)}},{key:"activeDocument",get:function get(){return this._activeDocument}},{key:"activePanel",get:function get(){return this._activePanel},set:function set(e){if(e!==this._activePanel){e&&!e.isDialog&&(this._lastPanelNotADialog=e),this._lastPanelNotADialog&&this.getPanels().indexOf(this._lastPanelNotADialog)<0&&(this._lastPanelNotADialog=null);var _i16=this.activePanel;this.activePanel&&(this.activePanel.elementTitle.classList.remove("dockspan-panel-active"),this.activePanel.elementTitleText.classList.remove("dockspan-panel-titlebar-text-active"),this.activePanel.tabPage&&this.activePanel.tabPage.host.setActive(!1)),this._activePanel=e;var _n16=this._activeDocument;e&&e.panelType==t.document&&(this._activeDocument=e),!e&&_i16&&_i16.isDialog&&null==e&&this._lastPanelNotADialog&&this.activePanel!=this._lastPanelNotADialog&&(e=this._lastPanelNotADialog,this._lastPanelNotADialog=void 0),this.notifyOnActivePanelChange(e,_i16),_n16!=this._activeDocument&&this.notifyOnActiveDocumentChange(this._activeDocument,_n16),e&&(e.elementTitle.classList.add("dockspan-panel-active"),e.elementTitleText.classList.add("dockspan-panel-titlebar-text-active"),e.tabPage&&e.tabPage.host.setActive(!0))}else e&&e.tabPage&&e.tabPage.host.setActive(!0)}}]);return U}();DockSpawnTS=o})();
|
|
1
|
+
"use strict";function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver)}return desc.value}}return _get.apply(this,arguments)}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break}return object}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined")}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e32){throw _e32},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e33){didErr=true;err=_e33},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value}catch(error){reject(error);return}if(info.done){resolve(value)}else{Promise.resolve(value).then(_next,_throw)}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(undefined)})}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var DockSpawnTS;(function(){"use strict";var e,t,i,n,s={d:function d(e,t){for(var i in t){s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}},o:function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function r(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};s.r(o),s.d(o,{ContainerType:function ContainerType(){return e},Dialog:function Dialog(){return p},DockConfig:function DockConfig(){return g},DockGraphSerializer:function DockGraphSerializer(){return v},DockLayoutEngine:function DockLayoutEngine(){return x},DockManager:function DockManager(){return U},DockManagerContext:function DockManagerContext(){return z},DockModel:function DockModel(){return P},DockNode:function DockNode(){return f},DockWheel:function DockWheel(){return T},DockWheelItem:function DockWheelItem(){return _},DocumentManagerContainer:function DocumentManagerContainer(){return B},DocumentTabPage:function DocumentTabPage(){return L},DraggableContainer:function DraggableContainer(){return c},EventHandler:function EventHandler(){return h},FillDockContainer:function FillDockContainer(){return D},HorizontalDockContainer:function HorizontalDockContainer(){return y},PanelContainer:function PanelContainer(){return d},Point:function Point(){return l},ResizableContainer:function ResizableContainer(){return m},ResizeHandle:function ResizeHandle(){return u},SplitterBar:function SplitterBar(){return w},SplitterDockContainer:function SplitterDockContainer(){return k},SplitterPanel:function SplitterPanel(){return M},TabHandle:function TabHandle(){return b},TabHost:function TabHost(){return H},TabPage:function TabPage(){return E},UndockInitiator:function UndockInitiator(){return r},Utils:function Utils(){return a},VerticalDockContainer:function VerticalDockContainer(){return C}}),function(e){e.horizontal="horizontal",e.vertical="vertical",e.fill="fill",e.panel="panel"}(e||(e={}));var l=_createClass(function l(e,t){_classCallCheck(this,l);this.x=e,this.y=t});var a=function(){function a(){_classCallCheck(this,a)}_createClass(a,null,[{key:"getPixels",value:function getPixels(e){return null===e?0:parseInt(e.replace("px",""))}},{key:"disableGlobalTextSelection",value:function disableGlobalTextSelection(e){e.classList.add("disable-selection")}},{key:"enableGlobalTextSelection",value:function enableGlobalTextSelection(e){e.classList.remove("disable-selection")}},{key:"isPointInsideNode",value:function isPointInsideNode(e,t,i){var n=i.container.containerElement.getBoundingClientRect();return e>=n.left&&e<=n.left+n.width&&t>=n.top&&t<=n.top+n.height}},{key:"getNextId",value:function getNextId(e){return e+a._counter++}},{key:"removeNode",value:function removeNode(e){return null!==e.parentNode&&(e.parentNode.removeChild(e),!0)}},{key:"orderByIndexes",value:function orderByIndexes(e,t){var i=[];for(var _n=0;_n<t.length;_n++){i.push(e[t[_n]])}return i}},{key:"arrayRemove",value:function arrayRemove(e,t){var i=e.indexOf(t);return-1!==i&&e.splice(i,1)}},{key:"arrayContains",value:function arrayContains(e,t){var i=e.length;for(;i--;){if(e[i]===t)return!0}return!1}},{key:"arrayEqual",value:function arrayEqual(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var _i=0;_i<e.length;++_i){if(e[_i]!==t[_i])return!1}return!0}}]);return a}();a._counter=0;var h=function(){function h(e,t,i,n){_classCallCheck(this,h);this.target=i,this.eventName=t,this.source=e,this.source.addEventListener(t,this.target,n)}_createClass(h,[{key:"cancel",value:function cancel(){this.source.removeEventListener(this.eventName,this.target)}}]);return h}();var r=function(){function r(e,t,i){_classCallCheck(this,r);i||(i=7),this.element=e,this._undockededCallback=t,this.thresholdPixels=i,this._enabled=!1}_createClass(r,[{key:"enabled",get:function get(){return this._enabled},set:function set(e){this._enabled=e,this._enabled?(this.mouseDownHandler&&(this.mouseDownHandler.cancel(),delete this.mouseDownHandler),this.touchDownHandler&&(this.touchDownHandler.cancel(),delete this.touchDownHandler),this.mouseDownHandler=new h(this.element,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new h(this.element,"touchstart",this.onMouseDown.bind(this),{passive:!1})):(this.mouseDownHandler&&(this.mouseDownHandler.cancel(),delete this.mouseDownHandler),this.touchDownHandler&&(this.touchDownHandler.cancel(),delete this.touchDownHandler),this.mouseUpHandler&&(this.mouseUpHandler.cancel(),delete this.mouseUpHandler),this.touchUpHandler&&(this.touchUpHandler.cancel(),delete this.touchUpHandler),this.mouseMoveHandler&&(this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler),this.touchMoveHandler&&(this.touchMoveHandler.cancel(),delete this.touchMoveHandler))}},{key:"onMouseDown",value:function onMouseDown(e){if(e.preventDefault(),this.enabled){if(e.touches){if(e.touches.length>1)return;e=e.touches[0]}this.mouseUpHandler&&(this.mouseUpHandler.cancel(),delete this.mouseUpHandler),this.touchUpHandler&&(this.touchUpHandler.cancel(),delete this.touchUpHandler),this.mouseMoveHandler&&(this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler),this.touchMoveHandler&&(this.touchMoveHandler.cancel(),delete this.touchMoveHandler),this.mouseUpHandler=new h(window,"mouseup",this.onMouseUp.bind(this)),this.touchUpHandler=new h(window,"touchend",this.onMouseUp.bind(this)),this.mouseMoveHandler=new h(window,"mousemove",this.onMouseMove.bind(this)),this.touchMoveHandler=new h(window,"touchmove",this.onMouseMove.bind(this)),this.dragStartPosition=new l(e.clientX,e.clientY)}}},{key:"onMouseUp",value:function onMouseUp(){this.mouseUpHandler&&(this.mouseUpHandler.cancel(),delete this.mouseUpHandler),this.touchUpHandler&&(this.touchUpHandler.cancel(),delete this.touchUpHandler),this.mouseMoveHandler&&(this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler),this.touchMoveHandler&&(this.touchMoveHandler.cancel(),delete this.touchMoveHandler)}},{key:"onMouseMove",value:function onMouseMove(e){if(e.touches){if(e.touches.length>1)return;e=e.touches[0]}var t=new l(e.clientX,e.clientY).y-this.dragStartPosition.y;(t>this.thresholdPixels||t<-this.thresholdPixels)&&(this.enabled=!1,this._requestUndock(e))}},{key:"_requestUndock",value:function _requestUndock(e){var t=0,i=0,n=this.element;do{t+=n.offsetTop||0,i+=n.offsetLeft||0,n=n.offsetParent}while(n);var s=this.dragStartPosition.x-i,o=this.dragStartPosition.y-t,a=new l(s,o);this._undockededCallback(e,a)}}]);return r}();!function(e){e.document="document",e.panel="panel"}(t||(t={}));var d=function(){function d(i,n,s,o,l){_classCallCheck(this,d);s||(s="Panel"),o||(o=t.panel),this.panelType=o,this.elementContent=Object.assign(i,{_dockSpawnPanelContainer:this}),this.dockManager=n,this.title=s,this.containerType=e.panel,this.icon=null,this.minimumAllowedChildNodes=0,this._floatingDialog=void 0,this.isDialog=!1,this._canUndock=n._undockEnabled,this.eventListeners=[],this._hideCloseButton=l,this._initialize()}_createClass(d,[{key:"canUndock",value:function canUndock(e){var _this=this;this._canUndock=e,this.undockInitiator.enabled=e,this.eventListeners.forEach(function(t){t.onDockEnabled&&t.onDockEnabled({self:_this,state:e})})}},{key:"addListener",value:function addListener(e){this.eventListeners.push(e)}},{key:"removeListener",value:function removeListener(e){this.eventListeners.splice(this.eventListeners.indexOf(e),1)}},{key:"floatingDialog",get:function get(){return this._floatingDialog},set:function set(e){this._floatingDialog=e;var t=void 0===this._floatingDialog;this.undockInitiator.enabled=t}},{key:"saveState",value:function saveState(e){e.element=this.elementContent.id,e.width=this.width,e.height=this.height,e.canUndock=this._canUndock,e.hideCloseButton=this._hideCloseButton,e.panelType=this.panelType}},{key:"loadState",value:function loadState(e){this.width=e.width,this.height=e.height,this.state={width:e.width,height:e.height},this.canUndock(e.canUndock),this.hideCloseButton(e.hideCloseButton),this.panelType=e.panelType}},{key:"setActiveChild",value:function setActiveChild(){}},{key:"containerElement",get:function get(){return this.elementPanel}},{key:"grayOut",value:function grayOut(e){var _this2=this;!e&&this._grayOut?(this.elementContentWrapper.removeChild(this._grayOut),this.elementButtonClose.style.display=this._hideCloseButton?"none":"block",this._grayOut=null,this._hideCloseButton||this.eventListeners.forEach(function(e){e.onHideCloseButton&&e.onHideCloseButton({self:_this2,state:_this2._hideCloseButton})})):e&&!this._grayOut&&(this._grayOut=document.createElement("div"),this._grayOut.className="panel-grayout",this.elementButtonClose.style.display="none",this.elementContentWrapper.appendChild(this._grayOut),this.eventListeners.forEach(function(e){e.onHideCloseButton&&e.onHideCloseButton({self:_this2,state:!0})}))}},{key:"_initialize",value:function _initialize(){this.name=a.getNextId("panel_"),this.elementPanel=document.createElement("div"),this.elementPanel.tabIndex=0,this.elementTitle=document.createElement("div"),this.elementTitleText=document.createElement("div"),this.elementContentHost=document.createElement("div"),this.elementButtonClose=document.createElement("div"),this.elementPanel.appendChild(this.elementTitle),this.elementTitle.appendChild(this.elementTitleText),this.elementTitle.appendChild(this.elementButtonClose),this.elementButtonClose.classList.add("panel-titlebar-button-close"),this.elementButtonClose.style.display=this._hideCloseButton?"none":"block",this.elementPanel.appendChild(this.elementContentHost),this.elementPanel.classList.add("panel-base"),this.elementTitle.classList.add("panel-titlebar"),this.elementTitle.classList.add("disable-selection"),this.elementTitleText.classList.add("panel-titlebar-text"),this.elementContentHost.classList.add("panel-content");var e=this.elementContent.clientWidth,t=this.elementContent.clientHeight,i=this.elementTitle.clientHeight;this._setPanelDimensions(e,t+i),this._hideCloseButton||(this.closeButtonClickedHandler=new h(this.elementButtonClose,"mousedown",this.onCloseButtonClicked.bind(this)),this.closeButtonTouchedHandler=new h(this.elementButtonClose,"touchstart",this.onCloseButtonClicked.bind(this))),this.elementContentWrapper=document.createElement("div"),this.elementContentWrapper.classList.add("panel-content-wrapper"),this.elementContentWrapper.appendChild(this.elementContent),a.removeNode(this.elementContentWrapper),this.elementContentHost.appendChild(this.elementContentWrapper);var n=this.elementContent.dataset.panelCaption,s=this.elementContent.dataset.panelIcon;n&&(this.title=n),s&&(this.icon=s),this._updateTitle(),this.undockInitiator=new r(this.elementTitle,this.performUndockToDialog.bind(this)),delete this.floatingDialog,this.mouseDownHandler=new h(this.elementPanel,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new h(this.elementPanel,"touchstart",this.onMouseDown.bind(this)),this.elementContent.removeAttribute("hidden")}},{key:"onMouseDown",value:function onMouseDown(){this.dockManager.activePanel=this}},{key:"hideCloseButton",value:function hideCloseButton(e){var _this3=this;this._hideCloseButton=e,this.elementButtonClose.style.display=e?"none":"block",this.eventListeners.forEach(function(t){t.onHideCloseButton&&t.onHideCloseButton({self:_this3,state:e})})}},{key:"destroy",value:function destroy(){this.mouseDownHandler&&(this.mouseDownHandler.cancel(),delete this.mouseDownHandler),this.touchDownHandler&&(this.touchDownHandler.cancel(),delete this.touchDownHandler),a.removeNode(this.elementPanel),this.closeButtonClickedHandler&&(this.closeButtonClickedHandler.cancel(),delete this.closeButtonClickedHandler),this.closeButtonTouchedHandler&&(this.closeButtonTouchedHandler.cancel(),delete this.closeButtonTouchedHandler)}},{key:"performUndockToDialog",value:function performUndockToDialog(e,t){return this.isDialog=!0,this.undockInitiator.enabled=!1,this.elementContentWrapper.style.display="block",this.elementPanel.style.position="",this.dockManager.requestUndockToDialog(this,e,t)}},{key:"performClose",value:function performClose(){this.isDialog=!0,this.undockInitiator.enabled=!1,this.elementContentWrapper.style.display="block",this.elementPanel.style.position="",this.dockManager.requestClose(this)}},{key:"performUndock",value:function performUndock(){this.undockInitiator.enabled=!1,this.dockManager.requestUndock(this)}},{key:"prepareForDocking",value:function prepareForDocking(){this.isDialog=!1,this.undockInitiator.enabled=this._canUndock}},{key:"width",get:function get(){return this._cachedWidth},set:function set(e){e!==this._cachedWidth&&(this._cachedWidth=e,this.elementPanel.style.width=e+"px")}},{key:"height",get:function get(){return this._cachedHeight},set:function set(e){e!==this._cachedHeight&&(this._cachedHeight=e,this.elementPanel.style.height=e+"px")}},{key:"resize",value:function resize(e,t){this._setPanelDimensions(e,t),this._cachedWidth=e,this._cachedHeight=t;try{null!=this.elementContent&&"function"==typeof this.elementContent.resizeHandler&&this.elementContent.resizeHandler(e,t-this.elementTitle.clientHeight)}catch(e){console.log("error calling resizeHandler:",e," elt:",this.elementContent)}}},{key:"_setPanelDimensions",value:function _setPanelDimensions(e,t){this.elementTitle.style.width=e+"px",this.elementContentHost.style.width=e+"px",this.elementContent.style.width=e+"px",this.elementPanel.style.width=e+"px";var i=t-this.elementTitle.clientHeight;this.elementContentHost.style.height=i+"px",this.elementContent.style.height=i+"px",this.elementPanel.style.height=t+"px"}},{key:"setTitle",value:function setTitle(e){this.title=e,this._updateTitle(),this.onTitleChanged&&this.onTitleChanged(this,e)}},{key:"setTitleIcon",value:function setTitleIcon(e){this.icon=e,this._updateTitle(),this.onTitleChanged&&this.onTitleChanged(this,this.title)}},{key:"setHasChanges",value:function setHasChanges(e){this.hasChanges=e,this._updateTitle(),e?this.elementTitleText.classList.add("panel-has-changes"):this.elementTitleText.classList.remove("panel-has-changes"),this.onTitleChanged&&this.onTitleChanged(this,this.title)}},{key:"setCloseIconTemplate",value:function setCloseIconTemplate(e){this.elementButtonClose.innerHTML=e}},{key:"_updateTitle",value:function _updateTitle(){null===this.icon?this.elementTitleText.innerHTML=this.title:this.elementTitleText.innerHTML='<img class="panel-titlebar-icon" src="'+this.icon+'"><span>'+this.title+"</span>"}},{key:"getRawTitle",value:function getRawTitle(){return this.elementTitleText.innerHTML}},{key:"performLayout",value:function performLayout(e,t){}},{key:"onCloseButtonClicked",value:function onCloseButtonClicked(e){e.preventDefault(),e.stopPropagation(),this.close()}},{key:"close",value:function(){var _close=_asyncToGenerator(regeneratorRuntime.mark(function _callee(){var e;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:e=!0;if(!this.closePanelContainerCallback){_context.next=7;break}_context.next=4;return this.closePanelContainerCallback(this);case 4:e=_context.sent;_context.next=12;break;case 7:_context.t0=this.dockManager.closePanelContainerCallback;if(!_context.t0){_context.next=12;break}_context.next=11;return this.dockManager.closePanelContainerCallback(this);case 11:e=_context.sent;case 12:e&&(this.isDialog?this.floatingDialog&&this.floatingDialog.close():(this.performClose(),this.dockManager.notifyOnClosePanel(this)));case 13:case"end":return _context.stop()}}},_callee,this)}));function close(){return _close.apply(this,arguments)}return close}()}],[{key:"loadFromState",value:function loadFromState(e,t){var i=e.element,n=document.getElementById(i);if(null===n)return null;var s=new d(n,t);return s.loadState(e),s}}]);return d}();var c=function(){function c(e,t,i,n){_classCallCheck(this,c);this.dialog=e,this.delegate=t,this.containerElement=t.containerElement,this.dockManager=t.dockManager,this.topLevelElement=i,this.containerType=t.containerType,this.mouseDownHandler=new h(n,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new h(n,"touchstart",this.onMouseDown.bind(this)),this.topLevelElement.style.left=i.offsetLeft+"px",this.topLevelElement.style.top=i.offsetTop+"px",this.minimumAllowedChildNodes=t.minimumAllowedChildNodes,this.iframeEventHandlers=[]}_createClass(c,[{key:"destroy",value:function destroy(){this.removeDecorator(),this.delegate.destroy()}},{key:"saveState",value:function saveState(e){this.delegate.saveState(e)}},{key:"loadState",value:function loadState(e){this.delegate.loadState(e)}},{key:"setActiveChild",value:function setActiveChild(){}},{key:"width",get:function get(){return this.delegate.width}},{key:"height",get:function get(){return this.delegate.height}},{key:"name",get:function get(){return this.delegate.name},set:function set(e){e&&(this.delegate.name=e)}},{key:"resize",value:function resize(e,t){this.delegate.resize(e,t)}},{key:"performLayout",value:function performLayout(e){this.delegate.performLayout(e,!1)}},{key:"removeDecorator",value:function removeDecorator(){this.mouseDownHandler&&(this.mouseDownHandler.cancel(),delete this.mouseDownHandler),this.touchDownHandler&&(this.touchDownHandler.cancel(),delete this.touchDownHandler)}},{key:"onMouseDown",value:function onMouseDown(e){var _this4=this;e.preventDefault&&e.preventDefault();var t=null;if(e.touches){if(e.touches.length>1)return;t=e.touches[0]}else t=e;if(this._startDragging(t),this.previousMousePosition={x:t.clientX,y:t.clientY},this.mouseMoveHandler&&(this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler),this.touchMoveHandler&&(this.touchMoveHandler.cancel(),delete this.touchMoveHandler),this.mouseUpHandler&&(this.mouseUpHandler.cancel(),delete this.mouseUpHandler),this.touchUpHandler&&(this.touchUpHandler.cancel(),delete this.touchUpHandler),this.mouseMoveHandler=new h(window,"mousemove",this.onMouseMove.bind(this)),this.touchMoveHandler=new h(e.target,"touchmove",this.onMouseMove.bind(this),{passive:!1}),this.mouseUpHandler=new h(window,"mouseup",this.onMouseUp.bind(this)),this.touchUpHandler=new h(e.target,"touchend",this.onMouseUp.bind(this)),this.dockManager.iframes){var _iterator=_createForOfIteratorHelper(this.dockManager.iframes),_step;try{var _loop=function _loop(){var e=_step.value;var t=_this4.onMouseMovedIframe.bind(_this4);_this4.iframeEventHandlers.push(new h(e.contentWindow,"mousemove",function(i){return t(i,e)})),_this4.iframeEventHandlers.push(new h(e.contentWindow,"mouseup",_this4.onMouseUp.bind(_this4))),_this4.iframeEventHandlers.push(new h(e.contentWindow,"touchmove",function(i){return t(i,e)})),_this4.iframeEventHandlers.push(new h(e.contentWindow,"touchend",_this4.onMouseUp.bind(_this4)))};for(_iterator.s();!(_step=_iterator.n()).done;){_loop()}}catch(err){_iterator.e(err)}finally{_iterator.f()}}}},{key:"onMouseUp",value:function onMouseUp(e){this._stopDragging(e),this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler,this.touchMoveHandler.cancel(),delete this.touchMoveHandler,this.mouseUpHandler.cancel(),delete this.mouseUpHandler,this.touchUpHandler.cancel(),delete this.touchUpHandler;var _iterator2=_createForOfIteratorHelper(this.iframeEventHandlers),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var _e=_step2.value;_e.cancel()}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}this.iframeEventHandlers=[]}},{key:"_startDragging",value:function _startDragging(e){this.containerElement.classList.add("draggable-dragging-active"),this.dialog.eventListener&&this.dialog.eventListener._onDialogDragStarted(this.dialog,e),a.disableGlobalTextSelection(this.dockManager.config.dialogRootElement)}},{key:"_stopDragging",value:function _stopDragging(e){this.containerElement.classList.remove("draggable-dragging-active"),this.dialog.eventListener&&this.dialog.eventListener._onDialogDragEnded(this.dialog,e),a.enableGlobalTextSelection(this.dockManager.config.dialogRootElement)}},{key:"onMouseMovedIframe",value:function onMouseMovedIframe(e,t){var i=t.getBoundingClientRect();this.onMouseMove(e,{x:i.x,y:i.y})}},{key:"onMouseMove",value:function onMouseMove(e,t){e.preventDefault&&e.preventDefault();var i=document.body.getBoundingClientRect();if(null!=e.touches){if(e.touches.length>1)return;for(var _t in this.dockManager.dockWheel.wheelItems){var _n2=this.dockManager.dockWheel.wheelItems[_t],_s=_n2.element.getBoundingClientRect();e.touches[0].clientX>_s.left-i.left&&e.touches[0].clientX<_s.left+_n2.element.clientWidth-i.left&&e.touches[0].clientY>_s.top-i.top&&e.touches[0].clientY<_s.top+_n2.element.clientHeight-i.top?_n2.onMouseMoved():_n2.active&&_n2.onMouseOut()}}var n=null;if(e.changedTouches){if(e.changedTouches.length>1)return;n=e.changedTouches[0]}else n=e;var s=new l(n.clientX,n.clientY);t&&(s=new l(n.clientX+t.x,n.clientY+t.y));var o=this.dockManager.checkXBounds(this.topLevelElement,s,this.previousMousePosition,!1,!1),a=this.dockManager.checkYBounds(this.topLevelElement,s,this.previousMousePosition,!1,!1);this._performDrag(o,a),this.previousMousePosition=s}},{key:"_performDrag",value:function _performDrag(e,t){var i=e+a.getPixels(this.topLevelElement.style.left),n=t+a.getPixels(this.topLevelElement.style.top);this.topLevelElement.style.left=i+"px",this.topLevelElement.style.top=n+"px"}}]);return c}();var u=function(){function u(){_classCallCheck(this,u);this.element=void 0,this.handleSize=6,this.cornerSize=12,this.east=!1,this.west=!1,this.north=!1,this.south=!1,this.corner=!1}_createClass(u,[{key:"adjustSize",value:function adjustSize(e,t){this.corner?(this.west&&(this.element.style.left="0px"),this.east&&(this.element.style.left=e-this.cornerSize+"px"),this.north&&(this.element.style.top="0px"),this.south&&(this.element.style.top=t-this.cornerSize+"px")):(this.west&&(this.element.style.left="0px",this.element.style.top=this.cornerSize+"px"),this.east&&(this.element.style.left=e-this.handleSize+"px",this.element.style.top=this.cornerSize+"px"),this.north&&(this.element.style.left=this.cornerSize+"px",this.element.style.top="0px"),this.south&&(this.element.style.left=this.cornerSize+"px",this.element.style.top=t-this.handleSize+"px"),this.west||this.east?this.element.style.height=t-2*this.cornerSize+"px":this.element.style.width=e-2*this.cornerSize+"px")}}]);return u}();var m=function(){function m(e,t,i){_classCallCheck(this,m);this.dialog=e,this.delegate=t,this.containerElement=t.containerElement,this.dockManager=t.dockManager,this.topLevelElement=i,this.containerType=t.containerType,this.topLevelElement.style.left=this.topLevelElement.offsetLeft+"px",this.topLevelElement.style.top=this.topLevelElement.offsetTop+"px",this.minimumAllowedChildNodes=t.minimumAllowedChildNodes,this._buildResizeHandles(),this.readyToProcessNextResize=!0,this.dockSpawnResizedEvent=new CustomEvent("DockSpawnResizedEvent",{composed:!0,bubbles:!0}),this.iframeEventHandlers=[]}_createClass(m,[{key:"setActiveChild",value:function setActiveChild(){}},{key:"_buildResizeHandles",value:function _buildResizeHandles(){this.resizeHandles=[],this._buildResizeHandle(!1,!0,!0,!1),this._buildResizeHandle(!0,!1,!1,!0),this._buildResizeHandle(!1,!0,!1,!0),this._buildResizeHandle(!0,!1,!1,!1),this._buildResizeHandle(!1,!0,!1,!1),this._buildResizeHandle(!1,!1,!0,!1),this._buildResizeHandle(!1,!1,!1,!0)}},{key:"_buildResizeHandle",value:function _buildResizeHandle(e,t,i,n){var _this5=this;var s=new u;s.east=e,s.west=t,s.north=i,s.south=n,s.element=document.createElement("div"),this.topLevelElement.appendChild(s.element);var o="",l="";i&&(o="n"),n&&(o="s"),e&&(l="e"),t&&(l="w");var a="resize-handle-"+o+l;o.length>0&&l.length>0&&(s.corner=!0),s.element.classList.add(s.corner?"resize-handle-corner":"resize-handle"),s.element.classList.add(a),this.resizeHandles.push(s),s.mouseDownHandler=new h(s.element,"mousedown",function(e){_this5.onMouseDown(s,e)}),s.touchDownHandler=new h(s.element,"touchstart",function(e){_this5.onMouseDown(s,e)})}},{key:"saveState",value:function saveState(e){this.delegate.saveState(e)}},{key:"loadState",value:function loadState(e){this.delegate.loadState(e)}},{key:"width",get:function get(){return this.delegate.width}},{key:"height",get:function get(){return this.delegate.height}},{key:"name",get:function get(){return this.delegate.name},set:function set(e){e&&(this.delegate.name=e)}},{key:"resize",value:function resize(e,t){this.delegate.resize(e,t),this._adjustResizeHandles(e,t),document.dispatchEvent(this.dockSpawnResizedEvent)}},{key:"_adjustResizeHandles",value:function _adjustResizeHandles(e,t){this.resizeHandles.forEach(function(i){i.adjustSize(e,t)})}},{key:"performLayout",value:function performLayout(e){this.delegate.performLayout(e,!1)}},{key:"destroy",value:function destroy(){this.removeDecorator(),this.delegate.destroy()}},{key:"removeDecorator",value:function removeDecorator(){}},{key:"onMouseMovedIframe",value:function onMouseMovedIframe(e,t,i){var n=i.getBoundingClientRect();this.onMouseMoved(e,t,{x:n.x,y:n.y})}},{key:"onMouseMoved",value:function onMouseMoved(e,t,i){var n=null;if(t.changedTouches){if(t.changedTouches.length>1)return;n=t.changedTouches[0]}else n=t;if(!this.readyToProcessNextResize)return;this.readyToProcessNextResize=!1,this.dialog.panel&&this.dockManager.suspendLayout(this.dialog.panel);var s=new l(n.clientX,n.clientY);i&&(s=new l(n.clientX+i.x,n.clientY+i.y));var o=this.dockManager.checkXBounds(this.topLevelElement,s,this.previousMousePosition,e.west,e.east),a=this.dockManager.checkYBounds(this.topLevelElement,s,this.previousMousePosition,e.north,e.south);this._performDrag(e,o,a),this.previousMousePosition=s,this.readyToProcessNextResize=!0,this.dialog.panel&&this.dockManager.resumeLayout(this.dialog.panel),this.dockManager.notifyOnContainerResized(this)}},{key:"onMouseDown",value:function onMouseDown(e,t){var _this6=this;var i=null;if(t.touches){if(t.touches.length>1)return;i=t.touches[0]}else i=t;this.previousMousePosition=new l(i.clientX,i.clientY),e.mouseMoveHandler&&(e.mouseMoveHandler.cancel(),delete e.mouseMoveHandler),e.touchMoveHandler&&(e.touchMoveHandler.cancel(),delete e.touchMoveHandler),e.mouseUpHandler&&(e.mouseUpHandler.cancel(),delete e.mouseUpHandler),e.touchUpHandler&&(e.touchUpHandler.cancel(),delete e.touchUpHandler);var _iterator3=_createForOfIteratorHelper(this.iframeEventHandlers),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var _e2=_step3.value;_e2.cancel()}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}if(this.iframeEventHandlers=[],e.mouseMoveHandler=new h(window,"mousemove",function(t){_this6.onMouseMoved(e,t)}),e.touchMoveHandler=new h(window,"touchmove",function(t){_this6.onMouseMoved(e,t)}),e.mouseUpHandler=new h(window,"mouseup",function(t){_this6.onMouseUp(e)}),e.touchUpHandler=new h(window,"touchend",function(t){_this6.onMouseUp(e)}),this.dockManager.iframes){var _iterator4=_createForOfIteratorHelper(this.dockManager.iframes),_step4;try{var _loop2=function _loop2(){var t=_step4.value;var i=_this6.onMouseMovedIframe.bind(_this6);_this6.iframeEventHandlers.push(new h(t.contentWindow,"mousemove",function(n){return i(e,n,t)})),_this6.iframeEventHandlers.push(new h(t.contentWindow,"mouseup",function(t){return _this6.onMouseUp(e)})),_this6.iframeEventHandlers.push(new h(t.contentWindow,"touchmove",function(n){return i(e,n,t)})),_this6.iframeEventHandlers.push(new h(t.contentWindow,"touchend",function(t){return _this6.onMouseUp(e)}))};for(_iterator4.s();!(_step4=_iterator4.n()).done;){_loop2()}}catch(err){_iterator4.e(err)}finally{_iterator4.f()}}a.disableGlobalTextSelection(this.dockManager.config.dialogRootElement)}},{key:"onMouseUp",value:function onMouseUp(e){e.mouseMoveHandler.cancel(),e.touchMoveHandler.cancel(),e.mouseUpHandler.cancel(),e.touchUpHandler.cancel(),delete e.mouseMoveHandler,delete e.touchMoveHandler,delete e.mouseUpHandler,delete e.touchUpHandler;var _iterator5=_createForOfIteratorHelper(this.iframeEventHandlers),_step5;try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){var _e3=_step5.value;_e3.cancel()}}catch(err){_iterator5.e(err)}finally{_iterator5.f()}this.iframeEventHandlers=[],a.enableGlobalTextSelection(this.dockManager.config.dialogRootElement)}},{key:"_performDrag",value:function _performDrag(e,t,i){var n={};n.left=a.getPixels(this.topLevelElement.style.left),n.top=a.getPixels(this.topLevelElement.style.top),n.width=this.topLevelElement.clientWidth,n.height=this.topLevelElement.clientHeight,e.east&&this._resizeEast(t,n),e.west&&this._resizeWest(t,n),e.north&&this._resizeNorth(i,n),e.south&&this._resizeSouth(i,n)}},{key:"_resizeWest",value:function _resizeWest(e,t){this._resizeContainer(e,0,-e,0,t)}},{key:"_resizeEast",value:function _resizeEast(e,t){this._resizeContainer(0,0,e,0,t)}},{key:"_resizeNorth",value:function _resizeNorth(e,t){this._resizeContainer(0,e,0,-e,t)}},{key:"_resizeSouth",value:function _resizeSouth(e,t){this._resizeContainer(0,0,0,e,t)}},{key:"_resizeContainer",value:function _resizeContainer(e,t,i,n,s){s.left+=e,s.top+=t,s.width+=i,s.height+=n,s.width=Math.max(s.width,50),s.height=Math.max(s.height,50),this.topLevelElement.style.left=s.left+"px",this.topLevelElement.style.top=s.top+"px",this.resize(s.width,s.height)}}]);return m}();var p=function(){function p(e,t,i){_classCallCheck(this,p);this.panel=e,this.dockManager=t,this.eventListener=t,this.grayoutParent=i,this._initialize(),this.dockManager.context.model.dialogs.push(this),this.position=t.defaultDialogPosition,this.dockManager.notifyOnCreateDialog(this),e.isDialog=!0}_createClass(p,[{key:"saveState",value:function saveState(e,t){this.position=new l(e,t),this.dockManager.notifyOnChangeDialogPosition(this,e,t)}},{key:"_initialize",value:function _initialize(){this.panel.floatingDialog=this,this.elementDialog=Object.assign(document.createElement("div"),{floatingDialog:this}),this.elementDialog.tabIndex=0,this.elementDialog.appendChild(this.panel.elementPanel),this.draggable=new c(this,this.panel,this.elementDialog,this.panel.elementTitle),this.resizable=new m(this,this.draggable,this.draggable.topLevelElement),this.dockManager.config.dialogRootElement.appendChild(this.elementDialog),this.elementDialog.classList.add("dialog-floating"),this.focusHandler=new h(this.elementDialog,"focus",this.onFocus.bind(this),!0),this.mouseDownHandler=new h(this.elementDialog,"mousedown",this.onMouseDown.bind(this),!0),this.touchDownHandler=new h(this.elementDialog,"touchstart",this.onMouseDown.bind(this)),this.keyPressHandler=new h(this.elementDialog,"keypress",this.dockManager.onKeyPressBound,!0),this.resize(this.panel.elementPanel.clientWidth,this.panel.elementPanel.clientHeight),this.isHidden=!1,null!=this.grayoutParent&&this.grayoutParent.grayOut(!0),this.bringToFront()}},{key:"setPosition",value:function setPosition(e,t){var i=this.dockManager.config.dialogRootElement.getBoundingClientRect();this.position=new l(e-i.left,t-i.top),this.elementDialog.style.left=e-i.left+"px",this.elementDialog.style.top=t-i.top+"px",this.dockManager.notifyOnChangeDialogPosition(this,e,t)}},{key:"getPosition",value:function getPosition(){return new l(this.position?this.position.x:0,this.position?this.position.y:0)}},{key:"onFocus",value:function onFocus(){this.dockManager.activePanel!=this.panel&&(this.dockManager.activePanel=this.panel)}},{key:"onMouseDown",value:function onMouseDown(){this.bringToFront()}},{key:"destroy",value:function destroy(){this.panel.lastDialogSize={width:this.resizable.width,height:this.resizable.height},this.focusHandler&&(this.focusHandler.cancel(),delete this.focusHandler),this.mouseDownHandler&&(this.mouseDownHandler.cancel(),delete this.mouseDownHandler),this.touchDownHandler&&(this.touchDownHandler.cancel(),delete this.touchDownHandler),this.keyPressHandler&&(this.keyPressHandler.cancel(),delete this.keyPressHandler),a.removeNode(this.elementDialog),this.draggable.removeDecorator(),a.removeNode(this.panel.elementPanel),a.arrayRemove(this.dockManager.context.model.dialogs,this),delete this.panel.floatingDialog,this.grayoutParent&&this.grayoutParent.grayOut(!1)}},{key:"resize",value:function resize(e,t){this.resizable.resize(e,t)}},{key:"setTitle",value:function setTitle(e){this.panel.setTitle(e)}},{key:"setTitleIcon",value:function setTitleIcon(e){this.panel.setTitleIcon(e)}},{key:"bringToFront",value:function bringToFront(){this.elementDialog.style.zIndex=this.dockManager.zIndexDialogCounter++,this.dockManager.activePanel=this.panel}},{key:"hide",value:function hide(){this.elementDialog.style.zIndex="0",this.elementDialog.style.display="none",this.isHidden||(this.isHidden=!0,this.dockManager.notifyOnHideDialog(this)),this.grayoutParent&&this.grayoutParent.grayOut(!1)}},{key:"close",value:function close(){this.hide(),this.remove(),this.dockManager.notifyOnClosePanel(this.panel),this.destroy()}},{key:"remove",value:function remove(){this.elementDialog.parentNode.removeChild(this.elementDialog)}},{key:"show",value:function show(){this.elementDialog.style.zIndex=this.dockManager.zIndexDialogCounter++,this.elementDialog.style.display="block",this.isHidden&&(this.isHidden=!1,this.dockManager.notifyOnShowDialog(this))}}],[{key:"fromElement",value:function fromElement(e,t){return new p(new d(document.getElementById(e),t),t,null)}}]);return p}();var g=_createClass(function g(){_classCallCheck(this,g);this.escClosesWindow=!0,this.escClosesDialog=!0,this.dialogRootElement=document.body,this.moveOnlyWithinDockConatiner=!1});var v=function(){function v(){_classCallCheck(this,v)}_createClass(v,[{key:"serialize",value:function serialize(e){var t=this._buildGraphInfo(e.rootNode),i=this._buildDialogsInfo(e.dialogs.sort(function(e,t){return e.elementDialog.style.zIndex-t.elementDialog.style.zIndex}));return JSON.stringify({graphInfo:t,dialogsInfo:i})}},{key:"_buildGraphInfo",value:function _buildGraphInfo(e){var _this7=this;var t={};e.container.saveState(t);var i=[];return e.children.forEach(function(e){i.push(_this7._buildGraphInfo(e))}),{containerType:e.container.containerType,state:t,children:i}}},{key:"_buildDialogsInfo",value:function _buildDialogsInfo(e){var t=[];return e.forEach(function(e){var i={},n=e.panel;n.saveState(i);var s={containerType:n.containerType,state:i,position:e.getPosition(),isHidden:e.isHidden};t.push(s)}),t}}]);return v}();var f=function(){function f(e){_classCallCheck(this,f);this.container=e,this.children=[]}_createClass(f,[{key:"detachFromParent",value:function detachFromParent(){this.parent&&(this.parent.removeChild(this),delete this.parent)}},{key:"removeChild",value:function removeChild(e){var t=this.children.indexOf(e);t>=0&&this.children.splice(t,1)}},{key:"addChild",value:function addChild(e){e.detachFromParent(),e.parent=this,this.children.push(e)}},{key:"addChildBefore",value:function addChildBefore(e,t){this._addChildWithDirection(e,t,!0)}},{key:"addChildAfter",value:function addChildAfter(e,t){this._addChildWithDirection(e,t,!1)}},{key:"_addChildWithDirection",value:function _addChildWithDirection(e,t,i){t.detachFromParent(),t.parent=this;var n=this.children.indexOf(e),s=this.children.slice(0,n),o=this.children.slice(n+1,this.children.length);this.children=s.slice(0),i?(this.children.push(t),this.children.push(e)):(this.children.push(e),this.children.push(t)),Array.prototype.push.apply(this.children,o)}},{key:"performLayout",value:function performLayout(e){var t=this.children.map(function(e){return e.container});this.container.performLayout(t,e)}},{key:"debugDumpTree",value:function debugDumpTree(e){void 0===e&&(e=0);var t=this.container.name;for(var _i2=0;_i2<e;_i2++){t="\t"+t}var i=void 0===this.parent?"null":this.parent.container.containerType;console.log(">>"+t+" ["+i+"]"),this.children.forEach(function(t){t.debugDumpTree(e+1)})}}]);return f}();var w=function(){function w(e,t,i){_classCallCheck(this,w);this.previousContainer=e,this.nextContainer=t,this.stackedVertical=i,this.barElement=document.createElement("div"),this.barElement.classList.add(i?"splitbar-horizontal":"splitbar-vertical"),this.mouseDownHandler=new h(this.barElement,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new h(this.barElement,"touchstart",this.onMouseDown.bind(this)),this.minPanelSize=50,this.readyToProcessNextDrag=!0,this.dockSpawnResizedEvent=new CustomEvent("DockSpawnResizedEvent",{composed:!0,bubbles:!0}),this.iframeEventHandlers=[]}_createClass(w,[{key:"onMouseDown",value:function onMouseDown(e){if(e.touches){if(e.touches.length>1)return;e=e.touches[0]}this._startDragging(e)}},{key:"onMouseUp",value:function onMouseUp(){this._stopDragging()}},{key:"onMouseMovedIframe",value:function onMouseMovedIframe(e,t){null!=e.changedTouches&&(e=e.changedTouches[0]);var i=t.getBoundingClientRect();this.handleMoveEvent({x:e.clientX+i.x,y:e.clientY+i.y})}},{key:"onMouseMoved",value:function onMouseMoved(e){null!=e.changedTouches&&(e=e.changedTouches[0]),this.handleMoveEvent({x:e.clientX,y:e.clientY})}},{key:"handleMoveEvent",value:function handleMoveEvent(e){if(!this.readyToProcessNextDrag)return;this.readyToProcessNextDrag=!1;var t=this.previousContainer.dockManager;t.suspendLayout(this.previousContainer),t.suspendLayout(this.nextContainer);var i=e.x-this.previousMouseEvent.x,n=e.y-this.previousMouseEvent.y;this._performDrag(i,n),this.previousMouseEvent=e,this.readyToProcessNextDrag=!0,t.resumeLayout(this.previousContainer),t.resumeLayout(this.nextContainer)}},{key:"_performDrag",value:function _performDrag(e,t){var i=this.previousContainer.containerElement.clientWidth,n=this.previousContainer.containerElement.clientHeight,s=this.nextContainer.containerElement.clientWidth,o=this.nextContainer.containerElement.clientHeight,l=this.stackedVertical?n:i,a=this.stackedVertical?o:s,h=this.stackedVertical?t:e,r=l+h,d=a-h;(!(r<this.minPanelSize||d<this.minPanelSize)||r<this.minPanelSize&&r>l||d<this.minPanelSize&&d>a)&&(this.stackedVertical?(this.previousContainer.resize(i,r),this.nextContainer.resize(s,d)):(this.previousContainer.resize(r,n),this.nextContainer.resize(d,o)),document.dispatchEvent(this.dockSpawnResizedEvent))}},{key:"_startDragging",value:function _startDragging(e){var _this8=this;if(a.disableGlobalTextSelection(this.previousContainer.dockManager.config.dialogRootElement),this.mouseMovedHandler&&(this.mouseMovedHandler.cancel(),delete this.mouseMovedHandler),this.touchMovedHandler&&(this.touchMovedHandler.cancel(),delete this.touchMovedHandler),this.mouseUpHandler&&(this.mouseUpHandler.cancel(),delete this.mouseUpHandler),this.touchUpHandler&&(this.touchUpHandler.cancel(),delete this.touchUpHandler),this.mouseMovedHandler=new h(window,"mousemove",this.onMouseMoved.bind(this)),this.mouseUpHandler=new h(window,"mouseup",this.onMouseUp.bind(this)),this.touchMovedHandler=new h(window,"touchmove",this.onMouseMoved.bind(this)),this.touchUpHandler=new h(window,"touchend",this.onMouseUp.bind(this)),this.previousContainer.dockManager.iframes){var _iterator6=_createForOfIteratorHelper(this.previousContainer.dockManager.iframes),_step6;try{var _loop3=function _loop3(){var e=_step6.value;var t=_this8.onMouseMovedIframe.bind(_this8);_this8.iframeEventHandlers.push(new h(e.contentWindow,"mousemove",function(i){return t(i,e)})),_this8.iframeEventHandlers.push(new h(e.contentWindow,"mouseup",_this8.onMouseUp.bind(_this8))),_this8.iframeEventHandlers.push(new h(e.contentWindow,"touchmove",function(i){return t(i,e)})),_this8.iframeEventHandlers.push(new h(e.contentWindow,"touchend",_this8.onMouseUp.bind(_this8)))};for(_iterator6.s();!(_step6=_iterator6.n()).done;){_loop3()}}catch(err){_iterator6.e(err)}finally{_iterator6.f()}}this.previousMouseEvent={x:e.clientX,y:e.clientY}}},{key:"_stopDragging",value:function _stopDragging(){a.enableGlobalTextSelection(this.previousContainer.dockManager.config.dialogRootElement),this.mouseMovedHandler&&(this.mouseMovedHandler.cancel(),delete this.mouseMovedHandler),this.touchMovedHandler&&(this.touchMovedHandler.cancel(),delete this.touchMovedHandler),this.mouseUpHandler&&(this.mouseUpHandler.cancel(),delete this.mouseUpHandler),this.touchUpHandler&&(this.touchUpHandler.cancel(),delete this.touchUpHandler);var _iterator7=_createForOfIteratorHelper(this.iframeEventHandlers),_step7;try{for(_iterator7.s();!(_step7=_iterator7.n()).done;){var _e4=_step7.value;_e4.cancel()}}catch(err){_iterator7.e(err)}finally{_iterator7.f()}this.iframeEventHandlers=[]}}]);return w}();var M=function(){function M(e,t){_classCallCheck(this,M);this.childContainers=e,this.stackedVertical=t,this.panelElement=document.createElement("div"),this.spiltterBars=[],this._buildSplitterDOMAndAddElements()}_createClass(M,[{key:"_buildSplitterDOMAndAddElements",value:function _buildSplitterDOMAndAddElements(){if(this.childContainers.length<=1)throw new Error("Splitter panel should contain atleast 2 panels");this.spiltterBars=[];var e=null;for(var _t2=0;_t2<this.childContainers.length-1;_t2++){var _i3=this.childContainers[_t2],_n3=this.childContainers[_t2+1],_s2=new w(_i3,_n3,this.stackedVertical);this.spiltterBars.push(_s2),Array.from(this.panelElement.children).includes(_i3.containerElement)||this._insertContainerIntoPanel(_i3,e),this.panelElement.insertBefore(_s2.barElement,_i3.containerElement.nextSibling),e=_s2.barElement}var t=this.childContainers.slice(-1)[0];Array.from(this.panelElement.children).includes(t.containerElement)||this._insertContainerIntoPanel(t,e)}},{key:"performLayout",value:function performLayout(e,t){a.arrayEqual(this.childContainers,e)&&!t||(this.childContainers.forEach(function(t){e.some(function(e){return e==t})||t.containerElement&&(t.containerElement.classList.remove("splitter-container-vertical"),t.containerElement.classList.remove("splitter-container-horizontal"),a.removeNode(t.containerElement))}),this.spiltterBars.forEach(function(e){a.removeNode(e.barElement)}),this.childContainers=e,this._buildSplitterDOMAndAddElements())}},{key:"removeFromDOM",value:function removeFromDOM(){this.childContainers.forEach(function(e){e.containerElement&&(e.containerElement.classList.remove("splitter-container-vertical"),e.containerElement.classList.remove("splitter-container-horizontal"),a.removeNode(e.containerElement))}),this.spiltterBars.forEach(function(e){a.removeNode(e.barElement)})}},{key:"destroy",value:function destroy(){this.removeFromDOM(),this.panelElement.parentNode.removeChild(this.panelElement)}},{key:"_insertContainerIntoPanel",value:function _insertContainerIntoPanel(e,t){e?(e.containerElement.parentNode!=this.panelElement&&(a.removeNode(e.containerElement),t?this.panelElement.insertBefore(e.containerElement,t.nextSibling):this.panelElement.children.length>0?this.panelElement.insertBefore(e.containerElement,this.panelElement.children[0]):this.panelElement.appendChild(e.containerElement)),e.containerElement.classList.add(this.stackedVertical?"splitter-container-vertical":"splitter-container-horizontal")):console.error("container is undefined")}},{key:"setContainerRatio",value:function setContainerRatio(e,t){var i=this.stackedVertical?this.panelElement.clientHeight:this.panelElement.clientWidth,n=i*t,s=(i-n-(this.stackedVertical?this.spiltterBars[0].barElement.clientHeight:this.spiltterBars[0].barElement.clientWidth)*this.spiltterBars.length)/i;for(var _t3=0;_t3<this.childContainers.length;_t3++){var _i4=void 0,_o=this.childContainers[_t3];_o!==e?(_i4=this.stackedVertical?_o.containerElement.parentElement.clientHeight:_o.containerElement.parentElement.clientWidth,_i4*=s):_i4=n,this.stackedVertical?_o.resize(_o.width,Math.floor(_i4)):_o.resize(Math.floor(_i4),_o.height)}}},{key:"getRatios",value:function getRatios(){var e=this.stackedVertical?this.spiltterBars[0].barElement.clientHeight:this.spiltterBars[0].barElement.clientWidth,t=(this.stackedVertical?this.panelElement.clientHeight:this.panelElement.clientWidth)-e*this.spiltterBars.length,i=[];for(var _e5=0;_e5<this.childContainers.length;_e5++){var _n4=this.childContainers[_e5],_s3=this.stackedVertical?_n4.containerElement.clientHeight:_n4.containerElement.clientWidth;i.push(_s3/t)}return i}},{key:"setRatios",value:function setRatios(e){var t=this.stackedVertical?this.spiltterBars[0].barElement.clientHeight:this.spiltterBars[0].barElement.clientWidth,i=(this.stackedVertical?this.panelElement.clientHeight:this.panelElement.clientWidth)-t*this.spiltterBars.length;for(var _t4=0;_t4<this.childContainers.length;_t4++){var _n5=this.childContainers[_t4],_s4=i*e[_t4];this.stackedVertical?_n5.resize(_n5.width,Math.floor(_s4)):_n5.resize(Math.floor(_s4),_n5.height)}}},{key:"resize",value:function resize(e,t){var _this9=this;if(this.childContainers.length<=1)return;var i;for(i=0;i<this.childContainers.length;i++){var _n6=this.childContainers[i];if(this.stackedVertical?_n6.resize(e,_n6.height?_n6.height:t):_n6.resize(_n6.width?_n6.width:e,t),i<this.spiltterBars.length){var _n7=this.spiltterBars[i];this.stackedVertical?_n7.barElement.style.width=e+"px":_n7.barElement.style.height=t+"px"}}var n=0;this.childContainers.forEach(function(e){var t=_this9.stackedVertical?e.height:e.width;n+=t});var s=this.spiltterBars[0].barElement.getBoundingClientRect();var o=this.stackedVertical?s.height:s.width,l=this.stackedVertical?t:e;l-=o*this.spiltterBars.length,n=Math.max(n,1);var a=l/n,h=0;for(i=0;i<this.childContainers.length;i++){var _e6=this.childContainers[i];"none"==_e6.containerElement.style.display&&(_e6.containerElement.style.display="block");var _t5=this.stackedVertical?_e6.containerElement.clientHeight:_e6.containerElement.clientWidth,_n8=a>1?Math.floor(_t5*a):Math.ceil(_t5*a);h+=_n8,i===this.childContainers.length-1&&(_n8+=l-h),this.stackedVertical?_e6.resize(_e6.width,_n8):_e6.resize(_n8,_e6.height)}this.panelElement.style.width=e+"px",this.panelElement.style.height=t+"px"}}]);return M}();var k=function(){function k(e,t,i,n){_classCallCheck(this,k);0!==arguments.length&&(this.name=e,this.dockManager=t,this.stackedVertical=n,this.splitterPanel=new M(i,this.stackedVertical),this.containerElement=this.splitterPanel.panelElement,this.minimumAllowedChildNodes=2)}_createClass(k,[{key:"resize",value:function resize(e,t){this.splitterPanel.resize(e,t),this._cachedWidth=e,this._cachedHeight=t}},{key:"performLayout",value:function performLayout(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;this.splitterPanel.performLayout(e,t)}},{key:"setActiveChild",value:function setActiveChild(){}},{key:"destroy",value:function destroy(){this.splitterPanel.destroy()}},{key:"setContainerRatio",value:function setContainerRatio(e,t){this.splitterPanel.setContainerRatio(e,t),this.resize(this.width,this.height)}},{key:"getRatios",value:function getRatios(){return this.splitterPanel.getRatios()}},{key:"setRatios",value:function setRatios(e){this.splitterPanel.setRatios(e),this.resize(this.width,this.height)}},{key:"saveState",value:function saveState(e){e.width=this.width,e.height=this.height}},{key:"loadState",value:function loadState(e){this.state={width:e.width,height:e.height}}},{key:"width",get:function get(){return void 0===this._cachedWidth&&(this._cachedWidth=this.splitterPanel.panelElement.clientWidth),this._cachedWidth}},{key:"height",get:function get(){return void 0===this._cachedHeight&&(this._cachedHeight=this.splitterPanel.panelElement.clientHeight),this._cachedHeight}}]);return k}();var y=function(_k){_inherits(y,_k);var _super=_createSuper(y);function y(t,i){var _this10;_classCallCheck(this,y);_this10=_super.call(this,a.getNextId("horizontal_splitter_"),t,i,!1),_this10.containerType=e.horizontal;return _this10}return _createClass(y)}(k);var C=function(_k2){_inherits(C,_k2);var _super2=_createSuper(C);function C(t,i){var _this11;_classCallCheck(this,C);_this11=_super2.call(this,a.getNextId("vertical_splitter_"),t,i,!0),_this11.containerType=e.vertical;return _this11}return _createClass(C)}(k);var b=function(){function b(e){var _this12=this;_classCallCheck(this,b);this.parent=e;var t=this._performUndock.bind(this);this.elementBase=document.createElement("div"),this.elementText=document.createElement("div"),this.elementCloseButton=document.createElement("div"),this.elementBase.classList.add("dockspan-tab-handle"),this.elementBase.classList.add("disable-selection"),this.elementText.classList.add("dockspan-tab-handle-text"),this.elementCloseButton.classList.add("dockspan-tab-handle-close-button"),this.elementBase.appendChild(this.elementText),this.parent.host.displayCloseButton&&this.elementBase.appendChild(this.elementCloseButton),(this.parent.container._hideCloseButton||this.parent.container._grayOut)&&(this.elementCloseButton.style.display="none"),this.parent.host.tabListElement.appendChild(this.elementBase);var i=e.container,n=i.getRawTitle();this.undockListener={onDockEnabled:function onDockEnabled(e){_this12.undockEnabled(e.state)},onHideCloseButton:function onHideCloseButton(e){_this12.hideCloseButton(e.state)}},this.eventListeners=[],i.addListener(this.undockListener),this.elementText.innerHTML=n,this.elementText.title=this.elementText.innerText,this._bringToFront(this.elementBase),this.undockInitiator=new r(this.elementBase,t),this.undockInitiator.enabled=!0,this.mouseDownHandler=new h(this.elementBase,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new h(this.elementBase,"touchstart",this.onMouseDown.bind(this),{passive:!1}),this.closeButtonHandler=new h(this.elementCloseButton,"click",this.onCloseButtonClicked.bind(this)),this.closeButtonTouchHandler=new h(this.elementCloseButton,"touchstart",this.onCloseButtonClicked.bind(this)),this.auxClickHandler=new h(this.elementBase,"auxclick",this.onCloseButtonClicked.bind(this)),this.contextMenuHandler=new h(this.elementBase,"contextmenu",this.oncontextMenuClicked.bind(this)),this.zIndexCounter=e.host.dockManager.zIndexTabHandle}_createClass(b,[{key:"addListener",value:function addListener(e){this.eventListeners.push(e)}},{key:"removeListener",value:function removeListener(e){this.eventListeners.splice(this.eventListeners.indexOf(e),1)}},{key:"undockEnabled",value:function undockEnabled(e){this.undockInitiator.enabled=e}},{key:"oncontextMenuClicked",value:function oncontextMenuClicked(e){e.preventDefault(),!this._ctxMenu&&b.createContextMenuContentCallback?(this._ctxMenu=document.createElement("div"),this._ctxMenu.className="dockspab-tab-handle-context-menu",b.createContextMenuContentCallback(this,this._ctxMenu,this.parent.container.dockManager.context.model.documentManagerNode.children),this._ctxMenu.style.left=e.pageX+"px",this._ctxMenu.style.top=e.pageY+"px",document.body.appendChild(this._ctxMenu),this._windowsContextMenuCloseBound=this.windowsContextMenuClose.bind(this),window.addEventListener("mouseup",this._windowsContextMenuCloseBound)):this.closeContextMenu()}},{key:"closeContextMenu",value:function closeContextMenu(){this._ctxMenu&&(document.body.removeChild(this._ctxMenu),delete this._ctxMenu,window.removeEventListener("mouseup",this._windowsContextMenuCloseBound))}},{key:"windowsContextMenuClose",value:function windowsContextMenuClose(e){var t=e.composedPath();for(var _e7 in t){if(t[_e7]==this._ctxMenu)return}this.closeContextMenu()}},{key:"onMouseDown",value:function onMouseDown(e){e.preventDefault(),this.parent.onSelected(),this.mouseMoveHandler&&(this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler),this.touchMoveHandler&&(this.touchMoveHandler.cancel(),delete this.touchMoveHandler),this.mouseUpHandler&&(this.mouseUpHandler.cancel(),delete this.mouseUpHandler),this.touchUpHandler&&(this.touchUpHandler.cancel(),delete this.touchUpHandler),this.stargDragPosition=e.clientX,this.mouseMoveHandler=new h(window,"mousemove",this.onMouseMove.bind(this)),this.touchMoveHandler=new h(window,"touchmove",this.onMouseMove.bind(this),{passive:!1}),this.mouseUpHandler=new h(window,"mouseup",this.onMouseUp.bind(this)),this.touchUpHandler=new h(window,"touchend",this.onMouseUp.bind(this))}},{key:"onMouseUp",value:function onMouseUp(e){this.elementBase&&this.elementBase.classList.remove("dockspan-tab-handle-dragged"),this.dragged=!1,this.mouseMoveHandler&&this.mouseMoveHandler.cancel(),this.touchMoveHandler&&this.touchMoveHandler.cancel(),this.mouseUpHandler&&this.mouseUpHandler.cancel(),this.touchUpHandler&&this.touchUpHandler.cancel(),delete this.mouseMoveHandler,delete this.touchMoveHandler,delete this.mouseUpHandler,delete this.touchUpHandler}},{key:"moveTabEvent",value:function moveTabEvent(e,t){e.eventListeners.forEach(function(i){i.onMoveTab&&i.onMoveTab({self:e,state:t})})}},{key:"onMouseMove",value:function onMouseMove(e){if(e.preventDefault(),!(Math.abs(this.stargDragPosition-e.clientX)<10)&&null!=this.elementBase){this.elementBase.classList.add("dockspan-tab-handle-dragged"),this.dragged=!0,this.prev=this.current,this.current=e.clientX,this.direction=this.current-this.prev;var _t6=this.elementBase.getBoundingClientRect(),_i5=this.direction<0?{state:"left",bound:_t6.left,rect:_t6}:{state:"right",bound:_t6.right,rect:_t6};(e.clientX<_t6.left&&this.direction<0||e.clientX>_t6.left+_t6.width&&this.direction>0)&&this.moveTabEvent(this,_i5.state)}}},{key:"hideCloseButton",value:function hideCloseButton(e){this.elementCloseButton.style.display=e?"none":"block"}},{key:"updateTitle",value:function updateTitle(){if(this.parent.container instanceof d){var _e8=this.parent.container.getRawTitle();this.elementText.innerHTML=_e8}}},{key:"destroy",value:function destroy(){this.parent.container.removeListener(this.undockListener),this.mouseDownHandler.cancel(),this.touchDownHandler.cancel(),this.closeButtonHandler.cancel(),this.closeButtonTouchHandler.cancel(),this.auxClickHandler.cancel(),this.mouseMoveHandler&&this.mouseMoveHandler.cancel(),this.touchMoveHandler&&this.touchMoveHandler.cancel(),this.mouseUpHandler&&this.mouseUpHandler.cancel(),this.touchUpHandler&&this.touchUpHandler.cancel(),this.contextMenuHandler&&this.contextMenuHandler.cancel(),a.removeNode(this.elementBase),a.removeNode(this.elementCloseButton),delete this.elementBase,delete this.elementCloseButton}},{key:"_performUndock",value:function _performUndock(e,t){return"panel"===this.parent.container.containerType?(this.undockInitiator.enabled=!1,this.parent.container.performUndockToDialog(e,t)):null}},{key:"onCloseButtonClicked",value:function onCloseButtonClicked(e){"none"!==this.elementCloseButton.style.display&&2!==e.button&&"panel"===this.parent.container.containerType&&this.parent.container.close()}},{key:"setSelected",value:function setSelected(e){e?this.elementBase.classList.add("dockspan-tab-handle-selected"):(this.elementBase.classList.remove("dockspan-tab-handle-selected"),this.elementBase.classList.remove("dockspan-tab-handle-active"))}},{key:"setActive",value:function setActive(e){this.elementBase&&(e?this.elementBase.classList.add("dockspan-tab-handle-active"):this.elementBase.classList.remove("dockspan-tab-handle-active"))}},{key:"setZIndex",value:function setZIndex(e){this.elementBase.style.zIndex=e}},{key:"_bringToFront",value:function _bringToFront(e){e.style.zIndex=this.zIndexCounter,this.zIndexCounter++}}]);return b}();b.createContextMenuContentCallback=function(e,i,n){var s=document.createElement("div");s.innerText="Close all documents",i.append(s);var o=document.createElement("div");o.innerText="Close all documents but this",i.append(o),s.onclick=function(){for(var _e9=n.length-1;_e9>=0;_e9--){var _i6=n[_e9].container;_i6.panelType==t.document&&_i6.close()}e.closeContextMenu()},o.onclick=function(){for(var _i7=n.length-1;_i7>=0;_i7--){var _s5=n[_i7].container;e.parent.container!=_s5&&_s5.panelType==t.document&&_s5.close()}e.closeContextMenu()}};var E=function(){function E(e,t){_classCallCheck(this,E);0!==arguments.length&&(this.selected=!1,this.host=e,this.container=t,this.handle=new b(this),this.containerElement=t.containerElement,t instanceof d&&(this.panel=t,this.panel.onTitleChanged=this.onTitleChanged.bind(this),this.onTitleChanged()),t.tabPage=this)}_createClass(E,[{key:"onTitleChanged",value:function onTitleChanged(){this.handle.updateTitle(),this.panel&&(this.panel.hasChanges?this.handle.elementText.classList.add("panel-has-changes"):this.handle.elementText.classList.remove("panel-has-changes"))}},{key:"destroy",value:function destroy(){this.handle.destroy(),this.container instanceof d&&delete this.container.onTitleChanged,this.host.dockManager.activePanel==this.panel&&(this.host.dockManager.activePanel=null),this.container.tabPage=null,a.removeNode(this.containerElement)}},{key:"onSelected",value:function onSelected(){this.host.onTabPageSelected(this),this.container instanceof d&&this.container.dockManager.notifyOnTabChange(this)}},{key:"setSelected",value:function setSelected(e){if(this.selected=e,this.handle.setSelected(e),this._initContent||this.host.contentElement.appendChild(this.containerElement),this._initContent=!0,this.selected){this.containerElement.style.display="block";var _e10=this.host.contentElement.clientWidth,_t7=this.host.contentElement.clientHeight;this.container.resize(_e10,_t7),this.host.dockManager.activePanel=this.container}else this.containerElement.style.display="none"}},{key:"resize",value:function resize(e,t){this.container.resize(e,t)}}]);return E}();!function(e){e[e.TOP=0]="TOP",e[e.BOTTOM=1]="BOTTOM",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT"}(i||(i={}));var H=function(){function H(e,t,n){var _this13=this;_classCallCheck(this,H);if(void 0===t&&(t=i.BOTTOM),void 0===n&&(n=!1),this.dockManager=e,this.tabStripDirection=t,this.displayCloseButton=n,this.pages=[],this.eventListeners=[],this.tabHandleListener={onMoveTab:function onMoveTab(e){_this13.onMoveTab(e)}},this.hostElement=document.createElement("div"),this.tabListElement=document.createElement("div"),this.separatorElement=document.createElement("div"),this.contentElement=document.createElement("div"),this.contentElement.tabIndex=0,this.createTabPage=this._createDefaultTabPage,this.tabStripDirection===i.BOTTOM)this.hostElement.appendChild(this.contentElement),this.hostElement.appendChild(this.separatorElement),this.hostElement.appendChild(this.tabListElement);else{if(this.tabStripDirection!==i.TOP)throw new Error("Only top and bottom tab strip orientations are supported");this.hostElement.appendChild(this.tabListElement),this.hostElement.appendChild(this.separatorElement),this.hostElement.appendChild(this.contentElement)}this.hostElement.classList.add("dockspan-tab-host"),this.tabListElement.classList.add("dockspan-tab-handle-list-container"),this.separatorElement.classList.add("dockspan-tab-handle-content-seperator"),this.contentElement.classList.add("dockspan-tab-content"),this.contentElement.tabIndex=0,this.focusHandler=new h(this.contentElement,"focus",this.onFocus.bind(this),!0),this.mouseDownHandler=new h(this.contentElement,"mousedown",this.onMousedown.bind(this),!0)}_createClass(H,[{key:"onFocus",value:function onFocus(){this.activeTab&&this.dockManager.activePanel!=this.activeTab.panel&&(this.dockManager.activePanel=this.activeTab.panel)}},{key:"setActive",value:function setActive(e){e?this.separatorElement.classList.add("dockspan-tab-handle-content-seperator-active"):this.separatorElement.classList.remove("dockspan-tab-handle-content-seperator-active"),this.activeTab&&this.activeTab.handle.setActive(e)}},{key:"onMousedown",value:function onMousedown(){this.activeTab&&this.dockManager.activePanel!=this.activeTab.panel&&(this.dockManager.activePanel=this.activeTab.panel)}},{key:"onMoveTab",value:function onMoveTab(e){var t=Array.prototype.slice.call(this.tabListElement.childNodes).indexOf(e.self.elementBase);this.change(this,e.self,e.state,t)}},{key:"performTabsLayout",value:function performTabsLayout(e){this.pages=a.orderByIndexes(this.pages,e);var t=this.tabListElement.childNodes,i=[];for(var _e11 in t){1===t[_e11].nodeType&&i.push(t[_e11])}i=a.orderByIndexes(i,e);for(var _e12=0;_e12<i.length;++_e12){this.tabListElement.appendChild(i[_e12])}this.activeTab&&this.onTabPageSelected(this.activeTab)}},{key:"getActiveTab",value:function getActiveTab(){return this.activeTab}},{key:"addListener",value:function addListener(e){this.eventListeners.push(e)}},{key:"removeListener",value:function removeListener(e){this.eventListeners.splice(this.eventListeners.indexOf(e),1)}},{key:"change",value:function change(e,t,i,n){this.eventListeners.forEach(function(s){s.onChange&&s.onChange({host:e,handle:t,state:i,index:n})})}},{key:"_createDefaultTabPage",value:function _createDefaultTabPage(e,t){return new E(e,t)}},{key:"setActiveTab",value:function setActiveTab(e){var t;this.pages.forEach(function(i){i.container===e&&(t=i)}),this.pages.length>0&&t&&(this.onTabPageSelected(t),this.dockManager.activePanel=e)}},{key:"resize",value:function resize(e,t){var _this14=this;this.hostElement.style.width=e+"px",this.hostElement.style.height=t+"px";var i=this.tabListElement.clientHeight;this._resizeRequested||requestAnimationFrame(function(){return _this14.resizeTabListElement(e,t)}),this._resizeRequested=!0;var n=this.separatorElement.clientHeight,s=t-i-n;this.contentElement.style.height=s+"px",this.activeTab&&this.activeTab.resize(e,s)}},{key:"resizeTabListElement",value:function resizeTabListElement(e,t){var _this15=this;if(this._resizeRequested=!1,0===this.pages.length)return;var i=0;this.pages.forEach(function(e){var t=e.handle;t.elementBase.style.width="",i+=t.elementBase.clientWidth});var n=e/i;n>1.2||this.pages.forEach(function(e,t){var i=e.handle,s=n*i.elementBase.clientWidth;t===_this15.pages.length-1&&(s-=5),i.elementBase.style.width=s+"px"})}},{key:"performLayout",value:function performLayout(e){var _this16=this;this.pages.forEach(function(t){if(!e.some(function(e){return e==t.container})){t.handle.removeListener(_this16.tabHandleListener),t.destroy();var _e13=_this16.pages.indexOf(t);_e13>-1&&_this16.pages.splice(_e13,1)}});var t=this.activeTab;delete this.activeTab;var i=e.filter(function(e){return"panel"===e.containerType});i.length>0?(i.forEach(function(e){var i=null;_this16.pages.some(function(t){return t.container==e&&(i=t,!0)})||(i=_this16.createTabPage(_this16,e),i.handle.addListener(_this16.tabHandleListener),_this16.pages.push(i)),t&&i.container===t.container&&(_this16.activeTab=i)}),this._setTabHandlesVisible(!0)):this._setTabHandlesVisible(!1),this.activeTab&&this.onTabPageSelected(this.activeTab)}},{key:"_setTabHandlesVisible",value:function _setTabHandlesVisible(e){e?(this.tabListElement.classList.add("dockspan-tab-handle-list-container-visible"),this.separatorElement.classList.add("dockspan-tab-handle-content-seperator-visible")):(this.tabListElement.classList.remove("dockspan-tab-handle-list-container-visible"),this.separatorElement.classList.remove("dockspan-tab-handle-content-seperator-visible"))}},{key:"onTabPageSelected",value:function onTabPageSelected(e){this.activeTab=e,this.pages.forEach(function(t){var i=t===e;t.setSelected(i)});var t=1,i=this.dockManager.zIndexTabHost;this.pages.forEach(function(n){n.handle.setZIndex(i),n===e&&(t=-1),i+=t})}}]);return H}();var D=function(){function D(t,n){var _this17=this;_classCallCheck(this,D);void 0===n&&(n=i.BOTTOM),this.dockManager=t,this.tabOrientation=n,this.name=a.getNextId("fill_"),this.element=document.createElement("div"),this.containerElement=this.element,this.containerType=e.fill,this.minimumAllowedChildNodes=2,this.element.classList.add("dock-container"),this.element.classList.add("dock-container-fill"),this.tabHost=new H(t,this.tabOrientation),this.tabHostListener={onChange:function onChange(e){_this17.dockManager._requestTabReorder(_this17,e)}},this.tabHost.addListener(this.tabHostListener),this.element.appendChild(this.tabHost.hostElement)}_createClass(D,[{key:"setActiveChild",value:function setActiveChild(e){this.tabHost.setActiveTab(e)}},{key:"resize",value:function resize(e,t){this.element.style.width=e+"px",this.element.style.height=t+"px",this.tabHost.resize(e,t)}},{key:"performLayout",value:function performLayout(e){this.tabHost.performLayout(e)}},{key:"destroy",value:function destroy(){a.removeNode(this.element)&&delete this.element}},{key:"saveState",value:function saveState(e){e.width=this.width,e.height=this.height}},{key:"loadState",value:function loadState(e){this.state={width:e.width,height:e.height}}},{key:"width",get:function get(){return this.element.clientWidth},set:function set(e){this.element.style.width=e+"px"}},{key:"height",get:function get(){return this.element.clientHeight},set:function set(e){this.element.style.height=e+"px"}}]);return D}();var x=function(){function x(e){_classCallCheck(this,x);this._forceResizeCompositeContainer=function(e){var t=e.containerElement.clientWidth,i=e.containerElement.clientHeight;e.resize(t,i)},this.dockManager=e}_createClass(x,[{key:"dockLeft",value:function dockLeft(e,t){this._performDock(e,t,"horizontal",!0)}},{key:"dockRight",value:function dockRight(e,t){this._performDock(e,t,"horizontal",!1)}},{key:"dockUp",value:function dockUp(e,t){this._performDock(e,t,"vertical",!0)}},{key:"dockDown",value:function dockDown(e,t){this._performDock(e,t,"vertical",!1)}},{key:"dockFill",value:function dockFill(e,t){this._performDock(e,t,"fill",!1)}},{key:"undock",value:function undock(e){var t=e.parent;if(!t)throw new Error("Cannot undock. panel is not a leaf node");var i=t.children.indexOf(e);if(e.detachFromParent(),t.children.length<t.container.minimumAllowedChildNodes){var _e14=t.parent;for(var _i8=0;_i8<t.children.length;_i8++){var _n9=t.children[_i8];if(_e14){_e14.addChildAfter(t,_n9),t.detachFromParent();var _i9=t.container.containerElement.clientWidth,_s6=t.container.containerElement.clientHeight;t.container.destroy(),_n9.container.resize(_i9,_s6),_e14.performLayout(!1)}else t.detachFromParent(),t.container.destroy(),this.dockManager.setRootNode(_n9)}}else if(t.performLayout(!1),t.children.length>0){var _e15=t.children[Math.max(0,i-1)];t.container.setActiveChild(_e15.container)}this.dockManager.invalidate(),this.dockManager.notifyOnUnDock(e)}},{key:"close",value:function close(e){var t=e.parent;if(!t)throw new Error("Cannot undock. panel is not a leaf node");var i=!1;t.children.length>0&&null!=t.container.tabHost&&(i=t.container.tabHost.getActiveTab().container==e.container);var n=t.children.indexOf(e);if(e.detachFromParent(),t.children.length<t.container.minimumAllowedChildNodes){var _e16=t.parent;for(var _i10=0;_i10<t.children.length;_i10++){var _n10=t.children[_i10];if(_e16){_e16.addChildAfter(t,_n10),t.detachFromParent();var _i11=t.container.containerElement.clientWidth,_s7=t.container.containerElement.clientHeight;_n10.container.resize(_i11,_s7),t.container.destroy(),_e16.performLayout(!1)}else t.detachFromParent(),t.container.destroy(),this.dockManager.setRootNode(_n10)}}else if(t.performLayout(!1),i){var _e17=t.children[Math.max(0,n-1)];null!=_e17&&t.container.setActiveChild(_e17.container)}this.dockManager.invalidate(),this.dockManager.notifyOnUnDock(e)}},{key:"reorderTabs",value:function reorderTabs(e,t,i,n){var s=e.children.length,o="left"===i?n:n+1;if("right"==i&&o>=e.children.length)return;if("left"==i&&0==o)return;var l=Array.apply(null,{length:s}).map(Number.call,Number),h=l.splice(o,1)[0];l.splice("left"===i?n-1:n,0,h),e.children=a.orderByIndexes(e.children,l),e.container.tabHost.performTabsLayout(l),this.dockManager.notifyOnTabsReorder(e)}},{key:"_performDock",value:function _performDock(e,t,i,n){if(e.parent&&"fill"===e.parent.container.containerType&&(e=e.parent),"fill"===i&&"fill"===e.container.containerType)return e.addChild(t),e.performLayout(!1),e.container.setActiveChild(t.container),this.dockManager.invalidate(),void this.dockManager.notifyOnDock(t);var s,o,l;if(e===this.dockManager.context.model.rootNode)return n?(s=this._createDockContainer(i,t,e),o=new f(s),o.addChild(t),o.addChild(e)):(s=this._createDockContainer(i,e,t),o=new f(s),o.addChild(e),o.addChild(t)),this.dockManager.setRootNode(o),this.dockManager.rebuildLayout(this.dockManager.context.model.rootNode),o.container.setActiveChild(t.container),this.dockManager.invalidate(),void this.dockManager.notifyOnDock(t);if(e.parent.container.containerType!==i){l=e.parent;var _h=e.container.containerElement.clientWidth,_r=e.container.containerElement.clientHeight,_d=l.container.containerElement.clientWidth,_c=l.container.containerElement.clientHeight;s=this._createDockContainer(i,t,e),o=new f(s),l.addChildAfter(e,o),e.detachFromParent(),a.removeNode(e.container.containerElement),n?(o.addChild(t),o.addChild(e)):(o.addChild(e),o.addChild(t)),l.performLayout(!1),o.performLayout(!0),o.container.setActiveChild(t.container),o.container.resize(_h,_r),l.container.resize(_d,_c)}else l=e.parent,n?l.addChildBefore(e,t):l.addChildAfter(e,t),l.performLayout(!1),l.container.setActiveChild(t.container);var h=t.container.containerElement.clientWidth,r=t.container.containerElement.clientHeight;t.container.resize(h,r),this.dockManager.invalidate(),this.dockManager.notifyOnDock(t)}},{key:"_createDockContainer",value:function _createDockContainer(e,t,i){if("horizontal"===e)return new y(this.dockManager,[t.container,i.container]);if("vertical"===e)return new C(this.dockManager,[t.container,i.container]);if("fill"===e)return new D(this.dockManager);throw new Error("Failed to create dock container of type: "+e)}},{key:"getDockBounds",value:function getDockBounds(e,t,i,n){var s,o,l,a;if("fill"===i){var _t8=e.container.containerElement,_i12=this.dockManager.element.getBoundingClientRect(),_n11=_t8.getBoundingClientRect();return{x:_n11.left-_i12.left,y:_n11.top-_i12.top,width:_t8.clientWidth,height:_t8.clientHeight}}e.parent&&"fill"===e.parent.container.containerType&&(e=e.parent);var h=!1;e.parent&&e.parent.container.containerType===i?(s=e.parent,o=s.children.length,l=s.children.indexOf(e)+(n?0:1)):(s=e,o=1,l=n?0:1,h=!0);var r=0,d=0;if("vertical"===i||"horizontal"===i){var _e18=this._getVaringDimension(s.container,i)-5*(o-1),_a=this._getVaringDimension(t,i),_c2=_e18/(_e18+_a);if(r=_a*_c2,h)d=n?0:_e18*_c2;else{for(var _e19=0;_e19<l;_e19++){d+=this._getVaringDimension(s.children[_e19].container,i)}d*=_c2}}a={};var c=this.dockManager.element.getBoundingClientRect(),u=s.container.containerElement.getBoundingClientRect();return"vertical"===i?(a.x=u.left-c.left,a.y=u.top-c.top+d,a.width=s.container.width,a.height=r):"horizontal"===i&&(a.x=u.left-c.left+d,a.y=u.top-c.top,a.width=r,a.height=s.container.height),a}},{key:"_getVaringDimension",value:function _getVaringDimension(e,t){return"vertical"===t?e.height:"horizontal"===t?e.width:0}}]);return x}();var _=function(){function _(e,t){_classCallCheck(this,_);this.wheel=e,this.id=t;var i=t.replace("-s","");this.element=document.createElement("div"),this.element.classList.add("dock-wheel-item"),this.element.classList.add("disable-selection"),this.element.classList.add("dock-wheel-"+i),this.element.classList.add("dock-wheel-"+i+"-icon"),this.hoverIconClass="dock-wheel-"+i+"-icon-hover",this.mouseOverHandler=new h(this.element,"mouseover",this.onMouseMoved.bind(this)),this.mouseOutHandler=new h(this.element,"mouseout",this.onMouseOut.bind(this)),this.active=!1}_createClass(_,[{key:"onMouseMoved",value:function onMouseMoved(){this.active=!0,this.element.classList.add(this.hoverIconClass),this.wheel.onMouseOver(this)}},{key:"onMouseOut",value:function onMouseOut(){this.active=!1,this.element.classList.remove(this.hoverIconClass),this.wheel.onMouseOut()}}]);return _}();!function(e){e.left="left",e.right="right",e.top="top",e.down="down",e.fill="fill",e["left-s"]="left-s",e["right-s"]="right-s",e["top-s"]="top-s",e["down-s"]="down-s"}(n||(n={}));var T=function(){function T(e){_classCallCheck(this,T);this.dockManager=e,this.elementMainWheel=document.createElement("div"),this.elementSideWheel=document.createElement("div"),this.wheelItems={};for(var _e20 in n){this.wheelItems[_e20]=new _(this,_e20),"-s"===_e20.substr(-2,2)?this.elementSideWheel.appendChild(this.wheelItems[_e20].element):this.elementMainWheel.appendChild(this.wheelItems[_e20].element)}this.elementMainWheel.classList.add("dock-wheel-base"),this.elementSideWheel.classList.add("dock-wheel-base"),this.elementMainWheel.style.zIndex=String(9000001),this.elementSideWheel.style.zIndex=String(9e6),this.elementPanelPreview=document.createElement("div"),this.elementPanelPreview.classList.add("dock-wheel-panel-preview"),this.elementPanelPreview.style.zIndex=String(8999999),this.activeDialog=void 0,this._activeNode=void 0,this._visible=!1}_createClass(T,[{key:"activeNode",get:function get(){return this._activeNode},set:function set(e){var t=this._activeNode;this._activeNode=e,t!==this._activeNode&&this._visible&&this.showWheel()}},{key:"showWheel",value:function showWheel(){if(this._visible=!0,!this.activeNode)return a.removeNode(this.elementMainWheel),void a.removeNode(this.elementSideWheel);var e=this.activeNode.container.containerElement,t=e.clientWidth,i=e.clientHeight,s=Math.floor(t/2),o=Math.floor(i/2),l=e.getBoundingClientRect(),h=this.dockManager.element.getBoundingClientRect();this.elementMainWheel.style.left=l.left-h.left+s+"px",this.elementMainWheel.style.top=l.top-h.top+o+"px";var r=this.dockManager.element.clientWidth,d=this.dockManager.element.clientHeight;a.removeNode(this.elementMainWheel),a.removeNode(this.elementSideWheel),this.dockManager.element.appendChild(this.elementMainWheel),this.dockManager.element.appendChild(this.elementSideWheel),this._setWheelButtonPosition(n["left-s"],20,-d/2),this._setWheelButtonPosition(n["right-s"],r-40,-d/2),this._setWheelButtonPosition(n["top-s"],r/2,20-d),this._setWheelButtonPosition(n["down-s"],r/2,-20)}},{key:"_setWheelButtonPosition",value:function _setWheelButtonPosition(e,t,i){var n=this.wheelItems[e],s=n.element.clientWidth/2,o=n.element.clientHeight/2,l=Math.floor(t-s),a=Math.floor(i-o);n.element.style.marginLeft=l+"px",n.element.style.marginTop=a+"px"}},{key:"hideWheel",value:function hideWheel(){this._visible=!1,this.activeNode=void 0,a.removeNode(this.elementMainWheel),a.removeNode(this.elementSideWheel),a.removeNode(this.elementPanelPreview);for(var _e21 in this.wheelItems){this.wheelItems[_e21].active=!1}}},{key:"onMouseOver",value:function onMouseOver(e){if(!this.activeDialog)return;var t,i=this.dockManager.context.model.rootNode;e.id===n.top?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"vertical",!0):e.id===n.down?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"vertical",!1):e.id===n.left?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"horizontal",!0):e.id===n.right?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"horizontal",!1):e.id===n.fill?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"fill",!1):e.id===n["top-s"]?t=this.dockManager.layoutEngine.getDockBounds(i,this.activeDialog.panel,"vertical",!0):e.id===n["down-s"]?t=this.dockManager.layoutEngine.getDockBounds(i,this.activeDialog.panel,"vertical",!1):e.id===n["left-s"]?t=this.dockManager.layoutEngine.getDockBounds(i,this.activeDialog.panel,"horizontal",!0):e.id===n["right-s"]&&(t=this.dockManager.layoutEngine.getDockBounds(i,this.activeDialog.panel,"horizontal",!1)),t&&(this.dockManager.element.appendChild(this.elementPanelPreview),this.elementPanelPreview.style.left=Math.round(t.x)+"px",this.elementPanelPreview.style.top=Math.round(t.y)+"px",this.elementPanelPreview.style.width=Math.round(t.width)+"px",this.elementPanelPreview.style.height=Math.round(t.height)+"px")}},{key:"onMouseOut",value:function onMouseOut(){a.removeNode(this.elementPanelPreview)}},{key:"onDialogDropped",value:function onDialogDropped(e){var t=this._getActiveWheelItem();t&&this._handleDockRequest(t,e)}},{key:"_getActiveWheelItem",value:function _getActiveWheelItem(){for(var _e22 in this.wheelItems){var _t9=this.wheelItems[_e22];if(_t9.active)return _t9}}},{key:"_handleDockRequest",value:function _handleDockRequest(e,t){e.active=!1,e.element.classList.remove(e.hoverIconClass),this.activeNode&&(e.id===n.left?this.dockManager.dockDialogLeft(this.activeNode,t):e.id===n.right?this.dockManager.dockDialogRight(this.activeNode,t):e.id===n.top?this.dockManager.dockDialogUp(this.activeNode,t):e.id===n.down?this.dockManager.dockDialogDown(this.activeNode,t):e.id===n.fill?this.dockManager.dockDialogFill(this.activeNode,t):e.id===n["left-s"]?this.dockManager.dockDialogLeft(this.dockManager.context.model.rootNode,t):e.id===n["right-s"]?this.dockManager.dockDialogRight(this.dockManager.context.model.rootNode,t):e.id===n["top-s"]?this.dockManager.dockDialogUp(this.dockManager.context.model.rootNode,t):e.id===n["down-s"]&&this.dockManager.dockDialogDown(this.dockManager.context.model.rootNode,t))}}]);return T}();var P=_createClass(function P(){_classCallCheck(this,P);this.rootNode=this.documentManagerNode=void 0});var L=function(_E){_inherits(L,_E);var _super3=_createSuper(L);function L(e,t){var _this18;_classCallCheck(this,L);_this18=_super3.call(this,e,t),"panel"===_this18.container.containerType&&(_this18.panel=t,_this18.containerElement=_this18.panel.elementContentWrapper,a.removeNode(_this18.containerElement));return _this18}_createClass(L,[{key:"destroy",value:function destroy(){_get(_getPrototypeOf(L.prototype),"destroy",this).call(this),this.panel.elementContentHost.appendChild(this.containerElement)}}]);return L}(E);var B=function(_D){_inherits(B,_D);var _super4=_createSuper(B);function B(e){var _this19;_classCallCheck(this,B);_this19=_super4.call(this,e,i.TOP),_this19.minimumAllowedChildNodes=0,_this19.element.classList.add("document-manager"),_this19.tabHost.createTabPage=_this19._createDocumentTabPage,_this19.tabHost.displayCloseButton=!0;return _this19}_createClass(B,[{key:"_createDocumentTabPage",value:function _createDocumentTabPage(e,t){return new L(e,t)}},{key:"saveState",value:function saveState(e){_get(_getPrototypeOf(B.prototype),"saveState",this).call(this,e),e.documentManager=!0}},{key:"selectedTab",value:function selectedTab(){return this.tabHost.activeTab}}]);return B}(D);var z=_createClass(function z(e){_classCallCheck(this,z);this.dockManager=e,this.model=new P,this.documentManagerView=new B(this.dockManager)});var N=function(){function N(e){_classCallCheck(this,N);this.dockManager=e}_createClass(N,[{key:"deserialize",value:function deserialize(e){var t=JSON.parse(e),i=new P;return i.rootNode=this._buildGraph(t.graphInfo),i.dialogs=this._buildDialogs(t.dialogsInfo),i.documentManagerNode=this.documentManagerNode,i}},{key:"_buildGraph",value:function _buildGraph(e){var _this20=this;var t=e.children,i=[];t.forEach(function(e){var t=_this20._buildGraph(e);null!==t&&i.push(t)});var n=this._createContainer(e,i);if(null===n)return null;var s=new f(n);return n instanceof B&&(this.documentManagerNode=s),s.children=i,s.children.reverse().forEach(function(e){e.parent=s}),s.children.reverse(),s}},{key:"_createContainer",value:function _createContainer(e,t){var i,n=e.containerType,s=e.state,o=[];if(t.forEach(function(e){o.push(e.container)}),"panel"===n){if(i=d.loadFromState(s,this.dockManager),!i.prepareForDocking)return null;i.prepareForDocking(),a.removeNode(i.elementPanel)}else if("horizontal"===n)i=new y(this.dockManager,o);else if("vertical"===n)i=new C(this.dockManager,o);else{if("fill"!==n)throw new Error("Cannot create dock container of unknown type: "+n);i=s.documentManager?new B(this.dockManager):new D(this.dockManager)}return i.loadState(s),i}},{key:"_buildDialogs",value:function _buildDialogs(e){var _this21=this;var t=[];return e.forEach(function(e){var i,n=e.containerType,s=e.state;if("panel"===n&&(i=d.loadFromState(s,_this21.dockManager),i.prepareForDocking)){a.removeNode(i.elementPanel),i.isDialog=!0;var _n12=new p(i,_this21.dockManager);(e.position.x>document.body.clientWidth||e.position.y>document.body.clientHeight-70)&&(e.position.x=20,e.position.y=70),_n12.setPosition(e.position.x,e.position.y),_n12.isHidden=e.isHidden,_n12.isHidden&&_n12.hide(),t.push(_n12)}}),t}}]);return N}();var U=function(){function U(e,t){_classCallCheck(this,U);if(void 0===e)throw new Error("Invalid Dock Manager element provided");this._config=Object.assign(new g,t),this.element=e,this.context=this.dockWheel=this.layoutEngine=this.mouseMoveHandler=this.touchMoveHandler=void 0,this.layoutEventListeners=[],this.defaultDialogPosition=new l(0,0)}_createClass(U,[{key:"config",get:function get(){return this._config}},{key:"initialize",value:function initialize(){this.backgroundContext=this.element.children[0],this.context=new z(this);var e=new f(this.context.documentManagerView);this.context.model.rootNode=e,this.context.model.documentManagerNode=e,this.context.model.dialogs=[],this.setRootNode(this.context.model.rootNode),this.resize(this.element.clientWidth,this.element.clientHeight),this.dockWheel=new T(this),this.layoutEngine=new x(this),this._undockEnabled=!0,this.rebuildLayout(this.context.model.rootNode),this.zIndexCounter=1001,this.zIndexTabHost=1e3,this.zIndexTabHandle=100,this.zIndexDialogCounter=10001,null!=this.backgroundContext&&this.context.model.rootNode.container.tabHost.hostElement.insertBefore(this.backgroundContext,this.context.model.rootNode.container.tabHost.hostElement.firstChild),this.onKeyPressBound=this.onKeyPress.bind(this),this.element.addEventListener("keydown",this.onKeyPressBound)}},{key:"onKeyPress",value:function onKeyPress(e){if("Escape"==e.key&&this.activePanel&&!this.activePanel._hideCloseButton&&(this.activePanel.isDialog&&this._config.escClosesDialog||!this.activePanel.isDialog&&this._config.escClosesWindow)){var _e23=this.activePanel;this.activePanel=null,_e23.close()}}},{key:"checkXBounds",value:function checkXBounds(e,t,i,n,s){if(this._config.moveOnlyWithinDockConatiner)return this.checkXBoundsWithinDockContainer(e,t,i,n,s);var o=Math.floor(t.x-i.x),l=e.offsetLeft+e.offsetWidth+o<40,a=e.offsetLeft+o>window.innerWidth-40;if(l){i.x=t.x,o=0;var _n13=40-(e.offsetWidth+e.offsetLeft);_n13>0&&(o=_n13)}else if(a){i.x=t.x,o=0;var _n14=window.innerWidth-40-e.offsetLeft;_n14>0&&(o=_n14)}return o}},{key:"checkXBoundsWithinDockContainer",value:function checkXBoundsWithinDockContainer(e,t,i,n,s){var o=t.x-i.x,l=this.element.getBoundingClientRect(),a=e.getBoundingClientRect(),h=o<0&&a.left+o<l.left&&!s,r=o>0&&a.right+o>l.right&&!n;return h?(t.x-=o,o=l.left-a.left,t.x-=o):r&&(t.x-=o,o=l.right-a.right,t.x-=o),o}},{key:"checkYBounds",value:function checkYBounds(e,t,i,n,s){if(this._config.moveOnlyWithinDockConatiner)return this.checkYBoundsWithinDockContainer(e,t,i,n,s);var o=Math.floor(t.y-i.y),l=e.offsetTop+o<0,a=e.offsetTop+o>window.innerHeight-16;if(l)i.y=t.y,o=0;else if(a){i.y=t.y,o=0;var _n15=window.innerHeight-25-e.offsetTop;_n15>0&&(o=_n15)}return o}},{key:"checkYBoundsWithinDockContainer",value:function checkYBoundsWithinDockContainer(e,t,i,n,s){var o=t.y-i.y,l=this.element.getBoundingClientRect(),a=e.getBoundingClientRect(),h=o<0&&a.top+o<l.top&&!s,r=o>0&&a.bottom+o>l.bottom&&!n;return h?(t.y-=o,o=l.top-a.top,t.y-=o):r&&(t.y-=o,o=l.bottom-a.bottom,t.y-=o),o}},{key:"rebuildLayout",value:function rebuildLayout(e){var _this22=this;e.children.forEach(function(e){_this22.rebuildLayout(e)}),e.performLayout(!1)}},{key:"invalidate",value:function invalidate(){this.resize(this.element.clientWidth,this.element.clientHeight)}},{key:"resize",value:function resize(e,t){this.element.style.width=e+"px",this.element.style.height=t+"px",this.context.model.rootNode.container.resize(e,t);var i=0,n=0;var _iterator8=_createForOfIteratorHelper(this.context.model.dialogs),_step8;try{for(_iterator8.s();!(_step8=_iterator8.n()).done;){var _e24=_step8.value;(_e24.position.x>this.element.clientWidth||_e24.position.y>this.element.clientHeight)&&((i>this.element.clientWidth||n>this.element.clientHeight)&&(i=0,n=0),_e24.setPosition(100+i,100+n),i+=100,n+=100)}}catch(err){_iterator8.e(err)}finally{_iterator8.f()}}},{key:"setModel",value:function setModel(e){a.removeNode(this.context.documentManagerView.containerElement),this.context.model=e,this.setRootNode(e.rootNode),this.rebuildLayout(e.rootNode),this.loadResize(e.rootNode)}},{key:"loadResize",value:function loadResize(e){var _this23=this;e.children.reverse().forEach(function(t){_this23.loadResize(t),e.container.setActiveChild(t.container)}),e.children.reverse();var t=e.container;e.container.resize(t.state.width,t.state.height)}},{key:"setRootNode",value:function setRootNode(e){e.detachFromParent(),this.context.model.rootNode=e,this.element.appendChild(e.container.containerElement)}},{key:"_onDialogDragStarted",value:function _onDialogDragStarted(e,t){this.dockWheel.activeNode=this._findNodeOnPoint(t.clientX,t.clientY),this.dockWheel.activeDialog=e,null!=e.noDocking&&!0===e.noDocking||this.dockWheel.showWheel(),this.mouseMoveHandler&&(this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler),this.touchMoveHandler&&(this.touchMoveHandler.cancel(),delete this.touchMoveHandler),this.mouseMoveHandler=new h(window,"mousemove",this._onMouseMoved.bind(this)),this.touchMoveHandler=new h(window,"touchmove",this._onMouseMoved.bind(this))}},{key:"_onDialogDragEnded",value:function _onDialogDragEnded(e,t){this.mouseMoveHandler&&(this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler),this.touchMoveHandler&&(this.touchMoveHandler.cancel(),delete this.touchMoveHandler),this.dockWheel.onDialogDropped(e),this.dockWheel.hideWheel(),delete this.dockWheel.activeDialog,e.saveState(e.elementDialog.offsetLeft,e.elementDialog.offsetTop)}},{key:"_onMouseMoved",value:function _onMouseMoved(e){null!=e.changedTouches&&(e=e.changedTouches[0]),this.dockWheel.activeNode=this._findNodeOnPoint(e.clientX,e.clientY)}},{key:"_findNodeOnPoint",value:function _findNodeOnPoint(e,t){var i,n=[];for(n.push(this.context.model.rootNode);n.length>0;){var _s8=n.pop();a.isPointInsideNode(e,t,_s8)&&(i=_s8,[].push.apply(n,_s8.children))}return i}},{key:"dockDialogLeft",value:function dockDialogLeft(e,t){return this._requestDockDialog(e,t,this.layoutEngine.dockLeft.bind(this.layoutEngine))}},{key:"dockDialogRight",value:function dockDialogRight(e,t){return this._requestDockDialog(e,t,this.layoutEngine.dockRight.bind(this.layoutEngine))}},{key:"dockDialogUp",value:function dockDialogUp(e,t){return this._requestDockDialog(e,t,this.layoutEngine.dockUp.bind(this.layoutEngine))}},{key:"dockDialogDown",value:function dockDialogDown(e,t){return this._requestDockDialog(e,t,this.layoutEngine.dockDown.bind(this.layoutEngine))}},{key:"dockDialogFill",value:function dockDialogFill(e,t){return this._requestDockDialog(e,t,this.layoutEngine.dockFill.bind(this.layoutEngine))}},{key:"dockLeft",value:function dockLeft(e,t,i){return this._requestDockContainer(e,t,this.layoutEngine.dockLeft.bind(this.layoutEngine),!1,i)}},{key:"dockRight",value:function dockRight(e,t,i){return this._requestDockContainer(e,t,this.layoutEngine.dockRight.bind(this.layoutEngine),!0,i)}},{key:"dockUp",value:function dockUp(e,t,i){return this._requestDockContainer(e,t,this.layoutEngine.dockUp.bind(this.layoutEngine),!1,i)}},{key:"dockDown",value:function dockDown(e,t,i){return this._requestDockContainer(e,t,this.layoutEngine.dockDown.bind(this.layoutEngine),!0,i)}},{key:"dockFill",value:function dockFill(e,t){return this._requestDockContainer(e,t,this.layoutEngine.dockFill.bind(this.layoutEngine),!1)}},{key:"floatDialog",value:function floatDialog(e,t,i,n){var s;if(this.context.model.dialogs.forEach(function(n){e==n.panel&&(n.show(),n.setPosition(t,i),s=n)}),s)return s;try{var _t10=this._findNodeFromContainer(e);this.layoutEngine.undock(_t10)}catch(e){}var o=e;a.removeNode(o.elementPanel),o.isDialog=!0;var l=new p(o,this,n);return l.setPosition(t,i),l}},{key:"_requestDockDialog",value:function _requestDockDialog(e,t,i){var n=t.panel,s=new f(n);return n.prepareForDocking(),t.destroy(),i(e,s),s}},{key:"_checkShowBackgroundContext",value:function _checkShowBackgroundContext(){null!=this.backgroundContext&&(this.context.model.documentManagerNode.children.length>0?this.backgroundContext.style.display="none":this.backgroundContext.style.display="block")}},{key:"_requestDockContainer",value:function _requestDockContainer(e,t,i,n,s){var o=new f(t);if("panel"===t.containerType){var _e25=t;_e25.prepareForDocking(),a.removeNode(_e25.elementPanel)}var l,h=null;if(e.parent&&e.parent.container&&(l=e.parent.container,l.getRatios&&(h=l.getRatios())),i(e,o),s&&o.parent&&("vertical"===o.parent.container.containerType||"horizontal"===o.parent.container.containerType)){var _e26=o.parent.container;if(h&&l==_e26){if(n){for(var _e27=0;_e27<h.length;_e27++){h[_e27]=h[_e27]-h[_e27]*s}h.push(s)}else h[0]=h[0]-s,h.unshift(s);_e26.setRatios(h)}else _e26.setContainerRatio(t,s)}return this.rebuildLayout(this.context.model.rootNode),this.invalidate(),this._checkShowBackgroundContext(),o}},{key:"_requestTabReorder",value:function _requestTabReorder(e,t){var i=this._findNodeFromContainer(e);this.layoutEngine.reorderTabs(i,t.handle,t.state,t.index)}},{key:"requestUndockToDialog",value:function requestUndockToDialog(e,t,i){var n=this._findNodeFromContainer(e);this.layoutEngine.undock(n);var s=n.container;s.elementPanel.style.display="block";var o=new p(s,this,null);if(s.lastDialogSize&&o.resize(s.lastDialogSize.width,s.lastDialogSize.height),void 0!==t){var _e28=o.elementDialog.clientWidth;i.x>_e28&&(i.x=.75*_e28),o.setPosition(t.clientX-i.x,t.clientY-i.y),o.draggable.onMouseDown(t)}return o}},{key:"requestClose",value:function requestClose(e){var t=this._findNodeFromContainer(e);if(this.layoutEngine.close(t),this.activePanel==e&&(this.activePanel=null),this._activeDocument==e){var _e29=this._activeDocument;this._activeDocument=null,this.notifyOnActiveDocumentChange(null,_e29)}}},{key:"openInDialog",value:function openInDialog(e,t,i){var n=new p(e,this,null);if(void 0!==t){var _e30=n.elementDialog.clientWidth;i.x>_e30&&(i.x=.75*_e30),n.setPosition(t.clientX-i.x,t.clientY-i.y),n.draggable.onMouseDown(t)}return n}},{key:"requestUndock",value:function requestUndock(e){var t=this._findNodeFromContainer(e);this.layoutEngine.undock(t)}},{key:"requestRemove",value:function requestRemove(e){var t=this._findNodeFromContainer(e),i=t.parent;return t.detachFromParent(),i&&this.rebuildLayout(i),t}},{key:"getNodeByElementId",value:function getNodeByElementId(e){var t=[];for(t.push(this.context.model.rootNode);t.length>0;){var _i13=t.pop();if(_i13.container instanceof d&&_i13.container.elementContent.id===e)return _i13;[].push.apply(t,_i13.children)}return null}},{key:"_findNodeFromContainer",value:function _findNodeFromContainer(e){var t=[];for(t.push(this.context.model.rootNode);t.length>0;){var _i14=t.pop();if(_i14.container===e)return _i14;[].push.apply(t,_i14.children)}return null}},{key:"findNodeFromContainerElement",value:function findNodeFromContainerElement(e){var t=[];for(t.push(this.context.model.rootNode);t.length>0;){var _i15=t.pop();if(_i15.container.containerElement===e)return _i15;[].push.apply(t,_i15.children)}return null}},{key:"addLayoutListener",value:function addLayoutListener(e){this.layoutEventListeners.push(e)}},{key:"removeLayoutListener",value:function removeLayoutListener(e){this.layoutEventListeners.splice(this.layoutEventListeners.indexOf(e),1)}},{key:"suspendLayout",value:function suspendLayout(e){var _this24=this;this.layoutEventListeners.forEach(function(t){t.onSuspendLayout&&t.onSuspendLayout(_this24,e)})}},{key:"resumeLayout",value:function resumeLayout(e){var _this25=this;this.layoutEventListeners.forEach(function(t){t.onResumeLayout&&t.onResumeLayout(_this25,e)})}},{key:"notifyOnDock",value:function notifyOnDock(e){var _this26=this;this._checkShowBackgroundContext(),this.layoutEventListeners.forEach(function(t){t.onDock&&t.onDock(_this26,e)})}},{key:"notifyOnTabsReorder",value:function notifyOnTabsReorder(e){var _this27=this;this.layoutEventListeners.forEach(function(t){t.onTabsReorder&&t.onTabsReorder(_this27,e)})}},{key:"notifyOnUnDock",value:function notifyOnUnDock(e){var _this28=this;this._checkShowBackgroundContext(),this.layoutEventListeners.forEach(function(t){t.onUndock&&t.onUndock(_this28,e)})}},{key:"notifyOnClosePanel",value:function notifyOnClosePanel(e){var _this29=this;if(this._checkShowBackgroundContext(),this.activePanel==e&&(this.activePanel=null),this._activeDocument==e){var _e31=this._activeDocument;this._activeDocument=null,this.notifyOnActiveDocumentChange(null,_e31)}this.layoutEventListeners.forEach(function(t){t.onClosePanel&&t.onClosePanel(_this29,e)})}},{key:"notifyOnCreateDialog",value:function notifyOnCreateDialog(e){var _this30=this;this.layoutEventListeners.forEach(function(t){t.onCreateDialog&&t.onCreateDialog(_this30,e)})}},{key:"notifyOnHideDialog",value:function notifyOnHideDialog(e){var _this31=this;this.layoutEventListeners.forEach(function(t){t.onHideDialog&&t.onHideDialog(_this31,e)})}},{key:"notifyOnShowDialog",value:function notifyOnShowDialog(e){var _this32=this;this.layoutEventListeners.forEach(function(t){t.onShowDialog&&t.onShowDialog(_this32,e)})}},{key:"notifyOnChangeDialogPosition",value:function notifyOnChangeDialogPosition(e,t,i){var _this33=this;this.layoutEventListeners.forEach(function(n){n.onChangeDialogPosition&&n.onChangeDialogPosition(_this33,e,t,i)})}},{key:"notifyOnContainerResized",value:function notifyOnContainerResized(e){var _this34=this;this.layoutEventListeners.forEach(function(t){t.onContainerResized&&t.onContainerResized(_this34,e)})}},{key:"notifyOnTabChange",value:function notifyOnTabChange(e){var _this35=this;this.layoutEventListeners.forEach(function(t){t.onTabChanged&&t.onTabChanged(_this35,e)})}},{key:"notifyOnActivePanelChange",value:function notifyOnActivePanelChange(e,t){var _this36=this;this.layoutEventListeners.forEach(function(i){i.onActivePanelChange&&i.onActivePanelChange(_this36,e,t)})}},{key:"notifyOnActiveDocumentChange",value:function notifyOnActiveDocumentChange(e,t){var _this37=this;this.layoutEventListeners.forEach(function(i){i.onActiveDocumentChange&&i.onActiveDocumentChange(_this37,e,t)})}},{key:"saveState",value:function saveState(){return(new v).serialize(this.context.model)}},{key:"loadState",value:function loadState(e){var t=new N(this);this.context.model=t.deserialize(e),this.setModel(this.context.model)}},{key:"getPanels",value:function getPanels(){var e=[];return this._allPanels(this.context.model.rootNode,e),this.context.model.dialogs.forEach(function(t){e.push(t.panel)}),e}},{key:"undockEnabled",value:function undockEnabled(e){this._undockEnabled=e,this.getPanels().forEach(function(t){t.canUndock(e)})}},{key:"lockDockState",value:function lockDockState(e){this.undockEnabled(!e),this.hideCloseButton(e)}},{key:"hideCloseButton",value:function hideCloseButton(e){this.getPanels().forEach(function(t){t.hideCloseButton(e)})}},{key:"updatePanels",value:function updatePanels(e){var t=[];return this._allPanels(this.context.model.rootNode,t),t.forEach(function(t){a.arrayContains(e,t.elementContent.id)||t.close()}),this.context.model.dialogs.forEach(function(t){a.arrayContains(e,t.panel.elementContent.id)?t.show():t.hide()}),t}},{key:"getVisiblePanels",value:function getVisiblePanels(){var e=[];return this._allPanels(this.context.model.rootNode,e),this.context.model.dialogs.forEach(function(t){t.isHidden||e.push(t.panel)}),e}},{key:"_allPanels",value:function _allPanels(e,t){var _this38=this;e.children.forEach(function(e){_this38._allPanels(e,t)}),"panel"===e.container.containerType&&t.push(e.container)}},{key:"activeDocument",get:function get(){return this._activeDocument}},{key:"activePanel",get:function get(){return this._activePanel},set:function set(e){if(e!==this._activePanel){e&&!e.isDialog&&(this._lastPanelNotADialog=e),this._lastPanelNotADialog&&this.getPanels().indexOf(this._lastPanelNotADialog)<0&&(this._lastPanelNotADialog=null);var _i16=this.activePanel;this.activePanel&&(this.activePanel.elementTitle.classList.remove("dockspan-panel-active"),this.activePanel.elementTitleText.classList.remove("dockspan-panel-titlebar-text-active"),this.activePanel.tabPage&&this.activePanel.tabPage.host.setActive(!1)),this._activePanel=e;var _n16=this._activeDocument;e&&e.panelType==t.document&&(this._activeDocument=e),!e&&_i16&&_i16.isDialog&&null==e&&this._lastPanelNotADialog&&this.activePanel!=this._lastPanelNotADialog&&(e=this._lastPanelNotADialog,this._lastPanelNotADialog=void 0),this.notifyOnActivePanelChange(e,_i16),_n16!=this._activeDocument&&this.notifyOnActiveDocumentChange(this._activeDocument,_n16),e&&(e.elementTitle.classList.add("dockspan-panel-active"),e.elementTitleText.classList.add("dockspan-panel-titlebar-text-active"),e.tabPage&&e.tabPage.host.setActive(!0))}else e&&e.tabPage&&e.tabPage.host.setActive(!0)}}]);return U}();DockSpawnTS=o})();
|
package/lib/js/DockManager.js
CHANGED
|
@@ -153,6 +153,16 @@ export class DockManager {
|
|
|
153
153
|
this.element.style.width = width + 'px';
|
|
154
154
|
this.element.style.height = height + 'px';
|
|
155
155
|
this.context.model.rootNode.container.resize(width, height);
|
|
156
|
+
let offsetX = 0, offsetY = 0;
|
|
157
|
+
for (let dialog of this.context.model.dialogs) {
|
|
158
|
+
if (dialog.position.x > this.element.clientWidth || dialog.position.y > this.element.clientHeight) {
|
|
159
|
+
if (offsetX > this.element.clientWidth || offsetY > this.element.clientHeight)
|
|
160
|
+
offsetX = 0, offsetY = 0;
|
|
161
|
+
dialog.setPosition(100 + offsetX, 100 + offsetY);
|
|
162
|
+
offsetX += 100;
|
|
163
|
+
offsetY += 100;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
156
166
|
}
|
|
157
167
|
/**
|
|
158
168
|
* Reset the dock model . This happens when the state is loaded from json
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DockManager.js","sourceRoot":"","sources":["../../src/DockManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAInE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKrD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,OAAO,WAAW;IA0BpB,YAAY,OAAoB,EAAE,MAAmB;QACjD,IAAI,OAAO,KAAK,SAAS;YACrB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAE7D,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,UAAU,EAAE,EAAE,MAAM,CAAC,CAAC;QAEvD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,GAAG,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CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;gBAC5E,IAAI,KAAK,CAAC,OAAO,EAAE;oBACf,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;iBACtC;aACJ;SACJ;aACI;YACD,IAAI,KAAK,IAAI,KAAK,CAAC,OAAO,EAAE;gBACxB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;aACtC;SACJ;IACL,CAAC;CACJ"}
|
|
@@ -11,8 +11,8 @@ export class DraggableContainer {
|
|
|
11
11
|
this.containerType = delegate.containerType;
|
|
12
12
|
this.mouseDownHandler = new EventHandler(dragHandle, 'mousedown', this.onMouseDown.bind(this));
|
|
13
13
|
this.touchDownHandler = new EventHandler(dragHandle, 'touchstart', this.onMouseDown.bind(this));
|
|
14
|
-
this.topLevelElement.style.
|
|
15
|
-
this.topLevelElement.style.
|
|
14
|
+
this.topLevelElement.style.left = topLevelElement.offsetLeft + 'px';
|
|
15
|
+
this.topLevelElement.style.top = topLevelElement.offsetTop + 'px';
|
|
16
16
|
this.minimumAllowedChildNodes = delegate.minimumAllowedChildNodes;
|
|
17
17
|
this.iframeEventHandlers = [];
|
|
18
18
|
}
|
|
@@ -172,10 +172,10 @@ export class DraggableContainer {
|
|
|
172
172
|
this.previousMousePosition = currentMousePosition;
|
|
173
173
|
}
|
|
174
174
|
_performDrag(dx, dy) {
|
|
175
|
-
let left = dx + Utils.getPixels(this.topLevelElement.style.
|
|
176
|
-
let top = dy + Utils.getPixels(this.topLevelElement.style.
|
|
177
|
-
this.topLevelElement.style.
|
|
178
|
-
this.topLevelElement.style.
|
|
175
|
+
let left = dx + Utils.getPixels(this.topLevelElement.style.left);
|
|
176
|
+
let top = dy + Utils.getPixels(this.topLevelElement.style.top);
|
|
177
|
+
this.topLevelElement.style.left = left + 'px';
|
|
178
|
+
this.topLevelElement.style.top = top + 'px';
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
//# sourceMappingURL=DraggableContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DraggableContainer.js","sourceRoot":"","sources":["../../src/DraggableContainer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAMnC,MAAM,OAAO,kBAAkB;IAkB3B,YAAY,MAAc,EAAE,QAAwB,EAAE,eAA4B,EAAE,UAAuB;QACvG,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC,gBAAgB,CAAC;QAClD,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC;QACxC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC;QAC5C,IAAI,CAAC,gBAAgB,GAAG,IAAI,YAAY,CAAC,UAAU,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/F,IAAI,CAAC,gBAAgB,GAAG,IAAI,YAAY,CAAC,UAAU,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAChG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"DraggableContainer.js","sourceRoot":"","sources":["../../src/DraggableContainer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAMnC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eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC/D,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;QAC9C,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;IAChD,CAAC;CACJ"}
|
|
@@ -14,8 +14,8 @@ export class ResizableContainer {
|
|
|
14
14
|
this.dockManager = delegate.dockManager;
|
|
15
15
|
this.topLevelElement = topLevelElement;
|
|
16
16
|
this.containerType = delegate.containerType;
|
|
17
|
-
this.topLevelElement.style.
|
|
18
|
-
this.topLevelElement.style.
|
|
17
|
+
this.topLevelElement.style.left = this.topLevelElement.offsetLeft + 'px';
|
|
18
|
+
this.topLevelElement.style.top = this.topLevelElement.offsetTop + 'px';
|
|
19
19
|
this.minimumAllowedChildNodes = delegate.minimumAllowedChildNodes;
|
|
20
20
|
this._buildResizeHandles();
|
|
21
21
|
this.readyToProcessNextResize = true;
|
|
@@ -197,8 +197,8 @@ export class ResizableContainer {
|
|
|
197
197
|
}
|
|
198
198
|
_performDrag(handle, dx, dy) {
|
|
199
199
|
let bounds = {};
|
|
200
|
-
bounds.left = Utils.getPixels(this.topLevelElement.style.
|
|
201
|
-
bounds.top = Utils.getPixels(this.topLevelElement.style.
|
|
200
|
+
bounds.left = Utils.getPixels(this.topLevelElement.style.left);
|
|
201
|
+
bounds.top = Utils.getPixels(this.topLevelElement.style.top);
|
|
202
202
|
bounds.width = this.topLevelElement.clientWidth;
|
|
203
203
|
bounds.height = this.topLevelElement.clientHeight;
|
|
204
204
|
if (handle.east)
|
|
@@ -231,8 +231,8 @@ export class ResizableContainer {
|
|
|
231
231
|
let minHeight = 50; // TODO: Move to external configuration
|
|
232
232
|
bounds.width = Math.max(bounds.width, minWidth);
|
|
233
233
|
bounds.height = Math.max(bounds.height, minHeight);
|
|
234
|
-
this.topLevelElement.style.
|
|
235
|
-
this.topLevelElement.style.
|
|
234
|
+
this.topLevelElement.style.left = bounds.left + 'px';
|
|
235
|
+
this.topLevelElement.style.top = bounds.top + 'px';
|
|
236
236
|
this.resize(bounds.width, bounds.height);
|
|
237
237
|
}
|
|
238
238
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResizableContainer.js","sourceRoot":"","sources":["../../src/ResizableContainer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAIjD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAInC;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IAe3B,YAAY,MAAc,EAAE,QAAwB,EAAE,eAA4B;QAC9E,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC,gBAAgB,CAAC;QAClD,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC;QACxC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC;QAC5C,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,UAAU,GAAG,IAAI,CAAC;QAC/E,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,SAAS,GAAG,IAAI,CAAC;QAC7E,IAAI,CAAC,wBAAwB,GAAG,QAAQ,CAAC,wBAAwB,CAAC;QAClE,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC3B,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC;QACrC,IAAI,CAAC,qBAAqB,GAAG,IAAI,WAAW,CAAC,uBA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CAAC,CAAC;IAC7C,CAAC;CACJ"}
|
package/package.json
CHANGED
package/src/DockManager.ts
CHANGED
|
@@ -201,6 +201,17 @@ export class DockManager {
|
|
|
201
201
|
this.element.style.width = width + 'px';
|
|
202
202
|
this.element.style.height = height + 'px';
|
|
203
203
|
this.context.model.rootNode.container.resize(width, height);
|
|
204
|
+
|
|
205
|
+
let offsetX = 0, offsetY = 0;
|
|
206
|
+
for (let dialog of this.context.model.dialogs){
|
|
207
|
+
if(dialog.position.x > this.element.clientWidth || dialog.position.y > this.element.clientHeight){
|
|
208
|
+
if(offsetX > this.element.clientWidth || offsetY > this.element.clientHeight)
|
|
209
|
+
offsetX = 0, offsetY = 0;
|
|
210
|
+
dialog.setPosition(100 + offsetX, 100 + offsetY);
|
|
211
|
+
offsetX += 100;
|
|
212
|
+
offsetY += 100;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
204
215
|
}
|
|
205
216
|
|
|
206
217
|
/**
|
|
@@ -35,8 +35,8 @@ export class DraggableContainer implements IDockContainer {
|
|
|
35
35
|
this.containerType = delegate.containerType;
|
|
36
36
|
this.mouseDownHandler = new EventHandler(dragHandle, 'mousedown', this.onMouseDown.bind(this));
|
|
37
37
|
this.touchDownHandler = new EventHandler(dragHandle, 'touchstart', this.onMouseDown.bind(this));
|
|
38
|
-
this.topLevelElement.style.
|
|
39
|
-
this.topLevelElement.style.
|
|
38
|
+
this.topLevelElement.style.left = topLevelElement.offsetLeft + 'px';
|
|
39
|
+
this.topLevelElement.style.top = topLevelElement.offsetTop + 'px';
|
|
40
40
|
this.minimumAllowedChildNodes = delegate.minimumAllowedChildNodes;
|
|
41
41
|
this.iframeEventHandlers = [];
|
|
42
42
|
}
|
|
@@ -219,9 +219,9 @@ export class DraggableContainer implements IDockContainer {
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
_performDrag(dx: number, dy: number) {
|
|
222
|
-
let left = dx + Utils.getPixels(this.topLevelElement.style.
|
|
223
|
-
let top = dy + Utils.getPixels(this.topLevelElement.style.
|
|
224
|
-
this.topLevelElement.style.
|
|
225
|
-
this.topLevelElement.style.
|
|
222
|
+
let left = dx + Utils.getPixels(this.topLevelElement.style.left);
|
|
223
|
+
let top = dy + Utils.getPixels(this.topLevelElement.style.top);
|
|
224
|
+
this.topLevelElement.style.left = left + 'px';
|
|
225
|
+
this.topLevelElement.style.top = top + 'px';
|
|
226
226
|
}
|
|
227
227
|
}
|
|
@@ -35,8 +35,8 @@ export class ResizableContainer implements IDockContainer {
|
|
|
35
35
|
this.dockManager = delegate.dockManager;
|
|
36
36
|
this.topLevelElement = topLevelElement;
|
|
37
37
|
this.containerType = delegate.containerType;
|
|
38
|
-
this.topLevelElement.style.
|
|
39
|
-
this.topLevelElement.style.
|
|
38
|
+
this.topLevelElement.style.left = this.topLevelElement.offsetLeft + 'px';
|
|
39
|
+
this.topLevelElement.style.top = this.topLevelElement.offsetTop + 'px';
|
|
40
40
|
this.minimumAllowedChildNodes = delegate.minimumAllowedChildNodes;
|
|
41
41
|
this._buildResizeHandles();
|
|
42
42
|
this.readyToProcessNextResize = true;
|
|
@@ -243,8 +243,8 @@ export class ResizableContainer implements IDockContainer {
|
|
|
243
243
|
|
|
244
244
|
_performDrag(handle, dx: number, dy: number) {
|
|
245
245
|
let bounds: IThickness = {};
|
|
246
|
-
bounds.left = Utils.getPixels(this.topLevelElement.style.
|
|
247
|
-
bounds.top = Utils.getPixels(this.topLevelElement.style.
|
|
246
|
+
bounds.left = Utils.getPixels(this.topLevelElement.style.left);
|
|
247
|
+
bounds.top = Utils.getPixels(this.topLevelElement.style.top);
|
|
248
248
|
bounds.width = this.topLevelElement.clientWidth;
|
|
249
249
|
bounds.height = this.topLevelElement.clientHeight;
|
|
250
250
|
|
|
@@ -281,8 +281,8 @@ export class ResizableContainer implements IDockContainer {
|
|
|
281
281
|
bounds.width = Math.max(bounds.width, minWidth);
|
|
282
282
|
bounds.height = Math.max(bounds.height, minHeight);
|
|
283
283
|
|
|
284
|
-
this.topLevelElement.style.
|
|
285
|
-
this.topLevelElement.style.
|
|
284
|
+
this.topLevelElement.style.left = bounds.left + 'px';
|
|
285
|
+
this.topLevelElement.style.top = bounds.top + 'px';
|
|
286
286
|
|
|
287
287
|
this.resize(bounds.width, bounds.height);
|
|
288
288
|
}
|