UNPKG

docking-egid

Version:

This library is built to provide a solution for Angular enables the creation of complex layouts consisting of panels that can be floated, docked, nested, resized, pinned, unpinned and closed. Additional components can be integrated to create an IDE-like l

1 lines 144 kB
import{r as t,h as e,H as i,c as s,F as n,g as o,f as a}from"./p-5de92891.js";import{h as r,f as h,e as c,g as l,i as d,k as u,r as p,d as g}from"./p-fdf33b6f.js";let m=class{constructor(e){t(this,e)}render(){return e(i,{disabled:this.disabled},e("button",{name:this.name,type:this.type,value:this.value,"aria-disabled":this.disabled?"true":null},e("slot",null)))}};m.style="button{position:static;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:auto;height:100%;min-width:10px;padding:2px 4px;border-radius:2px;color:var(--igc-button-text, rgba(0, 0, 0, 0.72));cursor:pointer;outline-style:none;font-size:14px;font-family:inherit;background:transparent;border:none;-webkit-tap-highlight-color:transparent;opacity:0.7;-webkit-transition:background 0.25s ease-out, opacity 0.25s ease-out, -webkit-box-shadow 0.25s ease-out;transition:background 0.25s ease-out, opacity 0.25s ease-out, -webkit-box-shadow 0.25s ease-out;transition:background 0.25s ease-out, opacity 0.25s ease-out, box-shadow 0.25s ease-out;transition:background 0.25s ease-out, opacity 0.25s ease-out, box-shadow 0.25s ease-out, -webkit-box-shadow 0.25s ease-out}:host([disabled]){pointer-events:none}:host{display:-ms-flexbox;display:flex}button{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}button:hover{opacity:1}button:focus{background:var(--igc-accent-color, #fff);-webkit-box-shadow:inset 0 0 0 1px var(--igc-active-color, cornflowerblue);box-shadow:inset 0 0 0 1px var(--igc-active-color, cornflowerblue);opacity:1}button[disabled]{opacity:0.54}";class b{static isDockingIndicatorVertical(e){return e===r.top||e===r.bottom||e===r.outerTop||e===r.outerBottom}static isDockingIndicatorBefore(e){return e===r.top||e===r.left||e===r.outerTop||e===r.outerLeft}static isDockingIndicatorBeforeRTL(e){return e===r.top||e===r.right||e===r.outerTop||e===r.outerRight}static isDockingIndicatorOuter(e){return e===r.outerLeft||e===r.outerRight||e===r.outerTop||e===r.outerBottom}static isSplitPaneVertical(e){return e.orientation===h.vertical}static isAltPressed(e){return e.altKey||e.getModifierState("Alt")||e.getModifierState("AltGraph")}static isControlOrMetaPressed(e){return e.ctrlKey||e.metaKey||e.getModifierState("Meta")||e.getModifierState("OS")}static partNameMap(e,t=" "){return Object.keys(e).filter((t=>e[t])).join(t)}static getDirection(e){let t="";if(""!==e.dir)t=e.dir;else{let n=e.parentElement;for(;n;){if(""!==n.dir){t=n.dir;break}n=n.parentElement}}return t}}var x,f,w;!function(e){e.top="top",e.bottom="bottom"}(x||(x={})),function(e){e.top="top",e.bottom="bottom"}(f||(f={})),function(e){e.allPanes="allPanes",e.selectedPane="selectedPane"}(w||(w={}));let v=class{constructor(e){t(this,e),this.rendered=s(this,"rendered",7),this.disabled=!1,this.isSingleFloating=!1}componentDidRender(){this.rendered.emit()}render(){const t=this.size||0===this.size?this.size:100,n=this.unpinnedSize?this.unpinnedSize:200,o=b.partNameMap({"content-pane":!0,disabled:this.disabled,"single-floating":this.isSingleFloating});return e(i,{role:"group","aria-label":this.header,"aria-disabled":this.disabled?"true":"false",tabindex:this.disabled?-1:0,style:{flex:this.isFlyout?`0 1 ${n}px`:`${t} 1 ${t}px`},part:o},e("slot",{name:"header"}),e("slot",null))}};v.style=":host{--min-pane-size:0px;position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden;width:100%;height:100%;min-width:var(--min-pane-size);min-height:var(--min-pane-size);-webkit-box-sizing:border-box;box-sizing:border-box;pointer-events:all}:host(:focus){outline-style:none}:host([part~=disabled]:not([part~=single-floating])),:host([part~=disabled])>slot:not([name]){pointer-events:none}";let M=class{constructor(e){t(this,e),this.menuClosed=s(this,"menuClosed",7),this.activeIndex=0,this.handleDocumentResize=()=>{this.menuClosed.emit()},this.handleDocumentMouseDown=e=>{e.composedPath().every((e=>e!==this.elem))&&this.menuClosed.emit()}}emitMenuClosed(){this.menuClosed.emit()}connectedCallback(){document.defaultView.addEventListener("resize",this.handleDocumentResize,!1),document.defaultView.addEventListener("mousedown",this.handleDocumentMouseDown,!1)}disconnectedCallback(){document.defaultView.removeEventListener("resize",this.handleDocumentResize,!1),document.defaultView.removeEventListener("mousedown",this.handleDocumentMouseDown,!1)}componentDidLoad(){const e=null!==this.target.querySelector('slot[name="tabsMoreButton"]'),t=this.menuItemsDiv.getBoundingClientRect(),n=this.elem.getBoundingClientRect(),i=this.target.getRootNode(),o=i.host.getBoundingClientRect(),a="igc-tab-header-component"===i.host.tagName.toLowerCase(),s=a?i.host.parentElement.shadowRoot:i,r=s.host.getBoundingClientRect(),l=s.querySelector('div[part~="tabs-content"]').getBoundingClientRect(),c=o.right-t.right<=0,d=r.bottom+t.bottom>=window.innerHeight||r.height+t.bottom>=window.innerHeight||e&&l.height-t.height>0?l.top+(l.height-t.bottom):o.top-t.top+o.height,h=l.top-t.top,g=c?o.right-t.width:o.left,p=c?o.left:o.right-t.width,u=o.left+(o.width-t.width)/2;let m=c?p:g,b=this.orientation===f.bottom?a?d:h:d;const v=b+t.height;switch(b=b>=0?b:d,this.position){case"start":m=g;break;case"center":m=o.width>t.width&&u;break;case"stretch":this.menuItemsDiv.style.width=o.width>t.width&&`${o.width}px`;break;default:m=p}this.orientation===f.bottom&&v>n.height&&(b=h),m-=t.left,this.menuItemsDiv.style.left=`${m}px`,this.menuItemsDiv.style.top=`${b}px`,this.menuItemsDiv.style.visibility="visible",this.focusItemAndSetActiveIndex()}focusItemAndSetActiveIndex(){var e;null===(e=this.menuItemsDiv.querySelector('div[part="menu-item"]'))||void 0===e||e.focus()}handleKeyboardEvents(e,t){const n=this.menuItemsDiv.querySelectorAll('div[part="menu-item"]');"ArrowDown"===t.key?this.activeIndex<n.length-1&&(this.activeIndex++,n[this.activeIndex].focus()):"ArrowUp"===t.key?this.activeIndex>0&&(this.activeIndex--,n[this.activeIndex].focus()):"Enter"===t.key||" "===t.key?(e.clickHandler(),this.emitMenuClosed()):"Escape"===t.key&&this.emitMenuClosed()}handleMenuItemClick(e){e.clickHandler(),this.emitMenuClosed()}renderItemIcon(t){return e(n,null,"close"===t.iconName&&this.renderCloseButton(),"unpin"===t.iconName&&this.renderUnpinButton(),null!==t.iconName&&"close"!==t.iconName&&"unpin"!==t.iconName&&e("igc-icon-component",{name:t.iconName}))}renderCloseButton(){return e("slot",{name:"contextMenuCloseButton"},e("igc-icon-component",{part:"context-menu-close-button",name:"close"}))}renderUnpinButton(){return e("slot",{name:"contextMenuUnpinButton"},e("igc-icon-component",{part:"context-menu-unpin-button",name:"unpin"}))}render(){return e(i,{part:"context-menu",exportparts:"context-menu,\r\n menu-item: context-menu-item,\r\n menu-content: context-menu-content,\r\n context-menu-close-button,\r\n context-menu-unpin-button"},e("div",{role:"menu",part:"menu-content",ref:e=>this.menuItemsDiv=e,onMouseDown:e=>{e.preventDefault()}},this.items.map((t=>{const n=b.partNameMap({"menu-item":!0,disabled:t.disabled});return e("div",{role:"menuitem",part:n,tabindex:"-1",onKeyDown:this.handleKeyboardEvents.bind(this,t),onClick:this.handleMenuItemClick.bind(this,t)},e("span",{style:{flexGrow:"1",userSelect:"none"}},t.displayText),this.renderItemIcon(t))}))))}get elem(){return o(this)}};function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function z(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function L(e,t){return!t||"object"!==y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function k(e){var t="function"==typeof Map?new Map:void 0;return(k=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return C(e,arguments,N(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),j(n,e)})(e)}function C(e,t,n){return(C=D()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&j(o,n.prototype),o}).apply(null,arguments)}function D(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function j(e,t){return(j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}M.style=":host{position:absolute;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;top:0;left:0;bottom:0;right:0;z-index:10002;pointer-events:none}:host igc-icon-component svg{width:17px;height:17px}:host igc-icon-component{margin-left:8px}[part=menu-content]{position:absolute;visibility:hidden;color:var(--igc-context-menu-color, var(--igc-text-color, rgba(0, 0, 0, 0.72)));background:var(--igc-context-menu-background, var(--igc-accent-color, #fff));border:1px solid var(--igc-context-menu-background, var(--igc-accent-color, #fff));pointer-events:all;-webkit-box-shadow:0 5px 22px rgba(0, 0, 0, 0.08), 0 12px 17px 2px rgba(0, 0, 0, 0.12), 0 7px 8px -4px rgba(0, 0, 0, 0.26);box-shadow:0 5px 22px rgba(0, 0, 0, 0.08), 0 12px 17px 2px rgba(0, 0, 0, 0.12), 0 7px 8px -4px rgba(0, 0, 0, 0.26);-webkit-box-sizing:border-box;box-sizing:border-box}[part~=menu-item]{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:6px 8px;font-size:0.75em;line-height:1.7;cursor:pointer;-webkit-transition:background 0.25s ease-out, color 0.25s ease-out;transition:background 0.25s ease-out, color 0.25s ease-out;outline-style:none}[part~=menu-item]:hover{background:var(--igc-context-menu-background-active, var(--igc-border-color, #F3F5F7));color:var(--igc-context-menu-color-active, #000)}[part~=menu-item]:focus{background:var(--igc-context-menu-background-active, var(--igc-border-color, #F3F5F7));color:var(--igc-context-menu-color-active, #000)}[part~=disabled]{pointer-events:none;color:var(--igc-disabled-color, rgba(0, 0, 0, 0.38))}","undefined"!=typeof customElements&&(customElements.get("igc-trial-watermark")||customElements.define("igc-trial-watermark",function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&j(e,t)}(o,k(HTMLElement));var e,t,n,i=(e=o,t=D(),function(){var n,i=N(e);if(t){var o=N(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return L(this,n)});function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var t=(e=i.call(this)).attachShadow({mode:"closed"});e.__anchor=document.createElement("a"),e.__anchor.setAttribute("class","watermark__link"),e.__anchor.setAttribute("href","https://www.infragistics.com/how-to-buy/renewal"),e.__anchor.setAttribute("target","_blank");var n=document.createElement("span");n.setAttribute("class","watermark__background-img");var a=document.createElement("style");return a.textContent=":host{display:block;position:absolute;bottom:0;right:0;width:100%;height:100%;z-index:10000;pointer-events:none}:host .watermark__link{display:inline-flex;align-items:center;position:absolute;bottom:0;right:0;font-family:'Titillium Web', sans-serif;font-size:.875rem;padding:.125rem .25rem;line-height:normal;border:1px solid var(--igx-watermark-border-color, #09f);color:var(--igx-watermark-color, #fff);z-index:10002;background-color:var(--igx-watermark-link-background, #09f);pointer-events:all;text-decoration:none}:host .watermark__link img{margin-right:4px}:host .watermark__background-img{width:100%;height:100%;position:absolute;top:0;left:0;z-index:10001;pointer-events:none;background-image:var(--igx-watermark-background-image, url(\"data:image/svg+xml;base64,PH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C4yIDEuMyAwLjIgMiAwLjEgMC40IDAuNCAwLjkgMC43IDEuNCAwLjlsMC4zLTFjLTAuMS0wLjEtMC4zLTAuMS0wLjMtMC4zLTAuMS0wLjEtMC4xLTAuMyAwLTAuNGwwLjctMi43YzAuMy0wLjcgMC4yLTEuMiAwLTEuNnptLTEuNiAyLjYtMC40IDEuNWgtMC4yYy0wLjQgMC0wLjkgMC0xLjMtMC4yLTAuNS0wLjEtMC42LTAuNS0wLjUtMXMwLjUtMC44IDAuOS0wLjdoMC4xYzAgMC4yIDEuNCAwLjQgMS40IDAuNHptMy41IDMuOSAyLjMtOC40LTEuMy0wLjQtMi4zIDguNCAxLjMgMC40eiIvPgo8L3N2Zz4K\"));background-size:200px 150px;background-position:top left}@media all and (-ms-high-contrast: none){:host .watermark__background-img{background-image:none}}\n",t.appendChild(a),t.appendChild(e.__anchor),t.appendChild(n),document.getElementById("igniteui-watermark-themes")||(e.__themes=document.createElement("style"),e.__themes.setAttribute("id","igniteui-watermark-themes"),e.__themes.textContent=".dark-theme {\n --igx-watermark-border-color: #72da67;\n --igx-watermark-color: #fff;\n --igx-watermark-link-background: #72da67;\n --igx-watermark-background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxODQiIGhlaWdodD0iMTA0IiB2aWV3Qm94PSIwIDAgMTg0IDEwNCI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbDogI2ZmZjsKICAgICAgICBmaWxsLXJ1bGU6IGV2ZW5vZGQ7CiAgICAgICAgb3BhY2l0eTogMC4wNTsKICAgICAgfQogICAgPC9zdHlsZT4KICA8L2RlZnM+CiAgPHBhdGggaWQ9InRyaWFsIiBjbGFzcz0iY2xzLTEiIGQ9Ik0xNi43MiwxMC4xNDhMMTAuMyw4LjQzNGwxLjgwNi02LjcyM0w3LjA5LDAuMzY5LDUuMjgzLDcu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Y2NSwyLjY2NSwwLDAsMS0xLjM0My0xLjAzLDIuMjczLDIuMjczLDAsMCwxLS4xMy0xLjY1bDIuODQtMTAuNTcxUTY1LjIsMjYuNDgyLDYzLjgwOCwyNC4xNDdaTTU3LjcsMzQuMzY3bC0xLjY1Nyw2LjE2Ni0wLjkxMi4wNTVBMTguNjM1LDE4LjYzNSwwLDAsMSw1MCw0MC4wMTNxLTIuODM2LS43NTgtMS45NzYtMy45NTdhMy4yMzcsMy4yMzcsMCwwLDEsNC4xNDItMi42MlpNNzEuNTMyLDQ5LjY0Mmw4LjgyLTMyLjgyNi01LjA2OC0xLjM1NC04LjgyLDMyLjgyNloiLz4KPC9zdmc+Cg==');\n}\n\n.light-theme {\n --igx-watermark-border-color: #e41c77;\n --igx-watermark-color: #fff;\n --igx-watermark-link-background: #e41c77;\n --igx-watermark-background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzNjYiIGhlaWdodD0iMjA5IiB2aWV3Qm94PSIwIDAgMzY2IDIwOSI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbC1ydWxlOiBldmVub2RkOwogICAgICAgIG9wYWNpdHk6IDAuMDU7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxwYXRoIGlkPSJ0cmlhbCIgY2xhc3M9ImNscy0xIiBkPSJNMzMuMzUsMjAuM2wtMTIuOC0zLjQyOSwzLjYtMTMuNDQ2TDE0LjE0MSwwLjczOGwtMy42LDEzLjQ0Nkw0LjYsMTIuNTk0LDIuMjkzLDIxLjIxOGw1LjkzNSwxLjU5TDIuNDYzLDQ0LjMyMVEtMC4yMiw1NC4zMzYsMS43MzIsNTguNzM1dDkuODM0LDYuNTExYTU2LjA2MSw1Ni4wNjEsMCwwLDAsOS43ODEsMS4zMjlsMS43LTguMTkyLTcuNjc4LTEuNzU5cS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4yMjctMS4xNXEtNS42NTctMS41MTYtMy45NDItNy45MTR0OC4yNjItNS4yNFptMjcuNTkyLDMwLjU1LDE3LjU5MS02NS42NTJMMTUwLjE2LDMwLjkyMywxMzIuNTY4LDk2LjU3NVoiLz4KPC9zdmc+Cg==');\n}"),e}return(n=[{key:"connectedCallback",value:function(){this.__anchor.textContent=this.hasAttribute("text")?this.getAttribute("text"):"Trial version of Ignite UI for Angular";var e=document.createElement("img");e.setAttribute("src","data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0id2hpdGUiIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0xNyA3aC00djJoNGMxLjY1IDAgMyAxLjM1IDMgM3MtMS4zNSAzLTMgM2gtNHYyaDRjMi43NiAwIDUtMi4yNCA1LTVzLTIuMjQtNS01LTV6bS02IDhIN2MtMS42NSAwLTMtMS4zNS0zLTNzMS4zNS0zIDMtM2g0VjdIN2MtMi43NiAwLTUgMi4yNC01IDVzMi4yNCA1IDUgNWg0di0yem0tMy00aDh2Mkg4eiIvPjwvc3ZnPg=="),this.__anchor.prepend(e),this.__themes&&this.hasAttribute("theming")&&this.getAttribute("theming")&&document.head.appendChild(this.__themes)}}])&&z(o.prototype,n),o}()));class I{constructor(){this.map=new Map,this.reversedMap=new Map}set(e,t){this.map.set(e,t),this.reversedMap.set(t,e)}get(e){return this.map.get(e)}getByValue(e){return this.reversedMap.get(e)}delete(e){const t=this.map.get(e);this.map.delete(e),this.reversedMap.delete(t)}has(e){return this.map.has(e)}hasValue(e){return this.reversedMap.has(e)}}class A{constructor(e){this.dockManager=e,this.unpinnedLocationMap=new Map}getContent(e){return this.clientContentPanesMap.get(e)}generateUuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}populatePaneParents(e,t,n){if(e){e.id||(e.id=this.generateUuid());for(const i of e.panes)if(this.paneParentMap.set(i,e),i.id||(i.id=this.generateUuid()),i.type!==c.contentPane||i.hidden)if(i.type===c.splitPane)this.populatePaneParents(i,t,n);else if(i.type===c.tabGroupPane)for(const e of i.panes)e.id||(e.id=this.generateUuid()),this.paneParentMap.set(e,i),e.hidden||(this.clientContentPanesMap.set(e.contentId,e),n?this.visibleDocuments.push(e):this.visibleContentPanes.push(e));else i.type===c.documentHost&&(t&&this.documentHosts.push(i),this.paneParentMap.set(i.rootPane,i),this.populatePaneParents(i.rootPane,t,!0));else this.clientContentPanesMap.set(i.contentId,i),n?this.visibleDocuments.push(i):this.visibleContentPanes.push(i)}}populatePinLocations(e){if(e)for(const t of e.panes)if(t.type===c.splitPane)this.populatePinLocations(t);else if(t.type===c.tabGroupPane)for(const e of t.panes)this.addContentPanePinLocation(e),this.paneParentMap.set(e,t);else t.type===c.contentPane&&this.addContentPanePinLocation(t)}resolvePaneUnpinLocation(e){let t;if(e.unpinnedLocation)t=e.unpinnedLocation;else{const n=this.findClosestDocumentHost(e);t=n?this.findPaneUnpinLocation(e,n):l.left}return t}addContentPanePinLocation(e){if(!1===e.isPinned){const t=this.resolvePaneUnpinLocation(e);this.unpinnedLocationMap.set(e,t)}}findClosestDocumentHost(e){const t=this.getPanePath(e);let n,i=-1;for(const e of this.documentHosts){const o=this.getPanePath(e);let a;for(a=0;a<t.length&&t[a]===o[a];a++);a>i&&(i=a,n=e)}return n}findPaneUnpinLocation(e,t){const n=this.getPanePath(e),i=this.getPanePath(t);let o=-1;for(let e=0;e<n.length&&n[e]===i[e];e++)o=e;if(o>=0){const e=n[o],t=e.panes.indexOf(n[o+1]),a=e.panes.indexOf(i[o+1]);return e.orientation===h.horizontal?t<a?l.left:l.right:t<a?l.top:l.bottom}return l.left}removePane(e){e===this.dockManager.maximizedPane&&(this.dockManager.maximizedPane=null);const t=this.paneParentMap.get(e);if(t)if(t.type===c.splitPane||t.type===c.tabGroupPane){const n=t.panes.indexOf(e);if(t.panes.splice(n,1),0===t.panes.length)if(t.allowEmpty){const t=this.getRootParent(e);this.isFloatingPane(t)&&this.removeFloatingPaneIfEmpty(t)}else this.removePane(t);else if(t.type===c.splitPane){const e=this.getRootParent(t);this.isFloatingPane(e)&&this.removeFloatingPaneIfEmpty(t)}}else t.type===c.documentHost&&(t.rootPane=null,this.removePane(t));else if(this.dockManager.layout.floatingPanes){const t=this.dockManager.layout.floatingPanes.indexOf(e);t>-1&&this.dockManager.layout.floatingPanes.splice(t,1)}}removeFloatingPaneIfEmpty(e){0===this.getChildContentPanes(e).length&&this.removePane(e)}isFloatingPane(e){return!!this.dockManager.layout.floatingPanes&&this.dockManager.layout.floatingPanes.indexOf(e)>-1}addFloatingPane(e,t,n,i){const o={type:c.splitPane,orientation:h.vertical,panes:[e]};o.floatingLocation=t,o.floatingWidth=n,o.floatingHeight=i,this.dockManager.layout.floatingPanes||(this.dockManager.layout.floatingPanes=[]),this.dockManager.layout.floatingPanes.push(o),this.dockManager.draggedPane=o,this.initialFloatingPaneLocation=o.floatingLocation,this.forceDragPane=o}getChildContentPanes(e){const t=[];return this.getChildContentPanesRecursive(e,t),t}getChildContentPanesRecursive(e,t){for(const n of e.panes)n.type===c.contentPane?t.push(n):n.type===c.tabGroupPane||n.type===c.splitPane?this.getChildContentPanesRecursive(n,t):n.type===c.documentHost&&this.getChildContentPanesRecursive(n.rootPane,t)}getChildDocHostRecursive(e){for(const t of e.panes){if(t.type===c.documentHost)return t;if(t.type===c.splitPane){const e=this.getChildDocHostRecursive(t);if(e)return e}}return null}getVisibleContentPanes(e){return e.panes.filter((e=>this.isContentPaneVisible(e)))}getPaneToDock(e){return e.type===c.contentPane||e.type!==c.tabGroupPane&&e.type!==c.splitPane||1!==e.panes.length?e:e.panes[0]}removeDocumentHost(e){const t=this.getChildDocHostRecursive(e);if(t){const e=this.getParent(t),n=e.panes.indexOf(t);e.panes[n]=1===t.rootPane.panes.length?t.rootPane.panes[0]:t.rootPane}}dockToCenter(e,t){let n;if(e.type===c.tabGroupPane)n=e;else if(e.type===c.contentPane){n={type:c.tabGroupPane,size:e.size,panes:[e]};const t=this.paneParentMap.get(e),i=t.panes.indexOf(e);t.panes[i]=n}else e.type===c.splitPane?n=e:e.type===c.documentHost&&(n=e.rootPane);if(n.type===c.tabGroupPane){const e=t.type===c.contentPane?[t]:this.getChildContentPanes(t);n.panes.push(...e)}else if(n.type===c.splitPane){let e=t;if((null==t?void 0:t.type)===c.splitPane&&this.dockManager.documentOnlyDrag){this.removeDocumentHost(t);const n=this.getChildContentPanes(t);e=1===n.length?n[0]:e}n.panes.push(e)}}dockToEdge(e,t){const n=this.getParent(e),i=n.panes.indexOf(e),o=b.isDockingIndicatorVertical(t),a=b.isSplitPaneVertical(n),s=this.dockingIndicator&&"rtl"===this.dockingIndicator.direction;let r=this.dockManager.draggedPane;(null==r?void 0:r.type)===c.splitPane&&this.dockManager.documentOnlyDrag&&!this.dockManager.dropTargetPaneInfo.floatingPaneWithoutDocHost?this.removeDocumentHost(r):(null==r?void 0:r.type)===c.contentPane&&this.dockManager.documentOnlyDrag&&this.dockManager.dropTargetPaneInfo.floatingPaneWithoutDocHost&&(r={type:c.documentHost,rootPane:{type:c.splitPane,orientation:h.horizontal,panes:[r]}});const l=r?this.getPaneToDock(r):this.dockManager.activePane;if(o&&a||!o&&!a){const e=b.isDockingIndicatorBefore(t)&&!s||b.isDockingIndicatorBeforeRTL(t)&&s?i:i+1;n.panes.splice(e,0,l)}else{const o={type:c.splitPane,orientation:a?h.horizontal:h.vertical,panes:b.isDockingIndicatorBefore(t)&&!s||b.isDockingIndicatorBeforeRTL(t)&&s?[l,e]:[e,l],size:e.size};e.size=void 0,l.size=void 0,n.panes[i]=o}}updateLayout(){this.dockManager.layout=Object.assign({},this.dockManager.layout)}processLayout(){this.paneParentMap=new Map,this.unpinnedLocationMap=new Map,this.clientContentPanesMap=new Map,this.documentHosts=[],this.visibleContentPanes=[],this.visibleDocuments=[];const e=this.dockManager.layout;if(e){if(this.populatePaneParents(e.rootPane,!0,!1),e.floatingPanes){const t=new Map(this.dockManager.floatingPaneZIndicesMap);for(let n=0;n<e.floatingPanes.length;n++){const i=e.floatingPanes[n];this.populatePaneParents(i,!1,!1),this.dockManager.floatingPaneZIndicesMap.has(i)?t.delete(i):this.dockManager.floatingPaneZIndicesMap.set(i,n)}for(const e of t.keys())this.dockManager.floatingPaneZIndicesMap.delete(e)}this.populatePinLocations(e.rootPane),this.dockManager.flyoutPane&&!this.unpinnedLocationMap.has(this.dockManager.flyoutPane)&&(this.dockManager.flyoutPane=null)}}getParent(e){return this.paneParentMap.get(e)}getRootParent(e){return this.getPanePath(e)[0]}getPanePath(e){const t=[];let n=e;for(;n;)t.splice(0,0,n),n=this.paneParentMap.get(n);return t}getDocHostParent(e){let t=e;do{t=this.paneParentMap.get(t)}while(t&&t.type!==c.documentHost);return t}resizeFlyoutPane(e){const t=this.dockManager.flyoutPane,n=this.unpinnedLocationMap.get(t),i=t.unpinnedSize?t.unpinnedSize:200;t.unpinnedSize=n===l.left||n===l.top?i+e:i-e,this.updateLayout()}resizePane(e,t){const n=this.getParent(e),i=this.getSplitPaneVisibleChildren(n),o=i.indexOf(e),a=i.map((e=>e.size||0===e.size?e.size:100)),s=t*a.reduce(((e,t)=>t+e),0);i[o-1].size=a[o-1]+s,i[o].size=a[o]-s,this.updateLayout()}togglePin(e,t=w.allPanes){const n=!this.getActualIsPinned(e),i=this.paneParentMap.get(e),o={sourcePane:e,panes:i.type===c.tabGroupPane&&t===w.allPanes?i.panes.filter((e=>!1!==e.allowPinning)):[e],newValue:n,location:this.resolvePaneUnpinLocation(e)};if(!this.dockManager.panePinnedToggle.emit(o).defaultPrevented){for(const e of o.panes)e.isPinned=n;this.dockManager.maximizedPane?(this.dockManager.maximizedPane=null,n?this.dockManager.flyoutPane=null:this.flyoutPane(e)):n&&(this.dockManager.flyoutPane=null),this.updateLayout()}}closePane(e){let t=e;if(e.type===c.contentPane&&e!==this.dockManager.flyoutPane){const n=this.paneParentMap.get(e);n.type===c.tabGroupPane&&(t=n)}((t.type===c.tabGroupPane?this.removeAllowedPanes(e,t):this.emitPaneClose(e,[t]))||e.hidden)&&e===this.dockManager.flyoutPane&&(this.dockManager.flyoutPane=null),this.updateLayout()}closeFloatingPane(e){this.removeAllowedPanes(e,e),this.updateLayout()}emitPaneClose(e,t){let n=!1;const i={sourcePane:e,panes:t};if(!this.dockManager.paneClose.emit(i).defaultPrevented)for(const e of i.panes)this.removePane(e),n=!0;return n}removeAllowedPanes(e,t){let n=!1;const i=this.getChildContentPanes(t).filter((e=>this.getActualAllowClose(e))).filter((n=>t.type!==c.tabGroupPane||e.type!==c.contentPane||!1!==n.isPinned));return n=this.emitPaneClose(e,i),n}flyoutPane(e){this.dockManager.flyoutPane=this.dockManager.flyoutPane===e?null:e}maximizePane(e){const t=this.getParent(e),n=t&&t.type===c.tabGroupPane&&e!==this.dockManager.flyoutPane?t:e;this.dockManager.maximizedPane=this.dockManager.maximizedPane===n?null:n}moveFloatingPane(e,t){e.floatingLocation=t,this.updateLayout()}resizeFloatingPaneStart(e,t){var n,i,o;return!this.dockManager.floatingPaneResizeStart.emit({sourcePane:e,resizerLocation:t}).defaultPrevented&&(this.initialFloatingPaneLocation=null!==(n=e.floatingLocation)&&void 0!==n?n:{x:0,y:0},this.initialFloatingPaneWidth=null!==(i=e.floatingWidth)&&void 0!==i?i:100,this.initialFloatingPaneHeight=null!==(o=e.floatingHeight)&&void 0!==o?o:100,!0)}resizeFloatingPane(e,t){const n=e.floatingLocation?e.floatingLocation.x:0,i=e.floatingLocation?e.floatingLocation.y:0,o=e.floatingWidth?e.floatingWidth:100,a=e.floatingHeight?e.floatingHeight:100,s=100,r=100,l=this.initialFloatingPaneWidth,c=this.initialFloatingPaneHeight,d=this.initialFloatingPaneLocation;let h=t.dragMoveArgs.totalOffsetY,g=t.dragMoveArgs.totalOffsetX,p=n,m=i,b=o,f=a;const v=document.documentElement.clientHeight,x=document.documentElement.clientWidth;switch(t.resizerLocation){case u.top:case u.topLeft:case u.topRight:f=c-h,f<r&&(h=c-r,f=r),m=d.y+h,m<0?(f+=m,m=0):m>=v-1&&(m=v-1);break;case u.bottom:case u.bottomLeft:case u.bottomRight:f=c+h,f<r&&(f=r),m+f>v&&(f=v-m)}switch(t.resizerLocation){case u.left:case u.topLeft:case u.bottomLeft:b=l-g,b<s&&(g=l-s,b=s),p=d.x+g,p<0?(b+=p,p=0):p>=x&&(p=x);break;case u.right:case u.topRight:case u.bottomRight:b=l+g,b<s&&(b=s),p+b>x&&(b=x-p)}if(n===p&&i===m&&o===b&&a===f)return;const P={sourcePane:e,oldWidth:o,newWidth:b,oldHeight:a,newHeight:f,oldLocation:{x:n,y:i},newLocation:{x:p,y:m},resizerLocation:t.resizerLocation};this.dockManager.floatingPaneResizeMove.emit(P).defaultPrevented?t.dragMoveArgs.cancel=!0:(e.floatingLocation=P.newLocation,e.floatingWidth=P.newWidth,e.floatingHeight=P.newHeight,this.updateLayout())}resizeFloatingPaneEnd(e,t){this.dockManager.floatingPaneResizeEnd.emit({sourcePane:e,resizerLocation:t}),this.dockManager.layoutChange.emit()}floatPane(e,t,n,i,o){let a=[e],s=e;const r=this.paneParentMap.get(e);if(e!==this.dockManager.flyoutPane&&r.type===c.tabGroupPane)if(r.allowEmpty){const t=[...r.panes];a=t,s=1===r.panes.length?e:{type:c.tabGroupPane,panes:t,selectedIndex:r.selectedIndex}}else a=[r],s=r;a.forEach((e=>this.removePane(e))),this.addFloatingPane(s,{x:t,y:n},i,o),e===this.dockManager.flyoutPane&&(e.isPinned=!0,this.dockManager.flyoutPane=null),this.updateLayout()}floatTab(e,t,n,i,o){let a;this.removePane(e),a=this.getDocHostParent(e)&&e.documentOnly?{type:c.documentHost,rootPane:{type:c.splitPane,orientation:h.vertical,panes:[e]}}:e,this.addFloatingPane(a,{x:t,y:n},i,o),this.updateLayout()}hasFloatingPaneHeader(e){const t=this.getSplitPaneVisibleChildren(e);if(t&&t.length){if(t.length>1)return!0;const e=t[0];if(e.type===c.splitPane)return this.hasFloatingPaneHeader(e);if(e.type===c.documentHost)return!0}return!1}rootDockPane(e){const t=this.dockManager.layout,n=t.rootPane,i=this.dockManager.draggedPane?this.getPaneToDock(this.dockManager.draggedPane):this.dockManager.activePane;this.removePane(i);const o=e===r.top||e===r.bottom,a=b.isSplitPaneVertical(n),s=this.dockingIndicator&&"rtl"===this.dockingIndicator.direction;if(o&&a||!o&&!a)n.panes.splice(e===r.left&&!s||e===r.right&&s||e===r.top?0:n.panes.length,0,i);else{const o={type:c.splitPane,orientation:a?h.horizontal:h.vertical,panes:e===r.left&&!s||e===r.right&&s||e===r.top?[i,n]:[n,i]};n.size=void 0,i.size=void 0,t.rootPane=o}this.updateLayout()}dockPane(e){var t;const n=null!==(t=this.dockManager.draggedPane)&&void 0!==t?t:this.dockManager.activePane,i=this.dockManager.dropTargetPaneInfo;this.removePane(n);const o=this.dockManager.draggedPane?i.pane:this.getParent(this.dockManager.activePane);switch(e){case r.center:this.dockToCenter(o,n);break;case r.left:case r.top:case r.right:case r.bottom:this.dockToEdge(o,e);break;case r.outerLeft:case r.outerTop:case r.outerRight:case r.outerBottom:this.dockToEdge(this.dockManager.dropTargetPaneInfo.docHost,e)}this.updateLayout()}getActualIsPinned(e){return!1!==e.isPinned}getActualAllowClose(e){return!1!==e.allowClose}isContentPaneVisible(e){return!1!==e.isPinned&&!0!==e.hidden}getSplitPaneVisibleChildren(e){return e.panes.filter((e=>e.type===c.contentPane?this.isContentPaneVisible(e):e.type===c.splitPane?e.allowEmpty||this.getSplitPaneVisibleChildren(e).length:e.type===c.tabGroupPane?e.allowEmpty||e.panes.some((e=>this.isContentPaneVisible(e))):e.type===c.documentHost?e.rootPane.allowEmpty||this.getSplitPaneVisibleChildren(e.rootPane).length:void 0))}closeTabPane(e){this.emitPaneClose(e,[e]),this.updateLayout()}bringFloatingPaneOnTop(e){const t=this.dockManager.layout.floatingPanes,n=this.dockManager.floatingPaneZIndicesMap,i=n.get(e);for(const e of t){const o=n.get(e);o<i||n.set(e,o>i?o-1:t.length-1)}this.dockManager.floatingPaneZIndicesMap=new Map(n)}createContextMenuItems(e){const t=[];return this.getActualAllowClose(e)&&t.push({displayText:this.dockManager.resourceStrings.close,iconName:"close",clickHandler:()=>this.closeTabPane(e)}),!1!==e.allowPinning&&t.push({displayText:this.dockManager.resourceStrings.unpin,iconName:"unpin",clickHandler:()=>this.togglePin(e,w.selectedPane)}),t}dragPaneStart(e,t,n,i){var o;if(this.dockManager.maximizedPane)return!1;let a,s;if(e.type===c.contentPane)s=this.getParent(e),a=s.type===c.tabGroupPane&&e!==this.dockManager.flyoutPane?s.panes:[e];else{if(this.dockManager.draggedPane===e)return!0;a=this.getChildContentPanes(e)}const r=a.some((e=>!1===e.allowDocking))&&a.some((e=>!1===e.allowFloating));if(e.type===c.contentPane&&r)return!1;if(this.dockManager.paneDragStart.emit({sourcePane:e,panes:a}).defaultPrevented)return!1;if(this.draggedPanes=a,this.initialDragClientPoint={x:n,y:i},e.type!==c.splitPane){if(this.draggedPanes.some((e=>!1===e.allowFloating)))return this.dockManager.draggedPane=a.length>1?s:e,!0;const n={type:d.floatPane,location:{x:t.x,y:t.y},width:t.width,height:t.height},i=this.dockManager.paneDragOver.emit({sourcePane:e,panes:a,action:n,isValid:!0});return!i.defaultPrevented&&(i.detail.isValid?(this.floatPane(e,t.x,t.y,n.width,n.height),!1):(this.dockManager.draggedPane=a.length>1?s:e,!0))}return this.dockManager.draggedPane=e,this.initialFloatingPaneLocation=null!==(o=e.floatingLocation)&&void 0!==o?o:{x:0,y:0},!0}dragPaneMove(e,t){const n=this.dockManager.draggedPane;if(n.type===c.splitPane){const i={x:this.initialFloatingPaneLocation.x+e-this.initialDragClientPoint.x,y:this.initialFloatingPaneLocation.y+t-this.initialDragClientPoint.y},o=this.dockManager.paneDragOver.emit({sourcePane:n,panes:this.draggedPanes,action:{type:d.moveFloatingPane,oldLocation:n.floatingLocation?n.floatingLocation:{x:0,y:0},newLocation:i},isValid:!0});if(o.defaultPrevented)return!1;o.detail.isValid&&this.moveFloatingPane(n,i),this.dockManager.isValidDrop=o.detail.isValid}return this.dragOver()}dragPaneEnd(){var e;const t=this.dockingIndicator,n=null!==(e=this.dockManager.draggedPane)&&void 0!==e?e:this.draggedTab;let i=!1;return this.dockManager.paneDragEnd.emit({sourcePane:n,panes:this.draggedPanes}),t&&this.dockManager.isValidDrop&&(n.type===c.contentPane&&!1===n.isPinned&&(n.isPinned=!0,n===this.dockManager.flyoutPane&&(this.dockManager.flyoutPane=null)),t.isRoot?this.rootDockPane(t.position):this.dockPane(t.position),i=!0),this.draggedPanes=null,this.draggedTab=null,this.dockManager.draggedPane=null,this.dockManager.dropTargetPaneInfo=null,this.dockManager.dropShadowRect=null,this.dockManager.isValidDrop=!0,this.dockManager.layoutChange.emit(),i}dragOver(){var e;if(this.dockingIndicator){const t=this.dockManager.paneDragOver.emit({sourcePane:this.dockManager.draggedPane,panes:this.draggedPanes,action:{type:d.dockPane,dockingIndicator:this.dockingIndicator,targetPane:null===(e=this.dockManager.dropTargetPaneInfo)||void 0===e?void 0:e.pane},isValid:!0});if(t.defaultPrevented)return!1;this.dockManager.isValidDrop=t.detail.isValid,this.dockManager.dropShadowRect=this.dockManager.isValidDrop?this.dockingIndicator.isRoot?this.getDropShadowRectRoot():this.getDropShadowRect():null}else this.dockManager.dropShadowRect=null,this.dockManager.draggedPane.type!==c.splitPane&&(this.dockManager.isValidDrop=!1);return!0}dragTabStart(e){return this.shiftLeftThreshold=Number.MAX_VALUE,this.shiftRightThreshold=0,this.dockManager.draggedPane===e||!this.dockManager.paneDragStart.emit({sourcePane:e,panes:[e]}).defaultPrevented&&(this.initialTabHeaderClickOffset=null,this.draggedTab=e,this.draggedPanes=[e],!0)}dragTabMove(e,t,n){const i=t.clientX,o=t.clientY,a=t.offsetX,s=t.totalOffsetY,r=n.headerRect,l=n.prevHeaderRect,c=n.nextHeaderRect,h=n.lastVisibleHeaderRect,g=n.tabsRect;if(this.initialTabHeaderClickOffset||(this.initialTabHeaderClickOffset={x:i-t.totalOffsetX-r.left,y:o-s-r.top}),!1===e.allowFloating&&(i<g.left||i>g.right||o<r.top||o>r.bottom))return this.dockManager.draggedPane=e,this.dragOver();this.dockManager.draggedPane=null,this.dockManager.isValidDrop=!0;const p=this.getParent(e).panes.indexOf(e);if(l&&i<r.left&&i<this.shiftLeftThreshold&&a<0){this.shiftLeftThreshold=l.left;const t=this.dockManager.paneDragOver.emit({sourcePane:e,panes:[e],action:{type:d.moveTab,oldIndex:p,newIndex:p-1},isValid:!0});if(t.defaultPrevented)return!1;if(!t.detail.isValid)return!0;this.shiftTabLeft(e)}else if(c&&i>r.right&&i>this.shiftRightThreshold&&a>0&&(this.shiftRightThreshold=c.right,r.top===c.top)){const t=this.dockManager.paneDragOver.emit({sourcePane:e,panes:[e],action:{type:d.moveTab,oldIndex:p,newIndex:p+1},isValid:!0});if(t.defaultPrevented)return!1;if(!t.detail.isValid)return!0;this.shiftTabRight(e)}return!((Math.abs(s)>50||g.left-i>50||i-h.right>50)&&!1!==e.allowFloating&&!this.dockManager.maximizedPane)||this.floatTabHeader(e,i,o,g)}floatTabHeader(e,t,n,i){const o=new DOMRect(t-this.initialTabHeaderClickOffset.x,n-this.initialTabHeaderClickOffset.y,i.width,i.height);let a,s;e.type===c.contentPane&&(s=this.getParent(e),a=s.type===c.tabGroupPane&&e!==this.dockManager.flyoutPane?s.panes:[e]),this.draggedTab=null;const r={type:d.floatPane,location:{x:o.x,y:o.y},width:o.width,height:o.height},l=this.dockManager.paneDragOver.emit({sourcePane:e,panes:a,action:r,isValid:!0});return!(l.defaultPrevented||l.detail.isValid&&(this.initialDragClientPoint={x:t,y:n},this.floatTab(e,o.x,o.y,r.width,r.height),1))}resolveChildPanesAllowMaximize(e){return this.getChildContentPanes(e).filter((e=>this.isContentPaneVisible(e))).every((e=>{var t;return null!==(t=e.allowMaximize)&&void 0!==t?t:this.dockManager.allowMaximize}))}normalizeMaximizedPane(e){this.dockManager.maximizedPane&&(this.dockManager.maximizedPane.type===c.splitPane||this.dockManager.maximizedPane.type===c.tabGroupPane?this.getChildContentPanes(this.dockManager.maximizedPane):[this.dockManager.maximizedPane]).every((t=>t!==e))&&this.maximizePane(this.dockManager.maximizedPane)}resolveAllowMaximize(e){var t,n;if(e.type===c.splitPane||e.type===c.tabGroupPane)return this.resolveChildPanesAllowMaximize(e);if(e.type===c.contentPane){if(!this.getActualIsPinned(e))return null!==(t=e.allowMaximize)&&void 0!==t?t:this.dockManager.allowMaximize;const i=this.getParent(e);return i.type===c.tabGroupPane?this.resolveChildPanesAllowMaximize(i):null!==(n=e.allowMaximize)&&void 0!==n?n:this.dockManager.allowMaximize}}getDropShadowRect(){var e;const t=this.dropTargetParentRect,n=this.dockManager.dropTargetPaneInfo;if(!n)return;const i=new DOMRect,o=null!==(e=this.getPaneToDock(this.dockManager.draggedPane).size)&&void 0!==e?e:100,a=b.isDockingIndicatorOuter(this.dockingIndicator.position),s=a?t:n.targetRect;if(this.dockingIndicator.position===r.center)return i.x=s.x,i.y=s.y,i.width=s.width,i.height=s.height,i;const l=a?n.docHost:n.pane,c=this.getParent(l),d=this.getSplitPaneVisibleChildren(c),h=d.indexOf(this.dockManager.draggedPane);h>-1&&d.splice(h,1);const g=d.indexOf(l),p=b.isDockingIndicatorVertical(this.dockingIndicator.position),u=b.isSplitPaneVertical(c),m=p&&u||!p&&!u,f="rtl"===this.dockingIndicator.direction,v=d.reduce(((e,t)=>e+(t.size||100)),0),x=!f||p?d.slice(0,g).reduce(((e,t)=>e+(t.size||100)),0):d.slice(g,d.length).reduce(((e,t)=>e+(t.size||100)),0),P=!f||p?d.slice(0,g+1).reduce(((e,t)=>e+(t.size||100)),0):d.slice(g+1,d.length).reduce(((e,t)=>e+(t.size||100)),0);switch(this.dockingIndicator.position){case r.left:case r.outerLeft:i.x=s.x,i.y=s.y,i.height=s.height,m?(i.width=o/(o+v)*t.width,i.x=f?t.left+P/(o+v)*t.width:t.left+x/(o+v)*t.width):i.width=t.width/2;break;case r.right:case r.outerRight:i.y=s.y,i.height=s.height,m?(i.width=o/(o+v)*t.width,i.x=f?t.left+x/(o+v)*t.width:t.left+P/(o+v)*t.width):(i.width=t.width/2,i.x=t.right-i.width);break;case r.top:case r.outerTop:i.x=s.x,i.y=s.y,i.width=s.width,m?(i.height=o/(o+v)*t.height,i.y=t.top+x/(o+v)*t.height):i.height=t.height/2;break;case r.bottom:case r.outerBottom:i.x=s.x,i.width=s.width,m?(i.height=o/(o+v)*t.height,i.y=t.top+P/(o+v)*t.height):(i.height=t.height/2,i.y=t.bottom-i.height)}return i}getDropShadowRectRoot(){var e;const t=this.dropTargetParentRect,n=new DOMRect,i=null!==(e=this.getPaneToDock(this.dockManager.draggedPane).size)&&void 0!==e?e:100,o=this.getSplitPaneVisibleChildren(this.dockManager.layout.rootPane),a=o.indexOf(this.dockManager.draggedPane);a>-1&&o.splice(a,1);const s=o.reduce(((e,t)=>e+(t.size||100)),0),l=b.isDockingIndicatorVertical(this.dockingIndicator.position),c=b.isSplitPaneVertical(this.dockManager.layout.rootPane),d=l&&c||!l&&!c,h=0===o.length;switch(this.dockingIndicator.position){case r.left:n.x=t.x,n.y=t.y,n.height=t.height,n.width=d||h?i/(i+s)*t.width:t.width/2;break;case r.right:n.y=t.y,n.height=t.height,n.width=d||h?n.width=i/(i+s)*t.width:t.width/2,n.x=t.right-n.width;break;case r.top:n.x=t.x,n.y=t.y,n.width=t.width,n.height=d||h?i/(i+s)*t.height:t.height/2;break;case r.bottom:n.x=t.x,n.width=t.width,n.height=d||h?i/(i+s)*t.height:t.height/2,n.y=t.bottom-n.height}return n}selectHiddenTab(e,t){const n=e.panes.indexOf(t);e.panes.splice(n,1),e.panes.splice(0,0,t),e.selectedIndex=0,this.updateLayout()}shiftTabLeft(e){const t=this.getParent(e),n=t.panes.indexOf(e);n>0&&(t.panes.splice(n,1),t.panes.splice(n-1,0,e),t.selectedIndex=n-1,this.updateLayout()),this.forceDragTabHeader=e}shiftTabRight(e){const t=this.getParent(e),n=t.panes.indexOf(e);n<t.panes.length-1&&(t.panes.splice(n,1),t.panes.splice(n+1,0,e),t.selectedIndex=n+1,this.updateLayout()),this.forceDragTabHeader=e}cacheDocumentsOrder(){this.documentsCache=this.visibleDocuments.filter((e=>!e.disabled))}cacheContentPanesOrder(){this.contentPanesCache=this.visibleContentPanes.filter((e=>!e.disabled))}focusPrevContentPane(e){const t=e?this.documentsCache:this.contentPanesCache,n=t.indexOf(this.dockManager.activePane),i=n>0?t[n-1]:t[t.length-1];this.normalizeMaximizedPane(i),this.dockManager.activePane=i}focusNextContentPane(e){const t=e?this.documentsCache:this.contentPanesCache,n=t.indexOf(this.dockManager.activePane),i=n>=0&&n<t.length-1?t[n+1]:t[0];this.normalizeMaximizedPane(i),this.dockManager.activePane=i}}class S{constructor(e){this.service=e}handleKeydown(e){if(this.service.dockManager.disableKeyboardNavigation)return;const t=this.service.dockManager.activePane,n=b.isControlOrMetaPressed(e),i=b.isAltPressed(e),o=e.shiftKey;if("Control"===e.key||"Meta"===e.key||"OS"===e.key)this.service.cacheDocumentsOrder();else if("Alt"===e.key||"AltGraph"===e.key)this.service.cacheContentPanesOrder();else if("F6"===e.key||e.key.startsWith("Arrow")&&!o&&n)this.handleFocusPane(e),e.stopPropagation();else if("F3"===e.key&&i&&t)this.service.dockManager.focusElement(),this.service.closePane(t),e.stopPropagation();else if(e.key.startsWith("Arrow")&&o&&t)this.service.dockManager.focusElement(),this.handleDockPane(e),e.stopPropagation();else{if("F7"!==e.key&&"F8"!==e.key||!i&&!n)return;this.setPaneNavigatorMeta(i,n,o),e.stopPropagation()}}handleFocusPane(e){const t=b.isAltPressed(e),n=b.isControlOrMetaPressed(e),i=e.shiftKey,o="F6"===e.key,a="ArrowLeft"===e.key,s="ArrowRight"===e.key;t&&i&&o?this.service.focusPrevContentPane(!1):t&&o?this.service.focusNextContentPane(!1):n&&i&&o||n&&a?this.service.focusPrevContentPane(!0):(n&&o||n&&s)&&this.service.focusNextContentPane(!0)}handleDockPane(e){const t=e.key,n=b.isControlOrMetaPressed(e),i=e.shiftKey;if(n&&i)this.handleRootDockPane(t);else if(i){const e=this.service.getParent(this.service.dockManager.activePane);e.type===c.tabGroupPane&&e.panes.length>1&&this.handleInnerDockPane(t)}}handleRootDockPane(e){switch(e){case"ArrowUp":this.service.rootDockPane(r.top);break;case"ArrowDown":this.service.rootDockPane(r.bottom);break;case"ArrowLeft":this.service.rootDockPane(r.left);break;case"ArrowRight":this.service.rootDockPane(r.right)}}handleInnerDockPane(e){switch(e){case"ArrowUp":this.service.dockPane(r.top);break;case"ArrowDown":this.service.dockPane(r.bottom);break;case"ArrowLeft":this.service.dockPane(r.left);break;case"ArrowRight":this.service.dockPane(r.right)}}setPaneNavigatorMeta(e,t,n){let i=0;const o=this.service.visibleContentPanes.concat(this.service.visibleDocuments);if(o.length>0){t?i=this.service.visibleDocuments.length>0?n?this.service.visibleContentPanes.length+this.service.visibleDocuments.length-1:this.service.visibleContentPanes.length:n?this.service.visibleContentPanes.length-1:0:e&&(i=n?this.service.visibleContentPanes.length>0?this.service.visibleContentPanes.length-1:this.service.visibleDocuments.length-1:0);const a={activePanes:this.service.visibleContentPanes,activeDocuments:this.service.visibleDocuments,initialIndex:i,previousActivePaneIndex:o.indexOf(this.service.dockManager.activePane)};this.service.dockManager.activePane=null,this.service.dockManager.navigationPaneMeta=a}}}var T;!function(e){e.click="click",e.drop="drop",e.maximizeOrMinimize="maximizeOrMinimize"}(T||(T={}));let P=class{constructor(e){t(this,e),this.paneHeaderConnected=s(this,"paneHeaderConnected",7),this.paneHeaderDisconnected=s(this,"paneHeaderDisconnected",7),this.tabHeaderConnected=s(this,"tabHeaderConnected",7),this.tabHeaderDisconnected=s(this,"tabHeaderDisconnected",7),this.splitterResizeStart=s(this,"splitterResizeStart",7),this.splitterResizeEnd=s(this,"splitterResizeEnd",7),this.paneClose=s(this,"paneClose",7),this.panePinnedToggle=s(this,"panePinnedToggle",7),this.activePaneChanged=s(this,"activePaneChanged",7),this.paneDragStart=s(this,"paneDragStart",7),this.paneDragOver=s(this,"paneDragOver",7),this.paneDragEnd=s(this,"paneDragEnd",7),this.floatingPaneResizeMove=s(this,"floatingPaneResizeMove",7),this.floatingPaneResizeEnd=s(this,"floatingPaneResizeEnd",7),this.floatingPaneResizeStart=s(this,"floatingPaneResizeStart",7),this.layoutChange=s(this,"layoutChange",7),this._tabHeaderIconClicked=!1,this.service=new A(this),this.keyboardService=new S(this.service),this.activePaneInternalSet=!1,this.domObserver=new MutationObserver(this.mutationCallback.bind(this)),this.shouldMovePane=!1,this.scheduledCallbacks=[],this.shouldClearActivePane=!0,this.isDragging=!1,this.splitterOffset=1,this.templatableComponents=[{slot:"paneHeaderCloseButton",targetName:"igc-pane-header-component",targetSlot:"paneHeaderCloseButton",targetPart:"pane-header-close-button"},{slot:"tabHeaderCloseButton",targetName:"igc-tab-header-component",targetSlot:"tabHeaderCloseButton",targetPart:"tab-header-close-button"},{slot:"tabHeaderCloseButton",targetName:"igc-context-menu-component",targetSlot:"contextMenuCloseButton",targetPart:"context-menu-close-button"},{slot:"closeButton",targetName:"igc-pane-header-component",targetSlot:"paneHeaderCloseButton",targetPart:"pane-header-close-button"},{slot:"closeButton",targetName:"igc-tab-header-component",targetSlot:"tabHeaderCloseButton",targetPart:"tab-header-close-button"},{slot:"closeButton",targetName:"igc-context-menu-component",targetSlot:"contextMenuCloseButton",targetPart:"context-menu-close-button"},{slot:"moreTabsButton",targetName:"igc-tabs-component",targetSlot:"tabsMoreButton",targetPart:"tabs-more-button"},{slot:"maximizeButton",targetName:"igc-pane-header-component",targetSlot:"paneHeaderMaximizeButton",targetPart:"pane-header-maximize-button"},{slot:"maximizeButton",targetName:"igc-tabs-component",targetSlot:"tabsMaximizeButton",targetPart:"tabs-maximize-button"},{slot:"minimizeButton",targetName:"igc-pane-header-component",targetSlot:"paneHeaderMinimizeButton",targetPart:"pane-header-minimize-button"},{slot:"minimizeButton",targetName:"igc-tabs-component",targetSlot:"tabsMinimizeButton",targetPart:"tabs-minimize-button"},{slot:"pinButton",targetName:"igc-pane-header-component",targetSlot:"paneHeaderPinButton",targetPart:"pane-header-pin-button"},{slot:"unpinButton",targetName:"igc-pane-header-component",targetSlot:"paneHeaderUnpinButton",targetPart:"pane-header-unpin-button"},{slot:"unpinButton",targetName:"igc-context-menu-component",targetSlot:"contextMenuUnpinButton",targetPart:"context-menu-unpin-button"},{slot:"moreOptionsButton",targetName:"igc-tab-header-component",targetSlot:"tabHeaderMoreOptionsButton",targetPart:"tab-header-more-options-button"},{slot:"splitterHandle",targetName:"igc-splitter-component",targetSlot:"splitterHandle",targetPart:"splitter-handle"}],this.floatingPaneZIndicesMap=new Map,this.templates=new Map,this.allowMaximize=!0,th