dock-spawn-ts 3.4.0 → 3.6.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.
@@ -1 +1 @@
1
- "use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t)}:p}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},_get.apply(null,arguments)}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t)})})}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a)},function(t){invoke("throw",t,i,a)}):e.resolve(h).then(function(t){u.value=t,i(u)},function(t){return invoke("throw",t,i,a)})}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r)})}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next};return i.next=i}}throw new TypeError(_typeof(e)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this}),define(g,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next}return next.done=!0,next}},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)})}}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n9=0,F=function F(){};return{s:F,n:function n(){return _n9>=r.length?{done:!0}:{done:!1,value:r[_n9++]}},e:function e(r){throw r},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 o,a=!0,u=!1;return{s:function s(){t=t.call(r)},n:function n(){var r=t.next();return a=r.done,r},e:function e(r){u=!0,o=r},f:function f(){try{a||null==t["return"]||t["return"]()}finally{if(u)throw o}}}}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r)}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var DockSpawnTS;(function(){"use strict";var e,t,n={d:function d(e,t){for(var i in t)n.o(t,i)&&!n.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})}},i={};n.r(i),n.d(i,{ContainerType:function ContainerType(){return e},Dialog:function Dialog(){return p},DockConfig:function DockConfig(){return g},DockGraphSerializer:function DockGraphSerializer(){return v},DockLayoutEngine:function DockLayoutEngine(){return T},DockManager:function DockManager(){return R},DockManagerContext:function DockManagerContext(){return S},DockModel:function DockModel(){return B},DockNode:function DockNode(){return C},DockWheel:function DockWheel(){return L},DockWheelItem:function DockWheelItem(){return P},DocumentManagerContainer:function DocumentManagerContainer(){return N},DocumentTabPage:function DocumentTabPage(){return z},DraggableContainer:function DraggableContainer(){return c},EventHandler:function EventHandler(){return l},FillDockContainer:function FillDockContainer(){return _},HorizontalDockContainer:function HorizontalDockContainer(){return M},Localizer:function Localizer(){return r},PanelContainer:function PanelContainer(){return d},Point:function Point(){return o},ResizableContainer:function ResizableContainer(){return m},ResizeHandle:function ResizeHandle(){return u},SplitterBar:function SplitterBar(){return f},SplitterDockContainer:function SplitterDockContainer(){return k},SplitterPanel:function SplitterPanel(){return w},TabHandle:function TabHandle(){return b},TabHost:function TabHost(){return x},TabPage:function TabPage(){return E},UndockInitiator:function UndockInitiator(){return a},Utils:function Utils(){return s},VerticalDockContainer:function VerticalDockContainer(){return y}}),function(e){e.horizontal="horizontal",e.vertical="vertical",e.fill="fill",e.panel="panel"}(e||(e={}));var o=_createClass(function o(e,t){_classCallCheck(this,o);_defineProperty(this,"x",void 0);_defineProperty(this,"y",void 0);this.x=e,this.y=t});var s=function(){function s(){_classCallCheck(this,s)}return _createClass(s,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,n){var i=n.container.containerElement.getBoundingClientRect();return e>=i.left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height}},{key:"getNextId",value:function getNextId(e){return e+s._counter++}},{key:"removeNode",value:function removeNode(e){return null!==e.parentNode&&(e.parentNode.removeChild(e),!0)}},{key:"orderByIndexes",value:function orderByIndexes(e,t){var n=[];for(var _i=0;_i<t.length;_i++)n.push(e[t[_i]]);return n}},{key:"arrayRemove",value:function arrayRemove(e,t){var n=e.indexOf(t);return-1!==n&&e.splice(n,1)}},{key:"arrayContains",value:function arrayContains(e,t){var n=e.length;for(;n--;)if(e[n]===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 _n=0;_n<e.length;++_n)if(e[_n]!==t[_n])return!1;return!0}}])}();_defineProperty(s,"_counter",0);var l=function(){function l(e,t,n,i){_classCallCheck(this,l);_defineProperty(this,"target",void 0);_defineProperty(this,"eventName",void 0);_defineProperty(this,"source",void 0);this.target=n,this.eventName=t,this.source=e,this.source.addEventListener(t,this.target,i)}return _createClass(l,[{key:"cancel",value:function cancel(){this.source.removeEventListener(this.eventName,this.target)}}])}();var a=function(){function a(e,t,n){_classCallCheck(this,a);_defineProperty(this,"mouseUpHandler",void 0);_defineProperty(this,"touchUpHandler",void 0);_defineProperty(this,"mouseMoveHandler",void 0);_defineProperty(this,"touchMoveHandler",void 0);_defineProperty(this,"dragStartPosition",void 0);_defineProperty(this,"thresholdPixels",void 0);_defineProperty(this,"_enabled",void 0);_defineProperty(this,"mouseDownHandler",void 0);_defineProperty(this,"touchDownHandler",void 0);_defineProperty(this,"element",void 0);_defineProperty(this,"_undockededCallback",void 0);_defineProperty(this,"touchDownUndockedHandler",void 0);n||(n=7),this.element=e,this._undockededCallback=t,this.thresholdPixels=n,this._enabled=!1}return _createClass(a,[{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 l(this.element,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new l(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 l(window,"mouseup",this.onMouseUp.bind(this)),this.touchUpHandler=new l(window,"touchend",this.onMouseUp.bind(this)),this.mouseMoveHandler=new l(window,"mousemove",this.onMouseMove.bind(this)),this.touchMoveHandler=new l(window,"touchmove",this.onMouseMove.bind(this)),this.dragStartPosition=new o(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 o(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,n=0,i=this.element;do{t+=i.offsetTop||0,n+=i.offsetLeft||0,i=i.offsetParent}while(i);var s=this.dragStartPosition.x-n,l=this.dragStartPosition.y-t,_a2=new o(s,l);this._undockededCallback(e,_a2)}}])}();!function(e){e.document="document",e.panel="panel"}(t||(t={}));var h={CloseDialog:"Close dialog",CloseAll:"Close all documents",CloseAllButThis:"Close all documents but this",DefaultPanelName:"Panel",NewBrowserWindow:"Open in new window"};var r=function(){function r(){_classCallCheck(this,r)}return _createClass(r,null,[{key:"configure",value:function configure(e){r._getTemplateString=e}},{key:"getString",value:function getString(e){var _r$_getTemplateString,_r$_getTemplateString2;for(var _len=arguments.length,t=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){t[_key-1]=arguments[_key]}return function(e){for(var _len2=arguments.length,t=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){t[_key2-1]=arguments[_key2]}return e.replace(/{(\d+)}/g,function(e,n){var i=Number.parseInt(n);return t[i].toString()})}.apply(void 0,[(_r$_getTemplateString=(_r$_getTemplateString2=r._getTemplateString)===null||_r$_getTemplateString2===void 0?void 0:_r$_getTemplateString2.call(r,e))!==null&&_r$_getTemplateString!==void 0?_r$_getTemplateString:h[e]].concat(t))}}])}();_defineProperty(r,"_getTemplateString",void 0);var d=function(){function d(n,i,o,s,l){var _this=this;_classCallCheck(this,d);_defineProperty(this,"closePanelContainerCallback",void 0);_defineProperty(this,"onTitleChanged",void 0);_defineProperty(this,"elementPanel",void 0);_defineProperty(this,"elementTitle",void 0);_defineProperty(this,"elementTitleText",void 0);_defineProperty(this,"elementContentHost",void 0);_defineProperty(this,"name",void 0);_defineProperty(this,"state",void 0);_defineProperty(this,"elementContent",void 0);_defineProperty(this,"_resolvedElementContent",void 0);_defineProperty(this,"elementContentContainer",void 0);_defineProperty(this,"elementContentWrapper",void 0);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"title",void 0);_defineProperty(this,"containerType",void 0);_defineProperty(this,"icon",void 0);_defineProperty(this,"hasChanges",void 0);_defineProperty(this,"minimumAllowedChildNodes",void 0);_defineProperty(this,"isDialog",void 0);_defineProperty(this,"eventListeners",void 0);_defineProperty(this,"undockInitiator",void 0);_defineProperty(this,"elementButtonClose",void 0);_defineProperty(this,"closeButtonClickedHandler",void 0);_defineProperty(this,"closeButtonTouchedHandler",void 0);_defineProperty(this,"mouseDownHandler",void 0);_defineProperty(this,"touchDownHandler",void 0);_defineProperty(this,"panelType",void 0);_defineProperty(this,"tabPage",void 0);_defineProperty(this,"undockedToNewBrowserWindow",!1);_defineProperty(this,"contextMenuHandler",void 0);_defineProperty(this,"lastDialogSize",void 0);_defineProperty(this,"_floatingDialog",void 0);_defineProperty(this,"_canUndock",void 0);_defineProperty(this,"_cachedWidth",void 0);_defineProperty(this,"_cachedHeight",void 0);_defineProperty(this,"_hideCloseButton",void 0);_defineProperty(this,"_grayOut",void 0);_defineProperty(this,"_ctxMenu",void 0);o||(o=r.getString("DefaultPanelName")),s||(s=t.panel),this.panelType=s,n._dockSpawnPanelContainer=this,this.elementContent=n,n.style.position="absolute",n.style.width="100%",n.style.height="100%",n.style.top="0",n.style.bottom="0",this.elementContentContainer=document.createElement("div"),this.elementContentContainer.className="panel-element-content-container",this.elementContentContainer.style.position="absolute",this.elementContentContainer._panel=this,this.elementContentContainer.addEventListener("pointerdown",function(e){try{_this.isDialog?_this._floatingDialog.bringToFront():_this.tabPage&&_this.tabPage.setSelected(!0,!0),_this.dockManager.activePanel=_this}catch(_unused){}},{passive:!0}),this.elementContentContainer.appendChild(n),i.config.dialogRootElement.appendChild(this.elementContentContainer),this.dockManager=i,this.title=o,this.containerType=e.panel,this.icon=null,this.minimumAllowedChildNodes=0,this._floatingDialog=void 0,this.isDialog=!1,this._canUndock=i._undockEnabled,this.eventListeners=[],this._hideCloseButton=l,this.windowsContextMenuClose=this.windowsContextMenuClose.bind(this),this._initialize()}return _createClass(d,[{key:"_initialize",value:function _initialize(){var _this$elementContent$;this.name=s.getNextId("panel_"),this.elementPanel=document.createElement("div"),this.elementPanel.tabIndex=0,this.elementTitle=document.createElement("div"),this.contextMenuHandler=new l(this.elementTitle,"contextmenu",this.oncontextMenuClicked.bind(this)),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.elementContentContainer.clientWidth,t=this.elementContentContainer.clientHeight,n=this.elementTitle.clientHeight;this.elementContentWrapper=document.createElement("div"),this.elementContentWrapper.classList.add("panel-content-wrapper"),this._setPanelDimensions(e,t+n),this._hideCloseButton||(this.closeButtonClickedHandler=new l(this.elementButtonClose,"mousedown",this.onCloseButtonClicked.bind(this)),this.closeButtonTouchedHandler=new l(this.elementButtonClose,"touchstart",this.onCloseButtonClicked.bind(this))),s.removeNode(this.elementContentWrapper),this.elementContentHost.appendChild(this.elementContentWrapper);var i=this.elementContent.dataset.panelCaption,o=this.elementContent.dataset.panelIcon;i&&(this.title=i),o&&(this.icon=o),this._updateTitle(),this.undockInitiator=new a(this.elementTitle,this.performUndockToDialog.bind(this)),delete this.floatingDialog,this.mouseDownHandler=new l(this.elementPanel,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new l(this.elementPanel,"touchstart",this.onMouseDown.bind(this),{passive:!0}),this._resolvedElementContent=this.elementContent,this.elementContent instanceof HTMLSlotElement&&(this._resolvedElementContent=(_this$elementContent$=this.elementContent.assignedElements())===null||_this$elementContent$===void 0?void 0:_this$elementContent$[0])}},{key:"oncontextMenuClicked",value:function oncontextMenuClicked(e){if(e.preventDefault(),!this._ctxMenu&&d.createContextMenuContentCallback){var _this$_ctxMenu;var _t=d.createContextMenuContentCallback(this);if(0==_t.length)return;this._ctxMenu=document.createElement("div"),this._ctxMenu.className="dockspab-tab-handle-context-menu",(_this$_ctxMenu=this._ctxMenu).append.apply(_this$_ctxMenu,_toConsumableArray(_t)),this._ctxMenu.style.left=e.pageX+"px",this._ctxMenu.style.top=e.pageY+"px",document.body.appendChild(this._ctxMenu),window.addEventListener("mouseup",this.windowsContextMenuClose)}else this.closeContextMenu()}},{key:"closeContextMenu",value:function closeContextMenu(){this._ctxMenu&&(document.body.removeChild(this._ctxMenu),delete this._ctxMenu,window.removeEventListener("mouseup",this.windowsContextMenuClose))}},{key:"windowsContextMenuClose",value:function windowsContextMenuClose(e){var t=e.composedPath();for(var _e in t)if(t[_e]==this._ctxMenu)return;this.closeContextMenu()}},{key:"canUndock",value:function canUndock(e){var _this2=this;this._canUndock=e,this.undockInitiator.enabled=e,this.eventListeners.forEach(function(t){t.onDockEnabled&&t.onDockEnabled({self:_this2,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 _this3=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:_this3,state:_this3._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:_this3,state:!0})}))}},{key:"onMouseDown",value:function onMouseDown(){this.dockManager.activePanel=this}},{key:"hideCloseButton",value:function hideCloseButton(e){var _this4=this;this._hideCloseButton=e,this.elementButtonClose.style.display=e?"none":"block",this.eventListeners.forEach(function(t){t.onHideCloseButton&&t.onHideCloseButton({self:_this4,state:e})})}},{key:"destroy",value:function destroy(){this.mouseDownHandler&&(this.mouseDownHandler.cancel(),delete this.mouseDownHandler),this.touchDownHandler&&(this.touchDownHandler.cancel(),delete this.touchDownHandler),this.contextMenuHandler&&this.contextMenuHandler.cancel(),s.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.elementContentContainer.style.display="none",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,this.elementContentContainer.parentElement!=this.dockManager.config.dialogRootElement&&this.dockManager.config.dialogRootElement.appendChild(this.elementContentContainer)}},{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:"resolvedElementContent",get:function get(){var _this$elementContent$2;return this._resolvedElementContent||(this._resolvedElementContent=this.elementContent,this.elementContent instanceof HTMLSlotElement&&(this._resolvedElementContent=(_this$elementContent$2=this.elementContent.assignedElements())===null||_this$elementContent$2===void 0?void 0:_this$elementContent$2[0])),this._resolvedElementContent}},{key:"panelDocked",value:function panelDocked(){this.elementContent.hidden&&(this.elementContent.hidden=!1),this.elementContentContainer.parentElement!==this.dockManager.config.dialogRootElement&&this.dockManager.config.dialogRootElement.appendChild(this.elementContentContainer)}},{key:"resize",value:function resize(e,t){this.panelDocked(),this.setVisible(!0),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.elementContentContainer.style.width=e+"px",this.elementPanel.style.width=e+"px";var n=t-this.elementTitle.clientHeight;this.elementContentHost.style.height=n+"px",this.elementContentContainer.style.height=n+"px",this.elementPanel.style.height=t+"px";var i=this.elementContentWrapper.getBoundingClientRect(),o=this.dockManager.config.dialogRootElement.getBoundingClientRect();this.elementContentContainer.style.left=i.x-o.x+"px",this.elementContentContainer.style.top=i.y-o.y+"px",this.elementContentContainer.style.width=i.width+"px",this.elementContentContainer.style.height=i.height+"px"}},{key:"setDialogPosition",value:function setDialogPosition(e,t){this.elementContentContainer.style.left=e+"px",this.elementContentContainer.style.top=t+this.elementTitle.clientHeight+"px"}},{key:"setVisible",value:function setVisible(e){this.elementContentContainer.style.display=e?"block":"none"}},{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:"undockToBrowserDialog",value:function undockToBrowserDialog(){var _this5=this;!function(e,t){var n=e.getBoundingClientRect(),i=n.x+24,o=n.y+60,s=n.width,l=n.height,a=window.open("about:blank",void 0,"popup=yes,left=".concat(i,",top=").concat(o,",width=").concat(s,",height=").concat(l));a.onfocus=function(e){return t.focused(e)},a.onblur=function(e){return t.blured(e)};var h=_toConsumableArray(document.head.querySelectorAll("link")).map(function(e){return e.cloneNode()});var _iterator=_createForOfIteratorHelper(h),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _e2=_step.value;a.document.head.appendChild(a.document.adoptNode(_e2))}}catch(err){_iterator.e(err)}finally{_iterator.f()}var r=a.document.createElement("style");r.innerText="\n html {\n overflow: hidden;\n position: fixed;\n width: 100%;\n height: 100%;\n }\n body {\n height: 100%;\n width: 100%;\n margin: 0;\n }\n ",a.document.head.appendChild(r);var d=a.document.createElement("title");d.innerText=t.title,a.document.head.appendChild(d),a.onunload=function(){return t.newWindowClosedCallback()};var c=new Map,u=new Map;function m(e){if(e.shadowRoot){e.shadowRoot.adoptedStyleSheets.length>0&&u.set(e,_toConsumableArray(e.shadowRoot.adoptedStyleSheets.map(function(e){return function(e,t,n){var i=n.get(t);if(i)return i;var o="";var s=t.cssRules;for(var l=0;l<s.length;l++)o+=s[l].cssText+"\n";var a=new e.CSSStyleSheet;return n.set(t,a),a.replaceSync(o),a}(a,e,c)})));var _iterator2=_createForOfIteratorHelper(e.shadowRoot.querySelectorAll("*")),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var _t2=_step2.value;m(_t2)}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}}}m(e);var _iterator3=_createForOfIteratorHelper(e.querySelectorAll("*")),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var _t3=_step3.value;m(_t3)}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}a.document.body.appendChild(a.document.adoptNode(e));var _iterator4=_createForOfIteratorHelper(u),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var _e3=_step4.value;_e3[0].shadowRoot.adoptedStyleSheets=_e3[1]}}catch(err){_iterator4.e(err)}finally{_iterator4.f()}t.closeCallback()}(this.resolvedElementContent,{title:this.elementTitleText.textContent,closeCallback:function closeCallback(){_this5.undockedToNewBrowserWindow=!0,_this5.closeInternal(!1)},newWindowClosedCallback:function newWindowClosedCallback(){_this5.undockedToNewBrowserWindow=!1,_this5.dockManager.notifyOnClosePanel(_this5)},focused:function focused(e){_this5.dockManager.activePanel=_this5},blured:function blured(e){_this5.dockManager.activePanel=null}})}},{key:"close",value:function(){var _close=_asyncToGenerator(_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:this.closeInternal(!0);case 1:case"end":return _context.stop()}},_callee,this)}));function close(){return _close.apply(this,arguments)}return close}()},{key:"closeInternal",value:function(){var _closeInternal=_asyncToGenerator(_regeneratorRuntime().mark(function _callee2(e){var t;return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:t=!0;_context2.t0=this.elementContentContainer.parentElement===this.dockManager.config.dialogRootElement;if(!_context2.t0){_context2.next=19;break}if(!e){_context2.next=17;break}if(!this.closePanelContainerCallback){_context2.next=10;break}_context2.next=7;return this.closePanelContainerCallback(this);case 7:t=_context2.sent;_context2.next=15;break;case 10:_context2.t1=this.dockManager.closePanelContainerCallback;if(!_context2.t1){_context2.next=15;break}_context2.next=14;return this.dockManager.closePanelContainerCallback(this);case 14:t=_context2.sent;case 15:_context2.next=18;break;case 17:t=!0;case 18:_context2.t0=t;case 19:if(!_context2.t0){_context2.next=21;break}if(this.dockManager.config.dialogRootElement.removeChild(this.elementContentContainer),this.isDialog)this.floatingDialog&&this.floatingDialog.close();else{try{this.dockManager.notifyOnClosePanel(this)}catch(e){console.error(e)}this.performClose()}case 21:case"end":return _context2.stop()}},_callee2,this)}));function closeInternal(_x){return _closeInternal.apply(this,arguments)}return closeInternal}()}],[{key:"loadFromState",value:function(){var _loadFromState=_asyncToGenerator(_regeneratorRuntime().mark(function _callee3(e,t){var n,i,_o2,_t4,o;return _regeneratorRuntime().wrap(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:if(!t.getElementCallback){_context3.next=7;break}_context3.next=3;return t.getElementCallback(e);case 3:_o2=_context3.sent;n=_o2.element,i=_o2.title;_context3.next=9;break;case 7:_t4=e.element;n=document.getElementById(_t4);case 9:if(!(null===n)){_context3.next=11;break}return _context3.abrupt("return",null);case 11:o=new d(n,t,i);return _context3.abrupt("return",(o.loadState(e),o));case 13:case"end":return _context3.stop()}},_callee3)}));function loadFromState(_x2,_x3){return _loadFromState.apply(this,arguments)}return loadFromState}()}])}();_defineProperty(d,"createContextMenuContentCallback",function(e){var t=[];if(e.dockManager.config.enableBrowserWindows){var n=document.createElement("div");n.innerText=r.getString("NewBrowserWindow"),t.push(n),n.onclick=function(){e.undockToBrowserDialog(),e.closeContextMenu()}}return t});var c=function(){function c(e,t,n,i){_classCallCheck(this,c);_defineProperty(this,"dialog",void 0);_defineProperty(this,"delegate",void 0);_defineProperty(this,"containerElement",void 0);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"topLevelElement",void 0);_defineProperty(this,"containerType",void 0);_defineProperty(this,"mouseDownHandler",void 0);_defineProperty(this,"touchDownHandler",void 0);_defineProperty(this,"minimumAllowedChildNodes",void 0);_defineProperty(this,"previousMousePosition",void 0);_defineProperty(this,"mouseMoveHandler",void 0);_defineProperty(this,"mouseUpHandler",void 0);_defineProperty(this,"iframeEventHandlers",void 0);this.dialog=e,this.delegate=t,this.containerElement=t.containerElement,this.dockManager=t.dockManager,this.topLevelElement=n,this.containerType=t.containerType,this.mouseDownHandler=new l(i,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new l(i,"touchstart",this.onMouseDown.bind(this)),this.topLevelElement.style.left=n.offsetLeft+"px",this.topLevelElement.style.top=n.offsetTop+"px",this.minimumAllowedChildNodes=t.minimumAllowedChildNodes,this.iframeEventHandlers=[]}return _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 _this6=this;if(2!=e.button&&(e.preventDefault&&e.preventDefault(),this._startDragging(e),this.previousMousePosition={x:e.clientX,y:e.clientY},this.mouseMoveHandler&&(this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler),this.mouseUpHandler&&(this.mouseUpHandler.cancel(),delete this.mouseUpHandler),this.mouseMoveHandler=new l(window,"pointermove",this.onMouseMove.bind(this)),this.mouseUpHandler=new l(window,"pointerup",this.onMouseUp.bind(this)),this.dockManager.iframes)){var _iterator5=_createForOfIteratorHelper(this.dockManager.iframes),_step5;try{var _loop=function _loop(){var e=_step5.value;var t=_this6.onMouseMovedIframe.bind(_this6);_this6.iframeEventHandlers.push(new l(e.contentWindow,"pointermove",function(n){return t(n,e)})),_this6.iframeEventHandlers.push(new l(e.contentWindow,"pointerup",_this6.onMouseUp.bind(_this6)))};for(_iterator5.s();!(_step5=_iterator5.n()).done;){_loop()}}catch(err){_iterator5.e(err)}finally{_iterator5.f()}}}},{key:"onMouseUp",value:function onMouseUp(e){this._stopDragging(e),this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler,this.mouseUpHandler.cancel(),delete this.mouseUpHandler;var _iterator6=_createForOfIteratorHelper(this.iframeEventHandlers),_step6;try{for(_iterator6.s();!(_step6=_iterator6.n()).done;){var _e4=_step6.value;_e4.cancel()}}catch(err){_iterator6.e(err)}finally{_iterator6.f()}this.iframeEventHandlers=[]}},{key:"_startDragging",value:function _startDragging(e){this.containerElement.classList.add("draggable-dragging-active"),this.delegate.elementContentContainer.classList.add("draggable-dragging-active"),this.dialog.eventListener&&this.dialog.eventListener._onDialogDragStarted(this.dialog,e),s.disableGlobalTextSelection(this.dockManager.config.dialogRootElement)}},{key:"_stopDragging",value:function _stopDragging(e){this.containerElement.classList.remove("draggable-dragging-active"),this.delegate.elementContentContainer.classList.remove("draggable-dragging-active"),this.dialog.eventListener&&this.dialog.eventListener._onDialogDragEnded(this.dialog,e),s.enableGlobalTextSelection(this.dockManager.config.dialogRootElement)}},{key:"onMouseMovedIframe",value:function onMouseMovedIframe(e,t){var n=t.getBoundingClientRect();this.onMouseMove(e,{x:n.x,y:n.y})}},{key:"onMouseMove",value:function onMouseMove(e,t){e.preventDefault&&e.preventDefault();var n=new o(e.clientX,e.clientY);t&&(n=new o(e.clientX+t.x,e.clientY+t.y));var i=this.dockManager.checkXBounds(this.topLevelElement,n,this.previousMousePosition,!1,!1),s=this.dockManager.checkYBounds(this.topLevelElement,n,this.previousMousePosition,!1,!1);this._performDrag(i,s),this.previousMousePosition=n}},{key:"_performDrag",value:function _performDrag(e,t){var n=e+s.getPixels(this.topLevelElement.style.left),i=t+s.getPixels(this.topLevelElement.style.top);this.topLevelElement.style.left=n+"px",this.topLevelElement.style.top=i+"px",this.dialog.panel.setDialogPosition(n,i)}}])}();var u=function(){function u(){_classCallCheck(this,u);_defineProperty(this,"element",void 0);_defineProperty(this,"handleSize",void 0);_defineProperty(this,"cornerSize",void 0);_defineProperty(this,"east",void 0);_defineProperty(this,"west",void 0);_defineProperty(this,"north",void 0);_defineProperty(this,"south",void 0);_defineProperty(this,"corner",void 0);_defineProperty(this,"mouseDownHandler",void 0);_defineProperty(this,"touchDownHandler",void 0);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}return _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")}}])}();var m=function(){function m(e,t,n){var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:!1;_classCallCheck(this,m);_defineProperty(this,"topLevelElement",void 0);_defineProperty(this,"dialog",void 0);_defineProperty(this,"delegate",void 0);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"containerElement",void 0);_defineProperty(this,"containerType",void 0);_defineProperty(this,"minimumAllowedChildNodes",void 0);_defineProperty(this,"readyToProcessNextResize",void 0);_defineProperty(this,"dockSpawnResizedEvent",void 0);_defineProperty(this,"resizeHandles",void 0);_defineProperty(this,"previousMousePosition",void 0);_defineProperty(this,"iframeEventHandlers",void 0);_defineProperty(this,"disableResize",void 0);this.dialog=e,this.disableResize=i,this.delegate=t,this.containerElement=t.containerElement,this.dockManager=t.dockManager,this.topLevelElement=n,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=[]}return _createClass(m,[{key:"setActiveChild",value:function setActiveChild(){}},{key:"_buildResizeHandles",value:function _buildResizeHandles(){this.resizeHandles=[],this.disableResize||(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,n,i){var _this7=this;var o=new u;o.east=e,o.west=t,o.north=n,o.south=i,o.element=document.createElement("div"),this.topLevelElement.appendChild(o.element);var s="",a="";n&&(s="n"),i&&(s="s"),e&&(a="e"),t&&(a="w");var h="resize-handle-"+s+a;s.length>0&&a.length>0&&(o.corner=!0),o.element.classList.add(o.corner?"resize-handle-corner":"resize-handle"),o.element.classList.add(h),this.resizeHandles.push(o),o.mouseDownHandler=new l(o.element,"mousedown",function(e){_this7.onMouseDown(o,e)}),o.touchDownHandler=new l(o.element,"touchstart",function(e){_this7.onMouseDown(o,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(n){n.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,n){var i=n.getBoundingClientRect();this.onMouseMoved(e,t,{x:i.x,y:i.y})}},{key:"onMouseMoved",value:function onMouseMoved(e,t,n){var i=null;if(t.changedTouches){if(t.changedTouches.length>1)return;i=t.changedTouches[0]}else i=t;if(!this.readyToProcessNextResize)return;this.readyToProcessNextResize=!1,this.dialog.panel&&this.dockManager.suspendLayout(this.dialog.panel);var s=new o(i.clientX,i.clientY);n&&(s=new o(i.clientX+n.x,i.clientY+n.y));var l=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,l,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 _this8=this;var n=null;if(t.touches){if(t.touches.length>1)return;n=t.touches[0]}else n=t;this.previousMousePosition=new o(n.clientX,n.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 _iterator7=_createForOfIteratorHelper(this.iframeEventHandlers),_step7;try{for(_iterator7.s();!(_step7=_iterator7.n()).done;){var _e5=_step7.value;_e5.cancel()}}catch(err){_iterator7.e(err)}finally{_iterator7.f()}if(this.iframeEventHandlers=[],e.mouseMoveHandler=new l(window,"mousemove",function(t){_this8.onMouseMoved(e,t)}),e.touchMoveHandler=new l(window,"touchmove",function(t){_this8.onMouseMoved(e,t)}),e.mouseUpHandler=new l(window,"mouseup",function(t){_this8.onMouseUp(e)}),e.touchUpHandler=new l(window,"touchend",function(t){_this8.onMouseUp(e)}),this.dockManager.iframes){var _iterator8=_createForOfIteratorHelper(this.dockManager.iframes),_step8;try{var _loop2=function _loop2(){var t=_step8.value;var n=_this8.onMouseMovedIframe.bind(_this8);_this8.iframeEventHandlers.push(new l(t.contentWindow,"mousemove",function(i){return n(e,i,t)})),_this8.iframeEventHandlers.push(new l(t.contentWindow,"mouseup",function(t){return _this8.onMouseUp(e)})),_this8.iframeEventHandlers.push(new l(t.contentWindow,"touchmove",function(i){return n(e,i,t)})),_this8.iframeEventHandlers.push(new l(t.contentWindow,"touchend",function(t){return _this8.onMouseUp(e)}))};for(_iterator8.s();!(_step8=_iterator8.n()).done;){_loop2()}}catch(err){_iterator8.e(err)}finally{_iterator8.f()}}s.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 _iterator9=_createForOfIteratorHelper(this.iframeEventHandlers),_step9;try{for(_iterator9.s();!(_step9=_iterator9.n()).done;){var _e6=_step9.value;_e6.cancel()}}catch(err){_iterator9.e(err)}finally{_iterator9.f()}this.iframeEventHandlers=[],s.enableGlobalTextSelection(this.dockManager.config.dialogRootElement)}},{key:"_performDrag",value:function _performDrag(e,t,n){var i={};i.left=s.getPixels(this.topLevelElement.style.left),i.top=s.getPixels(this.topLevelElement.style.top),i.width=this.topLevelElement.clientWidth,i.height=this.topLevelElement.clientHeight,e.east&&this._resizeEast(t,i),e.west&&this._resizeWest(t,i),e.north&&this._resizeNorth(n,i),e.south&&this._resizeSouth(n,i)}},{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,n,i,o){o.left+=e,o.top+=t,o.width+=n,o.height+=i,o.width=Math.max(o.width,50),o.height=Math.max(o.height,50),this.topLevelElement.style.left=o.left+"px",this.topLevelElement.style.top=o.top+"px",this.resize(o.width,o.height)}}])}();var p=function(){function p(e,t,n,i){_classCallCheck(this,p);_defineProperty(this,"elementDialog",void 0);_defineProperty(this,"draggable",void 0);_defineProperty(this,"panel",void 0);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"eventListener",void 0);_defineProperty(this,"position",void 0);_defineProperty(this,"resizable",void 0);_defineProperty(this,"disableResize",void 0);_defineProperty(this,"mouseDownHandler",void 0);_defineProperty(this,"onKeyPressBound",void 0);_defineProperty(this,"noDocking",void 0);_defineProperty(this,"isHidden",void 0);_defineProperty(this,"keyPressHandler",void 0);_defineProperty(this,"focusHandler",void 0);_defineProperty(this,"grayoutParent",void 0);_defineProperty(this,"contextmenuHandler",void 0);_defineProperty(this,"_ctxMenu",void 0);_defineProperty(this,"_windowsContextMenuCloseBound",void 0);this.panel=e,this.dockManager=t,this.eventListener=t,this.grayoutParent=n,this.disableResize=i,this._initialize(),this.dockManager.context.model.dialogs.push(this),this.position=t.defaultDialogPosition,this.dockManager.notifyOnCreateDialog(this),e.isDialog=!0}return _createClass(p,[{key:"saveState",value:function saveState(e,t){this.position=new o(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.disableResize),this.dockManager.config.dialogRootElement.appendChild(this.elementDialog),this.elementDialog.classList.add("dialog-floating"),this.focusHandler=new l(this.elementDialog,"focus",this.onFocus.bind(this),!0),this.mouseDownHandler=new l(this.elementDialog,"pointerdown",this.onMouseDown.bind(this),!0),this.keyPressHandler=new l(this.elementDialog,"keypress",this.dockManager.onKeyPressBound,!0),this.contextmenuHandler=new l(this.panel.elementTitle,"contextmenu",this.oncontextMenuClicked.bind(this)),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 n=this.dockManager.config.dialogRootElement.getBoundingClientRect();this.position=new o(e-n.left,t-n.top),this.elementDialog.style.left=e-n.left+"px",this.elementDialog.style.top=t-n.top+"px",this.panel.setDialogPosition(e,t),this.dockManager.notifyOnChangeDialogPosition(this,e,t)}},{key:"getPosition",value:function getPosition(){return new o(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(e){2!=e.button&&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.keyPressHandler&&(this.keyPressHandler.cancel(),delete this.keyPressHandler),this.contextmenuHandler&&(this.contextmenuHandler.cancel(),delete this.contextmenuHandler),s.removeNode(this.elementDialog),this.draggable.removeDecorator(),s.removeNode(this.panel.elementPanel),s.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.panel.elementContentContainer.style.zIndex=this.dockManager.zIndexDialogCounter++,this.elementDialog.style.zIndex=this.dockManager.zIndexDialogCounter++,this.dockManager.activePanel=this.panel}},{key:"hide",value:function hide(){this.elementDialog.style.zIndex="0",this.panel.elementContentContainer.style.zIndex="",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.panel.elementContentContainer.style.zIndex=this.dockManager.zIndexDialogCounter++,this.elementDialog.style.zIndex=this.dockManager.zIndexDialogCounter++,this.elementDialog.style.display="block",this.isHidden&&(this.isHidden=!1,this.dockManager.notifyOnShowDialog(this))}},{key:"oncontextMenuClicked",value:function oncontextMenuClicked(e){if(e.preventDefault(),!this._ctxMenu&&p.createContextMenuContentCallback){var _this$_ctxMenu2;var _t5=p.createContextMenuContentCallback(this,this.dockManager.context.model.documentManagerNode.children);if(0==_t5.length)return;this._ctxMenu=document.createElement("div"),this._ctxMenu.className="dockspab-tab-handle-context-menu",(_this$_ctxMenu2=this._ctxMenu).append.apply(_this$_ctxMenu2,_toConsumableArray(_t5)),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("pointerup",this._windowsContextMenuCloseBound)}else this.closeContextMenu()}},{key:"closeContextMenu",value:function closeContextMenu(){this._ctxMenu&&(document.body.removeChild(this._ctxMenu),delete this._ctxMenu,window.removeEventListener("pointerup",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:"fromElement",value:function fromElement(e,t){return new p(new d(document.getElementById(e),t),t,null)}}])}();_defineProperty(p,"createContextMenuContentCallback",function(e,t){if(!e.panel._hideCloseButton)return[];var n=[];var i=document.createElement("div");if(i.innerText=r.getString("CloseDialog"),n.push(i),i.onclick=function(){e.panel.close(),e.closeContextMenu()},e.dockManager.config.enableBrowserWindows){var _t16=document.createElement("div");_t16.innerText=r.getString("NewBrowserWindow"),n.push(_t16),_t16.onclick=function(){e.panel.undockToBrowserDialog(),e.closeContextMenu()}}return n});var g=_createClass(function g(){_classCallCheck(this,g);_defineProperty(this,"escClosesWindow",void 0);_defineProperty(this,"escClosesDialog",void 0);_defineProperty(this,"dialogRootElement",void 0);_defineProperty(this,"moveOnlyWithinDockConatiner",void 0);_defineProperty(this,"enableBrowserWindows",void 0);this.escClosesWindow=!0,this.escClosesDialog=!0,this.dialogRootElement=document.body,this.moveOnlyWithinDockConatiner=!1,this.enableBrowserWindows=!0});var v=function(){function v(){_classCallCheck(this,v)}return _createClass(v,[{key:"serialize",value:function serialize(e){var t=this._buildGraphInfo(e.rootNode),n=this._buildDialogsInfo(e.dialogs.sort(function(e,t){return e.elementDialog.style.zIndex-t.elementDialog.style.zIndex}));return JSON.stringify({graphInfo:t,dialogsInfo:n})}},{key:"_buildGraphInfo",value:function _buildGraphInfo(e){var _this9=this;var t={};e.container.saveState(t);var n=[];return e.children.forEach(function(e){n.push(_this9._buildGraphInfo(e))}),{containerType:e.container.containerType,state:t,children:n}}},{key:"_buildDialogsInfo",value:function _buildDialogsInfo(e){var t=[];return e.forEach(function(e){var n={},i=e.panel;i.saveState(n);var o={containerType:i.containerType,state:n,position:e.getPosition(),isHidden:e.isHidden};t.push(o)}),t}}])}();var C=function(){function C(e){_classCallCheck(this,C);_defineProperty(this,"parent",void 0);_defineProperty(this,"container",void 0);_defineProperty(this,"children",void 0);this.container=e,this.children=[]}return _createClass(C,[{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,n){t.detachFromParent(),t.parent=this;var i=this.children.indexOf(e),o=this.children.slice(0,i),s=this.children.slice(i+1,this.children.length);this.children=o.slice(0),n?(this.children.push(t),this.children.push(e)):(this.children.push(e),this.children.push(t)),Array.prototype.push.apply(this.children,s)}},{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 _n2=0;_n2<e;_n2++)t="\t"+t;var n=void 0===this.parent?"null":this.parent.container.containerType;console.log(">>"+t+" ["+n+"]"),this.children.forEach(function(t){t.debugDumpTree(e+1)})}}])}();var f=function(){function f(e,t,n){_classCallCheck(this,f);_defineProperty(this,"previousContainer",void 0);_defineProperty(this,"nextContainer",void 0);_defineProperty(this,"stackedVertical",void 0);_defineProperty(this,"barElement",void 0);_defineProperty(this,"pointerDownHandler",void 0);_defineProperty(this,"minPanelSize",void 0);_defineProperty(this,"readyToProcessNextDrag",void 0);_defineProperty(this,"dockSpawnResizedEvent",void 0);_defineProperty(this,"previousMouseEvent",void 0);_defineProperty(this,"pointerMovedHandler",void 0);_defineProperty(this,"pointerUpHandler",void 0);_defineProperty(this,"iframeEventHandlers",void 0);this.previousContainer=e,this.nextContainer=t,this.stackedVertical=n,this.barElement=document.createElement("div"),this.barElement.classList.add(n?"splitbar-horizontal":"splitbar-vertical"),this.pointerDownHandler=new l(this.barElement,"pointerdown",this.onPointerDown.bind(this)),this.minPanelSize=50,this.readyToProcessNextDrag=!0,this.dockSpawnResizedEvent=new CustomEvent("DockSpawnResizedEvent",{composed:!0,bubbles:!0}),this.iframeEventHandlers=[]}return _createClass(f,[{key:"onPointerDown",value:function onPointerDown(e){this.barElement.setPointerCapture(e.pointerId),this._startDragging(e)}},{key:"onPointerUp",value:function onPointerUp(e){this.barElement.releasePointerCapture(e.pointerId),this._stopDragging()}},{key:"onPointerMovedIframe",value:function onPointerMovedIframe(e,t){null!=e.changedTouches&&(e=e.changedTouches[0]);var n=t.getBoundingClientRect();this.handleMoveEvent({x:parseInt(""+e.clientX+n.x),y:parseInt(""+e.clientY+n.y)})}},{key:"onPointerMoved",value:function onPointerMoved(e){null!=e.changedTouches&&(e=e.changedTouches[0]),this.handleMoveEvent({x:parseInt(""+e.clientX),y:parseInt(""+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 n=e.x-this.previousMouseEvent.x,i=e.y-this.previousMouseEvent.y;this._performDrag(n,i),this.previousMouseEvent=e,this.readyToProcessNextDrag=!0,t.resumeLayout(this.previousContainer),t.resumeLayout(this.nextContainer)}},{key:"_performDrag",value:function _performDrag(e,t){var n=this.previousContainer.containerElement.clientWidth,i=this.previousContainer.containerElement.clientHeight,o=this.nextContainer.containerElement.clientWidth,s=this.nextContainer.containerElement.clientHeight,l=this.stackedVertical?i:n,a=this.stackedVertical?s:o,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(n,r),this.nextContainer.resize(o,d)):h<0?(this.previousContainer.resize(r,i),this.nextContainer.resize(d,s)):(this.nextContainer.resize(d,s),this.previousContainer.resize(r,i),this.nextContainer.resize(d,s)),document.dispatchEvent(this.dockSpawnResizedEvent))}},{key:"_startDragging",value:function _startDragging(e){var _this10=this;if(s.disableGlobalTextSelection(this.previousContainer.dockManager.config.dialogRootElement),this.pointerMovedHandler&&(this.pointerMovedHandler.cancel(),delete this.pointerMovedHandler),this.pointerUpHandler&&(this.pointerUpHandler.cancel(),delete this.pointerUpHandler),this.pointerMovedHandler=new l(window,"pointermove",this.onPointerMoved.bind(this)),this.pointerUpHandler=new l(window,"pointerup",this.onPointerUp.bind(this)),this.previousContainer.dockManager.iframes){var _iterator10=_createForOfIteratorHelper(this.previousContainer.dockManager.iframes),_step10;try{var _loop3=function _loop3(){var e=_step10.value;var t=_this10.onPointerMovedIframe.bind(_this10);_this10.iframeEventHandlers.push(new l(e.contentWindow,"pointermove",function(n){return t(n,e)})),_this10.iframeEventHandlers.push(new l(e.contentWindow,"pointerup",_this10.onPointerUp.bind(_this10)))};for(_iterator10.s();!(_step10=_iterator10.n()).done;){_loop3()}}catch(err){_iterator10.e(err)}finally{_iterator10.f()}}this.previousMouseEvent={x:e.clientX,y:e.clientY}}},{key:"_stopDragging",value:function _stopDragging(){s.enableGlobalTextSelection(this.previousContainer.dockManager.config.dialogRootElement),this.pointerMovedHandler&&(this.pointerMovedHandler.cancel(),delete this.pointerMovedHandler),this.pointerUpHandler&&(this.pointerUpHandler.cancel(),delete this.pointerUpHandler);var _iterator11=_createForOfIteratorHelper(this.iframeEventHandlers),_step11;try{for(_iterator11.s();!(_step11=_iterator11.n()).done;){var _e8=_step11.value;_e8.cancel()}}catch(err){_iterator11.e(err)}finally{_iterator11.f()}this.iframeEventHandlers=[]}}])}();var w=function(){function w(e,t){_classCallCheck(this,w);_defineProperty(this,"panelElement",void 0);_defineProperty(this,"spiltterBars",void 0);_defineProperty(this,"stackedVertical",void 0);_defineProperty(this,"childContainers",void 0);this.childContainers=e,this.stackedVertical=t,this.panelElement=document.createElement("div"),this.spiltterBars=[],this._buildSplitterDOMAndAddElements()}return _createClass(w,[{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 _t6=0;_t6<this.childContainers.length-1;_t6++){var n=this.childContainers[_t6],i=this.childContainers[_t6+1],_o3=new f(n,i,this.stackedVertical);this.spiltterBars.push(_o3),Array.from(this.panelElement.children).includes(n.containerElement)||this._insertContainerIntoPanel(n,e),this.panelElement.insertBefore(_o3.barElement,n.containerElement.nextSibling),e=_o3.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){s.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"),s.removeNode(t.containerElement))}),this.spiltterBars.forEach(function(e){s.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"),s.removeNode(e.containerElement))}),this.spiltterBars.forEach(function(e){s.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&&(s.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 n=this.stackedVertical?this.panelElement.clientHeight:this.panelElement.clientWidth,i=n*t,o=(n-i-(this.stackedVertical?this.spiltterBars[0].barElement.clientHeight:this.spiltterBars[0].barElement.clientWidth)*this.spiltterBars.length)/n;for(var _t7=0;_t7<this.childContainers.length;_t7++){var _n3=void 0,_s2=this.childContainers[_t7];_s2!==e?(_n3=this.stackedVertical?_s2.containerElement.parentElement.clientHeight:_s2.containerElement.parentElement.clientWidth,_n3*=o):_n3=i,this.stackedVertical?_s2.resize(_s2.width,Math.floor(_n3)):_s2.resize(Math.floor(_n3),_s2.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,n=[];for(var _e9=0;_e9<this.childContainers.length;_e9++){var i=this.childContainers[_e9],_o4=this.stackedVertical?i.containerElement.clientHeight:i.containerElement.clientWidth;n.push(_o4/t)}return n}},{key:"setRatios",value:function setRatios(e){var t=this.stackedVertical?this.spiltterBars[0].barElement.clientHeight:this.spiltterBars[0].barElement.clientWidth,n=(this.stackedVertical?this.panelElement.clientHeight:this.panelElement.clientWidth)-t*this.spiltterBars.length;for(var _t8=0;_t8<this.childContainers.length;_t8++){var i=this.childContainers[_t8],_o5=n*e[_t8];this.stackedVertical?i.resize(i.width,Math.floor(_o5)):i.resize(Math.floor(_o5),i.height)}}},{key:"resize",value:function resize(e,t){var _this11=this;if(this.childContainers.length<=1)return;var n;for(this.panelElement.style.width=e+"px",this.panelElement.style.height=t+"px",n=0;n<this.childContainers.length;n++){var _i2=this.childContainers[n];if(this.stackedVertical?_i2.resize(e,_i2.height?_i2.height:t):_i2.resize(_i2.width?_i2.width:e,t),n<this.spiltterBars.length){var _i3=this.spiltterBars[n];this.stackedVertical?_i3.barElement.style.width=e+"px":_i3.barElement.style.height=t+"px"}}var i=0;this.childContainers.forEach(function(e){var t=_this11.stackedVertical?e.height:e.width;i+=t});var o=this.spiltterBars[0].barElement.getBoundingClientRect();var s=this.stackedVertical?o.height:o.width,l=this.stackedVertical?t:e;l-=s*this.spiltterBars.length,i=Math.max(i,1);var a=l/i,h=0;for(n=0;n<this.childContainers.length;n++){var _e10=this.childContainers[n];"none"==_e10.containerElement.style.display&&(_e10.containerElement.style.display="block");var _t9=this.stackedVertical?_e10.containerElement.clientHeight:_e10.containerElement.clientWidth,_i4=a>1?Math.floor(_t9*a):Math.ceil(_t9*a);h+=_i4,n===this.childContainers.length-1&&(_i4+=l-h),this.stackedVertical?_e10.resize(_e10.width,_i4):_e10.resize(_i4,_e10.height)}}}])}();var k=function(){function k(e,t,n,i){_classCallCheck(this,k);_defineProperty(this,"name",void 0);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"minimumAllowedChildNodes",void 0);_defineProperty(this,"splitterPanel",void 0);_defineProperty(this,"stackedVertical",void 0);_defineProperty(this,"containerElement",void 0);_defineProperty(this,"_cachedWidth",void 0);_defineProperty(this,"_cachedHeight",void 0);_defineProperty(this,"state",void 0);_defineProperty(this,"containerType",void 0);0!==arguments.length&&(this.name=e,this.dockManager=t,this.stackedVertical=i,this.splitterPanel=new w(n,this.stackedVertical),this.containerElement=this.splitterPanel.panelElement,this.minimumAllowedChildNodes=2)}return _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}}])}();var M=function(_k2){function M(t,n){var _this12;_classCallCheck(this,M);_this12=_callSuper(this,M,[s.getNextId("horizontal_splitter_"),t,n,!1]),_this12.containerType=e.horizontal;return _this12}_inherits(M,_k2);return _createClass(M)}(k);var y=function(_k3){function y(t,n){var _this13;_classCallCheck(this,y);_this13=_callSuper(this,y,[s.getNextId("vertical_splitter_"),t,n,!0]),_this13.containerType=e.vertical;return _this13}_inherits(y,_k3);return _createClass(y)}(k);var b=function(){function b(e){var _this14=this;_classCallCheck(this,b);_defineProperty(this,"parent",void 0);_defineProperty(this,"elementBase",void 0);_defineProperty(this,"elementText",void 0);_defineProperty(this,"elementCloseButton",void 0);_defineProperty(this,"undockInitiator",void 0);_defineProperty(this,"mouseDownHandler",void 0);_defineProperty(this,"touchDownHandler",void 0);_defineProperty(this,"closeButtonHandler",void 0);_defineProperty(this,"closeButtonTouchHandler",void 0);_defineProperty(this,"auxClickHandler",void 0);_defineProperty(this,"contextMenuHandler",void 0);_defineProperty(this,"mouseMoveHandler",void 0);_defineProperty(this,"touchMoveHandler",void 0);_defineProperty(this,"mouseUpHandler",void 0);_defineProperty(this,"touchUpHandler",void 0);_defineProperty(this,"stargDragPosition",void 0);_defineProperty(this,"dragged",void 0);_defineProperty(this,"eventListeners",void 0);_defineProperty(this,"undockListener",void 0);_defineProperty(this,"prev",void 0);_defineProperty(this,"current",void 0);_defineProperty(this,"direction",void 0);_defineProperty(this,"_ctxMenu",void 0);_defineProperty(this,"_windowsContextMenuCloseBound",void 0);this.parent=e;var n=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,o=i.getRawTitle();this.undockListener={onDockEnabled:function onDockEnabled(e){_this14.undockEnabled(e.state)},onHideCloseButton:function onHideCloseButton(e){_this14.hideCloseButton(e.state)}},this.eventListeners=[],i.addListener(this.undockListener),this.elementText.innerHTML=o,this.elementText.title=this.elementText.innerText,this.undockInitiator=new a(this.elementBase,n),this.undockInitiator.enabled=!0,this.mouseDownHandler=new l(this.elementBase,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new l(this.elementBase,"touchstart",this.onMouseDown.bind(this),{passive:!1}),this.closeButtonHandler=new l(this.elementCloseButton,"click",this.onCloseButtonClicked.bind(this)),this.closeButtonTouchHandler=new l(this.elementCloseButton,"touchstart",this.onCloseButtonClicked.bind(this)),this.auxClickHandler=new l(this.elementBase,"auxclick",this.onCloseButtonClicked.bind(this)),i.panelType==t.document&&(this.contextMenuHandler=new l(this.elementBase,"contextmenu",this.oncontextMenuClicked.bind(this))),this.windowsContextMenuClose=this.windowsContextMenuClose.bind(this)}return _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){if(e.preventDefault(),!this._ctxMenu&&b.createContextMenuContentCallback){var _this$_ctxMenu3;var _t10=b.createContextMenuContentCallback(this,this.parent.container.dockManager.context.model.documentManagerNode.children);if(0==_t10.length)return;this._ctxMenu=document.createElement("div"),this._ctxMenu.className="dockspab-tab-handle-context-menu",(_this$_ctxMenu3=this._ctxMenu).append.apply(_this$_ctxMenu3,_toConsumableArray(_t10)),this._ctxMenu.style.left=e.pageX+"px",this._ctxMenu.style.top=e.pageY+"px",document.body.appendChild(this._ctxMenu),window.addEventListener("mouseup",this.windowsContextMenuClose)}else this.closeContextMenu()}},{key:"closeContextMenu",value:function closeContextMenu(){this._ctxMenu&&(document.body.removeChild(this._ctxMenu),delete this._ctxMenu,window.removeEventListener("mouseup",this.windowsContextMenuClose))}},{key:"windowsContextMenuClose",value:function windowsContextMenuClose(e){var t=e.composedPath();for(var _e11 in t)if(t[_e11]==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 l(window,"mousemove",this.onMouseMove.bind(this)),this.touchMoveHandler=new l(window,"touchmove",this.onMouseMove.bind(this),{passive:!1}),this.mouseUpHandler=new l(window,"mouseup",this.onMouseUp.bind(this)),this.touchUpHandler=new l(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(n){n.onMoveTab&&n.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 _t11=this.elementBase.getBoundingClientRect(),n=this.direction<0?{state:"left",bound:_t11.left,rect:_t11}:{state:"right",bound:_t11.right,rect:_t11};(e.clientX<_t11.left&&this.direction<0||e.clientX>_t11.left+_t11.width&&this.direction>0)&&this.moveTabEvent(this,n.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 _e12=this.parent.container.getRawTitle();this.elementText.innerHTML=_e12}}},{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(),this.elementBase&&(s.removeNode(this.elementBase),delete this.elementBase),this.elementCloseButton&&(s.removeNode(this.elementCloseButton),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"))}}])}();_defineProperty(b,"createContextMenuContentCallback",function(e,n){var i=[];var o=document.createElement("div");o.innerText=r.getString("CloseAll"),i.push(o),o.onclick=function(){for(var _e40=n.length-1;_e40>=0;_e40--){var _i11=n[_e40].container;_i11.panelType==t.document&&_i11.close()}e.closeContextMenu()};var s=document.createElement("div");if(s.innerText=r.getString("CloseAllButThis"),i.push(s),s.onclick=function(){for(var _i12=n.length-1;_i12>=0;_i12--){var _o10=n[_i12].container;e.parent.container!=_o10&&_o10.panelType==t.document&&_o10.close()}e.closeContextMenu()},e.parent.container.dockManager.config.enableBrowserWindows){var _t17=document.createElement("div");_t17.innerText=r.getString("NewBrowserWindow"),i.push(_t17),_t17.onclick=function(){e.parent.container.undockToBrowserDialog(),e.closeContextMenu()}}return i});var E=function(){function E(e,t){_classCallCheck(this,E);_defineProperty(this,"selected",void 0);_defineProperty(this,"host",void 0);_defineProperty(this,"container",void 0);_defineProperty(this,"panel",void 0);_defineProperty(this,"handle",void 0);_defineProperty(this,"containerElement",void 0);_defineProperty(this,"_initContent",void 0);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)}return _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,s.removeNode(this.containerElement)}},{key:"onSelected",value:function onSelected(){this.host.onTabPageSelected(this,!0),this.container instanceof d&&this.container.dockManager.notifyOnTabChange(this)}},{key:"setSelected",value:function setSelected(e,t){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",this.panel.setVisible(!0);var _e13=this.host.contentElement.clientWidth,n=this.host.contentElement.clientHeight;this.container.resize(_e13,n),t&&(this.host.dockManager.activePanel=this.container)}else this.containerElement.style.display="none",this.panel.setVisible(!1)}},{key:"resize",value:function resize(e,t){this.container.resize(e,t)}}])}();var H,D;!function(e){e[e.TOP=0]="TOP",e[e.BOTTOM=1]="BOTTOM",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT"}(H||(H={}));var x=function(){function x(e,t,n){var _this15=this;_classCallCheck(this,x);_defineProperty(this,"displayCloseButton",void 0);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"tabStripDirection",void 0);_defineProperty(this,"hostElement",void 0);_defineProperty(this,"tabListElement",void 0);_defineProperty(this,"separatorElement",void 0);_defineProperty(this,"contentElement",void 0);_defineProperty(this,"createTabPage",void 0);_defineProperty(this,"tabHandleListener",void 0);_defineProperty(this,"eventListeners",void 0);_defineProperty(this,"pages",void 0);_defineProperty(this,"activeTab",void 0);_defineProperty(this,"_resizeRequested",void 0);_defineProperty(this,"mouseDownHandler",void 0);_defineProperty(this,"focusHandler",void 0);if(void 0===t&&(t=H.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){_this15.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===H.BOTTOM)this.hostElement.appendChild(this.contentElement),this.hostElement.appendChild(this.separatorElement),this.hostElement.appendChild(this.tabListElement);else{if(this.tabStripDirection!==H.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 l(this.contentElement,"focus",this.onFocus.bind(this),!0),this.mouseDownHandler=new l(this.contentElement,"mousedown",this.onMousedown.bind(this),!0)}return _createClass(x,[{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=s.orderByIndexes(this.pages,e);var t=this.tabListElement.childNodes,n=[];for(var _e14 in t)1===t[_e14].nodeType&&n.push(t[_e14]);n=s.orderByIndexes(n,e);for(var _e15=0;_e15<n.length;++_e15)this.tabListElement.appendChild(n[_e15]);this.activeTab&&this.onTabPageSelected(this.activeTab,!1)}},{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,n,i){this.eventListeners.forEach(function(o){o.onChange&&o.onChange({host:e,handle:t,state:n,index:i})})}},{key:"_createDefaultTabPage",value:function _createDefaultTabPage(e,t){return new E(e,t)}},{key:"setActiveTab",value:function setActiveTab(e){var t;this.pages.forEach(function(n){n.container===e&&(t=n)}),this.pages.length>0&&t&&(this.onTabPageSelected(t,!0),this.dockManager.activePanel=e)}},{key:"resize",value:function resize(e,t){var _this16=this;this.hostElement.style.width=e+"px",this.hostElement.style.height=t+"px";var n=this.tabListElement.clientHeight;this._resizeRequested||requestAnimationFrame(function(){return _this16.resizeTabListElement(e,t)}),this._resizeRequested=!0;var i=this.separatorElement.clientHeight,o=t-n-i;this.contentElement.style.height=o+"px",this.activeTab&&this.activeTab.resize(e,o)}},{key:"resizeTabListElement",value:function resizeTabListElement(e,t){var _this17=this;if(this._resizeRequested=!1,0===this.pages.length)return;var n=0;this.pages.forEach(function(e){var t=e.handle;null!=t.elementBase&&(t.elementBase.style.width="",n+=t.elementBase.clientWidth)});var i=e/n;i>1.2||this.pages.forEach(function(e,t){var n=e.handle,o=i*n.elementBase.clientWidth;t===_this17.pages.length-1&&(o-=5),n.elementBase.style.width=o+"px"})}},{key:"performLayout",value:function performLayout(e){var _this18=this;this.pages.forEach(function(t){if(!e.some(function(e){return e==t.container})){t.handle.removeListener(_this18.tabHandleListener),t.destroy();var _e16=_this18.pages.indexOf(t);_e16>-1&&_this18.pages.splice(_e16,1)}});var t=this.activeTab;delete this.activeTab;var n=e.filter(function(e){return"panel"===e.containerType});n.length>0?(n.forEach(function(e){var n=null;_this18.pages.some(function(t){return t.container==e&&(n=t,!0)})||(n=_this18.createTabPage(_this18,e),n.handle.addListener(_this18.tabHandleListener),_this18.pages.push(n)),t&&n.container===t.container&&(_this18.activeTab=n)}),this._setTabHandlesVisible(!0)):this._setTabHandlesVisible(!1),this.activeTab&&this.onTabPageSelected(this.activeTab,!1)}},{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,t){this.activeTab=e,this.pages.forEach(function(n){var i=n===e;n.setSelected(i,t)})}}])}();var _=function(){function _(t,n){var _this19=this;_classCallCheck(this,_);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"tabOrientation",void 0);_defineProperty(this,"name",void 0);_defineProperty(this,"element",void 0);_defineProperty(this,"containerElement",void 0);_defineProperty(this,"containerType",void 0);_defineProperty(this,"minimumAllowedChildNodes",void 0);_defineProperty(this,"tabHost",void 0);_defineProperty(this,"tabHostListener",void 0);_defineProperty(this,"state",void 0);void 0===n&&(n=H.BOTTOM),this.dockManager=t,this.tabOrientation=n,this.name=s.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 x(t,this.tabOrientation),this.tabHostListener={onChange:function onChange(e){_this19.dockManager._requestTabReorder(_this19,e)}},this.tabHost.addListener(this.tabHostListener),this.element.appendChild(this.tabHost.hostElement)}return _createClass(_,[{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(){this.tabHost.pages.forEach(function(e){return e.destroy()}),s.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"}}])}();var T=function(){function T(_e17){_classCallCheck(this,T);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"_forceResizeCompositeContainer",function(e){var t=e.containerElement.clientWidth,n=e.containerElement.clientHeight;e.resize(t,n)});this.dockManager=_e17}return _createClass(T,[{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 n=t.children.indexOf(e);if(e.detachFromParent(),t.children.length<t.container.minimumAllowedChildNodes){var _e18=t.parent;for(var _n4=0;_n4<t.children.length;_n4++){var i=t.children[_n4];if(_e18){_e18.addChildAfter(t,i),t.detachFromParent();var _n5=t.container.containerElement.clientWidth,_o6=t.container.containerElement.clientHeight;t.container.destroy(),i.container.resize(_n5,_o6),_e18.performLayout(!1)}else t.detachFromParent(),t.container.destroy(),this.dockManager.setRootNode(i)}}else if(t.performLayout(!1),t.children.length>0){var _e19=t.children[Math.max(0,n-1)];t.container.setActiveChild(_e19.container)}this.dockManager.invalidate(),this.dockManager.notifyOnUnDock(e)}},{key:"close",value:function close(e){var t=e===null||e===void 0?void 0:e.parent;if(!t)throw new Error("Cannot undock. panel is not a leaf node");var n=!1;t.children.length>0&&null!=t.container.tabHost&&(n=t.container.tabHost.getActiveTab().container==e.container);var i=t.children.indexOf(e);if(e.detachFromParent(),t.children.length<t.container.minimumAllowedChildNodes){var _e20=t.parent;for(var _n6=0;_n6<t.children.length;_n6++){var _i5=t.children[_n6];if(_e20){_e20.addChildAfter(t,_i5),t.detachFromParent();var _n7=t.container.containerElement.clientWidth,_o7=t.container.containerElement.clientHeight;_i5.container.resize(_n7,_o7),t.container.destroy(),_e20.performLayout(!1)}else t.detachFromParent(),t.container.destroy(),this.dockManager.setRootNode(_i5)}}else if(t.performLayout(!1),n){var _e21=t.children[Math.max(0,i-1)];null!=_e21&&t.container.setActiveChild(_e21.container)}this.dockManager.invalidate(),this.dockManager.notifyOnUnDock(e)}},{key:"reorderTabs",value:function reorderTabs(e,t,n,i){var o=e.children.length,l="left"===n?i:i+1;if("right"==n&&l>=e.children.length)return;if("left"==n&&0==l)return;var a=Array.apply(null,{length:o}).map(Number.call,Number),h=a.splice(l,1)[0];a.splice("left"===n?i-1:i,0,h),e.children=s.orderByIndexes(e.children,a),e.container.tabHost.performTabsLayout(a),this.dockManager.notifyOnTabsReorder(e)}},{key:"_performDock",value:function _performDock(e,t,n,i){if(e.parent&&"fill"===e.parent.container.containerType&&(e=e.parent),"fill"===n&&"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 o,l,a;if(e===this.dockManager.context.model.rootNode)return i?(o=this._createDockContainer(n,t,e),l=new C(o),l.addChild(t),l.addChild(e)):(o=this._createDockContainer(n,e,t),l=new C(o),l.addChild(e),l.addChild(t)),this.dockManager.setRootNode(l),this.dockManager.rebuildLayout(this.dockManager.context.model.rootNode),l.container.setActiveChild(t.container),this.dockManager.invalidate(),void this.dockManager.notifyOnDock(t);if(e.parent.container.containerType!==n){a=e.parent;var _h=e.container.containerElement.clientWidth,_r2=e.container.containerElement.clientHeight,_d2=a.container.containerElement.clientWidth,_c2=a.container.containerElement.clientHeight;o=this._createDockContainer(n,t,e),l=new C(o),a.addChildAfter(e,l),e.detachFromParent(),s.removeNode(e.container.containerElement),i?(l.addChild(t),l.addChild(e)):(l.addChild(e),l.addChild(t)),a.performLayout(!1),l.performLayout(!0),l.container.setActiveChild(t.container),l.container.resize(_h,_r2),a.container.resize(_d2,_c2)}else a=e.parent,i?a.addChildBefore(e,t):a.addChildAfter(e,t),a.performLayout(!1),a.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,n){if("horizontal"===e)return new M(this.dockManager,[t.container,n.container]);if("vertical"===e)return new y(this.dockManager,[t.container,n.container]);if("fill"===e)return new _(this.dockManager);throw new Error("Failed to create dock container of type: "+e)}},{key:"getDockBounds",value:function getDockBounds(e,t,n,i){var o,s,l,a;if("fill"===n){var _t12=e.container.containerElement,_n8=this.dockManager.element.getBoundingClientRect(),_i6=_t12.getBoundingClientRect();return{x:_i6.left-_n8.left,y:_i6.top-_n8.top,width:_t12.clientWidth,height:_t12.clientHeight}}e.parent&&"fill"===e.parent.container.containerType&&(e=e.parent);var h=!1;e.parent&&e.parent.container.containerType===n?(o=e.parent,s=o.children.length,l=o.children.indexOf(e)+(i?0:1)):(o=e,s=1,l=i?0:1,h=!0);var r=0,d=0;if("vertical"===n||"horizontal"===n){var _e22=this._getVaringDimension(o.container,n)-5*(s-1),_a3=this._getVaringDimension(t,n),_c3=_e22/(_e22+_a3);if(r=_a3*_c3,h)d=i?0:_e22*_c3;else{for(var _e23=0;_e23<l;_e23++)d+=this._getVaringDimension(o.children[_e23].container,n);d*=_c3}}a={};var c=this.dockManager.element.getBoundingClientRect(),u=o.container.containerElement.getBoundingClientRect();return"vertical"===n?(a.x=u.left-c.left,a.y=u.top-c.top+d,a.width=o.container.width,a.height=r):"horizontal"===n&&(a.x=u.left-c.left+d,a.y=u.top-c.top,a.width=r,a.height=o.container.height),a}},{key:"_getVaringDimension",value:function _getVaringDimension(e,t){return"vertical"===t?e.height:"horizontal"===t?e.width:0}}])}();var P=function(){function P(e,t){_classCallCheck(this,P);_defineProperty(this,"wheel",void 0);_defineProperty(this,"id",void 0);_defineProperty(this,"element",void 0);_defineProperty(this,"hoverIconClass",void 0);_defineProperty(this,"mouseOverHandler",void 0);_defineProperty(this,"mouseOutHandler",void 0);_defineProperty(this,"active",void 0);this.wheel=e,this.id=t;var n=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-"+n),this.element.classList.add("dock-wheel-"+n+"-icon"),this.hoverIconClass="dock-wheel-"+n+"-icon-hover",this.mouseOverHandler=new l(this.element,"pointerover",this.onMouseMoved.bind(this)),this.mouseOutHandler=new l(this.element,"pointerout",this.onMouseOut.bind(this)),this.active=!1}return _createClass(P,[{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()}}])}();!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"}(D||(D={}));var L=function(){function L(e){_classCallCheck(this,L);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"elementMainWheel",void 0);_defineProperty(this,"elementSideWheel",void 0);_defineProperty(this,"wheelItems",void 0);_defineProperty(this,"elementPanelPreview",void 0);_defineProperty(this,"activeDialog",void 0);_defineProperty(this,"_activeNode",void 0);_defineProperty(this,"_visible",void 0);this.dockManager=e,this.elementMainWheel=document.createElement("div"),this.elementSideWheel=document.createElement("div"),this.wheelItems={};for(var _e24 in D)this.wheelItems[_e24]=new P(this,_e24),"-s"===_e24.substr(-2,2)?this.elementSideWheel.appendChild(this.wheelItems[_e24].element):this.elementMainWheel.appendChild(this.wheelItems[_e24].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}return _createClass(L,[{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 s.removeNode(this.elementMainWheel),void s.removeNode(this.elementSideWheel);var e=this.activeNode.container.containerElement,t=e.clientWidth,n=e.clientHeight,i=Math.floor(t/2),o=Math.floor(n/2),l=e.getBoundingClientRect(),a=this.dockManager.element.getBoundingClientRect();this.elementMainWheel.style.left=l.left-a.left+i+"px",this.elementMainWheel.style.top=l.top-a.top+o+"px";var h=this.dockManager.element.clientWidth,r=this.dockManager.element.clientHeight;s.removeNode(this.elementMainWheel),s.removeNode(this.elementSideWheel),this.dockManager.element.appendChild(this.elementMainWheel),this.dockManager.element.appendChild(this.elementSideWheel),this._setWheelButtonPosition(D["left-s"],20,-r/2),this._setWheelButtonPosition(D["right-s"],h-40,-r/2),this._setWheelButtonPosition(D["top-s"],h/2,20-r),this._setWheelButtonPosition(D["down-s"],h/2,-20)}},{key:"_setWheelButtonPosition",value:function _setWheelButtonPosition(e,t,n){var i=this.wheelItems[e],o=i.element.clientWidth/2,s=i.element.clientHeight/2,l=Math.floor(t-o),a=Math.floor(n-s);i.element.style.marginLeft=l+"px",i.element.style.marginTop=a+"px"}},{key:"hideWheel",value:function hideWheel(){this._visible=!1,this.activeNode=void 0,s.removeNode(this.elementMainWheel),s.removeNode(this.elementSideWheel),s.removeNode(this.elementPanelPreview);for(var _e25 in this.wheelItems)this.wheelItems[_e25].active=!1}},{key:"onMouseOver",value:function onMouseOver(e){if(!this.activeDialog)return;var t,n=this.dockManager.context.model.rootNode;e.id===D.top?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"vertical",!0):e.id===D.down?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"vertical",!1):e.id===D.left?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"horizontal",!0):e.id===D.right?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"horizontal",!1):e.id===D.fill?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"fill",!1):e.id===D["top-s"]?t=this.dockManager.layoutEngine.getDockBounds(n,this.activeDialog.panel,"vertical",!0):e.id===D["down-s"]?t=this.dockManager.layoutEngine.getDockBounds(n,this.activeDialog.panel,"vertical",!1):e.id===D["left-s"]?t=this.dockManager.layoutEngine.getDockBounds(n,this.activeDialog.panel,"horizontal",!0):e.id===D["right-s"]&&(t=this.dockManager.layoutEngine.getDockBounds(n,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(){s.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 _e26 in this.wheelItems){var _t13=this.wheelItems[_e26];if(_t13.active)return _t13}}},{key:"_handleDockRequest",value:function _handleDockRequest(e,t){e.active=!1,e.element.classList.remove(e.hoverIconClass),this.activeNode&&(e.id===D.left?this.dockManager.dockDialogLeft(this.activeNode,t):e.id===D.right?this.dockManager.dockDialogRight(this.activeNode,t):e.id===D.top?this.dockManager.dockDialogUp(this.activeNode,t):e.id===D.down?this.dockManager.dockDialogDown(this.activeNode,t):e.id===D.fill?this.dockManager.dockDialogFill(this.activeNode,t):e.id===D["left-s"]?this.dockManager.dockDialogLeft(this.dockManager.context.model.rootNode,t):e.id===D["right-s"]?this.dockManager.dockDialogRight(this.dockManager.context.model.rootNode,t):e.id===D["top-s"]?this.dockManager.dockDialogUp(this.dockManager.context.model.rootNode,t):e.id===D["down-s"]&&this.dockManager.dockDialogDown(this.dockManager.context.model.rootNode,t))}}])}();var B=_createClass(function B(){_classCallCheck(this,B);_defineProperty(this,"rootNode",void 0);_defineProperty(this,"documentManagerNode",void 0);_defineProperty(this,"dialogs",void 0);this.rootNode=this.documentManagerNode=void 0});var z=function(_E2){function z(e,t){var _this20;_classCallCheck(this,z);_this20=_callSuper(this,z,[e,t]),"panel"===_this20.container.containerType&&(_this20.panel=t,_this20.containerElement=_this20.panel.elementContentWrapper,s.removeNode(_this20.containerElement));return _this20}_inherits(z,_E2);return _createClass(z,[{key:"destroy",value:function destroy(){_superPropGet(z,"destroy",this,3)([]),this.panel.elementContentHost.appendChild(this.containerElement)}}])}(E);var N=function(_ref){function N(e){var _this21;_classCallCheck(this,N);_this21=_callSuper(this,N,[e,H.TOP]),_this21.minimumAllowedChildNodes=0,_this21.element.classList.add("document-manager"),_this21.tabHost.createTabPage=_this21._createDocumentTabPage,_this21.tabHost.displayCloseButton=!0;return _this21}_inherits(N,_ref);return _createClass(N,[{key:"_createDocumentTabPage",value:function _createDocumentTabPage(e,t){return new z(e,t)}},{key:"saveState",value:function saveState(e){_superPropGet(N,"saveState",this,3)([e]),e.documentManager=!0}},{key:"selectedTab",value:function selectedTab(){return this.tabHost.activeTab}}])}(_);var S=_createClass(function S(e){_classCallCheck(this,S);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"model",void 0);_defineProperty(this,"documentManagerView",void 0);this.dockManager=e,this.model=new B,this.documentManagerView=new N(this.dockManager)});var W=function(){function W(e){_classCallCheck(this,W);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"documentManagerNode",void 0);this.dockManager=e}return _createClass(W,[{key:"deserialize",value:function(){var _deserialize=_asyncToGenerator(_regeneratorRuntime().mark(function _callee4(e){var t,n;return _regeneratorRuntime().wrap(function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:t=JSON.parse(e),n=new B;_context4.next=3;return this._buildGraph(t.graphInfo);case 3:n.rootNode=_context4.sent;_context4.next=6;return this._buildDialogs(t.dialogsInfo);case 6:n.dialogs=_context4.sent;n.documentManagerNode=this.documentManagerNode;return _context4.abrupt("return",n);case 9:case"end":return _context4.stop()}},_callee4,this)}));function deserialize(_x5){return _deserialize.apply(this,arguments)}return deserialize}()},{key:"_buildGraph",value:function(){var _buildGraph2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee5(e){var t,n,_iterator12,_step12,_e27,_t14,i,o,_iterator13,_step13,_e28;return _regeneratorRuntime().wrap(function _callee5$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:t=e.children,n=[];_iterator12=_createForOfIteratorHelper(t);_context5.prev=2;_iterator12.s();case 4:if((_step12=_iterator12.n()).done){_context5.next=12;break}_e27=_step12.value;_context5.next=8;return this._buildGraph(_e27);case 8:_t14=_context5.sent;null!==_t14&&n.push(_t14);case 10:_context5.next=4;break;case 12:_context5.next=17;break;case 14:_context5.prev=14;_context5.t0=_context5["catch"](2);_iterator12.e(_context5.t0);case 17:_context5.prev=17;_iterator12.f();return _context5.finish(17);case 20:_context5.next=22;return this._createContainer(e,n);case 22:i=_context5.sent;if(!(null===i)){_context5.next=25;break}return _context5.abrupt("return",null);case 25:o=new C(i);i instanceof N&&(this.documentManagerNode=o),o.children=n;_iterator13=_createForOfIteratorHelper(o.children.reverse());try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){_e28=_step13.value;_e28.parent=o}}catch(err){_iterator13.e(err)}finally{_iterator13.f()}return _context5.abrupt("return",(o.children.reverse(),o));case 30:case"end":return _context5.stop()}},_callee5,this,[[2,14,17,20]])}));function _buildGraph(_x6){return _buildGraph2.apply(this,arguments)}return _buildGraph}()},{key:"_createContainer",value:function(){var _createContainer2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee6(e,t){var n,i,o,l,_iterator14,_step14,_e29;return _regeneratorRuntime().wrap(function _callee6$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:i=e.containerType,o=e.state,l=[];_iterator14=_createForOfIteratorHelper(t);try{for(_iterator14.s();!(_step14=_iterator14.n()).done;){_e29=_step14.value;l.push(_e29.container)}}catch(err){_iterator14.e(err)}finally{_iterator14.f()}if(!("panel"===i)){_context6.next=12;break}_context6.next=6;return d.loadFromState(o,this.dockManager);case 6:n=_context6.sent;if(n.prepareForDocking){_context6.next=9;break}return _context6.abrupt("return",null);case 9:n.prepareForDocking(),s.removeNode(n.elementPanel);_context6.next=23;break;case 12:if(!("horizontal"===i)){_context6.next=16;break}n=new M(this.dockManager,l);_context6.next=23;break;case 16:if(!("vertical"===i)){_context6.next=20;break}n=new y(this.dockManager,l);_context6.next=23;break;case 20:if(!("fill"!==i)){_context6.next=22;break}throw new Error("Cannot create dock container of unknown type: "+i);case 22:n=o.documentManager?new N(this.dockManager):new _(this.dockManager);case 23:return _context6.abrupt("return",(n.loadState(o),n));case 24:case"end":return _context6.stop()}},_callee6,this)}));function _createContainer(_x7,_x8){return _createContainer2.apply(this,arguments)}return _createContainer}()},{key:"_buildDialogs",value:function(){var _buildDialogs2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee7(e){var t,_iterator15,_step15,n,_e30,i,_o8,_i7;return _regeneratorRuntime().wrap(function _callee7$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:t=[];_iterator15=_createForOfIteratorHelper(e);_context7.prev=2;_iterator15.s();case 4:if((_step15=_iterator15.n()).done){_context7.next=19;break}n=_step15.value;_e30=void 0,i=n.containerType,_o8=n.state;_context7.t0="panel"===i;if(!_context7.t0){_context7.next=13;break}_context7.next=11;return d.loadFromState(_o8,this.dockManager);case 11:_e30=_context7.sent;_context7.t0=_e30.prepareForDocking;case 13:if(!_context7.t0){_context7.next=17;break}s.removeNode(_e30.elementPanel),_e30.isDialog=!0;_i7=new p(_e30,this.dockManager);(n.position.x>document.body.clientWidth||n.position.y>document.body.clientHeight-70)&&(n.position.x=20,n.position.y=70),_i7.setPosition(n.position.x,n.position.y),_i7.isHidden=n.isHidden,_i7.isHidden&&_i7.hide(),t.push(_i7);case 17:_context7.next=4;break;case 19:_context7.next=24;break;case 21:_context7.prev=21;_context7.t1=_context7["catch"](2);_iterator15.e(_context7.t1);case 24:_context7.prev=24;_iterator15.f();return _context7.finish(24);case 27:return _context7.abrupt("return",t);case 28:case"end":return _context7.stop()}},_callee7,this,[[2,21,24,27]])}));function _buildDialogs(_x9){return _buildDialogs2.apply(this,arguments)}return _buildDialogs}()}])}();var R=function(){function R(e,t){_classCallCheck(this,R);_defineProperty(this,"element",void 0);_defineProperty(this,"context",void 0);_defineProperty(this,"dockWheel",void 0);_defineProperty(this,"layoutEngine",void 0);_defineProperty(this,"mouseMoveHandler",void 0);_defineProperty(this,"touchMoveHandler",void 0);_defineProperty(this,"layoutEventListeners",void 0);_defineProperty(this,"closePanelContainerCallback",void 0);_defineProperty(this,"defaultDialogPosition",void 0);_defineProperty(this,"backgroundContext",void 0);_defineProperty(this,"zIndexCounter",void 0);_defineProperty(this,"zIndexTabHost",void 0);_defineProperty(this,"zIndexTabHandle",void 0);_defineProperty(this,"zIndexDialogCounter",void 0);_defineProperty(this,"onKeyPressBound",void 0);_defineProperty(this,"iframes",void 0);_defineProperty(this,"_undockEnabled",void 0);_defineProperty(this,"getElementCallback",void 0);_defineProperty(this,"_config",void 0);_defineProperty(this,"_activePanel",void 0);_defineProperty(this,"_lastPanelNotADialog",void 0);_defineProperty(this,"_activeDocument",void 0);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 o(0,0)}return _createClass(R,[{key:"config",get:function get(){return this._config}},{key:"initialize",value:function initialize(){this.backgroundContext=this.element.children[0],this.context=new S(this);var e=new C(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 L(this),this.layoutEngine=new T(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 _e31=this.activePanel;this.activePanel=null,_e31.close()}}},{key:"checkXBounds",value:function checkXBounds(e,t,n,i,o){if(this._config.moveOnlyWithinDockConatiner)return this.checkXBoundsWithinDockContainer(e,t,n,i,o);var s=this.element.getBoundingClientRect(),l=Math.floor(t.x-n.x),a=e.offsetLeft+e.offsetWidth+l+s.left<40,h=e.offsetLeft+l+s.left>window.innerWidth-40;if(a){n.x=t.x,l=0;var _i8=40-(e.offsetWidth+e.offsetLeft+s.left);_i8>0&&(l=_i8)}else if(h){n.x=t.x,l=0;var _i9=window.innerWidth-40-e.offsetLeft-s.left;_i9>0&&(l=_i9)}return l}},{key:"checkXBoundsWithinDockContainer",value:function checkXBoundsWithinDockContainer(e,t,n,i,o){var s=t.x-n.x,l=this.element.getBoundingClientRect(),a=e.getBoundingClientRect(),h=s<0&&a.left+s<l.left&&!o,r=s>0&&a.right+s>l.right&&!i;return h?(t.x-=s,s=l.left-a.left,t.x-=s):r&&(t.x-=s,s=l.right-a.right,t.x-=s),s}},{key:"checkYBounds",value:function checkYBounds(e,t,n,i,o){if(this._config.moveOnlyWithinDockConatiner)return this.checkYBoundsWithinDockContainer(e,t,n,i,o);var s=this.element.getBoundingClientRect(),l=Math.floor(t.y-n.y),a=e.offsetTop+l<0,h=e.offsetTop+l+s.top>window.innerHeight-16;if(a)n.y=t.y,l=0;else if(h){n.y=t.y,l=0;var _i10=window.innerHeight-16-e.offsetTop-s.top;_i10>0&&(l=_i10)}return l}},{key:"checkYBoundsWithinDockContainer",value:function checkYBoundsWithinDockContainer(e,t,n,i,o){var s=t.y-n.y,l=this.element.getBoundingClientRect(),a=e.getBoundingClientRect(),h=s<0&&a.top+s<l.top&&!o,r=s>0&&a.bottom+s>l.bottom&&!i;return h?(t.y-=s,s=l.top-a.top,t.y-=s):r&&(t.y-=s,s=l.bottom-a.bottom,t.y-=s),s}},{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 n=0,i=0;var _iterator16=_createForOfIteratorHelper(this.context.model.dialogs),_step16;try{for(_iterator16.s();!(_step16=_iterator16.n()).done;){var _e32=_step16.value;(_e32.position.x>this.element.clientWidth||_e32.position.y>this.element.clientHeight)&&((n>this.element.clientWidth||i>this.element.clientHeight)&&(n=0,i=0),_e32.setPosition(100+n,100+i),n+=100,i+=100)}}catch(err){_iterator16.e(err)}finally{_iterator16.f()}}},{key:"setModel",value:function setModel(e){s.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 l(window,"mousemove",this._onMouseMoved.bind(this)),this.touchMoveHandler=new l(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 n,i=[];for(i.push(this.context.model.rootNode);i.length>0;){var _o9=i.pop();s.isPointInsideNode(e,t,_o9)&&(n=_o9,[].push.apply(i,_o9.children))}return n}},{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,n){return this._requestDockContainer(e,t,this.layoutEngine.dockLeft.bind(this.layoutEngine),!1,n)}},{key:"dockRight",value:function dockRight(e,t,n){return this._requestDockContainer(e,t,this.layoutEngine.dockRight.bind(this.layoutEngine),!0,n)}},{key:"dockUp",value:function dockUp(e,t,n){return this._requestDockContainer(e,t,this.layoutEngine.dockUp.bind(this.layoutEngine),!1,n)}},{key:"dockDown",value:function dockDown(e,t,n){return this._requestDockContainer(e,t,this.layoutEngine.dockDown.bind(this.layoutEngine),!0,n)}},{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,n,i,o){var l;if(this.context.model.dialogs.forEach(function(i){e==i.panel&&(i.show(),i.setPosition(t,n),l=i)}),l)return l;try{var _t15=this._findNodeFromContainer(e);this.layoutEngine.undock(_t15)}catch(e){}var a=e;s.removeNode(a.elementPanel),a.isDialog=!0;var h=new p(a,this,i,o);return h.setPosition(t,n),h}},{key:"_requestDockDialog",value:function _requestDockDialog(e,t,n){var i=t.panel,o=new C(i);return i.prepareForDocking(),i.elementContentContainer.style.zIndex="",t.destroy(),n(e,o),o}},{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,n,i,o){var l=new C(t);if("panel"===t.containerType){var _e33=t;_e33.prepareForDocking(),s.removeNode(_e33.elementPanel)}var a,h=null;if(e.parent&&e.parent.container&&(a=e.parent.container,a.getRatios&&(h=a.getRatios())),n(e,l),o&&l.parent&&("vertical"===l.parent.container.containerType||"horizontal"===l.parent.container.containerType)){var _e34=l.parent.container;if(h&&a==_e34){if(i){for(var _e35=0;_e35<h.length;_e35++)h[_e35]=h[_e35]-h[_e35]*o;h.push(o)}else h[0]=h[0]-o,h.unshift(o);_e34.setRatios(h)}else _e34.setContainerRatio(t,o)}return this.rebuildLayout(this.context.model.rootNode),this.invalidate(),this._checkShowBackgroundContext(),l}},{key:"_requestTabReorder",value:function _requestTabReorder(e,t){var n=this._findNodeFromContainer(e);this.layoutEngine.reorderTabs(n,t.handle,t.state,t.index)}},{key:"requestUndockToDialog",value:function requestUndockToDialog(e,t,n){var i=this._findNodeFromContainer(e);this.layoutEngine.undock(i);var o=i.container;o.elementPanel.style.display="block";var s=new p(o,this,null);if(o.lastDialogSize&&s.resize(o.lastDialogSize.width,o.lastDialogSize.height),void 0!==t){var _e36=s.elementDialog.clientWidth;n.x>_e36&&(n.x=.75*_e36),s.setPosition(t.clientX-n.x,t.clientY-n.y),s.draggable.onMouseDown(t)}return s}},{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 _e37=this._activeDocument;this._activeDocument=null,this.notifyOnActiveDocumentChange(null,_e37)}}},{key:"openInDialog",value:function openInDialog(e,t,n,i){var o=new p(e,this,null,i);if(null!=t){var _e38=o.elementDialog.clientWidth;n.x>_e38&&(n.x=.75*_e38),o.setPosition(t.clientX-n.x,t.clientY-n.y),o.draggable.onMouseDown(t)}return o}},{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),n=t.parent;return t.detachFromParent(),n&&this.rebuildLayout(n),t}},{key:"getNodeByElementId",value:function getNodeByElementId(e){var t=[];for(t.push(this.context.model.rootNode);t.length>0;){var n=t.pop();if(n.container instanceof d){var _n$container$elementC;if(n.container.elementContent.id===e)return n;if(n.container.elementContent instanceof HTMLSlotElement&&((_n$container$elementC=n.container.elementContent.assignedElements())===null||_n$container$elementC===void 0||(_n$container$elementC=_n$container$elementC[0])===null||_n$container$elementC===void 0?void 0:_n$container$elementC.id)===e)return n}[].push.apply(t,n.children)}return null}},{key:"getNodeByElement",value:function getNodeByElement(e){var t=[];for(t.push(this.context.model.rootNode);t.length>0;){var n=t.pop();if(n.container instanceof d){var _n$container$elementC2;if(n.container.elementContent===e)return n;if(n.container.elementContent instanceof HTMLSlotElement&&((_n$container$elementC2=n.container.elementContent.assignedElements())===null||_n$container$elementC2===void 0?void 0:_n$container$elementC2[0])===e)return n}[].push.apply(t,n.children)}return null}},{key:"_findNodeFromContainer",value:function _findNodeFromContainer(e){var t=[];for(t.push(this.context.model.rootNode);t.length>0;){var n=t.pop();if(n.container===e)return n;[].push.apply(t,n.children)}return null}},{key:"findNodeFromContainerElement",value:function findNodeFromContainerElement(e){var t=[];for(t.push(this.context.model.rootNode);t.length>0;){var n=t.pop();if(n.container.containerElement===e)return n;[].push.apply(t,n.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),e.container.resize(e.container.width,e.container.height))})}},{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 _e39=this._activeDocument;this._activeDocument=null,this.notifyOnActiveDocumentChange(null,_e39)}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,n){var _this33=this;this.layoutEventListeners.forEach(function(i){i.onChangeDialogPosition&&i.onChangeDialogPosition(_this33,e,t,n)})}},{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(n){n.onActivePanelChange&&n.onActivePanelChange(_this36,e,t)})}},{key:"notifyOnActiveDocumentChange",value:function(){var _notifyOnActiveDocumentChange=_asyncToGenerator(_regeneratorRuntime().mark(function _callee8(e,t){var _iterator17,_step17,n;return _regeneratorRuntime().wrap(function _callee8$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_iterator17=_createForOfIteratorHelper(this.layoutEventListeners);_context8.prev=1;_iterator17.s();case 3:if((_step17=_iterator17.n()).done){_context8.next=11;break}n=_step17.value;_context8.t0=n.onActiveDocumentChange;if(!_context8.t0){_context8.next=9;break}_context8.next=9;return n.onActiveDocumentChange(this,e,t);case 9:_context8.next=3;break;case 11:_context8.next=16;break;case 13:_context8.prev=13;_context8.t1=_context8["catch"](1);_iterator17.e(_context8.t1);case 16:_context8.prev=16;_iterator17.f();return _context8.finish(16);case 19:case"end":return _context8.stop()}},_callee8,this,[[1,13,16,19]])}));function notifyOnActiveDocumentChange(_x10,_x11){return _notifyOnActiveDocumentChange.apply(this,arguments)}return notifyOnActiveDocumentChange}()},{key:"saveState",value:function saveState(){return(new v).serialize(this.context.model)}},{key:"loadState",value:function(){var _loadState=_asyncToGenerator(_regeneratorRuntime().mark(function _callee9(e){var t;return _regeneratorRuntime().wrap(function _callee9$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:t=new W(this);_context9.next=3;return t.deserialize(e);case 3:this.context.model=_context9.sent;this.setModel(this.context.model);case 5:case"end":return _context9.stop()}},_callee9,this)}));function loadState(_x12){return _loadState.apply(this,arguments)}return loadState}()},{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){s.arrayContains(e,t.elementContent.id)||t.close()}),this.context.model.dialogs.forEach(function(t){s.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 _this37=this;e.children.forEach(function(e){_this37._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 n=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 i=this._activeDocument;e&&e.panelType==t.document&&(this._activeDocument=e),!e&&n&&n.isDialog&&null==e&&this._lastPanelNotADialog&&this.activePanel!=this._lastPanelNotADialog&&(e=this._lastPanelNotADialog,this._lastPanelNotADialog=void 0),this.notifyOnActivePanelChange(e,n),i!=this._activeDocument&&this.notifyOnActiveDocumentChange(this._activeDocument,i),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)}}])}();DockSpawnTS=i})();
1
+ "use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t)}:p}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},_get.apply(null,arguments)}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t)})})}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a)},function(t){invoke("throw",t,i,a)}):e.resolve(h).then(function(t){u.value=t,i(u)},function(t){return invoke("throw",t,i,a)})}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r)})}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next};return i.next=i}}throw new TypeError(_typeof(e)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this}),define(g,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next}return next.done=!0,next}},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)})}}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n9=0,F=function F(){};return{s:F,n:function n(){return _n9>=r.length?{done:!0}:{done:!1,value:r[_n9++]}},e:function e(r){throw r},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 o,a=!0,u=!1;return{s:function s(){t=t.call(r)},n:function n(){var r=t.next();return a=r.done,r},e:function e(r){u=!0,o=r},f:function f(){try{a||null==t["return"]||t["return"]()}finally{if(u)throw o}}}}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r)}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var DockSpawnTS;(function(){"use strict";var e,t,n={d:function d(e,t){for(var i in t)n.o(t,i)&&!n.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})}},i={};n.r(i),n.d(i,{ContainerType:function ContainerType(){return e},Dialog:function Dialog(){return p},DockConfig:function DockConfig(){return g},DockGraphSerializer:function DockGraphSerializer(){return v},DockLayoutEngine:function DockLayoutEngine(){return T},DockManager:function DockManager(){return R},DockManagerContext:function DockManagerContext(){return S},DockModel:function DockModel(){return B},DockNode:function DockNode(){return C},DockWheel:function DockWheel(){return L},DockWheelItem:function DockWheelItem(){return P},DocumentManagerContainer:function DocumentManagerContainer(){return N},DocumentTabPage:function DocumentTabPage(){return z},DraggableContainer:function DraggableContainer(){return c},EventHandler:function EventHandler(){return l},FillDockContainer:function FillDockContainer(){return _},HorizontalDockContainer:function HorizontalDockContainer(){return M},Localizer:function Localizer(){return r},PanelContainer:function PanelContainer(){return d},Point:function Point(){return o},ResizableContainer:function ResizableContainer(){return m},ResizeHandle:function ResizeHandle(){return u},SplitterBar:function SplitterBar(){return f},SplitterDockContainer:function SplitterDockContainer(){return k},SplitterPanel:function SplitterPanel(){return w},TabHandle:function TabHandle(){return b},TabHost:function TabHost(){return x},TabPage:function TabPage(){return E},UndockInitiator:function UndockInitiator(){return a},Utils:function Utils(){return s},VerticalDockContainer:function VerticalDockContainer(){return y}}),function(e){e.horizontal="horizontal",e.vertical="vertical",e.fill="fill",e.panel="panel"}(e||(e={}));var o=_createClass(function o(e,t){_classCallCheck(this,o);_defineProperty(this,"x",void 0);_defineProperty(this,"y",void 0);this.x=e,this.y=t});var s=function(){function s(){_classCallCheck(this,s)}return _createClass(s,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,n){var i=n.container.containerElement.getBoundingClientRect();return e>=i.left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height}},{key:"getNextId",value:function getNextId(e){return e+s._counter++}},{key:"removeNode",value:function removeNode(e){return null!==e.parentNode&&(e.parentNode.removeChild(e),!0)}},{key:"orderByIndexes",value:function orderByIndexes(e,t){var n=[];for(var _i=0;_i<t.length;_i++)n.push(e[t[_i]]);return n}},{key:"arrayRemove",value:function arrayRemove(e,t){var n=e.indexOf(t);return-1!==n&&e.splice(n,1)}},{key:"arrayContains",value:function arrayContains(e,t){var n=e.length;for(;n--;)if(e[n]===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 _n=0;_n<e.length;++_n)if(e[_n]!==t[_n])return!1;return!0}}])}();_defineProperty(s,"_counter",0);var l=function(){function l(e,t,n,i){_classCallCheck(this,l);_defineProperty(this,"target",void 0);_defineProperty(this,"eventName",void 0);_defineProperty(this,"source",void 0);this.target=n,this.eventName=t,this.source=e,this.source.addEventListener(t,this.target,i)}return _createClass(l,[{key:"cancel",value:function cancel(){this.source.removeEventListener(this.eventName,this.target)}}])}();var a=function(){function a(e,t,n){_classCallCheck(this,a);_defineProperty(this,"mouseUpHandler",void 0);_defineProperty(this,"touchUpHandler",void 0);_defineProperty(this,"mouseMoveHandler",void 0);_defineProperty(this,"touchMoveHandler",void 0);_defineProperty(this,"dragStartPosition",void 0);_defineProperty(this,"thresholdPixels",void 0);_defineProperty(this,"_enabled",void 0);_defineProperty(this,"mouseDownHandler",void 0);_defineProperty(this,"touchDownHandler",void 0);_defineProperty(this,"element",void 0);_defineProperty(this,"_undockededCallback",void 0);_defineProperty(this,"touchDownUndockedHandler",void 0);n||(n=7),this.element=e,this._undockededCallback=t,this.thresholdPixels=n,this._enabled=!1}return _createClass(a,[{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 l(this.element,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new l(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 l(window,"mouseup",this.onMouseUp.bind(this)),this.touchUpHandler=new l(window,"touchend",this.onMouseUp.bind(this)),this.mouseMoveHandler=new l(window,"mousemove",this.onMouseMove.bind(this)),this.touchMoveHandler=new l(window,"touchmove",this.onMouseMove.bind(this)),this.dragStartPosition=new o(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]}if(0==e.buttons)return void this.onMouseUp();var t=new o(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,n=0,i=this.element;do{t+=i.offsetTop||0,n+=i.offsetLeft||0,i=i.offsetParent}while(i);var s=this.dragStartPosition.x-n,l=this.dragStartPosition.y-t,_a2=new o(s,l);this._undockededCallback(e,_a2)}}])}();!function(e){e.document="document",e.panel="panel"}(t||(t={}));var h={CloseDialog:"Close dialog",CloseAll:"Close all documents",CloseAllButThis:"Close all documents but this",DefaultPanelName:"Panel",NewBrowserWindow:"Open in new window"};var r=function(){function r(){_classCallCheck(this,r)}return _createClass(r,null,[{key:"configure",value:function configure(e){r._getTemplateString=e}},{key:"getString",value:function getString(e){var _r$_getTemplateString,_r$_getTemplateString2;for(var _len=arguments.length,t=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){t[_key-1]=arguments[_key]}return function(e){for(var _len2=arguments.length,t=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){t[_key2-1]=arguments[_key2]}return e.replace(/{(\d+)}/g,function(e,n){var i=Number.parseInt(n);return t[i].toString()})}.apply(void 0,[(_r$_getTemplateString=(_r$_getTemplateString2=r._getTemplateString)===null||_r$_getTemplateString2===void 0?void 0:_r$_getTemplateString2.call(r,e))!==null&&_r$_getTemplateString!==void 0?_r$_getTemplateString:h[e]].concat(t))}}])}();_defineProperty(r,"_getTemplateString",void 0);var d=function(){function d(n,i,o,s,l){var _this=this;_classCallCheck(this,d);_defineProperty(this,"closePanelContainerCallback",void 0);_defineProperty(this,"onTitleChanged",void 0);_defineProperty(this,"elementPanel",void 0);_defineProperty(this,"elementTitle",void 0);_defineProperty(this,"elementTitleText",void 0);_defineProperty(this,"elementContentHost",void 0);_defineProperty(this,"name",void 0);_defineProperty(this,"state",void 0);_defineProperty(this,"elementContent",void 0);_defineProperty(this,"_resolvedElementContent",void 0);_defineProperty(this,"elementContentContainer",void 0);_defineProperty(this,"elementContentWrapper",void 0);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"title",void 0);_defineProperty(this,"containerType",void 0);_defineProperty(this,"icon",void 0);_defineProperty(this,"hasChanges",void 0);_defineProperty(this,"minimumAllowedChildNodes",void 0);_defineProperty(this,"isDialog",void 0);_defineProperty(this,"eventListeners",void 0);_defineProperty(this,"undockInitiator",void 0);_defineProperty(this,"elementButtonClose",void 0);_defineProperty(this,"closeButtonClickedHandler",void 0);_defineProperty(this,"closeButtonTouchedHandler",void 0);_defineProperty(this,"mouseDownHandler",void 0);_defineProperty(this,"touchDownHandler",void 0);_defineProperty(this,"panelType",void 0);_defineProperty(this,"tabPage",void 0);_defineProperty(this,"undockedToNewBrowserWindow",!1);_defineProperty(this,"contextMenuHandler",void 0);_defineProperty(this,"lastDialogSize",void 0);_defineProperty(this,"_floatingDialog",void 0);_defineProperty(this,"_canUndock",void 0);_defineProperty(this,"_cachedWidth",void 0);_defineProperty(this,"_cachedHeight",void 0);_defineProperty(this,"_hideCloseButton",void 0);_defineProperty(this,"_grayOut",void 0);_defineProperty(this,"_ctxMenu",void 0);o||(o=r.getString("DefaultPanelName")),s||(s=t.panel),this.panelType=s,n._dockSpawnPanelContainer=this,this.elementContent=n,n.style.position="absolute",n.style.width="100%",n.style.height="100%",n.style.top="0",n.style.bottom="0",this.elementContentContainer=document.createElement("div"),this.elementContentContainer.className="panel-element-content-container",this.elementContentContainer.style.position="absolute",this.elementContentContainer._panel=this,this.elementContentContainer.addEventListener("pointerdown",function(e){try{_this.isDialog?_this._floatingDialog.bringToFront():_this.tabPage&&_this.tabPage.setSelected(!0,!0),_this.dockManager.activePanel=_this}catch(_unused){}},{passive:!0}),this.elementContentContainer.appendChild(n),i.config.dialogRootElement.appendChild(this.elementContentContainer),this.dockManager=i,this.title=o,this.containerType=e.panel,this.icon=null,this.minimumAllowedChildNodes=0,this._floatingDialog=void 0,this.isDialog=!1,this._canUndock=i._undockEnabled,this.eventListeners=[],this._hideCloseButton=l,this.windowsContextMenuClose=this.windowsContextMenuClose.bind(this),this._initialize()}return _createClass(d,[{key:"_initialize",value:function _initialize(){var _this$elementContent$;this.name=s.getNextId("panel_"),this.elementPanel=document.createElement("div"),this.elementPanel.tabIndex=0,this.elementTitle=document.createElement("div"),this.contextMenuHandler=new l(this.elementTitle,"contextmenu",this.oncontextMenuClicked.bind(this)),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.elementContentContainer.clientWidth,t=this.elementContentContainer.clientHeight,n=this.elementTitle.clientHeight;this.elementContentWrapper=document.createElement("div"),this.elementContentWrapper.classList.add("panel-content-wrapper"),this._setPanelDimensions(e,t+n),this._hideCloseButton||(this.closeButtonClickedHandler=new l(this.elementButtonClose,"mousedown",this.onCloseButtonClicked.bind(this)),this.closeButtonTouchedHandler=new l(this.elementButtonClose,"touchstart",this.onCloseButtonClicked.bind(this))),s.removeNode(this.elementContentWrapper),this.elementContentHost.appendChild(this.elementContentWrapper);var i=this.elementContent.dataset.panelCaption,o=this.elementContent.dataset.panelIcon;i&&(this.title=i),o&&(this.icon=o),this._updateTitle(),this.undockInitiator=new a(this.elementTitle,this.performUndockToDialog.bind(this)),delete this.floatingDialog,this.mouseDownHandler=new l(this.elementPanel,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new l(this.elementPanel,"touchstart",this.onMouseDown.bind(this),{passive:!0}),this._resolvedElementContent=this.elementContent,this.elementContent instanceof HTMLSlotElement&&(this._resolvedElementContent=(_this$elementContent$=this.elementContent.assignedElements())===null||_this$elementContent$===void 0?void 0:_this$elementContent$[0])}},{key:"oncontextMenuClicked",value:function oncontextMenuClicked(e){if(e.preventDefault(),!this._ctxMenu&&d.createContextMenuContentCallback){var _this$_ctxMenu;var _t=d.createContextMenuContentCallback(this);if(0==_t.length)return;this._ctxMenu=document.createElement("div"),this._ctxMenu.className="dockspab-tab-handle-context-menu",(_this$_ctxMenu=this._ctxMenu).append.apply(_this$_ctxMenu,_toConsumableArray(_t)),this._ctxMenu.style.left=e.pageX+"px",this._ctxMenu.style.top=e.pageY+"px",document.body.appendChild(this._ctxMenu),window.addEventListener("mouseup",this.windowsContextMenuClose)}else this.closeContextMenu()}},{key:"closeContextMenu",value:function closeContextMenu(){this._ctxMenu&&(document.body.removeChild(this._ctxMenu),delete this._ctxMenu,window.removeEventListener("mouseup",this.windowsContextMenuClose))}},{key:"windowsContextMenuClose",value:function windowsContextMenuClose(e){var t=e.composedPath();for(var _e in t)if(t[_e]==this._ctxMenu)return;this.closeContextMenu()}},{key:"canUndock",value:function canUndock(e){var _this2=this;this._canUndock=e,this.undockInitiator.enabled=e,this.eventListeners.forEach(function(t){t.onDockEnabled&&t.onDockEnabled({self:_this2,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 _this3=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:_this3,state:_this3._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:_this3,state:!0})}))}},{key:"onMouseDown",value:function onMouseDown(){this.dockManager.activePanel=this}},{key:"hideCloseButton",value:function hideCloseButton(e){var _this4=this;this._hideCloseButton=e,this.elementButtonClose.style.display=e?"none":"block",this.eventListeners.forEach(function(t){t.onHideCloseButton&&t.onHideCloseButton({self:_this4,state:e})})}},{key:"destroy",value:function destroy(){this.mouseDownHandler&&(this.mouseDownHandler.cancel(),delete this.mouseDownHandler),this.touchDownHandler&&(this.touchDownHandler.cancel(),delete this.touchDownHandler),this.contextMenuHandler&&this.contextMenuHandler.cancel(),s.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.elementContentContainer.style.display="none",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,this.elementContentContainer.parentElement!=this.dockManager.config.dialogRootElement&&this.dockManager.config.dialogRootElement.appendChild(this.elementContentContainer)}},{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:"resolvedElementContent",get:function get(){var _this$elementContent$2;return this._resolvedElementContent||(this._resolvedElementContent=this.elementContent,this.elementContent instanceof HTMLSlotElement&&(this._resolvedElementContent=(_this$elementContent$2=this.elementContent.assignedElements())===null||_this$elementContent$2===void 0?void 0:_this$elementContent$2[0])),this._resolvedElementContent}},{key:"panelDocked",value:function panelDocked(){this.elementContent.hidden&&(this.elementContent.hidden=!1),this.elementContentContainer.parentElement!==this.dockManager.config.dialogRootElement&&this.dockManager.config.dialogRootElement.appendChild(this.elementContentContainer)}},{key:"resize",value:function resize(e,t){this.panelDocked(),this.setVisible(!0),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){var _this5=this;this.elementTitle.style.width=e+"px",this.elementContentHost.style.width=e+"px",this.elementContentContainer.style.width=e+"px",this.elementPanel.style.width=e+"px";var n=t-this.elementTitle.clientHeight;this.elementContentHost.style.height=n+"px",this.elementContentContainer.style.height=n+"px",this.elementPanel.style.height=t+"px",requestAnimationFrame(function(){var e=_this5.elementContentWrapper.getBoundingClientRect(),t=_this5.dockManager.config.dialogRootElement.getBoundingClientRect();_this5.elementContentContainer.style.left=e.x-t.x+"px",_this5.elementContentContainer.style.top=e.y-t.y+"px",_this5.elementContentContainer.style.width=e.width+"px",_this5.elementContentContainer.style.height=e.height+"px"})}},{key:"setDialogPosition",value:function setDialogPosition(e,t){this.elementContentContainer.style.left=e+"px",this.elementContentContainer.style.top=t+this.elementTitle.clientHeight+"px"}},{key:"setVisible",value:function setVisible(e){this.elementContentContainer.style.display=e?"block":"none"}},{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:"undockToBrowserDialog",value:function undockToBrowserDialog(){var _this6=this;!function(e,t){var n=e.getBoundingClientRect(),i=n.x+24,o=n.y+60,s=n.width,l=n.height,a=window.open("about:blank",void 0,"popup=yes,left=".concat(i,",top=").concat(o,",width=").concat(s,",height=").concat(l));a.onfocus=function(e){return t.focused(e)},a.onblur=function(e){return t.blured(e)};var h=_toConsumableArray(document.head.querySelectorAll("link")).map(function(e){return e.cloneNode()});var _iterator=_createForOfIteratorHelper(h),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _e2=_step.value;a.document.head.appendChild(a.document.adoptNode(_e2))}}catch(err){_iterator.e(err)}finally{_iterator.f()}var r=a.document.createElement("style");r.innerText="\n html {\n overflow: hidden;\n position: fixed;\n width: 100%;\n height: 100%;\n }\n body {\n height: 100%;\n width: 100%;\n margin: 0;\n }\n ",a.document.head.appendChild(r);var d=a.document.createElement("title");d.innerText=t.title,a.document.head.appendChild(d),a.onunload=function(){return t.newWindowClosedCallback()};var c=new Map,u=new Map;function m(e){if(e.shadowRoot){e.shadowRoot.adoptedStyleSheets.length>0&&u.set(e,_toConsumableArray(e.shadowRoot.adoptedStyleSheets.map(function(e){return function(e,t,n){var i=n.get(t);if(i)return i;var o="";var s=t.cssRules;for(var l=0;l<s.length;l++)o+=s[l].cssText+"\n";var a=new e.CSSStyleSheet;return n.set(t,a),a.replaceSync(o),a}(a,e,c)})));var _iterator2=_createForOfIteratorHelper(e.shadowRoot.querySelectorAll("*")),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var _t2=_step2.value;m(_t2)}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}}}m(e);var _iterator3=_createForOfIteratorHelper(e.querySelectorAll("*")),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var _t3=_step3.value;m(_t3)}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}a.document.body.appendChild(a.document.adoptNode(e));var _iterator4=_createForOfIteratorHelper(u),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var _e3=_step4.value;_e3[0].shadowRoot.adoptedStyleSheets=_e3[1]}}catch(err){_iterator4.e(err)}finally{_iterator4.f()}t.closeCallback()}(this.resolvedElementContent,{title:this.elementTitleText.textContent,closeCallback:function closeCallback(){_this6.undockedToNewBrowserWindow=!0,_this6.closeInternal(!1)},newWindowClosedCallback:function newWindowClosedCallback(){_this6.undockedToNewBrowserWindow=!1,_this6.dockManager.notifyOnClosePanel(_this6)},focused:function focused(e){_this6.dockManager.activePanel=_this6},blured:function blured(e){_this6.dockManager.activePanel=null}})}},{key:"close",value:function(){var _close=_asyncToGenerator(_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:this.closeInternal(!0);case 1:case"end":return _context.stop()}},_callee,this)}));function close(){return _close.apply(this,arguments)}return close}()},{key:"closeInternal",value:function(){var _closeInternal=_asyncToGenerator(_regeneratorRuntime().mark(function _callee2(e){var t;return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:t=!0;_context2.t0=this.elementContentContainer.parentElement===this.dockManager.config.dialogRootElement;if(!_context2.t0){_context2.next=19;break}if(!e){_context2.next=17;break}if(!this.closePanelContainerCallback){_context2.next=10;break}_context2.next=7;return this.closePanelContainerCallback(this);case 7:t=_context2.sent;_context2.next=15;break;case 10:_context2.t1=this.dockManager.closePanelContainerCallback;if(!_context2.t1){_context2.next=15;break}_context2.next=14;return this.dockManager.closePanelContainerCallback(this);case 14:t=_context2.sent;case 15:_context2.next=18;break;case 17:t=!0;case 18:_context2.t0=t;case 19:if(!_context2.t0){_context2.next=21;break}if(this.dockManager.config.dialogRootElement.removeChild(this.elementContentContainer),this.isDialog)this.floatingDialog&&this.floatingDialog.close();else{try{this.dockManager.notifyOnClosePanel(this)}catch(e){console.error(e)}this.performClose()}case 21:case"end":return _context2.stop()}},_callee2,this)}));function closeInternal(_x){return _closeInternal.apply(this,arguments)}return closeInternal}()}],[{key:"loadFromState",value:function(){var _loadFromState=_asyncToGenerator(_regeneratorRuntime().mark(function _callee3(e,t){var n,i,_o2,_t4,o;return _regeneratorRuntime().wrap(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:if(!t.getElementCallback){_context3.next=7;break}_context3.next=3;return t.getElementCallback(e);case 3:_o2=_context3.sent;n=_o2.element,i=_o2.title;_context3.next=9;break;case 7:_t4=e.element;n=document.getElementById(_t4);case 9:if(!(null===n)){_context3.next=11;break}return _context3.abrupt("return",null);case 11:o=new d(n,t,i);return _context3.abrupt("return",(o.loadState(e),o));case 13:case"end":return _context3.stop()}},_callee3)}));function loadFromState(_x2,_x3){return _loadFromState.apply(this,arguments)}return loadFromState}()}])}();_defineProperty(d,"createContextMenuContentCallback",function(e){var t=[];if(e.dockManager.config.enableBrowserWindows){var n=document.createElement("div");n.innerText=r.getString("NewBrowserWindow"),t.push(n),n.onclick=function(){e.undockToBrowserDialog(),e.closeContextMenu()}}return t});var c=function(){function c(e,t,n,i){_classCallCheck(this,c);_defineProperty(this,"dialog",void 0);_defineProperty(this,"delegate",void 0);_defineProperty(this,"containerElement",void 0);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"topLevelElement",void 0);_defineProperty(this,"containerType",void 0);_defineProperty(this,"mouseDownHandler",void 0);_defineProperty(this,"touchDownHandler",void 0);_defineProperty(this,"minimumAllowedChildNodes",void 0);_defineProperty(this,"previousMousePosition",void 0);_defineProperty(this,"mouseMoveHandler",void 0);_defineProperty(this,"mouseUpHandler",void 0);_defineProperty(this,"iframeEventHandlers",void 0);this.dialog=e,this.delegate=t,this.containerElement=t.containerElement,this.dockManager=t.dockManager,this.topLevelElement=n,this.containerType=t.containerType,this.mouseDownHandler=new l(i,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new l(i,"touchstart",this.onMouseDown.bind(this)),this.topLevelElement.style.left=n.offsetLeft+"px",this.topLevelElement.style.top=n.offsetTop+"px",this.minimumAllowedChildNodes=t.minimumAllowedChildNodes,this.iframeEventHandlers=[]}return _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 _this7=this;if(2!=e.button&&(e.preventDefault&&e.preventDefault(),this._startDragging(e),this.previousMousePosition={x:e.clientX,y:e.clientY},this.mouseMoveHandler&&(this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler),this.mouseUpHandler&&(this.mouseUpHandler.cancel(),delete this.mouseUpHandler),this.mouseMoveHandler=new l(window,"pointermove",this.onMouseMove.bind(this)),this.mouseUpHandler=new l(window,"pointerup",this.onMouseUp.bind(this)),this.dockManager.iframes)){var _iterator5=_createForOfIteratorHelper(this.dockManager.iframes),_step5;try{var _loop=function _loop(){var e=_step5.value;var t=_this7.onMouseMovedIframe.bind(_this7);_this7.iframeEventHandlers.push(new l(e.contentWindow,"pointermove",function(n){return t(n,e)})),_this7.iframeEventHandlers.push(new l(e.contentWindow,"pointerup",_this7.onMouseUp.bind(_this7)))};for(_iterator5.s();!(_step5=_iterator5.n()).done;){_loop()}}catch(err){_iterator5.e(err)}finally{_iterator5.f()}}}},{key:"onMouseUp",value:function onMouseUp(e){this._stopDragging(e),this.mouseMoveHandler.cancel(),delete this.mouseMoveHandler,this.mouseUpHandler.cancel(),delete this.mouseUpHandler;var _iterator6=_createForOfIteratorHelper(this.iframeEventHandlers),_step6;try{for(_iterator6.s();!(_step6=_iterator6.n()).done;){var _e4=_step6.value;_e4.cancel()}}catch(err){_iterator6.e(err)}finally{_iterator6.f()}this.iframeEventHandlers=[]}},{key:"_startDragging",value:function _startDragging(e){this.containerElement.classList.add("draggable-dragging-active"),this.delegate.elementContentContainer.classList.add("draggable-dragging-active"),this.dialog.eventListener&&this.dialog.eventListener._onDialogDragStarted(this.dialog,e),s.disableGlobalTextSelection(this.dockManager.config.dialogRootElement)}},{key:"_stopDragging",value:function _stopDragging(e){this.containerElement.classList.remove("draggable-dragging-active"),this.delegate.elementContentContainer.classList.remove("draggable-dragging-active"),this.dialog.eventListener&&this.dialog.eventListener._onDialogDragEnded(this.dialog,e),s.enableGlobalTextSelection(this.dockManager.config.dialogRootElement)}},{key:"onMouseMovedIframe",value:function onMouseMovedIframe(e,t){var n=t.getBoundingClientRect();this.onMouseMove(e,{x:n.x,y:n.y})}},{key:"onMouseMove",value:function onMouseMove(e,t){e.preventDefault&&e.preventDefault();var n=new o(e.clientX,e.clientY);t&&(n=new o(e.clientX+t.x,e.clientY+t.y));var i=this.dockManager.checkXBounds(this.topLevelElement,n,this.previousMousePosition,!1,!1),s=this.dockManager.checkYBounds(this.topLevelElement,n,this.previousMousePosition,!1,!1);this._performDrag(i,s),this.previousMousePosition=n}},{key:"_performDrag",value:function _performDrag(e,t){var n=e+s.getPixels(this.topLevelElement.style.left),i=t+s.getPixels(this.topLevelElement.style.top);this.topLevelElement.style.left=n+"px",this.topLevelElement.style.top=i+"px",this.dialog.panel.setDialogPosition(n,i)}}])}();var u=function(){function u(){_classCallCheck(this,u);_defineProperty(this,"element",void 0);_defineProperty(this,"handleSize",void 0);_defineProperty(this,"cornerSize",void 0);_defineProperty(this,"east",void 0);_defineProperty(this,"west",void 0);_defineProperty(this,"north",void 0);_defineProperty(this,"south",void 0);_defineProperty(this,"corner",void 0);_defineProperty(this,"mouseDownHandler",void 0);_defineProperty(this,"touchDownHandler",void 0);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}return _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")}}])}();var m=function(){function m(e,t,n){var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:!1;_classCallCheck(this,m);_defineProperty(this,"topLevelElement",void 0);_defineProperty(this,"dialog",void 0);_defineProperty(this,"delegate",void 0);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"containerElement",void 0);_defineProperty(this,"containerType",void 0);_defineProperty(this,"minimumAllowedChildNodes",void 0);_defineProperty(this,"readyToProcessNextResize",void 0);_defineProperty(this,"dockSpawnResizedEvent",void 0);_defineProperty(this,"resizeHandles",void 0);_defineProperty(this,"previousMousePosition",void 0);_defineProperty(this,"iframeEventHandlers",void 0);_defineProperty(this,"disableResize",void 0);this.dialog=e,this.disableResize=i,this.delegate=t,this.containerElement=t.containerElement,this.dockManager=t.dockManager,this.topLevelElement=n,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=[]}return _createClass(m,[{key:"setActiveChild",value:function setActiveChild(){}},{key:"_buildResizeHandles",value:function _buildResizeHandles(){this.resizeHandles=[],this.disableResize||(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,n,i){var _this8=this;var o=new u;o.east=e,o.west=t,o.north=n,o.south=i,o.element=document.createElement("div"),this.topLevelElement.appendChild(o.element);var s="",a="";n&&(s="n"),i&&(s="s"),e&&(a="e"),t&&(a="w");var h="resize-handle-"+s+a;s.length>0&&a.length>0&&(o.corner=!0),o.element.classList.add(o.corner?"resize-handle-corner":"resize-handle"),o.element.classList.add(h),this.resizeHandles.push(o),o.mouseDownHandler=new l(o.element,"mousedown",function(e){_this8.onMouseDown(o,e)}),o.touchDownHandler=new l(o.element,"touchstart",function(e){_this8.onMouseDown(o,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(n){n.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,n){var i=n.getBoundingClientRect();this.onMouseMoved(e,t,{x:i.x,y:i.y})}},{key:"onMouseMoved",value:function onMouseMoved(e,t,n){var i=null;if(t.changedTouches){if(t.changedTouches.length>1)return;i=t.changedTouches[0]}else i=t;if(!this.readyToProcessNextResize)return;this.readyToProcessNextResize=!1,this.dialog.panel&&this.dockManager.suspendLayout(this.dialog.panel);var s=new o(i.clientX,i.clientY);n&&(s=new o(i.clientX+n.x,i.clientY+n.y));var l=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,l,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 _this9=this;var n=null;if(t.touches){if(t.touches.length>1)return;n=t.touches[0]}else n=t;this.previousMousePosition=new o(n.clientX,n.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 _iterator7=_createForOfIteratorHelper(this.iframeEventHandlers),_step7;try{for(_iterator7.s();!(_step7=_iterator7.n()).done;){var _e5=_step7.value;_e5.cancel()}}catch(err){_iterator7.e(err)}finally{_iterator7.f()}if(this.iframeEventHandlers=[],e.mouseMoveHandler=new l(window,"mousemove",function(t){_this9.onMouseMoved(e,t)}),e.touchMoveHandler=new l(window,"touchmove",function(t){_this9.onMouseMoved(e,t)}),e.mouseUpHandler=new l(window,"mouseup",function(t){_this9.onMouseUp(e)}),e.touchUpHandler=new l(window,"touchend",function(t){_this9.onMouseUp(e)}),this.dockManager.iframes){var _iterator8=_createForOfIteratorHelper(this.dockManager.iframes),_step8;try{var _loop2=function _loop2(){var t=_step8.value;var n=_this9.onMouseMovedIframe.bind(_this9);_this9.iframeEventHandlers.push(new l(t.contentWindow,"mousemove",function(i){return n(e,i,t)})),_this9.iframeEventHandlers.push(new l(t.contentWindow,"mouseup",function(t){return _this9.onMouseUp(e)})),_this9.iframeEventHandlers.push(new l(t.contentWindow,"touchmove",function(i){return n(e,i,t)})),_this9.iframeEventHandlers.push(new l(t.contentWindow,"touchend",function(t){return _this9.onMouseUp(e)}))};for(_iterator8.s();!(_step8=_iterator8.n()).done;){_loop2()}}catch(err){_iterator8.e(err)}finally{_iterator8.f()}}s.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 _iterator9=_createForOfIteratorHelper(this.iframeEventHandlers),_step9;try{for(_iterator9.s();!(_step9=_iterator9.n()).done;){var _e6=_step9.value;_e6.cancel()}}catch(err){_iterator9.e(err)}finally{_iterator9.f()}this.iframeEventHandlers=[],s.enableGlobalTextSelection(this.dockManager.config.dialogRootElement)}},{key:"_performDrag",value:function _performDrag(e,t,n){var i={};i.left=s.getPixels(this.topLevelElement.style.left),i.top=s.getPixels(this.topLevelElement.style.top),i.width=this.topLevelElement.clientWidth,i.height=this.topLevelElement.clientHeight,e.east&&this._resizeEast(t,i),e.west&&this._resizeWest(t,i),e.north&&this._resizeNorth(n,i),e.south&&this._resizeSouth(n,i)}},{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,n,i,o){o.left+=e,o.top+=t,o.width+=n,o.height+=i,o.width=Math.max(o.width,50),o.height=Math.max(o.height,50),this.topLevelElement.style.left=o.left+"px",this.topLevelElement.style.top=o.top+"px",this.resize(o.width,o.height)}}])}();var p=function(){function p(e,t,n,i){_classCallCheck(this,p);_defineProperty(this,"elementDialog",void 0);_defineProperty(this,"draggable",void 0);_defineProperty(this,"panel",void 0);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"eventListener",void 0);_defineProperty(this,"position",void 0);_defineProperty(this,"resizable",void 0);_defineProperty(this,"disableResize",void 0);_defineProperty(this,"mouseDownHandler",void 0);_defineProperty(this,"onKeyPressBound",void 0);_defineProperty(this,"noDocking",void 0);_defineProperty(this,"isHidden",void 0);_defineProperty(this,"keyPressHandler",void 0);_defineProperty(this,"focusHandler",void 0);_defineProperty(this,"grayoutParent",void 0);_defineProperty(this,"contextmenuHandler",void 0);_defineProperty(this,"_ctxMenu",void 0);_defineProperty(this,"_windowsContextMenuCloseBound",void 0);this.panel=e,this.dockManager=t,this.eventListener=t,this.grayoutParent=n,this.disableResize=i,this._initialize(),this.dockManager.context.model.dialogs.push(this),this.position=t.defaultDialogPosition,this.dockManager.notifyOnCreateDialog(this),e.isDialog=!0}return _createClass(p,[{key:"saveState",value:function saveState(e,t){this.position=new o(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.disableResize),this.dockManager.config.dialogRootElement.appendChild(this.elementDialog),this.elementDialog.classList.add("dialog-floating"),this.focusHandler=new l(this.elementDialog,"focus",this.onFocus.bind(this),!0),this.mouseDownHandler=new l(this.elementDialog,"pointerdown",this.onMouseDown.bind(this),!0),this.keyPressHandler=new l(this.elementDialog,"keypress",this.dockManager.onKeyPressBound,!0),this.contextmenuHandler=new l(this.panel.elementTitle,"contextmenu",this.oncontextMenuClicked.bind(this)),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 n=this.dockManager.config.dialogRootElement.getBoundingClientRect();this.position=new o(e-n.left,t-n.top),this.elementDialog.style.left=e-n.left+"px",this.elementDialog.style.top=t-n.top+"px",this.panel.setDialogPosition(e,t),this.dockManager.notifyOnChangeDialogPosition(this,e,t)}},{key:"getPosition",value:function getPosition(){return new o(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(e){2!=e.button&&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.keyPressHandler&&(this.keyPressHandler.cancel(),delete this.keyPressHandler),this.contextmenuHandler&&(this.contextmenuHandler.cancel(),delete this.contextmenuHandler),s.removeNode(this.elementDialog),this.draggable.removeDecorator(),s.removeNode(this.panel.elementPanel),s.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.panel.elementContentContainer.style.zIndex=this.dockManager.zIndexDialogCounter++,this.elementDialog.style.zIndex=this.dockManager.zIndexDialogCounter++,this.dockManager.activePanel=this.panel}},{key:"hide",value:function hide(){this.elementDialog.style.zIndex="0",this.panel.elementContentContainer.style.zIndex="",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.panel.elementContentContainer.style.zIndex=this.dockManager.zIndexDialogCounter++,this.elementDialog.style.zIndex=this.dockManager.zIndexDialogCounter++,this.elementDialog.style.display="block",this.isHidden&&(this.isHidden=!1,this.dockManager.notifyOnShowDialog(this))}},{key:"oncontextMenuClicked",value:function oncontextMenuClicked(e){if(e.preventDefault(),!this._ctxMenu&&p.createContextMenuContentCallback){var _this$_ctxMenu2;var _t5=p.createContextMenuContentCallback(this,this.dockManager.context.model.documentManagerNode.children);if(0==_t5.length)return;this._ctxMenu=document.createElement("div"),this._ctxMenu.className="dockspab-tab-handle-context-menu",(_this$_ctxMenu2=this._ctxMenu).append.apply(_this$_ctxMenu2,_toConsumableArray(_t5)),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("pointerup",this._windowsContextMenuCloseBound)}else this.closeContextMenu()}},{key:"closeContextMenu",value:function closeContextMenu(){this._ctxMenu&&(document.body.removeChild(this._ctxMenu),delete this._ctxMenu,window.removeEventListener("pointerup",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:"fromElement",value:function fromElement(e,t){return new p(new d(document.getElementById(e),t),t,null)}}])}();_defineProperty(p,"createContextMenuContentCallback",function(e,t){if(!e.panel._hideCloseButton)return[];var n=[];var i=document.createElement("div");if(i.innerText=r.getString("CloseDialog"),n.push(i),i.onclick=function(){e.panel.close(),e.closeContextMenu()},e.dockManager.config.enableBrowserWindows){var _t16=document.createElement("div");_t16.innerText=r.getString("NewBrowserWindow"),n.push(_t16),_t16.onclick=function(){e.panel.undockToBrowserDialog(),e.closeContextMenu()}}return n});var g=_createClass(function g(){_classCallCheck(this,g);_defineProperty(this,"escClosesWindow",void 0);_defineProperty(this,"escClosesDialog",void 0);_defineProperty(this,"dialogRootElement",void 0);_defineProperty(this,"moveOnlyWithinDockConatiner",void 0);_defineProperty(this,"enableBrowserWindows",void 0);this.escClosesWindow=!0,this.escClosesDialog=!0,this.dialogRootElement=document.body,this.moveOnlyWithinDockConatiner=!1,this.enableBrowserWindows=!0});var v=function(){function v(){_classCallCheck(this,v)}return _createClass(v,[{key:"serialize",value:function serialize(e){var t=this._buildGraphInfo(e.rootNode),n=this._buildDialogsInfo(e.dialogs.sort(function(e,t){return e.elementDialog.style.zIndex-t.elementDialog.style.zIndex}));return JSON.stringify({graphInfo:t,dialogsInfo:n})}},{key:"_buildGraphInfo",value:function _buildGraphInfo(e){var _this10=this;var t={};e.container.saveState(t);var n=[];return e.children.forEach(function(e){n.push(_this10._buildGraphInfo(e))}),{containerType:e.container.containerType,state:t,children:n}}},{key:"_buildDialogsInfo",value:function _buildDialogsInfo(e){var t=[];return e.forEach(function(e){var n={},i=e.panel;i.saveState(n);var o={containerType:i.containerType,state:n,position:e.getPosition(),isHidden:e.isHidden};t.push(o)}),t}}])}();var C=function(){function C(e){_classCallCheck(this,C);_defineProperty(this,"parent",void 0);_defineProperty(this,"container",void 0);_defineProperty(this,"children",void 0);this.container=e,this.children=[]}return _createClass(C,[{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,n){t.detachFromParent(),t.parent=this;var i=this.children.indexOf(e),o=this.children.slice(0,i),s=this.children.slice(i+1,this.children.length);this.children=o.slice(0),n?(this.children.push(t),this.children.push(e)):(this.children.push(e),this.children.push(t)),Array.prototype.push.apply(this.children,s)}},{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 _n2=0;_n2<e;_n2++)t="\t"+t;var n=void 0===this.parent?"null":this.parent.container.containerType;console.log(">>"+t+" ["+n+"]"),this.children.forEach(function(t){t.debugDumpTree(e+1)})}}])}();var f=function(){function f(e,t,n){_classCallCheck(this,f);_defineProperty(this,"previousContainer",void 0);_defineProperty(this,"nextContainer",void 0);_defineProperty(this,"stackedVertical",void 0);_defineProperty(this,"barElement",void 0);_defineProperty(this,"pointerDownHandler",void 0);_defineProperty(this,"minPanelSize",void 0);_defineProperty(this,"readyToProcessNextDrag",void 0);_defineProperty(this,"dockSpawnResizedEvent",void 0);_defineProperty(this,"previousMouseEvent",void 0);_defineProperty(this,"pointerMovedHandler",void 0);_defineProperty(this,"pointerUpHandler",void 0);_defineProperty(this,"iframeEventHandlers",void 0);this.previousContainer=e,this.nextContainer=t,this.stackedVertical=n,this.barElement=document.createElement("div"),this.barElement.classList.add(n?"splitbar-horizontal":"splitbar-vertical"),this.pointerDownHandler=new l(this.barElement,"pointerdown",this.onPointerDown.bind(this)),this.minPanelSize=50,this.readyToProcessNextDrag=!0,this.dockSpawnResizedEvent=new CustomEvent("DockSpawnResizedEvent",{composed:!0,bubbles:!0}),this.iframeEventHandlers=[]}return _createClass(f,[{key:"onPointerDown",value:function onPointerDown(e){this.barElement.setPointerCapture(e.pointerId),this._startDragging(e)}},{key:"onPointerUp",value:function onPointerUp(e){this.barElement.releasePointerCapture(e.pointerId),this._stopDragging()}},{key:"onPointerMovedIframe",value:function onPointerMovedIframe(e,t){null!=e.changedTouches&&(e=e.changedTouches[0]);var n=t.getBoundingClientRect();this.handleMoveEvent({x:parseInt(""+e.clientX+n.x),y:parseInt(""+e.clientY+n.y)})}},{key:"onPointerMoved",value:function onPointerMoved(e){null!=e.changedTouches&&(e=e.changedTouches[0]),this.handleMoveEvent({x:parseInt(""+e.clientX),y:parseInt(""+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 n=e.x-this.previousMouseEvent.x,i=e.y-this.previousMouseEvent.y;this._performDrag(n,i),this.previousMouseEvent=e,this.readyToProcessNextDrag=!0,t.resumeLayout(this.previousContainer),t.resumeLayout(this.nextContainer)}},{key:"_performDrag",value:function _performDrag(e,t){var n=this.previousContainer.containerElement.clientWidth,i=this.previousContainer.containerElement.clientHeight,o=this.nextContainer.containerElement.clientWidth,s=this.nextContainer.containerElement.clientHeight,l=this.stackedVertical?i:n,a=this.stackedVertical?s:o,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(n,r),this.nextContainer.resize(o,d)):h<0?(this.previousContainer.resize(r,i),this.nextContainer.resize(d,s)):(this.nextContainer.resize(d,s),this.previousContainer.resize(r,i),this.nextContainer.resize(d,s)),document.dispatchEvent(this.dockSpawnResizedEvent))}},{key:"_startDragging",value:function _startDragging(e){var _this11=this;if(s.disableGlobalTextSelection(this.previousContainer.dockManager.config.dialogRootElement),this.pointerMovedHandler&&(this.pointerMovedHandler.cancel(),delete this.pointerMovedHandler),this.pointerUpHandler&&(this.pointerUpHandler.cancel(),delete this.pointerUpHandler),this.pointerMovedHandler=new l(window,"pointermove",this.onPointerMoved.bind(this)),this.pointerUpHandler=new l(window,"pointerup",this.onPointerUp.bind(this)),this.previousContainer.dockManager.iframes){var _iterator10=_createForOfIteratorHelper(this.previousContainer.dockManager.iframes),_step10;try{var _loop3=function _loop3(){var e=_step10.value;var t=_this11.onPointerMovedIframe.bind(_this11);_this11.iframeEventHandlers.push(new l(e.contentWindow,"pointermove",function(n){return t(n,e)})),_this11.iframeEventHandlers.push(new l(e.contentWindow,"pointerup",_this11.onPointerUp.bind(_this11)))};for(_iterator10.s();!(_step10=_iterator10.n()).done;){_loop3()}}catch(err){_iterator10.e(err)}finally{_iterator10.f()}}this.previousMouseEvent={x:e.clientX,y:e.clientY}}},{key:"_stopDragging",value:function _stopDragging(){s.enableGlobalTextSelection(this.previousContainer.dockManager.config.dialogRootElement),this.pointerMovedHandler&&(this.pointerMovedHandler.cancel(),delete this.pointerMovedHandler),this.pointerUpHandler&&(this.pointerUpHandler.cancel(),delete this.pointerUpHandler);var _iterator11=_createForOfIteratorHelper(this.iframeEventHandlers),_step11;try{for(_iterator11.s();!(_step11=_iterator11.n()).done;){var _e8=_step11.value;_e8.cancel()}}catch(err){_iterator11.e(err)}finally{_iterator11.f()}this.iframeEventHandlers=[]}}])}();var w=function(){function w(e,t){_classCallCheck(this,w);_defineProperty(this,"panelElement",void 0);_defineProperty(this,"spiltterBars",void 0);_defineProperty(this,"stackedVertical",void 0);_defineProperty(this,"childContainers",void 0);this.childContainers=e,this.stackedVertical=t,this.panelElement=document.createElement("div"),this.spiltterBars=[],this._buildSplitterDOMAndAddElements()}return _createClass(w,[{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 _t6=0;_t6<this.childContainers.length-1;_t6++){var n=this.childContainers[_t6],i=this.childContainers[_t6+1],_o3=new f(n,i,this.stackedVertical);this.spiltterBars.push(_o3),Array.from(this.panelElement.children).includes(n.containerElement)||this._insertContainerIntoPanel(n,e),this.panelElement.insertBefore(_o3.barElement,n.containerElement.nextSibling),e=_o3.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){s.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"),s.removeNode(t.containerElement))}),this.spiltterBars.forEach(function(e){s.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"),s.removeNode(e.containerElement))}),this.spiltterBars.forEach(function(e){s.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&&(s.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 n=this.stackedVertical?this.panelElement.clientHeight:this.panelElement.clientWidth,i=n*t,o=(n-i-(this.stackedVertical?this.spiltterBars[0].barElement.clientHeight:this.spiltterBars[0].barElement.clientWidth)*this.spiltterBars.length)/n;for(var _t7=0;_t7<this.childContainers.length;_t7++){var _n3=void 0,_s2=this.childContainers[_t7];_s2!==e?(_n3=this.stackedVertical?_s2.containerElement.parentElement.clientHeight:_s2.containerElement.parentElement.clientWidth,_n3*=o):_n3=i,this.stackedVertical?_s2.resize(_s2.width,Math.floor(_n3)):_s2.resize(Math.floor(_n3),_s2.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,n=[];for(var _e9=0;_e9<this.childContainers.length;_e9++){var i=this.childContainers[_e9],_o4=this.stackedVertical?i.containerElement.clientHeight:i.containerElement.clientWidth;n.push(_o4/t)}return n}},{key:"setRatios",value:function setRatios(e){var t=this.stackedVertical?this.spiltterBars[0].barElement.clientHeight:this.spiltterBars[0].barElement.clientWidth,n=(this.stackedVertical?this.panelElement.clientHeight:this.panelElement.clientWidth)-t*this.spiltterBars.length;for(var _t8=0;_t8<this.childContainers.length;_t8++){var i=this.childContainers[_t8],_o5=n*e[_t8];this.stackedVertical?i.resize(i.width,Math.floor(_o5)):i.resize(Math.floor(_o5),i.height)}}},{key:"resize",value:function resize(e,t){var _this12=this;if(this.childContainers.length<=1)return;var n;for(this.panelElement.style.width=e+"px",this.panelElement.style.height=t+"px",n=0;n<this.childContainers.length;n++){var _i2=this.childContainers[n];if(this.stackedVertical?_i2.resize(e,_i2.height?_i2.height:t):_i2.resize(_i2.width?_i2.width:e,t),n<this.spiltterBars.length){var _i3=this.spiltterBars[n];this.stackedVertical?_i3.barElement.style.width=e+"px":_i3.barElement.style.height=t+"px"}}var i=0;this.childContainers.forEach(function(e){var t=_this12.stackedVertical?e.height:e.width;i+=t});var o=this.spiltterBars[0].barElement.getBoundingClientRect();var s=this.stackedVertical?o.height:o.width,l=this.stackedVertical?t:e;l-=s*this.spiltterBars.length,i=Math.max(i,1);var a=l/i,h=0;for(n=0;n<this.childContainers.length;n++){var _e10=this.childContainers[n];"none"==_e10.containerElement.style.display&&(_e10.containerElement.style.display="block");var _t9=this.stackedVertical?_e10.containerElement.clientHeight:_e10.containerElement.clientWidth,_i4=a>1?Math.floor(_t9*a):Math.ceil(_t9*a);h+=_i4,n===this.childContainers.length-1&&(_i4+=l-h),this.stackedVertical?_e10.resize(_e10.width,_i4):_e10.resize(_i4,_e10.height)}}}])}();var k=function(){function k(e,t,n,i){_classCallCheck(this,k);_defineProperty(this,"name",void 0);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"minimumAllowedChildNodes",void 0);_defineProperty(this,"splitterPanel",void 0);_defineProperty(this,"stackedVertical",void 0);_defineProperty(this,"containerElement",void 0);_defineProperty(this,"_cachedWidth",void 0);_defineProperty(this,"_cachedHeight",void 0);_defineProperty(this,"state",void 0);_defineProperty(this,"containerType",void 0);0!==arguments.length&&(this.name=e,this.dockManager=t,this.stackedVertical=i,this.splitterPanel=new w(n,this.stackedVertical),this.containerElement=this.splitterPanel.panelElement,this.minimumAllowedChildNodes=2)}return _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}}])}();var M=function(_k2){function M(t,n){var _this13;_classCallCheck(this,M);_this13=_callSuper(this,M,[s.getNextId("horizontal_splitter_"),t,n,!1]),_this13.containerType=e.horizontal;return _this13}_inherits(M,_k2);return _createClass(M)}(k);var y=function(_k3){function y(t,n){var _this14;_classCallCheck(this,y);_this14=_callSuper(this,y,[s.getNextId("vertical_splitter_"),t,n,!0]),_this14.containerType=e.vertical;return _this14}_inherits(y,_k3);return _createClass(y)}(k);var b=function(){function b(e){var _this15=this;_classCallCheck(this,b);_defineProperty(this,"parent",void 0);_defineProperty(this,"elementBase",void 0);_defineProperty(this,"elementText",void 0);_defineProperty(this,"elementCloseButton",void 0);_defineProperty(this,"undockInitiator",void 0);_defineProperty(this,"mouseDownHandler",void 0);_defineProperty(this,"touchDownHandler",void 0);_defineProperty(this,"closeButtonHandler",void 0);_defineProperty(this,"closeButtonTouchHandler",void 0);_defineProperty(this,"auxClickHandler",void 0);_defineProperty(this,"contextMenuHandler",void 0);_defineProperty(this,"mouseMoveHandler",void 0);_defineProperty(this,"touchMoveHandler",void 0);_defineProperty(this,"mouseUpHandler",void 0);_defineProperty(this,"touchUpHandler",void 0);_defineProperty(this,"stargDragPosition",void 0);_defineProperty(this,"dragged",void 0);_defineProperty(this,"eventListeners",void 0);_defineProperty(this,"undockListener",void 0);_defineProperty(this,"prev",void 0);_defineProperty(this,"current",void 0);_defineProperty(this,"direction",void 0);_defineProperty(this,"_ctxMenu",void 0);_defineProperty(this,"_windowsContextMenuCloseBound",void 0);this.parent=e;var n=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,o=i.getRawTitle();this.undockListener={onDockEnabled:function onDockEnabled(e){_this15.undockEnabled(e.state)},onHideCloseButton:function onHideCloseButton(e){_this15.hideCloseButton(e.state)}},this.eventListeners=[],i.addListener(this.undockListener),this.elementText.innerHTML=o,this.elementText.title=this.elementText.innerText,this.undockInitiator=new a(this.elementBase,n),this.undockInitiator.enabled=!0,this.mouseDownHandler=new l(this.elementBase,"mousedown",this.onMouseDown.bind(this)),this.touchDownHandler=new l(this.elementBase,"touchstart",this.onMouseDown.bind(this),{passive:!1}),this.closeButtonHandler=new l(this.elementCloseButton,"click",this.onCloseButtonClicked.bind(this)),this.closeButtonTouchHandler=new l(this.elementCloseButton,"touchstart",this.onCloseButtonClicked.bind(this)),this.auxClickHandler=new l(this.elementBase,"auxclick",this.onCloseButtonClicked.bind(this)),i.panelType==t.document&&(this.contextMenuHandler=new l(this.elementBase,"contextmenu",this.oncontextMenuClicked.bind(this))),this.windowsContextMenuClose=this.windowsContextMenuClose.bind(this)}return _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){if(e.preventDefault(),!this._ctxMenu&&b.createContextMenuContentCallback){var _this$_ctxMenu3;var _t10=b.createContextMenuContentCallback(this,this.parent.container.dockManager.context.model.documentManagerNode.children);if(0==_t10.length)return;this._ctxMenu=document.createElement("div"),this._ctxMenu.className="dockspab-tab-handle-context-menu",(_this$_ctxMenu3=this._ctxMenu).append.apply(_this$_ctxMenu3,_toConsumableArray(_t10)),this._ctxMenu.style.left=e.pageX+"px",this._ctxMenu.style.top=e.pageY+"px",document.body.appendChild(this._ctxMenu),window.addEventListener("mouseup",this.windowsContextMenuClose)}else this.closeContextMenu()}},{key:"closeContextMenu",value:function closeContextMenu(){this._ctxMenu&&(document.body.removeChild(this._ctxMenu),delete this._ctxMenu,window.removeEventListener("mouseup",this.windowsContextMenuClose))}},{key:"windowsContextMenuClose",value:function windowsContextMenuClose(e){var t=e.composedPath();for(var _e11 in t)if(t[_e11]==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 l(window,"mousemove",this.onMouseMove.bind(this)),this.touchMoveHandler=new l(window,"touchmove",this.onMouseMove.bind(this),{passive:!1}),this.mouseUpHandler=new l(window,"mouseup",this.onMouseUp.bind(this)),this.touchUpHandler=new l(window,"touchend",this.onMouseUp.bind(this))}},{key:"onMouseUp",value:function onMouseUp(){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(n){n.onMoveTab&&n.onMoveTab({self:e,state:t})})}},{key:"onMouseMove",value:function onMouseMove(e){if(e.preventDefault(),0!=e.buttons){if(!(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 _t11=this.elementBase.getBoundingClientRect(),n=this.direction<0?{state:"left",bound:_t11.left,rect:_t11}:{state:"right",bound:_t11.right,rect:_t11};(e.clientX<_t11.left&&this.direction<0||e.clientX>_t11.left+_t11.width&&this.direction>0)&&this.moveTabEvent(this,n.state)}}else this.onMouseUp()}},{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 _e12=this.parent.container.getRawTitle();this.elementText.innerHTML=_e12}}},{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(),this.elementBase&&(s.removeNode(this.elementBase),delete this.elementBase),this.elementCloseButton&&(s.removeNode(this.elementCloseButton),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"))}}])}();_defineProperty(b,"createContextMenuContentCallback",function(e,n){var i=[];var o=document.createElement("div");o.innerText=r.getString("CloseAll"),i.push(o),o.onclick=function(){for(var _e40=n.length-1;_e40>=0;_e40--){var _i11=n[_e40].container;_i11.panelType==t.document&&_i11.close()}e.closeContextMenu()};var s=document.createElement("div");if(s.innerText=r.getString("CloseAllButThis"),i.push(s),s.onclick=function(){for(var _i12=n.length-1;_i12>=0;_i12--){var _o10=n[_i12].container;e.parent.container!=_o10&&_o10.panelType==t.document&&_o10.close()}e.closeContextMenu()},e.parent.container.dockManager.config.enableBrowserWindows){var _t17=document.createElement("div");_t17.innerText=r.getString("NewBrowserWindow"),i.push(_t17),_t17.onclick=function(){e.parent.container.undockToBrowserDialog(),e.closeContextMenu()}}return i});var E=function(){function E(e,t){_classCallCheck(this,E);_defineProperty(this,"selected",void 0);_defineProperty(this,"host",void 0);_defineProperty(this,"container",void 0);_defineProperty(this,"panel",void 0);_defineProperty(this,"handle",void 0);_defineProperty(this,"containerElement",void 0);_defineProperty(this,"_initContent",void 0);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)}return _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,s.removeNode(this.containerElement)}},{key:"onSelected",value:function onSelected(){this.host.onTabPageSelected(this,!0),this.container instanceof d&&this.container.dockManager.notifyOnTabChange(this)}},{key:"setSelected",value:function setSelected(e,t){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",this.panel.setVisible(!0);var _e13=this.host.contentElement.clientWidth,n=this.host.contentElement.clientHeight;this.container.resize(_e13,n),t&&(this.host.dockManager.activePanel=this.container)}else this.containerElement.style.display="none",this.panel.setVisible(!1)}},{key:"resize",value:function resize(e,t){this.container.resize(e,t)}}])}();var H,D;!function(e){e[e.TOP=0]="TOP",e[e.BOTTOM=1]="BOTTOM",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT"}(H||(H={}));var x=function(){function x(e,t,n){var _this16=this;_classCallCheck(this,x);_defineProperty(this,"displayCloseButton",void 0);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"tabStripDirection",void 0);_defineProperty(this,"hostElement",void 0);_defineProperty(this,"tabListElement",void 0);_defineProperty(this,"separatorElement",void 0);_defineProperty(this,"contentElement",void 0);_defineProperty(this,"createTabPage",void 0);_defineProperty(this,"tabHandleListener",void 0);_defineProperty(this,"eventListeners",void 0);_defineProperty(this,"pages",void 0);_defineProperty(this,"activeTab",void 0);_defineProperty(this,"_resizeRequested",void 0);_defineProperty(this,"mouseDownHandler",void 0);_defineProperty(this,"focusHandler",void 0);if(void 0===t&&(t=H.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){_this16.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===H.BOTTOM)this.hostElement.appendChild(this.contentElement),this.hostElement.appendChild(this.separatorElement),this.hostElement.appendChild(this.tabListElement);else{if(this.tabStripDirection!==H.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 l(this.contentElement,"focus",this.onFocus.bind(this),!0),this.mouseDownHandler=new l(this.contentElement,"mousedown",this.onMousedown.bind(this),!0)}return _createClass(x,[{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=s.orderByIndexes(this.pages,e);var t=this.tabListElement.childNodes,n=[];for(var _e14 in t)1===t[_e14].nodeType&&n.push(t[_e14]);n=s.orderByIndexes(n,e);for(var _e15=0;_e15<n.length;++_e15)this.tabListElement.appendChild(n[_e15]);this.activeTab&&this.onTabPageSelected(this.activeTab,!1)}},{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,n,i){this.eventListeners.forEach(function(o){o.onChange&&o.onChange({host:e,handle:t,state:n,index:i})})}},{key:"_createDefaultTabPage",value:function _createDefaultTabPage(e,t){return new E(e,t)}},{key:"setActiveTab",value:function setActiveTab(e){var t;this.pages.forEach(function(n){n.container===e&&(t=n)}),this.pages.length>0&&t&&(this.onTabPageSelected(t,!0),this.dockManager.activePanel=e)}},{key:"resize",value:function resize(e,t){var _this17=this;this.hostElement.style.width=e+"px",this.hostElement.style.height=t+"px";var n=this.tabListElement.clientHeight;this._resizeRequested||requestAnimationFrame(function(){return _this17.resizeTabListElement(e,t)}),this._resizeRequested=!0;var i=this.separatorElement.clientHeight,o=t-n-i;this.contentElement.style.height=o+"px",this.activeTab&&this.activeTab.resize(e,o)}},{key:"resizeTabListElement",value:function resizeTabListElement(e,t){var _this18=this;if(this._resizeRequested=!1,0===this.pages.length)return;var n=0;this.pages.forEach(function(e){var t=e.handle;null!=t.elementBase&&(t.elementBase.style.width="",n+=t.elementBase.clientWidth)});var i=e/n;i>1.2||this.pages.forEach(function(e,t){var n=e.handle,o=i*n.elementBase.clientWidth;t===_this18.pages.length-1&&(o-=5),n.elementBase.style.width=o+"px"})}},{key:"performLayout",value:function performLayout(e){var _this19=this;this.pages.forEach(function(t){if(!e.some(function(e){return e==t.container})){t.handle.removeListener(_this19.tabHandleListener),t.destroy();var _e16=_this19.pages.indexOf(t);_e16>-1&&_this19.pages.splice(_e16,1)}});var t=this.activeTab;delete this.activeTab;var n=e.filter(function(e){return"panel"===e.containerType});n.length>0?(n.forEach(function(e){var n=null;_this19.pages.some(function(t){return t.container==e&&(n=t,!0)})||(n=_this19.createTabPage(_this19,e),n.handle.addListener(_this19.tabHandleListener),_this19.pages.push(n)),t&&n.container===t.container&&(_this19.activeTab=n)}),this._setTabHandlesVisible(!0)):this._setTabHandlesVisible(!1),this.activeTab&&this.onTabPageSelected(this.activeTab,!1)}},{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,t){this.activeTab=e,this.pages.forEach(function(n){var i=n===e;n.setSelected(i,t)})}}])}();var _=function(){function _(t,n){var _this20=this;_classCallCheck(this,_);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"tabOrientation",void 0);_defineProperty(this,"name",void 0);_defineProperty(this,"element",void 0);_defineProperty(this,"containerElement",void 0);_defineProperty(this,"containerType",void 0);_defineProperty(this,"minimumAllowedChildNodes",void 0);_defineProperty(this,"tabHost",void 0);_defineProperty(this,"tabHostListener",void 0);_defineProperty(this,"state",void 0);void 0===n&&(n=H.BOTTOM),this.dockManager=t,this.tabOrientation=n,this.name=s.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 x(t,this.tabOrientation),this.tabHostListener={onChange:function onChange(e){_this20.dockManager._requestTabReorder(_this20,e)}},this.tabHost.addListener(this.tabHostListener),this.element.appendChild(this.tabHost.hostElement)}return _createClass(_,[{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(){this.tabHost.pages.forEach(function(e){return e.destroy()}),s.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"}}])}();var T=function(){function T(_e17){_classCallCheck(this,T);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"_forceResizeCompositeContainer",function(e){var t=e.containerElement.clientWidth,n=e.containerElement.clientHeight;e.resize(t,n)});this.dockManager=_e17}return _createClass(T,[{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 n=t.children.indexOf(e);if(e.detachFromParent(),t.children.length<t.container.minimumAllowedChildNodes){var _e18=t.parent;for(var _n4=0;_n4<t.children.length;_n4++){var i=t.children[_n4];if(_e18){_e18.addChildAfter(t,i),t.detachFromParent();var _n5=t.container.containerElement.clientWidth,_o6=t.container.containerElement.clientHeight;t.container.destroy(),i.container.resize(_n5,_o6),_e18.performLayout(!1)}else t.detachFromParent(),t.container.destroy(),this.dockManager.setRootNode(i)}}else if(t.performLayout(!1),t.children.length>0){var _e19=t.children[Math.max(0,n-1)];t.container.setActiveChild(_e19.container)}this.dockManager.invalidate(),this.dockManager.notifyOnUnDock(e)}},{key:"close",value:function close(e){var t=e===null||e===void 0?void 0:e.parent;if(!t)throw new Error("Cannot undock. panel is not a leaf node");var n=!1;t.children.length>0&&null!=t.container.tabHost&&(n=t.container.tabHost.getActiveTab().container==e.container);var i=t.children.indexOf(e);if(e.detachFromParent(),t.children.length<t.container.minimumAllowedChildNodes){var _e20=t.parent;for(var _n6=0;_n6<t.children.length;_n6++){var _i5=t.children[_n6];if(_e20){_e20.addChildAfter(t,_i5),t.detachFromParent();var _n7=t.container.containerElement.clientWidth,_o7=t.container.containerElement.clientHeight;_i5.container.resize(_n7,_o7),t.container.destroy(),_e20.performLayout(!1)}else t.detachFromParent(),t.container.destroy(),this.dockManager.setRootNode(_i5)}}else if(t.performLayout(!1),n){var _e21=t.children[Math.max(0,i-1)];null!=_e21&&t.container.setActiveChild(_e21.container)}this.dockManager.invalidate(),this.dockManager.notifyOnUnDock(e)}},{key:"reorderTabs",value:function reorderTabs(e,t,n,i){var o=e.children.length,l="left"===n?i:i+1;if("right"==n&&l>=e.children.length)return;if("left"==n&&0==l)return;var a=Array.apply(null,{length:o}).map(Number.call,Number),h=a.splice(l,1)[0];a.splice("left"===n?i-1:i,0,h),e.children=s.orderByIndexes(e.children,a),e.container.tabHost.performTabsLayout(a),this.dockManager.notifyOnTabsReorder(e)}},{key:"_performDock",value:function _performDock(e,t,n,i){if(e.parent&&"fill"===e.parent.container.containerType&&(e=e.parent),"fill"===n&&"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 o,l,a;if(e===this.dockManager.context.model.rootNode)return i?(o=this._createDockContainer(n,t,e),l=new C(o),l.addChild(t),l.addChild(e)):(o=this._createDockContainer(n,e,t),l=new C(o),l.addChild(e),l.addChild(t)),this.dockManager.setRootNode(l),this.dockManager.rebuildLayout(this.dockManager.context.model.rootNode),l.container.setActiveChild(t.container),this.dockManager.invalidate(),void this.dockManager.notifyOnDock(t);if(e.parent.container.containerType!==n){a=e.parent;var _h=e.container.containerElement.clientWidth,_r2=e.container.containerElement.clientHeight,_d2=a.container.containerElement.clientWidth,_c2=a.container.containerElement.clientHeight;o=this._createDockContainer(n,t,e),l=new C(o),a.addChildAfter(e,l),e.detachFromParent(),s.removeNode(e.container.containerElement),i?(l.addChild(t),l.addChild(e)):(l.addChild(e),l.addChild(t)),a.performLayout(!1),l.performLayout(!0),l.container.setActiveChild(t.container),l.container.resize(_h,_r2),a.container.resize(_d2,_c2)}else a=e.parent,i?a.addChildBefore(e,t):a.addChildAfter(e,t),a.performLayout(!1),a.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,n){if("horizontal"===e)return new M(this.dockManager,[t.container,n.container]);if("vertical"===e)return new y(this.dockManager,[t.container,n.container]);if("fill"===e)return new _(this.dockManager);throw new Error("Failed to create dock container of type: "+e)}},{key:"getDockBounds",value:function getDockBounds(e,t,n,i){var o,s,l,a;if("fill"===n){var _t12=e.container.containerElement,_n8=this.dockManager.element.getBoundingClientRect(),_i6=_t12.getBoundingClientRect();return{x:_i6.left-_n8.left,y:_i6.top-_n8.top,width:_t12.clientWidth,height:_t12.clientHeight}}e.parent&&"fill"===e.parent.container.containerType&&(e=e.parent);var h=!1;e.parent&&e.parent.container.containerType===n?(o=e.parent,s=o.children.length,l=o.children.indexOf(e)+(i?0:1)):(o=e,s=1,l=i?0:1,h=!0);var r=0,d=0;if("vertical"===n||"horizontal"===n){var _e22=this._getVaringDimension(o.container,n)-5*(s-1),_a3=this._getVaringDimension(t,n),_c3=_e22/(_e22+_a3);if(r=_a3*_c3,h)d=i?0:_e22*_c3;else{for(var _e23=0;_e23<l;_e23++)d+=this._getVaringDimension(o.children[_e23].container,n);d*=_c3}}a={};var c=this.dockManager.element.getBoundingClientRect(),u=o.container.containerElement.getBoundingClientRect();return"vertical"===n?(a.x=u.left-c.left,a.y=u.top-c.top+d,a.width=o.container.width,a.height=r):"horizontal"===n&&(a.x=u.left-c.left+d,a.y=u.top-c.top,a.width=r,a.height=o.container.height),a}},{key:"_getVaringDimension",value:function _getVaringDimension(e,t){return"vertical"===t?e.height:"horizontal"===t?e.width:0}}])}();var P=function(){function P(e,t){_classCallCheck(this,P);_defineProperty(this,"wheel",void 0);_defineProperty(this,"id",void 0);_defineProperty(this,"element",void 0);_defineProperty(this,"hoverIconClass",void 0);_defineProperty(this,"mouseOverHandler",void 0);_defineProperty(this,"mouseOutHandler",void 0);_defineProperty(this,"active",void 0);this.wheel=e,this.id=t;var n=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-"+n),this.element.classList.add("dock-wheel-"+n+"-icon"),this.hoverIconClass="dock-wheel-"+n+"-icon-hover",this.mouseOverHandler=new l(this.element,"pointerover",this.onMouseMoved.bind(this)),this.mouseOutHandler=new l(this.element,"pointerout",this.onMouseOut.bind(this)),this.active=!1}return _createClass(P,[{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()}}])}();!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"}(D||(D={}));var L=function(){function L(e){_classCallCheck(this,L);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"elementMainWheel",void 0);_defineProperty(this,"elementSideWheel",void 0);_defineProperty(this,"wheelItems",void 0);_defineProperty(this,"elementPanelPreview",void 0);_defineProperty(this,"activeDialog",void 0);_defineProperty(this,"_activeNode",void 0);_defineProperty(this,"_visible",void 0);this.dockManager=e,this.elementMainWheel=document.createElement("div"),this.elementSideWheel=document.createElement("div"),this.wheelItems={};for(var _e24 in D)this.wheelItems[_e24]=new P(this,_e24),"-s"===_e24.substr(-2,2)?this.elementSideWheel.appendChild(this.wheelItems[_e24].element):this.elementMainWheel.appendChild(this.wheelItems[_e24].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}return _createClass(L,[{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 s.removeNode(this.elementMainWheel),void s.removeNode(this.elementSideWheel);var e=this.activeNode.container.containerElement,t=e.clientWidth,n=e.clientHeight,i=Math.floor(t/2),o=Math.floor(n/2),l=e.getBoundingClientRect(),a=this.dockManager.element.getBoundingClientRect();this.elementMainWheel.style.left=l.left-a.left+i+"px",this.elementMainWheel.style.top=l.top-a.top+o+"px";var h=this.dockManager.element.clientWidth,r=this.dockManager.element.clientHeight;s.removeNode(this.elementMainWheel),s.removeNode(this.elementSideWheel),this.dockManager.element.appendChild(this.elementMainWheel),this.dockManager.element.appendChild(this.elementSideWheel),this._setWheelButtonPosition(D["left-s"],20,-r/2),this._setWheelButtonPosition(D["right-s"],h-40,-r/2),this._setWheelButtonPosition(D["top-s"],h/2,20-r),this._setWheelButtonPosition(D["down-s"],h/2,-20)}},{key:"_setWheelButtonPosition",value:function _setWheelButtonPosition(e,t,n){var i=this.wheelItems[e],o=i.element.clientWidth/2,s=i.element.clientHeight/2,l=Math.floor(t-o),a=Math.floor(n-s);i.element.style.marginLeft=l+"px",i.element.style.marginTop=a+"px"}},{key:"hideWheel",value:function hideWheel(){this._visible=!1,this.activeNode=void 0,s.removeNode(this.elementMainWheel),s.removeNode(this.elementSideWheel),s.removeNode(this.elementPanelPreview);for(var _e25 in this.wheelItems)this.wheelItems[_e25].active=!1}},{key:"onMouseOver",value:function onMouseOver(e){if(!this.activeDialog)return;var t,n=this.dockManager.context.model.rootNode;e.id===D.top?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"vertical",!0):e.id===D.down?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"vertical",!1):e.id===D.left?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"horizontal",!0):e.id===D.right?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"horizontal",!1):e.id===D.fill?t=this.dockManager.layoutEngine.getDockBounds(this.activeNode,this.activeDialog.panel,"fill",!1):e.id===D["top-s"]?t=this.dockManager.layoutEngine.getDockBounds(n,this.activeDialog.panel,"vertical",!0):e.id===D["down-s"]?t=this.dockManager.layoutEngine.getDockBounds(n,this.activeDialog.panel,"vertical",!1):e.id===D["left-s"]?t=this.dockManager.layoutEngine.getDockBounds(n,this.activeDialog.panel,"horizontal",!0):e.id===D["right-s"]&&(t=this.dockManager.layoutEngine.getDockBounds(n,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(){s.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 _e26 in this.wheelItems){var _t13=this.wheelItems[_e26];if(_t13.active)return _t13}}},{key:"_handleDockRequest",value:function _handleDockRequest(e,t){e.active=!1,e.element.classList.remove(e.hoverIconClass),this.activeNode&&(e.id===D.left?this.dockManager.dockDialogLeft(this.activeNode,t):e.id===D.right?this.dockManager.dockDialogRight(this.activeNode,t):e.id===D.top?this.dockManager.dockDialogUp(this.activeNode,t):e.id===D.down?this.dockManager.dockDialogDown(this.activeNode,t):e.id===D.fill?this.dockManager.dockDialogFill(this.activeNode,t):e.id===D["left-s"]?this.dockManager.dockDialogLeft(this.dockManager.context.model.rootNode,t):e.id===D["right-s"]?this.dockManager.dockDialogRight(this.dockManager.context.model.rootNode,t):e.id===D["top-s"]?this.dockManager.dockDialogUp(this.dockManager.context.model.rootNode,t):e.id===D["down-s"]&&this.dockManager.dockDialogDown(this.dockManager.context.model.rootNode,t))}}])}();var B=_createClass(function B(){_classCallCheck(this,B);_defineProperty(this,"rootNode",void 0);_defineProperty(this,"documentManagerNode",void 0);_defineProperty(this,"dialogs",void 0);this.rootNode=this.documentManagerNode=void 0});var z=function(_E2){function z(e,t){var _this21;_classCallCheck(this,z);_this21=_callSuper(this,z,[e,t]),"panel"===_this21.container.containerType&&(_this21.panel=t,_this21.containerElement=_this21.panel.elementContentWrapper,s.removeNode(_this21.containerElement));return _this21}_inherits(z,_E2);return _createClass(z,[{key:"destroy",value:function destroy(){_superPropGet(z,"destroy",this,3)([]),this.panel.elementContentHost.appendChild(this.containerElement)}}])}(E);var N=function(_ref){function N(e){var _this22;_classCallCheck(this,N);_this22=_callSuper(this,N,[e,H.TOP]),_this22.minimumAllowedChildNodes=0,_this22.element.classList.add("document-manager"),_this22.tabHost.createTabPage=_this22._createDocumentTabPage,_this22.tabHost.displayCloseButton=!0;return _this22}_inherits(N,_ref);return _createClass(N,[{key:"_createDocumentTabPage",value:function _createDocumentTabPage(e,t){return new z(e,t)}},{key:"saveState",value:function saveState(e){_superPropGet(N,"saveState",this,3)([e]),e.documentManager=!0}},{key:"selectedTab",value:function selectedTab(){return this.tabHost.activeTab}}])}(_);var S=_createClass(function S(e){_classCallCheck(this,S);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"model",void 0);_defineProperty(this,"documentManagerView",void 0);this.dockManager=e,this.model=new B,this.documentManagerView=new N(this.dockManager)});var W=function(){function W(e){_classCallCheck(this,W);_defineProperty(this,"dockManager",void 0);_defineProperty(this,"documentManagerNode",void 0);this.dockManager=e}return _createClass(W,[{key:"deserialize",value:function(){var _deserialize=_asyncToGenerator(_regeneratorRuntime().mark(function _callee4(e){var t,n;return _regeneratorRuntime().wrap(function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:t=JSON.parse(e),n=new B;_context4.next=3;return this._buildGraph(t.graphInfo);case 3:n.rootNode=_context4.sent;_context4.next=6;return this._buildDialogs(t.dialogsInfo);case 6:n.dialogs=_context4.sent;n.documentManagerNode=this.documentManagerNode;return _context4.abrupt("return",n);case 9:case"end":return _context4.stop()}},_callee4,this)}));function deserialize(_x5){return _deserialize.apply(this,arguments)}return deserialize}()},{key:"_buildGraph",value:function(){var _buildGraph2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee5(e){var t,n,_iterator12,_step12,_e27,_t14,i,o,_iterator13,_step13,_e28;return _regeneratorRuntime().wrap(function _callee5$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:t=e.children,n=[];_iterator12=_createForOfIteratorHelper(t);_context5.prev=2;_iterator12.s();case 4:if((_step12=_iterator12.n()).done){_context5.next=12;break}_e27=_step12.value;_context5.next=8;return this._buildGraph(_e27);case 8:_t14=_context5.sent;null!==_t14&&n.push(_t14);case 10:_context5.next=4;break;case 12:_context5.next=17;break;case 14:_context5.prev=14;_context5.t0=_context5["catch"](2);_iterator12.e(_context5.t0);case 17:_context5.prev=17;_iterator12.f();return _context5.finish(17);case 20:_context5.next=22;return this._createContainer(e,n);case 22:i=_context5.sent;if(!(null===i)){_context5.next=25;break}return _context5.abrupt("return",null);case 25:o=new C(i);i instanceof N&&(this.documentManagerNode=o),o.children=n;_iterator13=_createForOfIteratorHelper(o.children.reverse());try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){_e28=_step13.value;_e28.parent=o}}catch(err){_iterator13.e(err)}finally{_iterator13.f()}return _context5.abrupt("return",(o.children.reverse(),o));case 30:case"end":return _context5.stop()}},_callee5,this,[[2,14,17,20]])}));function _buildGraph(_x6){return _buildGraph2.apply(this,arguments)}return _buildGraph}()},{key:"_createContainer",value:function(){var _createContainer2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee6(e,t){var n,i,o,l,_iterator14,_step14,_e29;return _regeneratorRuntime().wrap(function _callee6$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:i=e.containerType,o=e.state,l=[];_iterator14=_createForOfIteratorHelper(t);try{for(_iterator14.s();!(_step14=_iterator14.n()).done;){_e29=_step14.value;l.push(_e29.container)}}catch(err){_iterator14.e(err)}finally{_iterator14.f()}if(!("panel"===i)){_context6.next=12;break}_context6.next=6;return d.loadFromState(o,this.dockManager);case 6:n=_context6.sent;if(n.prepareForDocking){_context6.next=9;break}return _context6.abrupt("return",null);case 9:n.prepareForDocking(),s.removeNode(n.elementPanel);_context6.next=23;break;case 12:if(!("horizontal"===i)){_context6.next=16;break}n=new M(this.dockManager,l);_context6.next=23;break;case 16:if(!("vertical"===i)){_context6.next=20;break}n=new y(this.dockManager,l);_context6.next=23;break;case 20:if(!("fill"!==i)){_context6.next=22;break}throw new Error("Cannot create dock container of unknown type: "+i);case 22:n=o.documentManager?new N(this.dockManager):new _(this.dockManager);case 23:return _context6.abrupt("return",(n.loadState(o),n));case 24:case"end":return _context6.stop()}},_callee6,this)}));function _createContainer(_x7,_x8){return _createContainer2.apply(this,arguments)}return _createContainer}()},{key:"_buildDialogs",value:function(){var _buildDialogs2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee7(e){var t,_iterator15,_step15,n,_e30,i,_o8,_i7;return _regeneratorRuntime().wrap(function _callee7$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:t=[];_iterator15=_createForOfIteratorHelper(e);_context7.prev=2;_iterator15.s();case 4:if((_step15=_iterator15.n()).done){_context7.next=19;break}n=_step15.value;_e30=void 0,i=n.containerType,_o8=n.state;_context7.t0="panel"===i;if(!_context7.t0){_context7.next=13;break}_context7.next=11;return d.loadFromState(_o8,this.dockManager);case 11:_e30=_context7.sent;_context7.t0=_e30.prepareForDocking;case 13:if(!_context7.t0){_context7.next=17;break}s.removeNode(_e30.elementPanel),_e30.isDialog=!0;_i7=new p(_e30,this.dockManager);(n.position.x>document.body.clientWidth||n.position.y>document.body.clientHeight-70)&&(n.position.x=20,n.position.y=70),_i7.setPosition(n.position.x,n.position.y),_i7.isHidden=n.isHidden,_i7.isHidden&&_i7.hide(),t.push(_i7);case 17:_context7.next=4;break;case 19:_context7.next=24;break;case 21:_context7.prev=21;_context7.t1=_context7["catch"](2);_iterator15.e(_context7.t1);case 24:_context7.prev=24;_iterator15.f();return _context7.finish(24);case 27:return _context7.abrupt("return",t);case 28:case"end":return _context7.stop()}},_callee7,this,[[2,21,24,27]])}));function _buildDialogs(_x9){return _buildDialogs2.apply(this,arguments)}return _buildDialogs}()}])}();var R=function(){function R(e,t){_classCallCheck(this,R);_defineProperty(this,"element",void 0);_defineProperty(this,"context",void 0);_defineProperty(this,"dockWheel",void 0);_defineProperty(this,"layoutEngine",void 0);_defineProperty(this,"mouseMoveHandler",void 0);_defineProperty(this,"touchMoveHandler",void 0);_defineProperty(this,"layoutEventListeners",void 0);_defineProperty(this,"closePanelContainerCallback",void 0);_defineProperty(this,"defaultDialogPosition",void 0);_defineProperty(this,"backgroundContext",void 0);_defineProperty(this,"zIndexCounter",void 0);_defineProperty(this,"zIndexTabHost",void 0);_defineProperty(this,"zIndexTabHandle",void 0);_defineProperty(this,"zIndexDialogCounter",void 0);_defineProperty(this,"onKeyPressBound",void 0);_defineProperty(this,"iframes",void 0);_defineProperty(this,"_undockEnabled",void 0);_defineProperty(this,"getElementCallback",void 0);_defineProperty(this,"_config",void 0);_defineProperty(this,"_activePanel",void 0);_defineProperty(this,"_lastPanelNotADialog",void 0);_defineProperty(this,"_activeDocument",void 0);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 o(0,0)}return _createClass(R,[{key:"config",get:function get(){return this._config}},{key:"initialize",value:function initialize(){this.backgroundContext=this.element.children[0],this.context=new S(this);var e=new C(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 L(this),this.layoutEngine=new T(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 _e31=this.activePanel;this.activePanel=null,_e31.close()}}},{key:"checkXBounds",value:function checkXBounds(e,t,n,i,o){if(this._config.moveOnlyWithinDockConatiner)return this.checkXBoundsWithinDockContainer(e,t,n,i,o);var s=this.element.getBoundingClientRect(),l=Math.floor(t.x-n.x),a=e.offsetLeft+e.offsetWidth+l+s.left<40,h=e.offsetLeft+l+s.left>window.innerWidth-40;if(a){n.x=t.x,l=0;var _i8=40-(e.offsetWidth+e.offsetLeft+s.left);_i8>0&&(l=_i8)}else if(h){n.x=t.x,l=0;var _i9=window.innerWidth-40-e.offsetLeft-s.left;_i9>0&&(l=_i9)}return l}},{key:"checkXBoundsWithinDockContainer",value:function checkXBoundsWithinDockContainer(e,t,n,i,o){var s=t.x-n.x,l=this.element.getBoundingClientRect(),a=e.getBoundingClientRect(),h=s<0&&a.left+s<l.left&&!o,r=s>0&&a.right+s>l.right&&!i;return h?(t.x-=s,s=l.left-a.left,t.x-=s):r&&(t.x-=s,s=l.right-a.right,t.x-=s),s}},{key:"checkYBounds",value:function checkYBounds(e,t,n,i,o){if(this._config.moveOnlyWithinDockConatiner)return this.checkYBoundsWithinDockContainer(e,t,n,i,o);var s=this.element.getBoundingClientRect(),l=Math.floor(t.y-n.y),a=e.offsetTop+l<0,h=e.offsetTop+l+s.top>window.innerHeight-16;if(a)n.y=t.y,l=0;else if(h){n.y=t.y,l=0;var _i10=window.innerHeight-16-e.offsetTop-s.top;_i10>0&&(l=_i10)}return l}},{key:"checkYBoundsWithinDockContainer",value:function checkYBoundsWithinDockContainer(e,t,n,i,o){var s=t.y-n.y,l=this.element.getBoundingClientRect(),a=e.getBoundingClientRect(),h=s<0&&a.top+s<l.top&&!o,r=s>0&&a.bottom+s>l.bottom&&!i;return h?(t.y-=s,s=l.top-a.top,t.y-=s):r&&(t.y-=s,s=l.bottom-a.bottom,t.y-=s),s}},{key:"rebuildLayout",value:function rebuildLayout(e){var _this23=this;e.children.forEach(function(e){_this23.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 n=0,i=0;var _iterator16=_createForOfIteratorHelper(this.context.model.dialogs),_step16;try{for(_iterator16.s();!(_step16=_iterator16.n()).done;){var _e32=_step16.value;(_e32.position.x>this.element.clientWidth||_e32.position.y>this.element.clientHeight)&&((n>this.element.clientWidth||i>this.element.clientHeight)&&(n=0,i=0),_e32.setPosition(100+n,100+i),n+=100,i+=100)}}catch(err){_iterator16.e(err)}finally{_iterator16.f()}}},{key:"setModel",value:function setModel(e){s.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 _this24=this;e.children.reverse().forEach(function(t){_this24.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 l(window,"mousemove",this._onMouseMoved.bind(this)),this.touchMoveHandler=new l(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 n,i=[];for(i.push(this.context.model.rootNode);i.length>0;){var _o9=i.pop();s.isPointInsideNode(e,t,_o9)&&(n=_o9,[].push.apply(i,_o9.children))}return n}},{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,n){return this._requestDockContainer(e,t,this.layoutEngine.dockLeft.bind(this.layoutEngine),!1,n)}},{key:"dockRight",value:function dockRight(e,t,n){return this._requestDockContainer(e,t,this.layoutEngine.dockRight.bind(this.layoutEngine),!0,n)}},{key:"dockUp",value:function dockUp(e,t,n){return this._requestDockContainer(e,t,this.layoutEngine.dockUp.bind(this.layoutEngine),!1,n)}},{key:"dockDown",value:function dockDown(e,t,n){return this._requestDockContainer(e,t,this.layoutEngine.dockDown.bind(this.layoutEngine),!0,n)}},{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,n,i,o){var l;if(this.context.model.dialogs.forEach(function(i){e==i.panel&&(i.show(),i.setPosition(t,n),l=i)}),l)return l;try{var _t15=this._findNodeFromContainer(e);this.layoutEngine.undock(_t15)}catch(e){}var a=e;s.removeNode(a.elementPanel),a.isDialog=!0;var h=new p(a,this,i,o);return h.setPosition(t,n),h}},{key:"_requestDockDialog",value:function _requestDockDialog(e,t,n){var i=t.panel,o=new C(i);return i.prepareForDocking(),i.elementContentContainer.style.zIndex="",t.destroy(),n(e,o),o}},{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,n,i,o){var l=new C(t);if("panel"===t.containerType){var _e33=t;_e33.prepareForDocking(),s.removeNode(_e33.elementPanel)}var a,h=null;if(e.parent&&e.parent.container&&(a=e.parent.container,a.getRatios&&(h=a.getRatios())),n(e,l),o&&l.parent&&("vertical"===l.parent.container.containerType||"horizontal"===l.parent.container.containerType)){var _e34=l.parent.container;if(h&&a==_e34){if(i){for(var _e35=0;_e35<h.length;_e35++)h[_e35]=h[_e35]-h[_e35]*o;h.push(o)}else h[0]=h[0]-o,h.unshift(o);_e34.setRatios(h)}else _e34.setContainerRatio(t,o)}return this.rebuildLayout(this.context.model.rootNode),this.invalidate(),this._checkShowBackgroundContext(),l}},{key:"_requestTabReorder",value:function _requestTabReorder(e,t){var n=this._findNodeFromContainer(e);this.layoutEngine.reorderTabs(n,t.handle,t.state,t.index)}},{key:"requestUndockToDialog",value:function requestUndockToDialog(e,t,n){var i=this._findNodeFromContainer(e);this.layoutEngine.undock(i);var o=i.container;o.elementPanel.style.display="block";var s=new p(o,this,null);if(o.lastDialogSize&&s.resize(o.lastDialogSize.width,o.lastDialogSize.height),void 0!==t){var _e36=s.elementDialog.clientWidth;n.x>_e36&&(n.x=.75*_e36),s.setPosition(t.clientX-n.x,t.clientY-n.y),s.draggable.onMouseDown(t)}return s}},{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 _e37=this._activeDocument;this._activeDocument=null,this.notifyOnActiveDocumentChange(null,_e37)}}},{key:"openInDialog",value:function openInDialog(e,t,n,i){var o=new p(e,this,null,i);if(null!=t){var _e38=o.elementDialog.clientWidth;n.x>_e38&&(n.x=.75*_e38),o.setPosition(t.clientX-n.x,t.clientY-n.y),o.draggable.onMouseDown(t)}return o}},{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),n=t.parent;return t.detachFromParent(),n&&this.rebuildLayout(n),t}},{key:"getNodeByElementId",value:function getNodeByElementId(e){var t=[];for(t.push(this.context.model.rootNode);t.length>0;){var n=t.pop();if(n.container instanceof d){var _n$container$elementC;if(n.container.elementContent.id===e)return n;if(n.container.elementContent instanceof HTMLSlotElement&&((_n$container$elementC=n.container.elementContent.assignedElements())===null||_n$container$elementC===void 0||(_n$container$elementC=_n$container$elementC[0])===null||_n$container$elementC===void 0?void 0:_n$container$elementC.id)===e)return n}[].push.apply(t,n.children)}return null}},{key:"getNodeByElement",value:function getNodeByElement(e){var t=[];for(t.push(this.context.model.rootNode);t.length>0;){var n=t.pop();if(n.container instanceof d){var _n$container$elementC2;if(n.container.elementContent===e)return n;if(n.container.elementContent instanceof HTMLSlotElement&&((_n$container$elementC2=n.container.elementContent.assignedElements())===null||_n$container$elementC2===void 0?void 0:_n$container$elementC2[0])===e)return n}[].push.apply(t,n.children)}return null}},{key:"_findNodeFromContainer",value:function _findNodeFromContainer(e){var t=[];for(t.push(this.context.model.rootNode);t.length>0;){var n=t.pop();if(n.container===e)return n;[].push.apply(t,n.children)}return null}},{key:"findNodeFromContainerElement",value:function findNodeFromContainerElement(e){var t=[];for(t.push(this.context.model.rootNode);t.length>0;){var n=t.pop();if(n.container.containerElement===e)return n;[].push.apply(t,n.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 _this25=this;this.layoutEventListeners.forEach(function(t){t.onSuspendLayout&&t.onSuspendLayout(_this25,e)})}},{key:"resumeLayout",value:function resumeLayout(e){var _this26=this;this.layoutEventListeners.forEach(function(t){t.onResumeLayout&&t.onResumeLayout(_this26,e)})}},{key:"notifyOnDock",value:function notifyOnDock(e){var _this27=this;this._checkShowBackgroundContext(),this.layoutEventListeners.forEach(function(t){t.onDock&&(t.onDock(_this27,e),e.container.resize(e.container.width,e.container.height))})}},{key:"notifyOnTabsReorder",value:function notifyOnTabsReorder(e){var _this28=this;this.layoutEventListeners.forEach(function(t){t.onTabsReorder&&t.onTabsReorder(_this28,e)})}},{key:"notifyOnUnDock",value:function notifyOnUnDock(e){var _this29=this;this._checkShowBackgroundContext(),this.layoutEventListeners.forEach(function(t){t.onUndock&&t.onUndock(_this29,e)})}},{key:"notifyOnClosePanel",value:function notifyOnClosePanel(e){var _this30=this;if(this._checkShowBackgroundContext(),this.activePanel==e&&(this.activePanel=null),this._activeDocument==e){var _e39=this._activeDocument;this._activeDocument=null,this.notifyOnActiveDocumentChange(null,_e39)}this.layoutEventListeners.forEach(function(t){t.onClosePanel&&t.onClosePanel(_this30,e)})}},{key:"notifyOnCreateDialog",value:function notifyOnCreateDialog(e){var _this31=this;this.layoutEventListeners.forEach(function(t){t.onCreateDialog&&t.onCreateDialog(_this31,e)})}},{key:"notifyOnHideDialog",value:function notifyOnHideDialog(e){var _this32=this;this.layoutEventListeners.forEach(function(t){t.onHideDialog&&t.onHideDialog(_this32,e)})}},{key:"notifyOnShowDialog",value:function notifyOnShowDialog(e){var _this33=this;this.layoutEventListeners.forEach(function(t){t.onShowDialog&&t.onShowDialog(_this33,e)})}},{key:"notifyOnChangeDialogPosition",value:function notifyOnChangeDialogPosition(e,t,n){var _this34=this;this.layoutEventListeners.forEach(function(i){i.onChangeDialogPosition&&i.onChangeDialogPosition(_this34,e,t,n)})}},{key:"notifyOnContainerResized",value:function notifyOnContainerResized(e){var _this35=this;this.layoutEventListeners.forEach(function(t){t.onContainerResized&&t.onContainerResized(_this35,e)})}},{key:"notifyOnTabChange",value:function notifyOnTabChange(e){var _this36=this;this.layoutEventListeners.forEach(function(t){t.onTabChanged&&t.onTabChanged(_this36,e)})}},{key:"notifyOnActivePanelChange",value:function notifyOnActivePanelChange(e,t){var _this37=this;this.layoutEventListeners.forEach(function(n){n.onActivePanelChange&&n.onActivePanelChange(_this37,e,t)})}},{key:"notifyOnActiveDocumentChange",value:function(){var _notifyOnActiveDocumentChange=_asyncToGenerator(_regeneratorRuntime().mark(function _callee8(e,t){var _iterator17,_step17,n;return _regeneratorRuntime().wrap(function _callee8$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_iterator17=_createForOfIteratorHelper(this.layoutEventListeners);_context8.prev=1;_iterator17.s();case 3:if((_step17=_iterator17.n()).done){_context8.next=11;break}n=_step17.value;_context8.t0=n.onActiveDocumentChange;if(!_context8.t0){_context8.next=9;break}_context8.next=9;return n.onActiveDocumentChange(this,e,t);case 9:_context8.next=3;break;case 11:_context8.next=16;break;case 13:_context8.prev=13;_context8.t1=_context8["catch"](1);_iterator17.e(_context8.t1);case 16:_context8.prev=16;_iterator17.f();return _context8.finish(16);case 19:case"end":return _context8.stop()}},_callee8,this,[[1,13,16,19]])}));function notifyOnActiveDocumentChange(_x10,_x11){return _notifyOnActiveDocumentChange.apply(this,arguments)}return notifyOnActiveDocumentChange}()},{key:"saveState",value:function saveState(){return(new v).serialize(this.context.model)}},{key:"loadState",value:function(){var _loadState=_asyncToGenerator(_regeneratorRuntime().mark(function _callee9(e){var t;return _regeneratorRuntime().wrap(function _callee9$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:t=new W(this);_context9.next=3;return t.deserialize(e);case 3:this.context.model=_context9.sent;this.setModel(this.context.model);case 5:case"end":return _context9.stop()}},_callee9,this)}));function loadState(_x12){return _loadState.apply(this,arguments)}return loadState}()},{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){s.arrayContains(e,t.elementContent.id)||t.close()}),this.context.model.dialogs.forEach(function(t){s.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 n=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 i=this._activeDocument;e&&e.panelType==t.document&&(this._activeDocument=e),!e&&n&&n.isDialog&&null==e&&this._lastPanelNotADialog&&this.activePanel!=this._lastPanelNotADialog&&(e=this._lastPanelNotADialog,this._lastPanelNotADialog=void 0),this.notifyOnActivePanelChange(e,n),i!=this._activeDocument&&this.notifyOnActiveDocumentChange(this._activeDocument,i),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)}}])}();DockSpawnTS=i})();
@@ -413,12 +413,14 @@ export class PanelContainer {
413
413
  this.elementPanel.style.height = height + 'px';
414
414
  //if (this.elementContentContainer.parentElement != this.dockManager.config.dialogRootElement)
415
415
  // this.dockManager.config.dialogRootElement.appendChild(this.elementContentContainer);
416
- const rect = this.elementContentWrapper.getBoundingClientRect();
417
- const rootRect = this.dockManager.config.dialogRootElement.getBoundingClientRect();
418
- this.elementContentContainer.style.left = (rect.x - rootRect.x) + 'px';
419
- this.elementContentContainer.style.top = (rect.y - rootRect.y) + 'px';
420
- this.elementContentContainer.style.width = rect.width + 'px';
421
- this.elementContentContainer.style.height = rect.height + 'px';
416
+ requestAnimationFrame(() => {
417
+ const rect = this.elementContentWrapper.getBoundingClientRect();
418
+ const rootRect = this.dockManager.config.dialogRootElement.getBoundingClientRect();
419
+ this.elementContentContainer.style.left = (rect.x - rootRect.x) + 'px';
420
+ this.elementContentContainer.style.top = (rect.y - rootRect.y) + 'px';
421
+ this.elementContentContainer.style.width = rect.width + 'px';
422
+ this.elementContentContainer.style.height = rect.height + 'px';
423
+ });
422
424
  }
423
425
  setDialogPosition(x, y) {
424
426
  this.elementContentContainer.style.left = x + 'px';
@@ -1 +1 @@
1
- {"version":3,"file":"PanelContainer.js","sourceRoot":"","sources":["../../src/PanelContainer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,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7B,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,6BAA6B;oBAC9D,CAAC;gBACL,CAAC;qBACI,CAAC;oBACF,IAAI,CAAC;wBACD,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;oBAC9C,CAAC;oBAAC,OAAO,GAAG,EAAE,CAAC;wBACX,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBACvB,CAAC;oBACD,IAAI,CAAC,YAAY,EAAE,CAAC;gBACxB,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC"}
@@ -42,9 +42,9 @@ export declare class TabHandle {
42
42
  closeContextMenu(): void;
43
43
  windowsContextMenuClose(e: Event): void;
44
44
  onMouseDown(e: any): void;
45
- onMouseUp(e: any): void;
45
+ onMouseUp(): void;
46
46
  moveTabEvent(that: any, state: any): void;
47
- onMouseMove(e: any): void;
47
+ onMouseMove(e: MouseEvent): void;
48
48
  hideCloseButton(state: any): void;
49
49
  updateTitle(): void;
50
50
  destroy(): void;
@@ -178,7 +178,7 @@ export class TabHandle {
178
178
  this.mouseUpHandler = new EventHandler(window, 'mouseup', this.onMouseUp.bind(this));
179
179
  this.touchUpHandler = new EventHandler(window, 'touchend', this.onMouseUp.bind(this));
180
180
  }
181
- onMouseUp(e) {
181
+ onMouseUp() {
182
182
  if (this.elementBase) {
183
183
  this.elementBase.classList.remove('dockspan-tab-handle-dragged');
184
184
  }
@@ -205,6 +205,10 @@ export class TabHandle {
205
205
  }
206
206
  onMouseMove(e) {
207
207
  e.preventDefault();
208
+ if (e.buttons == 0) {
209
+ this.onMouseUp();
210
+ return;
211
+ }
208
212
  if (Math.abs(this.stargDragPosition - e.clientX) < 10)
209
213
  return;
210
214
  if (this.elementBase != null) { //Todo: because of this is null, we need to drag 2 times, needs fix
@@ -1 +1 @@
1
- {"version":3,"file":"TabHandle.js","sourceRoot":"","sources":["../../src/TabHandle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,c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,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;;gBAE7D,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,4BAA4B,CAAC,CAAC;QACxE,CAAC;IACL,CAAC"}
@@ -128,6 +128,10 @@ export class UndockInitiator {
128
128
  return;
129
129
  e = e.touches[0];
130
130
  }
131
+ if (e.buttons == 0) {
132
+ this.onMouseUp();
133
+ return;
134
+ }
131
135
  let position = new Point(e.clientX, e.clientY);
132
136
  let dy = position.y - this.dragStartPosition.y;
133
137
  if (dy > this.thresholdPixels || dy < -this.thresholdPixels) {
@@ -1 +1 @@
1
- {"version":3,"file":"UndockInitiator.js","sourceRoot":"","sources":["../../src/UndockInitiator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAInC;;;;;GAKG;AACH,MAAM,OAAO,eAAe;IACxB,cAAc,CAAe;IAC7B,cAAc,CAAe;IAC7B,gBAAgB,CAAe;IAC/B,gBAAgB,CAAe;IAC/B,iBAAiB,CAAQ;IACzB,eAAe,CAAS;IACxB,QAAQ,CAAU;IAClB,gBAAgB,CAAe;IAC/B,gBAAgB,CAAe;IAC/B,OAAO,CAAc;IACrB,mBAAmB,CAA+C;IAClE,wBAAwB,CAAe;IAEvC,YAAY,OAAgB,EAAE,kBAAgE,EAAE,eAAwB;QACpH,IAAI,CAAC,eAAe,EAAE,CAAC;YACnB,eAAe,GAAG,CAAC,CAAC;QACxB,CAAC;QAED,IAAI,CAAC,OAAO,GAAG,OAAsB,CAAC;QACtC,IAAI,CAAC,mBAAmB,GAAG,kBAAkB,CAAC;QAC9C,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,QAAQ,CAA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ockSpawnTsWebcomponent extends HTMLElement {
88
88
  if (dockPanelTypeAttribute)
89
89
  dockPanelType = dockPanelTypeAttribute;
90
90
  let hideCloseButton = element.hasAttribute('dock-spawn-hide-close-button');
91
- let container = new PanelContainer(slot, this.dockManager, element.title, dockPanelType, hideCloseButton);
91
+ let dockSpawnTitle = element.getAttribute('dock-spawn-title');
92
+ let container = new PanelContainer(slot, this.dockManager, dockSpawnTitle ?? element.title, dockPanelType, hideCloseButton);
92
93
  element.slot = slotName;
93
94
  this.slotElementMap.set(slot, element);
94
95
  this.elementContainerMap.set(element, container);
@@ -1 +1 @@
1
- {"version":3,"file":"DockSpawnTsWebcomponent.js","sourceRoot":"","sources":["../../../src/webcomponent/DockSpawnTsWebcomponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,YAAY;AACZ,OAAO,MAAM,MAAM,yCAAyC,CAAC,OAAO,IAAI,EAAG,KAAK,EAAC,CAAA;AACjF,YAAY;AACZ,OAAO,MAAM,MAAM,mCAAmC,CAAC,OAAO,IAAI,EAAG,KAAK,EAAC,CAAA;AAE3E,SAAS,WAAW,CAAC,OAA6B,EAAE,MAAa;IAC7D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QACpB,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SACrB,CAAC;QACF,IAAI,CAAC,GAAG,EAAE,CAAA;QACV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QACxC,CAAC;QACD,OAAO,CAAC,CAAC;IAC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KAAc,EAAE,eAAyB;QAChI,IAAI,SAAS,GAAG,IAAI,cAAc,CAAC,OAAsB,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;QAChH,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IAClI,CAAC;IAED,WAAW,CAAC,OAAoB,EAAE,CAAS,EAAE,CAAS,EAAE,KAAa,EAAE,MAAc,EAAE,SAAqB,EAAE,KAAc,EAAE,eAAyB;QACnJ,IAAI,SAAS,GAAG,IAAI,cAAc,CAAC,OAAsB,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;QAChH,IAAI,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;QAC9D,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC9B,CAAC;;AAGL,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dock-spawn-ts",
3
- "version": "3.4.0",
3
+ "version": "3.6.0",
4
4
  "description": "DockSpawn Typescript Version",
5
5
  "license": "MIT",
6
6
  "author": "jochen.kuehner@gmx.de",
@@ -180,7 +180,7 @@ export class PanelContainer implements IDockContainerWithSize {
180
180
  let btnNewBrowserWindow = document.createElement('div');
181
181
  btnNewBrowserWindow.innerText = Localizer.getString('NewBrowserWindow');
182
182
  result.push(btnNewBrowserWindow);
183
-
183
+
184
184
  btnNewBrowserWindow.onclick = () => {
185
185
  panelContainer.undockToBrowserDialog();
186
186
  panelContainer.closeContextMenu();
@@ -199,7 +199,7 @@ export class PanelContainer implements IDockContainerWithSize {
199
199
  if (menuItems.length == 0) {
200
200
  return;
201
201
  }
202
-
202
+
203
203
  this._ctxMenu = document.createElement('div');
204
204
  this._ctxMenu.className = 'dockspab-tab-handle-context-menu';
205
205
  this._ctxMenu.append(...menuItems);
@@ -474,12 +474,14 @@ export class PanelContainer implements IDockContainerWithSize {
474
474
 
475
475
  //if (this.elementContentContainer.parentElement != this.dockManager.config.dialogRootElement)
476
476
  // this.dockManager.config.dialogRootElement.appendChild(this.elementContentContainer);
477
- const rect = this.elementContentWrapper.getBoundingClientRect();
478
- const rootRect = this.dockManager.config.dialogRootElement.getBoundingClientRect();
479
- this.elementContentContainer.style.left = (rect.x - rootRect.x) + 'px';
480
- this.elementContentContainer.style.top = (rect.y - rootRect.y) + 'px';
481
- this.elementContentContainer.style.width = rect.width + 'px';
482
- this.elementContentContainer.style.height = rect.height + 'px';
477
+ requestAnimationFrame(() => {
478
+ const rect = this.elementContentWrapper.getBoundingClientRect();
479
+ const rootRect = this.dockManager.config.dialogRootElement.getBoundingClientRect();
480
+ this.elementContentContainer.style.left = (rect.x - rootRect.x) + 'px';
481
+ this.elementContentContainer.style.top = (rect.y - rootRect.y) + 'px';
482
+ this.elementContentContainer.style.width = rect.width + 'px';
483
+ this.elementContentContainer.style.height = rect.height + 'px';
484
+ });
483
485
  }
484
486
 
485
487
  setDialogPosition(x: number, y: number) {
package/src/TabHandle.ts CHANGED
@@ -131,7 +131,7 @@ export class TabHandle {
131
131
  let btnNewBrowserWindow = document.createElement('div');
132
132
  btnNewBrowserWindow.innerText = Localizer.getString('NewBrowserWindow');
133
133
  result.push(btnNewBrowserWindow);
134
-
134
+
135
135
  btnNewBrowserWindow.onclick = () => {
136
136
  (<PanelContainer>tabHandle.parent.container).undockToBrowserDialog();
137
137
  tabHandle.closeContextMenu();
@@ -146,14 +146,14 @@ export class TabHandle {
146
146
 
147
147
  if (!this._ctxMenu && TabHandle.createContextMenuContentCallback) {
148
148
  const menuItems = TabHandle.createContextMenuContentCallback(
149
- this,
149
+ this,
150
150
  this.parent.container.dockManager.context.model.documentManagerNode.children
151
151
  );
152
152
 
153
153
  if (menuItems.length == 0) {
154
154
  return;
155
155
  }
156
-
156
+
157
157
  this._ctxMenu = document.createElement('div');
158
158
  this._ctxMenu.className = 'dockspab-tab-handle-context-menu';
159
159
  this._ctxMenu.append(...menuItems);
@@ -212,7 +212,7 @@ export class TabHandle {
212
212
  this.touchUpHandler = new EventHandler(window, 'touchend', this.onMouseUp.bind(this));
213
213
  }
214
214
 
215
- onMouseUp(e) {
215
+ onMouseUp() {
216
216
  if (this.elementBase) {
217
217
  this.elementBase.classList.remove('dockspan-tab-handle-dragged');
218
218
  }
@@ -239,9 +239,13 @@ export class TabHandle {
239
239
  });
240
240
  }
241
241
 
242
- onMouseMove(e) {
242
+ onMouseMove(e: MouseEvent) {
243
243
  e.preventDefault();
244
244
 
245
+ if (e.buttons == 0) {
246
+ this.onMouseUp();
247
+ return;
248
+ }
245
249
  if (Math.abs(this.stargDragPosition - e.clientX) < 10)
246
250
  return;
247
251
  if (this.elementBase != null) { //Todo: because of this is null, we need to drag 2 times, needs fix
@@ -153,9 +153,14 @@ export class UndockInitiator {
153
153
  e = e.touches[0];
154
154
  }
155
155
 
156
+ if ((<MouseEvent>e).buttons == 0){
157
+ this.onMouseUp();
158
+ return;
159
+ }
160
+
156
161
  let position = new Point(e.clientX, e.clientY);
157
162
  let dy = position.y - this.dragStartPosition.y;
158
-
163
+
159
164
  if (dy > this.thresholdPixels || dy < -this.thresholdPixels) {
160
165
  this.enabled = false;
161
166
  this._requestUndock(e);
@@ -166,7 +171,7 @@ export class UndockInitiator {
166
171
  let top = 0;
167
172
  let left = 0;
168
173
  let currentElement = this.element;
169
-
174
+
170
175
  do {
171
176
  top += currentElement.offsetTop || 0;
172
177
  left += currentElement.offsetLeft || 0;
@@ -106,7 +106,8 @@ export class DockSpawnTsWebcomponent extends HTMLElement {
106
106
  if (dockPanelTypeAttribute)
107
107
  dockPanelType = <PanelType><any>dockPanelTypeAttribute;
108
108
  let hideCloseButton = element.hasAttribute('dock-spawn-hide-close-button');
109
- let container = new PanelContainer(slot, this.dockManager, element.title, dockPanelType, hideCloseButton);
109
+ let dockSpawnTitle = element.getAttribute('dock-spawn-title');
110
+ let container = new PanelContainer(slot, this.dockManager, dockSpawnTitle ?? element.title, dockPanelType, hideCloseButton);
110
111
  element.slot = slotName;
111
112
  this.slotElementMap.set(slot, (<HTMLElement>element));
112
113
  this.elementContainerMap.set(element, container);